2018-06-24 14:09:41 +00:00
|
|
|
|
SelectMonFromParty:
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call DisableSpriteUpdates
|
|
|
|
|
xor a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wPartyMenuActionText], a
|
2015-11-12 04:38:57 +00:00
|
|
|
|
call ClearBGPalettes
|
2016-01-04 13:43:55 +00:00
|
|
|
|
call InitPartyMenuLayout
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call WaitBGMap
|
2015-11-12 04:38:57 +00:00
|
|
|
|
call SetPalettes
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call DelayFrame
|
|
|
|
|
call PartyMenuSelect
|
2015-12-19 01:07:09 +00:00
|
|
|
|
call ReturnToMapWithSpeechTextbox
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
SelectTradeOrDayCareMon:
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld a, b
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wPartyMenuActionText], a
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call DisableSpriteUpdates
|
2015-11-12 04:38:57 +00:00
|
|
|
|
call ClearBGPalettes
|
2016-01-04 13:43:55 +00:00
|
|
|
|
call InitPartyMenuLayout
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call WaitBGMap
|
2016-06-06 22:23:00 +00:00
|
|
|
|
ld b, SCGB_PARTY_MENU
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call GetSGBLayout
|
2015-11-12 04:38:57 +00:00
|
|
|
|
call SetPalettes
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call DelayFrame
|
|
|
|
|
call PartyMenuSelect
|
2015-12-19 01:07:09 +00:00
|
|
|
|
call ReturnToMapWithSpeechTextbox
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
InitPartyMenuLayout:
|
2015-11-19 04:16:25 +00:00
|
|
|
|
call LoadPartyMenuGFX
|
|
|
|
|
call InitPartyMenuWithCancel
|
|
|
|
|
call InitPartyMenuGFX
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call WritePartyMenuTilemap
|
|
|
|
|
call PrintPartyMenuText
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
LoadPartyMenuGFX:
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call LoadFontsBattleExtra
|
2020-11-17 16:12:21 +00:00
|
|
|
|
callfar InitPartyMenuPalettes
|
2017-12-24 17:47:30 +00:00
|
|
|
|
callfar ClearSpriteAnims2
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
|
WritePartyMenuTilemap:
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wOptions
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld a, [hl]
|
|
|
|
|
push af
|
2018-01-11 07:54:07 +00:00
|
|
|
|
set NO_TEXT_SCROLL, [hl]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
xor a
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [hBGMapMode], a
|
2015-11-09 22:00:25 +00:00
|
|
|
|
hlcoord 0, 0
|
|
|
|
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
|
|
|
|
ld a, " "
|
|
|
|
|
call ByteFill ; blank the tilemap
|
2018-01-11 06:45:27 +00:00
|
|
|
|
call GetPartyMenuQualityIndexes
|
2015-11-09 22:00:25 +00:00
|
|
|
|
.loop
|
|
|
|
|
ld a, [hli]
|
2018-01-11 06:45:27 +00:00
|
|
|
|
cp -1
|
|
|
|
|
jr z, .end
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push hl
|
2015-11-12 04:38:57 +00:00
|
|
|
|
ld hl, .Jumptable
|
2015-11-09 22:00:25 +00:00
|
|
|
|
rst JumpTable
|
|
|
|
|
pop hl
|
2018-01-11 06:45:27 +00:00
|
|
|
|
jr .loop
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.end
|
2015-11-09 22:00:25 +00:00
|
|
|
|
pop af
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wOptions], a
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.Jumptable:
|
2018-01-11 06:45:27 +00:00
|
|
|
|
; entries correspond to PARTYMENUQUALITY_* constants
|
2015-11-12 04:38:57 +00:00
|
|
|
|
dw PlacePartyNicknames
|
|
|
|
|
dw PlacePartyHPBar
|
|
|
|
|
dw PlacePartyMenuHPDigits
|
|
|
|
|
dw PlacePartyMonLevel
|
|
|
|
|
dw PlacePartyMonStatus
|
|
|
|
|
dw PlacePartyMonTMHMCompatibility
|
|
|
|
|
dw PlacePartyMonEvoStoneCompatibility
|
|
|
|
|
dw PlacePartyMonGender
|
|
|
|
|
dw PlacePartyMonMobileBattleSelection
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
PlacePartyNicknames:
|
2015-11-09 22:00:25 +00:00
|
|
|
|
hlcoord 3, 1
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
and a
|
2015-11-12 04:38:57 +00:00
|
|
|
|
jr z, .end
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld c, a
|
2018-10-24 19:33:18 +00:00
|
|
|
|
ld b, 0
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.loop
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push bc
|
|
|
|
|
push hl
|
|
|
|
|
push hl
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPartyMonNicknames
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld a, b
|
|
|
|
|
call GetNick
|
|
|
|
|
pop hl
|
|
|
|
|
call PlaceString
|
|
|
|
|
pop hl
|
2015-11-12 04:38:57 +00:00
|
|
|
|
ld de, 2 * SCREEN_WIDTH
|
2015-11-09 22:00:25 +00:00
|
|
|
|
add hl, de
|
|
|
|
|
pop bc
|
|
|
|
|
inc b
|
|
|
|
|
dec c
|
2015-11-12 04:38:57 +00:00
|
|
|
|
jr nz, .loop
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.end
|
2015-11-09 22:00:25 +00:00
|
|
|
|
dec hl
|
2016-05-04 15:46:23 +00:00
|
|
|
|
dec hl
|
2020-05-29 11:16:49 +00:00
|
|
|
|
ld de, .CancelString
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call PlaceString
|
|
|
|
|
ret
|
|
|
|
|
|
2020-05-29 11:16:49 +00:00
|
|
|
|
.CancelString:
|
2015-11-09 22:00:25 +00:00
|
|
|
|
db "CANCEL@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
PlacePartyHPBar:
|
2015-11-09 22:00:25 +00:00
|
|
|
|
xor a
|
2015-12-22 23:03:00 +00:00
|
|
|
|
ld [wSGBPals], a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
ld c, a
|
2018-10-24 19:33:18 +00:00
|
|
|
|
ld b, 0
|
2015-11-09 22:00:25 +00:00
|
|
|
|
hlcoord 11, 2
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.loop
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2015-11-12 04:38:57 +00:00
|
|
|
|
call PartyMenuCheckEgg
|
2015-11-09 22:00:25 +00:00
|
|
|
|
jr z, .skip
|
|
|
|
|
push hl
|
2015-11-12 04:38:57 +00:00
|
|
|
|
call PlacePartymonHPBar
|
2015-11-09 22:00:25 +00:00
|
|
|
|
pop hl
|
2015-11-12 04:38:57 +00:00
|
|
|
|
ld d, $6
|
|
|
|
|
ld b, $0
|
|
|
|
|
call DrawBattleHPBar
|
2015-12-23 03:19:33 +00:00
|
|
|
|
ld hl, wHPPals
|
2015-12-22 23:03:00 +00:00
|
|
|
|
ld a, [wSGBPals]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld c, a
|
2020-11-09 20:17:03 +00:00
|
|
|
|
ld b, 0
|
2015-11-09 22:00:25 +00:00
|
|
|
|
add hl, bc
|
|
|
|
|
call SetHPPal
|
2020-07-04 20:18:16 +00:00
|
|
|
|
ld b, SCGB_PARTY_MENU_HP_BARS
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call GetSGBLayout
|
|
|
|
|
.skip
|
2015-12-22 23:03:00 +00:00
|
|
|
|
ld hl, wSGBPals
|
2015-11-09 22:00:25 +00:00
|
|
|
|
inc [hl]
|
|
|
|
|
pop hl
|
2015-11-12 04:38:57 +00:00
|
|
|
|
ld de, 2 * SCREEN_WIDTH
|
2015-11-09 22:00:25 +00:00
|
|
|
|
add hl, de
|
|
|
|
|
pop bc
|
|
|
|
|
inc b
|
|
|
|
|
dec c
|
2015-11-12 04:38:57 +00:00
|
|
|
|
jr nz, .loop
|
2016-06-06 22:23:00 +00:00
|
|
|
|
ld b, SCGB_PARTY_MENU
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call GetSGBLayout
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
PlacePartymonHPBar:
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld a, b
|
2015-11-12 04:38:57 +00:00
|
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPartyMon1HP
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call AddNTimes
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
or [hl]
|
2015-11-12 04:38:57 +00:00
|
|
|
|
jr nz, .not_fainted
|
2015-11-09 22:00:25 +00:00
|
|
|
|
xor a
|
|
|
|
|
ld e, a
|
|
|
|
|
ld c, a
|
|
|
|
|
ret
|
|
|
|
|
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.not_fainted
|
2015-11-09 22:00:25 +00:00
|
|
|
|
dec hl
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
2018-01-16 19:30:10 +00:00
|
|
|
|
predef ComputeHPBarPixels
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
PlacePartyMenuHPDigits:
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
ld c, a
|
2018-10-24 19:33:18 +00:00
|
|
|
|
ld b, 0
|
2015-11-09 22:00:25 +00:00
|
|
|
|
hlcoord 13, 1
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.loop
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2015-11-12 04:38:57 +00:00
|
|
|
|
call PartyMenuCheckEgg
|
|
|
|
|
jr z, .next
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push hl
|
|
|
|
|
ld a, b
|
2015-11-12 04:38:57 +00:00
|
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPartyMon1HP
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call AddNTimes
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
pop hl
|
|
|
|
|
push de
|
|
|
|
|
lb bc, 2, 3
|
|
|
|
|
call PrintNum
|
|
|
|
|
pop de
|
2015-11-12 04:38:57 +00:00
|
|
|
|
ld a, "/"
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld [hli], a
|
|
|
|
|
inc de
|
2016-05-04 15:46:23 +00:00
|
|
|
|
inc de
|
2015-11-09 22:00:25 +00:00
|
|
|
|
lb bc, 2, 3
|
|
|
|
|
call PrintNum
|
|
|
|
|
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.next
|
2015-11-09 22:00:25 +00:00
|
|
|
|
pop hl
|
2015-11-12 04:38:57 +00:00
|
|
|
|
ld de, 2 * SCREEN_WIDTH
|
2015-11-09 22:00:25 +00:00
|
|
|
|
add hl, de
|
|
|
|
|
pop bc
|
|
|
|
|
inc b
|
|
|
|
|
dec c
|
2015-11-12 04:38:57 +00:00
|
|
|
|
jr nz, .loop
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
PlacePartyMonLevel:
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, 0
|
|
|
|
|
hlcoord 8, 2
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.loop
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2015-11-12 04:38:57 +00:00
|
|
|
|
call PartyMenuCheckEgg
|
|
|
|
|
jr z, .next
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push hl
|
|
|
|
|
ld a, b
|
2015-11-12 04:38:57 +00:00
|
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPartyMon1Level
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call AddNTimes
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [de]
|
|
|
|
|
cp 100 ; This is distinct from MAX_LEVEL.
|
2015-11-12 04:38:57 +00:00
|
|
|
|
jr nc, .ThreeDigits
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld a, "<LV>"
|
|
|
|
|
ld [hli], a
|
2019-11-04 01:17:04 +00:00
|
|
|
|
lb bc, PRINTNUM_LEFTALIGN | 1, 2
|
2015-11-12 04:38:57 +00:00
|
|
|
|
; jr .okay
|
2016-04-10 18:42:14 +00:00
|
|
|
|
.ThreeDigits:
|
2019-11-04 01:17:04 +00:00
|
|
|
|
lb bc, PRINTNUM_LEFTALIGN | 1, 3
|
2015-11-12 04:38:57 +00:00
|
|
|
|
; .okay
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call PrintNum
|
|
|
|
|
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.next
|
2015-11-09 22:00:25 +00:00
|
|
|
|
pop hl
|
|
|
|
|
ld de, SCREEN_WIDTH * 2
|
|
|
|
|
add hl, de
|
|
|
|
|
pop bc
|
|
|
|
|
inc b
|
|
|
|
|
dec c
|
2015-11-12 04:38:57 +00:00
|
|
|
|
jr nz, .loop
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
PlacePartyMonStatus:
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, 0
|
|
|
|
|
hlcoord 5, 2
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.loop
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2015-11-12 04:38:57 +00:00
|
|
|
|
call PartyMenuCheckEgg
|
|
|
|
|
jr z, .next
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push hl
|
|
|
|
|
ld a, b
|
2015-11-12 04:38:57 +00:00
|
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPartyMon1Status
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call AddNTimes
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
pop hl
|
2018-01-16 19:30:10 +00:00
|
|
|
|
call PlaceStatusString
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.next
|
2015-11-09 22:00:25 +00:00
|
|
|
|
pop hl
|
|
|
|
|
ld de, SCREEN_WIDTH * 2
|
|
|
|
|
add hl, de
|
|
|
|
|
pop bc
|
|
|
|
|
inc b
|
|
|
|
|
dec c
|
2015-11-12 04:38:57 +00:00
|
|
|
|
jr nz, .loop
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
PlacePartyMonTMHMCompatibility:
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, 0
|
|
|
|
|
hlcoord 12, 2
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.loop
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2015-11-12 04:38:57 +00:00
|
|
|
|
call PartyMenuCheckEgg
|
|
|
|
|
jr z, .next
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push hl
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPartySpecies
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld e, b
|
|
|
|
|
ld d, 0
|
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hl]
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wCurPartySpecies], a
|
2018-01-16 19:30:10 +00:00
|
|
|
|
predef CanLearnTMHMMove
|
2015-11-09 22:00:25 +00:00
|
|
|
|
pop hl
|
2015-11-12 04:38:57 +00:00
|
|
|
|
call .PlaceAbleNotAble
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call PlaceString
|
|
|
|
|
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.next
|
2015-11-09 22:00:25 +00:00
|
|
|
|
pop hl
|
|
|
|
|
ld de, SCREEN_WIDTH * 2
|
|
|
|
|
add hl, de
|
|
|
|
|
pop bc
|
|
|
|
|
inc b
|
|
|
|
|
dec c
|
2015-11-12 04:38:57 +00:00
|
|
|
|
jr nz, .loop
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.PlaceAbleNotAble:
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld a, c
|
|
|
|
|
and a
|
2015-11-12 04:38:57 +00:00
|
|
|
|
jr nz, .able
|
|
|
|
|
ld de, .string_not_able
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.able
|
|
|
|
|
ld de, .string_able
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.string_able
|
2015-11-09 22:00:25 +00:00
|
|
|
|
db "ABLE@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.string_not_able
|
2015-11-09 22:00:25 +00:00
|
|
|
|
db "NOT ABLE@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
PlacePartyMonEvoStoneCompatibility:
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, 0
|
|
|
|
|
hlcoord 12, 2
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.loop
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2015-11-12 04:38:57 +00:00
|
|
|
|
call PartyMenuCheckEgg
|
|
|
|
|
jr z, .next
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push hl
|
|
|
|
|
ld a, b
|
2015-11-12 04:38:57 +00:00
|
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPartyMon1Species
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call AddNTimes
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
dec a
|
|
|
|
|
ld e, a
|
|
|
|
|
ld d, 0
|
|
|
|
|
ld hl, EvosAttacksPointers
|
|
|
|
|
add hl, de
|
2016-05-04 15:46:23 +00:00
|
|
|
|
add hl, de
|
2015-11-12 04:38:57 +00:00
|
|
|
|
call .DetermineCompatibility
|
2015-11-09 22:00:25 +00:00
|
|
|
|
pop hl
|
|
|
|
|
call PlaceString
|
|
|
|
|
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.next
|
2015-11-09 22:00:25 +00:00
|
|
|
|
pop hl
|
2015-11-12 04:38:57 +00:00
|
|
|
|
ld de, 2 * SCREEN_WIDTH
|
2015-11-09 22:00:25 +00:00
|
|
|
|
add hl, de
|
|
|
|
|
pop bc
|
|
|
|
|
inc b
|
|
|
|
|
dec c
|
2015-11-12 04:38:57 +00:00
|
|
|
|
jr nz, .loop
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.DetermineCompatibility:
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld de, wStringBuffer1
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld a, BANK(EvosAttacksPointers)
|
|
|
|
|
ld bc, 2
|
|
|
|
|
call FarCopyBytes
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wStringBuffer1
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld h, [hl]
|
|
|
|
|
ld l, a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld de, wStringBuffer1
|
2018-06-13 03:29:15 +00:00
|
|
|
|
ld a, BANK("Evolutions and Attacks")
|
2018-01-26 19:36:59 +00:00
|
|
|
|
ld bc, 10
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call FarCopyBytes
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wStringBuffer1
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.loop2
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
and a
|
2015-11-12 04:38:57 +00:00
|
|
|
|
jr z, .nope
|
2015-11-09 22:00:25 +00:00
|
|
|
|
inc hl
|
2016-05-04 15:46:23 +00:00
|
|
|
|
inc hl
|
2015-11-09 22:00:25 +00:00
|
|
|
|
cp EVOLVE_ITEM
|
2015-11-12 04:38:57 +00:00
|
|
|
|
jr nz, .loop2
|
2015-11-09 22:00:25 +00:00
|
|
|
|
dec hl
|
2016-05-04 15:46:23 +00:00
|
|
|
|
dec hl
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wCurItem]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
cp [hl]
|
|
|
|
|
inc hl
|
2016-05-04 15:46:23 +00:00
|
|
|
|
inc hl
|
2015-11-12 04:38:57 +00:00
|
|
|
|
jr nz, .loop2
|
|
|
|
|
ld de, .string_able
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.nope
|
|
|
|
|
ld de, .string_not_able
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.string_able
|
2015-11-09 22:00:25 +00:00
|
|
|
|
db "ABLE@"
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.string_not_able
|
2015-11-09 22:00:25 +00:00
|
|
|
|
db "NOT ABLE@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
PlacePartyMonGender:
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, 0
|
|
|
|
|
hlcoord 12, 2
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.loop
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2015-11-12 04:38:57 +00:00
|
|
|
|
call PartyMenuCheckEgg
|
|
|
|
|
jr z, .next
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wCurPartySpecies], a
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push hl
|
|
|
|
|
ld a, b
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wCurPartyMon], a
|
2015-11-09 22:00:25 +00:00
|
|
|
|
xor a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wMonType], a
|
2018-01-16 19:30:10 +00:00
|
|
|
|
call GetGender
|
2015-11-12 04:38:57 +00:00
|
|
|
|
ld de, .unknown
|
|
|
|
|
jr c, .got_gender
|
|
|
|
|
ld de, .male
|
|
|
|
|
jr nz, .got_gender
|
|
|
|
|
ld de, .female
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.got_gender
|
2015-11-09 22:00:25 +00:00
|
|
|
|
pop hl
|
|
|
|
|
call PlaceString
|
|
|
|
|
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.next
|
2015-11-09 22:00:25 +00:00
|
|
|
|
pop hl
|
2015-11-12 04:38:57 +00:00
|
|
|
|
ld de, 2 * SCREEN_WIDTH
|
2015-11-09 22:00:25 +00:00
|
|
|
|
add hl, de
|
|
|
|
|
pop bc
|
|
|
|
|
inc b
|
|
|
|
|
dec c
|
2015-11-12 04:38:57 +00:00
|
|
|
|
jr nz, .loop
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.male
|
2015-11-09 22:00:25 +00:00
|
|
|
|
db "♂…MALE@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.female
|
2015-11-09 22:00:25 +00:00
|
|
|
|
db "♀…FEMALE@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.unknown
|
2015-11-09 22:00:25 +00:00
|
|
|
|
db "…UNKNOWN@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
PlacePartyMonMobileBattleSelection:
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, 0
|
|
|
|
|
hlcoord 12, 1
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.loop
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2015-11-12 04:38:57 +00:00
|
|
|
|
ld de, .String_Sanka_Shinai
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call PlaceString
|
|
|
|
|
pop hl
|
2015-11-12 04:38:57 +00:00
|
|
|
|
ld de, 2 * SCREEN_WIDTH
|
2015-11-09 22:00:25 +00:00
|
|
|
|
add hl, de
|
|
|
|
|
pop bc
|
|
|
|
|
inc b
|
|
|
|
|
dec c
|
2015-11-12 04:38:57 +00:00
|
|
|
|
jr nz, .loop
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld a, l
|
2018-01-20 17:25:55 +00:00
|
|
|
|
ld e, MON_NAME_LENGTH
|
2015-11-09 22:00:25 +00:00
|
|
|
|
sub e
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, h
|
|
|
|
|
sbc $0
|
|
|
|
|
ld h, a
|
2015-11-12 04:38:57 +00:00
|
|
|
|
ld de, .String_Kettei_Yameru
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call PlaceString
|
|
|
|
|
ld b, $3
|
|
|
|
|
ld c, $0
|
2015-11-11 00:51:13 +00:00
|
|
|
|
ld hl, wd002
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld a, [hl]
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.loop2
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
hlcoord 12, 1
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.loop3
|
2015-11-09 22:00:25 +00:00
|
|
|
|
and a
|
2015-11-12 04:38:57 +00:00
|
|
|
|
jr z, .done
|
|
|
|
|
ld de, 2 * SCREEN_WIDTH
|
2015-11-09 22:00:25 +00:00
|
|
|
|
add hl, de
|
|
|
|
|
dec a
|
2015-11-12 04:38:57 +00:00
|
|
|
|
jr .loop3
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.done
|
|
|
|
|
ld de, .String_Banme
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push hl
|
|
|
|
|
call PlaceString
|
|
|
|
|
pop hl
|
|
|
|
|
pop bc
|
|
|
|
|
push bc
|
|
|
|
|
push hl
|
|
|
|
|
ld a, c
|
2015-11-12 04:38:57 +00:00
|
|
|
|
ld hl, .Strings_1_2_3
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call GetNthString
|
|
|
|
|
ld d, h
|
|
|
|
|
ld e, l
|
|
|
|
|
pop hl
|
|
|
|
|
call PlaceString
|
|
|
|
|
pop bc
|
|
|
|
|
pop hl
|
|
|
|
|
inc hl
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
inc c
|
|
|
|
|
dec b
|
|
|
|
|
ret z
|
2015-11-12 04:38:57 +00:00
|
|
|
|
jr .loop2
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.String_Banme:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db " ばんめ @" ; Place
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.String_Sanka_Shinai:
|
2015-11-09 22:00:25 +00:00
|
|
|
|
db "さんかしない@" ; Cancel
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.String_Kettei_Yameru:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "けってい やめる@" ; Quit
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.Strings_1_2_3:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "1@", "2@", "3@" ; 1st, 2nd, 3rd
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
PartyMenuCheckEgg:
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, LOW(wPartySpecies)
|
2015-11-09 22:00:25 +00:00
|
|
|
|
add b
|
|
|
|
|
ld e, a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, HIGH(wPartySpecies)
|
2015-11-09 22:00:25 +00:00
|
|
|
|
adc 0
|
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [de]
|
|
|
|
|
cp EGG
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
GetPartyMenuQualityIndexes:
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyMenuActionText]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
and $f0
|
2015-11-12 04:38:57 +00:00
|
|
|
|
jr nz, .skip
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyMenuActionText]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
and $f
|
|
|
|
|
ld e, a
|
|
|
|
|
ld d, 0
|
2018-01-11 07:54:07 +00:00
|
|
|
|
ld hl, PartyMenuQualityPointers
|
2015-11-09 22:00:25 +00:00
|
|
|
|
add hl, de
|
2016-05-04 15:46:23 +00:00
|
|
|
|
add hl, de
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld h, [hl]
|
|
|
|
|
ld l, a
|
|
|
|
|
ret
|
|
|
|
|
|
2015-11-12 04:38:57 +00:00
|
|
|
|
.skip
|
2018-01-11 07:54:07 +00:00
|
|
|
|
ld hl, PartyMenuQualityPointers.Default
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-01-11 07:54:07 +00:00
|
|
|
|
INCLUDE "data/party_menu_qualities.asm"
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
InitPartyMenuGFX:
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPartyCount
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
ld c, a
|
|
|
|
|
xor a
|
2020-12-23 21:54:28 +00:00
|
|
|
|
ldh [hObjectStructIndex], a
|
2015-11-19 04:16:25 +00:00
|
|
|
|
.loop
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2016-03-02 03:31:21 +00:00
|
|
|
|
ld hl, LoadMenuMonIcon
|
|
|
|
|
ld a, BANK(LoadMenuMonIcon)
|
2018-07-28 23:27:34 +00:00
|
|
|
|
ld e, MONICON_PARTYMENU
|
2015-11-09 22:00:25 +00:00
|
|
|
|
rst FarCall
|
2020-12-23 21:54:28 +00:00
|
|
|
|
ldh a, [hObjectStructIndex]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
inc a
|
2020-12-23 21:54:28 +00:00
|
|
|
|
ldh [hObjectStructIndex], a
|
2015-11-09 22:00:25 +00:00
|
|
|
|
pop hl
|
|
|
|
|
pop bc
|
|
|
|
|
dec c
|
2015-11-19 04:16:25 +00:00
|
|
|
|
jr nz, .loop
|
2017-12-24 17:47:30 +00:00
|
|
|
|
callfar PlaySpriteAnimations
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
2015-11-12 04:38:57 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
InitPartyMenuWithCancel:
|
2015-11-19 04:16:25 +00:00
|
|
|
|
; with cancel
|
2015-11-09 22:00:25 +00:00
|
|
|
|
xor a
|
2015-11-19 04:16:25 +00:00
|
|
|
|
ld [wSwitchMon], a
|
2020-06-20 15:56:18 +00:00
|
|
|
|
ld de, PartyMenu2DMenuData
|
|
|
|
|
call Load2DMenuData
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
inc a
|
2015-12-19 19:48:30 +00:00
|
|
|
|
ld [w2DMenuNumRows], a ; list length
|
2015-11-09 22:00:25 +00:00
|
|
|
|
dec a
|
|
|
|
|
ld b, a
|
2015-11-19 04:16:25 +00:00
|
|
|
|
ld a, [wPartyMenuCursor]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
and a
|
2015-11-19 04:16:25 +00:00
|
|
|
|
jr z, .skip
|
2015-11-09 22:00:25 +00:00
|
|
|
|
inc b
|
|
|
|
|
cp b
|
2015-11-19 04:16:25 +00:00
|
|
|
|
jr c, .done
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2015-11-19 04:16:25 +00:00
|
|
|
|
.skip
|
2015-12-20 17:54:08 +00:00
|
|
|
|
ld a, 1
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2015-11-19 04:16:25 +00:00
|
|
|
|
.done
|
2015-12-15 23:59:49 +00:00
|
|
|
|
ld [wMenuCursorY], a
|
2015-11-19 04:16:25 +00:00
|
|
|
|
ld a, A_BUTTON | B_BUTTON
|
2015-12-20 17:54:08 +00:00
|
|
|
|
ld [wMenuJoypadFilter], a
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
|
InitPartyMenuNoCancel:
|
2015-11-19 04:16:25 +00:00
|
|
|
|
; no cancel
|
2020-06-20 15:56:18 +00:00
|
|
|
|
ld de, PartyMenu2DMenuData
|
|
|
|
|
call Load2DMenuData
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-12-19 19:48:30 +00:00
|
|
|
|
ld [w2DMenuNumRows], a ; list length
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld b, a
|
2015-11-19 04:16:25 +00:00
|
|
|
|
ld a, [wPartyMenuCursor]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
and a
|
2015-11-19 04:16:25 +00:00
|
|
|
|
jr z, .skip
|
2015-11-09 22:00:25 +00:00
|
|
|
|
inc b
|
|
|
|
|
cp b
|
2015-11-19 04:16:25 +00:00
|
|
|
|
jr c, .done
|
|
|
|
|
.skip
|
2015-12-20 17:54:08 +00:00
|
|
|
|
ld a, 1
|
2015-11-19 04:16:25 +00:00
|
|
|
|
.done
|
2015-12-15 23:59:49 +00:00
|
|
|
|
ld [wMenuCursorY], a
|
2015-11-19 04:16:25 +00:00
|
|
|
|
ld a, A_BUTTON | B_BUTTON
|
2015-12-20 17:54:08 +00:00
|
|
|
|
ld [wMenuJoypadFilter], a
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2020-06-20 15:56:18 +00:00
|
|
|
|
PartyMenu2DMenuData:
|
|
|
|
|
db 1, 0 ; cursor start y, x
|
|
|
|
|
db 0, 1 ; rows, columns
|
|
|
|
|
db $60, $00 ; flags
|
|
|
|
|
dn 2, 0 ; cursor offset
|
|
|
|
|
db 0 ; accepted buttons
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
|
PartyMenuSelect:
|
2015-11-09 22:00:25 +00:00
|
|
|
|
; sets carry if exitted menu.
|
2015-12-15 23:59:49 +00:00
|
|
|
|
call StaticMenuJoypad
|
2015-12-18 03:31:16 +00:00
|
|
|
|
call PlaceHollowCursor
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
inc a
|
|
|
|
|
ld b, a
|
2015-12-15 23:59:49 +00:00
|
|
|
|
ld a, [wMenuCursorY] ; menu selection?
|
2015-11-09 22:00:25 +00:00
|
|
|
|
cp b
|
|
|
|
|
jr z, .exitmenu ; CANCEL
|
2015-11-19 04:16:25 +00:00
|
|
|
|
ld [wPartyMenuCursor], a
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh a, [hJoyLast]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld b, a
|
2016-03-02 03:31:21 +00:00
|
|
|
|
bit B_BUTTON_F, b
|
|
|
|
|
jr nz, .exitmenu ; B button
|
2015-12-15 23:59:49 +00:00
|
|
|
|
ld a, [wMenuCursorY]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
dec a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wCurPartyMon], a
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld c, a
|
2020-11-09 20:17:03 +00:00
|
|
|
|
ld b, 0
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPartySpecies
|
2015-11-09 22:00:25 +00:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [hl]
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wCurPartySpecies], a
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
|
|
|
|
ld de, SFX_READ_TEXT_2
|
|
|
|
|
call PlaySFX
|
|
|
|
|
call WaitSFX
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.exitmenu
|
|
|
|
|
ld de, SFX_READ_TEXT_2
|
|
|
|
|
call PlaySFX
|
|
|
|
|
call WaitSFX
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
PrintPartyMenuText:
|
2015-11-09 22:00:25 +00:00
|
|
|
|
hlcoord 0, 14
|
2015-11-12 04:38:57 +00:00
|
|
|
|
lb bc, 2, 18
|
2019-04-08 12:15:10 +00:00
|
|
|
|
call Textbox
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
and a
|
|
|
|
|
jr nz, .haspokemon
|
|
|
|
|
ld de, YouHaveNoPKMNString
|
|
|
|
|
jr .gotstring
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.haspokemon
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyMenuActionText]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
and $f ; drop high nibble
|
|
|
|
|
ld hl, PartyMenuStrings
|
|
|
|
|
ld e, a
|
2020-11-09 20:17:03 +00:00
|
|
|
|
ld d, 0
|
2015-11-09 22:00:25 +00:00
|
|
|
|
add hl, de
|
2016-05-04 15:46:23 +00:00
|
|
|
|
add hl, de
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, [hl]
|
|
|
|
|
ld e, a
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.gotstring
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wOptions]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push af
|
2018-04-05 15:44:02 +00:00
|
|
|
|
set NO_TEXT_SCROLL, a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wOptions], a
|
2015-11-09 22:00:25 +00:00
|
|
|
|
hlcoord 1, 16 ; Coord
|
|
|
|
|
call PlaceString
|
|
|
|
|
pop af
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wOptions], a
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
|
PartyMenuStrings:
|
2015-11-09 22:00:25 +00:00
|
|
|
|
dw ChooseAMonString
|
|
|
|
|
dw UseOnWhichPKMNString
|
|
|
|
|
dw WhichPKMNString
|
|
|
|
|
dw TeachWhichPKMNString
|
|
|
|
|
dw MoveToWhereString
|
|
|
|
|
dw UseOnWhichPKMNString
|
|
|
|
|
dw ChooseAMonString ; Probably used to be ChooseAFemalePKMNString
|
|
|
|
|
dw ChooseAMonString ; Probably used to be ChooseAMalePKMNString
|
|
|
|
|
dw ToWhichPKMNString
|
|
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
|
ChooseAMonString:
|
2015-11-09 22:00:25 +00:00
|
|
|
|
db "Choose a #MON.@"
|
2018-01-02 18:38:56 +00:00
|
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
|
UseOnWhichPKMNString:
|
2015-11-09 22:00:25 +00:00
|
|
|
|
db "Use on which <PK><MN>?@"
|
2018-01-02 18:38:56 +00:00
|
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
|
WhichPKMNString:
|
2015-11-09 22:00:25 +00:00
|
|
|
|
db "Which <PK><MN>?@"
|
2018-01-02 18:38:56 +00:00
|
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
|
TeachWhichPKMNString:
|
2015-11-09 22:00:25 +00:00
|
|
|
|
db "Teach which <PK><MN>?@"
|
2018-01-02 18:38:56 +00:00
|
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
|
MoveToWhereString:
|
2015-11-09 22:00:25 +00:00
|
|
|
|
db "Move to where?@"
|
2018-01-02 18:38:56 +00:00
|
|
|
|
|
2020-10-26 19:45:57 +00:00
|
|
|
|
ChooseAFemalePKMNString: ; unreferenced
|
2015-11-09 22:00:25 +00:00
|
|
|
|
db "Choose a ♀<PK><MN>.@"
|
2018-01-02 18:38:56 +00:00
|
|
|
|
|
2020-10-26 19:45:57 +00:00
|
|
|
|
ChooseAMalePKMNString: ; unreferenced
|
2015-11-09 22:00:25 +00:00
|
|
|
|
db "Choose a ♂<PK><MN>.@"
|
2018-01-02 18:38:56 +00:00
|
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
|
ToWhichPKMNString:
|
2015-11-09 22:00:25 +00:00
|
|
|
|
db "To which <PK><MN>?@"
|
|
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
|
YouHaveNoPKMNString:
|
2015-11-09 22:00:25 +00:00
|
|
|
|
db "You have no <PK><MN>!@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
PrintPartyMenuActionText:
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wCurPartyMon]
|
|
|
|
|
ld hl, wPartyMonNicknames
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call GetNick
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyMenuActionText]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
and $f
|
2015-11-18 23:35:44 +00:00
|
|
|
|
ld hl, .MenuActionTexts
|
|
|
|
|
call .PrintText
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.MenuActionTexts:
|
2018-01-26 03:19:24 +00:00
|
|
|
|
; entries correspond to PARTYMENUTEXT_* constants
|
2019-10-20 22:24:17 +00:00
|
|
|
|
dw .CuredOfPoisonText
|
|
|
|
|
dw .BurnWasHealedText
|
|
|
|
|
dw .WasDefrostedText
|
|
|
|
|
dw .WokeUpText
|
|
|
|
|
dw .RidOfParalysisText
|
|
|
|
|
dw .RecoveredSomeHPText
|
|
|
|
|
dw .HealthReturnedText
|
|
|
|
|
dw .RevitalizedText
|
|
|
|
|
dw .GrewToLevelText
|
|
|
|
|
dw .CameToItsSensesText
|
|
|
|
|
|
|
|
|
|
.RecoveredSomeHPText:
|
2019-03-11 00:43:34 +00:00
|
|
|
|
text_far _RecoveredSomeHPText
|
2018-11-17 18:33:03 +00:00
|
|
|
|
text_end
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
|
.CuredOfPoisonText:
|
2019-03-11 00:43:34 +00:00
|
|
|
|
text_far _CuredOfPoisonText
|
2018-11-17 18:33:03 +00:00
|
|
|
|
text_end
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
|
.RidOfParalysisText:
|
2019-03-11 00:43:34 +00:00
|
|
|
|
text_far _RidOfParalysisText
|
2018-11-17 18:33:03 +00:00
|
|
|
|
text_end
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
|
.BurnWasHealedText:
|
2019-03-11 00:43:34 +00:00
|
|
|
|
text_far _BurnWasHealedText
|
2018-11-17 18:33:03 +00:00
|
|
|
|
text_end
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
|
.WasDefrostedText:
|
2019-03-11 00:43:34 +00:00
|
|
|
|
text_far _WasDefrostedText
|
2018-11-17 18:33:03 +00:00
|
|
|
|
text_end
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
|
.WokeUpText:
|
2019-03-11 00:43:34 +00:00
|
|
|
|
text_far _WokeUpText
|
2018-11-17 18:33:03 +00:00
|
|
|
|
text_end
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
|
.HealthReturnedText:
|
2019-03-11 00:43:34 +00:00
|
|
|
|
text_far _HealthReturnedText
|
2018-11-17 18:33:03 +00:00
|
|
|
|
text_end
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
|
.RevitalizedText:
|
2019-03-11 00:43:34 +00:00
|
|
|
|
text_far _RevitalizedText
|
2018-11-17 18:33:03 +00:00
|
|
|
|
text_end
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
|
.GrewToLevelText:
|
2019-03-11 00:43:34 +00:00
|
|
|
|
text_far _GrewToLevelText
|
2018-11-17 18:33:03 +00:00
|
|
|
|
text_end
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
|
.CameToItsSensesText:
|
2019-03-11 00:43:34 +00:00
|
|
|
|
text_far _CameToItsSensesText
|
2018-11-17 18:33:03 +00:00
|
|
|
|
text_end
|
2015-11-09 22:00:25 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.PrintText:
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld e, a
|
|
|
|
|
ld d, 0
|
|
|
|
|
add hl, de
|
2016-05-04 15:46:23 +00:00
|
|
|
|
add hl, de
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld h, [hl]
|
|
|
|
|
ld l, a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wOptions]
|
2015-11-09 22:00:25 +00:00
|
|
|
|
push af
|
2015-11-18 23:35:44 +00:00
|
|
|
|
set NO_TEXT_SCROLL, a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wOptions], a
|
2015-11-09 22:00:25 +00:00
|
|
|
|
call PrintText
|
|
|
|
|
pop af
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wOptions], a
|
2015-11-09 22:00:25 +00:00
|
|
|
|
ret
|