summaryrefslogtreecommitdiff
path: root/engine/menu.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/menu.asm')
-rwxr-xr-xengine/menu.asm34
1 files changed, 16 insertions, 18 deletions
diff --git a/engine/menu.asm b/engine/menu.asm
index 6fbed2848..802bece08 100755
--- a/engine/menu.asm
+++ b/engine/menu.asm
@@ -110,14 +110,14 @@ Mobile_GetMenuSelection: ; 24098
ret
; 240cd
-GetMenuNumberOfColumns: ; 240cd
- ld a, [wMenuData2Items]
+Get2DMenuNumberOfColumns: ; 240cd
+ ld a, [wMenuData2_2DMenuDimensions]
and $f
ret
; 240d3
-GetMenuNumberOfRows: ; 240d3
- ld a, [wMenuData2Items]
+Get2DMenuNumberOfRows: ; 240d3
+ ld a, [wMenuData2_2DMenuDimensions]
swap a
and $f
ret
@@ -130,19 +130,19 @@ Place2DMenuItemStrings: ; 240db
ld d, [hl]
call GetMenuTextStartCoord
call Coord2Tile
- call GetMenuNumberOfRows
+ call Get2DMenuNumberOfRows
ld b, a
.row
push bc
push hl
- call GetMenuNumberOfColumns
+ call Get2DMenuNumberOfColumns
ld c, a
.col
push bc
ld a, [wMenuData2_2DMenuItemStringsBank]
call Place2DMenuItemName
inc de
- ld a, [wMenuData2Spacing]
+ ld a, [wMenuData2_2DMenuSpacing]
ld c, a
ld b, 0
add hl, bc
@@ -174,9 +174,9 @@ Init2DMenuCursorPosition: ; 2411a (9:411a)
dec c
ld a, c
ld [w2DMenuCursorInitX], a
- call GetMenuNumberOfRows
+ call Get2DMenuNumberOfRows
ld [w2DMenuNumRows], a
- call GetMenuNumberOfColumns
+ call Get2DMenuNumberOfColumns
ld [w2DMenuNumCols], a
call .InitFlags_a
call .InitFlags_b
@@ -238,7 +238,7 @@ Init2DMenuCursorPosition: ; 2411a (9:411a)
; 2418a
.InitFlags_b: ; 2418a
- ld a, [wMenuData2Spacing]
+ ld a, [wMenuData2_2DMenuSpacing]
or $20
ld [w2DMenuCursorOffsets], a
ret
@@ -291,8 +291,7 @@ MobileMenuJoypad: ; 241ba
; 241d5
-Function241d5: ; 241d5
-; Unreferenced
+Unreferenced_Function241d5: ; 241d5
call Place2DMenuCursor
.loop
call Move2DMenuCursor
@@ -586,7 +585,7 @@ Place2DMenuCursor: ; 24329
_PushWindow:: ; 24374
ld a, [rSVBK]
push af
- ld a, $7
+ ld a, BANK(wWindowStack)
ld [rSVBK], a
ld hl, wWindowStackPointer
@@ -691,7 +690,7 @@ _ExitMenu:: ; 243e8
ld a, [rSVBK]
push af
- ld a, $7
+ ld a, BANK(wWindowStack)
ld [rSVBK], a
call GetWindowStackTop
@@ -725,12 +724,11 @@ _ExitMenu:: ; 243e8
ret
; 24423
-Function24423: ; 24423
-; Unreferenced
+Unreferenced_Function24423: ; 24423
ld a, [VramState]
bit 0, a
ret z
- xor a
+ xor a ; sScratch
call GetSRAMBank
hlcoord 0, 0
ld de, sScratch
@@ -738,7 +736,7 @@ Function24423: ; 24423
call CopyBytes
call CloseSRAM
call OverworldTextModeSwitch
- xor a
+ xor a ; sScratch
call GetSRAMBank
ld hl, sScratch
decoord 0, 0