Improved who_next performance
authorLukas Krickl <lukas@krickl.dev>
Sun, 8 Dec 2024 07:32:13 +0000 (08:32 +0100)
committerLukas Krickl <lukas@krickl.dev>
Sun, 8 Dec 2024 07:32:13 +0000 (08:32 +0100)
src/actor.s

index 22e5eca8081048160f68425e13c550dc5dd7db75..edb48bd168283f9fe6ee7a0a27bfa5ccd548f5ac 100644 (file)
@@ -340,8 +340,8 @@ anim_clear:
   ; effectively ending the current actor's turn
 who_next:
   ld a, [end_turn]
-  cp a, 0
-  jr z, @skip REL
+  and a, a ; check for 0
+  ret z
 
   xor a, a
   ld [end_turn], a
@@ -356,5 +356,4 @@ who_next:
     ld a, WHO_PLAYER
 @no_player:
   ld [who], a
-@skip:
   ret