projects
/
gbrg
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28bde6a
)
Added who_next call
author
Lukas Krickl
<lukas@krickl.dev>
Mon, 18 Nov 2024 17:04:04 +0000
(18:04 +0100)
committer
Lukas Krickl
<lukas@krickl.dev>
Mon, 18 Nov 2024 17:04:04 +0000
(18:04 +0100)
src/actor.s
patch
|
blob
|
history
diff --git
a/src/actor.s
b/src/actor.s
index b617ffc1ade2119c7f6a2e9e659347909636746a..806cfbef33aee6b048b9d9fb38ee1e261935652c 100644
(file)
--- a/
src/actor.s
+++ b/
src/actor.s
@@
-128,3
+128,18
@@
anim_move:
ld a, b
ret
+
+ ; advance to the next actor
+ ; effectively ending the current actor's turn
+who_next:
+ ld a, [who]
+ inc a ; who++
+
+ ; if who > actor_max
+ ; go to player
+ cp a, ACTORS_MAX
+ jr z, @no_player REL
+ ld a, WHO_PLAYER
+@no_player:
+ ld [who], a
+ ret