diff options
author | mid-kid <esteve.varela@gmail.com> | 2018-06-24 16:09:41 +0200 |
---|---|---|
committer | mid-kid <esteve.varela@gmail.com> | 2018-06-24 16:13:22 +0200 |
commit | 1d9a68dbdd0132035f1fc7b7ea8f7fdc24741507 (patch) | |
tree | 3af0a92f5f7dc10f32eed04d9daae52749fc33c2 /home/menu.asm | |
parent | 131875d3e37044ec995287af7c93decd86a0d659 (diff) |
Remove all address comments
Diffstat (limited to 'home/menu.asm')
-rw-r--r-- | home/menu.asm | 120 |
1 files changed, 41 insertions, 79 deletions
diff --git a/home/menu.asm b/home/menu.asm index 05ec1212a..976292291 100644 --- a/home/menu.asm +++ b/home/menu.asm @@ -15,59 +15,50 @@ CopyMenuHeader:: ret ; 0x1d4b -StoreTo_wMenuCursorBuffer:: ; 1d4b +StoreTo_wMenuCursorBuffer:: ld [wMenuCursorBuffer], a ret -; 1d4f -MenuTextBox:: ; 1d4f +MenuTextBox:: push hl call LoadMenuTextBox pop hl jp PrintText -; 1d57 ; unused ret -; 1d58 -LoadMenuTextBox:: ; 1d58 +LoadMenuTextBox:: ld hl, .MenuHeader call LoadMenuHeader ret -; 1d5f -.MenuHeader: ; 1d5f +.MenuHeader: db MENU_BACKUP_TILES ; flags menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw vTiles0 db 0 ; default option -; 1d67 -MenuTextBoxBackup:: ; 1d67 +MenuTextBoxBackup:: call MenuTextBox call CloseWindow ret -; 1d6e -LoadStandardMenuHeader:: ; 1d6e +LoadStandardMenuHeader:: ld hl, .MenuHeader call LoadMenuHeader ret -; 1d75 -.MenuHeader: ; 1d75 +.MenuHeader: db MENU_BACKUP_TILES ; flags menu_coords 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw 0 db 1 ; default option -; 1d7d -Call_ExitMenu:: ; 1d7d +Call_ExitMenu:: call ExitMenu ret -; 1d81 VerticalMenu:: xor a @@ -92,15 +83,13 @@ VerticalMenu:: .okay and a ret -; 0x1dab -GetMenu2:: ; 1dab +GetMenu2:: call LoadMenuHeader call VerticalMenu call CloseWindow ld a, [wMenuCursorY] ret -; 1db8 CopyNameFromMenu:: push hl @@ -123,17 +112,17 @@ CopyNameFromMenu:: ; 0x1dcf -YesNoBox:: ; 1dcf +YesNoBox:: lb bc, SCREEN_WIDTH - 6, 7 -PlaceYesNoBox:: ; 1dd2 +PlaceYesNoBox:: jr _YesNoBox -PlaceGenericTwoOptionBox:: ; 1dd4 +PlaceGenericTwoOptionBox:: call LoadMenuHeader jr InterpretTwoOptionMenu -_YesNoBox:: ; 1dd9 +_YesNoBox:: ; Return nc (yes) or c (no). push bc ld hl, YesNoMenuHeader @@ -158,7 +147,7 @@ _YesNoBox:: ; 1dd9 ld [wMenuBorderBottomCoord], a call PushWindow -InterpretTwoOptionMenu:: ; 1dfe +InterpretTwoOptionMenu:: call VerticalMenu push af ld c, $f @@ -177,29 +166,25 @@ InterpretTwoOptionMenu:: ; 1dfe ld [wMenuCursorY], a scf ret -; 1e1d -YesNoMenuHeader:: ; 1e1d +YesNoMenuHeader:: db MENU_BACKUP_TILES ; flags menu_coords 10, 5, 15, 9 dw .MenuData db 1 ; default option -; 1e25 -.MenuData: ; 1e25 +.MenuData: db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags db 2 db "YES@" db "NO@" -; 1e2e -OffsetMenuHeader:: ; 1e2e +OffsetMenuHeader:: call _OffsetMenuHeader call PushWindow ret -; 1e35 -_OffsetMenuHeader:: ; 1e35 +_OffsetMenuHeader:: push de call CopyMenuHeader pop de @@ -222,9 +207,8 @@ _OffsetMenuHeader:: ; 1e35 add l ld [wMenuBorderBottomCoord], a ret -; 1e5d -DoNthMenu:: ; 1e5d +DoNthMenu:: call DrawVariableLengthMenuBox call MenuWriteText call InitMenuCursorAndButtonPermissions @@ -232,9 +216,8 @@ DoNthMenu:: ; 1e5d call GetMenuJoypad call MenuClickSound ret -; 1e70 -SetUpMenu:: ; 1e70 +SetUpMenu:: call DrawVariableLengthMenuBox ; ??? call MenuWriteText call InitMenuCursorAndButtonPermissions ; set up selection pointer @@ -265,7 +248,7 @@ MenuWriteText:: ret ; 0x1ea6 -AutomaticGetMenuBottomCoord:: ; 1ea6 +AutomaticGetMenuBottomCoord:: ld a, [wMenuBorderLeftCoord] ld c, a ld a, [wMenuBorderRightCoord] @@ -279,9 +262,8 @@ AutomaticGetMenuBottomCoord:: ; 1ea6 add b ld [wMenuBorderBottomCoord], a ret -; 1ebd -GetMenuIndexSet:: ; 1ebd +GetMenuIndexSet:: ld hl, wMenuDataIndicesPointer ld a, [hli] ld h, [hl] @@ -304,9 +286,8 @@ GetMenuIndexSet:: ; 1ebd ld a, [hl] ld [wMenuDataItems], a ret -; 1eda -RunMenuItemPrintingFunction:: ; 1eda +RunMenuItemPrintingFunction:: call MenuBoxCoord2Tile ld bc, 2 * SCREEN_WIDTH + 2 add hl, bc @@ -327,16 +308,14 @@ RunMenuItemPrintingFunction:: ; 1eda add hl, de pop de jr .loop -; 1efb -._hl_ ; 1efb +._hl_ ld a, [hli] ld h, [hl] ld l, a jp hl -; 1eff -InitMenuCursorAndButtonPermissions:: ; 1eff +InitMenuCursorAndButtonPermissions:: call InitVerticalMenuCursor ld hl, wMenuJoypadFilter ld a, [wMenuDataFlags] @@ -353,21 +332,18 @@ InitMenuCursorAndButtonPermissions:: ; 1eff .disallow_left_right ret -; 1f1a -GetScrollingMenuJoypad:: ; 1f1a +GetScrollingMenuJoypad:: call ScrollingMenuJoypad ld hl, wMenuJoypadFilter and [hl] jr ContinueGettingMenuJoypad -; 1f23 -GetStaticMenuJoypad:: ; 1f23 +GetStaticMenuJoypad:: xor a ld [wMenuJoypad], a call StaticMenuJoypad -; 1f2a ContinueGettingMenuJoypad: bit A_BUTTON_F, a @@ -418,9 +394,8 @@ ContinueGettingMenuJoypad: ld [wMenuSelection], a scf ret -; 1f79 -PlaceMenuStrings:: ; 1f79 +PlaceMenuStrings:: push de ld hl, wMenuDataPointerTableAddr ld a, [hli] @@ -433,9 +408,8 @@ PlaceMenuStrings:: ; 1f79 pop hl call PlaceString ret -; 1f8d -PlaceNthMenuStrings:: ; 1f8d +PlaceNthMenuStrings:: push de ld a, [wMenuSelection] call GetMenuDataPointerTableEntry @@ -447,9 +421,8 @@ PlaceNthMenuStrings:: ; 1f8d pop hl call PlaceString ret -; 1f9e -Unreferenced_Function1f9e:: ; 1f9e +Unreferenced_Function1f9e:: call GetMenuDataPointerTableEntry inc hl inc hl @@ -457,18 +430,16 @@ Unreferenced_Function1f9e:: ; 1f9e ld d, [hl] ld e, a ret -; 1fa7 -MenuJumptable:: ; 1fa7 +MenuJumptable:: ld a, [wMenuSelection] call GetMenuDataPointerTableEntry ld a, [hli] ld h, [hl] ld l, a jp hl -; 1fb1 -GetMenuDataPointerTableEntry:: ; 1fb1 +GetMenuDataPointerTableEntry:: ld e, a ld d, $0 ld hl, wMenuDataPointerTableAddr @@ -480,9 +451,8 @@ GetMenuDataPointerTableEntry:: ; 1fb1 add hl, de add hl, de ret -; 1fbf -ClearWindowData:: ; 1fbf +ClearWindowData:: ld hl, wWindowStackPointer call .bytefill ld hl, wMenuHeader @@ -509,16 +479,14 @@ ClearWindowData:: ; 1fbf pop af ld [rSVBK], a ret -; 1ff0 -.bytefill ; 1ff0 +.bytefill ld bc, $10 xor a call ByteFill ret -; 1ff8 -MenuClickSound:: ; 1ff8 +MenuClickSound:: push af and A_BUTTON | B_BUTTON jr z, .nosound @@ -529,10 +497,9 @@ MenuClickSound:: ; 1ff8 .nosound pop af ret -; 2009 -PlayClickSFX:: ; 2009 +PlayClickSFX:: push de ld de, SFX_READ_TEXT_2 call PlaySFX @@ -540,14 +507,13 @@ PlayClickSFX:: ; 2009 ret ; 0x2012 -MenuTextBoxWaitButton:: ; 2012 +MenuTextBoxWaitButton:: call MenuTextBox call WaitButton call ExitMenu ret -; 201c -Place2DMenuItemName:: ; 201c +Place2DMenuItemName:: ld [hBuffer], a ld a, [hROMBank] push af @@ -559,28 +525,24 @@ Place2DMenuItemName:: ; 201c rst Bankswitch ret -; 202a -_2DMenu:: ; 202a +_2DMenu:: ld a, [hROMBank] ld [wMenuData_2DMenuItemStringsBank], a farcall _2DMenu_ ld a, [wMenuCursorBuffer] ret -; 2039 -InterpretBattleMenu:: ; 2039 +InterpretBattleMenu:: ld a, [hROMBank] ld [wMenuData_2DMenuItemStringsBank], a farcall _InterpretBattleMenu ld a, [wMenuCursorBuffer] ret -; 2048 -InterpretMobileMenu:: ; 2048 +InterpretMobileMenu:: ld a, [hROMBank] ld [wMenuData_2DMenuItemStringsBank], a farcall _InterpretMobileMenu ld a, [wMenuCursorBuffer] ret -; 2057 |