2018-01-31 16:38:45 +00:00
|
|
|
const_def 1
|
2018-01-11 17:00:01 +00:00
|
|
|
const PINK_PAGE ; 1
|
|
|
|
const GREEN_PAGE ; 2
|
|
|
|
const BLUE_PAGE ; 3
|
2018-02-03 03:55:38 +00:00
|
|
|
NUM_STAT_PAGES EQU const_value + -1
|
2018-01-11 17:00:01 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
BattleStatsScreenInit:
|
2015-11-20 04:38:16 +00:00
|
|
|
ld a, [wLinkMode]
|
|
|
|
cp LINK_MOBILE
|
2018-01-16 19:30:10 +00:00
|
|
|
jr nz, StatsScreenInit
|
2015-11-20 04:38:16 +00:00
|
|
|
|
2017-12-10 05:18:29 +00:00
|
|
|
ld a, [wBattleMode]
|
2015-11-20 04:38:16 +00:00
|
|
|
and a
|
2018-01-16 19:30:10 +00:00
|
|
|
jr z, StatsScreenInit
|
2016-05-08 18:11:24 +00:00
|
|
|
jr _MobileStatsScreenInit
|
2015-11-20 04:38:16 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreenInit:
|
2015-11-20 04:38:16 +00:00
|
|
|
ld hl, StatsScreenMain
|
|
|
|
jr StatsScreenInit_gotaddress
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
_MobileStatsScreenInit:
|
2016-05-08 18:11:24 +00:00
|
|
|
ld hl, StatsScreenMobile
|
2015-11-20 04:38:16 +00:00
|
|
|
jr StatsScreenInit_gotaddress
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreenInit_gotaddress:
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh a, [hMapAnims]
|
2015-11-20 04:38:16 +00:00
|
|
|
push af
|
|
|
|
xor a
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [hMapAnims], a ; disable overworld tile animations
|
2015-12-19 19:48:30 +00:00
|
|
|
ld a, [wBoxAlignment] ; whether sprite is to be mirrorred
|
2015-11-20 04:38:16 +00:00
|
|
|
push af
|
|
|
|
ld a, [wJumptableIndex]
|
|
|
|
ld b, a
|
|
|
|
ld a, [wcf64]
|
|
|
|
ld c, a
|
|
|
|
|
|
|
|
push bc
|
|
|
|
push hl
|
|
|
|
call ClearBGPalettes
|
|
|
|
call ClearTileMap
|
|
|
|
call UpdateSprites
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall StatsScreen_LoadFont
|
2015-11-20 04:38:16 +00:00
|
|
|
pop hl
|
|
|
|
call _hl_
|
|
|
|
call ClearBGPalettes
|
|
|
|
call ClearTileMap
|
|
|
|
pop bc
|
|
|
|
|
|
|
|
; restore old values
|
|
|
|
ld a, b
|
|
|
|
ld [wJumptableIndex], a
|
|
|
|
ld a, c
|
|
|
|
ld [wcf64], a
|
|
|
|
pop af
|
2015-12-19 19:48:30 +00:00
|
|
|
ld [wBoxAlignment], a
|
2015-11-20 04:38:16 +00:00
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [hMapAnims], a
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
StatsScreenMain:
|
2015-11-20 04:38:16 +00:00
|
|
|
xor a
|
|
|
|
ld [wJumptableIndex], a
|
|
|
|
; stupid interns
|
|
|
|
ld [wcf64], a
|
|
|
|
ld a, [wcf64]
|
2018-01-11 17:00:01 +00:00
|
|
|
and %11111100
|
|
|
|
or 1
|
2015-11-20 04:38:16 +00:00
|
|
|
ld [wcf64], a
|
2018-06-24 14:09:41 +00:00
|
|
|
.loop
|
2015-11-20 04:38:16 +00:00
|
|
|
ld a, [wJumptableIndex]
|
2018-01-11 17:00:01 +00:00
|
|
|
and $ff ^ (1 << 7)
|
2015-11-20 04:38:16 +00:00
|
|
|
ld hl, StatsScreenPointerTable
|
|
|
|
rst JumpTable
|
2015-12-23 03:19:33 +00:00
|
|
|
call StatsScreen_WaitAnim ; check for keys?
|
2015-11-20 04:38:16 +00:00
|
|
|
ld a, [wJumptableIndex]
|
|
|
|
bit 7, a
|
|
|
|
jr z, .loop
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreenMobile:
|
2015-11-20 04:38:16 +00:00
|
|
|
xor a
|
|
|
|
ld [wJumptableIndex], a
|
|
|
|
; stupid interns
|
|
|
|
ld [wcf64], a
|
|
|
|
ld a, [wcf64]
|
2018-01-11 17:00:01 +00:00
|
|
|
and %11111100
|
|
|
|
or 1
|
2015-11-20 04:38:16 +00:00
|
|
|
ld [wcf64], a
|
|
|
|
.loop
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall Mobile_SetOverworldDelay
|
2015-11-20 04:38:16 +00:00
|
|
|
ld a, [wJumptableIndex]
|
2018-01-11 17:00:01 +00:00
|
|
|
and $ff ^ (1 << 7)
|
2015-11-20 04:38:16 +00:00
|
|
|
ld hl, StatsScreenPointerTable
|
|
|
|
rst JumpTable
|
2015-12-23 03:19:33 +00:00
|
|
|
call StatsScreen_WaitAnim
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall MobileComms_CheckInactivityTimer
|
2015-11-20 04:38:16 +00:00
|
|
|
jr c, .exit
|
|
|
|
ld a, [wJumptableIndex]
|
|
|
|
bit 7, a
|
|
|
|
jr z, .loop
|
|
|
|
|
|
|
|
.exit
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreenPointerTable:
|
2015-12-27 02:59:03 +00:00
|
|
|
dw MonStatsInit ; regular pokémon
|
|
|
|
dw EggStatsInit ; egg
|
|
|
|
dw StatsScreenWaitCry
|
|
|
|
dw EggStatsJoypad
|
|
|
|
dw StatsScreen_LoadPage
|
|
|
|
dw StatsScreenWaitCry
|
|
|
|
dw MonStatsJoypad
|
|
|
|
dw StatsScreen_Exit
|
2015-11-20 04:38:16 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreen_WaitAnim:
|
2015-11-20 04:38:16 +00:00
|
|
|
ld hl, wcf64
|
|
|
|
bit 6, [hl]
|
2015-12-23 03:19:33 +00:00
|
|
|
jr nz, .try_anim
|
2015-11-20 04:38:16 +00:00
|
|
|
bit 5, [hl]
|
2015-12-23 03:19:33 +00:00
|
|
|
jr nz, .finish
|
2015-11-20 04:38:16 +00:00
|
|
|
call DelayFrame
|
|
|
|
ret
|
2015-12-23 03:19:33 +00:00
|
|
|
|
|
|
|
.try_anim
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall SetUpPokeAnim
|
2015-12-23 03:19:33 +00:00
|
|
|
jr nc, .finish
|
2015-11-20 04:38:16 +00:00
|
|
|
ld hl, wcf64
|
|
|
|
res 6, [hl]
|
2015-12-23 03:19:33 +00:00
|
|
|
.finish
|
2015-11-20 04:38:16 +00:00
|
|
|
ld hl, wcf64
|
|
|
|
res 5, [hl]
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall HDMATransferTileMapToWRAMBank3
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreen_SetJumptableIndex:
|
2015-11-20 04:38:16 +00:00
|
|
|
ld a, [wJumptableIndex]
|
|
|
|
and $80
|
|
|
|
or h
|
|
|
|
ld [wJumptableIndex], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreen_Exit:
|
2015-11-20 04:38:16 +00:00
|
|
|
ld hl, wJumptableIndex
|
|
|
|
set 7, [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
MonStatsInit:
|
2015-11-20 04:38:16 +00:00
|
|
|
ld hl, wcf64
|
|
|
|
res 6, [hl]
|
|
|
|
call ClearBGPalettes
|
|
|
|
call ClearTileMap
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall HDMATransferTileMapToWRAMBank3
|
2015-12-23 14:12:29 +00:00
|
|
|
call StatsScreen_CopyToTempMon
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartySpecies]
|
2015-11-20 04:38:16 +00:00
|
|
|
cp EGG
|
2015-12-23 03:19:33 +00:00
|
|
|
jr z, .egg
|
|
|
|
call StatsScreen_InitUpperHalf
|
2015-11-20 04:38:16 +00:00
|
|
|
ld hl, wcf64
|
|
|
|
set 4, [hl]
|
2015-12-27 02:59:03 +00:00
|
|
|
ld h, 4
|
2015-12-23 03:19:33 +00:00
|
|
|
call StatsScreen_SetJumptableIndex
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
2015-12-23 03:19:33 +00:00
|
|
|
|
|
|
|
.egg
|
2015-12-27 02:59:03 +00:00
|
|
|
ld h, 1
|
2015-12-23 03:19:33 +00:00
|
|
|
call StatsScreen_SetJumptableIndex
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
EggStatsInit:
|
2015-11-20 04:38:16 +00:00
|
|
|
call EggStatsScreen
|
|
|
|
ld a, [wJumptableIndex]
|
|
|
|
inc a
|
|
|
|
ld [wJumptableIndex], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
EggStatsJoypad:
|
2015-12-23 03:19:33 +00:00
|
|
|
call StatsScreen_GetJoypad
|
|
|
|
jr nc, .check
|
2015-12-27 02:59:03 +00:00
|
|
|
ld h, 0
|
2015-12-23 03:19:33 +00:00
|
|
|
call StatsScreen_SetJumptableIndex
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
2015-12-23 03:19:33 +00:00
|
|
|
|
|
|
|
.check
|
|
|
|
bit A_BUTTON_F, a
|
|
|
|
jr nz, .quit
|
|
|
|
and D_DOWN | D_UP | A_BUTTON | B_BUTTON
|
|
|
|
jp StatsScreen_JoypadAction
|
|
|
|
|
|
|
|
.quit
|
2015-12-27 02:59:03 +00:00
|
|
|
ld h, 7
|
2015-12-23 03:19:33 +00:00
|
|
|
call StatsScreen_SetJumptableIndex
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreen_LoadPage:
|
2015-12-23 03:19:33 +00:00
|
|
|
call StatsScreen_LoadGFX
|
2015-11-20 04:38:16 +00:00
|
|
|
ld hl, wcf64
|
|
|
|
res 4, [hl]
|
|
|
|
ld a, [wJumptableIndex]
|
|
|
|
inc a
|
|
|
|
ld [wJumptableIndex], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
MonStatsJoypad:
|
2015-12-23 03:19:33 +00:00
|
|
|
call StatsScreen_GetJoypad
|
|
|
|
jr nc, .next
|
2015-12-27 02:59:03 +00:00
|
|
|
ld h, 0
|
2015-12-23 03:19:33 +00:00
|
|
|
call StatsScreen_SetJumptableIndex
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
|
|
|
|
2015-12-23 03:19:33 +00:00
|
|
|
.next
|
|
|
|
and D_DOWN | D_UP | D_LEFT | D_RIGHT | A_BUTTON | B_BUTTON
|
|
|
|
jp StatsScreen_JoypadAction
|
2015-11-20 04:38:16 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreenWaitCry:
|
2015-11-20 04:38:16 +00:00
|
|
|
call IsSFXPlaying
|
|
|
|
ret nc
|
|
|
|
ld a, [wJumptableIndex]
|
|
|
|
inc a
|
|
|
|
ld [wJumptableIndex], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreen_CopyToTempMon:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wMonType]
|
2016-05-11 21:16:03 +00:00
|
|
|
cp TEMPMON
|
2015-12-23 14:12:29 +00:00
|
|
|
jr nz, .breedmon
|
2018-02-12 22:58:19 +00:00
|
|
|
ld a, [wBufferMonSpecies]
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wCurSpecies], a
|
2015-11-20 04:38:16 +00:00
|
|
|
call GetBaseData
|
2015-12-16 17:32:08 +00:00
|
|
|
ld hl, wBufferMon
|
2018-01-23 22:39:09 +00:00
|
|
|
ld de, wTempMon
|
2015-11-20 04:38:16 +00:00
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
|
|
|
call CopyBytes
|
2015-12-23 14:12:29 +00:00
|
|
|
jr .done
|
|
|
|
|
|
|
|
.breedmon
|
2018-02-22 16:13:29 +00:00
|
|
|
farcall CopyMonToTempMon
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartySpecies]
|
2015-11-20 04:38:16 +00:00
|
|
|
cp EGG
|
2015-12-23 14:12:29 +00:00
|
|
|
jr z, .done
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wMonType]
|
2015-11-20 04:38:16 +00:00
|
|
|
cp BOXMON
|
2015-12-23 14:12:29 +00:00
|
|
|
jr c, .done
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall CalcTempmonStats
|
2015-12-23 14:12:29 +00:00
|
|
|
.done
|
2015-11-20 04:38:16 +00:00
|
|
|
and a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreen_GetJoypad:
|
2015-11-20 04:38:16 +00:00
|
|
|
call GetJoypad
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wMonType]
|
2016-05-11 21:16:03 +00:00
|
|
|
cp TEMPMON
|
2015-11-20 04:38:16 +00:00
|
|
|
jr nz, .notbreedmon
|
|
|
|
push hl
|
|
|
|
push de
|
|
|
|
push bc
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall StatsScreenDPad
|
2015-11-20 04:38:16 +00:00
|
|
|
pop bc
|
|
|
|
pop de
|
|
|
|
pop hl
|
2015-12-15 23:59:49 +00:00
|
|
|
ld a, [wMenuJoypad]
|
2015-12-23 03:19:33 +00:00
|
|
|
and D_DOWN | D_UP
|
2015-11-20 04:38:16 +00:00
|
|
|
jr nz, .set_carry
|
2015-12-15 23:59:49 +00:00
|
|
|
ld a, [wMenuJoypad]
|
2015-11-20 04:38:16 +00:00
|
|
|
jr .clear_flags
|
|
|
|
|
|
|
|
.notbreedmon
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh a, [hJoyPressed]
|
2015-11-20 04:38:16 +00:00
|
|
|
.clear_flags
|
|
|
|
and a
|
|
|
|
ret
|
|
|
|
|
|
|
|
.set_carry
|
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreen_JoypadAction:
|
2015-11-20 04:38:16 +00:00
|
|
|
push af
|
|
|
|
ld a, [wcf64]
|
2018-01-16 22:27:50 +00:00
|
|
|
maskbits NUM_STAT_PAGES
|
2015-11-20 04:38:16 +00:00
|
|
|
ld c, a
|
|
|
|
pop af
|
2015-12-23 03:19:33 +00:00
|
|
|
bit B_BUTTON_F, a
|
|
|
|
jp nz, .b_button
|
|
|
|
bit D_LEFT_F, a
|
|
|
|
jr nz, .d_left
|
|
|
|
bit D_RIGHT_F, a
|
|
|
|
jr nz, .d_right
|
|
|
|
bit A_BUTTON_F, a
|
|
|
|
jr nz, .a_button
|
|
|
|
bit D_UP_F, a
|
|
|
|
jr nz, .d_up
|
|
|
|
bit D_DOWN_F, a
|
|
|
|
jr nz, .d_down
|
|
|
|
jr .done
|
2015-12-23 14:12:29 +00:00
|
|
|
|
2015-12-23 03:19:33 +00:00
|
|
|
.d_down
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wMonType]
|
2015-11-20 04:38:16 +00:00
|
|
|
cp BOXMON
|
2015-12-23 03:19:33 +00:00
|
|
|
jr nc, .done
|
2015-11-20 04:38:16 +00:00
|
|
|
and a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wPartyCount]
|
2015-12-23 03:19:33 +00:00
|
|
|
jr z, .next_mon
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wOTPartyCount]
|
2015-12-23 03:19:33 +00:00
|
|
|
.next_mon
|
2015-11-20 04:38:16 +00:00
|
|
|
ld b, a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartyMon]
|
2015-11-20 04:38:16 +00:00
|
|
|
inc a
|
|
|
|
cp b
|
2015-12-23 03:19:33 +00:00
|
|
|
jr z, .done
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wCurPartyMon], a
|
2015-11-20 04:38:16 +00:00
|
|
|
ld b, a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wMonType]
|
2015-11-20 04:38:16 +00:00
|
|
|
and a
|
2015-12-23 03:19:33 +00:00
|
|
|
jr nz, .load_mon
|
2015-11-20 04:38:16 +00:00
|
|
|
ld a, b
|
|
|
|
inc a
|
2015-12-23 14:12:29 +00:00
|
|
|
ld [wPartyMenuCursor], a
|
2015-12-23 03:19:33 +00:00
|
|
|
jr .load_mon
|
2015-12-23 14:12:29 +00:00
|
|
|
|
2015-12-23 03:19:33 +00:00
|
|
|
.d_up
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartyMon]
|
2015-11-20 04:38:16 +00:00
|
|
|
and a
|
2015-12-23 03:19:33 +00:00
|
|
|
jr z, .done
|
2015-11-20 04:38:16 +00:00
|
|
|
dec a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wCurPartyMon], a
|
2015-11-20 04:38:16 +00:00
|
|
|
ld b, a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wMonType]
|
2015-11-20 04:38:16 +00:00
|
|
|
and a
|
2015-12-23 03:19:33 +00:00
|
|
|
jr nz, .load_mon
|
2015-11-20 04:38:16 +00:00
|
|
|
ld a, b
|
|
|
|
inc a
|
2015-12-23 14:12:29 +00:00
|
|
|
ld [wPartyMenuCursor], a
|
2015-12-23 03:19:33 +00:00
|
|
|
jr .load_mon
|
2015-12-23 14:12:29 +00:00
|
|
|
|
2015-12-23 03:19:33 +00:00
|
|
|
.a_button
|
2015-11-20 04:38:16 +00:00
|
|
|
ld a, c
|
2018-01-11 17:00:01 +00:00
|
|
|
cp BLUE_PAGE ; last page
|
2015-12-23 03:19:33 +00:00
|
|
|
jr z, .b_button
|
|
|
|
.d_right
|
2015-11-20 04:38:16 +00:00
|
|
|
inc c
|
2018-01-11 17:00:01 +00:00
|
|
|
ld a, BLUE_PAGE ; last page
|
2015-11-20 04:38:16 +00:00
|
|
|
cp c
|
2015-12-23 03:19:33 +00:00
|
|
|
jr nc, .set_page
|
2018-01-11 17:00:01 +00:00
|
|
|
ld c, PINK_PAGE ; first page
|
2015-12-23 03:19:33 +00:00
|
|
|
jr .set_page
|
2015-12-23 14:12:29 +00:00
|
|
|
|
2015-12-23 03:19:33 +00:00
|
|
|
.d_left
|
2015-11-20 04:38:16 +00:00
|
|
|
dec c
|
2015-12-23 03:19:33 +00:00
|
|
|
jr nz, .set_page
|
2018-01-11 17:00:01 +00:00
|
|
|
ld c, BLUE_PAGE ; last page
|
2015-12-23 03:19:33 +00:00
|
|
|
jr .set_page
|
2015-12-23 14:12:29 +00:00
|
|
|
|
2015-12-23 03:19:33 +00:00
|
|
|
.done
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
2015-12-23 03:19:33 +00:00
|
|
|
|
|
|
|
.set_page
|
2015-11-20 04:38:16 +00:00
|
|
|
ld a, [wcf64]
|
2015-12-23 03:19:33 +00:00
|
|
|
and %11111100
|
2015-11-20 04:38:16 +00:00
|
|
|
or c
|
|
|
|
ld [wcf64], a
|
2015-12-27 02:59:03 +00:00
|
|
|
ld h, 4
|
2015-12-23 03:19:33 +00:00
|
|
|
call StatsScreen_SetJumptableIndex
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
2015-12-23 03:19:33 +00:00
|
|
|
|
|
|
|
.load_mon
|
2015-12-27 02:59:03 +00:00
|
|
|
ld h, 0
|
2015-12-23 03:19:33 +00:00
|
|
|
call StatsScreen_SetJumptableIndex
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.b_button
|
2015-12-27 02:59:03 +00:00
|
|
|
ld h, 7
|
2015-12-23 03:19:33 +00:00
|
|
|
call StatsScreen_SetJumptableIndex
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreen_InitUpperHalf:
|
2015-12-23 03:19:33 +00:00
|
|
|
call .PlaceHPBar
|
2015-11-20 04:38:16 +00:00
|
|
|
xor a
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [hBGMapMode], a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wBaseDexNo]
|
2018-07-28 23:27:34 +00:00
|
|
|
ld [wDeciramBuffer], a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wCurSpecies], a
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 8, 0
|
|
|
|
ld [hl], "№"
|
|
|
|
inc hl
|
|
|
|
ld [hl], "."
|
|
|
|
inc hl
|
|
|
|
hlcoord 10, 0
|
|
|
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
2018-07-28 23:27:34 +00:00
|
|
|
ld de, wDeciramBuffer
|
2015-11-20 04:38:16 +00:00
|
|
|
call PrintNum
|
|
|
|
hlcoord 14, 0
|
|
|
|
call PrintLevel
|
2015-12-23 03:19:33 +00:00
|
|
|
ld hl, .NicknamePointers
|
|
|
|
call GetNicknamePointer
|
|
|
|
call CopyNickname
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 8, 2
|
|
|
|
call PlaceString
|
|
|
|
hlcoord 18, 0
|
2015-12-23 03:19:33 +00:00
|
|
|
call .PlaceGenderChar
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 9, 4
|
|
|
|
ld a, "/"
|
|
|
|
ld [hli], a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wBaseDexNo]
|
2018-07-28 23:27:34 +00:00
|
|
|
ld [wNamedObjectIndexBuffer], a
|
2015-11-20 04:38:16 +00:00
|
|
|
call GetPokemonName
|
|
|
|
call PlaceString
|
2015-12-23 03:19:33 +00:00
|
|
|
call StatsScreen_PlaceHorizontalDivider
|
|
|
|
call StatsScreen_PlacePageSwitchArrows
|
|
|
|
call StatsScreen_PlaceShinyIcon
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.PlaceHPBar:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld hl, wTempMonHP
|
2015-11-20 04:38:16 +00:00
|
|
|
ld a, [hli]
|
|
|
|
ld b, a
|
|
|
|
ld c, [hl]
|
2018-01-23 22:39:09 +00:00
|
|
|
ld hl, wTempMonMaxHP
|
2015-11-20 04:38:16 +00:00
|
|
|
ld a, [hli]
|
|
|
|
ld d, a
|
|
|
|
ld e, [hl]
|
2018-01-16 19:30:10 +00:00
|
|
|
farcall ComputeHPBarPixels
|
2017-12-10 00:41:03 +00:00
|
|
|
ld hl, wCurHPPal
|
2015-11-20 04:38:16 +00:00
|
|
|
call SetHPPal
|
2015-12-23 03:19:33 +00:00
|
|
|
ld b, SCGB_STATS_SCREEN_HP_PALS
|
2015-11-20 04:38:16 +00:00
|
|
|
call GetSGBLayout
|
|
|
|
call DelayFrame
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.PlaceGenderChar:
|
2015-11-20 04:38:16 +00:00
|
|
|
push hl
|
2018-01-16 19:30:10 +00:00
|
|
|
farcall GetGender
|
2015-11-20 04:38:16 +00:00
|
|
|
pop hl
|
|
|
|
ret c
|
|
|
|
ld a, "♂"
|
|
|
|
jr nz, .got_gender
|
|
|
|
ld a, "♀"
|
|
|
|
.got_gender
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.NicknamePointers:
|
2018-01-23 22:39:09 +00:00
|
|
|
dw wPartyMonNicknames
|
|
|
|
dw wOTPartyMonNicknames
|
2015-11-20 04:38:16 +00:00
|
|
|
dw sBoxMonNicknames
|
2015-12-23 03:19:33 +00:00
|
|
|
dw wBufferMonNick
|
2015-11-20 04:38:16 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Unreferenced_Function4df7f:
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 7, 0
|
|
|
|
ld bc, SCREEN_WIDTH
|
|
|
|
ld d, SCREEN_HEIGHT
|
|
|
|
.loop
|
2018-01-12 03:16:17 +00:00
|
|
|
ld a, $31 ; vertical divider
|
2015-11-20 04:38:16 +00:00
|
|
|
ld [hl], a
|
|
|
|
add hl, bc
|
|
|
|
dec d
|
|
|
|
jr nz, .loop
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreen_PlaceHorizontalDivider:
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 0, 7
|
|
|
|
ld b, SCREEN_WIDTH
|
2018-01-12 03:16:17 +00:00
|
|
|
ld a, $62 ; horizontal divider (empty HP/exp bar)
|
2015-11-20 04:38:16 +00:00
|
|
|
.loop
|
|
|
|
ld [hli], a
|
|
|
|
dec b
|
|
|
|
jr nz, .loop
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreen_PlacePageSwitchArrows:
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 12, 6
|
|
|
|
ld [hl], "◀"
|
|
|
|
hlcoord 19, 6
|
|
|
|
ld [hl], "▶"
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreen_PlaceShinyIcon:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld bc, wTempMonDVs
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall CheckShininess
|
2015-11-20 04:38:16 +00:00
|
|
|
ret nc
|
|
|
|
hlcoord 19, 0
|
2018-01-19 07:30:19 +00:00
|
|
|
ld [hl], "⁂"
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreen_LoadGFX:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wBaseDexNo]
|
2018-07-28 23:27:34 +00:00
|
|
|
ld [wTempSpecies], a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wCurSpecies], a
|
2015-11-20 04:38:16 +00:00
|
|
|
xor a
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [hBGMapMode], a
|
2015-12-23 03:19:33 +00:00
|
|
|
call .ClearBox
|
|
|
|
call .PageTilemap
|
|
|
|
call .LoadPals
|
2015-11-20 04:38:16 +00:00
|
|
|
ld hl, wcf64
|
|
|
|
bit 4, [hl]
|
2015-12-21 19:10:16 +00:00
|
|
|
jr nz, .place_frontpic
|
2015-11-20 04:38:16 +00:00
|
|
|
call SetPalettes
|
|
|
|
ret
|
|
|
|
|
2015-12-21 19:10:16 +00:00
|
|
|
.place_frontpic
|
|
|
|
call StatsScreen_PlaceFrontpic
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.ClearBox:
|
2015-11-20 04:38:16 +00:00
|
|
|
ld a, [wcf64]
|
2018-01-16 22:27:50 +00:00
|
|
|
maskbits NUM_STAT_PAGES
|
2015-11-20 04:38:16 +00:00
|
|
|
ld c, a
|
2015-12-23 14:12:29 +00:00
|
|
|
call StatsScreen_LoadPageIndicators
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 0, 8
|
|
|
|
lb bc, 10, 20
|
|
|
|
call ClearBox
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.LoadPals:
|
2015-11-20 04:38:16 +00:00
|
|
|
ld a, [wcf64]
|
2018-01-16 22:27:50 +00:00
|
|
|
maskbits NUM_STAT_PAGES
|
2015-11-20 04:38:16 +00:00
|
|
|
ld c, a
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall LoadStatsScreenPals
|
2015-11-20 04:38:16 +00:00
|
|
|
call DelayFrame
|
|
|
|
ld hl, wcf64
|
|
|
|
set 5, [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.PageTilemap:
|
2015-11-20 04:38:16 +00:00
|
|
|
ld a, [wcf64]
|
2018-01-16 22:27:50 +00:00
|
|
|
maskbits NUM_STAT_PAGES
|
2015-11-20 04:38:16 +00:00
|
|
|
dec a
|
2015-12-21 19:10:16 +00:00
|
|
|
ld hl, .Jumptable
|
2015-11-20 04:38:16 +00:00
|
|
|
rst JumpTable
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.Jumptable:
|
2018-01-11 17:00:01 +00:00
|
|
|
; entries correspond to *_PAGE constants
|
2015-12-27 02:59:03 +00:00
|
|
|
dw .PinkPage
|
|
|
|
dw .GreenPage
|
|
|
|
dw .BluePage
|
2015-11-20 04:38:16 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.PinkPage:
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 0, 9
|
|
|
|
ld b, $0
|
2018-01-16 19:30:10 +00:00
|
|
|
predef DrawPlayerHP
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 8, 9
|
2018-01-12 03:16:17 +00:00
|
|
|
ld [hl], $41 ; right HP/exp bar end cap
|
2015-12-21 19:10:16 +00:00
|
|
|
ld de, .Status_Type
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 0, 12
|
|
|
|
call PlaceString
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wTempMonPokerusStatus]
|
2015-11-20 04:38:16 +00:00
|
|
|
ld b, a
|
|
|
|
and $f
|
2015-12-21 19:10:16 +00:00
|
|
|
jr nz, .HasPokerus
|
2015-11-20 04:38:16 +00:00
|
|
|
ld a, b
|
|
|
|
and $f0
|
2015-12-21 19:10:16 +00:00
|
|
|
jr z, .NotImmuneToPkrs
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 8, 8
|
2018-01-12 03:16:17 +00:00
|
|
|
ld [hl], "." ; Pokérus immunity dot
|
2016-04-10 18:42:14 +00:00
|
|
|
.NotImmuneToPkrs:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wMonType]
|
2015-12-21 19:10:16 +00:00
|
|
|
cp BOXMON
|
|
|
|
jr z, .StatusOK
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 6, 13
|
|
|
|
push hl
|
2018-01-23 22:39:09 +00:00
|
|
|
ld de, wTempMonStatus
|
2018-01-16 19:30:10 +00:00
|
|
|
predef PlaceStatusString
|
2015-11-20 04:38:16 +00:00
|
|
|
pop hl
|
2015-12-21 19:10:16 +00:00
|
|
|
jr nz, .done_status
|
|
|
|
jr .StatusOK
|
2016-04-10 18:42:14 +00:00
|
|
|
.HasPokerus:
|
2015-12-21 19:10:16 +00:00
|
|
|
ld de, .PkrsStr
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 1, 13
|
|
|
|
call PlaceString
|
2015-12-21 19:10:16 +00:00
|
|
|
jr .done_status
|
2016-04-10 18:42:14 +00:00
|
|
|
.StatusOK:
|
2015-12-21 19:10:16 +00:00
|
|
|
ld de, .OK_str
|
2015-11-20 04:38:16 +00:00
|
|
|
call PlaceString
|
2015-12-21 19:10:16 +00:00
|
|
|
.done_status
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 1, 15
|
2018-01-16 19:30:10 +00:00
|
|
|
predef PrintMonTypes
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 9, 8
|
2015-12-21 19:10:16 +00:00
|
|
|
ld de, SCREEN_WIDTH
|
|
|
|
ld b, 10
|
2018-01-12 03:16:17 +00:00
|
|
|
ld a, $31 ; vertical divider
|
2015-12-21 19:10:16 +00:00
|
|
|
.vertical_divider
|
2015-11-20 04:38:16 +00:00
|
|
|
ld [hl], a
|
|
|
|
add hl, de
|
|
|
|
dec b
|
2015-12-21 19:10:16 +00:00
|
|
|
jr nz, .vertical_divider
|
|
|
|
ld de, .ExpPointStr
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 10, 9
|
|
|
|
call PlaceString
|
|
|
|
hlcoord 17, 14
|
2015-12-21 19:10:16 +00:00
|
|
|
call .PrintNextLevel
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 13, 10
|
|
|
|
lb bc, 3, 7
|
2018-01-23 22:39:09 +00:00
|
|
|
ld de, wTempMonExp
|
2015-11-20 04:38:16 +00:00
|
|
|
call PrintNum
|
2015-12-21 19:10:16 +00:00
|
|
|
call .CalcExpToNextLevel
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 13, 13
|
|
|
|
lb bc, 3, 7
|
2018-01-23 22:39:09 +00:00
|
|
|
ld de, wBuffer1
|
2015-11-20 04:38:16 +00:00
|
|
|
call PrintNum
|
2015-12-21 19:10:16 +00:00
|
|
|
ld de, .LevelUpStr
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 10, 12
|
|
|
|
call PlaceString
|
2015-12-21 19:10:16 +00:00
|
|
|
ld de, .ToStr
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 14, 14
|
|
|
|
call PlaceString
|
|
|
|
hlcoord 11, 16
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wTempMonLevel]
|
2015-11-20 04:38:16 +00:00
|
|
|
ld b, a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld de, wTempMonExp + 2
|
2018-01-16 19:30:10 +00:00
|
|
|
predef FillInExpBar
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 10, 16
|
2018-01-12 03:16:17 +00:00
|
|
|
ld [hl], $40 ; left exp bar end cap
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 19, 16
|
2018-01-12 03:16:17 +00:00
|
|
|
ld [hl], $41 ; right exp bar end cap
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.PrintNextLevel:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wTempMonLevel]
|
2015-11-20 04:38:16 +00:00
|
|
|
push af
|
|
|
|
cp MAX_LEVEL
|
2015-12-21 19:10:16 +00:00
|
|
|
jr z, .AtMaxLevel
|
2015-11-20 04:38:16 +00:00
|
|
|
inc a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wTempMonLevel], a
|
2016-04-10 18:42:14 +00:00
|
|
|
.AtMaxLevel:
|
2015-11-20 04:38:16 +00:00
|
|
|
call PrintLevel
|
|
|
|
pop af
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wTempMonLevel], a
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.CalcExpToNextLevel:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wTempMonLevel]
|
2015-11-20 04:38:16 +00:00
|
|
|
cp MAX_LEVEL
|
2015-12-21 19:10:16 +00:00
|
|
|
jr z, .AlreadyAtMaxLevel
|
2015-11-20 04:38:16 +00:00
|
|
|
inc a
|
|
|
|
ld d, a
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall CalcExpAtLevel
|
2018-01-23 22:39:09 +00:00
|
|
|
ld hl, wTempMonExp + 2
|
|
|
|
ld hl, wTempMonExp + 2
|
2018-08-26 17:49:38 +00:00
|
|
|
ldh a, [hQuotient + 3]
|
2015-11-20 04:38:16 +00:00
|
|
|
sub [hl]
|
|
|
|
dec hl
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wBuffer3], a
|
2018-08-26 17:49:38 +00:00
|
|
|
ldh a, [hQuotient + 2]
|
2015-11-20 04:38:16 +00:00
|
|
|
sbc [hl]
|
|
|
|
dec hl
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wBuffer2], a
|
2018-08-26 17:49:38 +00:00
|
|
|
ldh a, [hQuotient + 1]
|
2015-11-20 04:38:16 +00:00
|
|
|
sbc [hl]
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wBuffer1], a
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
2015-12-21 19:10:16 +00:00
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
.AlreadyAtMaxLevel:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld hl, wBuffer1
|
2015-11-20 04:38:16 +00:00
|
|
|
xor a
|
|
|
|
ld [hli], a
|
2016-05-04 15:46:23 +00:00
|
|
|
ld [hli], a
|
2015-11-20 04:38:16 +00:00
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.Status_Type:
|
2015-11-20 04:38:16 +00:00
|
|
|
db "STATUS/"
|
|
|
|
next "TYPE/@"
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.OK_str:
|
2015-11-20 04:38:16 +00:00
|
|
|
db "OK @"
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.ExpPointStr:
|
2015-11-20 04:38:16 +00:00
|
|
|
db "EXP POINTS@"
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.LevelUpStr:
|
2015-11-20 04:38:16 +00:00
|
|
|
db "LEVEL UP@"
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.ToStr:
|
2015-11-20 04:38:16 +00:00
|
|
|
db "TO@"
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.PkrsStr:
|
2015-11-20 04:38:16 +00:00
|
|
|
db "#RUS@"
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.GreenPage:
|
2015-12-21 19:10:16 +00:00
|
|
|
ld de, .Item
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 0, 8
|
|
|
|
call PlaceString
|
2015-12-21 19:10:16 +00:00
|
|
|
call .GetItemName
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 8, 8
|
|
|
|
call PlaceString
|
2015-12-21 19:10:16 +00:00
|
|
|
ld de, .Move
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 0, 10
|
|
|
|
call PlaceString
|
2018-01-23 22:39:09 +00:00
|
|
|
ld hl, wTempMonMoves
|
2015-11-20 04:38:16 +00:00
|
|
|
ld de, wListMoves_MoveIndicesBuffer
|
|
|
|
ld bc, NUM_MOVES
|
|
|
|
call CopyBytes
|
|
|
|
hlcoord 8, 10
|
|
|
|
ld a, SCREEN_WIDTH * 2
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wBuffer1], a
|
2018-01-16 19:30:10 +00:00
|
|
|
predef ListMoves
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 12, 11
|
2015-12-21 19:10:16 +00:00
|
|
|
ld a, SCREEN_WIDTH * 2
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wBuffer1], a
|
2018-01-16 19:30:10 +00:00
|
|
|
predef ListMovePP
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.GetItemName:
|
2015-12-21 19:10:16 +00:00
|
|
|
ld de, .ThreeDashes
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wTempMonItem]
|
2015-11-20 04:38:16 +00:00
|
|
|
and a
|
|
|
|
ret z
|
|
|
|
ld b, a
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall TimeCapsule_ReplaceTeruSama
|
2015-11-20 04:38:16 +00:00
|
|
|
ld a, b
|
2018-07-28 23:27:34 +00:00
|
|
|
ld [wNamedObjectIndexBuffer], a
|
2015-11-20 04:38:16 +00:00
|
|
|
call GetItemName
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.Item:
|
2015-11-20 04:38:16 +00:00
|
|
|
db "ITEM@"
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.ThreeDashes:
|
2015-11-20 04:38:16 +00:00
|
|
|
db "---@"
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.Move:
|
2015-11-20 04:38:16 +00:00
|
|
|
db "MOVE@"
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.BluePage:
|
2015-12-21 19:10:16 +00:00
|
|
|
call .PlaceOTInfo
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 10, 8
|
2015-12-21 19:10:16 +00:00
|
|
|
ld de, SCREEN_WIDTH
|
|
|
|
ld b, 10
|
2018-01-12 03:16:17 +00:00
|
|
|
ld a, $31 ; vertical divider
|
2016-04-10 18:42:14 +00:00
|
|
|
.BluePageVerticalDivider:
|
2015-11-20 04:38:16 +00:00
|
|
|
ld [hl], a
|
|
|
|
add hl, de
|
|
|
|
dec b
|
2015-12-21 19:10:16 +00:00
|
|
|
jr nz, .BluePageVerticalDivider
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 11, 8
|
2015-12-21 19:10:16 +00:00
|
|
|
ld bc, 6
|
2018-01-16 19:30:10 +00:00
|
|
|
predef PrintTempMonStats
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.PlaceOTInfo:
|
2015-11-20 04:38:16 +00:00
|
|
|
ld de, IDNoString
|
|
|
|
hlcoord 0, 9
|
|
|
|
call PlaceString
|
|
|
|
ld de, OTString
|
|
|
|
hlcoord 0, 12
|
|
|
|
call PlaceString
|
|
|
|
hlcoord 2, 10
|
|
|
|
lb bc, PRINTNUM_LEADINGZEROS | 2, 5
|
2018-01-23 22:39:09 +00:00
|
|
|
ld de, wTempMonID
|
2015-11-20 04:38:16 +00:00
|
|
|
call PrintNum
|
2015-12-21 19:10:16 +00:00
|
|
|
ld hl, .OTNamePointers
|
2015-12-23 03:19:33 +00:00
|
|
|
call GetNicknamePointer
|
|
|
|
call CopyNickname
|
2018-04-05 04:04:53 +00:00
|
|
|
farcall CorrectNickErrors
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 2, 13
|
|
|
|
call PlaceString
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wTempMonCaughtGender]
|
2015-11-20 04:38:16 +00:00
|
|
|
and a
|
2015-12-21 19:10:16 +00:00
|
|
|
jr z, .done
|
2015-11-20 04:38:16 +00:00
|
|
|
cp $7f
|
2015-12-21 19:10:16 +00:00
|
|
|
jr z, .done
|
2015-11-20 04:38:16 +00:00
|
|
|
and $80
|
|
|
|
ld a, "♂"
|
2015-12-21 19:10:16 +00:00
|
|
|
jr z, .got_gender
|
2015-11-20 04:38:16 +00:00
|
|
|
ld a, "♀"
|
2015-12-21 19:10:16 +00:00
|
|
|
.got_gender
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 9, 13
|
|
|
|
ld [hl], a
|
2015-12-21 19:10:16 +00:00
|
|
|
.done
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.OTNamePointers:
|
2018-01-23 22:39:09 +00:00
|
|
|
dw wPartyMonOT
|
|
|
|
dw wOTPartyMonOT
|
2015-11-20 04:38:16 +00:00
|
|
|
dw sBoxMonOT
|
2015-12-21 19:10:16 +00:00
|
|
|
dw wBufferMonOT
|
2015-11-20 04:38:16 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
IDNoString:
|
2015-12-21 19:10:16 +00:00
|
|
|
db "<ID>№.@"
|
2015-11-20 04:38:16 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
OTString:
|
2015-11-20 04:38:16 +00:00
|
|
|
db "OT/@"
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreen_PlaceFrontpic:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld hl, wTempMonDVs
|
2018-01-16 19:30:10 +00:00
|
|
|
predef GetUnownLetter
|
2015-12-21 19:10:16 +00:00
|
|
|
call StatsScreen_GetAnimationParam
|
|
|
|
jr c, .egg
|
2015-11-20 04:38:16 +00:00
|
|
|
and a
|
2015-12-21 19:10:16 +00:00
|
|
|
jr z, .no_cry
|
|
|
|
jr .cry
|
|
|
|
|
|
|
|
.egg
|
2015-12-23 14:12:29 +00:00
|
|
|
call .AnimateEgg
|
2015-11-20 04:38:16 +00:00
|
|
|
call SetPalettes
|
|
|
|
ret
|
2015-12-21 19:10:16 +00:00
|
|
|
|
|
|
|
.no_cry
|
2015-12-23 14:12:29 +00:00
|
|
|
call .AnimateMon
|
2015-11-20 04:38:16 +00:00
|
|
|
call SetPalettes
|
|
|
|
ret
|
2015-12-21 19:10:16 +00:00
|
|
|
|
|
|
|
.cry
|
2015-11-20 04:38:16 +00:00
|
|
|
call SetPalettes
|
2015-12-23 14:12:29 +00:00
|
|
|
call .AnimateMon
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartySpecies]
|
2018-01-17 04:47:45 +00:00
|
|
|
call PlayMonCry2
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.AnimateMon:
|
2015-11-20 04:38:16 +00:00
|
|
|
ld hl, wcf64
|
|
|
|
set 5, [hl]
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartySpecies]
|
2015-11-20 04:38:16 +00:00
|
|
|
cp UNOWN
|
2015-12-21 19:10:16 +00:00
|
|
|
jr z, .unown
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 0, 0
|
|
|
|
call PrepMonFrontpic
|
|
|
|
ret
|
2015-12-21 19:10:16 +00:00
|
|
|
|
|
|
|
.unown
|
2015-11-20 04:38:16 +00:00
|
|
|
xor a
|
2015-12-19 19:48:30 +00:00
|
|
|
ld [wBoxAlignment], a
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 0, 0
|
|
|
|
call _PrepMonFrontpic
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.AnimateEgg:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartySpecies]
|
2015-11-20 04:38:16 +00:00
|
|
|
cp UNOWN
|
2015-12-23 14:12:29 +00:00
|
|
|
jr z, .unownegg
|
|
|
|
ld a, TRUE
|
2015-12-19 19:48:30 +00:00
|
|
|
ld [wBoxAlignment], a
|
2015-12-23 14:12:29 +00:00
|
|
|
call .get_animation
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
2015-12-21 19:10:16 +00:00
|
|
|
|
2015-12-23 14:12:29 +00:00
|
|
|
.unownegg
|
2015-11-20 04:38:16 +00:00
|
|
|
xor a
|
2015-12-19 19:48:30 +00:00
|
|
|
ld [wBoxAlignment], a
|
2015-12-23 14:12:29 +00:00
|
|
|
call .get_animation
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.get_animation
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartySpecies]
|
2015-11-20 04:38:16 +00:00
|
|
|
call IsAPokemon
|
|
|
|
ret c
|
2015-12-23 14:12:29 +00:00
|
|
|
call StatsScreen_LoadTextBoxSpaceGFX
|
2017-12-28 12:32:33 +00:00
|
|
|
ld de, vTiles2 tile $00
|
2018-01-16 19:30:10 +00:00
|
|
|
predef GetAnimatedFrontpic
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 0, 0
|
|
|
|
ld d, $0
|
2017-11-03 00:09:27 +00:00
|
|
|
ld e, ANIM_MON_MENU
|
2018-01-16 19:30:10 +00:00
|
|
|
predef LoadMonAnimation
|
2015-11-20 04:38:16 +00:00
|
|
|
ld hl, wcf64
|
|
|
|
set 6, [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreen_GetAnimationParam:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wMonType]
|
2015-11-20 04:38:16 +00:00
|
|
|
ld hl, .Jumptable
|
|
|
|
rst JumpTable
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.Jumptable:
|
2015-12-21 19:10:16 +00:00
|
|
|
dw .PartyMon
|
|
|
|
dw .OTPartyMon
|
|
|
|
dw .BoxMon
|
|
|
|
dw .Tempmon
|
|
|
|
dw .Wildmon
|
2015-11-20 04:38:16 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.PartyMon:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartyMon]
|
|
|
|
ld hl, wPartyMon1
|
2015-11-20 04:38:16 +00:00
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
|
|
|
call AddNTimes
|
|
|
|
ld b, h
|
|
|
|
ld c, l
|
2015-12-21 19:10:16 +00:00
|
|
|
jr .CheckEggFaintedFrzSlp
|
2015-11-20 04:38:16 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.OTPartyMon:
|
2015-11-20 04:38:16 +00:00
|
|
|
xor a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.BoxMon:
|
2015-11-20 04:38:16 +00:00
|
|
|
ld hl, sBoxMons
|
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartyMon]
|
2015-11-20 04:38:16 +00:00
|
|
|
call AddNTimes
|
|
|
|
ld b, h
|
|
|
|
ld c, l
|
|
|
|
ld a, BANK(sBoxMons)
|
|
|
|
call GetSRAMBank
|
2015-12-21 19:10:16 +00:00
|
|
|
call .CheckEggFaintedFrzSlp
|
2015-11-20 04:38:16 +00:00
|
|
|
push af
|
|
|
|
call CloseSRAM
|
|
|
|
pop af
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.Tempmon:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld bc, wTempMonSpecies
|
2015-12-21 19:10:16 +00:00
|
|
|
jr .CheckEggFaintedFrzSlp ; utterly pointless
|
2015-11-20 04:38:16 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.CheckEggFaintedFrzSlp:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartySpecies]
|
2015-11-20 04:38:16 +00:00
|
|
|
cp EGG
|
|
|
|
jr z, .egg
|
|
|
|
call CheckFaintedFrzSlp
|
2015-12-21 19:10:16 +00:00
|
|
|
jr c, .FaintedFrzSlp
|
2015-11-20 04:38:16 +00:00
|
|
|
.egg
|
|
|
|
xor a
|
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.Wildmon:
|
2015-11-20 04:38:16 +00:00
|
|
|
ld a, $1
|
|
|
|
and a
|
|
|
|
ret
|
2015-12-21 19:10:16 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.FaintedFrzSlp:
|
2015-11-20 04:38:16 +00:00
|
|
|
xor a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreen_LoadTextBoxSpaceGFX:
|
2015-11-20 04:38:16 +00:00
|
|
|
nop
|
|
|
|
push hl
|
|
|
|
push de
|
|
|
|
push bc
|
|
|
|
push af
|
|
|
|
call DelayFrame
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh a, [rVBK]
|
2015-11-20 04:38:16 +00:00
|
|
|
push af
|
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [rVBK], a
|
2015-11-20 04:38:16 +00:00
|
|
|
ld de, TextBoxSpaceGFX
|
|
|
|
lb bc, BANK(TextBoxSpaceGFX), 1
|
2018-01-13 20:22:16 +00:00
|
|
|
ld hl, vTiles2 tile " "
|
2015-11-20 04:38:16 +00:00
|
|
|
call Get2bpp
|
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [rVBK], a
|
2015-11-20 04:38:16 +00:00
|
|
|
pop af
|
|
|
|
pop bc
|
|
|
|
pop de
|
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Unreferenced_4e32a:
|
2018-01-15 03:56:36 +00:00
|
|
|
; A blank space tile?
|
2015-11-20 04:38:16 +00:00
|
|
|
ds 16
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
EggStatsScreen:
|
2015-11-20 04:38:16 +00:00
|
|
|
xor a
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [hBGMapMode], a
|
2017-12-10 00:41:03 +00:00
|
|
|
ld hl, wCurHPPal
|
2015-11-20 04:38:16 +00:00
|
|
|
call SetHPPal
|
2015-12-23 03:19:33 +00:00
|
|
|
ld b, SCGB_STATS_SCREEN_HP_PALS
|
2015-11-20 04:38:16 +00:00
|
|
|
call GetSGBLayout
|
2015-12-23 03:19:33 +00:00
|
|
|
call StatsScreen_PlaceHorizontalDivider
|
2015-11-20 04:38:16 +00:00
|
|
|
ld de, EggString
|
|
|
|
hlcoord 8, 1
|
|
|
|
call PlaceString
|
|
|
|
ld de, IDNoString
|
|
|
|
hlcoord 8, 3
|
|
|
|
call PlaceString
|
|
|
|
ld de, OTString
|
|
|
|
hlcoord 8, 5
|
|
|
|
call PlaceString
|
|
|
|
ld de, FiveQMarkString
|
|
|
|
hlcoord 11, 3
|
|
|
|
call PlaceString
|
|
|
|
ld de, FiveQMarkString
|
|
|
|
hlcoord 11, 5
|
|
|
|
call PlaceString
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wTempMonHappiness] ; egg status
|
2015-11-20 04:38:16 +00:00
|
|
|
ld de, EggSoonString
|
|
|
|
cp $6
|
|
|
|
jr c, .picked
|
|
|
|
ld de, EggCloseString
|
|
|
|
cp $b
|
|
|
|
jr c, .picked
|
|
|
|
ld de, EggMoreTimeString
|
|
|
|
cp $29
|
|
|
|
jr c, .picked
|
|
|
|
ld de, EggALotMoreTimeString
|
|
|
|
.picked
|
|
|
|
hlcoord 1, 9
|
|
|
|
call PlaceString
|
|
|
|
ld hl, wcf64
|
|
|
|
set 5, [hl]
|
|
|
|
call SetPalettes ; pals
|
|
|
|
call DelayFrame
|
|
|
|
hlcoord 0, 0
|
|
|
|
call PrepMonFrontpic
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall HDMATransferTileMapToWRAMBank3
|
2015-12-21 19:10:16 +00:00
|
|
|
call StatsScreen_AnimateEgg
|
2015-11-20 04:38:16 +00:00
|
|
|
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wTempMonHappiness]
|
2015-11-20 04:38:16 +00:00
|
|
|
cp 6
|
|
|
|
ret nc
|
|
|
|
ld de, SFX_2_BOOPS
|
|
|
|
call PlaySFX
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
EggString:
|
2015-11-20 04:38:16 +00:00
|
|
|
db "EGG@"
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
FiveQMarkString:
|
2015-11-20 04:38:16 +00:00
|
|
|
db "?????@"
|
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
EggSoonString:
|
2015-11-20 04:38:16 +00:00
|
|
|
db "It's making sounds"
|
|
|
|
next "inside. It's going"
|
|
|
|
next "to hatch soon!@"
|
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
EggCloseString:
|
2015-11-20 04:38:16 +00:00
|
|
|
db "It moves around"
|
|
|
|
next "inside sometimes."
|
|
|
|
next "It must be close"
|
|
|
|
next "to hatching.@"
|
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
EggMoreTimeString:
|
2015-11-20 04:38:16 +00:00
|
|
|
db "Wonder what's"
|
|
|
|
next "inside? It needs"
|
|
|
|
next "more time, though.@"
|
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
EggALotMoreTimeString:
|
2015-11-20 04:38:16 +00:00
|
|
|
db "This EGG needs a"
|
|
|
|
next "lot more time to"
|
|
|
|
next "hatch.@"
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreen_AnimateEgg:
|
2015-12-21 19:10:16 +00:00
|
|
|
call StatsScreen_GetAnimationParam
|
2015-11-20 04:38:16 +00:00
|
|
|
ret nc
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wTempMonHappiness]
|
2015-11-20 04:38:16 +00:00
|
|
|
ld e, $7
|
2015-12-21 19:10:16 +00:00
|
|
|
cp 6
|
|
|
|
jr c, .animate
|
2015-11-20 04:38:16 +00:00
|
|
|
ld e, $8
|
2015-12-21 19:10:16 +00:00
|
|
|
cp 11
|
|
|
|
jr c, .animate
|
2015-11-20 04:38:16 +00:00
|
|
|
ret
|
2015-12-21 19:10:16 +00:00
|
|
|
|
|
|
|
.animate
|
2015-11-20 04:38:16 +00:00
|
|
|
push de
|
|
|
|
ld a, $1
|
2015-12-19 19:48:30 +00:00
|
|
|
ld [wBoxAlignment], a
|
2015-12-23 14:12:29 +00:00
|
|
|
call StatsScreen_LoadTextBoxSpaceGFX
|
2017-12-28 12:32:33 +00:00
|
|
|
ld de, vTiles2 tile $00
|
2018-01-16 19:30:10 +00:00
|
|
|
predef GetAnimatedFrontpic
|
2015-11-20 04:38:16 +00:00
|
|
|
pop de
|
|
|
|
hlcoord 0, 0
|
|
|
|
ld d, $0
|
2018-01-16 19:30:10 +00:00
|
|
|
predef LoadMonAnimation
|
2015-11-20 04:38:16 +00:00
|
|
|
ld hl, wcf64
|
|
|
|
set 6, [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreen_LoadPageIndicators:
|
2015-11-20 04:38:16 +00:00
|
|
|
hlcoord 13, 5
|
2018-01-12 03:16:17 +00:00
|
|
|
ld a, $36 ; first of 4 small square tiles
|
2015-11-20 04:38:16 +00:00
|
|
|
call .load_square
|
|
|
|
hlcoord 15, 5
|
2018-01-19 02:15:59 +00:00
|
|
|
ld a, $36 ; " " " "
|
2015-11-20 04:38:16 +00:00
|
|
|
call .load_square
|
|
|
|
hlcoord 17, 5
|
2018-01-19 02:15:59 +00:00
|
|
|
ld a, $36 ; " " " "
|
2015-11-20 04:38:16 +00:00
|
|
|
call .load_square
|
|
|
|
ld a, c
|
2018-01-11 17:00:01 +00:00
|
|
|
cp GREEN_PAGE
|
2018-01-12 03:16:17 +00:00
|
|
|
ld a, $3a ; first of 4 large square tiles
|
2018-01-11 17:00:01 +00:00
|
|
|
hlcoord 13, 5 ; PINK_PAGE (< GREEN_PAGE)
|
2015-11-20 04:38:16 +00:00
|
|
|
jr c, .load_square
|
2018-01-11 17:00:01 +00:00
|
|
|
hlcoord 15, 5 ; GREEN_PAGE (= GREEN_PAGE)
|
2015-11-20 04:38:16 +00:00
|
|
|
jr z, .load_square
|
2018-01-11 17:00:01 +00:00
|
|
|
hlcoord 17, 5 ; BLUE_PAGE (> GREEN_PAGE)
|
2018-06-24 14:09:41 +00:00
|
|
|
.load_square
|
2015-11-20 04:38:16 +00:00
|
|
|
push bc
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hld], a
|
|
|
|
ld bc, SCREEN_WIDTH
|
|
|
|
add hl, bc
|
|
|
|
inc a
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hl], a
|
|
|
|
pop bc
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
CopyNickname:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld de, wStringBuffer1
|
2018-01-20 17:25:55 +00:00
|
|
|
ld bc, MON_NAME_LENGTH
|
2018-01-12 03:16:17 +00:00
|
|
|
jr .okay ; utterly pointless
|
2015-11-20 04:38:16 +00:00
|
|
|
.okay
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wMonType]
|
2015-11-20 04:38:16 +00:00
|
|
|
cp BOXMON
|
|
|
|
jr nz, .partymon
|
|
|
|
ld a, BANK(sBoxMonNicknames)
|
|
|
|
call GetSRAMBank
|
|
|
|
push de
|
|
|
|
call CopyBytes
|
|
|
|
pop de
|
|
|
|
call CloseSRAM
|
|
|
|
ret
|
|
|
|
|
|
|
|
.partymon
|
|
|
|
push de
|
|
|
|
call CopyBytes
|
|
|
|
pop de
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
GetNicknamePointer:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wMonType]
|
2015-11-20 04:38:16 +00:00
|
|
|
add a
|
|
|
|
ld c, a
|
|
|
|
ld b, 0
|
|
|
|
add hl, bc
|
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wMonType]
|
2016-05-11 21:16:03 +00:00
|
|
|
cp TEMPMON
|
2015-11-20 04:38:16 +00:00
|
|
|
ret z
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartyMon]
|
2015-11-20 04:38:16 +00:00
|
|
|
jp SkipNames
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
CheckFaintedFrzSlp:
|
2015-11-20 04:38:16 +00:00
|
|
|
ld hl, MON_HP
|
|
|
|
add hl, bc
|
|
|
|
ld a, [hli]
|
|
|
|
or [hl]
|
|
|
|
jr z, .fainted_frz_slp
|
|
|
|
ld hl, MON_STATUS
|
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
2018-01-09 22:20:47 +00:00
|
|
|
and 1 << FRZ | SLP
|
2015-11-20 04:38:16 +00:00
|
|
|
jr nz, .fainted_frz_slp
|
|
|
|
and a
|
|
|
|
ret
|
|
|
|
|
|
|
|
.fainted_frz_slp
|
|
|
|
scf
|
|
|
|
ret
|