summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2020-12-14 13:03:18 -0600
committerdannye <33dannye@gmail.com>2020-12-14 13:03:18 -0600
commitf4d31e19b0de7c9390f5645b551212ce2696b7b5 (patch)
tree64b7fa7f11b87b7c98bc1ea1b7bc171101c47ebc /src
parentde98637af1bbb51d98cfdfc1555ce6f205f45401 (diff)
Clean up some address comments
Diffstat (limited to 'src')
-rw-r--r--src/engine/bank01.asm26
-rw-r--r--src/engine/bank02.asm30
-rw-r--r--src/engine/bank03.asm41
-rw-r--r--src/engine/bank04.asm2
-rw-r--r--src/engine/bank05.asm6
-rw-r--r--src/engine/bank06.asm62
-rw-r--r--src/engine/bank07.asm5
-rw-r--r--src/engine/booster_packs.asm4
-rw-r--r--src/engine/effect_functions.asm4
-rw-r--r--src/engine/home.asm30
-rw-r--r--src/wram.asm10
11 files changed, 93 insertions, 127 deletions
diff --git a/src/engine/bank01.asm b/src/engine/bank01.asm
index c4a6b27..40c3edf 100644
--- a/src/engine/bank01.asm
+++ b/src/engine/bank01.asm
@@ -1019,7 +1019,7 @@ HandleEnergyDiscardMenuInput: ; 46b7 (1:46b7)
scf
ret
-EnergyDiscardCardListParameters:
+EnergyDiscardCardListParameters: ; 46f3 (1:46f3)
db 1, 5 ; cursor x, cursor y
db 4 ; item x
db 14 ; maximum length, in tiles, occupied by the name and level string of each card in the list
@@ -1161,7 +1161,7 @@ OpenMovePage: ; 478b (1:478b)
jr z, .loop
ret
-AttackMenuParameters:
+AttackMenuParameters: ; 47e4 (1:47e4)
db 1, 13 ; cursor x, cursor y
db 2 ; y displacement between items
db 2 ; number of items
@@ -1554,7 +1554,7 @@ PrintNumberOfHandAndDeckCards: ; 49ed (1:49ed)
jr nz, PrintOpponentNumberOfHandAndDeckCards
; fallthrough
-PrintPlayerNumberOfHandAndDeckCards:
+PrintPlayerNumberOfHandAndDeckCards: ; 49f3 (1:49f3)
ld a, [wPlayerNumberOfCardsInHand]
ld hl, wNumCardsBeingDrawn
add [hl]
@@ -1572,7 +1572,7 @@ PrintPlayerNumberOfHandAndDeckCards:
lb bc, 10, 10
jp WriteTwoDigitNumberInTxSymbolFormat
-PrintOpponentNumberOfHandAndDeckCards:
+PrintOpponentNumberOfHandAndDeckCards: ; 4a14 (1:4a14)
ld a, [wOpponentNumberOfCardsInHand]
ld hl, wNumCardsBeingDrawn
add [hl]
@@ -1590,7 +1590,7 @@ PrintOpponentNumberOfHandAndDeckCards:
lb bc, 11, 3
jp WriteTwoDigitNumberInTxSymbolFormat
-DeckAndHandIconsTileData:
+DeckAndHandIconsTileData: ; 4a35 (1:4a35)
; x, y, tiles[], 0
db 4, 3, SYM_CROSS, 0 ; x for opponent's hand
db 10, 3, SYM_CROSS, 0 ; x for opponent's deck
@@ -1606,7 +1606,7 @@ DeckAndHandIconsTileData:
db 13, 10, $fa, $fb, 0 ; player's hand icon
db $ff
-DeckAndHandIconsCGBPalData:
+DeckAndHandIconsCGBPalData: ; 4a6e (1:4a6e)
; x, y, pals[], 0
db 8, 2, $02, $02, 0
db 8, 3, $02, $02, 0
@@ -2134,7 +2134,7 @@ DisplayNoBasicPokemonInHandScreen: ; 4e06 (1:4e06)
call WaitForWideTextBoxInput
ret
-NoBasicPokemonCardListParameters:
+NoBasicPokemonCardListParameters: ; 4e37 (1:4e37)
db 1, 3 ; cursor x, cursor y
db 4 ; item x
db 14 ; maximum length, in tiles, occupied by the name and level string of each card in the list
@@ -3061,7 +3061,7 @@ PracticeDuelVerify_Turn7Or8: ; 54b7 (1:54b7)
jr nz, ReturnWrongAction
ret
-ReturnWrongAction:
+ReturnWrongAction: ; 54c6 (1:54c6)
scf
ret
@@ -3230,7 +3230,7 @@ InitAndDrawCardListScreenLayout: ; 559a (1:559a)
; same as InitAndDrawCardListScreenLayout, except that variables like wSelectedDuelSubMenuItem,
; wNoItemSelectionMenuKeys, wCardListInfoBoxText, wCardListHeaderText, etc already set by caller.
-DrawCardListScreenLayout:
+DrawCardListScreenLayout: ; 55be (1:55be)
call ZeroObjectPositionsAndToggleOAMCopy
call EmptyScreen
call LoadSymbolsFont
@@ -5170,7 +5170,7 @@ Func_6137: ; 6137 (1:6137)
call EraseCursor
; fallthrough
-Func_615c:
+Func_615c: ; 615c (1:615c)
ld a, [wCurrentDuelMenuItem]
ld d, a
add a
@@ -5194,7 +5194,7 @@ Func_616e: ; 616e (1:616e)
call EnableLCD
; fallthrough
-Func_6186:
+Func_6186: ; 6186 (1:6186)
ld hl, wCurPlayAreaSlot
ldh a, [hTempPlayAreaLocation_ff9d]
ld [hli], a
@@ -6945,7 +6945,6 @@ Func_6cfa: ; 6cfa (1:6cfa)
pop hl
call WaitForWideTextBoxInput
ret
-; 0x6d3f
Func_6d3f: ; 6d3f (1:6d3f)
or a
@@ -6985,7 +6984,6 @@ Func_6d3f: ; 6d3f (1:6d3f)
pop af
pop hl
ret
-; 0x6d84
; given the deck index of a turn holder's card in register a,
; and a pointer in hl to the wLoadedCard* buffer where the card data is loaded,
@@ -8042,7 +8040,6 @@ PlayMoveAnimation: ; 7494 (1:7494)
Func_7571: ; 7571 (1:7571)
farcall Func_19c20
ret
-; 0x7576
Func_7576: ; 7576 (1:7576)
farcall Func_1991f
@@ -8054,7 +8051,6 @@ Func_7576: ; 7576 (1:7576)
Func_758f: ; 758f (1:758f)
farcall Func_1a4cf
ret
-; 0x7594
Func_7594: ; 7594 (1:7594)
farcall Func_1a61f
diff --git a/src/engine/bank02.asm b/src/engine/bank02.asm
index 3cee5df..1e6179b 100644
--- a/src/engine/bank02.asm
+++ b/src/engine/bank02.asm
@@ -105,7 +105,7 @@ OpenYourOrOppPlayAreaScreen_TurnHolderPlayArea: ; 809e (2:409e)
ldh [hWhoseTurn], a
ret
-OpenYourOrOppPlayAreaScreen_NonTurnHolderPlayArea:
+OpenYourOrOppPlayAreaScreen_NonTurnHolderPlayArea: ; 80a8 (2:40a8)
ldh a, [hWhoseTurn]
push af
bank1call OpenNonTurnHolderPlayAreaScreen
@@ -113,7 +113,7 @@ OpenYourOrOppPlayAreaScreen_NonTurnHolderPlayArea:
ldh [hWhoseTurn], a
ret
-OpenYourOrOppPlayAreaScreen_TurnHolderHand:
+OpenYourOrOppPlayAreaScreen_TurnHolderHand: ; 80b2 (2:40b2)
ldh a, [hWhoseTurn]
push af
bank1call OpenTurnHolderHandScreen_Simple
@@ -121,7 +121,7 @@ OpenYourOrOppPlayAreaScreen_TurnHolderHand:
ldh [hWhoseTurn], a
ret
-OpenYourOrOppPlayAreaScreen_NonTurnHolderHand:
+OpenYourOrOppPlayAreaScreen_NonTurnHolderHand: ; 80bc (2:40bc)
ldh a, [hWhoseTurn]
push af
bank1call OpenNonTurnHolderHandScreen_Simple
@@ -129,7 +129,7 @@ OpenYourOrOppPlayAreaScreen_NonTurnHolderHand:
ldh [hWhoseTurn], a
ret
-OpenYourOrOppPlayAreaScreen_TurnHolderDiscardPile:
+OpenYourOrOppPlayAreaScreen_TurnHolderDiscardPile: ; 80c6 (2:40c6)
ldh a, [hWhoseTurn]
push af
bank1call OpenTurnHolderDiscardPileScreen
@@ -137,7 +137,7 @@ OpenYourOrOppPlayAreaScreen_TurnHolderDiscardPile:
ldh [hWhoseTurn], a
ret
-OpenYourOrOppPlayAreaScreen_NonTurnHolderDiscardPile:
+OpenYourOrOppPlayAreaScreen_NonTurnHolderDiscardPile: ; 80d0 (2:40d0)
ldh a, [hWhoseTurn]
push af
bank1call OpenNonTurnHolderDiscardPileScreen
@@ -233,25 +233,25 @@ DuelCheckMenu_OppPlayArea: ; 80da (2:40da)
dw OpenYourOrOppPlayAreaScreen_NonTurnHolderHand
dw OpenYourOrOppPlayAreaScreen_NonTurnHolderDiscardPile
-CheckMenuData: ; (2:4158)
+CheckMenuData: ; 8158 (2:4158)
textitem 2, 14, InPlayAreaText
textitem 2, 16, YourPlayAreaText
textitem 12, 14, GlossaryText
textitem 12, 16, OppPlayAreaText
db $ff
-YourPlayAreaMenuData: ; (2:4169)
+YourPlayAreaMenuData: ; 8169 (2:4169)
textitem 2, 14, YourPokemonText
textitem 12, 14, YourHandText
textitem 2, 16, YourDiscardPileText2
db $ff
-OppPlayAreaMenuData: ; (2:4176)
+OppPlayAreaMenuData: ; 8176 (2:4176)
textitem 2, 14, OpponentsPokemonText
textitem 2, 16, OpponentsDiscardPileText2
db $ff
-OppPlayAreaMenuData_WithClairvoyance: ; (2:4176)
+OppPlayAreaMenuData_WithClairvoyance: ; 8176 (2:4176)
textitem 2, 14, OpponentsPokemonText
textitem 12, 14, OpponentsHandText
textitem 2, 16, OpponentsDiscardPileText2
@@ -1287,7 +1287,7 @@ HandleCheckMenuInput_YourOrOppPlayArea: ; 86ac (2:46ac)
call EraseCheckMenuCursor_YourOrOppPlayArea
pop de
-;update x and y cursor positions
+; update x and y cursor positions
ld a, d
ld [wCheckMenuCursorXPosition], a
ld a, e
@@ -1512,7 +1512,7 @@ Func_8819: ; 8819 (2:4819)
call GetTurnDuelistVariable
jr Func_8855
-Func_883c:
+Func_883c: ; 883c (2:483c)
call CreateHandCardList
ret c
ld hl, wDuelTempList
@@ -1520,7 +1520,7 @@ Func_883c:
ld a, [hl]
jr Func_8855
-Func_8849:
+Func_8849: ; 8849 (2:4849)
call CreateDeckCardList
ret c
ld a, %01111111
@@ -1533,7 +1533,7 @@ Func_8849:
; output:
; a = ce5c
; with upper bit set if turn was swapped
-Func_8855:
+Func_8855: ; 8855 (2:4855)
ld b, a
ld a, [$ce5c]
or a
@@ -2307,7 +2307,7 @@ HandleCheckMenuInput: ; 9065 (2:5065)
call EraseCheckMenuCursor
pop de
-;update x and y cursor positions
+; update x and y cursor positions
ld a, d
ld [wCheckMenuCursorXPosition], a
ld a, e
@@ -2359,7 +2359,7 @@ EraseCheckMenuCursor: ; 90d8 (2:50d8)
; draws in the cursor position
; input:
; a = tile byte to draw
-DrawCheckMenuCursor:
+DrawCheckMenuCursor: ; 90da (2:50da)
ld e, a
ld a, 10
ld l, a
diff --git a/src/engine/bank03.asm b/src/engine/bank03.asm
index efd2b8e..8c4b599 100644
--- a/src/engine/bank03.asm
+++ b/src/engine/bank03.asm
@@ -2107,7 +2107,7 @@ ScriptCommand_MoveWramNPC: ; ce52 (3:4e52)
; Executes movement on an arbitrary NPC using values in a and on the stack
; Changes and fixes Temp NPC using stack values
-ExecuteArbitraryNPCMovementFromStack:
+ExecuteArbitraryNPCMovementFromStack: ; ce5d (3:4e5d)
ld [wTempNPC], a
call FindLoadedNPC
call ExecuteNPCMovement
@@ -3104,7 +3104,7 @@ ScriptCommand_JumpIfFlagNonzero2: ; d4ca (3:54ca)
.noJumpArgs
jp IncreaseScriptPointerBy4
-ScriptCommand_JumpIfFlagZero2:
+ScriptCommand_JumpIfFlagZero2: ; d4df (3:54df)
ld a, c
call GetEventFlagValue
or a
@@ -3989,7 +3989,6 @@ FightingClubAfterDuel: ; dda3 (3:5da3)
ld hl, .after_duel_table
call FindEndOfBattleScript
ret
-; 0xddaa
.after_duel_table
db NPC_CHRIS
@@ -4041,19 +4040,15 @@ Script_Mitch: ; ddc3 (3:5dc3)
db EVENT_FLAG_20
db $01
run_command ScriptCommand_QuitScriptFully
-; 0xdde2
.three_pupils_remaining
run_command ScriptCommand_PrintTextQuitFully
tx Text0478
-; 0xdde5
.two_pupils_remaining
run_command ScriptCommand_PrintTextQuitFully
tx Text0479
-; 0xdde8
.one_pupil_remaining
run_command ScriptCommand_PrintTextQuitFully
tx Text047a
-; 0xddeb
.all_pupils_defeated
run_command ScriptCommand_PrintTextString
tx Text047b
@@ -4063,7 +4058,6 @@ Script_Mitch: ; ddc3 (3:5dc3)
run_command ScriptCommand_PrintTextString
tx Text047d
run_command ScriptCommand_QuitScriptFully
-; 0xddf7
.do_battle
run_command ScriptCommand_PrintTextString
tx Text047e
@@ -4072,7 +4066,6 @@ Script_Mitch: ; ddc3 (3:5dc3)
db FIRST_STRIKE_DECK_ID
db MUSIC_DUEL_THEME_2
run_command ScriptCommand_QuitScriptFully
-; 0xddff
Script_BeatMitch: ; ddff (3:5dff)
start_script
@@ -4097,7 +4090,6 @@ Script_BeatMitch: ; ddff (3:5dff)
run_command ScriptCommand_PrintTextString
tx Text0481
run_command ScriptCommand_QuitScriptFully
-; 0xde19
Script_LoseToMitch: ; de19 (3:5e19)
start_script
@@ -4106,7 +4098,6 @@ Script_LoseToMitch: ; de19 (3:5e19)
dw Script_Mitch_PrintTrainHarderText
run_command ScriptCommand_PrintTextQuitFully
tx Text0482
-; 0xde21
Script_Mitch_AlreadyHaveMedal: ; de21 (3:5e21)
run_command ScriptCommand_PrintTextString
@@ -4117,7 +4108,6 @@ Script_Mitch_AlreadyHaveMedal: ; de21 (3:5e21)
run_command ScriptCommand_PrintTextString
tx Text0484
run_command ScriptCommand_QuitScriptFully
-; 0xde2d
.do_battle
run_command ScriptCommand_PrintTextString
tx Text0485
@@ -4126,7 +4116,6 @@ Script_Mitch_AlreadyHaveMedal: ; de21 (3:5e21)
db FIRST_STRIKE_DECK_ID
db MUSIC_DUEL_THEME_2
run_command ScriptCommand_QuitScriptFully
-; 0xde35
Script_Mitch_GiveBoosters: ; de35 (3:5e35)
run_command ScriptCommand_PrintTextString
@@ -4138,7 +4127,6 @@ Script_Mitch_GiveBoosters: ; de35 (3:5e35)
run_command ScriptCommand_PrintTextString
tx Text0487
run_command ScriptCommand_QuitScriptFully
-; 0xde40
Script_Mitch_PrintTrainHarderText: ; de40 (3:5e40)
run_command ScriptCommand_PrintTextQuitFully
@@ -4154,7 +4142,6 @@ RockClubLobbyAfterDuel: ; ded5 (3:5ed5)
ld hl, .after_duel_table
call FindEndOfBattleScript
ret
-; 0xdedc
.after_duel_table
db NPC_CHRIS
@@ -4202,7 +4189,6 @@ WaterClubLobbyAfterDuel: ; e0a2 (3:60a2)
ld hl, .after_duel_table
call FindEndOfBattleScript
ret
-; 0xe0a9
.after_duel_table
db NPC_IMAKUNI
@@ -4210,7 +4196,6 @@ WaterClubLobbyAfterDuel: ; e0a2 (3:60a2)
dw Script_BeatImakuni
dw Script_LostToImakuni
db $00
-; 0xe0b0
Preload_ImakuniInWaterClubLobby: ; e0b0 (3:60b0)
get_flag_value EVENT_IMAKUNI_STATE
@@ -4349,7 +4334,7 @@ WaterClubMovePlayer: ; e13f (3:613f)
ld bc, Script_NotReadyToSeeAmy
jp SetNextNPCAndScript
-WaterClubAfterDuel: ;e157 (3:6157)
+WaterClubAfterDuel: ; e157 (3:6157)
ld hl, .after_duel_table
call FindEndOfBattleScript
ret
@@ -4844,7 +4829,6 @@ ScriptJump_TalkToAmyAgain: ; e356 (3:6356)
db GO_GO_RAIN_DANCE_DECK_ID
db MUSIC_DUEL_THEME_2
run_command ScriptCommand_QuitScriptFully
-; 0xe369
Script_Clerk4: ; e369 (3:6369)
INCROM $e369, $e36d
@@ -4853,7 +4837,6 @@ LightningClubLobbyAfterDuel: ; e36d (3:636d)
ld hl, .after_duel_table
call FindEndOfBattleScript
ret
-; 0xe374
.after_duel_table
db NPC_IMAKUNI
@@ -5192,7 +5175,6 @@ Script_Lass2: ; e61f (3:661f)
db BLASTOISE
run_command ScriptCommand_PrintTextQuitFully
tx Text06f3
-; 0xe6d8
Script_Granny2: ; e6d8 (3:66d8)
INCROM $e6d8, $e6e3
@@ -5262,7 +5244,6 @@ TrySecondRonaldFight: ; e837 (3:6837)
ret nz
ld bc, ScriptSecondRonaldFight
jp SetNextNPCAndScript
-; 0xe84c
Script_Clerk6: ; e84c (3:684c)
INCROM $e84c, $e850
@@ -5382,7 +5363,7 @@ Script_LostToFirstRonaldFight: ; e8f7 (3:68f7)
run_command ScriptCommand_PrintTextString
tx Text064e
-ScriptJump_FinishedFirstRonaldFight:
+ScriptJump_FinishedFirstRonaldFight: ; e8fb (3:68fb)
run_command ScriptCommand_SetFlagValue
db EVENT_FLAG_4C
db $02
@@ -5485,13 +5466,11 @@ ScriptJump_FinishedSecondRonaldFight: ; e959 (3:6959)
run_command Func_cdcb
run_command Func_d41d
run_command ScriptCommand_QuitScriptFully
-; 0xe963
PsychicClubLobbyAfterDuel: ; e963 (3:6963)
ld hl, .after_duel_table
call FindEndOfBattleScript
ret
-; 0xe96a
.after_duel_table
db NPC_ROBERT
@@ -5529,11 +5508,10 @@ Script_Murray1: ; eadf (3:6adf)
Script_Clerk7: ; eb53 (3:6b53)
INCROM $eb53, $eb57
-ScienceClubLobbyAfterDuel:; eb57 (3:6b57)
+ScienceClubLobbyAfterDuel: ; eb57 (3:6b57)
ld hl, .after_duel_table
call FindEndOfBattleScript
ret
-; 0xeb5e
.after_duel_table
db NPC_IMAKUNI
@@ -5576,7 +5554,6 @@ FireClubLobbyAfterDuel: ; ed49 (3:6d49)
ld hl, .after_duel_table
call FindEndOfBattleScript
ret
-; 0xed50
.after_duel_table
db NPC_JESSICA
@@ -5585,8 +5562,6 @@ FireClubLobbyAfterDuel: ; ed49 (3:6d49)
dw $6dce
db $00
-; 0xed57
-
FireClubPressedA: ; ed57 (3:6d57)
ld hl, SlowpokePaintingObjectTable
call FindExtraInteractableObjects
@@ -5663,7 +5638,6 @@ Script_ee76: ; ee76 (3:6e76)
run_command ScriptCommand_ShowCardReceivedScreen
db SLOWPOKE1
run_command ScriptCommand_QuitScriptFully
-; 0xee88
Script_Mania: ; ee88 (3:6e88)
INCROM $ee88, $ee93
@@ -5695,7 +5669,6 @@ FireClubAfterDuel: ; ee93 (3:6e93)
dw Script_LoseToKen
db $00
-; 0xeeb3
Script_John: ; eeb3 (3:6eb3)
INCROM $eeb3, $eed8
@@ -5755,7 +5728,6 @@ Script_Ken: ; ef22 (3:6f22)
db FIRE_CHARGE_DECK_ID
db MUSIC_DUEL_THEME_2
run_command ScriptCommand_QuitScriptFully
-; 0xef5e
Script_BeatKen: ; ef5e (3:6f5e)
start_script
@@ -5781,7 +5753,6 @@ Script_BeatKen: ; ef5e (3:6f5e)
run_command ScriptCommand_PrintTextString
tx Text06c3
run_command ScriptCommand_QuitScriptFully
-; 0xef78
Script_LoseToKen: ; ef78 (3:6f78)
start_script
@@ -5792,7 +5763,6 @@ Script_LoseToKen: ; ef78 (3:6f78)
tx Text06c4
tx Text06c5
run_command ScriptCommand_QuitScriptFully
-; 0xef83
Script_KenBattle_AlreadyHaveMedal: ; ef83 (3:6f83)
run_command ScriptCommand_PrintTextString
@@ -5810,7 +5780,6 @@ Script_KenBattle_AlreadyHaveMedal: ; ef83 (3:6f83)
db FIRE_CHARGE_DECK_ID
db MUSIC_DUEL_THEME_2
run_command ScriptCommand_QuitScriptFully
-; 0xef96
Preload_Clerk9: ; ef96 (3:6f96)
call TryGiveMedalPCPacks
diff --git a/src/engine/bank04.asm b/src/engine/bank04.asm
index 8fb4d29..48f194c 100644
--- a/src/engine/bank04.asm
+++ b/src/engine/bank04.asm
@@ -1103,7 +1103,7 @@ _GameLoop: ; 126d1 (4:66d1)
scf
ret
-MainMenuFunctionTable:
+MainMenuFunctionTable: ; 126fc (4:66fc)
dw MainMenu_CardPop
dw MainMenu_ContinueFromDiary
dw MainMenu_NewGame
diff --git a/src/engine/bank05.asm b/src/engine/bank05.asm
index 6af2582..c5757e5 100644
--- a/src/engine/bank05.asm
+++ b/src/engine/bank05.asm
@@ -5738,7 +5738,7 @@ HandleSpecialAIMoves: ; 16dcd (5:6dcd)
; if any of card ID in a is found in deck,
; return a score of $80 + slots available in bench.
-HandleCallForFamily:
+HandleCallForFamily: ; 16e3e (5:6e3e)
ld a, CARD_LOCATION_DECK
call CheckIfAnyCardIDinLocation
jr nc, HandleSpecialAIMoves.zero
@@ -5754,7 +5754,7 @@ HandleCallForFamily:
; if any of NidoranM or NidoranF is found in deck,
; return a score of $80 + slots available in bench.
-HandleNidoranFCallForFamily:
+HandleNidoranFCallForFamily: ; 16e55 (5:6e55)
ld e, NIDORANM
ld a, CARD_LOCATION_DECK
call CheckIfAnyCardIDinLocation
@@ -5777,7 +5777,7 @@ HandleNidoranFCallForFamily:
; checks for certain card IDs of Fighting color in deck.
; if any of them are found, return a score of
; $80 + slots available in bench.
-HandleMarowak1CallForFriend:
+HandleMarowak1CallForFriend: ; 16e77 (5:6e77)
ld e, GEODUDE
ld a, CARD_LOCATION_DECK
call CheckIfAnyCardIDinLocation
diff --git a/src/engine/bank06.asm b/src/engine/bank06.asm
index 75916c4..e6da805 100644
--- a/src/engine/bank06.asm
+++ b/src/engine/bank06.asm
@@ -90,7 +90,7 @@ _CopyCardNameAndLevel: ; 18000 (6:4000)
ret
; the name starts with TX_HALFWIDTH
-_CopyCardNameAndLevel_HalfwidthText:
+_CopyCardNameAndLevel_HalfwidthText: ; 18086 (6:4086)
ld a, [wcd9b]
inc a
add a
@@ -382,7 +382,7 @@ OpenInPlayAreaScreen: ; 180d5 (6:40d5)
dw OpenInPlayAreaScreen_NonTurnHolderPlayArea ; 0x0e: INPLAYAREA_OPP_BENCH_4
dw OpenInPlayAreaScreen_NonTurnHolderPlayArea ; 0x0f: INPLAYAREA_OPP_BENCH_5
-OpenInPlayAreaScreen_TurnHolderPlayArea:
+OpenInPlayAreaScreen_TurnHolderPlayArea: ; 18248 (6:4248)
; wInPlayAreaCurPosition constants conveniently map to (PLAY_AREA_* constants - 1)
; for bench locations. this mapping is taken for granted in the following code.
ld a, [wInPlayAreaCurPosition]
@@ -403,7 +403,7 @@ OpenInPlayAreaScreen_TurnHolderPlayArea:
bank1call OpenCardPage_FromCheckPlayArea
ret
-OpenInPlayAreaScreen_NonTurnHolderPlayArea:
+OpenInPlayAreaScreen_NonTurnHolderPlayArea: ; 1826a (6:426a)
ld a, [wInPlayAreaCurPosition]
sub INPLAYAREA_OPP_ACTIVE
or a
@@ -425,7 +425,7 @@ OpenInPlayAreaScreen_NonTurnHolderPlayArea:
call SwapTurn
ret
-OpenInPlayAreaScreen_TurnHolderHand:
+OpenInPlayAreaScreen_TurnHolderHand: ; 18293 (6:4293)
ldh a, [hWhoseTurn]
push af
bank1call OpenTurnHolderHandScreen_Simple
@@ -433,7 +433,7 @@ OpenInPlayAreaScreen_TurnHolderHand:
ldh [hWhoseTurn], a
ret
-OpenInPlayAreaScreen_NonTurnHolderHand:
+OpenInPlayAreaScreen_NonTurnHolderHand: ; 1829d (6:429d)
ldh a, [hWhoseTurn]
push af
bank1call OpenNonTurnHolderHandScreen_Simple
@@ -441,7 +441,7 @@ OpenInPlayAreaScreen_NonTurnHolderHand:
ldh [hWhoseTurn], a
ret
-OpenInPlayAreaScreen_TurnHolderDiscardPile:
+OpenInPlayAreaScreen_TurnHolderDiscardPile: ; 182a7 (6:42a7)
ldh a, [hWhoseTurn]
push af
bank1call OpenTurnHolderDiscardPileScreen
@@ -449,7 +449,7 @@ OpenInPlayAreaScreen_TurnHolderDiscardPile:
ldh [hWhoseTurn], a
ret
-OpenInPlayAreaScreen_NonTurnHolderDiscardPile:
+OpenInPlayAreaScreen_NonTurnHolderDiscardPile: ; 182b1 (6:42b1)
ldh a, [hWhoseTurn]
push af
bank1call OpenNonTurnHolderDiscardPileScreen
@@ -1197,7 +1197,7 @@ Func_19079: ; 19079 (6:5079)
call Func_3b6a
jp Func_18f9c.asm_4fd4
-PointerTable_006_508f: ; (6:508f)
+PointerTable_006_508f: ; 1908f (6:508f)
dw Func_18fdc
dw Func_19014
dw Func_18fdd
@@ -1715,32 +1715,32 @@ Func_1a73a: ; 1a73a (6:673a)
pop hl
ret
-WhatIsYourNameData: ; (6:675e)
+WhatIsYourNameData: ; 1a75e (6:675e)
textitem 1, 1, WhatIsYourNameText
db $ff
; [Deck1Data ~ Deck4Data]
; These are directed from around (2:4f05),
; without any bank description.
; That is, the developers hard-coded it. -_-;;
-Deck1Data: ; (6:6763)
+Deck1Data: ; 1a763 (6:6763)
textitem 2, 1, Text022b
textitem 14, 1, Text0219
db $ff
-Deck2Data: ; (6:676c)
+Deck2Data: ; 1a76c (6:676c)
textitem 2, 1, Text022c
textitem 14, 1, Text0219
db $ff
-Deck3Data: ; (6:6775)
+Deck3Data: ; 1a775 (6:6775)
textitem 2, 1, Text022d
textitem 14, 1, Text0219
db $ff
-Deck4Data: ; (6:677e)
+Deck4Data: ; 1a77e (6:677e)
textitem 2, 1, Text022e
textitem 14, 1, Text0219
db $ff
; set each byte zero from hl for b bytes.
-ClearMemory: ; (6:6787)
+ClearMemory: ; 1a787 (6:6787)
push af
push bc
push hl
@@ -1758,7 +1758,7 @@ ClearMemory: ; (6:6787)
; play different sfx by a.
; if a is 0xff play SFX_03 (usually following a B press),
; else play SFX_02 (usually following an A press).
-PlayAcceptOrDeclineSFX: ; (6:6794)
+PlayAcceptOrDeclineSFX: ; 1a794 (6:6794)
push af
inc a
jr z, .sfx_decline
@@ -1773,7 +1773,7 @@ PlayAcceptOrDeclineSFX: ; (6:6794)
; get player name from the user
; into hl
-InputPlayerName: ; (6:67a3)
+InputPlayerName: ; 1a7a3 (6:67a3)
ld e, l
ld d, h
ld a, MAX_PLAYER_NAME_LENGTH
@@ -1858,7 +1858,7 @@ InputPlayerName: ; (6:67a3)
; bc: position of name.
; de: dest. pointer.
; hl: pointer to text item of the question.
-InitializeInputName:
+InitializeInputName: ; 1a846 (6:6846)
ld [wNamingScreenBufferMaxLength], a
push hl
ld hl, wNamingScreenNamePosition
@@ -1900,7 +1900,7 @@ InitializeInputName:
ld [wNamingScreenBufferLength], a
ret
-FinalizeInputName:
+FinalizeInputName: ; 1a880 (6:6880)
ld hl, wNamingScreenDestPointer
ld e, [hl]
inc hl
@@ -1915,7 +1915,7 @@ FinalizeInputName:
; draws the keyboard frame
; and the question if it exists.
-DrawNamingScreenBG:
+DrawNamingScreenBG: ; 1a892 (6:6892)
call DrawTextboxForKeyboard
call PrintPlayerNameFromInput
ld hl, wNamingScreenQuestionPointer
@@ -1943,13 +1943,13 @@ DrawNamingScreenBG:
textitem $0f, $10, EndText ; "End"
db $ff
-DrawTextboxForKeyboard:
+DrawTextboxForKeyboard: ; 1a8c1 (6:68c1)
lb de, 0, 3 ; x, y
lb bc, 20, 15 ; w, h
call DrawRegularTextBox
ret
-PrintPlayerNameFromInput:
+PrintPlayerNameFromInput: ; 1a8cb (6:68cb)
ld hl, wNamingScreenNamePosition
ld d, [hl]
inc hl
@@ -1983,7 +1983,7 @@ endr
; check if button pressed.
; if pressed, set the carry bit on.
-NamingScreen_CheckButtonState:
+NamingScreen_CheckButtonState: ; 1a908 (6:6908)
xor a
ld [wPlaysSfx], a
ldh a, [hDPadHeld]
@@ -2232,7 +2232,7 @@ Func_1aa28: ; 1aa28 (6:6a28)
; load, to the first tile of v0Tiles0, the graphics for the
; blinking black square used in name input screens.
; for inputting full width text.
-LoadTextCursorTile:
+LoadTextCursorTile: ; 1aa65 (6:6a65)
ld hl, v0Tiles0 + $00 tiles
ld de, .data
ld b, 0
@@ -2253,7 +2253,7 @@ endr
; set the carry bit on,
; if "End" was selected.
-NamingScreen_ProcessInput:
+NamingScreen_ProcessInput: ; 1aa87 (6:6a87)
ld a, [wNamingScreenCursorX]
ld h, a
ld a, [wNamingScreenCursorY]
@@ -2416,7 +2416,7 @@ NamingScreen_ProcessInput:
; it seems to have been deprecated as the game was translated into english.
; but it can still be applied to english, such as upper-lower case transition.
; hl: info. pointer.
-TransformCharacter:
+TransformCharacter: ; 1ab61 (6:6b61)
ld a, [wNamingScreenBufferLength]
or a
jr z, .return ; if the length is zero, just return.
@@ -2468,7 +2468,7 @@ TransformCharacter:
; it returns the pointer to the proper information.
; h: position x.
; l: position y.
-GetCharInfoFromPos_Player:
+GetCharInfoFromPos_Player: ; 1ab93 (6:6b93)
push de
; (information index) = (x) * (height) + (y)
; (height) = 0x05(Deck) or 0x06(Player)
@@ -2510,7 +2510,7 @@ else
endc
ENDM
-KeyboardData_Player: ; (6:6baf)
+KeyboardData_Player: ; 1abaf (6:6baf)
kbitem $04, $02, $11, $00, TX_FULLWIDTH3, "A"
kbitem $06, $02, $12, $00, TX_FULLWIDTH3, "J"
kbitem $08, $02, $13, $00, TX_FULLWIDTH3, "S"
@@ -2737,7 +2737,7 @@ InputDeckName: ; 1ad89 (6:6d89)
; load, to the first tile of v0Tiles0, the graphics for the
; blinking black square used in name input screens.
; for inputting half width text.
-LoadHalfWidthTextCursorTile:
+LoadHalfWidthTextCursorTile: ; 1ae37 (6:6e37)
ld hl, v0Tiles0 + $00 tiles
ld de, .data
ld b, 0
@@ -2757,7 +2757,7 @@ rept TILE_SIZE
endr
; it's only for naming the deck.
-ProcessTextWithUnderbar:
+ProcessTextWithUnderbar: ; 1ae59 (6:6e59)
ld hl, wNamingScreenNamePosition
ld d, [hl]
inc hl
@@ -3036,7 +3036,7 @@ Func_1afc2: ; 1afc2 (6:6fc2)
; its unit size is 3, and player's is 6.
; h: x
; l: y
-GetCharInfoFromPos_Deck:
+GetCharInfoFromPos_Deck: ; 1b000 (6:7000)
push de
ld e, l
ld d, h
@@ -3058,7 +3058,7 @@ GetCharInfoFromPos_Deck:
jr nz, .loop
ret
-KeyboardData_Deck: ; (6:7019)
+KeyboardData_Deck: ; 1b019 (6:7019)
db $04, $02, "A"
db $06, $02, "J"
db $08, $02, "S"
diff --git a/src/engine/bank07.asm b/src/engine/bank07.asm
index af41613..9d2b203 100644
--- a/src/engine/bank07.asm
+++ b/src/engine/bank07.asm
@@ -625,7 +625,7 @@ Func_1c8ef: ; 1c8ef (7:48ef)
.address
dw Func_1c94a
-Func_1c94a:
+Func_1c94a: ; 1c94a (7:494a)
ld e, l
ld d, h
ld c, 3
@@ -777,6 +777,7 @@ macro_1ca04: MACRO
dw \1
db \2
ENDM
+
Data_1ca04:
; value(2), flag(1)
macro_1ca04 $5858, $08
@@ -795,7 +796,7 @@ Data_1ca04:
macro_1ca04 $2838, $00
macro_1ca04 $2818, $00
-Func_1ca31:
+Func_1ca31: ; 1ca31 (7:4a6b)
push hl
push bc
ld a, [wd4ac]
diff --git a/src/engine/booster_packs.asm b/src/engine/booster_packs.asm
index 8e7d0c2..a799d71 100644
--- a/src/engine/booster_packs.asm
+++ b/src/engine/booster_packs.asm
@@ -388,7 +388,7 @@ GenerateTwoTypesEnergyBooster: ; 1e3ab (7:63ab)
jr nz, .add_two_energies_to_booster_loop
; fallthrough
-ZeroBoosterRarityData:
+ZeroBoosterRarityData: ; 1e3be (7:63be)
xor a
ld [wBoosterData_CommonAmount], a
ld [wBoosterData_UncommonAmount], a
@@ -453,7 +453,7 @@ PutEnergiesAndNonEnergiesTogether: ; 1e3f3 (7:63f3)
ret
; add the final cards drawn from the booster pack to the player's colection (sCardCollection)
-AddBoosterCardsToCollection:; 1e40a (7:640a)
+AddBoosterCardsToCollection: ; 1e40a (7:640a)
push hl
ld hl, wBoosterCardsDrawn
.add_cards_loop
diff --git a/src/engine/effect_functions.asm b/src/engine/effect_functions.asm
index 896d03c..d881a5c 100644
--- a/src/engine/effect_functions.asm
+++ b/src/engine/effect_functions.asm
@@ -35,7 +35,7 @@ SleepEffect: ; 2c030 (b:4030)
lb bc, PSN_DBLPSN, ASLEEP
jr ApplyStatusEffect
-ApplyStatusEffect:
+ApplyStatusEffect: ; 2c035 (b:4035)
ldh a, [hWhoseTurn]
ld hl, wWhoseTurn
cp [hl]
@@ -102,7 +102,7 @@ Func_2c087: ; 2c087 (b:4087)
Func_2c08a: ; 2c08a (b:408a)
ld a, $1
-Func_2c08c:
+Func_2c08c: ; 2c08c (b:408c)
push de
push af
ld a, OPPACTION_TOSS_COIN_A_TIMES
diff --git a/src/engine/home.asm b/src/engine/home.asm
index 860e551..cd9c9c9 100644
--- a/src/engine/home.asm
+++ b/src/engine/home.asm
@@ -505,11 +505,11 @@ SetBGP: ; 040c (0:040c)
; fallthrough
; Flush non-CGB palettes and the first CGB palette
-FlushPalette0:
+FlushPalette0: ; 040f (0:040f)
ld a, FLUSH_ONE_PAL
; fallthrough
-FlushPalettes:
+FlushPalettes: ; 0411 (0:0411)
ld [wFlushPaletteFlags], a
ld a, [wLCDC]
rla
@@ -722,7 +722,7 @@ Reset: ; 051b (0:051b)
di
jp Start
-SaveButtonsHeld:
+SaveButtonsHeld: ; 0522 (0:0522)
ld a, c
ldh [hKeysHeld], a
ld a, JOY_BTNS_SELECT | JOY_DPAD_SELECT
@@ -939,7 +939,7 @@ WriteBCDNumberInTextFormat: ; 0614 (0:0614)
; given a BCD digit in the (lower nybble) of register a, write it in text (ascii)
; format to hl. numbers above 9 end up converted to half-width font tiles.
-WriteBCDDigitInTextFormat:
+WriteBCDDigitInTextFormat: ; 061b (0:061b)
and $0f
add "0"
cp "9" + 1
@@ -4328,7 +4328,7 @@ CopyMoveDataAndDamage_FromDeckIndex: ; 16c0 (0:16c0)
call LoadCardDataToBuffer1_FromDeckIndex
; fallthrough
-CopyMoveDataAndDamage:
+CopyMoveDataAndDamage: ; 16ca (0:16ca)
ld a, [wLoadedCard1ID]
ld [wTempCardID_ccc2], a
ld hl, wLoadedCard1Move1
@@ -5669,7 +5669,7 @@ DrawRegularTextBoxDMG: ; 1e88 (0:1e88)
; continue drawing a labeled or regular textbox on DMG or SGB:
; body and bottom line of either type of textbox
-ContinueDrawingTextBoxDMGorSGB:
+ContinueDrawingTextBoxDMGorSGB: ; 1e93 (0:1e93)
dec c
dec c
.draw_text_box_body_loop
@@ -5720,7 +5720,7 @@ CopyLine: ; 1ea5 (0:1ea5)
ret
; DrawRegularTextBox branches here on CGB console
-DrawRegularTextBoxCGB:
+DrawRegularTextBoxCGB: ; 1ec9 (0:1ec9)
call DECoordToBGMap0Address
; top line (border) of the text box
ld a, SYM_BOX_TOP
@@ -5730,7 +5730,7 @@ DrawRegularTextBoxCGB:
; continue drawing a labeled or regular textbox on CGB:
; body and bottom line of either type of textbox
-ContinueDrawingTextBoxCGB:
+ContinueDrawingTextBoxCGB: ; 1ed4 (0:1ed4)
dec c
dec c
.draw_text_box_body_loop
@@ -5764,7 +5764,7 @@ CopyCurrentLineTilesAndAttrCGB: ; 1efb (0:1efb)
pop hl
; fallthrough
-CopyCurrentLineAttrCGB:
+CopyCurrentLineAttrCGB: ; 1f00 (0:1f00)
call BankswitchVRAM1
ld a, [wTextBoxFrameType] ; on CGB, wTextBoxFrameType determines the palette and the other attributes
ld e, a
@@ -5785,7 +5785,7 @@ DrawRegularTextBoxSGB: ; 1f0f (0:1f0f)
ret z
; fallthrough
-ColorizeTextBoxSGB:
+ColorizeTextBoxSGB: ; 1f1b (0:1f1b)
push bc
push de
ld hl, wTempSGBPacket
@@ -7465,7 +7465,7 @@ PrintCardListItems: ; 2799 (0:2799)
; like PrintCardListItems, except more parameters are already initialized
; called instead of PrintCardListItems to reload the list after moving up or down
-ReloadCardListItems:
+ReloadCardListItems: ; 27af (0:27af)
ld e, SYM_SPACE
ld a, [wListScrollOffset]
or a
@@ -8042,7 +8042,7 @@ YesOrNoMenuWithText_LeftAligned: ; 2afe (0:2afe)
lb de, 2, 16 ; x, y
; fallthrough
-HandleYesOrNoMenu:
+HandleYesOrNoMenu: ; 2b0a (0:2b0a)
ld a, d
ld [wLeftmostItemCursorX], a
lb bc, SYM_CURSOR_R, SYM_SPACE ; cursor tile, tile behind cursor
@@ -10343,7 +10343,7 @@ GetArenaCardWeakness: ; 3730 (0:3730)
ld a, DUELVARS_ARENA_CARD
; fallthrough
-GetCardWeakness:
+GetCardWeakness: ; 3739 (0:3739)
call GetTurnDuelistVariable
call LoadCardDataToBuffer2_FromDeckIndex
ld a, [wLoadedCard2Weakness]
@@ -10368,7 +10368,7 @@ GetArenaCardResistance: ; 374a (0:374a)
ld a, DUELVARS_ARENA_CARD
; fallthrough
-GetCardResistance:
+GetCardResistance: ; 3753 (0:3753)
call GetTurnDuelistVariable
call LoadCardDataToBuffer2_FromDeckIndex
ld a, [wLoadedCard2Resistance]
@@ -11525,7 +11525,7 @@ GetSpriteAnimBufferProperty: ; 3dbf (0:3dbf)
ld a, [wWhichSprite]
; fallthrough
-GetSpriteAnimBufferProperty_SpriteInA:
+GetSpriteAnimBufferProperty_SpriteInA: ; 3dc2 (0:3dc2)
cp SPRITE_ANIM_BUFFER_CAPACITY
jr c, .got_sprite
debug_ret
diff --git a/src/wram.asm b/src/wram.asm
index 9797034..ae6d10a 100644
--- a/src/wram.asm
+++ b/src/wram.asm
@@ -346,7 +346,7 @@ wBoosterTempNonEnergiesDrawn:: ; c400
ds $b
wBoosterTempEnergiesDrawn:: ; c40b
ds $b
-wBoosterCardsDrawnEnd::
+wBoosterCardsDrawnEnd:: ; c416
ds $6a
NEXTU
@@ -1427,10 +1427,10 @@ wAIVenusaur2PlayAreaLocation:: ; ce05
wce06:: ; ce06
; number of cards to be transferred by AI using Energy Trans.
-wAINumberOfEnergyTransCards::
+wAINumberOfEnergyTransCards:: ; ce06
; used for storing weakness of Player's Arena card
; in AI routine dealing with Shift Pkmn Power.
-wAIDefendingPokemonWeakness::
+wAIDefendingPokemonWeakness:: ; ce06
ds $1
wce07:: ; ce07
@@ -2037,7 +2037,7 @@ NEXTU
; $00: passable (floor)
; $40: unpassable and talkable (NPC or talkable wall)
; $80: unpassable and untalkable (wall)
-wPermissionMap::
+wPermissionMap:: ; d133
ds $100
ENDU
@@ -2249,7 +2249,7 @@ wd3d0:: ; d3d0
wLoadedFlagBits:: ; d3d1
ds $1
-wEventFlags::
+wEventFlags:: ; d3d2
ds $40
; 0 keeps looping, other values break the loop in RST20