diff options
author | mid-kid <esteve.varela@gmail.com> | 2019-02-15 17:21:51 +0100 |
---|---|---|
committer | mid-kid <esteve.varela@gmail.com> | 2019-02-15 17:21:51 +0100 |
commit | ee86b367662ab8f7a81a644c66f5bf14ead59ba8 (patch) | |
tree | 55c480e193fc4ea7d04da2785aed0615d932c9f2 | |
parent | 4154f191e09404748de4faa3a63bcb51faf42c98 (diff) |
wNumActiveBattleAnims → wLastAnimObjectIndex
This variable never decrements, it only increments to give each battle
animation a different, and incremental "index".
-rw-r--r-- | engine/battle_anims/bg_effects.asm | 4 | ||||
-rw-r--r-- | engine/battle_anims/core.asm | 4 | ||||
-rw-r--r-- | wram.asm | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/engine/battle_anims/bg_effects.asm b/engine/battle_anims/bg_effects.asm index 0f2e716ca..a510038a5 100644 --- a/engine/battle_anims/bg_effects.asm +++ b/engine/battle_anims/bg_effects.asm @@ -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 diff --git a/engine/battle_anims/core.asm b/engine/battle_anims/core.asm index 86863389c..c5afb53ba 100644 --- a/engine/battle_anims/core.asm +++ b/engine/battle_anims/core.asm @@ -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 @@ -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 |