From f6c19cf0ae20dc7b8d701e5c87f9cbd2960e5ecc Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Mon, 18 Nov 2024 18:04:04 +0100 Subject: [PATCH] Added who_next call --- src/actor.s | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/actor.s b/src/actor.s index b617ffc..806cfbe 100644 --- 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 -- 2.30.2