Add Sprite_CountActiveById, limit keese in twinrova fight

This commit is contained in:
scawful
2025-01-19 13:16:52 -05:00
parent c7db1c1776
commit f8a264d1df
2 changed files with 92 additions and 102 deletions

View File

@@ -317,7 +317,23 @@ Sprite_CheckForPresence:
.done
PLX
RTL
}
; $00 - ID of the sprite to check
; $02 - Number of sprites found
Sprite_CountActiveById:
{
STZ $02
LDX.b #$10
.x_loop
DEX
LDA $0E20, X : CMP.b $00 : BEQ .increment
BRA .continue
.increment
INC $02
.continue
CPX.b #$00 : BNE .x_loop
RTL
}
; =========================================================