summaryrefslogtreecommitdiff
path: root/engine/start_menu.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/start_menu.asm')
-rwxr-xr-xengine/start_menu.asm172
1 files changed, 86 insertions, 86 deletions
diff --git a/engine/start_menu.asm b/engine/start_menu.asm
index 23302e701..644dc1804 100755
--- a/engine/start_menu.asm
+++ b/engine/start_menu.asm
@@ -101,7 +101,7 @@ StartMenu:: ; 125cd
call .DrawMenuAccount
call SetUpMenu
ld a, $ff
- ld [MenuSelection], a
+ ld [wMenuSelection], a
.loop
call .PrintMenuAccount
call GetScrollingMenuJoypad
@@ -179,7 +179,7 @@ StartMenu:: ; 125cd
.MenuData:
db STATICMENU_CURSOR | STATICMENU_WRAP | STATICMENU_ENABLE_START ; flags
dn 0, 0 ; rows, columns
- dw MenuItemsList
+ dw wMenuItemsList
dw .MenuString
dw .Items
@@ -243,7 +243,7 @@ StartMenu:: ; 125cd
.OpenMenu: ; 127e5
- ld a, [MenuSelection]
+ ld a, [wMenuSelection]
call .GetMenuAccountTextPointer
ld a, [hli]
ld h, [hl]
@@ -253,7 +253,7 @@ StartMenu:: ; 125cd
.MenuString: ; 127ef
push de
- ld a, [MenuSelection]
+ ld a, [wMenuSelection]
call .GetMenuAccountTextPointer
inc hl
inc hl
@@ -267,7 +267,7 @@ StartMenu:: ; 125cd
.MenuDesc: ; 12800
push de
- ld a, [MenuSelection]
+ ld a, [wMenuSelection]
cp $ff
jr z, .none
call .GetMenuAccountTextPointer
@@ -312,7 +312,7 @@ endr
call .AppendMenuList
.no_pokedex
- ld a, [PartyCount]
+ ld a, [wPartyCount]
and a
jr z, .no_pokemon
ld a, STARTMENUITEM_POKEMON
@@ -356,19 +356,19 @@ endr
ld a, STARTMENUITEM_EXIT
call .AppendMenuList
ld a, c
- ld [MenuItemsList], a
+ ld [wMenuItemsList], a
ret
; 1288d
.FillMenuList: ; 1288d
xor a
- ld hl, MenuItemsList
+ ld hl, wMenuItemsList
ld [hli], a
ld a, -1
- ld bc, MenuItemsListEnd - (MenuItemsList + 1)
+ ld bc, wMenuItemsListEnd - (wMenuItemsList + 1)
call ByteFill
- ld de, MenuItemsList + 1
+ ld de, wMenuItemsList + 1
ld c, 0
ret
; 128a0
@@ -405,7 +405,7 @@ endr
; 128cb
.IsMenuAccountOn: ; 128cb
- ld a, [Options2]
+ ld a, [wOptions2]
and 1 << MENU_ACCOUNT
ret
; 128d1
@@ -496,7 +496,7 @@ StartMenu_Status: ; 12928
StartMenu_Pokedex: ; 12937
- ld a, [PartyCount]
+ ld a, [wPartyCount]
and a
jr z, .asm_12949
@@ -540,7 +540,7 @@ StartMenu_Pack: ; 1295b
StartMenu_Pokemon: ; 12976
- ld a, [PartyCount]
+ ld a, [wPartyCount]
and a
jr z, .return
@@ -548,7 +548,7 @@ StartMenu_Pokemon: ; 12976
.choosemenu
xor a
- ld [PartyMenuActionText], a ; Choose a POKéMON.
+ ld [wPartyMenuActionText], a ; Choose a POKéMON.
call ClearBGPalettes
.menu
@@ -589,16 +589,16 @@ StartMenu_Pokemon: ; 12976
; 129d5
HasNoItems: ; 129d5
- ld a, [NumItems]
+ ld a, [wNumItems]
and a
ret nz
- ld a, [NumKeyItems]
+ ld a, [wNumKeyItems]
and a
ret nz
- ld a, [NumBalls]
+ ld a, [wNumBalls]
and a
ret nz
- ld hl, TMsHMs
+ ld hl, wTMsHMs
ld b, NUM_TMS + NUM_HMS
.loop
ld a, [hli]
@@ -635,7 +635,7 @@ TossItemFromPC: ; 129f4
pop af
jr c, .quit
pop hl
- ld a, [CurItemQuantity]
+ ld a, [wCurItemQuantity]
call TossItem
call PartyMonItemName
ld hl, .TossedThisMany
@@ -690,7 +690,7 @@ CantUseItemText: ; 12a67
PartyMonItemName: ; 12a6c
- ld a, [CurItem]
+ ld a, [wCurItem]
ld [wd265], a
call GetItemName
call CopyName1
@@ -712,7 +712,7 @@ PokemonActionSubmenu: ; 12a88
call ClearBox
farcall MonSubmenu
call GetCurNick
- ld a, [MenuSelection]
+ ld a, [wMenuSelection]
ld hl, .Actions
ld de, 3
call IsInArray
@@ -755,11 +755,11 @@ PokemonActionSubmenu: ; 12a88
SwitchPartyMons: ; 12aec
; Don't try if there's nothing to switch!
- ld a, [PartyCount]
+ ld a, [wPartyCount]
cp 2
jr c, .DontSwitch
- ld a, [CurPartyMon]
+ ld a, [wCurPartyMon]
inc a
ld [wSwitchMon], a
@@ -767,7 +767,7 @@ SwitchPartyMons: ; 12aec
farcall InitPartyMenuNoCancel
ld a, PARTYMENUACTION_MOVE
- ld [PartyMenuActionText], a
+ ld [wPartyMenuActionText], a
farcall WritePartyMenuTilemap
farcall PrintPartyMenuText
@@ -788,7 +788,7 @@ SwitchPartyMons: ; 12aec
farcall _SwitchPartyMons
xor a
- ld [PartyMenuActionText], a
+ ld [wPartyMenuActionText], a
farcall LoadPartyMenuGFX
farcall InitPartyMenuWithCancel
@@ -799,7 +799,7 @@ SwitchPartyMons: ; 12aec
.DontSwitch:
xor a
- ld [PartyMenuActionText], a
+ ld [wPartyMenuActionText], a
call CancelPokemonAction
ret
; 12b60
@@ -808,7 +808,7 @@ SwitchPartyMons: ; 12aec
GiveTakePartyMonItem: ; 12b60
; Eggs can't hold items!
- ld a, [CurPartySpecies]
+ ld a, [wCurPartySpecies]
cp EGG
jr z, .cancel
@@ -819,7 +819,7 @@ GiveTakePartyMonItem: ; 12b60
jr c, .cancel
call GetCurNick
- ld hl, StringBuffer1
+ ld hl, wStringBuffer1
ld de, wMonOrItemNameBuffer
ld bc, MON_NAME_LENGTH
call CopyBytes
@@ -919,23 +919,23 @@ TryGiveItemToPartymon: ; 12bd9
call GiveItemToPokemon
ld a, [wd265]
push af
- ld a, [CurItem]
+ ld a, [wCurItem]
ld [wd265], a
pop af
- ld [CurItem], a
+ ld [wCurItem], a
call ReceiveItemFromPokemon
jr nc, .bag_full
ld hl, TookAndMadeHoldText
call MenuTextBoxBackup
ld a, [wd265]
- ld [CurItem], a
+ ld [wCurItem], a
call GivePartyItem
ret
.bag_full
ld a, [wd265]
- ld [CurItem], a
+ ld [wCurItem], a
call ReceiveItemFromPokemon
ld hl, ItemStorageIsFullText
call MenuTextBoxBackup
@@ -948,7 +948,7 @@ TryGiveItemToPartymon: ; 12bd9
GivePartyItem: ; 12c4c
call GetPartyItemLocation
- ld a, [CurItem]
+ ld a, [wCurItem]
ld [hl], a
ld d, a
farcall ItemIsMail
@@ -968,7 +968,7 @@ TakePartyItem: ; 12c60
and a
jr z, .asm_12c8c
- ld [CurItem], a
+ ld [wCurItem], a
call ReceiveItemFromPokemon
jr nc, .asm_12c94
@@ -1063,7 +1063,7 @@ GetPartyItemLocation: ; 12cd7
ReceiveItemFromPokemon: ; 12cdf
ld a, 1
ld [wItemQuantityChangeBuffer], a
- ld hl, NumItems
+ ld hl, wNumItems
jp ReceiveItem
; 12cea
@@ -1071,7 +1071,7 @@ ReceiveItemFromPokemon: ; 12cdf
GiveItemToPokemon: ; 12cea (4:6cea)
ld a, 1
ld [wItemQuantityChangeBuffer], a
- ld hl, NumItems
+ ld hl, wNumItems
jp TossItem
StartMenuYesNo: ; 12cf5
@@ -1084,19 +1084,19 @@ StartMenuYesNo: ; 12cf5
ComposeMailMessage: ; 12cfe (4:6cfe)
ld de, wTempMailMessage
farcall _ComposeMailMessage
- ld hl, PlayerName
+ ld hl, wPlayerName
ld de, wTempMailAuthor
ld bc, NAME_LENGTH - 1
call CopyBytes
- ld hl, PlayerID
+ ld hl, wPlayerID
ld bc, 2
call CopyBytes
- ld a, [CurPartySpecies]
+ ld a, [wCurPartySpecies]
ld [de], a
inc de
- ld a, [CurItem]
+ ld a, [wCurItem]
ld [de], a
- ld a, [CurPartyMon]
+ ld a, [wCurPartyMon]
ld hl, sPartyMail
ld bc, MAIL_STRUCT_LENGTH
call AddNTimes
@@ -1144,7 +1144,7 @@ MonMailAction: ; 12d45
ld hl, .sendmailtopctext
call StartMenuYesNo
jr c, .RemoveMailToBag
- ld a, [CurPartyMon]
+ ld a, [wCurPartyMon]
ld b, a
farcall SendMailToPC
jr c, .MailboxFull
@@ -1163,7 +1163,7 @@ MonMailAction: ; 12d45
jr c, .done
call GetPartyItemLocation
ld a, [hl]
- ld [CurItem], a
+ ld [wCurItem], a
call ReceiveItemFromPokemon
jr nc, .BagIsFull
call GetPartyItemLocation
@@ -1242,7 +1242,7 @@ OpenPartyStats: ; 12e00
call ClearSprites
; PartyMon
xor a
- ld [MonType], a
+ ld [wMonType], a
call LowVolume
predef StatsScreenInit
call MaxVolume
@@ -1402,7 +1402,7 @@ MonMenu_Softboiled_MilkDrink: ; 12ee6
.finish
xor a
- ld [PartyMenuActionText], a
+ ld [wPartyMenuActionText], a
ld a, $3
ret
; 12f00
@@ -1471,7 +1471,7 @@ MonMenu_SweetScent: ; 12f50
; 12f5b
ChooseMoveToDelete: ; 12f5b
- ld hl, Options
+ ld hl, wOptions
ld a, [hl]
push af
set NO_TEXT_SCROLL, [hl]
@@ -1479,7 +1479,7 @@ ChooseMoveToDelete: ; 12f5b
call .ChooseMoveToDelete
pop bc
ld a, b
- ld [Options], a
+ ld [wOptions], a
push af
call ClearBGPalettes
pop af
@@ -1536,16 +1536,16 @@ DeleteMoveScreenAttrs: ; 12fb2
; 12fba
ManagePokemonMoves: ; 12fba
- ld a, [CurPartySpecies]
+ ld a, [wCurPartySpecies]
cp EGG
jr z, .egg
- ld hl, Options
+ ld hl, wOptions
ld a, [hl]
push af
set NO_TEXT_SCROLL, [hl]
call MoveScreenLoop
pop af
- ld [Options], a
+ ld [wOptions], a
call ClearBGPalettes
.egg
@@ -1554,7 +1554,7 @@ ManagePokemonMoves: ; 12fba
; 12fd5
MoveScreenLoop: ; 12fd5
- ld a, [CurPartyMon]
+ ld a, [wCurPartyMon]
inc a
ld [wPartyMenuCursor], a
call SetUpMoveScreenBG
@@ -1620,12 +1620,12 @@ MoveScreenLoop: ; 12fd5
and a
jp nz, .joy_loop
- ld a, [CurPartyMon]
+ ld a, [wCurPartyMon]
ld b, a
push bc
call .cycle_right
pop bc
- ld a, [CurPartyMon]
+ ld a, [wCurPartyMon]
cp b
jp z, .joy_loop
jp MoveScreenLoop
@@ -1634,23 +1634,23 @@ MoveScreenLoop: ; 12fd5
ld a, [wMoveSwapBuffer]
and a
jp nz, .joy_loop
- ld a, [CurPartyMon]
+ ld a, [wCurPartyMon]
ld b, a
push bc
call .cycle_left
pop bc
- ld a, [CurPartyMon]
+ ld a, [wCurPartyMon]
cp b
jp z, .joy_loop
jp MoveScreenLoop
.cycle_right
- ld a, [CurPartyMon]
+ ld a, [wCurPartyMon]
inc a
- ld [CurPartyMon], a
+ ld [wCurPartyMon], a
ld c, a
ld b, 0
- ld hl, PartySpecies
+ ld hl, wPartySpecies
add hl, bc
ld a, [hl]
cp -1
@@ -1660,21 +1660,21 @@ MoveScreenLoop: ; 12fd5
jr .cycle_right
.cycle_left
- ld a, [CurPartyMon]
+ ld a, [wCurPartyMon]
and a
ret z
.cycle_left_loop
- ld a, [CurPartyMon]
+ ld a, [wCurPartyMon]
dec a
- ld [CurPartyMon], a
+ ld [wCurPartyMon], a
ld c, a
ld b, 0
- ld hl, PartySpecies
+ ld hl, wPartySpecies
add hl, bc
ld a, [hl]
cp EGG
ret nz
- ld a, [CurPartyMon]
+ ld a, [wCurPartyMon]
and a
jr z, .cycle_right
jr .cycle_left_loop
@@ -1692,9 +1692,9 @@ MoveScreenLoop: ; 12fd5
jp .moving_move
.place_move
- ld hl, PartyMon1Moves
+ ld hl, wPartyMon1Moves
ld bc, PARTYMON_STRUCT_LENGTH
- ld a, [CurPartyMon]
+ ld a, [wCurPartyMon]
call AddNTimes
push hl
call .copy_move
@@ -1704,9 +1704,9 @@ MoveScreenLoop: ; 12fd5
call .copy_move
ld a, [wBattleMode]
jr z, .swap_moves
- ld hl, BattleMonMoves
+ ld hl, wBattleMonMoves
ld bc, $20
- ld a, [CurPartyMon]
+ ld a, [wCurPartyMon]
call AddNTimes
push hl
call .copy_move
@@ -1783,10 +1783,10 @@ SetUpMoveScreenBG: ; 13172
ld [hBGMapMode], a
farcall LoadStatsScreenPageTilesGFX
farcall ClearSpriteAnims2
- ld a, [CurPartyMon]
+ ld a, [wCurPartyMon]
ld e, a
ld d, $0
- ld hl, PartySpecies
+ ld hl, wPartySpecies
add hl, de
ld a, [hl]
ld [wd265], a
@@ -1804,9 +1804,9 @@ SetUpMoveScreenBG: ; 13172
lb bc, 2, 3
call ClearBox
xor a
- ld [MonType], a
- ld hl, PartyMonNicknames
- ld a, [CurPartyMon]
+ ld [wMonType], a
+ ld hl, wPartyMonNicknames
+ ld a, [wCurPartyMon]
call GetNick
hlcoord 5, 1
call PlaceString
@@ -1814,7 +1814,7 @@ SetUpMoveScreenBG: ; 13172
farcall CopyPkmnToTempMon
pop hl
call PrintLevel
- ld hl, PlayerHPPal
+ ld hl, wPlayerHPPal
call SetHPPal
ld b, SCGB_MOVE_LIST
call GetSGBLayout
@@ -1827,14 +1827,14 @@ SetUpMoveList: ; 131ef
xor a
ld [hBGMapMode], a
ld [wMoveSwapBuffer], a
- ld [MonType], a
+ ld [wMonType], a
predef CopyPkmnToTempMon
- ld hl, TempMonMoves
+ ld hl, wTempMonMoves
ld de, wListMoves_MoveIndicesBuffer
ld bc, NUM_MOVES
call CopyBytes
ld a, SCREEN_WIDTH * 2
- ld [Buffer1], a
+ ld [wBuffer1], a
hlcoord 2, 3
predef ListMoves
hlcoord 10, 4
@@ -1851,9 +1851,9 @@ SetUpMoveList: ; 131ef
; 13235
PrepareToPlaceMoveData: ; 13235
- ld hl, PartyMon1Moves
+ ld hl, wPartyMon1Moves
ld bc, PARTYMON_STRUCT_LENGTH
- ld a, [CurPartyMon]
+ ld a, [wCurPartyMon]
call AddNTimes
ld a, [wMenuCursorY]
dec a
@@ -1861,7 +1861,7 @@ PrepareToPlaceMoveData: ; 13235
ld b, $0
add hl, bc
ld a, [hl]
- ld [CurMove], a
+ ld [wCurMove], a
hlcoord 1, 12
lb bc, 5, 18
jp ClearBox
@@ -1879,11 +1879,11 @@ PlaceMoveData: ; 13256
hlcoord 12, 12
ld de, String_132ca
call PlaceString
- ld a, [CurMove]
+ ld a, [wCurMove]
ld b, a
hlcoord 2, 12
predef PrintMoveType
- ld a, [CurMove]
+ ld a, [wCurMove]
dec a
ld hl, Moves + MOVE_POWER
ld bc, MOVE_LENGTH
@@ -1931,13 +1931,13 @@ Function132d3: ; 132d3
; 132da
Function132da: ; 132da
- ld a, [CurPartyMon]
+ ld a, [wCurPartyMon]
and a
ret z
ld c, a
ld e, a
ld d, 0
- ld hl, PartyCount
+ ld hl, wPartyCount
add hl, de
.loop
ld a, [hl]
@@ -1961,15 +1961,15 @@ Function132da: ; 132da
; 132fe
Function132fe: ; 132fe
- ld a, [CurPartyMon]
+ ld a, [wCurPartyMon]
inc a
ld c, a
- ld a, [PartyCount]
+ ld a, [wPartyCount]
cp c
ret z
ld e, c
ld d, 0
- ld hl, PartySpecies
+ ld hl, wPartySpecies
add hl, de
.loop
ld a, [hl]