Merge pull request #229 from yenatch/nuke-globals

Use globals to implicitly define labels before passing them into BANK().
This commit is contained in:
Bryan Bishop 2014-02-05 00:16:48 -08:00
commit ff6306400b
3 changed files with 22 additions and 0 deletions

View File

@ -2395,6 +2395,8 @@ BattleTextBox:: ; 3ac3
StdBattleTextBox:: ; 3ad5
; Open a textbox and print battle text at 20:hl.
GLOBAL BattleText
ld a, [hROMBank]
push af
@ -2411,6 +2413,9 @@ StdBattleTextBox:: ; 3ad5
Function3ae1:: ; 3ae1
GLOBAL BattleAnimations
GLOBAL BattleAnimCommands
ld a, BANK(BattleAnimations)
rst Bankswitch
@ -2566,6 +2571,7 @@ UpdateSound:: ; 3b6a
_LoadMusicByte:: ; 3b86
; CurMusicByte = [a:de]
GLOBAL LoadMusicByte
ld [hROMBank], a
ld [MBC3RomBank], a

View File

@ -770,6 +770,12 @@ GetPokedexEntryBank: ; ec38
ret
.PokedexEntryBanks
GLOBAL PokedexEntries1
GLOBAL PokedexEntries2
GLOBAL PokedexEntries3
GLOBAL PokedexEntries4
db BANK(PokedexEntries1)
db BANK(PokedexEntries2)
db BANK(PokedexEntries3)
@ -895,6 +901,10 @@ Function_0xeccc: ; eccc
Function_0xecdd: ; ecdd
GLOBAL EvosAttacks
GLOBAL EvosAttacksPointers
push bc
ld a, [TempEnemyMonSpecies]
dec a

View File

@ -41638,6 +41638,12 @@ Function44333: ; 44333
; 44351
PokedexEntryBanks: ; 44351
GLOBAL PokedexEntries1
GLOBAL PokedexEntries2
GLOBAL PokedexEntries3
GLOBAL PokedexEntries4
db BANK(PokedexEntries1)
db BANK(PokedexEntries2)
db BANK(PokedexEntries3)