wNumActiveBattleAnims → wLastAnimObjectIndex

This variable never decrements, it only increments to give each battle
animation a different, and incremental "index".
This commit is contained in:
mid-kid 2019-02-15 17:21:51 +01:00
parent 4154f191e0
commit ee86b36766
3 changed files with 5 additions and 5 deletions

View File

@ -416,7 +416,7 @@ BattleBGEffect_BattlerObj_1Row:
.zero
call BGEffect_CheckFlyDigStatus
jr z, .not_flying_digging
ld hl, wNumActiveBattleAnims
ld hl, wLastAnimObjectIndex
inc [hl]
call EndBattleBGEffect
ret
@ -483,7 +483,7 @@ BattleBGEffect_BattlerObj_2Row:
.zero
call BGEffect_CheckFlyDigStatus
jr z, .not_flying_digging
ld hl, wNumActiveBattleAnims
ld hl, wLastAnimObjectIndex
inc [hl]
call EndBattleBGEffect
ret

View File

@ -15,7 +15,7 @@ QueueBattleAnimation:
.done
ld c, l
ld b, h
ld hl, wNumActiveBattleAnims
ld hl, wLastAnimObjectIndex
inc [hl]
call InitBattleAnimation
ret
@ -38,7 +38,7 @@ endr
ld d, h
ld hl, BATTLEANIMSTRUCT_INDEX
add hl, bc
ld a, [wNumActiveBattleAnims]
ld a, [wLastAnimObjectIndex]
ld [hli], a ; Index
ld a, [de]
inc de

View File

@ -3045,7 +3045,7 @@ wBGEffect4:: battle_bg_effect wBGEffect4
wBGEffect5:: battle_bg_effect wBGEffect5
wActiveBGEffectsEnd::
wNumActiveBattleAnims:: db ; d40e
wLastAnimObjectIndex:: db ; d40e
wBattleAnimFlags:: db ; d40f
wBattleAnimAddress:: dw ; d410