pokecrystal-board/engine/events/pokecenter_pc.asm

670 lines
11 KiB
NASM
Raw Normal View History

2018-06-24 07:09:41 -07:00
PokemonCenterPC:
2015-11-16 18:46:36 -08:00
call PC_CheckPartyForPokemon
ret c
call PC_PlayBootSound
ld hl, PokecenterPCText_BootedUpPC
2015-11-16 18:46:36 -08:00
call PC_DisplayText
ld hl, PokecenterPCText_AccessWhosePC
2015-11-16 18:46:36 -08:00
call PC_DisplayTextWaitMenu
ld hl, .TopMenu
call LoadMenuHeader
2015-11-16 18:46:36 -08:00
.loop
xor a
ldh [hBGMapMode], a
2015-11-16 18:46:36 -08:00
call .ChooseWhichPCListToUse
2015-12-18 17:07:09 -08:00
ld [wWhichIndexSet], a
2015-11-16 18:46:36 -08:00
call DoNthMenu
jr c, .shutdown
2018-01-23 14:39:09 -08:00
ld a, [wMenuSelection]
2015-11-16 18:46:36 -08:00
ld hl, .JumpTable
call MenuJumptable
jr nc, .loop
.shutdown
call PC_PlayShutdownSound
call ExitMenu
call CloseWindow
2015-11-16 18:46:36 -08:00
ret
.TopMenu:
db MENU_BACKUP_TILES | MENU_NO_CLICK_SFX ; flags
menu_coords 0, 0, 15, 12
dw .MenuData
2015-11-16 18:46:36 -08:00
db 1 ; default option
.MenuData:
db STATICMENU_CURSOR | STATICMENU_WRAP ; flags
2015-11-16 18:46:36 -08:00
db 0 ; items
dw .WhichPC
dw PlaceNthMenuStrings
dw .JumpTable
PCPC_PLAYERS_PC EQU 0
PCPC_BILLS_PC EQU 1
PCPC_OAKS_PC EQU 2
PCPC_HALL_OF_FAME EQU 3
PCPC_TURN_OFF EQU 4
.JumpTable:
; entries correspond to PCPC_* constants
dw PlayersPC, .String_PlayersPC
dw BillsPC, .String_BillsPC
dw OaksPC, .String_OaksPC
2015-11-16 18:46:36 -08:00
dw HallOfFamePC, .String_HallOfFame
dw TurnOffPC, .String_TurnOff
2015-11-16 18:46:36 -08:00
2016-03-01 19:31:21 -08:00
.String_PlayersPC: db "<PLAYER>'s PC@"
.String_BillsPC: db "BILL's PC@"
.String_OaksPC: db "PROF.OAK's PC@"
.String_HallOfFame: db "HALL OF FAME@"
.String_TurnOff: db "TURN OFF@"
2015-11-16 18:46:36 -08:00
.WhichPC:
; before Pokédex
db 3
db PCPC_BILLS_PC
db PCPC_PLAYERS_PC
db PCPC_TURN_OFF
db -1 ; end
2015-11-16 18:46:36 -08:00
; before Hall Of Fame
db 4
db PCPC_BILLS_PC
db PCPC_PLAYERS_PC
db PCPC_OAKS_PC
db PCPC_TURN_OFF
db -1 ; end
2015-11-16 18:46:36 -08:00
; postgame
db 5
db PCPC_BILLS_PC
db PCPC_PLAYERS_PC
db PCPC_OAKS_PC
db PCPC_HALL_OF_FAME
db PCPC_TURN_OFF
db -1 ; end
2015-11-16 18:46:36 -08:00
.ChooseWhichPCListToUse:
2015-11-16 18:46:36 -08:00
call CheckReceivedDex
jr nz, .got_dex
ld a, 0 ; before Pokédex
2015-11-16 18:46:36 -08:00
ret
.got_dex
ld a, [wHallOfFameCount]
and a
ld a, 1 ; before Hall Of Fame
2015-11-16 18:46:36 -08:00
ret z
ld a, 2 ; postgame
2015-11-16 18:46:36 -08:00
ret
2018-06-24 07:09:41 -07:00
PC_CheckPartyForPokemon:
2018-01-23 14:39:09 -08:00
ld a, [wPartyCount]
2015-11-16 18:46:36 -08:00
and a
ret nz
ld de, SFX_CHOOSE_PC_OPTION
call PlaySFX
2016-03-01 19:31:21 -08:00
ld hl, .MustHavePokemonToUse
2015-11-16 18:46:36 -08:00
call PC_DisplayText
scf
ret
.MustHavePokemonToUse:
2015-11-16 18:46:36 -08:00
; Bzzzzt! You must have a #MON to use this!
text_far UnknownText_0x1c1328
text_end
2015-11-16 18:46:36 -08:00
2018-06-24 07:09:41 -07:00
BillsPC:
2015-11-16 18:46:36 -08:00
call PC_PlayChoosePCSound
ld hl, PokecenterPCText_AccessedBillsPC
2015-11-16 18:46:36 -08:00
call PC_DisplayText
2017-12-24 09:47:30 -08:00
farcall _BillsPC
2015-11-16 18:46:36 -08:00
and a
ret
2018-06-24 07:09:41 -07:00
PlayersPC:
2015-11-16 18:46:36 -08:00
call PC_PlayChoosePCSound
ld hl, PokecenterPCText_AccessedOwnPC
2015-11-16 18:46:36 -08:00
call PC_DisplayText
ld b, $0
call _PlayersPC
and a
ret
2018-06-24 07:09:41 -07:00
OaksPC:
2015-11-16 18:46:36 -08:00
call PC_PlayChoosePCSound
ld hl, PokecenterPCText_AccessedOaksPC
2015-11-16 18:46:36 -08:00
call PC_DisplayText
2017-12-24 09:47:30 -08:00
farcall ProfOaksPC
2015-11-16 18:46:36 -08:00
and a
ret
2018-06-24 07:09:41 -07:00
HallOfFamePC:
2015-11-16 18:46:36 -08:00
call PC_PlayChoosePCSound
call FadeToMenu
2017-12-24 09:47:30 -08:00
farcall _HallOfFamePC
call CloseSubmenu
2015-11-16 18:46:36 -08:00
and a
ret
2018-06-24 07:09:41 -07:00
TurnOffPC:
ld hl, PokecenterPCText_LinkClosed
2015-11-16 18:46:36 -08:00
call PrintText
scf
ret
2018-06-24 07:09:41 -07:00
PC_PlayBootSound:
2015-11-16 18:46:36 -08:00
ld de, SFX_BOOT_PC
jr PC_WaitPlaySFX
2018-06-24 07:09:41 -07:00
PC_PlayShutdownSound:
2015-11-16 18:46:36 -08:00
ld de, SFX_SHUT_DOWN_PC
call PC_WaitPlaySFX
call WaitSFX
ret
2018-06-24 07:09:41 -07:00
PC_PlayChoosePCSound:
2015-11-16 18:46:36 -08:00
ld de, SFX_CHOOSE_PC_OPTION
jr PC_WaitPlaySFX
2018-06-24 07:09:41 -07:00
PC_PlaySwapItemsSound:
2015-11-16 18:46:36 -08:00
ld de, SFX_SWITCH_POKEMON
call PC_WaitPlaySFX
ld de, SFX_SWITCH_POKEMON
2018-06-24 07:09:41 -07:00
PC_WaitPlaySFX:
2015-11-16 18:46:36 -08:00
push de
call WaitSFX
pop de
call PlaySFX
ret
2018-06-24 07:09:41 -07:00
_PlayersHousePC:
2015-11-16 18:46:36 -08:00
call PC_PlayBootSound
ld hl, UnknownText_0x156ff
call PC_DisplayText
ld b, $1
call _PlayersPC
and a
jr nz, .asm_156f9
call OverworldTextModeSwitch
2015-11-25 07:16:29 -08:00
call ApplyTilemap
2015-11-16 18:46:36 -08:00
call UpdateSprites
call PC_PlayShutdownSound
ld c, $0
ret
.asm_156f9
call ClearBGPalettes
ld c, $1
ret
UnknownText_0x156ff:
2015-11-16 18:46:36 -08:00
; turned on the PC.
text_far UnknownText_0x1c1353
text_end
2015-11-16 18:46:36 -08:00
2018-06-24 07:09:41 -07:00
_PlayersPC:
2015-11-16 18:46:36 -08:00
ld a, b
2015-12-18 17:07:09 -08:00
ld [wWhichIndexSet], a
2015-11-16 18:46:36 -08:00
ld hl, UnknownText_0x157cc
call PC_DisplayTextWaitMenu
call Function15715
call ExitMenu
ret
2018-06-24 07:09:41 -07:00
Function15715:
2015-11-16 18:46:36 -08:00
xor a
2016-03-01 19:31:21 -08:00
ld [wPCItemsCursor], a
ld [wPCItemsScrollPosition], a
2018-01-22 16:10:09 -08:00
ld hl, PlayersPCMenuData
call LoadMenuHeader
2015-11-16 18:46:36 -08:00
.asm_15722
call UpdateTimePals
call DoNthMenu
jr c, .asm_15731
call MenuJumptable
jr nc, .asm_15722
jr .asm_15732
.asm_15731
xor a
.asm_15732
call ExitMenu
ret
PlayersPCMenuData:
db MENU_BACKUP_TILES ; flags
2015-11-16 18:46:36 -08:00
db 0, 0 ; top left corner coords (y, x)
db 12, 15 ; bottom right corner coords (y, x)
dw .PlayersPCMenuData
2015-11-16 18:46:36 -08:00
db 1 ; default selected option
.PlayersPCMenuData:
db STATICMENU_CURSOR | STATICMENU_WRAP ; flags
2015-11-16 18:46:36 -08:00
db 0 ; # items?
2018-01-22 16:10:09 -08:00
dw .PlayersPCMenuList1
2015-11-16 18:46:36 -08:00
dw PlaceNthMenuStrings
2018-01-22 16:10:09 -08:00
dw .PlayersPCMenuPointers
2015-11-16 18:46:36 -08:00
PLAYERSPC_WITHDRAW_ITEM EQU 0
PLAYERSPC_DEPOSIT_ITEM EQU 1
PLAYERSPC_TOSS_ITEM EQU 2
PLAYERSPC_MAIL_BOX EQU 3
PLAYERSPC_DECORATION EQU 4
PLAYERSPC_TURN_OFF EQU 5
PLAYERSPC_LOG_OFF EQU 6
.PlayersPCMenuPointers:
; entries correspond to PLAYERSPC_* constants
2018-01-22 16:10:09 -08:00
dw PlayerWithdrawItemMenu, .WithdrawItem
dw PlayerDepositItemMenu, .DepositItem
dw PlayerTossItemMenu, .TossItem
dw PlayerMailBoxMenu, .MailBox
dw PlayerDecorationMenu, .Decoration
dw PlayerLogOffMenu, .LogOff
dw PlayerLogOffMenu, .TurnOff
2015-11-16 18:46:36 -08:00
.WithdrawItem: db "WITHDRAW ITEM@"
.DepositItem: db "DEPOSIT ITEM@"
.TossItem: db "TOSS ITEM@"
.MailBox: db "MAIL BOX@"
.Decoration: db "DECORATION@"
.TurnOff: db "TURN OFF@"
.LogOff: db "LOG OFF@"
2015-11-16 18:46:36 -08:00
2018-01-22 16:10:09 -08:00
.PlayersPCMenuList1:
2015-11-16 18:46:36 -08:00
db 5
db PLAYERSPC_WITHDRAW_ITEM
db PLAYERSPC_DEPOSIT_ITEM
db PLAYERSPC_TOSS_ITEM
db PLAYERSPC_MAIL_BOX
db PLAYERSPC_TURN_OFF
db -1 ; end
2015-11-16 18:46:36 -08:00
2018-01-22 16:10:09 -08:00
.PlayersPCMenuList2:
2015-11-16 18:46:36 -08:00
db 6
db PLAYERSPC_WITHDRAW_ITEM
db PLAYERSPC_DEPOSIT_ITEM
db PLAYERSPC_TOSS_ITEM
db PLAYERSPC_MAIL_BOX
db PLAYERSPC_DECORATION
db PLAYERSPC_LOG_OFF
db -1 ; end
2015-11-16 18:46:36 -08:00
2018-06-24 07:09:41 -07:00
PC_DisplayTextWaitMenu:
2018-01-23 14:39:09 -08:00
ld a, [wOptions]
2015-11-16 18:46:36 -08:00
push af
set NO_TEXT_SCROLL, a
2018-01-23 14:39:09 -08:00
ld [wOptions], a
2015-11-16 18:46:36 -08:00
call MenuTextBox
pop af
2018-01-23 14:39:09 -08:00
ld [wOptions], a
2015-11-16 18:46:36 -08:00
ret
UnknownText_0x157cc:
2015-11-16 18:46:36 -08:00
; What do you want to do?
text_far UnknownText_0x1c1368
text_end
2015-11-16 18:46:36 -08:00
PlayerWithdrawItemMenu:
call LoadStandardMenuHeader
2017-12-24 09:47:30 -08:00
farcall ClearPCItemScreen
2016-03-01 19:31:21 -08:00
.loop
call PCItemsJoypad
jr c, .quit
call .Submenu
jr .loop
2015-11-16 18:46:36 -08:00
2016-03-01 19:31:21 -08:00
.quit
call CloseSubmenu
2015-11-16 18:46:36 -08:00
xor a
ret
.Submenu:
2015-11-16 18:46:36 -08:00
; check if the item has a quantity
2017-12-24 09:47:30 -08:00
farcall _CheckTossableItem
2015-11-16 18:46:36 -08:00
ld a, [wItemAttributeParamBuffer]
and a
jr z, .askquantity
; items without quantity are always ×1
ld a, 1
ld [wItemQuantityChangeBuffer], a
jr .withdraw
.askquantity
ld hl, .HowManyText
call MenuTextBox
2017-12-24 09:47:30 -08:00
farcall SelectQuantityToToss
2015-11-16 18:46:36 -08:00
call ExitMenu
call ExitMenu
jr c, .done
.withdraw
ld a, [wItemQuantityChangeBuffer]
2018-01-23 14:39:09 -08:00
ld [wBuffer1], a ; quantity
ld a, [wCurItemQuantity]
ld [wBuffer2], a
ld hl, wNumItems
2015-11-16 18:46:36 -08:00
call ReceiveItem
jr nc, .PackFull
2018-01-23 14:39:09 -08:00
ld a, [wBuffer1]
2015-11-16 18:46:36 -08:00
ld [wItemQuantityChangeBuffer], a
2018-01-23 14:39:09 -08:00
ld a, [wBuffer2]
ld [wCurItemQuantity], a
ld hl, wPCItems
2015-11-16 18:46:36 -08:00
call TossItem
predef PartyMonItemName
2015-11-16 18:46:36 -08:00
ld hl, .WithdrewText
call MenuTextBox
xor a
ldh [hBGMapMode], a
2015-11-16 18:46:36 -08:00
call ExitMenu
ret
.PackFull:
2015-11-16 18:46:36 -08:00
ld hl, .NoRoomText
call MenuTextBoxBackup
ret
.done
ret
.HowManyText:
text_far _PlayersPCHowManyWithdrawText
text_end
2015-11-16 18:46:36 -08:00
.WithdrewText:
text_far _PlayersPCWithdrewItemsText
text_end
2015-11-16 18:46:36 -08:00
.NoRoomText:
text_far _PlayersPCNoRoomWithdrawText
text_end
2015-11-16 18:46:36 -08:00
PlayerTossItemMenu:
call LoadStandardMenuHeader
2017-12-24 09:47:30 -08:00
farcall ClearPCItemScreen
2016-03-01 19:31:21 -08:00
.loop
call PCItemsJoypad
jr c, .quit
2018-01-23 14:39:09 -08:00
ld de, wPCItems
2017-12-24 09:47:30 -08:00
farcall TossItemFromPC
2016-03-01 19:31:21 -08:00
jr .loop
2015-11-16 18:46:36 -08:00
2016-03-01 19:31:21 -08:00
.quit
call CloseSubmenu
2015-11-16 18:46:36 -08:00
xor a
ret
PlayerDecorationMenu:
2018-01-22 16:10:09 -08:00
farcall _PlayerDecorationMenu
2015-11-16 18:46:36 -08:00
ld a, c
and a
ret z
scf
ret
PlayerLogOffMenu:
2015-11-16 18:46:36 -08:00
xor a
scf
ret
PlayerDepositItemMenu:
2016-03-01 19:31:21 -08:00
call .CheckItemsInBag
jr c, .nope
2015-11-16 18:46:36 -08:00
call DisableSpriteUpdates
call LoadStandardMenuHeader
2017-12-24 09:47:30 -08:00
farcall DepositSellInitPackBuffers
2016-03-01 19:31:21 -08:00
.loop
2017-12-24 09:47:30 -08:00
farcall DepositSellPack
2018-01-11 12:36:11 -08:00
ld a, [wPackUsedItem]
2015-11-16 18:46:36 -08:00
and a
2016-03-01 19:31:21 -08:00
jr z, .close
call .TryDepositItem
2017-12-24 09:47:30 -08:00
farcall CheckRegisteredItem
2016-03-01 19:31:21 -08:00
jr .loop
2015-11-16 18:46:36 -08:00
2016-03-01 19:31:21 -08:00
.close
call CloseSubmenu
2015-11-16 18:46:36 -08:00
2016-03-01 19:31:21 -08:00
.nope
2015-11-16 18:46:36 -08:00
xor a
ret
.CheckItemsInBag:
2017-12-24 09:47:30 -08:00
farcall HasNoItems
2015-11-16 18:46:36 -08:00
ret nc
2016-03-01 19:31:21 -08:00
ld hl, .NoItemsInBag
2015-11-16 18:46:36 -08:00
call MenuTextBoxBackup
scf
ret
.NoItemsInBag:
2015-11-16 18:46:36 -08:00
; No items here!
text_far UnknownText_0x1c13df
text_end
2015-11-16 18:46:36 -08:00
.TryDepositItem:
2015-11-25 07:16:29 -08:00
ld a, [wSpriteUpdatesEnabled]
2015-11-16 18:46:36 -08:00
push af
ld a, $0
2015-11-25 07:16:29 -08:00
ld [wSpriteUpdatesEnabled], a
2017-12-24 09:47:30 -08:00
farcall CheckItemMenu
2015-11-16 18:46:36 -08:00
ld a, [wItemAttributeParamBuffer]
2015-12-26 18:59:03 -08:00
ld hl, .dw
2015-11-16 18:46:36 -08:00
rst JumpTable
pop af
2015-11-25 07:16:29 -08:00
ld [wSpriteUpdatesEnabled], a
2015-11-16 18:46:36 -08:00
ret
2016-03-01 19:31:21 -08:00
.dw
; entries correspond to ITEMMENU_* constants
dw .tossable ; ITEMMENU_NOUSE
2015-11-16 18:46:36 -08:00
dw .no_toss
dw .no_toss
dw .no_toss
dw .tossable ; ITEMMENU_CURRENT
dw .tossable ; ITEMMENU_PARTY
dw .tossable ; ITEMMENU_CLOSE
2015-11-16 18:46:36 -08:00
2016-03-01 19:31:21 -08:00
.no_toss
2015-11-16 18:46:36 -08:00
ret
2016-03-01 19:31:21 -08:00
.tossable
2018-01-23 14:39:09 -08:00
ld a, [wBuffer1]
2015-11-16 18:46:36 -08:00
push af
2018-01-23 14:39:09 -08:00
ld a, [wBuffer2]
2015-11-16 18:46:36 -08:00
push af
call .DepositItem
2015-11-16 18:46:36 -08:00
pop af
2018-01-23 14:39:09 -08:00
ld [wBuffer2], a
2015-11-16 18:46:36 -08:00
pop af
2018-01-23 14:39:09 -08:00
ld [wBuffer1], a
2015-11-16 18:46:36 -08:00
ret
.DepositItem:
2017-12-24 09:47:30 -08:00
farcall _CheckTossableItem
2015-11-16 18:46:36 -08:00
ld a, [wItemAttributeParamBuffer]
and a
2016-03-01 19:31:21 -08:00
jr z, .AskQuantity
2015-11-16 18:46:36 -08:00
ld a, $1
ld [wItemQuantityChangeBuffer], a
jr .ContinueDeposit
2015-11-16 18:46:36 -08:00
.AskQuantity:
2015-11-16 18:46:36 -08:00
ld hl, .HowManyText
call MenuTextBox
2017-12-24 09:47:30 -08:00
farcall SelectQuantityToToss
2015-11-16 18:46:36 -08:00
push af
call ExitMenu
call ExitMenu
pop af
2016-03-01 19:31:21 -08:00
jr c, .DeclinedToDeposit
2015-11-16 18:46:36 -08:00
.ContinueDeposit:
2015-11-16 18:46:36 -08:00
ld a, [wItemQuantityChangeBuffer]
2018-01-23 14:39:09 -08:00
ld [wBuffer1], a
ld a, [wCurItemQuantity]
ld [wBuffer2], a
ld hl, wPCItems
2015-11-16 18:46:36 -08:00
call ReceiveItem
2016-03-01 19:31:21 -08:00
jr nc, .NoRoomInPC
2018-01-23 14:39:09 -08:00
ld a, [wBuffer1]
2015-11-16 18:46:36 -08:00
ld [wItemQuantityChangeBuffer], a
2018-01-23 14:39:09 -08:00
ld a, [wBuffer2]
ld [wCurItemQuantity], a
ld hl, wNumItems
2015-11-16 18:46:36 -08:00
call TossItem
predef PartyMonItemName
2015-11-16 18:46:36 -08:00
ld hl, .DepositText
call PrintText
ret
.NoRoomInPC:
2015-11-16 18:46:36 -08:00
ld hl, .NoRoomText
call PrintText
ret
.DeclinedToDeposit:
2015-11-16 18:46:36 -08:00
and a
ret
.HowManyText:
text_far _PlayersPCHowManyDepositText
text_end
2015-11-16 18:46:36 -08:00
.DepositText:
text_far _PlayersPCDepositItemsText
text_end
2015-11-16 18:46:36 -08:00
.NoRoomText:
text_far _PlayersPCNoRoomDepositText
text_end
2015-11-16 18:46:36 -08:00
PlayerMailBoxMenu:
2018-01-22 16:10:09 -08:00
farcall _PlayerMailBoxMenu
2015-11-16 18:46:36 -08:00
xor a
ret
PCItemsJoypad:
2015-11-16 18:46:36 -08:00
xor a
2016-03-01 19:31:21 -08:00
ld [wSwitchItem], a
.loop
2015-11-25 07:16:29 -08:00
ld a, [wSpriteUpdatesEnabled]
2015-11-16 18:46:36 -08:00
push af
ld a, $0
2015-11-25 07:16:29 -08:00
ld [wSpriteUpdatesEnabled], a
2016-03-01 19:31:21 -08:00
ld hl, .PCItemsMenuData
call CopyMenuHeader
2015-11-16 18:46:36 -08:00
hlcoord 0, 0
2016-03-01 19:31:21 -08:00
ld b, 10
ld c, 18
2015-11-16 18:46:36 -08:00
call TextBox
2016-03-01 19:31:21 -08:00
ld a, [wPCItemsCursor]
2015-11-16 18:46:36 -08:00
ld [wMenuCursorBuffer], a
2016-03-01 19:31:21 -08:00
ld a, [wPCItemsScrollPosition]
2015-11-23 13:04:53 -08:00
ld [wMenuScrollPosition], a
2015-12-17 19:31:16 -08:00
call ScrollingMenu
2015-11-23 13:04:53 -08:00
ld a, [wMenuScrollPosition]
2016-03-01 19:31:21 -08:00
ld [wPCItemsScrollPosition], a
2015-12-15 15:59:49 -08:00
ld a, [wMenuCursorY]
2016-03-01 19:31:21 -08:00
ld [wPCItemsCursor], a
2015-11-16 18:46:36 -08:00
pop af
2015-11-25 07:16:29 -08:00
ld [wSpriteUpdatesEnabled], a
2016-03-01 19:31:21 -08:00
ld a, [wSwitchItem]
2015-11-16 18:46:36 -08:00
and a
2016-03-01 19:31:21 -08:00
jr nz, .moving_stuff_around
2015-12-15 15:59:49 -08:00
ld a, [wMenuJoypad]
2016-03-01 19:31:21 -08:00
cp B_BUTTON
jr z, .b_1
cp A_BUTTON
jr z, .a_1
cp SELECT
jr z, .select_1
jr .next
.moving_stuff_around
2015-12-15 15:59:49 -08:00
ld a, [wMenuJoypad]
2016-03-01 19:31:21 -08:00
cp B_BUTTON
jr z, .b_2
cp A_BUTTON
jr z, .a_select_2
cp SELECT
jr z, .a_select_2
jr .next
.b_2
2015-11-16 18:46:36 -08:00
xor a
2016-03-01 19:31:21 -08:00
ld [wSwitchItem], a
jr .next
2015-11-16 18:46:36 -08:00
2016-03-01 19:31:21 -08:00
.a_select_2
call PC_PlaySwapItemsSound
.select_1
2017-12-24 09:47:30 -08:00
farcall SwitchItemsInBag
2016-03-01 19:31:21 -08:00
.next
jp .loop
2015-11-16 18:46:36 -08:00
2016-03-01 19:31:21 -08:00
.a_1
2017-12-24 09:47:30 -08:00
farcall ScrollingMenu_ClearLeftColumn
2015-12-17 19:31:16 -08:00
call PlaceHollowCursor
2015-11-16 18:46:36 -08:00
and a
ret
2016-03-01 19:31:21 -08:00
.b_1
2015-11-16 18:46:36 -08:00
scf
ret
.PCItemsMenuData:
db MENU_BACKUP_TILES ; flags
menu_coords 4, 1, 18, 10
dw .MenuData
2015-11-16 18:46:36 -08:00
db 1 ; default option
.MenuData:
db SCROLLINGMENU_ENABLE_SELECT | SCROLLINGMENU_ENABLE_FUNCTION3 | SCROLLINGMENU_DISPLAY_ARROWS ; flags
2015-11-16 18:46:36 -08:00
db 4, 8 ; rows/cols?
db 2 ; horizontal spacing?
2018-01-23 14:39:09 -08:00
dbw 0, wPCItems
2015-11-16 18:46:36 -08:00
dba PlaceMenuItemName
dba PlaceMenuItemQuantity
2015-11-23 13:04:53 -08:00
dba UpdateItemDescription
2015-11-16 18:46:36 -08:00
2018-06-24 07:09:41 -07:00
PC_DisplayText:
2015-11-16 18:46:36 -08:00
call MenuTextBox
call ExitMenu
ret
PokecenterPCText_BootedUpPC:
2015-11-16 18:46:36 -08:00
; turned on the PC.
text_far UnknownText_0x1c144d
text_end
2015-11-16 18:46:36 -08:00
PokecenterPCText_AccessWhosePC:
2015-11-16 18:46:36 -08:00
; Access whose PC?
text_far UnknownText_0x1c1462
text_end
2015-11-16 18:46:36 -08:00
PokecenterPCText_AccessedBillsPC:
2015-11-16 18:46:36 -08:00
; BILL's PC accessed. #MON Storage System opened.
text_far UnknownText_0x1c1474
text_end
2015-11-16 18:46:36 -08:00
PokecenterPCText_AccessedOwnPC:
2015-11-16 18:46:36 -08:00
; Accessed own PC. Item Storage System opened.
text_far UnknownText_0x1c14a4
text_end
2015-11-16 18:46:36 -08:00
PokecenterPCText_AccessedOaksPC:
2015-11-16 18:46:36 -08:00
; PROF.OAK's PC accessed. #DEX Rating System opened.
text_far UnknownText_0x1c14d2
text_end
2015-11-16 18:46:36 -08:00
PokecenterPCText_LinkClosed:
2015-11-16 18:46:36 -08:00
; … Link closed…
text_far UnknownText_0x1c1505
text_end