2017-12-16 01:10:54 +00:00
|
|
|
|
PlaceMenuItemName: ; 0x24ab4
|
|
|
|
|
push de
|
|
|
|
|
ld a, [MenuSelection]
|
|
|
|
|
ld [wNamedObjectIndexBuffer], a
|
|
|
|
|
call GetItemName
|
|
|
|
|
pop hl
|
|
|
|
|
call PlaceString
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
PlaceMenuItemQuantity: ; 0x24ac3
|
|
|
|
|
push de
|
|
|
|
|
ld a, [MenuSelection]
|
|
|
|
|
ld [CurItem], a
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall _CheckTossableItem
|
2017-12-16 01:10:54 +00:00
|
|
|
|
ld a, [wItemAttributeParamBuffer]
|
|
|
|
|
pop hl
|
|
|
|
|
and a
|
|
|
|
|
jr nz, .done
|
|
|
|
|
ld de, $15
|
|
|
|
|
add hl, de
|
|
|
|
|
ld [hl], "×"
|
|
|
|
|
inc hl
|
|
|
|
|
ld de, MenuSelectionQuantity
|
|
|
|
|
lb bc, 1, 2
|
|
|
|
|
call PrintNum
|
|
|
|
|
|
|
|
|
|
.done
|
|
|
|
|
ret
|
|
|
|
|
|
2018-01-24 16:17:05 +00:00
|
|
|
|
PlaceMoneyTopRight: ; 24ae8
|
2018-01-23 21:08:43 +00:00
|
|
|
|
ld hl, MenuHeader_0x24b15
|
|
|
|
|
call CopyMenuHeader
|
|
|
|
|
jr PlaceMoneyTextBox
|
2017-12-16 01:10:54 +00:00
|
|
|
|
|
|
|
|
|
PlaceMoneyBottomLeft: ; 24af0
|
2018-01-23 21:08:43 +00:00
|
|
|
|
ld hl, MenuHeader_0x24b1d
|
|
|
|
|
call CopyMenuHeader
|
|
|
|
|
jr PlaceMoneyTextBox
|
2017-12-16 01:10:54 +00:00
|
|
|
|
|
|
|
|
|
PlaceMoneyAtTopLeftOfTextbox: ; 24af8
|
2018-01-23 21:08:43 +00:00
|
|
|
|
ld hl, MenuHeader_0x24b15
|
2017-12-16 01:10:54 +00:00
|
|
|
|
lb de, 0, 11
|
2018-01-23 21:08:43 +00:00
|
|
|
|
call OffsetMenuHeader
|
2017-12-16 01:10:54 +00:00
|
|
|
|
|
2018-01-23 21:08:43 +00:00
|
|
|
|
PlaceMoneyTextBox: ; 24b01
|
2017-12-16 01:10:54 +00:00
|
|
|
|
call MenuBox
|
|
|
|
|
call MenuBoxCoord2Tile
|
|
|
|
|
ld de, SCREEN_WIDTH + 1
|
|
|
|
|
add hl, de
|
|
|
|
|
ld de, Money
|
|
|
|
|
lb bc, PRINTNUM_MONEY | 3, 6
|
|
|
|
|
call PrintNum
|
|
|
|
|
ret
|
|
|
|
|
|
2018-01-23 21:08:43 +00:00
|
|
|
|
MenuHeader_0x24b15: ; 0x24b15
|
2018-01-14 10:59:56 +00:00
|
|
|
|
db MENU_BACKUP_TILES ; flags
|
2018-01-13 21:38:14 +00:00
|
|
|
|
menu_coords 11, 0, SCREEN_WIDTH - 1, 2
|
2017-12-16 01:10:54 +00:00
|
|
|
|
dw NULL
|
|
|
|
|
db 1 ; default option
|
|
|
|
|
|
2018-01-23 21:08:43 +00:00
|
|
|
|
MenuHeader_0x24b1d: ; 0x24b1d
|
2018-01-14 10:59:56 +00:00
|
|
|
|
db MENU_BACKUP_TILES ; flags
|
2018-01-13 21:38:14 +00:00
|
|
|
|
menu_coords 0, 11, 8, 13
|
2017-12-16 01:10:54 +00:00
|
|
|
|
dw NULL
|
|
|
|
|
db 1 ; default option
|
|
|
|
|
|
2018-01-24 16:17:05 +00:00
|
|
|
|
DisplayCoinCaseBalance: ; 24b25
|
2017-12-16 01:10:54 +00:00
|
|
|
|
; Place a text box of size 1x7 at 11, 0.
|
|
|
|
|
hlcoord 11, 0
|
|
|
|
|
ld b, 1
|
|
|
|
|
ld c, 7
|
|
|
|
|
call TextBox
|
|
|
|
|
hlcoord 12, 0
|
|
|
|
|
ld de, CoinString
|
|
|
|
|
call PlaceString
|
|
|
|
|
hlcoord 17, 1
|
|
|
|
|
ld de, ShowMoney_TerminatorString
|
|
|
|
|
call PlaceString
|
|
|
|
|
ld de, Coins
|
|
|
|
|
lb bc, 2, 4
|
|
|
|
|
hlcoord 13, 1
|
|
|
|
|
call PrintNum
|
|
|
|
|
ret
|
|
|
|
|
|
2018-01-24 16:17:05 +00:00
|
|
|
|
DisplayMoneyAndCoinBalance: ; 24b4e
|
2017-12-16 01:10:54 +00:00
|
|
|
|
hlcoord 5, 0
|
|
|
|
|
ld b, 3
|
|
|
|
|
ld c, 13
|
|
|
|
|
call TextBox
|
|
|
|
|
hlcoord 6, 1
|
|
|
|
|
ld de, MoneyString
|
|
|
|
|
call PlaceString
|
|
|
|
|
hlcoord 12, 1
|
|
|
|
|
ld de, Money
|
|
|
|
|
lb bc, PRINTNUM_MONEY | 3, 6
|
|
|
|
|
call PrintNum
|
|
|
|
|
hlcoord 6, 3
|
|
|
|
|
ld de, CoinString
|
|
|
|
|
call PlaceString
|
|
|
|
|
hlcoord 15, 3
|
|
|
|
|
ld de, Coins
|
|
|
|
|
lb bc, 2, 4
|
|
|
|
|
call PrintNum
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
MoneyString: ; 24b83
|
|
|
|
|
db "MONEY@"
|
|
|
|
|
CoinString: ; 24b89
|
|
|
|
|
db "COIN@"
|
|
|
|
|
ShowMoney_TerminatorString: ; 24b8e
|
|
|
|
|
db "@"
|
|
|
|
|
|
2018-01-02 15:04:21 +00:00
|
|
|
|
Unreferenced_Function24b8f: ; 24b8f
|
|
|
|
|
; related to safari?
|
2017-12-16 01:10:54 +00:00
|
|
|
|
ld hl, Options
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
push af
|
|
|
|
|
set NO_TEXT_SCROLL, [hl]
|
|
|
|
|
hlcoord 0, 0
|
|
|
|
|
ld b, 3
|
|
|
|
|
ld c, 7
|
|
|
|
|
call TextBox
|
|
|
|
|
hlcoord 1, 1
|
|
|
|
|
ld de, wSafariTimeRemaining
|
|
|
|
|
lb bc, 2, 3
|
|
|
|
|
call PrintNum
|
|
|
|
|
hlcoord 4, 1
|
|
|
|
|
ld de, .slash_500
|
|
|
|
|
call PlaceString
|
|
|
|
|
hlcoord 1, 3
|
|
|
|
|
ld de, .booru_ko
|
|
|
|
|
call PlaceString
|
|
|
|
|
hlcoord 5, 3
|
|
|
|
|
ld de, wSafariBallsRemaining
|
|
|
|
|
lb bc, 1, 2
|
|
|
|
|
call PrintNum
|
|
|
|
|
pop af
|
|
|
|
|
ld [Options], a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.slash_500 ; 24bcf
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "/500@"
|
2017-12-16 01:10:54 +00:00
|
|
|
|
.booru_ko ; 24bd4
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "ボール こ@"
|
2017-12-16 01:10:54 +00:00
|
|
|
|
|
|
|
|
|
StartMenu_DrawBugContestStatusBox: ; 24bdc
|
|
|
|
|
hlcoord 0, 0
|
|
|
|
|
ld b, 5
|
|
|
|
|
ld c, 17
|
|
|
|
|
call TextBox
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
StartMenu_PrintBugContestStatus: ; 24be7
|
|
|
|
|
ld hl, Options
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
push af
|
|
|
|
|
set NO_TEXT_SCROLL, [hl]
|
|
|
|
|
call StartMenu_DrawBugContestStatusBox
|
|
|
|
|
hlcoord 1, 5
|
|
|
|
|
ld de, .Balls_EN
|
|
|
|
|
call PlaceString
|
|
|
|
|
hlcoord 8, 5
|
|
|
|
|
ld de, wParkBallsRemaining
|
|
|
|
|
lb bc, PRINTNUM_RIGHTALIGN | 1, 2
|
|
|
|
|
call PrintNum
|
|
|
|
|
hlcoord 1, 1
|
|
|
|
|
ld de, .CAUGHT
|
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, [wContestMon]
|
|
|
|
|
and a
|
|
|
|
|
ld de, .None
|
|
|
|
|
jr z, .no_contest_mon
|
|
|
|
|
ld [wd265], a
|
|
|
|
|
call GetPokemonName
|
|
|
|
|
|
|
|
|
|
.no_contest_mon
|
|
|
|
|
hlcoord 8, 1
|
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, [wContestMon]
|
|
|
|
|
and a
|
|
|
|
|
jr z, .skip_level
|
|
|
|
|
hlcoord 1, 3
|
|
|
|
|
ld de, .LEVEL
|
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, [wContestMonLevel]
|
|
|
|
|
ld h, b
|
|
|
|
|
ld l, c
|
|
|
|
|
inc hl
|
|
|
|
|
ld c, 3
|
|
|
|
|
call Print8BitNumRightAlign
|
|
|
|
|
|
|
|
|
|
.skip_level
|
|
|
|
|
pop af
|
|
|
|
|
ld [Options], a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.Balls_JP: ; 24c43
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "ボール こ@"
|
2017-12-16 01:10:54 +00:00
|
|
|
|
.CAUGHT: ; 24c4b
|
|
|
|
|
db "CAUGHT@"
|
|
|
|
|
.Balls_EN: ; 24c52
|
|
|
|
|
db "BALLS:@"
|
|
|
|
|
.None: ; 24c59
|
|
|
|
|
db "None@"
|
|
|
|
|
.LEVEL: ; 24c5e
|
|
|
|
|
db "LEVEL@"
|
|
|
|
|
|
|
|
|
|
FindApricornsInBag: ; 24c64
|
|
|
|
|
; Checks the bag for Apricorns.
|
|
|
|
|
ld hl, Buffer1
|
|
|
|
|
xor a
|
|
|
|
|
ld [hli], a
|
|
|
|
|
dec a
|
|
|
|
|
ld bc, 10
|
|
|
|
|
call ByteFill
|
|
|
|
|
|
2018-01-11 06:45:27 +00:00
|
|
|
|
ld hl, ApricornBalls
|
2017-12-16 01:10:54 +00:00
|
|
|
|
.loop
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
cp -1
|
|
|
|
|
jr z, .done
|
|
|
|
|
push hl
|
|
|
|
|
ld [CurItem], a
|
|
|
|
|
ld hl, NumItems
|
|
|
|
|
call CheckItem
|
|
|
|
|
pop hl
|
|
|
|
|
jr nc, .nope
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
call .addtobuffer
|
|
|
|
|
.nope
|
|
|
|
|
inc hl
|
|
|
|
|
inc hl
|
|
|
|
|
jr .loop
|
|
|
|
|
|
|
|
|
|
.done
|
|
|
|
|
ld a, [Buffer1]
|
|
|
|
|
and a
|
|
|
|
|
ret nz
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.addtobuffer ; 24c94
|
|
|
|
|
push hl
|
|
|
|
|
ld hl, Buffer1
|
|
|
|
|
inc [hl]
|
|
|
|
|
ld e, [hl]
|
|
|
|
|
ld d, 0
|
|
|
|
|
add hl, de
|
|
|
|
|
ld [hl], a
|
|
|
|
|
pop hl
|
|
|
|
|
ret
|
|
|
|
|
|
2018-01-11 06:45:27 +00:00
|
|
|
|
INCLUDE "data/items/apricorn_balls.asm"
|