ref: 1853e3d127556103fe5828b8589305192106d27e
parent: 07374f02cc4c61b7b6ea326715a1cb674c9faeb1
author: Rangi <[email protected]>
date: Sat Jan 12 10:17:20 EST 2019
Say "BANK(Foo) ; aka BANK(Bar)" to clarify that Foo and Bar share a bank
--- a/data/maps/attributes.asm
+++ b/data/maps/attributes.asm
@@ -10,7 +10,7 @@
db CURRENT_MAP_HEIGHT, CURRENT_MAP_WIDTH
db BANK(\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_MapEvents
db \4
--- a/engine/battle/battle_transition.asm
+++ b/engine/battle/battle_transition.asm
@@ -138,7 +138,7 @@
pop hl
ld de, wDecompressScratch
- ld b, BANK(ConvertTrainerBattlePokeballTilesTo2bpp) ; BANK(@)
+ ld b, BANK(@)
ld c, $28
call Request2bpp
pop af
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -4157,7 +4157,7 @@
ld a, [wLastPlayerMon]
ld [wCurBattleMon], a
.do_turn
- ld a, BANK(DoPlayerTurn) ; and BANK(DoEnemyTurn)
+ ld a, BANK(DoPlayerTurn) ; aka BANK(DoEnemyTurn)
rst FarCall
ld a, BATTLE_VARS_MOVE
@@ -4407,7 +4407,7 @@
.got_pointer
call SwitchTurnCore
- ld a, BANK(CalcPlayerStats) ; and BANK(CalcEnemyStats)
+ ld a, BANK(CalcPlayerStats) ; aka BANK(CalcEnemyStats)
rst FarCall
call SwitchTurnCore
call ItemRecoveryAnim
--- a/engine/battle/move_effects/present.asm
+++ b/engine/battle/move_effects/present.asm
@@ -59,7 +59,7 @@
jr z, .got_hp_fn_pointer
ld hl, AICheckEnemyMaxHP
.got_hp_fn_pointer
- ld a, BANK(AICheckPlayerMaxHP) ; and BANK(AICheckEnemyMaxHP)
+ ld a, BANK(AICheckPlayerMaxHP) ; aka BANK(AICheckEnemyMaxHP)
rst FarCall
jr c, .already_fully_healed
--- a/engine/events/checksave.asm
+++ b/engine/events/checksave.asm
@@ -1,5 +1,5 @@
CheckSave::
- ld a, BANK(sCheckValue1) ; BANK(sCheckValue2)
+ ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2)
call GetSRAMBank
ld a, [sCheckValue1]
ld b, a
--- a/engine/gfx/player_gfx.asm
+++ b/engine/gfx/player_gfx.asm
@@ -111,7 +111,7 @@
.GotClass:
ld de, vTiles2 tile $00
ld bc, $23 tiles
- ld a, BANK(ChrisCardPic) ; BANK(KrisCardPic)
+ ld a, BANK(ChrisCardPic) ; aka BANK(KrisCardPic)
call FarCopyBytes
ld hl, CardGFX
ld de, vTiles2 tile $23
@@ -165,7 +165,7 @@
.GotPic:
ld hl, vTiles2
- ld b, BANK(ChrisPic) ; BANK(KrisPic)
+ ld b, BANK(ChrisPic) ; aka BANK(KrisPic)
ld c, 7 * 7
call Get2bpp
call WaitBGMap
@@ -194,7 +194,7 @@
ld de, KrisPic
.GotPic:
ld hl, vTiles2
- ld b, BANK(ChrisPic) ; BANK(KrisPic)
+ ld b, BANK(ChrisPic) ; aka BANK(KrisPic)
ld c, 7 * 7 ; dimensions
call Get2bpp
--- a/engine/menus/debug.asm
+++ b/engine/menus/debug.asm
@@ -101,22 +101,22 @@
ret
Function81928:
- ld a, BANK(PokemonPalettes) ; BANK(TrainerPalettes)
+ ld a, BANK(PokemonPalettes) ; aka BANK(TrainerPalettes)
call GetFarByte
ld [de], a
inc de
inc hl
- ld a, BANK(PokemonPalettes) ; BANK(TrainerPalettes)
+ ld a, BANK(PokemonPalettes) ; aka BANK(TrainerPalettes)
call GetFarByte
ld [de], a
inc de
inc hl
- ld a, BANK(PokemonPalettes) ; BANK(TrainerPalettes)
+ ld a, BANK(PokemonPalettes) ; aka BANK(TrainerPalettes)
call GetFarByte
ld [de], a
inc de
inc hl
- ld a, BANK(PokemonPalettes) ; BANK(TrainerPalettes)
+ ld a, BANK(PokemonPalettes) ; aka BANK(TrainerPalettes)
call GetFarByte
ld [de], a
inc de
--- a/engine/menus/save.asm
+++ b/engine/menus/save.asm
@@ -462,7 +462,7 @@
ret
ValidateSave:
- ld a, BANK(sCheckValue1) ; BANK(sCheckValue2)
+ ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2)
call GetSRAMBank
ld a, SAVE_CHECK_VALUE_1
ld [sCheckValue1], a
@@ -524,7 +524,7 @@
ret
ValidateBackupSave:
- ld a, BANK(sBackupCheckValue1) ; BANK(sBackupCheckValue2)
+ ld a, BANK(sBackupCheckValue1) ; aka BANK(sBackupCheckValue2)
call GetSRAMBank
ld a, SAVE_CHECK_VALUE_1
ld [sBackupCheckValue1], a
@@ -677,7 +677,7 @@
INCLUDE "data/default_options.asm"
CheckPrimarySaveFile:
- ld a, BANK(sCheckValue1) ; BANK(sCheckValue2)
+ ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2)
call GetSRAMBank
ld a, [sCheckValue1]
cp SAVE_CHECK_VALUE_1
@@ -698,7 +698,7 @@
ret
CheckBackupSaveFile:
- ld a, BANK(sBackupCheckValue1) ; BANK(sBackupCheckValue2)
+ ld a, BANK(sBackupCheckValue1) ; aka BANK(sBackupCheckValue2)
call GetSRAMBank
ld a, [sBackupCheckValue1]
cp SAVE_CHECK_VALUE_1
--- a/engine/overworld/warp_connection.asm
+++ b/engine/overworld/warp_connection.asm
@@ -176,7 +176,7 @@
; MOUNT_MOON_SQUARE and TIN_TOWER_ROOF are outdoor maps within indoor maps.
; Dig and Escape Rope should not take you to them.
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
ld a, [wPrevMapNumber]
cp MAP_MOUNT_MOON_SQUARE
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -71,7 +71,7 @@
ldh a, [hROMBank]
push af
- ld a, BANK(_PlayMusic) ; and BANK(_MapSetup_Sound_Off)
+ ld a, BANK(_PlayMusic) ; aka BANK(_MapSetup_Sound_Off)
ldh [hROMBank], a
ld [MBC3RomBank], a
--- a/home/init.asm
+++ b/home/init.asm
@@ -97,7 +97,7 @@
call ClearSprites
call ClearsScratch
- ld a, BANK(GameInit) ; and BANK(WriteOAMDMACodeToHRAM)
+ ld a, BANK(GameInit) ; aka BANK(WriteOAMDMACodeToHRAM)
rst Bankswitch
call WriteOAMDMACodeToHRAM
--- a/home/scrolling_menu.asm
+++ b/home/scrolling_menu.asm
@@ -3,7 +3,7 @@
ldh a, [hROMBank]
push af
- ld a, BANK(_ScrollingMenu) ; and BANK(_InitScrollingMenu)
+ ld a, BANK(_ScrollingMenu) ; aka BANK(_InitScrollingMenu)
rst Bankswitch
call _InitScrollingMenu
--- a/home/window.asm
+++ b/home/window.asm
@@ -2,7 +2,7 @@
call ClearWindowData
ldh a, [hROMBank]
push af
- ld a, BANK(ReanchorBGMap_NoOAMUpdate) ; and BANK(LoadFonts_NoOAMUpdate)
+ ld a, BANK(ReanchorBGMap_NoOAMUpdate) ; aka BANK(LoadFonts_NoOAMUpdate)
rst Bankswitch
call ReanchorBGMap_NoOAMUpdate
@@ -47,7 +47,7 @@
call ClearWindowData
ldh a, [hROMBank]
push af
- ld a, BANK(ReanchorBGMap_NoOAMUpdate) ; and BANK(LoadFonts_NoOAMUpdate)
+ ld a, BANK(ReanchorBGMap_NoOAMUpdate) ; aka BANK(LoadFonts_NoOAMUpdate)
rst Bankswitch
call ReanchorBGMap_NoOAMUpdate ; clear bgmap