summaryrefslogtreecommitdiff
path: root/engine/menu/pc.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/menu/pc.asm')
-rwxr-xr-xengine/menu/pc.asm67
1 files changed, 33 insertions, 34 deletions
diff --git a/engine/menu/pc.asm b/engine/menu/pc.asm
index 97895ca6..78b35b95 100755
--- a/engine/menu/pc.asm
+++ b/engine/menu/pc.asm
@@ -1,16 +1,16 @@
ActivatePC: ; 17e2c (5:7e2c)
- call SaveScreenTilesToBuffer2 ;XXX: copy background from wTileMap to wTileMapBackup2
- ld a, (SFX_02_45 - SFX_Headers_02) / 3
- call PlaySound ;XXX: play sound or stop music
+ call SaveScreenTilesToBuffer2
+ ld a, SFX_TURN_ON_PC
+ call PlaySound
ld hl, TurnedOnPC1Text
call PrintText
- call WaitForSoundToFinish ;XXX: wait for sound to be done
+ call WaitForSoundToFinish
ld hl, wFlags_0xcd60
set 3, [hl]
- call LoadScreenTilesFromBuffer2 ;XXX: restore saved screen
+ call LoadScreenTilesFromBuffer2
call Delay3
PCMainMenu: ; 17e48 (5:7e48)
- callba Func_213c8
+ callba DisplayPCMainMenu
ld hl, wFlags_0xcd60
set 5, [hl]
call HandleMenuInput
@@ -51,31 +51,30 @@ PCMainMenu: ; 17e48 (5:7e48)
ld hl, wFlags_0xcd60
res 5, [hl]
set 3, [hl]
- ld a, (SFX_02_47 - SFX_Headers_02) / 3
- call PlaySound ;XXX: play sound or stop music
- call WaitForSoundToFinish ;XXX: wait for sound to be done
+ ld a, SFX_ENTER_PC
+ call PlaySound
+ call WaitForSoundToFinish
ld hl, AccessedMyPCText
call PrintText
callba PlayerPC
jr ReloadMainMenu
OaksPC: ; 17ec0 (5:7ec0)
- ld a, (SFX_02_47 - SFX_Headers_02) / 3
- call PlaySound ;XXX: play sound or stop music
- call WaitForSoundToFinish ;XXX: wait for sound to be done
+ ld a, SFX_ENTER_PC
+ call PlaySound
+ call WaitForSoundToFinish
callba OpenOaksPC
jr ReloadMainMenu
PKMNLeague: ; 17ed2 (5:7ed2)
- ld a, (SFX_02_47 - SFX_Headers_02) / 3
- call PlaySound ;XXX: play sound or stop music
- call WaitForSoundToFinish ;XXX: wait for sound to be done
+ ld a, SFX_ENTER_PC
+ call PlaySound
+ call WaitForSoundToFinish
callba PKMNLeaguePC
jr ReloadMainMenu
BillsPC: ; 17ee4 (5:7ee4)
- ld a, (SFX_02_47 - SFX_Headers_02) / 3
- call PlaySound ;XXX: play sound or stop music
- call WaitForSoundToFinish ;XXX: wait for sound to be done
- ld a, [wd7f1] ;has to do with having met Bill
- bit 0, a
+ ld a, SFX_ENTER_PC
+ call PlaySound
+ call WaitForSoundToFinish
+ CheckEvent EVENT_MET_BILL
jr nz, .billsPC ;if you've met bill, use that bill's instead of someone's
ld hl, AccessedSomeonesPCText
jr .printText
@@ -88,12 +87,12 @@ ReloadMainMenu: ; 17f06 (5:7f06)
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
call ReloadMapData
- call UpdateSprites ;XXX: moves sprites
+ call UpdateSprites
jp PCMainMenu
LogOff: ; 17f13 (5:7f13)
- ld a, (SFX_02_46 - SFX_Headers_02) / 3
- call PlaySound ;XXX: play sound or stop music
- call WaitForSoundToFinish ;XXX: wait for sound to be done
+ ld a, SFX_TURN_OFF_PC
+ call PlaySound
+ call WaitForSoundToFinish
ld hl, wFlags_0xcd60
res 3, [hl]
res 5, [hl]
@@ -115,13 +114,13 @@ AccessedMyPCText: ; 17f32 (5:7f32)
TX_FAR _AccessedMyPCText
db "@"
-; removes one of the specified item ID [$FFdb] from bag (if existent)
+; removes one of the specified item ID [hItemToRemoveID] from bag (if existent)
RemoveItemByID: ; 17f37 (5:7f37)
- ld hl, wBagItems ; wd31e
- ld a, [$ffdb]
+ ld hl, wBagItems
+ ld a, [hItemToRemoveID]
ld b, a
xor a
- ld [$ffdc], a
+ ld [hItemToRemoveIndex], a
.asm_17f40
ld a, [hli]
cp $ff
@@ -129,14 +128,14 @@ RemoveItemByID: ; 17f37 (5:7f37)
cp b
jr z, .asm_17f4f
inc hl
- ld a, [$ffdc]
+ ld a, [hItemToRemoveIndex]
inc a
- ld [$ffdc], a
+ ld [hItemToRemoveIndex], a
jr .asm_17f40
.asm_17f4f
ld a, $1
- ld [wcf96], a
- ld a, [$ffdc]
- ld [wWhichPokemon], a ; wWhichPokemon
- ld hl, wNumBagItems ; wNumBagItems
+ ld [wItemQuantity], a
+ ld a, [hItemToRemoveIndex]
+ ld [wWhichPokemon], a
+ ld hl, wNumBagItems
jp RemoveItemFromInventory