Say "BANK(Foo) ; aka BANK(Bar)" to clarify that Foo and Bar share a bank

This commit is contained in:
Rangi 2019-01-12 15:17:20 -05:00
parent 07374f02cc
commit 1853e3d127
13 changed files with 23 additions and 23 deletions

View File

@ -10,7 +10,7 @@ CURRENT_MAP_HEIGHT = \2_HEIGHT
db CURRENT_MAP_HEIGHT, CURRENT_MAP_WIDTH db CURRENT_MAP_HEIGHT, CURRENT_MAP_WIDTH
db BANK(\1_Blocks) db BANK(\1_Blocks)
dw \1_Blocks dw \1_Blocks
db BANK(\1_MapScripts) ; BANK(\1_MapEvents) db BANK(\1_MapScripts) ; aka BANK(\1_MapEvents)
dw \1_MapScripts dw \1_MapScripts
dw \1_MapEvents dw \1_MapEvents
db \4 db \4

View File

@ -138,7 +138,7 @@ ConvertTrainerBattlePokeballTilesTo2bpp:
pop hl pop hl
ld de, wDecompressScratch ld de, wDecompressScratch
ld b, BANK(ConvertTrainerBattlePokeballTilesTo2bpp) ; BANK(@) ld b, BANK(@)
ld c, $28 ld c, $28
call Request2bpp call Request2bpp
pop af pop af

View File

@ -4157,7 +4157,7 @@ PursuitSwitch:
ld a, [wLastPlayerMon] ld a, [wLastPlayerMon]
ld [wCurBattleMon], a ld [wCurBattleMon], a
.do_turn .do_turn
ld a, BANK(DoPlayerTurn) ; and BANK(DoEnemyTurn) ld a, BANK(DoPlayerTurn) ; aka BANK(DoEnemyTurn)
rst FarCall rst FarCall
ld a, BATTLE_VARS_MOVE ld a, BATTLE_VARS_MOVE
@ -4407,7 +4407,7 @@ UseHeldStatusHealingItem:
.got_pointer .got_pointer
call SwitchTurnCore call SwitchTurnCore
ld a, BANK(CalcPlayerStats) ; and BANK(CalcEnemyStats) ld a, BANK(CalcPlayerStats) ; aka BANK(CalcEnemyStats)
rst FarCall rst FarCall
call SwitchTurnCore call SwitchTurnCore
call ItemRecoveryAnim call ItemRecoveryAnim

View File

@ -59,7 +59,7 @@ BattleCommand_Present:
jr z, .got_hp_fn_pointer jr z, .got_hp_fn_pointer
ld hl, AICheckEnemyMaxHP ld hl, AICheckEnemyMaxHP
.got_hp_fn_pointer .got_hp_fn_pointer
ld a, BANK(AICheckPlayerMaxHP) ; and BANK(AICheckEnemyMaxHP) ld a, BANK(AICheckPlayerMaxHP) ; aka BANK(AICheckEnemyMaxHP)
rst FarCall rst FarCall
jr c, .already_fully_healed jr c, .already_fully_healed

View File

@ -1,5 +1,5 @@
CheckSave:: CheckSave::
ld a, BANK(sCheckValue1) ; BANK(sCheckValue2) ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2)
call GetSRAMBank call GetSRAMBank
ld a, [sCheckValue1] ld a, [sCheckValue1]
ld b, a ld b, a

View File

@ -111,7 +111,7 @@ GetCardPic:
.GotClass: .GotClass:
ld de, vTiles2 tile $00 ld de, vTiles2 tile $00
ld bc, $23 tiles ld bc, $23 tiles
ld a, BANK(ChrisCardPic) ; BANK(KrisCardPic) ld a, BANK(ChrisCardPic) ; aka BANK(KrisCardPic)
call FarCopyBytes call FarCopyBytes
ld hl, CardGFX ld hl, CardGFX
ld de, vTiles2 tile $23 ld de, vTiles2 tile $23
@ -165,7 +165,7 @@ HOF_LoadTrainerFrontpic:
.GotPic: .GotPic:
ld hl, vTiles2 ld hl, vTiles2
ld b, BANK(ChrisPic) ; BANK(KrisPic) ld b, BANK(ChrisPic) ; aka BANK(KrisPic)
ld c, 7 * 7 ld c, 7 * 7
call Get2bpp call Get2bpp
call WaitBGMap call WaitBGMap
@ -194,7 +194,7 @@ DrawIntroPlayerPic:
ld de, KrisPic ld de, KrisPic
.GotPic: .GotPic:
ld hl, vTiles2 ld hl, vTiles2
ld b, BANK(ChrisPic) ; BANK(KrisPic) ld b, BANK(ChrisPic) ; aka BANK(KrisPic)
ld c, 7 * 7 ; dimensions ld c, 7 * 7 ; dimensions
call Get2bpp call Get2bpp

View File

@ -101,22 +101,22 @@ Function81911:
ret ret
Function81928: Function81928:
ld a, BANK(PokemonPalettes) ; BANK(TrainerPalettes) ld a, BANK(PokemonPalettes) ; aka BANK(TrainerPalettes)
call GetFarByte call GetFarByte
ld [de], a ld [de], a
inc de inc de
inc hl inc hl
ld a, BANK(PokemonPalettes) ; BANK(TrainerPalettes) ld a, BANK(PokemonPalettes) ; aka BANK(TrainerPalettes)
call GetFarByte call GetFarByte
ld [de], a ld [de], a
inc de inc de
inc hl inc hl
ld a, BANK(PokemonPalettes) ; BANK(TrainerPalettes) ld a, BANK(PokemonPalettes) ; aka BANK(TrainerPalettes)
call GetFarByte call GetFarByte
ld [de], a ld [de], a
inc de inc de
inc hl inc hl
ld a, BANK(PokemonPalettes) ; BANK(TrainerPalettes) ld a, BANK(PokemonPalettes) ; aka BANK(TrainerPalettes)
call GetFarByte call GetFarByte
ld [de], a ld [de], a
inc de inc de

View File

@ -462,7 +462,7 @@ HallOfFame_InitSaveIfNeeded:
ret ret
ValidateSave: ValidateSave:
ld a, BANK(sCheckValue1) ; BANK(sCheckValue2) ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2)
call GetSRAMBank call GetSRAMBank
ld a, SAVE_CHECK_VALUE_1 ld a, SAVE_CHECK_VALUE_1
ld [sCheckValue1], a ld [sCheckValue1], a
@ -524,7 +524,7 @@ SaveChecksum:
ret ret
ValidateBackupSave: ValidateBackupSave:
ld a, BANK(sBackupCheckValue1) ; BANK(sBackupCheckValue2) ld a, BANK(sBackupCheckValue1) ; aka BANK(sBackupCheckValue2)
call GetSRAMBank call GetSRAMBank
ld a, SAVE_CHECK_VALUE_1 ld a, SAVE_CHECK_VALUE_1
ld [sBackupCheckValue1], a ld [sBackupCheckValue1], a
@ -677,7 +677,7 @@ TryLoadSaveData:
INCLUDE "data/default_options.asm" INCLUDE "data/default_options.asm"
CheckPrimarySaveFile: CheckPrimarySaveFile:
ld a, BANK(sCheckValue1) ; BANK(sCheckValue2) ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2)
call GetSRAMBank call GetSRAMBank
ld a, [sCheckValue1] ld a, [sCheckValue1]
cp SAVE_CHECK_VALUE_1 cp SAVE_CHECK_VALUE_1
@ -698,7 +698,7 @@ CheckPrimarySaveFile:
ret ret
CheckBackupSaveFile: CheckBackupSaveFile:
ld a, BANK(sBackupCheckValue1) ; BANK(sBackupCheckValue2) ld a, BANK(sBackupCheckValue1) ; aka BANK(sBackupCheckValue2)
call GetSRAMBank call GetSRAMBank
ld a, [sBackupCheckValue1] ld a, [sBackupCheckValue1]
cp SAVE_CHECK_VALUE_1 cp SAVE_CHECK_VALUE_1

View File

@ -176,7 +176,7 @@ LoadWarpData:
; MOUNT_MOON_SQUARE and TIN_TOWER_ROOF are outdoor maps within indoor maps. ; MOUNT_MOON_SQUARE and TIN_TOWER_ROOF are outdoor maps within indoor maps.
; Dig and Escape Rope should not take you to them. ; Dig and Escape Rope should not take you to them.
ld a, [wPrevMapGroup] ld a, [wPrevMapGroup]
cp GROUP_MOUNT_MOON_SQUARE ; GROUP_TIN_TOWER_ROOF cp GROUP_MOUNT_MOON_SQUARE ; aka GROUP_TIN_TOWER_ROOF
jr nz, .not_mt_moon_or_tin_tower jr nz, .not_mt_moon_or_tin_tower
ld a, [wPrevMapNumber] ld a, [wPrevMapNumber]
cp MAP_MOUNT_MOON_SQUARE cp MAP_MOUNT_MOON_SQUARE

View File

@ -71,7 +71,7 @@ PlayMusic::
ldh a, [hROMBank] ldh a, [hROMBank]
push af push af
ld a, BANK(_PlayMusic) ; and BANK(_MapSetup_Sound_Off) ld a, BANK(_PlayMusic) ; aka BANK(_MapSetup_Sound_Off)
ldh [hROMBank], a ldh [hROMBank], a
ld [MBC3RomBank], a ld [MBC3RomBank], a

View File

@ -97,7 +97,7 @@ Init::
call ClearSprites call ClearSprites
call ClearsScratch call ClearsScratch
ld a, BANK(GameInit) ; and BANK(WriteOAMDMACodeToHRAM) ld a, BANK(GameInit) ; aka BANK(WriteOAMDMACodeToHRAM)
rst Bankswitch rst Bankswitch
call WriteOAMDMACodeToHRAM call WriteOAMDMACodeToHRAM

View File

@ -3,7 +3,7 @@ ScrollingMenu::
ldh a, [hROMBank] ldh a, [hROMBank]
push af push af
ld a, BANK(_ScrollingMenu) ; and BANK(_InitScrollingMenu) ld a, BANK(_ScrollingMenu) ; aka BANK(_InitScrollingMenu)
rst Bankswitch rst Bankswitch
call _InitScrollingMenu call _InitScrollingMenu

View File

@ -2,7 +2,7 @@ RefreshScreen::
call ClearWindowData call ClearWindowData
ldh a, [hROMBank] ldh a, [hROMBank]
push af push af
ld a, BANK(ReanchorBGMap_NoOAMUpdate) ; and BANK(LoadFonts_NoOAMUpdate) ld a, BANK(ReanchorBGMap_NoOAMUpdate) ; aka BANK(LoadFonts_NoOAMUpdate)
rst Bankswitch rst Bankswitch
call ReanchorBGMap_NoOAMUpdate call ReanchorBGMap_NoOAMUpdate
@ -47,7 +47,7 @@ OpenText::
call ClearWindowData call ClearWindowData
ldh a, [hROMBank] ldh a, [hROMBank]
push af push af
ld a, BANK(ReanchorBGMap_NoOAMUpdate) ; and BANK(LoadFonts_NoOAMUpdate) ld a, BANK(ReanchorBGMap_NoOAMUpdate) ; aka BANK(LoadFonts_NoOAMUpdate)
rst Bankswitch rst Bankswitch
call ReanchorBGMap_NoOAMUpdate ; clear bgmap call ReanchorBGMap_NoOAMUpdate ; clear bgmap