summaryrefslogtreecommitdiff
path: root/engine/menu
diff options
context:
space:
mode:
Diffstat (limited to 'engine/menu')
-rw-r--r--engine/menu/bills_pc.asm5
-rwxr-xr-xengine/menu/pc.asm6
-rwxr-xr-xengine/menu/pokedex.asm4
-rwxr-xr-xengine/menu/prize_menu.asm24
-rwxr-xr-xengine/menu/start_menu.asm8
-rwxr-xr-xengine/menu/start_sub_menus.asm2
6 files changed, 24 insertions, 25 deletions
diff --git a/engine/menu/bills_pc.asm b/engine/menu/bills_pc.asm
index 57699b8f..eddccc29 100644
--- a/engine/menu/bills_pc.asm
+++ b/engine/menu/bills_pc.asm
@@ -254,7 +254,7 @@ BillsPCDeposit:
call WaitForSoundToFinish
ld hl, wBoxNumString
ld a, [wCurrentBoxNum]
- and " "
+ and $7f
cp 9
jr c, .singleDigitBoxNum
sub 9
@@ -423,7 +423,7 @@ HMMoveArray:
db SURF
db STRENGTH
db FLASH
- db $ff
+ db -1
DisplayDepositWithdrawMenu:
coord hl, 9, 10
@@ -595,3 +595,4 @@ JustAMomentText::
OpenBillsPCText::
db $FD ; FuncTX_BillsPC
+
diff --git a/engine/menu/pc.asm b/engine/menu/pc.asm
index b31970c8..c9e2cf08 100755
--- a/engine/menu/pc.asm
+++ b/engine/menu/pc.asm
@@ -123,10 +123,10 @@ RemoveItemByID:
ld [hItemToRemoveIndex], a
.loop
ld a, [hli]
- cp $ff ; have we reached the cancel button (terminator)
+ cp -1 ; reached terminator?
ret z
- cp b ; is the current item the item we want?
- jr z, .foundItem ; if so, remove it from the inventory
+ cp b
+ jr z, .foundItem
inc hl
ld a, [hItemToRemoveIndex]
inc a
diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm
index 5bc8f119..166e026d 100755
--- a/engine/menu/pokedex.asm
+++ b/engine/menu/pokedex.asm
@@ -393,7 +393,6 @@ Pokedex_PlacePokemonList:
jr nz, .getPokemonName ; if the player has seen the pokemon
ld de, .dashedLine ; print a dashed line in place of the name if the player hasn't seen the pokemon
jr .skipGettingName
-
.dashedLine ; for unseen pokemon in the list
db "----------@"
.getPokemonName
@@ -519,10 +518,9 @@ DrawDexEntryOnScreen:
ld a, $6c ; lower left corner tile
Coorda 0, 17
ld a, $6e ; lower right corner tile
-
Coorda 19, 17
- coord hl, 0, 9
+ coord hl, 0, 9
ld de, PokedexDataDividerLine
call PlaceString ; draw horizontal divider line
diff --git a/engine/menu/prize_menu.asm b/engine/menu/prize_menu.asm
index 2a8dcb83..d1b1be3c 100755
--- a/engine/menu/prize_menu.asm
+++ b/engine/menu/prize_menu.asm
@@ -33,7 +33,7 @@ CeladonPrizeMenu:
bit 1,a ; keypress = B (Cancel)
jr nz, .noChoice
ld a,[wCurrentMenuItem]
- cp $03 ; "NO,THANKS" choice
+ cp 3 ; "NO,THANKS" choice
jr z, .noChoice
call HandlePrizeChoice
.noChoice
@@ -68,7 +68,7 @@ GetPrizeMenuId:
ld [wWhichPrizeWindow], a ; prize-texts' id (relative, i.e. 0, 1 or 2)
add a
add a
- ld d, $0
+ ld d, 0
ld e, a
ld hl, PrizeDifferentMenuPtrs
add hl, de
@@ -84,10 +84,10 @@ GetPrizeMenuId:
ld h, [hl]
ld l, a
ld de, wPrize1Price
- ld bc, $6
+ ld bc, 6
call CopyData
ld a, [wWhichPrizeWindow]
- cp $02 ;is TM_menu?
+ cp 2 ;is TM_menu?
jr nz, .putMonName
ld a, [wPrize1]
ld [wd11e], a
@@ -155,10 +155,10 @@ PrintPrizePrice:
call TextBoxBorder
call UpdateSprites
coord hl, 12, 0
- ld de, CoinString
+ ld de, .CoinString
call PlaceString
coord hl, 13, 1
- ld de, SixSpacesString
+ ld de, .SixSpacesString
call PlaceString
coord hl, 13, 1
ld de,wPlayerCoins
@@ -166,16 +166,16 @@ PrintPrizePrice:
call PrintBCDNumber
ret
-CoinString:
+.CoinString:
db "COIN@"
-SixSpacesString:
+.SixSpacesString:
db " @"
LoadCoinsToSubtract:
ld a,[wWhichPrize]
add a
- ld d, $0
+ ld d, 0
ld e, a
ld hl, wPrize1Price
add hl, de ; get selected prize's price
@@ -190,14 +190,14 @@ LoadCoinsToSubtract:
HandlePrizeChoice:
ld a, [wCurrentMenuItem]
ld [wWhichPrize], a
- ld d, $0
+ ld d, 0
ld e, a
ld hl, wPrize1
add hl, de
ld a, [hl]
ld [wd11e], a
ld a, [wWhichPrizeWindow]
- cp $02 ; is prize a TM?
+ cp 2 ; is prize a TM?
jr nz, .getMonName
call GetItemName
jr .givePrize
@@ -261,7 +261,7 @@ HandlePrizeChoice:
ld hl,OhFineThenTextPtr
jp PrintText
-UnknownData528b1:
+UnknownPrizeData:
; XXX what's this?
db $00,$01,$00,$01,$00,$01,$00,$00,$01
diff --git a/engine/menu/start_menu.asm b/engine/menu/start_menu.asm
index 16a9973d..af687432 100755
--- a/engine/menu/start_menu.asm
+++ b/engine/menu/start_menu.asm
@@ -2,7 +2,7 @@ DisplayStartMenu::
switchbank StartMenu_Pokedex ; also bank for other functions
ld a, [wWalkBikeSurfState] ; walking/biking/surfing
ld [wWalkBikeSurfStateCopy], a
- ld a, $8f ; (SFX_02_3f - SFX_Headers_02) / 3 ; Start menu sound
+ ld a, SFX_START_MENU
call PlaySound
RedisplayStartMenu::
@@ -23,7 +23,7 @@ RedisplayStartMenu_DoNotDrawStartMenu:
and a
jr nz, .loop
; if the player pressed tried to go past the top item, wrap around to the bottom
- CheckEvent EVENT_GOT_POKEDEX ; does the player have the pokedex?
+ CheckEvent EVENT_GOT_POKEDEX
ld a, 6 ; there are 7 menu items with the pokedex, so the max index is 6
jr nz, .wrapMenuItemId
dec a ; there are only 6 menu items without the pokedex
@@ -35,7 +35,7 @@ RedisplayStartMenu_DoNotDrawStartMenu:
bit 7, a
jr z, .buttonPressed
; if the player pressed tried to go past the bottom item, wrap around to the top
- CheckEvent EVENT_GOT_POKEDEX ; does the player have the pokedex?
+ CheckEvent EVENT_GOT_POKEDEX
ld a, [wCurrentMenuItem]
ld c, 7 ; there are 7 menu items with the pokedex
jr nz, .checkIfPastBottom
@@ -56,7 +56,7 @@ RedisplayStartMenu_DoNotDrawStartMenu:
and a, %00001010 ; was the Start button or B button pressed?
jp nz, CloseStartMenu
call SaveScreenTilesToBuffer2 ; copy background from wTileMap to wTileMapBackup2
- CheckEvent EVENT_GOT_POKEDEX ; does the player have the pokedex?
+ CheckEvent EVENT_GOT_POKEDEX
ld a, [wCurrentMenuItem]
jr nz, .displayMenuItem
inc a ; adjust position to account for missing pokedex menu item
diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm
index d49f7502..f3ba8207 100755
--- a/engine/menu/start_sub_menus.asm
+++ b/engine/menu/start_sub_menus.asm
@@ -239,7 +239,7 @@ StartMenu_Pokemon:
res 4,[hl]
ld c,60
call DelayFrames
- call GBPalWhiteOutWithDelay3 ; zero all three palettes and wait 3 frames
+ call GBPalWhiteOutWithDelay3
jp .goBackToMap
.warpToLastPokemonCenterText
TX_FAR _WarpToLastPokemonCenterText