summaryrefslogtreecommitdiff
path: root/engine/menu
diff options
context:
space:
mode:
Diffstat (limited to 'engine/menu')
-rw-r--r--engine/menu/debug_menu.asm16
-rw-r--r--engine/menu/main_menu.asm24
-rw-r--r--engine/menu/reset_dialog.asm2
-rw-r--r--engine/menu/set_time.asm6
-rw-r--r--engine/menu/start_menu.asm400
-rw-r--r--engine/menu/text_entry.asm124
6 files changed, 286 insertions, 286 deletions
diff --git a/engine/menu/debug_menu.asm b/engine/menu/debug_menu.asm
index 9289084..b9b3081 100644
--- a/engine/menu/debug_menu.asm
+++ b/engine/menu/debug_menu.asm
@@ -22,7 +22,7 @@ DebugMenu:: ; $4031
ld hl, DebugJumpTable
jp CallJumptable
-DebugJumpTable:: ; 4064
+DebugJumpTable::
dw DebugMenuOptionFight
dw DebugMenuOptionField
dw Function094c ; sound test
@@ -30,13 +30,13 @@ DebugJumpTable:: ; 4064
dw DebugMenuOptionMonsterTest
dw DebugMenuOptionName
-DebugMenuHeader: ; 4070
+DebugMenuHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 05, 02, SCREEN_WIDTH - 7, SCREEN_HEIGHT - 1
dw .MenuData
db 01 ; default option
-.MenuData: ; 4078
+.MenuData:
db $A0
db 0 ; items
dw DebugMenuItems
@@ -61,12 +61,12 @@ DebugMenuItems:
db 05
db -1
-DebugMenuOptionField:: ; 40A8
+DebugMenuOptionField::
ld hl, wDebugFlags
set DEBUG_FIELD_F, [hl] ; set debug mode
jp StartNewGame
-DebugMenuOptionFight:: ; 40B0
+DebugMenuOptionFight::
ld hl, wDebugFlags
set DEBUG_BATTLE_F, [hl]
ld a, $54
@@ -75,11 +75,11 @@ DebugMenuOptionFight:: ; 40B0
res DEBUG_BATTLE_F, [hl]
ret
-DebugMenuOptionSubGames:: ; 40C0
+DebugMenuOptionSubGames::
callab CallSubGameMenu
jp DebugMenu
-DebugMenuOptionMonsterTest:: ; 40CB
+DebugMenuOptionMonsterTest::
ld hl, wPokedexOwned
ld de, wPokedexSeen
ld b, $1F
@@ -100,7 +100,7 @@ DebugMenuOptionMonsterTest:: ; 40CB
Function40eb::
jp DebugMenu
-DebugMenuOptionName:: ; 40EE
+DebugMenuOptionName::
callab OpenTrainerGear
ld a, $e4
ldh [rBGP], a
diff --git a/engine/menu/main_menu.asm b/engine/menu/main_menu.asm
index 02ec29d..c5c19d0 100644
--- a/engine/menu/main_menu.asm
+++ b/engine/menu/main_menu.asm
@@ -87,7 +87,7 @@ InitializeByteList:
SECTION "engine/menu/main_menu.asm@MainMenu", ROMX
-MainMenu:: ; 01:53CC
+MainMenu::
ld hl, wd4a9
res 0, [hl]
call ClearTileMap
@@ -123,27 +123,27 @@ MainMenu:: ; 01:53CC
ld a, [wMenuSelection]
jp CallJumptable
-MainMenuHeader: ; 01:5418
+MainMenuHeader:
db MENU_BACKUP_TILES
menu_coords 0, 0, 13, 7
dw .MenuData
db 1 ; default option
-.MenuData: ; 01:5420
+.MenuData:
db $80
db 0 ; items
dw MainMenuItems
db $8a, $1f
dw .Strings
-.Strings: ; 01:5428
+.Strings:
db "つづきから はじめる@"
db "さいしょから はじめる@"
db "せっていを かえる@"
db "#を あそぶ@"
db "じかんセット@"
-MainMenuJumptable: ; 01:5457
+MainMenuJumptable:
dw MainMenuOptionContinue
dw StartNewGame
dw MenuCallSettings
@@ -178,11 +178,11 @@ PlayPokemonSetTimeMenu:
db SET_TIME
db -1
-MainMenuOptionSetTime:: ; 5473
+MainMenuOptionSetTime::
callab SetTime
ret
-MainMenuOptionContinue:: ;547C
+MainMenuOptionContinue::
callab Function14624
call DisplayContinueGameInfo
.loop
@@ -212,7 +212,7 @@ MainMenuOptionContinue:: ;547C
call DelayFrames
jp OverworldStart
-DisplayContinueGameInfo:: ; 54BF
+DisplayContinueGameInfo::
xor a
ldh [hBGMapMode], a
hlcoord 4, 7
@@ -237,7 +237,7 @@ DisplayContinueGameInfo:: ; 54BF
call DelayFrames
ret
-PrintNumBadges:: ;54FA
+PrintNumBadges::
push hl
ld hl, wd163 ; badges?
ld b, $01
@@ -247,7 +247,7 @@ PrintNumBadges:: ;54FA
ld bc, $0102 ; flags and constants for this? 1 byte source, 2 digit display
jp PrintNumber
-PrintNumOwnedMons:: ; 550D
+PrintNumOwnedMons::
push hl
ld hl, wPokedexOwned
ld b, $20 ; flag_array NUM_POKEMON?
@@ -257,7 +257,7 @@ PrintNumOwnedMons:: ; 550D
ld bc, $0103 ; 1 byte, 3 digit
jp PrintNumber
-PrintPlayTime:: ; 5520
+PrintPlayTime::
ld de, hRTCHours
ld bc, $0103 ; 1 byte, 3 digit
call PrintNumber
@@ -274,7 +274,7 @@ PlayerInfoText:
next "プレイじかん"
text_end
-StartNewGame:: ; 555C
+StartNewGame::
ld de, MUSIC_NONE
call PlayMusic
ld de, MUSIC_OAK_INTRO
diff --git a/engine/menu/reset_dialog.asm b/engine/menu/reset_dialog.asm
index 6e2b99b..8384ee6 100644
--- a/engine/menu/reset_dialog.asm
+++ b/engine/menu/reset_dialog.asm
@@ -2,7 +2,7 @@ INCLUDE "constants.asm"
SECTION "engine/menu/reset_dialog.asm", ROMX
-DisplayResetDialog:: ; fc362 (3f:4362)
+DisplayResetDialog::
ld hl, _ResetConfirmText
call MenuTextBox
call YesNoBox
diff --git a/engine/menu/set_time.asm b/engine/menu/set_time.asm
index c7c4aa3..15e40dc 100644
--- a/engine/menu/set_time.asm
+++ b/engine/menu/set_time.asm
@@ -2,7 +2,7 @@ INCLUDE "constants.asm"
SECTION "engine/menu/set_time.asm", ROMX
-SetTime: ; 36:7ae4
+SetTime:
ld hl, wStartHour
ldh a, [hRTCHours]
ld [hli], a
@@ -12,7 +12,7 @@ SetTime: ; 36:7ae4
call PrintText
ret
-Textdbaf4: ; 36:7af4
+Textdbaf4:
deciram wStartHour, 1, 2
text " じ"
line "@"
@@ -72,7 +72,7 @@ Textdbaf4: ; 36:7af4
call Function0502
jp Function3036
-Textdbb6c: ; 36:7b6c
+Textdbb6c:
deciram wStartHour, 1, 2
text " じ"
line "@"
diff --git a/engine/menu/start_menu.asm b/engine/menu/start_menu.asm
index 6a8f433..5b91246 100644
--- a/engine/menu/start_menu.asm
+++ b/engine/menu/start_menu.asm
@@ -2,7 +2,7 @@ INCLUDE "constants.asm"
SECTION "engine/menu/start_menu.asm", ROMX
-DisplayStartMenu: ; 04:5DBE
+DisplayStartMenu:
call RefreshScreen
ld de, $0003
call PlaySFX
@@ -26,7 +26,7 @@ DisplayStartMenu: ; 04:5DBE
ld hl, .StartMenuEntriesReturnTable
jp CallJumptable
-.StartMenuEntriesReturnTable: ; 04:5DFC
+.StartMenuEntriesReturnTable:
dw .RefreshStartDisplay
dw .MainReturn
dw .exit
@@ -43,7 +43,7 @@ DisplayStartMenu: ; 04:5DBE
call UpdateTimePals
ret
-.unused ; 04:5E16
+.unused
call .WaitForARelease
call LoadFontExtra
call CloseWindow
@@ -56,26 +56,26 @@ DisplayStartMenu: ; 04:5DBE
jr nz, .WaitForARelease
ret
-.ExitAndHookFF: ; 04:5E2B
+.ExitAndHookFF:
call ExitMenu
ld a, $FF
ldh [hStartmenuCloseAndSelectHookEnable], a
jr .UpdateTime
-.StartMenuHeader: ; 04:5E34
+.StartMenuHeader:
db MENU_BACKUP_TILES
menu_coords $0C, 00, $13, $11
dw .MenuData
db 1 ; default option
-.MenuData: ; 04:5E3C
+.MenuData:
db $A8 ; flags
db 0 ; items
dw StartMenuItems
db $8A, $1F
dw .Strings
-.Strings: ; 04:5E44
+.Strings:
db "ずかん@"
db "ポケモン@"
db "りュック@"
@@ -86,7 +86,7 @@ DisplayStartMenu: ; 04:5DBE
db "わくせん@"
db "りセット@"
-StartMenuJumpTable: ; 04:5E6C
+StartMenuJumpTable:
dw StartMenu_Pokedex
dw StartMenu_Party
dw StartMenu_Backpack
@@ -97,7 +97,7 @@ StartMenuJumpTable: ; 04:5E6C
dw StartMenu_TrainerGear
dw StartMenu_Reset
-StartMenuItems: ; 04:5E7E
+StartMenuItems:
db 4
db START_SAVE
db START_OPTIONS
@@ -141,7 +141,7 @@ StartMenuItems: ; 04:5E7E
db START_EXIT
db -1
-GetStartMenuState: ; 04:5EA4
+GetStartMenuState:
; Stores one of four values to wActiveBackpackPocket
; based on story flags and debug mode.
; 4 = debug, 3 = starting, 2 = rival beat in lab
@@ -168,30 +168,30 @@ GetStartMenuState: ; 04:5EA4
ld [wActiveBackpackPocket], a
ret
-StartMenu_Exit: ; 04:5ECF
+StartMenu_Exit:
; Exits the menu
ld a, 1
ret
-StartMenu_TrainerGear: ; 04:5ED2
+StartMenu_TrainerGear:
callab TrainerGear
ld a, 0
ret
-StartMenu_Reset: ; 04:5EDD
+StartMenu_Reset:
ld hl, DisplayResetDialog
ld a, BANK(DisplayResetDialog)
call DisplayResetDialog ; should be farcall
ld a, 0
ret
-StartMenu_Save: ; 04:5EE8
+StartMenu_Save:
predef Function143e0
call UpdateSprites
ld a, 0
ret
-StartMenu_Settings: ; 04:5EF3
+StartMenu_Settings:
call LoadStandardMenuHeader
xor a
ldh [hBGMapMode], a
@@ -208,12 +208,12 @@ StartMenu_Settings: ; 04:5EF3
ld a, 0
ret
-StartMenu_TrainerCard: ; 04:5F1F
+StartMenu_TrainerCard:
call _TrainerCard
ld a, 0
ret
-_TrainerCard: ; 04:5F25
+_TrainerCard:
call LoadStandardMenuHeader
ldh a, [hMapAnims]
push af
@@ -231,7 +231,7 @@ _TrainerCard: ; 04:5F25
ldh [hMapAnims], a
ret
-StartMenu_Pokedex: ; 04:5F4F
+StartMenu_Pokedex:
call LoadStandardMenuHeader
predef Function40000
call ClearPalettes
@@ -244,18 +244,18 @@ StartMenu_Pokedex: ; 04:5F4F
ld a, 0
ret
-UnusedToolPocketData: ; 04:5F6F
+UnusedToolPocketData:
dw ToolsPocketHeader
dw wRegularItemsCursor
dw wRegularItemsScrollPosition
-ToolsPocketHeader: ; 04:5F75
+ToolsPocketHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 03, 03, $11, $0A
dw .ToolsPocketData
db 1
-.ToolsPocketData ; 04:5F7D
+.ToolsPocketData
db $AD
db 4, 9, 2, 0
dw wNumBagItems
@@ -268,13 +268,13 @@ ToolsPocketHeader: ; 04:5F75
dw wBackpackAndKeyItemsCursor
dw wBackpackAndKeyItemsScrollPosition
-KeyItemsPocketHeader: ; 04:5F93
+KeyItemsPocketHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 03, 03, $11, $0A
dw .KeyPocketData
db 1
-.KeyPocketData ; 04:5F9B
+.KeyPocketData
db $AD
db 4, 9, 1, 0
dw wNumKeyItems
@@ -283,13 +283,13 @@ KeyItemsPocketHeader: ; 04:5F93
dba Function24783
dba Function241ef
-BackpackMenuHeader: ; 04:5FAB
+BackpackMenuHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 03, 03, $11, $0A
dw .BackpackData
db 01
-.BackpackData ; 04:5FB3
+.BackpackData
db $A1
db 4, 9, 2, 0
dw wNumBagItems
@@ -298,7 +298,7 @@ BackpackMenuHeader: ; 04:5FAB
dba Function24783
dba Function241ef
-GetPocket2Status: ; 04:5FC3
+GetPocket2Status:
; puts 2 in wActiveBackpackPocket if pocket 2 has items
; otherwise puts 1 in
ld a, 2
@@ -310,7 +310,7 @@ GetPocket2Status: ; 04:5FC3
ld [wActiveBackpackPocket], a
ret
-FlipPocket2Status: ; 04:5FD3
+FlipPocket2Status:
; stores 1 in wactivebackpocket if it's currently 2
; and vice versa
ld a, [wActiveBackpackPocket]
@@ -322,7 +322,7 @@ FlipPocket2Status: ; 04:5FD3
ld [wActiveBackpackPocket], a
ret
-CheckItemsQuantity: ; 04:5FE2
+CheckItemsQuantity:
; sets clear flag if you have no items
ld a, [wNumBagItems]
and a
@@ -333,7 +333,7 @@ CheckItemsQuantity: ; 04:5FE2
scf
ret
-DrawBackpack: ; 04:5FEE
+DrawBackpack:
ld hl, wVramState
res 0, [hl]
call ClearSprites
@@ -351,7 +351,7 @@ DrawBackpack: ; 04:5FEE
call ExitMenu
ret
-StartMenu_Backpack: ; 04:6015
+StartMenu_Backpack:
call CheckItemsQuantity
jr c, .NoItems
call LoadStandardMenuHeader
@@ -382,12 +382,12 @@ StartMenu_Backpack: ; 04:6015
ret
.NoItems
- call DrawNoItemsText ; 6371
+ call DrawNoItemsText
scf
ld a, 0
ret
-DebugBackpackLoop: ; 04:6056
+DebugBackpackLoop:
; checks the field debug flag, if set this runs
; otherwise NondebugBackpackLoop runs
; if wactivebackpackpocket is 1 (doesn't have key items) then jumps below
@@ -413,7 +413,7 @@ DebugBackpackLoop: ; 04:6056
ld [wRegularItemsCursor], a
jp HandleBackpackInput
-.ToolsPocketText ; 04:608F
+.ToolsPocketText
db "      ふつうの どうぐ      @"
.NoTools
@@ -433,10 +433,10 @@ DebugBackpackLoop: ; 04:6056
ld [wBackpackAndKeyItemsCursor], a
jr HandleBackpackInput
-KeyItemsPocketText: ; 04:60CD
+KeyItemsPocketText:
db "      だいじな もの       @"
-NondebugBackpackLoop: ; 04:60E2
+NondebugBackpackLoop:
ld hl, BackpackMenuHeader
call CopyMenuHeader
ld de, BackpackHeaderText
@@ -453,10 +453,10 @@ NondebugBackpackLoop: ; 04:60E2
ld [wBackpackAndKeyItemsCursor], a
jr HandleBackpackInput
-BackpackHeaderText: ; 04:610B
+BackpackHeaderText:
db "      りュックの なか     @"
-HandleBackpackInput: ; 04:611F
+HandleBackpackInput:
ld a, [wMenuJoypad]
cp A_BUTTON
jp z, .BackpackA
@@ -470,33 +470,33 @@ HandleBackpackInput: ; 04:611F
jp z, .BackpackSelect
jp .exit
-.BackpackSwapPocket ; 04:613E
+.BackpackSwapPocket
call FlipPocket2Status
xor a
ld [wSelectedSwapPosition], a
jp .exit
-.BackpackSelect ; 04:6148
+.BackpackSelect
callab Function245c5
jp .exit
-.exit ; 04:6153
+.exit
jp DebugBackpackLoop
-.UnusedNoItems ; 04:6156
+.UnusedNoItems
call DrawNoItemsText
scf
ret
-.BackpackBack ; 04:615B
+.BackpackBack
scf
ret
-.BackpackA ; 04:615D
+.BackpackA
and a
ret
-BackpackSelected: ; 04:615F
+BackpackSelected:
callab Function243af
call PlaceHollowCursor
call LoadItemData
@@ -505,7 +505,7 @@ BackpackSelected: ; 04:615F
ld hl, .BagSelectJumptable
jp CallJumptable
-.BagSelectJumptable: ; 04:617E
+.BagSelectJumptable:
dw SelectItem
dw .UnknownSelection
dw BallPocketLoop
@@ -514,14 +514,14 @@ BackpackSelected: ; 04:615F
dw SelectItem
dw SelectItem
-.SwapPocket ; 04:618C
+.SwapPocket
call FlipPocket2Status
xor a
ld [wSelectedSwapPosition], a
and a
ret
-.UnknownSelection ; 04:6195
+.UnknownSelection
call LoadStandardMenuHeader
callab Function2d2fc
call ExitMenu
@@ -529,7 +529,7 @@ BackpackSelected: ; 04:615F
and a
ret
-BallPocketLoop: ; 04:61A8
+BallPocketLoop:
call BallPocket
jr c, .exit
call SelectItem
@@ -539,7 +539,7 @@ BallPocketLoop: ; 04:61A8
and a
ret
-SelectItem: ; 04:61B5
+SelectItem:
call ItemUseMenu
jr c, .skip1
ld a, [wMenuCursorY]
@@ -553,7 +553,7 @@ SelectItem: ; 04:61B5
and a
ret
-ItemUseMenu: ; 04:61CE
+ItemUseMenu:
; loads SelectedItemMenu if not debug,
; DebugSelectedItemMenu if debug
ld a, [wDebugFlags]
@@ -571,7 +571,7 @@ ItemUseMenu: ; 04:61CE
call CloseWindow
ret
-DebugSelectedItemMenu: ; 04:61EF
+DebugSelectedItemMenu:
db MENU_BACKUP_TILES
menu_coords $0D, $0A, $13, $10
dw .DebugSelectedItemMenuText
@@ -584,7 +584,7 @@ DebugSelectedItemMenu: ; 04:61EF
db "すてる@" ; toss
db "とうろく@" ; register
-SelectedItemMenu: ; 04:6206
+SelectedItemMenu:
db MENU_BACKUP_TILES
menu_coords $0E, $0A, $13, $0E
dw .SelectedItemMenuText
@@ -596,24 +596,24 @@ SelectedItemMenu: ; 04:6206
db "つかう@" ; use
db "すてる@" ; toss
-TossItemSelection: ; 04:6218
+TossItemSelection:
ld de, wNumBagItems
call TryTossItem
and a
ret
-RegisterItemSelection: ; 04:6220
+RegisterItemSelection:
call TryRegisterItem
and a
ret
-UseItemSelection: ; 04:6225
+UseItemSelection:
callab CheckItemMenu
ld a, [wItemAttributeParamBuffer]
ld hl, .UseItemJumptable
jp CallJumptable
-.UseItemJumptable: ; 04:6236 ; jumptable
+.UseItemJumptable: ; jumptable
dw .FailedMove
dw .unusable
dw .unusable
@@ -622,17 +622,17 @@ UseItemSelection: ; 04:6225
dw .SpriteItem
dw .FieldMove
-.unusable ; 04:6244
+.unusable
call PrintCantUseText
and a
ret
-.SimpleItem: ; 04:6249
+.SimpleItem:
call UseItem
and a
ret
-.SpriteItem: ; 04:624E
+.SpriteItem:
; might be a better name for this once
; bank 5 gets sorted out
call UseItem
@@ -642,7 +642,7 @@ UseItemSelection: ; 04:6225
and a
ret
-.FieldMove: ; 04:625C
+.FieldMove:
call UseItem
ld a, [wFieldMoveSucceeded]
and a
@@ -651,12 +651,12 @@ UseItemSelection: ; 04:6225
ld a, 4
ret
-.FailedMove ; 04:6269
+.FailedMove
call PrintCantUseText
and a
ret
-TryTossItem: ; 04:626E
+TryTossItem:
push de
call LoadItemData
callab _CheckTossableItem
@@ -688,21 +688,21 @@ TryTossItem: ; 04:626E
and a
ret
-.TossFail ; 04:62BD ;25
+.TossFail ;25
call CantDropItem
.TossReturn
pop hl
scf
ret
-.TossedText: ; 04:62C3
+.TossedText:
db 1
dw wStringBuffer2
text "を "
line "いくつ すてますか?"
done
-.TossVerifyText: ; 04:62D5
+.TossVerifyText:
db 1
dw wStringBuffer2
text "を @"
@@ -713,49 +713,49 @@ TryTossItem: ; 04:626E
line "すててもよろしいですか?"
done
-.TossedTextCopy: ; 04:62F0
+.TossedTextCopy:
db 1
dw wStringBuffer1
text "を"
line "すてました!<PROMPT>"
-CantDropItem: ; 04:62FD
+CantDropItem:
ld hl, .CantDropItemText
call MenuTextBoxBackup
ret
-.CantDropItemText: ; 04:6304
+.CantDropItemText:
text "それは とても たいせつなモノです"
line "すてることは できません!<PROMPT>"
-PrintCantUseHM: ; 04:6325
+PrintCantUseHM:
ld hl, .CantUseHMText
call MenuTextBoxBackup
ret
-.CantUseHMText: ; 04:632C
+.CantUseHMText:
text "かいはつちゅう です"
line "いまは つかえません<PROMPT>"
-PrintCantUseText: ; 04:6343
+PrintCantUseText:
ld hl, .CantUseHereText
call MenuTextBoxBackup
ret
-.CantUseHereText: ; 04:634A
+.CantUseHereText:
text "オーキドの ことば<⋯⋯>"
line "<PLAYER>よ! こういうものには"
cont "つかいどきが あるのじゃ!<PROMPT>"
-DrawNoItemsText: ; 04:6371
+DrawNoItemsText:
ld hl, .NoItemsText
call MenuTextBoxBackup
ret
-.NoItemsText: ; 04:6378
+.NoItemsText:
text "どうぐ をひとつも<NEXT>もっていません!<PROMPT>"
-BallPocket: ; 04:638C
+BallPocket:
xor a
ldh [hBGMapMode], a
ld hl, .BallPocketHeader
@@ -780,16 +780,16 @@ BallPocket: ; 04:638C
scf
ret
-.BallHolderText: ; 04:63B9
+.BallHolderText:
db "     ボール ホルダ      @"
-.BallPocketHeader: ; 04:63CC
+.BallPocketHeader:
db MENU_BACKUP_TILES
menu_coords 03, 03, $11, $0A
dw .MenuData
db 1
-.MenuData: ; 04:63D4
+.MenuData:
db SCROLLINGMENU_ENABLE_FUNCTION3 ; flags
db 4, 8 ; rows, columns
db $80 ; horizontal spacing?
@@ -800,7 +800,7 @@ BallPocket: ; 04:638C
dba Function24783
dba Function241ef
-DrawBackpackTitleRow: ; 04:63E4
+DrawBackpackTitleRow:
push de
hlcoord 0, 0
ld de, .BlankLine
@@ -810,17 +810,17 @@ DrawBackpackTitleRow: ; 04:63E4
call PlaceString
ret
-.BlankLine: ; 04:63F6
+.BlankLine:
db "                    @"
-LoadItemData: ; 04:640B
+LoadItemData:
ld a, [wCurItem]
ld [wce37], a
call GetItemName
call CopyStringToStringBuffer2
ret
-StartMenuLoadSprites: ; 04:6418
+StartMenuLoadSprites:
call DisableLCD
ld a, 6
call UpdateSoundNTimes
@@ -835,13 +835,13 @@ StartMenuLoadSprites: ; 04:6418
call GetMemSGBLayout
ret
-TryRegisterItem: ; 04:6440
+TryRegisterItem:
callab CheckItemMenu
ld a, [wItemAttributeParamBuffer]
ld hl, .RegisterItemJumptable
jp CallJumptable
-.RegisterItemJumptable ; 04:6451
+.RegisterItemJumptable
dw PrintCantRegisterToolText
dw PrintCantRegisterToolText
dw PrintCantRegisterToolText
@@ -850,7 +850,7 @@ TryRegisterItem: ; 04:6440
dw RegisterItem
dw RegisterItem
-RegisterItem: ; 04:645F
+RegisterItem:
ld a, [wItemIndex]
inc a
ld b, a
@@ -870,22 +870,22 @@ RegisterItem: ; 04:645F
call MenuTextBoxBackup
ret
-.RegisteredItemText: ; 04:6487
+.RegisteredItemText:
db 1
dw wStringBuffer2
text "を "
line "べんりボタンに とうろくした!<PROMPT>"
-PrintCantRegisterToolText: ; 04:649E
+PrintCantRegisterToolText:
ld hl, .CantRegisterToolText
call MenuTextBoxBackup
ret
-.CantRegisterToolText: ; 04:64A5
+.CantRegisterToolText:
text "そのどうぐは "
line "とうろくできません!<PROMPT>"
-StartMenu_Party: ; 04:64B9
+StartMenu_Party:
ld a, [wPartyCount]
and a
jr nz, .partynonzero
@@ -895,14 +895,14 @@ StartMenu_Party: ; 04:64B9
call LoadStandardMenuHeader
callab Function50756
-HandleSelectedPokemon: ; 04:64CD
+HandleSelectedPokemon:
xor a
ld [wcdb9], a
ld [wSelectedSwapPosition], a
predef Function50774
jr PartyPrompt.partypromptreturn
-PartyPrompt: ; 04:64DB
+PartyPrompt:
ld a, [wWhichPokemon]
inc a
ld [wSelectedSwapPosition], a
@@ -915,7 +915,7 @@ PartyPrompt: ; 04:64DB
jp SelectedPokemonSubmenu
.return
ld a, 0
-PartyPromptExit: ; 04:64FB
+PartyPromptExit:
push af
call ClearBGPalettes
call StartMenuLoadSprites
@@ -929,7 +929,7 @@ PartyPromptExit: ; 04:64FB
pop af
ret
-SelectedPokemonSubmenu: ; 04:6513
+SelectedPokemonSubmenu:
hlcoord 1, 13
lb bc, 4, $12
call ClearBox
@@ -947,7 +947,7 @@ SelectedPokemonSubmenu: ; 04:6513
ld a, [wd163]
jp hl
-PartyJumpTable: ; 04:653E
+PartyJumpTable:
dbw 1, PartyTryCut
dbw 2, PartyTryFly
dbw 3, PartyTrySurf
@@ -965,14 +965,14 @@ PartyJumpTable: ; 04:653E
dbw 15, PartyPokemonSummary2
dbw 16, PartyMailMenu
-PartyCheckLessThanTwo: ; 04:656E
+PartyCheckLessThanTwo:
; might have to do with switch?
ld a, [wPartyCount]
cp 2
jp c, HandleSelectedPokemon
jp PartyPrompt
-PartyHeldItem: ; 04:6579
+PartyHeldItem:
callab Function_8f1cb
ld hl, .HoldItemMenu
call LoadMenuHeader
@@ -998,7 +998,7 @@ PartyHeldItem: ; 04:6579
.jump
jp HandleSelectedPokemon
-.PartyGiveHeldItem ; 04:65B9
+.PartyGiveHeldItem
call LoadStandardMenuHeader
call ClearPalettes
call GetPocket2Status
@@ -1058,7 +1058,7 @@ PartyHeldItem: ; 04:6579
call z, PartyGiveMail
jr .ExitGiveItem
-.GiveItem ; 04:664B
+.GiveItem
ld a, [wce37]
ld [wCurItem], a
call PartyRecieveItem
@@ -1066,16 +1066,16 @@ PartyHeldItem: ; 04:6579
call MenuTextBoxBackup
jr .ExitGiveItem
-.CantGive ; 04:665C
+.CantGive
ld hl, .CantBeEquippedText
call MenuTextBoxBackup
-.ExitGiveItem ;04:6662
+.ExitGiveItem
call ClearPalettes
call LoadFontsBattleExtra
call ExitMenu
ret
-.PartyTryRecieveItem ; 04:666C
+.PartyTryRecieveItem
call SpeechTextBox
call GetPartyItemOffset
ld a, [hl]
@@ -1102,75 +1102,75 @@ PartyHeldItem: ; 04:6579
.escape
ret
-.HoldItemMenu ; 04:66A1 ; verticalmenu
+.HoldItemMenu ; verticalmenu
db STATICMENU_NO_TOP_SPACING | STATICMENU_PLACE_TITLE
menu_coords 4, 4, $e, 9
dw .HoldItemMenuText
db 1
-.HoldItemMenuText ;04:66A9
+.HoldItemMenuText
db $80
db 2
db "そうびを する@"
db "そうびを はずす@"
-.CantBeEquippedText ; 04:66BC
+.CantBeEquippedText
db 1
dw wStringBuffer1
text "を そうびすることは"
line "できません<PROMPT>"
-ItemWasEquippedText: ; 04:66D1
+ItemWasEquippedText:
db 1
dw wcd11
text "は そうび していた"
line "@"
-.UnusedText1 ; 04:66E1
+.UnusedText1
db 1
dw wStringBuffer1
text "を はずして"
para "@"
-.UnusedText2 ; 04:66ED
+.UnusedText2
db 1
dw wStringBuffer2
text "を そうびした!<PROMPT>"
-ItemPrompt66FA: ; 04:66FA
+ItemPrompt66FA:
db 1
dw wcd11
text "は @"
-.UnusedText3 ; 04:6701
+.UnusedText3
db 1
dw wStringBuffer2
text "を"
line "そうびした!<PROMPT>"
-PartyNoItemToRecieveText: ; 04:670E
+PartyNoItemToRecieveText:
db 1
dw wcd11
text "は なにも"
line "そうび していません!<PROMPT>"
-PartyItemRecieveBagFullText: ; 04:6724
+PartyItemRecieveBagFullText:
text "どうぐが いっぱいで"
line "そうびを はずせません!<PROMPT>"
-ItemPrompt673D: ; 04:673D
+ItemPrompt673D:
db 1
dw wcd11
text "から @"
-.UnusedText4 ; 04:6745
+.UnusedText4
db 1
dw wStringBuffer1
text "を"
line "はずしました!<PROMPT>"
-ItemPrompt6753: ; 04:6753
+ItemPrompt6753:
db 1
dw wcd11
text "は @"
@@ -1184,27 +1184,27 @@ ItemPrompt6753: ; 04:6753
line "とりかえますか?"
done
-GetPartyItemOffset: ; 04:6784
+GetPartyItemOffset:
push af
ld a, 1
call GetPartyParamLocation
pop af
ret
-PartyRecieveItem: ; 04:678C
+PartyRecieveItem:
ld a, 1
ld [wItemQuantity], a
ld hl, wNumBagItems
call ReceiveItem
ret
-UnusedHandleItemJumptable: ; 04:6798
+UnusedHandleItemJumptable:
callab CheckItemMenu
ld a, [wItemAttributeParamBuffer]
ld hl, UnusedItemJumptable
jp CallJumptable
-UnusedItemJumptable: ; 04:67A9
+UnusedItemJumptable:
dw EmptyFunction127b7
dw PartyGiveMail
dw PartyBallPocket
@@ -1213,16 +1213,16 @@ UnusedItemJumptable: ; 04:67A9
dw EmptyFunction127b7
dw EmptyFunction127b7
-EmptyFunction127b7: ; 04:67B7
+EmptyFunction127b7:
ret
-ChangeBackpackPocket: ; 04:67B8
+ChangeBackpackPocket:
call FlipPocket2Status
xor a
ld [wSelectedSwapPosition], a
ret
-PartyBallPocket: ; 04:67C0
+PartyBallPocket:
call BallPocket
jr c, .exit
call SelectItem
@@ -1231,7 +1231,7 @@ PartyBallPocket: ; 04:67C0
.exit
ret
-PartyGiveMail: ; 04:67CC
+PartyGiveMail:
call LoadStandardMenuHeader
ld de, wMovementBufferCount
callab ComposeMailMessage
@@ -1254,7 +1254,7 @@ PartyGiveMail: ; 04:67CC
call CloseSRAM
ret
-PartyMailMenu: ; 04:6806
+PartyMailMenu:
ld hl, .MailMenu
call LoadMenuHeader
call VerticalMenu
@@ -1316,18 +1316,18 @@ PartyMailMenu: ; 04:6806
call CloseWindow
jp HandleSelectedPokemon
-.MailFull ; 04:689D
+.MailFull
ld hl, .MailFullText
call MenuTextBoxBackup
jr .exit
-.MailMenu ; 04:68A5
+.MailMenu
db MENU_BACKUP_TILES
menu_coords 04, 04, $0E, $0B
dw .MailMenuStrings
db 01
-.MailMenuStrings ; 04:68AD
+.MailMenuStrings
db $80
db 3
@@ -1335,25 +1335,25 @@ PartyMailMenu: ; 04:6806
db "メールを はずす@"
db "やめる@"
-.MessageRemoveMail ; 04:68C4
+.MessageRemoveMail
text "メールを はずすと メッセージが"
line "きえてしまいますが いいですか?"
done
-.DrawNick ; 04:68E7
+.DrawNick
db 1
dw wStringBuffer1
text "から @"
-.DeleteMailText ; 04:68EF
+.DeleteMailText
text "メールを"
line "はずしました!<PROMPT>"
-.MailFullText ; 04:68FD
+.MailFullText
text "どうぐが いっぱいで"
line "メールを はずせません!<PROMPT>"
-PartyPokemonSummary: ; 04:6916
+PartyPokemonSummary:
call LoadStandardMenuHeader
call ClearSprites
xor a
@@ -1365,7 +1365,7 @@ PartyPokemonSummary: ; 04:6916
call Call_ExitMenu
jp HandleSelectedPokemon
-PartyTryCut: ; 04:6934
+PartyTryCut:
callab CutFunction
ld a, [wFieldMoveSucceeded]
cp $F
@@ -1373,7 +1373,7 @@ PartyTryCut: ; 04:6934
ld a, 4
jp PartyPromptExit
-PartyTryFly: ; 04:6949
+PartyTryFly:
bit 2, a
jp z, PrintNeedNewBadgeText
callab FlyFunction
@@ -1383,11 +1383,11 @@ PartyTryFly: ; 04:6949
ld a, 4
jp PartyPromptExit
-PartyCantUseMove: ; 04:6963
+PartyCantUseMove:
call PrintCantUseHM
jp HandleSelectedPokemon
-PartyTryTeleport: ; 04:6969
+PartyTryTeleport:
callab TeleportFunction
ld a, [wFieldMoveSucceeded]
and a
@@ -1395,7 +1395,7 @@ PartyTryTeleport: ; 04:6969
ld a, 4
jp PartyPromptExit
-PartyTrySurf: ; 04:697D
+PartyTrySurf:
bit 4, a
jp z, PrintNeedNewBadgeText
callab SurfFunction
@@ -1405,7 +1405,7 @@ PartyTrySurf: ; 04:697D
ld a, 4
jp PartyPromptExit
-PartyTryDig: ; 04:6996
+PartyTryDig:
callab DigFunction
ld a, [wFieldMoveSucceeded]
cp $F
@@ -1413,7 +1413,7 @@ PartyTryDig: ; 04:6996
ld a, 4
jp PartyPromptExit
-PartyCalculateHealth: ; 04:69AB
+PartyCalculateHealth:
ld a, MON_MAXHP ; might be wrong, was $24
call GetPartyParamLocation
ld a, [hli]
@@ -1435,24 +1435,24 @@ PartyCalculateHealth: ; 04:69AB
callab Functionf218
jp HandleSelectedPokemon
-PrintNotHealthyEnoughText: ; 04:69D9
+PrintNotHealthyEnoughText:
ld hl, NotHealthyEnoughText
call PrintText
jp HandleSelectedPokemon
-NotHealthyEnoughText: ; 04:69E2
+NotHealthyEnoughText:
text "たいりょくが たりません!<PROMPT>"
-PrintNeedNewBadgeText: ; 04:69F1
+PrintNeedNewBadgeText:
ld hl, NeedNewBadgeText
call PrintText
jp HandleSelectedPokemon
-NeedNewBadgeText: ; 04:69FA
+NeedNewBadgeText:
text "あたらしい バッジを てにするまで"
line "まだ つかえません!<PROMPT>"
-PartyPokemonSummary2: ; 04:6A18
+PartyPokemonSummary2:
ld hl, wce5f
ld a, [hl]
push af
@@ -1463,7 +1463,7 @@ PartyPokemonSummary2: ; 04:6A18
call ClearBGPalettes
jp HandleSelectedPokemon
-PokeSummary: ; 04:6A2C
+PokeSummary:
call ClearBGPalettes
call ClearTileMap
call ClearSprites
@@ -1515,7 +1515,7 @@ PokeSummary: ; 04:6A2C
.LastPokeChosen
ld de, PartyMenuAttributes
call SetMenuAttributes
-SummaryDrawPoke: ; 04:6AAC
+SummaryDrawPoke:
xor a
ldh [hBGMapMode], a
ld [wSelectedSwapPosition], a
@@ -1543,7 +1543,7 @@ SummaryDrawPoke: ; 04:6AAC
ld hl, w2DMenuFlags
set 6, [hl]
jr PartySelectionInputs.PartySelectSkipInputs
-PartySelectionInputs: ; 04:6AF9
+PartySelectionInputs:
call Get2DMenuJoypad + 3
bit B_BUTTON_F, a
jp nz, PartySelectionBackOut
@@ -1601,7 +1601,7 @@ PartySelectionInputs: ; 04:6AF9
predef Function2d663
jp PartySelectionInputs
-.DrawMovePokeText ; 04:6B84
+.DrawMovePokeText
hlcoord 1, 11
lb bc, 6, $12
call ClearBox
@@ -1610,7 +1610,7 @@ PartySelectionInputs: ; 04:6AF9
call PlaceString
jp PartySelectionInputs
-.PartyPokeDetailsAdvancePage ; 04:6B99
+.PartyPokeDetailsAdvancePage
ld hl, wWhichPokemon
inc [hl]
ld a, [wPartyCount]
@@ -1619,7 +1619,7 @@ PartySelectionInputs: ; 04:6AF9
dec [hl]
jp PartySelectionInputs
-.PartyPokeDetailsBackPage ; 04:6BA8
+.PartyPokeDetailsBackPage
ld hl, wWhichPokemon
ld a, [hl]
and a
@@ -1627,7 +1627,7 @@ PartySelectionInputs: ; 04:6AF9
dec [hl]
jp PokeSummary
-.PartyPokeSelect ; 04:6BB4
+.PartyPokeSelect
ld a, [wSelectedSwapPosition]
and a
jr nz, .swap
@@ -1664,7 +1664,7 @@ PartySelectionInputs: ; 04:6AF9
call ClearBox
jp SummaryDrawPoke
-SwapEntries: ; 04:6C06
+SwapEntries:
; values at (hl + [cursor place]-1)
; and (hl + [wSelectedSwapPosition] -1) get swapped
push hl ; saves hl
@@ -1688,7 +1688,7 @@ SwapEntries: ; 04:6C06
ld [de], a
ret
-PartySelectionBackOut: ; 04:6C20
+PartySelectionBackOut:
xor a
ld [wSelectedSwapPosition], a
ld hl, w2DMenuFlags
@@ -1697,7 +1697,7 @@ PartySelectionBackOut: ; 04:6C20
call ClearTileMap
ret
-PartyMenuAttributes: ; 04:6C30
+PartyMenuAttributes:
; cursor y
; cursor y
; num rows
@@ -1712,37 +1712,37 @@ PartyMenuAttributes: ; 04:6C30
dn 2, 0
db $F3
-PartyTypeText: ; 04:6C38
+PartyTypeText:
db "タイプ/     いりょく/@"
-PartyPokeDivider: ; 04:6C47
+PartyPokeDivider:
db "ーーー@"
-PartyMoveText: ; 04:6C4B
+PartyMoveText:
db "どこに いどうしますか?@"
-CheckRegisteredItem: ; 04:6C58
+CheckRegisteredItem:
call .RegisteredItem
ret
-.RegisteredItem ; 04:6C5C
+.RegisteredItem
call GetRegisteredItemID
jr c, .NotRegistered
call UseRegisteredItem
ret
-.NotRegistered ; 04:6C65
+.NotRegistered
call RefreshScreen
ld hl, .NothingRegisteredText
call MenuTextBoxBackup
call Function1fea
ret
-.NothingRegisteredText: ; 04:6C72
+.NothingRegisteredText:
text "べんりボタンを おした!"
line "⋯しかしなにもおきない!<PROMPT>"
-GetRegisteredItemID: ; 04:6C8D
+GetRegisteredItemID:
; if you can use the registered item, sets the ID to a
; otherwise sets 0 to a and sets the carry flag
ld a, [wRegisteredItem]
@@ -1792,13 +1792,13 @@ GetRegisteredItemID: ; 04:6C8D
scf
ret
-UseRegisteredItem: ; 04:6CD9
+UseRegisteredItem:
callab CheckItemMenu
ld a, [wItemAttributeParamBuffer]
ld hl, .RegisteredItemJumptable
jp CallJumptable
-.RegisteredItemJumptable ; 04:6CEA
+.RegisteredItemJumptable
dw .CantUse2
dw .CantUse
dw .CantUse
@@ -1806,21 +1806,21 @@ UseRegisteredItem: ; 04:6CD9
dw .overworld
dw .FieldMove
-.CantUse ; 04:6CF6
+.CantUse
call RefreshScreen
call PrintCantUseText
call Function1fea
and a
ret
-.UnusedSimpleUse ; 04:6D01
+.UnusedSimpleUse
call RefreshScreen
call UseItem
call Function1fea
and a
ret
-.overworld ; 04:6D0C
+.overworld
call RefreshScreen
ld hl, wVramState
res 0, [hl]
@@ -1832,7 +1832,7 @@ UseRegisteredItem: ; 04:6CD9
and a
ret
-.FieldMove ; 04:6D25
+.FieldMove
call UseItem
ld a, [wFieldMoveSucceeded]
and a
@@ -1850,7 +1850,7 @@ UseRegisteredItem: ; 04:6CD9
and a
ret
-TrainerCardLoop: ; 04:6D41
+TrainerCardLoop:
ld a, [wVramState]
push af
xor a
@@ -1867,7 +1867,7 @@ TrainerCardLoop: ; 04:6D41
ld [wVramState], a
ret
-ClearTrainerCardJumptable: ; 04:6D5E
+ClearTrainerCardJumptable:
; sets four bytes at wJumpTableIndex to 0
call ClearPalettes
ld hl, wJumptableIndex
@@ -1882,7 +1882,7 @@ ClearTrainerCardJumptable: ; 04:6D5E
call GetSGBLayout
ret
-HandleTrainerCardJumptable: ; 04:6D75
+HandleTrainerCardJumptable:
ld a, [wJumptableIndex]
ld e, a
ld d, 0
@@ -1894,7 +1894,7 @@ HandleTrainerCardJumptable: ; 04:6D75
ld l, a
jp hl
-.TrainerCardJumptable: ; 04:6D84
+.TrainerCardJumptable:
dw TrainerCardMainPage
dw .IncreaseJumpTableIndex
dw .IncreaseJumpTableIndex
@@ -1914,15 +1914,15 @@ HandleTrainerCardJumptable: ; 04:6D75
dw TrainerCardBadgeInput
dw TrainerCardSetClearFlag
-.SetPalAndIncJumpTable: ; 04:6DA8
+.SetPalAndIncJumpTable:
call SetPalettes
-.IncreaseJumpTableIndex: ; 04:6DAB
+.IncreaseJumpTableIndex:
ld a, [wJumptableIndex]
inc a
ld [wJumptableIndex], a
ret
-TrainerCardMainPage: ; 04:6DB3
+TrainerCardMainPage:
call ClearPalettes
call ClearTileMap
call TrainerCardDrawProtag
@@ -1943,7 +1943,7 @@ TrainerCardMainPage: ; 04:6DB3
and a
ret
-TrainerCardMainInputs: ; 04:6DE3
+TrainerCardMainInputs:
call EmptyFunction12e37
call GetJoypad
ld hl, hJoyDown
@@ -1993,10 +1993,10 @@ TrainerCardMainInputs: ; 04:6DE3
and a
ret
-EmptyFunction12e37: ; 04:6E37
+EmptyFunction12e37:
ret
-TrainerCardScroll: ; 04:6E38
+TrainerCardScroll:
ld a, $90
ldh [hWY], a
ld a, $9C
@@ -2007,7 +2007,7 @@ TrainerCardScroll: ; 04:6E38
and a
ret
-TrainerCardClearTileMap: ; 04:6E49
+TrainerCardClearTileMap:
xor a
ldh [hWY], a
ld a, $98
@@ -2019,7 +2019,7 @@ TrainerCardClearTileMap: ; 04:6E49
and a
ret
-TrainerCardSetWindowY: ; 04:6E5C
+TrainerCardSetWindowY:
ldh a, [hWY]
cp $90
jr nc, TrainerCardClearPals
@@ -2028,7 +2028,7 @@ TrainerCardSetWindowY: ; 04:6E5C
and a
ret
-TrainerCardClearPals: ; 04:6E68
+TrainerCardClearPals:
call ClearPalettes
ld a, $90
ldh [hWY], a
@@ -2038,7 +2038,7 @@ TrainerCardClearPals: ; 04:6E68
and a
ret
-TrainerCardBadgePage: ; 04:6E78
+TrainerCardBadgePage:
call ClearPalettes
call DisableLCD
ld hl, TrainerCardLeadersGFX
@@ -2055,7 +2055,7 @@ TrainerCardBadgePage: ; 04:6E78
and a
ret
-TrainerCardBadgeInput: ; 04:6E9E
+TrainerCardBadgeInput:
call GetJoypad
ld hl, hJoyDown
ld a, [hl]
@@ -2067,11 +2067,11 @@ TrainerCardBadgeInput: ; 04:6E9E
and a
ret
-TrainerCardSetClearFlag: ; 04:6EB0
+TrainerCardSetClearFlag:
scf
ret
-TrainerCardDrawProtag: ; 04:6EB2
+TrainerCardDrawProtag:
ld de, ProtagonistPic
ld a, BANK(ProtagonistPic)
call UncompressSpriteFromDE
@@ -2086,7 +2086,7 @@ TrainerCardDrawProtag: ; 04:6EB2
call InterlaceMergeSpriteBuffers
ret
-PlaceMiscTilesTrainerCard: ; 04:6ED5
+PlaceMiscTilesTrainerCard:
ld a, $30
ldh [hGraphicStartTile], a
hlcoord 13, 1
@@ -2094,7 +2094,7 @@ PlaceMiscTilesTrainerCard: ; 04:6ED5
predef PlaceGraphic
ret
-DrawTrainerCardMainPage: ; 04:6EE5
+DrawTrainerCardMainPage:
hlcoord 0, 0
ld d, 5
call PlaceTrainerCardBGTile
@@ -2148,31 +2148,31 @@ DrawTrainerCardMainPage: ; 04:6EE5
ld [hl], "▶"
ret
-TrainerCardText: ; 04:6F7A
+TrainerCardText:
db "なまえ/<NEXT><NEXT>おこづかい<NEXT><NEXT>#ずかん@"
-TrainerCardDexEntriesText: ; 04:6F8C
+TrainerCardDexEntriesText:
db "ひき@"
-TrainerCardNameTiles: ; 04:6F8F
+TrainerCardNameTiles:
db $0A, $0C, $0D, $0E, $0F, $FF
-TrainerCardIDNoTiles: ; 04:6F95
+TrainerCardIDNoTiles:
db $22, $23, $FF
-TrainerCardNameUnderlineTiles: ; 04:6F98
+TrainerCardNameUnderlineTiles:
db $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $0B, $FF
-TrainerCardStatusTiles: ; 04:6FA6
+TrainerCardStatusTiles:
db $0A, $10, $11, $12, $13, $FF
-TrainerCardBadgesOutlineTiles: ; 04:6FAC
+TrainerCardBadgesOutlineTiles:
db $03, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $02, $7F, $14, $15, $16, $17, $18, $19, $1A, $1B, $1C, $1D, $7F, $7F, $7F, $FE, $BA, $7F, $7F, $7F, $05, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $FF
-TrainerCardBadgesTextTiles: ; 04:6FE9
+TrainerCardBadgesTextTiles:
db $1E, $1F, $20, $7F, $7F, $7F, $7F, $1B, $1C, $1D, $FF
-DrawTrainerCaseBadgePage: ; 04:6FF4
+DrawTrainerCaseBadgePage:
hlcoord 0, 0
ld d, $0E
call PlaceTrainerCardBGTile
@@ -2187,16 +2187,16 @@ DrawTrainerCaseBadgePage: ; 04:6FF4
call PlaceTrainerCardTiles
ret
-TrainerCardLeagueBadgesTextTiles: ; 04:7018
+TrainerCardLeagueBadgesTextTiles:
db "#りーグバッジ@"
-TrainerCardBadgesTiles: ; 04:7020
+TrainerCardBadgesTiles:
db $0A, $0B, $0C, $0D, $0E, $FF
-TrainerCardBadgeSilhouettesTiles: ; 04:7026
+TrainerCardBadgeSilhouettesTiles:
db $07, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $07, $07, $02, $18, $58, $59, $5A, $19, $5B, $5C, $5D, $1A, $6B, $6C, $6D, $1B, $78, $79, $7A, $7F, $07, $07, $02, $7F, $20, $21, $22, $7F, $23, $24, $25, $7F, $26, $27, $28, $7F, $29, $2A, $2B, $7F, $07, $07, $02, $7F, $30, $31, $32, $7F, $33, $34, $35, $7F, $36, $37, $38, $7F, $39, $3A, $3B, $7F, $07, $07, $02, $7F, $40, $41, $42, $7F, $43, $44, $45, $7F, $46, $47, $48, $7F, $49, $4A, $4B, $7F, $07, $07, $05, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $04, $07, $07, $7F, $1C, $68, $69, $6A, $1D, $7E, $6F, $6F, $1E, $5E, $5F, $6E, $1F, $7B, $7C, $7D, $02, $07, $07, $7F, $7F, $2C, $2D, $2E, $7F, $2F, $50, $51, $7F, $52, $53, $54, $7F, $55, $56, $57, $02, $07, $07, $7F, $7F, $3C, $3D, $3E, $7F, $3F, $60, $61, $7F, $62, $63, $64, $7F, $65, $66, $67, $02, $07, $07, $7F, $7F, $4C, $4D, $4E, $7F, $4F, $70, $71, $7F, $72, $73, $74, $7F, $75, $76, $77, $02, $07, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $02, $07, $7F, $7F, $10, $7F, $11, $7F, $12, $7F, $13, $7F, $14, $7F, $15, $7F, $16, $7F, $17, $7F, $02, $07, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $06, $07, $FF
-PlaceTrainerCardTiles: ; 04:712B
+PlaceTrainerCardTiles:
; takes the tiles from de and places them at hl until FF is found.
ld a, [de]
cp $FF
@@ -2205,7 +2205,7 @@ PlaceTrainerCardTiles: ; 04:712B
inc de
jr PlaceTrainerCardTiles
-PlaceTrainerCardBGTile: ; 04:7133
+PlaceTrainerCardBGTile:
; puts tile $07 (chequered background) at coord hl.
; d controls how many times biggerloop loops.
ld e, $14
diff --git a/engine/menu/text_entry.asm b/engine/menu/text_entry.asm
index 609e711..4f4b9ee 100644
--- a/engine/menu/text_entry.asm
+++ b/engine/menu/text_entry.asm
@@ -6,7 +6,7 @@ NAMINGSCREEN_UNDERSCORE EQU "♀"
NAMINGSCREEN_HYPHEN EQU "♂"
NAMINGSCREEN_END EQU $F0
-NamingScreen: ; 04:53F4
+NamingScreen:
ld hl, wNamingScreenDestinationPointer
ld [hl], e
inc hl
@@ -40,7 +40,7 @@ NamingScreen: ; 04:53F4
call ClearJoypad
ret
-.SetUpNamingScreen: ; 04:542B
+.SetUpNamingScreen:
call ClearBGPalettes
ld b, SGB_DIPLOMA
call GetSGBLayout
@@ -59,7 +59,7 @@ NamingScreen: ; 04:53F4
call NamingScreenInitNameEntry
ret
-GetNamingScreenSetup: ; 04:5455
+GetNamingScreenSetup:
; wNamingScreenType selects which entry in the table below to jump to
ld a, [wNamingScreenType]
and $07
@@ -73,7 +73,7 @@ GetNamingScreenSetup: ; 04:5455
ld l, a
jp hl
-.Jumptable: ; 04:5466
+.Jumptable:
dw .Pokemon
dw .Player
dw .Rival
@@ -83,7 +83,7 @@ GetNamingScreenSetup: ; 04:5455
dw .Pokemon
dw .Pokemon
-.Pokemon: ; 04:5476
+.Pokemon:
ld hl, Function8f0e3
ld a, BANK(Function8f0e3)
ld e, 1
@@ -98,10 +98,10 @@ GetNamingScreenSetup: ; 04:5455
call .StoreSpriteIconParams
ret
-.NicknameText ; 04:5495
+.NicknameText
db "のニックネームは?@"
-.Player: ; 04:549F
+.Player:
ld de, GoldSpriteGFX
call .LoadSprite
hlcoord 5, 2
@@ -110,10 +110,10 @@ GetNamingScreenSetup: ; 04:5455
call .StoreSpriteIconParams
ret
-.NameText: ; 04:54B2
+.NameText:
db "あなた の なまえは?@"
-.Rival: ; 04:54BE
+.Rival:
ld de, SilverSpriteGFX
call .LoadSprite
hlcoord 5, 2
@@ -122,11 +122,11 @@ GetNamingScreenSetup: ; 04:5455
call .StoreSpriteIconParams
ret
-.RivalText: ; 04:54D1
+.RivalText:
; the ret just preceeding this would make the first word Rival.
db "ライバル の なまえは?@"
-.Mom: ; 04:54DE
+.Mom:
ld de, MomSpriteGFX
call .LoadSprite
hlcoord 5, 2
@@ -135,10 +135,10 @@ GetNamingScreenSetup: ; 04:5455
call .StoreSpriteIconParams
ret
-.MomText: ; 04:54F1
+.MomText:
db "ははおや の なまえは?@"
-.Box: ; 04:54FE
+.Box:
ld de, PokeBallSpriteGFX
ld hl, vChars0
lb bc, BANK(PokeBallSpriteGFX), $04
@@ -159,10 +159,10 @@ GetNamingScreenSetup: ; 04:5455
call .StoreBoxIconParams
ret
-.BoxText: ; 04:552D
+.BoxText:
db "バンク の なまえは?@"
-.LoadSprite: ; 04:5539
+.LoadSprite:
; copies the sprite at de into the top of VRAM, as well as the sprite $C0 after de
push de
ld hl, vChars0
@@ -185,7 +185,7 @@ GetNamingScreenSetup: ; 04:5455
call InitSpriteAnimStruct
ret
-.StoreSpriteIconParams: ; 04:5564
+.StoreSpriteIconParams:
ld a, $05
ld [wNamingScreenMaxNameLength], a
hlcoord 6, 5
@@ -195,7 +195,7 @@ GetNamingScreenSetup: ; 04:5455
ld [wNamingScreenStringEntryCoordX], a
ret
-.StoreBoxIconParams: ; 04:5575
+.StoreBoxIconParams:
ld a, $08
ld [wNamingScreenMaxNameLength], a
hlcoord 5, 5
@@ -205,7 +205,7 @@ GetNamingScreenSetup: ; 04:5455
ld [wNamingScreenStringEntryCoordX], a
ret
-NamingScreen_InitText: ; 04:5586
+NamingScreen_InitText:
; fills the tilemap with ■, then clears a 12x17 box at 1,1
; next it places the tiles at 04:58B3 onto the screen at 2,9 (tiles form an 11x8 box)
call WaitForAutoBgMapTransfer
@@ -241,7 +241,7 @@ NamingScreen_InitText: ; 04:5586
ret
-NamingScreenJoypadLoop: ; 04:55BD
+NamingScreenJoypadLoop:
call GetJoypadDebounced
ld a, [wJumptableIndex]
bit 7, a
@@ -253,7 +253,7 @@ NamingScreenJoypadLoop: ; 04:55BD
and a
ret
-.leap ; 04:55DA
+.leap
; kills sprites and resets screen position
callab InitEffectObject
call ClearSprites
@@ -263,7 +263,7 @@ NamingScreenJoypadLoop: ; 04:55BD
scf
ret
-.UpdateStringEntry: ; 04:55EC
+.UpdateStringEntry:
; sets BGMapMode to 0, then loads a string and coords out of a buffer and displays it.
; BGMapMode is then set to 1.
xor a
@@ -284,7 +284,7 @@ NamingScreenJoypadLoop: ; 04:55BD
ldh [hBGMapMode], a
ret
-.RunJumpTable: ; 04:560C
+.RunJumpTable:
ld a, [wJumptableIndex]
ld e, a
ld d, $00
@@ -296,11 +296,11 @@ NamingScreenJoypadLoop: ; 04:55BD
ld l, a
jp hl
-.JumpTable: ; 04:561B
+.JumpTable:
dw .InitCursor
dw .ReadButtons
-.InitCursor: ; 04:561F
+.InitCursor:
ld de, $5818
ld a, $39
call InitSpriteAnimStruct
@@ -312,7 +312,7 @@ NamingScreenJoypadLoop: ; 04:55BD
inc [hl]
ret
-.ReadButtons: ; 04:5634
+.ReadButtons:
; if A or B were pressed, clear hJoypadSum after calling functions; if start, set 7 in the jumptable??
ld hl, hJoypadSum
ld a, [hl]
@@ -326,7 +326,7 @@ NamingScreenJoypadLoop: ; 04:55BD
jr nz, .jumpstart
ret
-.jumpa ; 04:5647
+.jumpa
call NamingScreenGetLastCharacter
cp NAMINGSCREEN_END
jr z, .jumpstart
@@ -335,19 +335,19 @@ NamingScreenJoypadLoop: ; 04:55BD
ldh [hJoypadSum], a
ret
-.jumpb ; 04:5655
+.jumpb
call NamingScreenDeleteCharacter
xor a
ldh [hJoypadSum], a
ret
-.jumpstart ; 04:565C
+.jumpstart
call NamingScreenStoreEntry
ld hl, wJumptableIndex
set 7, [hl]
ret
-.GetDPad: ; 04:5665
+.GetDPad:
ld hl, hJoySum
ld a, [hl]
and D_UP
@@ -363,7 +363,7 @@ NamingScreenJoypadLoop: ; 04:55BD
jr nz, .rightjump
ret
-.rightjump ; 04:567D
+.rightjump
ld hl, $000C
add hl, bc
ld a, [hl]
@@ -400,7 +400,7 @@ NamingScreenJoypadLoop: ; 04:55BD
ld [hl], $00
jr .escape
-.upjump ; 04:56AC :24
+.upjump ; :24
ld hl, $000D
add hl, bc
ld a, [hl]
@@ -434,13 +434,13 @@ NamingScreenJoypadLoop: ; 04:55BD
ld [hl], a
ret
-LetterOffsetsTable1: ; 04:56DE
+LetterOffsetsTable1:
db $00, $08, $10, $18, $20, $30, $38, $40, $48, $50, $60, $68, $70, $78, $80
LetterOffsetsTable2:; 04:56ED
db $00, $08, $10, $18, $20, $28, $30, $38
-NamingScreenTryAddCharacter: ; 04:56F5
+NamingScreenTryAddCharacter:
ld a, [wNamingScreenLastCharacter]
ld hl, Dakutens
cp "゙"
@@ -465,7 +465,7 @@ NamingScreenTryAddCharacter: ; 04:56F5
ld [hl], NAMINGSCREEN_UNDERSCORE
ret
-.jump ; 04:5724
+.jump
ld a, [wNamingScreenCurNameLength]
and a
ret z
@@ -492,7 +492,7 @@ NamingScreenTryAddCharacter: ; 04:56F5
inc [hl]
ret
-Dakutens: ; 04:5748
+Dakutens:
db "かがきぎくぐけげこご"
db "さざしじすずせぜそぞ"
db "ただちぢつづてでとど"
@@ -503,12 +503,12 @@ Dakutens: ; 04:5748
db "ハバヒビフブへべホボ"
db $FF
-Handakutens: ; 04:5799
+Handakutens:
db "はぱひぴふぷへぺほぽ"
db "ハパヒピフプへぺホポ"
db $FF
-NamingScreenDeleteCharacter: ; 04:57AE
+NamingScreenDeleteCharacter:
ld hl, wNamingScreenCurNameLength
ld a, [hl]
and a
@@ -523,7 +523,7 @@ NamingScreenDeleteCharacter: ; 04:57AE
ld [hl], NAMINGSCREEN_HYPHEN
ret
-NamingScreenGetTextCursorPosition: ; 04:57C2
+NamingScreenGetTextCursorPosition:
push af
ld hl, wNamingScreenDestinationPointer
ld a, [hli]
@@ -536,7 +536,7 @@ NamingScreenGetTextCursorPosition: ; 04:57C2
pop af
ret
-NamingScreenInitNameEntry: ; 04:57D2
+NamingScreenInitNameEntry:
ld hl, wNamingScreenDestinationPointer
ld a, [hli]
ld h, [hl]
@@ -554,7 +554,7 @@ NamingScreenInitNameEntry: ; 04:57D2
ld [hl], "@"
ret
-NamingScreenStoreEntry: ; 04:57E9
+NamingScreenStoreEntry:
ld hl, wNamingScreenDestinationPointer
ld a, [hli]
ld h, [hl]
@@ -575,7 +575,7 @@ NamingScreenStoreEntry: ; 04:57E9
jr nz, .loop
ret
-NamingScreenGetLastCharacter: ; 04:5803
+NamingScreenGetLastCharacter:
ld hl, wNamingScreenCursorObjectPointer
ld c, [hl]
inc hl
@@ -618,7 +618,7 @@ NamingScreenGetLastCharacter: ; 04:5803
ld [wNamingScreenLastCharacter], a
ret
-LoadNamingScreenGFX: ; 04:5843
+LoadNamingScreenGFX:
call ClearSprites
callab InitEffectObject
call LoadFont
@@ -669,7 +669,7 @@ LoadNamingScreenGFX: ; 04:5843
SECTION "engine/menu/text_entry.asm@mail", ROMX
-ComposeMailMessage: ; 04:59EB
+ComposeMailMessage:
ld hl, wNamingScreenDestinationPointer
ld [hl], e
inc hl
@@ -713,7 +713,7 @@ ComposeMailMessage: ; 04:59EB
call .InitBlankMail
ret
-.InitBlankMail: ; 04:5A2C
+.InitBlankMail:
call ClearBGPalettes
ld b, 8 ;diploma?
call GetSGBLayout
@@ -761,7 +761,7 @@ ComposeMailMessage: ; 04:59EB
ld [hl], "<NEXT>"
ret
-InitMailText: ; 04:5A96
+InitMailText:
hlcoord 5, 2
ld de, MailPromptText
call PlaceString
@@ -769,10 +769,10 @@ InitMailText: ; 04:5A96
ld [wNamingScreenMaxNameLength], a
ret
-MailPromptText: ; 04:5AA5
+MailPromptText:
db "メールを かいてね@"
-InitCharSet: ; 04:5AAF
+InitCharSet:
call WaitForAutoBgMapTransfer
ld hl, wTileMap
lb bc, $01, $68
@@ -802,7 +802,7 @@ InitCharSet: ; 04:5AAF
jr nz, .outerloop
ret
-DoMailEntry: ; 04:5AE6
+DoMailEntry:
call GetJoypadDebounced
ld a, [wJumptableIndex]
bit 7, a
@@ -817,7 +817,7 @@ DoMailEntry: ; 04:5AE6
and a
ret
-.exit_mail ; 04:5B0A
+.exit_mail
callab InitEffectObject
call ClearSprites
xor a
@@ -826,7 +826,7 @@ DoMailEntry: ; 04:5AE6
scf
ret
-.Update: ; 04:5B1C
+.Update:
xor a
ldh [hBGMapMode], a
hlcoord 1, 3
@@ -842,7 +842,7 @@ DoMailEntry: ; 04:5AE6
ldh [hBGMapMode], a
ret
-.DoJumpTable: ; 04:5B39
+.DoJumpTable:
ld a, [wJumptableIndex]
ld e, a
ld d, 0
@@ -854,11 +854,11 @@ DoMailEntry: ; 04:5AE6
ld l, a
jp hl
-.Jumptable: ; 04:5B48
+.Jumptable:
dw .blinkcursor
dw .processjoypad
-.blinkcursor ; 04:5B4C
+.blinkcursor
ld hl, wJumptableIndex
inc [hl]
ret
@@ -879,7 +879,7 @@ DoMailEntry: ; 04:5AE6
jr nz, .selectjump
ret
-.ajump ; 04:5B69
+.ajump
call NamingScreenGetLastCharacter
cp "円"
jr z, .startjump
@@ -925,7 +925,7 @@ DoMailEntry: ; 04:5AE6
SECTION "engine/menu/text_entry.asm@mail2", ROMX
-SetupMail: ; 04:5C31
+SetupMail:
call ClearBGPalettes
ld b, 8
call GetSGBLayout
@@ -978,7 +978,7 @@ SetupMail: ; 04:5C31
ld [hl], "<NEXT>"
ret
-DrawMailLoadedText: ; 04:5CA9
+DrawMailLoadedText:
hlcoord 5, 2
ld de, MailLoadedText
call PlaceString
@@ -986,10 +986,10 @@ DrawMailLoadedText: ; 04:5CA9
ld [wNamingScreenMaxNameLength], a
ret
-MailLoadedText: ; 04:5CB8
+MailLoadedText:
db "スアケシ!!!@" ; should be "MAIL!!!" since the bold english font is loaded into vChars1
-DrawMail: ; 04:5CC0
+DrawMail:
call WaitForAutoBgMapTransfer
hlcoord 0, 0
lb bc, $01, $68
@@ -1013,7 +1013,7 @@ DrawMail: ; 04:5CC0
call DrawMailTextExtra
ret
-DrawMailRow: ; 04:5CFC
+DrawMailRow:
ld c, $07
call .loop
inc hl
@@ -1030,14 +1030,14 @@ DrawMailRow: ; 04:5CFC
inc hl
ld c, $05
-.loop ; 04:5D15
+.loop
ld [hli], a
inc a
dec c
jr nz, .loop
ret
-DrawMailTextExtra: ; 04:5D1B
+DrawMailTextExtra:
ld a, [de]
inc de
ld [hli], a
@@ -1045,5 +1045,5 @@ DrawMailTextExtra: ; 04:5D1B
jr nz, DrawMailTextExtra
ret
-MailTextExtra: ; 04:5D22
+MailTextExtra:
db "?!12345  67890ー円"