diff options
author | yenatch <yenatch@gmail.com> | 2014-08-07 21:17:44 -0700 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2014-08-07 21:17:44 -0700 |
commit | 1cf79b6f15761ec95ba1b0f9d6d83781c4240612 (patch) | |
tree | 705b9c16082db98d1badd90ad214e433b95f9256 /engine/battle | |
parent | 8dd46620bc7e17c4c582a391fb95c9e29ef58576 (diff) |
Fix static banks passed into GetName.
This appears to be the only other use of wPredefBank.
Chances are there are more uncaught banks. Known cases are marked as "hardcoded" or similar.
Diffstat (limited to 'engine/battle')
-rwxr-xr-x | engine/battle/4_2.asm | 2 | ||||
-rwxr-xr-x | engine/battle/core.asm | 13 | ||||
-rwxr-xr-x | engine/battle/e.asm | 2 |
3 files changed, 10 insertions, 7 deletions
diff --git a/engine/battle/4_2.asm b/engine/battle/4_2.asm index c5c62796..b53ea6e4 100755 --- a/engine/battle/4_2.asm +++ b/engine/battle/4_2.asm @@ -391,7 +391,7 @@ GetTrainerName_: ; 13a58 (4:7a58) ld [wd0b5], a ld a, TRAINER_NAME ld [W_LISTTYPE], a - ld a, $e + ld a, BANK(TrainerNames) ld [wPredefBank], a call GetName ld hl, wcd6d diff --git a/engine/battle/core.asm b/engine/battle/core.asm index b3495a29..399a8ee7 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -2184,7 +2184,9 @@ asm_3d00e: ; 3d00e (f:500e) jr Func_3d03c OldManItemList: ; 3d02d (f:502d) - db $01, POKE_BALL, 50, $ff + db 1 ; # items + db POKE_BALL, 50 + db -1 Func_3d031 ld hl, wNumBagItems ; wNumBagItems @@ -5471,7 +5473,7 @@ asm_3e70b: ; 3e70b (f:670b) res 6, [hl] ; no longer invulnerable to typcial attacks ld a, [W_ENEMYMOVENUM] ; W_ENEMYMOVENUM ld [wd0b5], a - ld a, $2c + ld a, BANK(MoveNames) ld [wPredefBank], a ld a, MOVE_NAME ld [W_LISTTYPE], a @@ -5950,10 +5952,11 @@ GetCurrentMove: ; 3eabe (f:6abe) call AddNTimes ld a, BANK(Moves) call FarCopyData - ld a, $2c + + ld a, BANK(MoveNames) ld [wPredefBank], a - ld a, $2 - ld [W_LISTTYPE], a ; list type 2 = move name + ld a, MOVE_NAME + ld [W_LISTTYPE], a call GetName ld de, wcd6d jp CopyStringToCF4B diff --git a/engine/battle/e.asm b/engine/battle/e.asm index 8b0476ca..a0d9d80c 100755 --- a/engine/battle/e.asm +++ b/engine/battle/e.asm @@ -587,7 +587,7 @@ Func_39b87: ; 39b87 (e:5b87) jr z, .asm_39bc1 push hl ld [wd0b5], a - ld a, $2c + ld a, BANK(MoveNames) ld [wPredefBank], a ld a, MOVE_NAME ld [W_LISTTYPE], a |