Mon submenu, engine/menu.asm

This commit is contained in:
PikalaxALT 2015-11-04 14:02:11 -05:00
parent 94c720832a
commit cf5d726b7f
27 changed files with 1057 additions and 1018 deletions

View File

@ -2860,13 +2860,13 @@ Function3d1f8: ; 3d1f8
.asm_3d20a .asm_3d20a
lb bc, 1, 7 lb bc, 1, 7
call PlaceYesNoBox call PlaceYesNoBox
ld a, [wcfa9] ld a, [MenuSelection2]
jr c, .asm_3d217 jr c, .asm_3d217
and a and a
ret ret
.asm_3d217 .asm_3d217
ld a, [wcfa9] ld a, [MenuSelection2]
cp $1 cp $1
jr z, .asm_3d20a jr z, .asm_3d20a
ld hl, PartyMon1Speed ld hl, PartyMon1Speed
@ -3684,7 +3684,7 @@ Function3d74b: ; 3d74b
call StdBattleTextBox call StdBattleTextBox
lb bc, 1, 7 lb bc, 1, 7
call PlaceYesNoBox call PlaceYesNoBox
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
jr nz, .asm_3d79a jr nz, .asm_3d79a
call Function3d2f7 call Function3d2f7
@ -5288,7 +5288,7 @@ Function3e234: ; 3e234
.asm_3e25d .asm_3e25d
call Function3f47c call Function3f47c
ld a, $1 ld a, $1
ld [wcfa9], a ld [MenuSelection2], a
call ExitMenu call ExitMenu
call Function3df2c call Function3df2c
call WaitBGMap call WaitBGMap
@ -5328,7 +5328,7 @@ Function3e299:
call Function3e2f5 call Function3e2f5
jr c, .asm_3e2c8 jr c, .asm_3e2c8
call Function1bee call Function1bee
ld a, [wcfa9] ld a, [MenuSelection2]
cp $1 cp $1
jp z, Function3e358 jp z, Function3e358
cp $2 cp $2
@ -5533,7 +5533,7 @@ BattleMonEntrance: ; 3e40b
call SetPlayerTurn call SetPlayerTurn
call SpikesDamage call SpikesDamage
ld a, $2 ld a, $2
ld [wcfa9], a ld [MenuSelection2], a
ret ret
; 3e459 ; 3e459
@ -5563,7 +5563,7 @@ PassedBattleMonEntrance: ; 3e459
BattleMenu_Run: ; 3e489 BattleMenu_Run: ; 3e489
call Call_LoadTempTileMapToTileMap call Call_LoadTempTileMapToTileMap
ld a, $3 ld a, $3
ld [wcfa9], a ld [MenuSelection2], a
ld hl, BattleMonSpeed ld hl, BattleMonSpeed
ld de, EnemyMonSpeed ld de, EnemyMonSpeed
call TryToRunAwayFromBattle call TryToRunAwayFromBattle
@ -5659,7 +5659,7 @@ MoveSelectionScreen: ; 3e4bc
inc a inc a
.asm_3e53e .asm_3e53e
ld [wcfa9], a ld [MenuSelection2], a
ld a, $1 ld a, $1
ld [wcfaa], a ld [wcfaa], a
ld a, [wd0eb] ld a, [wd0eb]
@ -5726,9 +5726,9 @@ MoveSelectionScreen: ; 3e4bc
xor a xor a
ld [wd0e3], a ld [wd0e3], a
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
ld [wcfa9], a ld [MenuSelection2], a
ld b, a ld b, a
ld a, [wd235] ld a, [wd235]
dec a dec a
@ -5751,7 +5751,7 @@ MoveSelectionScreen: ; 3e4bc
ret nz ret nz
ld hl, BattleMonPP ld hl, BattleMonPP
ld a, [wcfa9] ld a, [MenuSelection2]
ld c, a ld c, a
ld b, 0 ld b, 0
add hl, bc add hl, bc
@ -5767,7 +5767,7 @@ MoveSelectionScreen: ; 3e4bc
ld a, [wc6e1] ld a, [wc6e1]
and a and a
jr nz, .asm_3e606 jr nz, .asm_3e606
ld a, [wcfa9] ld a, [MenuSelection2]
ld hl, BattleMonMoves ld hl, BattleMonMoves
ld c, a ld c, a
ld b, 0 ld b, 0
@ -5797,17 +5797,17 @@ MoveSelectionScreen: ; 3e4bc
; 3e61d ; 3e61d
.asm_3e61d .asm_3e61d
ld a, [wcfa9] ld a, [MenuSelection2]
and a and a
jp nz, .asm_3e57a jp nz, .asm_3e57a
ld a, [wd0eb] ld a, [wd0eb]
inc a inc a
ld [wcfa9], a ld [MenuSelection2], a
jp .asm_3e57a jp .asm_3e57a
; 3e62e ; 3e62e
.asm_3e62e ; 3e62e .asm_3e62e ; 3e62e
ld a, [wcfa9] ld a, [MenuSelection2]
ld b, a ld b, a
ld a, [wd0eb] ld a, [wd0eb]
rept 2 rept 2
@ -5816,7 +5816,7 @@ endr
cp b cp b
jp nz, .asm_3e57a jp nz, .asm_3e57a
ld a, $1 ld a, $1
ld [wcfa9], a ld [MenuSelection2], a
jp .asm_3e57a jp .asm_3e57a
; 3e643 ; 3e643
@ -5833,7 +5833,7 @@ endr
swap a swap a
and $f and $f
ld b, a ld b, a
ld a, [wcfa9] ld a, [MenuSelection2]
cp b cp b
jr nz, .asm_3e671 jr nz, .asm_3e671
ld a, [hl] ld a, [hl]
@ -5852,7 +5852,7 @@ endr
ld a, [hl] ld a, [hl]
and $f and $f
ld b, a ld b, a
ld a, [wcfa9] ld a, [MenuSelection2]
swap a swap a
add b add b
ld [hl], a ld [hl], a
@ -5886,7 +5886,7 @@ endr
ld d, h ld d, h
ld e, l ld e, l
pop hl pop hl
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
ld c, a ld c, a
ld b, 0 ld b, 0
@ -5899,7 +5899,7 @@ endr
ret ret
.asm_3e6bf .asm_3e6bf
ld a, [wcfa9] ld a, [MenuSelection2]
ld [wd0e3], a ld [wd0e3], a
jp MoveSelectionScreen jp MoveSelectionScreen
; 3e6c8 ; 3e6c8
@ -5921,7 +5921,7 @@ MoveInfoBox: ; 3e6c8
swap a swap a
and $f and $f
ld b, a ld b, a
ld a, [wcfa9] ld a, [MenuSelection2]
cp b cp b
jr nz, .asm_3e6f4 jr nz, .asm_3e6f4
@ -5931,11 +5931,11 @@ MoveInfoBox: ; 3e6c8
jr .done jr .done
.asm_3e6f4 .asm_3e6f4
ld hl, wcfa9 ld hl, MenuSelection2
dec [hl] dec [hl]
call SetPlayerTurn call SetPlayerTurn
ld hl, BattleMonMoves ld hl, BattleMonMoves
ld a, [wcfa9] ld a, [MenuSelection2]
ld c, a ld c, a
ld b, 0 ld b, 0
add hl, bc add hl, bc
@ -5948,7 +5948,7 @@ MoveInfoBox: ; 3e6c8
ld [MonType], a ld [MonType], a
callab Functionf8ec callab Functionf8ec
ld hl, wcfa9 ld hl, MenuSelection2
ld c, [hl] ld c, [hl]
inc [hl] inc [hl]
ld b, 0 ld b, 0
@ -7250,9 +7250,9 @@ Function3edad: ; 3edad
ld hl, VTiles2 tile $73 ld hl, VTiles2 tile $73
lb bc, BANK(GFX_f8ae0), 6 lb bc, BANK(GFX_f8ae0), 6
call Get1bpp call Get1bpp
ld de, GFX_f8b10 ld de, ExpBarGFX
ld hl, VTiles2 tile $55 ld hl, VTiles2 tile $55
lb bc, BANK(GFX_f8b10), 8 lb bc, BANK(ExpBarGFX), 8
jp Get2bpp jp Get2bpp
; 3edd1 ; 3edd1

View File

@ -7,6 +7,7 @@ MAX_PC_ITEMS EQU 50
; strings ; strings
PLAYER_NAME_LENGTH EQU 8 PLAYER_NAME_LENGTH EQU 8
BOX_NAME_LENGTH EQU 9
PKMN_NAME_LENGTH EQU 11 PKMN_NAME_LENGTH EQU 11
MOVE_NAME_LENGTH EQU 13 MOVE_NAME_LENGTH EQU 13
ITEM_NAME_LENGTH EQU 13 ITEM_NAME_LENGTH EQU 13
@ -161,3 +162,5 @@ const_value = 1
HMENURETURN_SCRIPT EQU %10000000 HMENURETURN_SCRIPT EQU %10000000
HMENURETURN_ASM EQU %11111111 HMENURETURN_ASM EQU %11111111
NUM_MON_SUBMENU_ITEMS EQU 8

View File

@ -292,3 +292,30 @@ MON_SDF EQUS "PartyMon1SpclDef - PartyMon1"
BOXMON_STRUCT_LENGTH EQUS "PartyMon1End - PartyMon1" BOXMON_STRUCT_LENGTH EQUS "PartyMon1End - PartyMon1"
PARTYMON_STRUCT_LENGTH EQUS "PartyMon1StatsEnd - PartyMon1" PARTYMON_STRUCT_LENGTH EQUS "PartyMon1StatsEnd - PartyMon1"
SCRATCHMON_STRUCT_LENGTH EQUS "PartyMon1StatsEnd - PartyMon1Item" SCRATCHMON_STRUCT_LENGTH EQUS "PartyMon1StatsEnd - PartyMon1Item"
const_value SET 1
const MONMENU_CUT ; 1
const MONMENU_FLY ; 2
const MONMENU_SURF ; 3
const MONMENU_STRENGTH ; 4
const MONMENU_WATERFALL ; 5
const MONMENU_FLASH ; 6
const MONMENU_WHIRLPOOL ; 7
const MONMENU_DIG ; 8
const MONMENU_TELEPORT ; 9
const MONMENU_SOFTBOILED ; 10
const MONMENU_HEADBUTT ; 11
const MONMENU_ROCKSMASH ; 12
const MONMENU_MILKDRINK ; 13
const MONMENU_SWEETSCENT ; 14
const MONMENU_STATS ; 15
const MONMENU_SWITCH ; 16
const MONMENU_ITEM ; 17
const MONMENU_CANCEL ; 18
const MONMENU_MOVE ; 19
const MONMENU_MAIL ; 20
const MONMENU_ERROR ; 21
MONMENU_FIELD_MOVE EQU 0
MONMENU_MENUOPTION EQU 1

587
engine/menu.asm Executable file
View File

@ -0,0 +1,587 @@
Function2400e:: ; 2400e
ld hl, Function1c66
ld a, [wcf94]
rst FarCall
call Function24085
call UpdateSprites
call Function321c
call Function2408f
ret
; 24022
Function24022:: ; 24022
ld hl, Function1c66
ld a, [wcf94]
rst FarCall
call Function24085
callba MobileTextBorder
call UpdateSprites
call Function321c
call Function2408f
ret
; 2403c
Function2403c:: ; 2403c
ld hl, Function1c66
ld a, [wcf94]
rst FarCall
call Function24085
callba MobileTextBorder
call UpdateSprites
call Function321c
call Function2411a
ld hl, wcfa5
set 7, [hl]
.asm_2405a
call DelayFrame
callba Function10032e
ld a, [wcd2b]
and a
jr nz, .asm_24076
call Function241ba
ld a, [wcfa8]
and c
jr z, .asm_2405a
call Function24098
ret
.asm_24076
ld a, [wcfa4]
ld c, a
ld a, [wcfa3]
call SimpleMultiply
ld [wMenuCursorBuffer], a
and a
ret
; 24085
Function24085: ; 24085
xor a
ld [hBGMapMode], a
call MenuBox
call Function240db
ret
; 2408f
Function2408f: ; 2408f
call Function2411a
call Function1bc9
call Function1ff8
Function24098: ; 24098
ld a, [wMenuData2Flags]
bit 1, a
jr z, .asm_240a6
call Function1bdd
bit 2, a
jr nz, .asm_240c9
.asm_240a6
ld a, [wMenuData2Flags]
bit 0, a
jr nz, .asm_240b4
call Function1bdd
bit 1, a
jr nz, .asm_240cb
.asm_240b4
ld a, [wcfa4]
ld c, a
ld a, [MenuSelection2]
dec a
call SimpleMultiply
ld c, a
ld a, [wcfaa]
add c
ld [wMenuCursorBuffer], a
and a
ret
.asm_240c9
scf
ret
.asm_240cb
scf
ret
; 240cd
Function240cd: ; 240cd
ld a, [wMenuData2Items]
and $f
ret
; 240d3
Function240d3: ; 240d3
ld a, [wMenuData2Items]
swap a
and $f
ret
; 240db
Function240db: ; 240db
ld hl, wcf95
ld e, [hl]
inc hl
ld d, [hl]
call Function1cc6
call GetTileCoord
call Function240d3
ld b, a
.asm_240eb
push bc
push hl
call Function240cd
ld c, a
.asm_240f1
push bc
ld a, [wcf94]
call Function201c
inc de
ld a, [wcf93]
ld c, a
ld b, $0
add hl, bc
pop bc
dec c
jr nz, .asm_240f1
pop hl
ld bc, $28
add hl, bc
pop bc
dec b
jr nz, .asm_240eb
ld hl, wcf98
ld a, [hli]
ld h, [hl]
ld l, a
or h
ret z
ld a, [wcf97]
rst FarCall
ret
; 2411a
Function2411a: ; 2411a (9:411a)
call Function1cc6
ld a, b
ld [wcfa1], a
dec c
ld a, c
ld [wcfa2], a
call Function240d3
ld [wcfa3], a
call Function240cd
ld [wcfa4], a
call Function24179
call Function2418a
call Function24193
ld a, [wcfa4]
ld e, a
ld a, [wMenuCursorBuffer]
ld b, a
xor a
ld d, $0
.asm_24146
inc d
add e
cp b
jr c, .asm_24146
sub e
ld c, a
ld a, b
sub c
and a
jr z, .asm_24157
cp e
jr z, .asm_24159
jr c, .asm_24159
.asm_24157
ld a, $1
.asm_24159
ld [wcfaa], a
ld a, [wcfa3]
ld e, a
ld a, d
and a
jr z, .asm_24169
cp e
jr z, .asm_2416b
jr c, .asm_2416b
.asm_24169
ld a, $1
.asm_2416b
ld [MenuSelection2], a
xor a
ld [wcfab], a
ld [wcfac], a
ld [wcfad], a
ret
; 24179
Function24179: ; 24179
xor a
ld hl, wcfa5
ld [hli], a
ld [hld], a
ld a, [wMenuData2Flags]
bit 5, a
ret z
set 5, [hl]
set 4, [hl]
ret
; 2418a
Function2418a: ; 2418a
ld a, [wcf93]
or $20
ld [wcfa7], a
ret
; 24193
Function24193: ; 24193
ld hl, wMenuData2Flags
ld a, $1
bit 0, [hl]
jr nz, .asm_2419e
or $2
.asm_2419e
bit 1, [hl]
jr z, .asm_241a4
or $4
.asm_241a4
ld [wcfa8], a
ret
; 241a8
Function241a8:: ; 241a8
call Function24329
Function241ab:: ; 241ab
ld hl, wcfa6
res 7, [hl]
ld a, [hBGMapMode]
push af
call Function24216
pop af
ld [hBGMapMode], a
ret
; 241ba
Function241ba: ; 241ba
ld hl, wcfa6
res 7, [hl]
ld a, [hBGMapMode]
push af
call Function2431a
call Function24249
jr nc, .asm_241cd
call Function24270
.asm_241cd
pop af
ld [hBGMapMode], a
call Function1bdd
ld c, a
ret
; 241d5
Function241d5: ; 241d5
call Function24329
.loop
call Function2431a
call Function10402d ; BUG: This function is in another bank.
; Pointer in current bank (9) is bogus.
call Function241fa
jr nc, .done
call Function24270
jr c, .done
ld a, [wcfa5]
bit 7, a
jr nz, .done
call Function1bdd
ld c, a
ld a, [wcfa8]
and c
jr z, .loop
.done
ret
; 241fa
Function241fa: ; 241fa
.loop
call Function24259
ret c
ld c, 1
ld b, 3
call Function10062d ; BUG: This function is in another bank.
; Pointer in current bank (9) is bogus.
ret c
callba Function100337
ret c
ld a, [wcfa5]
bit 7, a
jr z, .loop
and a
ret
; 24216
Function24216: ; 24216
.asm_24216
call Function2431a
call Function24238
call Function24249
jr nc, .asm_24237
call Function24270
jr c, .asm_24237
ld a, [wcfa5]
bit 7, a
jr nz, .asm_24237
call Function1bdd
ld b, a
ld a, [wcfa8]
and b
jr z, .asm_24216
.asm_24237
ret
; 24238
Function24238: ; 24238
ld a, [hOAMUpdate]
push af
ld a, $1
ld [hOAMUpdate], a
call WaitBGMap
pop af
ld [hOAMUpdate], a
xor a
ld [hBGMapMode], a
ret
; 24249
Function24249: ; 24249
.asm_24249
call RTC
call Function24259
ret c
ld a, [wcfa5]
bit 7, a
jr z, .asm_24249
and a
ret
; 24259
Function24259: ; 24259
ld a, [wcfa5]
bit 6, a
jr z, .asm_24266
callab Function8cf62
.asm_24266
call JoyTextDelay
call Function1bdd
and a
ret z
scf
ret
; 24270
Function24270: ; 24270
call Function1bdd
bit 0, a
jp nz, Function24318
bit 1, a
jp nz, Function24318
bit 2, a
jp nz, Function24318
bit 3, a
jp nz, Function24318
bit 4, a
jr nz, .asm_242fa
bit 5, a
jr nz, .asm_242dc
bit 6, a
jr nz, .asm_242be
bit 7, a
jr nz, .asm_242a0
and a
ret
.asm_24299: ; 24299
ld hl, wcfa6
set 7, [hl]
scf
ret
.asm_242a0
ld hl, MenuSelection2
ld a, [wcfa3]
cp [hl]
jr z, .asm_242ac
inc [hl]
xor a
ret
.asm_242ac
ld a, [wcfa5]
bit 5, a
jr nz, .asm_242ba
bit 3, a
jp nz, .asm_24299
xor a
ret
.asm_242ba
ld [hl], $1
xor a
ret
.asm_242be
ld hl, MenuSelection2
ld a, [hl]
dec a
jr z, .asm_242c8
ld [hl], a
xor a
ret
.asm_242c8
ld a, [wcfa5]
bit 5, a
jr nz, .asm_242d6
bit 2, a
jp nz, .asm_24299
xor a
ret
.asm_242d6
ld a, [wcfa3]
ld [hl], a
xor a
ret
.asm_242dc
ld hl, wcfaa
ld a, [hl]
dec a
jr z, .asm_242e6
ld [hl], a
xor a
ret
.asm_242e6
ld a, [wcfa5]
bit 4, a
jr nz, .asm_242f4
bit 1, a
jp nz, .asm_24299
xor a
ret
.asm_242f4
ld a, [wcfa4]
ld [hl], a
xor a
ret
.asm_242fa
ld hl, wcfaa
ld a, [wcfa4]
cp [hl]
jr z, .asm_24306
inc [hl]
xor a
ret
.asm_24306
ld a, [wcfa5]
bit 4, a
jr nz, .asm_24314
bit 0, a
jp nz, .asm_24299
xor a
ret
.asm_24314
ld [hl], $1
xor a
ret
; 24318
Function24318: ; 24318
xor a
ret
; 2431a
Function2431a: ; 2431a
ld hl, wcfac
ld a, [hli]
ld h, [hl]
ld l, a
ld a, [hl]
cp $ed
jr nz, Function24329
ld a, [wcfab]
ld [hl], a
Function24329: ; 24329
ld a, [wcfa1]
ld b, a
ld a, [wcfa2]
ld c, a
call GetTileCoord
ld a, [wcfa7]
swap a
and $f
ld c, a
ld a, [MenuSelection2]
ld b, a
xor a
dec b
jr z, .asm_24348
.asm_24344
add c
dec b
jr nz, .asm_24344
.asm_24348
ld c, $14
call AddNTimes
ld a, [wcfa7]
and $f
ld c, a
ld a, [wcfaa]
ld b, a
xor a
dec b
jr z, .asm_2435f
.asm_2435b
add c
dec b
jr nz, .asm_2435b
.asm_2435f
ld c, a
add hl, bc
ld a, [hl]
cp $ed
jr z, .asm_2436b
ld [wcfab], a
ld [hl], $ed
.asm_2436b
ld a, l
ld [wcfac], a
ld a, h
ld [wcfad], a
ret
; 24374

View File

@ -70,7 +70,7 @@ Function10067: ; 10067 (4:4067)
call Function350c call Function350c
ld a, [wd0e4] ld a, [wd0e4]
ld [wd0df], a ld [wd0df], a
ld a, [wcfa9] ld a, [MenuSelection2]
ld [wItemsPocketCursor], a ld [wItemsPocketCursor], a
ld b, $7 ld b, $7
ld c, $3 ld c, $3
@ -98,7 +98,7 @@ Function100a6: ; 100a6 (4:40a6)
call Function350c call Function350c
ld a, [wd0e4] ld a, [wd0e4]
ld [wd0e0], a ld [wd0e0], a
ld a, [wcfa9] ld a, [MenuSelection2]
ld [wKeyItemsPocketCursor], a ld [wKeyItemsPocketCursor], a
ld b, $3 ld b, $3
ld c, $7 ld c, $7
@ -141,7 +141,7 @@ Function100e8: ; 100e8 (4:40e8)
call ExitMenu call ExitMenu
pop hl pop hl
ret c ret c
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
call Function1086b call Function1086b
jp [hl] jp [hl]
@ -228,7 +228,7 @@ Function10198: ; 10198 (4:4198)
call Function350c call Function350c
ld a, [wd0e4] ld a, [wd0e4]
ld [wd0e1], a ld [wd0e1], a
ld a, [wcfa9] ld a, [MenuSelection2]
ld [wBallsPocketCursor], a ld [wBallsPocketCursor], a
ld b, $1 ld b, $1
ld c, $5 ld c, $5
@ -301,7 +301,7 @@ Function101c5: ; 101c5 (4:41c5)
call ExitMenu call ExitMenu
pop hl pop hl
ret c ret c
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
call Function1086b call Function1086b
jp [hl] jp [hl]
@ -728,7 +728,7 @@ Function104fa: ; 104fa (4:44fa)
call Function350c call Function350c
ld a, [wd0e4] ld a, [wd0e4]
ld [wd0df], a ld [wd0df], a
ld a, [wcfa9] ld a, [MenuSelection2]
ld [wItemsPocketCursor], a ld [wItemsPocketCursor], a
ld b, $7 ld b, $7
ld c, $3 ld c, $3
@ -756,7 +756,7 @@ Function10539: ; 10539 (4:4539)
call Function350c call Function350c
ld a, [wd0e4] ld a, [wd0e4]
ld [wd0e0], a ld [wd0e0], a
ld a, [wcfa9] ld a, [MenuSelection2]
ld [wKeyItemsPocketCursor], a ld [wKeyItemsPocketCursor], a
ld b, $3 ld b, $3
ld c, $7 ld c, $7
@ -807,7 +807,7 @@ Function105a6: ; 105a6 (4:45a6)
call Function350c call Function350c
ld a, [wd0e4] ld a, [wd0e4]
ld [wd0e1], a ld [wd0e1], a
ld a, [wcfa9] ld a, [MenuSelection2]
ld [wBallsPocketCursor], a ld [wBallsPocketCursor], a
ld b, $1 ld b, $1
ld c, $5 ld c, $5
@ -836,7 +836,7 @@ Function105dc: ; 105dc (4:45dc)
call ExitMenu call ExitMenu
pop hl pop hl
ret c ret c
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
call Function1086b call Function1086b
jp [hl] jp [hl]
@ -1013,7 +1013,7 @@ Jumptable_106d1: ; 106d1 (4:46d1)
call Function350c call Function350c
ld a, [wd0e4] ld a, [wd0e4]
ld [wd0df], a ld [wd0df], a
ld a, [wcfa9] ld a, [MenuSelection2]
ld [wItemsPocketCursor], a ld [wItemsPocketCursor], a
ret ret
@ -1029,7 +1029,7 @@ Jumptable_106d1: ; 106d1 (4:46d1)
call Function350c call Function350c
ld a, [wd0e4] ld a, [wd0e4]
ld [wd0e0], a ld [wd0e0], a
ld a, [wcfa9] ld a, [MenuSelection2]
ld [wKeyItemsPocketCursor], a ld [wKeyItemsPocketCursor], a
ret ret
@ -1054,7 +1054,7 @@ Jumptable_106d1: ; 106d1 (4:46d1)
call Function350c call Function350c
ld a, [wd0e4] ld a, [wd0e4]
ld [wd0e1], a ld [wd0e1], a
ld a, [wcfa9] ld a, [MenuSelection2]
ld [wBallsPocketCursor], a ld [wBallsPocketCursor], a
ret ret

View File

@ -212,7 +212,7 @@ SaveTheGame_yesorno: ; 14baf
call LoadMenuTextBox call LoadMenuTextBox
lb bc, 0, 7 lb bc, 0, 7
call PlaceYesNoBox call PlaceYesNoBox
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
call WriteBackup call WriteBackup
push af push af

View File

@ -515,7 +515,7 @@ Script_interpretmenu2: ; 0x96f30
ld a, [ScriptBank] ld a, [ScriptBank]
ld hl, InterpretMenu2 ld hl, InterpretMenu2
rst FarCall rst FarCall
ld a, [wcfa9] ld a, [MenuSelection2]
jr nc, .ok jr nc, .ok
xor a xor a
.ok .ok

View File

@ -201,7 +201,7 @@ Function8b09e: ; 8b09e
ld [hBGMapMode], a ld [hBGMapMode], a
ld hl, MenuDataHeader_0x8b0d1 ld hl, MenuDataHeader_0x8b0d1
call CopyMenuDataHeader call CopyMenuDataHeader
call Function1cbb call MenuBox
call UpdateSprites call UpdateSprites
call GetMemTileCoord call GetMemTileCoord
ld bc, $0015 ld bc, $0015
@ -255,7 +255,7 @@ Function8b0e2: ; 8b0e2
call Function350c call Function350c
ld a, [MenuSelection] ld a, [MenuSelection]
ld c, a ld c, a
ld a, [wcfa9] ld a, [MenuSelection2]
ld [MenuSelection], a ld [MenuSelection], a
ld a, [wcf73] ld a, [wcf73]
cp $2 cp $2

View File

@ -40,7 +40,7 @@ Special_SelectApricornForKurt: ; 88018
and a and a
jr z, .done jr z, .done
ld [CurItem], a ld [CurItem], a
ld a, [wcfa9] ld a, [MenuSelection2]
ld c, a ld c, a
push bc push bc
call Kurt_PrintTextHowMany call Kurt_PrintTextHowMany
@ -135,7 +135,7 @@ Kurt_SelectQuantity: ; 880c2
.loop .loop
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
call Function1cbb call MenuBox
call UpdateSprites call UpdateSprites
call .PlaceApricornName call .PlaceApricornName
call PlaceApricornQuantity call PlaceApricornQuantity

View File

@ -109,7 +109,7 @@ endr
call InterpretMenu2 call InterpretMenu2
call WriteBackup call WriteBackup
jr c, .cancel jr c, .cancel
ld a, [wcfa9] ld a, [MenuSelection2]
cp $1 cp $1
jr z, .withdraw jr z, .withdraw
cp $2 cp $2

View File

@ -25,7 +25,7 @@ MoveDeletion:
call Function2b74 call Function2b74
pop af pop af
jr c, .asm_2c5c3 jr c, .asm_2c5c3
ld a, [wcfa9] ld a, [MenuSelection2]
push af push af
ld a, [CurSpecies] ld a, [CurSpecies]
ld [wd265], a ld [wd265], a

View File

@ -122,7 +122,7 @@ Special_DisplayUnownWords: ; 8ae68
call LoadMenuDataHeader call LoadMenuDataHeader
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
call Function1cbb call MenuBox
call UpdateSprites call UpdateSprites
call Function321c call Function321c
call GetMemTileCoord call GetMemTileCoord

View File

@ -74,12 +74,12 @@ Call_ExitMenu:: ; 1d7d
InterpretMenu2:: InterpretMenu2::
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
call Function1cbb call MenuBox
call UpdateSprites call UpdateSprites
call Function1c89 call Function1c89
call Function321c call Function321c
call Function1c66 call Function1c66
ld a, [wcf91] ld a, [wMenuData2Flags]
bit 7, a bit 7, a
jr z, .cancel jr z, .cancel
call Function1c10 call Function1c10
@ -99,7 +99,7 @@ GetMenu2:: ; 1dab
call LoadMenuDataHeader call LoadMenuDataHeader
call InterpretMenu2 call InterpretMenu2
call WriteBackup call WriteBackup
ld a, [wcfa9] ld a, [MenuSelection2]
ret ret
; 1db8 ; 1db8
@ -168,7 +168,7 @@ InterpretTwoOptionMenu:: ; 1dfe
call WriteBackup call WriteBackup
pop af pop af
jr c, .no jr c, .no
ld a, [wcfa9] ld a, [MenuSelection2]
cp 2 ; no cp 2 ; no
jr z, .no jr z, .no
and a and a
@ -176,7 +176,7 @@ InterpretTwoOptionMenu:: ; 1dfe
.no .no
ld a, 2 ld a, 2
ld [wcfa9], a ld [MenuSelection2], a
scf scf
ret ret
; 1e1d ; 1e1d
@ -249,7 +249,7 @@ MenuFunc_1e7f::
call Function1c66 call Function1c66
call Function1ebd call Function1ebd
call Function1ea6 call Function1ea6
call Function1cbb call MenuBox
ret ret
MenuWriteText:: MenuWriteText::
@ -274,7 +274,7 @@ Function1ea6:: ; 1ea6
ld a, [wMenuBorderRightCoord] ld a, [wMenuBorderRightCoord]
sub c sub c
ld c, a ld c, a
ld a, [wcf92] ld a, [wMenuData2Items]
add a add a
inc a inc a
ld b, a ld b, a
@ -305,7 +305,7 @@ Function1ebd:: ; 1ebd
ld d, h ld d, h
ld e, l ld e, l
ld a, [hl] ld a, [hl]
ld [wcf92], a ld [wMenuData2Items], a
ret ret
; 1eda ; 1eda
@ -342,13 +342,13 @@ Function1efb:: ; 1efb
Function1eff:: ; 1eff Function1eff:: ; 1eff
call Function1c10 call Function1c10
ld hl, wcfa8 ld hl, wcfa8
ld a, [wcf91] ld a, [wMenuData2Flags]
bit 3, a bit 3, a
jr z, .asm_1f0e jr z, .asm_1f0e
set 3, [hl] set 3, [hl]
.asm_1f0e .asm_1f0e
ld a, [wcf91] ld a, [wMenuData2Flags]
bit 2, a bit 2, a
jr z, .asm_1f19 jr z, .asm_1f19
set 5, [hl] set 5, [hl]
@ -403,13 +403,13 @@ Function1f2a:: ; 1f2a
.asm_1f57 .asm_1f57
call Function1ebd call Function1ebd
ld a, [wcfa9] ld a, [MenuSelection2]
ld l, a ld l, a
ld h, $0 ld h, $0
add hl, de add hl, de
ld a, [hl] ld a, [hl]
ld [MenuSelection], a ld [MenuSelection], a
ld a, [wcfa9] ld a, [MenuSelection2]
ld [wMenuCursorBuffer], a ld [wMenuCursorBuffer], a
and a and a
ret ret
@ -491,7 +491,7 @@ ResetTextRelatedRAM:: ; 1fbf
call .bytefill call .bytefill
ld hl, wcf81 ld hl, wcf81
call .bytefill call .bytefill
ld hl, wcf91 ld hl, wMenuData2Flags
call .bytefill call .bytefill
ld hl, wcfa1 ld hl, wcfa1
call .bytefill call .bytefill

View File

@ -88,7 +88,7 @@ Function1c66:: ; 1c66
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
ld de, wcf91 ld de, wMenuData2Flags
ld bc, $0010 ld bc, $0010
call CopyBytes call CopyBytes
pop af pop af
@ -131,7 +131,7 @@ Function1c89:: ; 1c89
pop bc pop bc
dec b dec b
jr nz, .asm_1c9c jr nz, .asm_1c9c
ld a, [wcf91] ld a, [wMenuData2Flags]
bit 4, a bit 4, a
ret z ret z
call GetMemTileCoord call GetMemTileCoord
@ -143,7 +143,7 @@ Function1c89:: ; 1c89
jp PlaceString jp PlaceString
; 1cbb ; 1cbb
Function1cbb:: ; 1cbb MenuBox:: ; 1cbb
call GetMemTileCoord call GetMemTileCoord
call GetMenuBoxDims call GetMenuBoxDims
dec b dec b
@ -158,13 +158,13 @@ Function1cc6:: ; 1cc6
ld a, [wMenuBorderLeftCoord] ld a, [wMenuBorderLeftCoord]
ld c, a ld c, a
inc c inc c
ld a, [wcf91] ld a, [wMenuData2Flags]
bit 6, a bit 6, a
jr nz, .asm_1cd8 jr nz, .asm_1cd8
inc b inc b
.asm_1cd8 .asm_1cd8
ld a, [wcf91] ld a, [wMenuData2Flags]
bit 7, a bit 7, a
jr z, .asm_1ce0 jr z, .asm_1ce0
inc c inc c

View File

@ -2667,7 +2667,7 @@ Functionf6a7: ; f6a7
Elixer_RestorePPofAllMoves: ; f6af Elixer_RestorePPofAllMoves: ; f6af
xor a xor a
ld hl, wcfa9 ld hl, MenuSelection2
ld [hli], a ld [hli], a
ld [hl], a ld [hl], a
ld b, NUM_MOVES ld b, NUM_MOVES
@ -2686,7 +2686,7 @@ Elixer_RestorePPofAllMoves: ; f6af
inc [hl] inc [hl]
.cant_restore_pp .cant_restore_pp
ld hl, wcfa9 ld hl, MenuSelection2
inc [hl] inc [hl]
pop bc pop bc
dec b dec b
@ -3123,7 +3123,7 @@ Functionf84c: ; f84c
ld a, [wd265] ld a, [wd265]
dec a dec a
jr nz, .asm_f876 jr nz, .asm_f876
ld a, [wcfa9] ld a, [MenuSelection2]
inc a inc a
cp b cp b
jr nz, .asm_f87d jr nz, .asm_f87d
@ -3200,7 +3200,7 @@ Functionf8b9: ; f8b9
call GetPartyParamLocation call GetPartyParamLocation
pop de pop de
xor a ; PARTYMON xor a ; PARTYMON
ld [wcfa9], a ld [MenuSelection2], a
ld [MonType], a ld [MonType], a
ld c, NUM_MOVES ld c, NUM_MOVES
.loop .loop
@ -3220,7 +3220,7 @@ Functionf8b9: ; f8b9
add b add b
ld [de], a ld [de], a
inc de inc de
ld hl, wcfa9 ld hl, MenuSelection2
inc [hl] inc [hl]
pop hl pop hl
dec c dec c
@ -3313,7 +3313,7 @@ GetMthMoveOfNthPartymon: ; f963
call AddNTimes call AddNTimes
GetMthMoveOfCurrentMon: ; f969 GetMthMoveOfCurrentMon: ; f969
ld a, [wcfa9] ld a, [MenuSelection2]
ld c, a ld c, a
ld b, 0 ld b, 0
add hl, bc add hl, bc

1128
main.asm

File diff suppressed because it is too large Load Diff

View File

@ -368,7 +368,7 @@ Function11c1ca: ; 11c1ca
ld [wcd2b], a ld [wcd2b], a
ld a, $ff ld a, $ff
ld [wcd24], a ld [wcd24], a
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
call Function11c254 call Function11c254
call WhiteBGMap call WhiteBGMap
@ -1813,7 +1813,7 @@ String_11cb31: ; 11cb31
Function11cb52: ; 11cb52 (47:4b52) Function11cb52: ; 11cb52 (47:4b52)
ld hl, Unknown_11cc01 ld hl, Unknown_11cc01
ld a, [wcfa9] ld a, [MenuSelection2]
.asm_11cb58 .asm_11cb58
dec a dec a
jr z, .asm_11cb5f jr z, .asm_11cb5f
@ -1851,7 +1851,7 @@ Function11cb66: ; 11cb66 (47:4b66)
ld a, $4 ld a, $4
call GetSRAMBank call GetSRAMBank
ld hl, $a007 ld hl, $a007
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
sla a sla a
sla a sla a
@ -1874,7 +1874,7 @@ Function11cb66: ; 11cb66 (47:4b66)
ld de, Unknown_11cfc6 ld de, Unknown_11cfc6
call Function11cfce call Function11cfce
ld hl, Unknown_11cc7e ld hl, Unknown_11cc7e
ld a, [wcfa9] ld a, [MenuSelection2]
.asm_11cbba .asm_11cbba
dec a dec a
jr z, .asm_11cbc1 jr z, .asm_11cbc1

View File

@ -259,7 +259,7 @@ Function89261: ; 89261
call Function8920f call Function8920f
pop af pop af
jr c, .done jr c, .done
ld a, [wcfa9] ld a, [MenuSelection2]
cp $2 cp $2
jr z, .done jr z, .done
and a and a
@ -2222,7 +2222,7 @@ asm_89d90: ; 89d90 (22:5d90)
push hl push hl
call _hl_ call _hl_
call Function89dab call Function89dab
ld a, [wcfa9] ld a, [MenuSelection2]
push af push af
call Function891ab call Function891ab
pop af pop af
@ -2253,7 +2253,7 @@ Function89dab: ; 89dab (22:5dab)
call PlayClickSFX call PlayClickSFX
ld a, [wcfa3] ld a, [wcfa3]
ld c, a ld c, a
ld a, [wcfa9] ld a, [MenuSelection2]
cp c cp c
jr z, .asm_89dd9 jr z, .asm_89dd9
call Function1bee call Function1bee
@ -2273,7 +2273,7 @@ Function89de0: ; 89de0 (22:5de0)
.asm_89dea .asm_89dea
call Function8a31c call Function8a31c
jr z, .asm_89dfd jr z, .asm_89dfd
ld a, [wcfa9] ld a, [MenuSelection2]
ld c, a ld c, a
push bc push bc
ld hl, Jumptable_89e04 ld hl, Jumptable_89e04
@ -2782,7 +2782,7 @@ Function8a116: ; 8a116 (22:6116)
call Function8923c call Function8923c
call Function8a17b call Function8a17b
jr c, .asm_8a16b jr c, .asm_8a16b
ld a, [wcfa9] ld a, [MenuSelection2]
ld [wd030], a ld [wd030], a
dec d dec d
jr z, .asm_8a140 jr z, .asm_8a140
@ -2865,7 +2865,7 @@ Function8a1b0: ; 8a1b0
ld c, $12 ld c, $12
call TextBox call TextBox
hlcoord 1, 14 hlcoord 1, 14
ld a, [wcfa9] ld a, [MenuSelection2]
ld de, Strings_8a1cc ld de, Strings_8a1cc
dec a dec a
ld c, a ld c, a
@ -3104,7 +3104,7 @@ Function8a383: ; 8a383 (22:6383)
ret ret
Function8a3a2: ; 8a3a2 (22:63a2) Function8a3a2: ; 8a3a2 (22:63a2)
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
ld hl, DefaultFlypoint ld hl, DefaultFlypoint
ld e, a ld e, a

View File

@ -854,7 +854,7 @@ Function8b7bd: ; 8b7bd
.asm_8b824 .asm_8b824
ld c, a ld c, a
ld a, [wcfa9] ld a, [MenuSelection2]
ld [wd030], a ld [wd030], a
ld a, [wd0e4] ld a, [wd0e4]
ld [wd031], a ld [wd031], a
@ -863,7 +863,7 @@ Function8b7bd: ; 8b7bd
Function8b832: ; 8b832 Function8b832: ; 8b832
ld a, [wd0e4] ld a, [wd0e4]
ld hl, wcf92 ld hl, wMenuData2Items
sub [hl] sub [hl]
jr nc, Function8b84b jr nc, Function8b84b
xor a xor a
@ -872,7 +872,7 @@ Function8b832: ; 8b832
Function8b83e: ; 8b83e Function8b83e: ; 8b83e
ld a, [wd0e4] ld a, [wd0e4]
ld hl, wcf92 ld hl, wMenuData2Items
add [hl] add [hl]
cp $24 cp $24
jr c, Function8b84b jr c, Function8b84b
@ -880,7 +880,7 @@ Function8b83e: ; 8b83e
Function8b84b: ; 8b84b Function8b84b: ; 8b84b
ld [wd0e4], a ld [wd0e4], a
ld a, [wcfa9] ld a, [MenuSelection2]
ld [wMenuCursorBuffer], a ld [wMenuCursorBuffer], a
ret ret
; 8b855 ; 8b855

View File

@ -901,7 +901,7 @@ Function100597: ; 100597
ret z ret z
jr nc, .asm_1005a6 jr nc, .asm_1005a6
xor a xor a
ld [wcfa9], a ld [MenuSelection2], a
.asm_1005a6 .asm_1005a6
call ExitMenu call ExitMenu
@ -953,7 +953,7 @@ Function1005e1: ; 1005e1
ret z ret z
jr nc, .asm_1005f0 jr nc, .asm_1005f0
xor a xor a
ld [wcfa9], a ld [MenuSelection2], a
.asm_1005f0 .asm_1005f0
call ExitMenu call ExitMenu
ld a, [wcd26] ld a, [wcd26]
@ -1882,16 +1882,16 @@ Function100bc2: ; 100bc2
jr .asm_100bd1 jr .asm_100bd1
.asm_100bff .asm_100bff
ld a, [wcfa9] ld a, [MenuSelection2]
and a and a
jp nz, .asm_100bcb jp nz, .asm_100bcb
ld a, [wd0eb] ld a, [wd0eb]
inc a inc a
ld [wcfa9], a ld [MenuSelection2], a
jp .asm_100bcb jp .asm_100bcb
.asm_100c10 .asm_100c10
ld a, [wcfa9] ld a, [MenuSelection2]
ld b, a ld b, a
ld a, [wd0eb] ld a, [wd0eb]
rept 2 rept 2
@ -1900,11 +1900,11 @@ endr
cp b cp b
jp nz, .asm_100bcb jp nz, .asm_100bcb
ld a, $1 ld a, $1
ld [wcfa9], a ld [MenuSelection2], a
jp .asm_100bcb jp .asm_100bcb
.asm_100c25 .asm_100c25
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
ld [CurMoveNum], a ld [CurMoveNum], a
ld a, $1 ld a, $1
@ -1912,10 +1912,10 @@ endr
ret ret
.asm_100c30 .asm_100c30
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
ld [CurMoveNum], a ld [CurMoveNum], a
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
ld c, a ld c, a
ld b, 0 ld b, 0
@ -1930,7 +1930,7 @@ endr
dec a dec a
cp c cp c
jr z, .asm_100c63 jr z, .asm_100c63
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
ld c, a ld c, a
ld b, 0 ld b, 0
@ -1978,7 +1978,7 @@ Function100c98: ; 100c98
ld [wcfa3], a ld [wcfa3], a
ld a, [CurMoveNum] ld a, [CurMoveNum]
inc a inc a
ld [wcfa9], a ld [MenuSelection2], a
ret ret
; 100cad ; 100cad
@ -2007,7 +2007,7 @@ Function100cb5: ; 100cb5
ld a, [PartyCount] ld a, [PartyCount]
inc a inc a
ld b, a ld b, a
ld a, [wcfa9] ld a, [MenuSelection2]
cp b cp b
jr z, .asm_100d17 jr z, .asm_100d17
ld [wd0d8], a ld [wd0d8], a
@ -2015,7 +2015,7 @@ Function100cb5: ; 100cb5
ld b, a ld b, a
bit 1, b bit 1, b
jr nz, .asm_100d17 jr nz, .asm_100d17
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
ld [CurPartyMon], a ld [CurPartyMon], a
ld c, a ld c, a
@ -2084,7 +2084,7 @@ Function100d67: ; 100d67
call CopyMenuDataHeader call CopyMenuDataHeader
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
call Function1cbb call MenuBox
call UpdateSprites call UpdateSprites
call Function1c89 call Function1c89
call WaitBGMap call WaitBGMap
@ -4141,7 +4141,7 @@ Function101b2b: ; 101b2b
call Function1013dd call Function1013dd
ld a, $0 ld a, $0
ld [wcd26], a ld [wcd26], a
ld a, [wcfa9] ld a, [MenuSelection2]
cp $1 cp $1
jr z, .asm_101b51 jr z, .asm_101b51
ld a, $2 ld a, $2
@ -4194,7 +4194,7 @@ Function101b8f: ; 101b8f
call Function1013dd call Function1013dd
ld a, $0 ld a, $0
ld [wcd26], a ld [wcd26], a
ld a, [wcfa9] ld a, [MenuSelection2]
cp $1 cp $1
jr z, .asm_101bbc jr z, .asm_101bbc
ld a, $1 ld a, $1
@ -4238,7 +4238,7 @@ Function101be5: ; 101be5
call Function1013dd call Function1013dd
ld a, $0 ld a, $0
ld [wcd26], a ld [wcd26], a
ld a, [wcfa9] ld a, [MenuSelection2]
cp $1 cp $1
jr nz, .asm_101c0b jr nz, .asm_101c0b
ld a, $2a ld a, $2a
@ -5330,7 +5330,7 @@ Function102387: ; 102387
call Function102d9a call Function102d9a
call Function102dd3 call Function102dd3
ld a, $1 ld a, $1
ld [wcfa9], a ld [MenuSelection2], a
Function1023a1: ; 1023a1 Function1023a1: ; 1023a1
call Function102283 call Function102283
@ -5696,20 +5696,20 @@ Function1025ff: ; 1025ff
ret ret
.asm_10262e .asm_10262e
ld a, [wcfa9] ld a, [MenuSelection2]
ld b, a ld b, a
ld a, [OTPartyCount] ld a, [OTPartyCount]
cp b cp b
ret nz ret nz
call Function1bf7 call Function1bf7
ld a, [PartyCount] ld a, [PartyCount]
ld [wcfa9], a ld [MenuSelection2], a
ld a, $1d ld a, $1d
ld [wcd49], a ld [wcd49], a
ret ret
.asm_102646 .asm_102646
ld a, [wcfa9] ld a, [MenuSelection2]
cp $1 cp $1
ret nz ret nz
ld a, $23 ld a, $23
@ -5758,7 +5758,7 @@ Function10266b: ; 10266b
ret ret
.asm_10269a .asm_10269a
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
ret nz ret nz
call Function1bf7 call Function1bf7
@ -5767,7 +5767,7 @@ Function10266b: ; 10266b
ret ret
.asm_1026a8 .asm_1026a8
ld a, [wcfa9] ld a, [MenuSelection2]
ld b, a ld b, a
ld a, [PartyCount] ld a, [PartyCount]
cp b cp b
@ -5827,7 +5827,7 @@ Function1026f3: ; 1026f3
hlcoord 9, 17 hlcoord 9, 17
ld [hl], $7f ld [hl], $7f
ld a, $1 ld a, $1
ld [wcfa9], a ld [MenuSelection2], a
ld a, $1d ld a, $1d
ld [wcd49], a ld [wcd49], a
ret ret
@ -5836,7 +5836,7 @@ Function1026f3: ; 1026f3
hlcoord 9, 17 hlcoord 9, 17
ld [hl], $7f ld [hl], $7f
ld a, [OTPartyCount] ld a, [OTPartyCount]
ld [wcfa9], a ld [MenuSelection2], a
ld a, $1f ld a, $1f
ld [wcd49], a ld [wcd49], a
ret ret
@ -5947,7 +5947,7 @@ asm_1027c6:
asm_1027d1: asm_1027d1:
ld hl, wcd4b ld hl, wcd4b
set 3, [hl] set 3, [hl]
ld a, [wcfa9] ld a, [MenuSelection2]
ld [wcd4c], a ld [wcd4c], a
ld a, $7 ld a, $7
ld [wcd49], a ld [wcd49], a
@ -5978,7 +5978,7 @@ String_102804: ; 102804
; 102814 ; 102814
Function102814: ; 102814 Function102814: ; 102814
ld a, [wcfa9] ld a, [MenuSelection2]
ld [wcd52], a ld [wcd52], a
ld a, [wcd4c] ld a, [wcd4c]
dec a dec a
@ -6030,7 +6030,7 @@ Function10286f: ; 10286f
call Function1028fc call Function1028fc
ret nc ret nc
ld a, [wcd52] ld a, [wcd52]
ld [wcfa9], a ld [MenuSelection2], a
ld a, [wcd51] ld a, [wcd51]
cp $8 cp $8
jr nz, .asm_102886 jr nz, .asm_102886
@ -6062,7 +6062,7 @@ Function1028a5: ; 1028a5
Function1028ab: ; 1028ab Function1028ab: ; 1028ab
ld a, [wcd52] ld a, [wcd52]
ld [wcfa9], a ld [MenuSelection2], a
call Function102f15 call Function102f15
ld hl, wcd4b ld hl, wcd4b
set 1, [hl] set 1, [hl]
@ -6288,7 +6288,7 @@ Function1029fe: ; 1029fe
push af push af
call ExitMenu call ExitMenu
pop af pop af
ld a, [wcfa9] ld a, [MenuSelection2]
cp $1 cp $1
jr nz, .asm_102a21 jr nz, .asm_102a21
ld a, $1 ld a, $1
@ -6439,12 +6439,12 @@ Function102b32: ; 102b32
Function102b4e: ; 102b4e Function102b4e: ; 102b4e
ld a, $1 ld a, $1
ld [MonType], a ld [MonType], a
ld a, [wcfa9] ld a, [MenuSelection2]
push af push af
ld de, Unknown_102b73 ld de, Unknown_102b73
call Function1bb1 call Function1bb1
pop af pop af
ld [wcfa9], a ld [MenuSelection2], a
ld a, [OTPartyCount] ld a, [OTPartyCount]
ld [wcfa3], a ld [wcfa3], a
ret ret
@ -6464,12 +6464,12 @@ Unknown_102b73:
Function102b7b: ; 102b7b Function102b7b: ; 102b7b
xor a xor a
ld [MonType], a ld [MonType], a
ld a, [wcfa9] ld a, [MenuSelection2]
push af push af
ld de, Unknown_102b94 ld de, Unknown_102b94
call Function1bb1 call Function1bb1
pop af pop af
ld [wcfa9], a ld [MenuSelection2], a
ld a, [PartyCount] ld a, [PartyCount]
ld [wcfa3], a ld [wcfa3], a
ret ret
@ -6489,7 +6489,7 @@ Function102b9c: ; 102b9c
; 102bac ; 102bac
Function102bac: ; 102bac Function102bac: ; 102bac
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
ld [CurPartyMon], a ld [CurPartyMon], a
call LowVolume call LowVolume
@ -6497,7 +6497,7 @@ Function102bac: ; 102bac
callba Function4dc8f callba Function4dc8f
ld a, [CurPartyMon] ld a, [CurPartyMon]
inc a inc a
ld [wcfa9], a ld [MenuSelection2], a
call Function102d9a call Function102d9a
call ClearPalettes call ClearPalettes
call DelayFrame call DelayFrame
@ -7695,7 +7695,7 @@ Function103612: ; 103612
call InterpretMenu2 call InterpretMenu2
call WriteBackup call WriteBackup
jr c, .asm_10363b jr c, .asm_10363b
ld a, [wcfa9] ld a, [MenuSelection2]
ld [ScriptVar], a ld [ScriptVar], a
ld c, a ld c, a
ld a, [wdc40] ld a, [wdc40]
@ -7783,7 +7783,7 @@ Mobile_SelectThreeMons: ; 10366e
call InterpretMenu2 call InterpretMenu2
call ExitMenu call ExitMenu
jr c, .asm_1036f4 jr c, .asm_1036f4
ld a, [wcfa9] ld a, [MenuSelection2]
cp $1 cp $1
jr z, .asm_1036d9 jr z, .asm_1036d9
cp $2 cp $2

View File

@ -7972,11 +7972,11 @@ Function11784c: ; 11784c (45:784c)
Function1178aa: ; 1178aa (45:78aa) Function1178aa: ; 1178aa (45:78aa)
ld hl, MenuDataHeader_1179b5 ld hl, MenuDataHeader_1179b5
call LoadMenuDataHeader call LoadMenuDataHeader
call Function1cbb call MenuBox
call GetMemTileCoord call GetMemTileCoord
ld hl, MenuDataHeader_1179bd ld hl, MenuDataHeader_1179bd
call LoadMenuDataHeader call LoadMenuDataHeader
call Function1cbb call MenuBox
call GetMemTileCoord call GetMemTileCoord
callba Function104061 callba Function104061
hlcoord 16, 8 hlcoord 16, 8
@ -8075,7 +8075,7 @@ asm_11797e: ; 11797e (45:797e)
Function117984: ; 117984 (45:7984) Function117984: ; 117984 (45:7984)
ld hl, MenuDataHeader_1179b5 ld hl, MenuDataHeader_1179b5
call LoadMenuDataHeader call LoadMenuDataHeader
call Function1cbb call MenuBox
call GetMemTileCoord call GetMemTileCoord
callba Function104061 callba Function104061
hlcoord 1, 14 hlcoord 1, 14
@ -8235,7 +8235,7 @@ Function117b14:
ret nz ret nz
ld hl, Data117cbc ld hl, Data117cbc
call LoadMenuDataHeader call LoadMenuDataHeader
call Function1cbb call MenuBox
call GetMemTileCoord call GetMemTileCoord
jp Function117cdd jp Function117cdd
@ -8247,7 +8247,7 @@ Function117b28:
Function117b31: Function117b31:
ld hl, Data117cc4 ld hl, Data117cc4
call LoadMenuDataHeader call LoadMenuDataHeader
call Function1cbb call MenuBox
call GetMemTileCoord call GetMemTileCoord
hlcoord 16, 8 hlcoord 16, 8
ld de, YesNo117ccc ld de, YesNo117ccc
@ -8385,7 +8385,7 @@ Function117bb6:
Function117c4a: Function117c4a:
ld hl, Data117cbc ld hl, Data117cbc
call LoadMenuDataHeader call LoadMenuDataHeader
call Function1cbb call MenuBox
call GetMemTileCoord call GetMemTileCoord
callba Function104061 callba Function104061
ld hl, MobileStadiumSuccessText ld hl, MobileStadiumSuccessText

View File

@ -1284,7 +1284,7 @@ Function118936:
ret nz ret nz
ld hl, MenuDataHeader_119cf7 ld hl, MenuDataHeader_119cf7
call LoadMenuDataHeader call LoadMenuDataHeader
call Function1cbb call MenuBox
call GetMemTileCoord call GetMemTileCoord
call Function321c call Function321c
hlcoord 16, 8, AttrMap hlcoord 16, 8, AttrMap
@ -4739,7 +4739,7 @@ Function11a1ff: ; 11a1ff
Function11a207: ; 11a207 Function11a207: ; 11a207
ld hl, MenuDataHeader_11a2de ld hl, MenuDataHeader_11a2de
call LoadMenuDataHeader call LoadMenuDataHeader
call Function1cbb call MenuBox
call GetMemTileCoord call GetMemTileCoord
call Function321c call Function321c
hlcoord 16, 8 hlcoord 16, 8
@ -5954,7 +5954,7 @@ Function11ad1b: ; 11ad1b
call ClearSprites call ClearSprites
call ClearTileMap call ClearTileMap
callba Function17c000 callba Function17c000
ld a, [wcfa9] ld a, [MenuSelection2]
ld [wcd82], a ld [wcd82], a
dec a dec a
ld [hObjectStructIndexBuffer], a ld [hObjectStructIndexBuffer], a
@ -6018,7 +6018,7 @@ Function11ad8f: ; 11ad8f
Function11ad95: ; 11ad95 Function11ad95: ; 11ad95
ld hl, MenuDataHeader_11ae38 ld hl, MenuDataHeader_11ae38
call LoadMenuDataHeader call LoadMenuDataHeader
call Function1cbb call MenuBox
hlcoord 12, 12 hlcoord 12, 12
ld de, String_11ae40 ld de, String_11ae40
call PlaceString call PlaceString
@ -6028,7 +6028,7 @@ Function11ad95: ; 11ad95
callba Function104061 callba Function104061
call Function11ad8a call Function11ad8a
ld a, $1 ld a, $1
ld [wcfa9], a ld [MenuSelection2], a
ld hl, Unknown_11afcc ld hl, Unknown_11afcc
call Function11afb7 call Function11afb7
@ -6055,13 +6055,13 @@ Function11adc4:
jr .asm_11ae2e jr .asm_11ae2e
.asm_11ade6 .asm_11ade6
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
ret z ret z
jr .asm_11adf4 jr .asm_11adf4
.asm_11aded .asm_11aded
ld a, [wcfa9] ld a, [MenuSelection2]
inc a inc a
cp $4 cp $4
ret z ret z
@ -6071,21 +6071,21 @@ Function11adc4:
ld hl, Unknown_11afcc ld hl, Unknown_11afcc
call Function11afbb call Function11afbb
pop af pop af
ld [wcfa9], a ld [MenuSelection2], a
ld hl, Unknown_11afcc ld hl, Unknown_11afcc
call Function11afb7 call Function11afb7
ret ret
.asm_11ae06 .asm_11ae06
call PlayClickSFX call PlayClickSFX
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
ld hl, wcd30 ld hl, wcd30
ld [hl], a ld [hl], a
and a and a
jr z, .asm_11ae28 jr z, .asm_11ae28
hlcoord 2, 14 hlcoord 2, 14
ld a, [wcfa9] ld a, [MenuSelection2]
cp $2 cp $2
jr z, .asm_11ae23 jr z, .asm_11ae23
call Function11b272 call Function11b272
@ -6126,13 +6126,13 @@ String_11ae40: ; 11ae40
Function11ae4e: ; 11ae4e Function11ae4e: ; 11ae4e
ld hl, MenuDataHeader_11afe8 ld hl, MenuDataHeader_11afe8
call LoadMenuDataHeader call LoadMenuDataHeader
call Function1cbb call MenuBox
hlcoord 10, 14 hlcoord 10, 14
ld de, String_11aff0 ld de, String_11aff0
call PlaceString call PlaceString
ld hl, MenuDataHeader_11b013 ld hl, MenuDataHeader_11b013
call LoadMenuDataHeader call LoadMenuDataHeader
call Function1cbb call MenuBox
hlcoord 16, 8 hlcoord 16, 8
ld de, String_11b01b ld de, String_11b01b
call PlaceString call PlaceString
@ -6145,7 +6145,7 @@ Function11ae4e: ; 11ae4e
callba Function104061 callba Function104061
call Function11ad8a call Function11ad8a
ld a, $1 ld a, $1
ld [wcfa9], a ld [MenuSelection2], a
ld hl, Unknown_11afd2 ld hl, Unknown_11afd2
call Function11afb7 call Function11afb7
@ -6176,13 +6176,13 @@ Function11ae98:
jr .asm_11aef7 jr .asm_11aef7
.asm_11aec1 .asm_11aec1
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
ret z ret z
jr .asm_11aecf jr .asm_11aecf
.asm_11aec8 .asm_11aec8
ld a, [wcfa9] ld a, [MenuSelection2]
inc a inc a
cp $3 cp $3
ret z ret z
@ -6192,14 +6192,14 @@ Function11ae98:
ld hl, Unknown_11afd2 ld hl, Unknown_11afd2
call Function11afbb call Function11afbb
pop af pop af
ld [wcfa9], a ld [MenuSelection2], a
ld hl, Unknown_11afd2 ld hl, Unknown_11afd2
call Function11afb7 call Function11afb7
ret ret
.asm_11aee1 .asm_11aee1
call PlayClickSFX call PlayClickSFX
ld a, [wcfa9] ld a, [MenuSelection2]
cp $2 cp $2
jr z, .asm_11aeb4 jr z, .asm_11aeb4
ld a, [wcd4b] ld a, [wcd4b]
@ -6217,13 +6217,13 @@ Function11ae98:
Function11af04: ; 11af04 Function11af04: ; 11af04
ld hl, MenuDataHeader_11afe8 ld hl, MenuDataHeader_11afe8
call LoadMenuDataHeader call LoadMenuDataHeader
call Function1cbb call MenuBox
hlcoord 10, 14 hlcoord 10, 14
ld de, String_11b003 ld de, String_11b003
call PlaceString call PlaceString
ld hl, MenuDataHeader_11b013 ld hl, MenuDataHeader_11b013
call LoadMenuDataHeader call LoadMenuDataHeader
call Function1cbb call MenuBox
hlcoord 16, 8 hlcoord 16, 8
ld de, String_11b01b ld de, String_11b01b
call PlaceString call PlaceString
@ -6236,7 +6236,7 @@ Function11af04: ; 11af04
callba Function104061 callba Function104061
call Function11ad8a call Function11ad8a
ld a, $2 ld a, $2
ld [wcfa9], a ld [MenuSelection2], a
ld hl, Unknown_11afd2 ld hl, Unknown_11afd2
call Function11afb7 call Function11afb7
@ -6267,13 +6267,13 @@ Function11af4e:
jr .asm_11afaa jr .asm_11afaa
.asm_11af77 .asm_11af77
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
ret z ret z
jr .asm_11af85 jr .asm_11af85
.asm_11af7e .asm_11af7e
ld a, [wcfa9] ld a, [MenuSelection2]
inc a inc a
cp $3 cp $3
ret z ret z
@ -6283,14 +6283,14 @@ Function11af4e:
ld hl, Unknown_11afd2 ld hl, Unknown_11afd2
call Function11afbb call Function11afbb
pop af pop af
ld [wcfa9], a ld [MenuSelection2], a
ld hl, Unknown_11afd2 ld hl, Unknown_11afd2
call Function11afb7 call Function11afb7
ret ret
.asm_11af97 .asm_11af97
call PlayClickSFX call PlayClickSFX
ld a, [wcfa9] ld a, [MenuSelection2]
cp $2 cp $2
jr z, .asm_11af6a jr z, .asm_11af6a
ld a, $6 ld a, $6
@ -6313,7 +6313,7 @@ Function11afbb:
ld e, $7f ld e, $7f
asm_11afbd: asm_11afbd:
ld a, [wcfa9] ld a, [MenuSelection2]
dec a dec a
ld c, a ld c, a
ld b, 0 ld b, 0

View File

@ -1168,7 +1168,7 @@ Function16d77a: ; 16d77a
swap a swap a
and $f and $f
ld c, a ld c, a
ld a, [wcfa9] ld a, [MenuSelection2]
ld b, a ld b, a
xor a xor a
dec b dec b

View File

@ -2270,7 +2270,7 @@ Function171beb: ; 171beb (5c:5beb)
call CloseSRAM call CloseSRAM
ld hl, MenuDataHeader_171c6b ld hl, MenuDataHeader_171c6b
call LoadMenuDataHeader call LoadMenuDataHeader
call Function1cbb call MenuBox
call GetMemTileCoord call GetMemTileCoord
callba Function104061 callba Function104061
hlcoord 1, 14 hlcoord 1, 14

View File

@ -462,7 +462,7 @@ Function17d246: ; 17d246
ld a, [ScriptVar] ld a, [ScriptVar]
cp $5 cp $5
jr nz, .asm_17d25d jr nz, .asm_17d25d
ld a, [wcfa9] ld a, [MenuSelection2]
cp $3 cp $3
ret z ret z
jr c, .asm_17d25d jr c, .asm_17d25d
@ -470,7 +470,7 @@ Function17d246: ; 17d246
jr .asm_17d260 jr .asm_17d260
.asm_17d25d .asm_17d25d
ld a, [wcfa9] ld a, [MenuSelection2]
.asm_17d260 .asm_17d260
ld [ScriptVar], a ld [ScriptVar], a
@ -1932,13 +1932,13 @@ Function17dc1f: ; 17dc1f
call InterpretMenu2 call InterpretMenu2
jr nc, .asm_17dc6e jr nc, .asm_17dc6e
ld a, $2 ld a, $2
ld [wcfa9], a ld [MenuSelection2], a
.asm_17dc6e .asm_17dc6e
call WriteBackup call WriteBackup
pop af pop af
ld [rSVBK], a ld [rSVBK], a
ld a, [wcfa9] ld a, [MenuSelection2]
cp $1 cp $1
jr nz, .asm_17dc85 jr nz, .asm_17dc85
ld a, [$c68a] ld a, [$c68a]

View File

@ -1238,9 +1238,9 @@ wcf86:: ds 1
wcf87:: ds 1 wcf87:: ds 1
wMenuCursorBuffer:: ds 2 wMenuCursorBuffer:: ds 2
wcf8a:: ds 7 ; menu data 2 bank? wcf8a:: ds 7 ; menu data 2 bank?
wcf91:: ds 1
wcf92:: ds 1 wMenuData2Flags:: ds 1
wMenuData2Items:: ds 1
wcf93:: ds 1 wcf93:: ds 1
wcf94:: ds 1 wcf94:: ds 1
wcf95:: ds 1 ; bank wcf95:: ds 1 ; bank
@ -1257,7 +1257,7 @@ wcfa5:: ds 1
wcfa6:: ds 1 wcfa6:: ds 1
wcfa7:: ds 1 wcfa7:: ds 1
wcfa8:: ds 1 wcfa8:: ds 1
wcfa9:: ds 1 MenuSelection2:: ds 1
wcfaa:: ds 1 wcfaa:: ds 1
wcfab:: ds 1 wcfab:: ds 1
wcfac:: ds 1 wcfac:: ds 1
@ -2321,7 +2321,7 @@ wCurBox:: ; db72
ds 2 ds 2
; 8 chars + $50 ; 8 chars + $50
wBoxNames:: ds 9 * NUM_BOXES ; db75 wBoxNames:: ds BOX_NAME_LENGTH * NUM_BOXES ; db75
wCelebiEvent:: ds 1 wCelebiEvent:: ds 1
ds 1 ds 1