2017-12-09 09:24:50 -08:00
|
|
|
HALLOFFAME_COLON EQU $63
|
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
HallOfFame::
|
2015-11-26 18:05:32 -08:00
|
|
|
call HallOfFame_FadeOutMusic
|
2017-12-28 04:15:46 -08:00
|
|
|
ld a, [wStatusFlags]
|
2015-11-19 15:07:20 -08:00
|
|
|
push af
|
|
|
|
ld a, 1
|
2016-05-08 11:11:24 -07:00
|
|
|
ld [wGameLogicPaused], a
|
2015-11-19 15:07:20 -08:00
|
|
|
call DisableSpriteUpdates
|
|
|
|
ld a, SPAWN_LANCE
|
|
|
|
ld [wSpawnAfterChampion], a
|
|
|
|
|
|
|
|
; Enable the Pokégear map to cycle through all of Kanto
|
2017-12-28 04:15:46 -08:00
|
|
|
ld hl, wStatusFlags
|
2018-01-22 12:40:43 -08:00
|
|
|
set STATUSFLAGS_HALL_OF_FAME_F, [hl]
|
2015-11-19 15:07:20 -08:00
|
|
|
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall HallOfFame_InitSaveIfNeeded
|
2015-11-19 15:07:20 -08:00
|
|
|
|
|
|
|
ld hl, wHallOfFameCount
|
|
|
|
ld a, [hl]
|
2018-03-03 21:27:22 -08:00
|
|
|
cp HOF_MASTER_COUNT
|
2015-11-19 15:07:20 -08:00
|
|
|
jr nc, .ok
|
|
|
|
inc [hl]
|
|
|
|
.ok
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall SaveGameData
|
2015-11-19 15:07:20 -08:00
|
|
|
call GetHallOfFameParty
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall AddHallOfFameEntry
|
2015-11-19 15:07:20 -08:00
|
|
|
|
|
|
|
xor a
|
2016-05-08 11:11:24 -07:00
|
|
|
ld [wGameLogicPaused], a
|
2015-11-26 18:05:32 -08:00
|
|
|
call AnimateHallOfFame
|
2015-11-19 15:07:20 -08:00
|
|
|
pop af
|
|
|
|
ld b, a
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall Credits
|
2015-11-19 15:07:20 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
RedCredits::
|
2017-12-25 10:40:10 -08:00
|
|
|
ld a, LOW(MUSIC_NONE)
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wMusicFadeID], a
|
2017-12-25 10:40:10 -08:00
|
|
|
ld a, HIGH(MUSIC_NONE)
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wMusicFadeID + 1], a
|
2015-11-26 18:05:32 -08:00
|
|
|
ld a, 10
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wMusicFade], a
|
2018-01-24 08:17:05 -08:00
|
|
|
farcall FadeOutPalettes
|
2015-11-19 15:07:20 -08:00
|
|
|
xor a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wVramState], a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hMapAnims], a
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall InitDisplayForRedCredits
|
2015-11-19 15:07:20 -08:00
|
|
|
ld c, 8
|
|
|
|
call DelayFrames
|
|
|
|
call DisableSpriteUpdates
|
|
|
|
ld a, SPAWN_RED
|
|
|
|
ld [wSpawnAfterChampion], a
|
2017-12-28 04:15:46 -08:00
|
|
|
ld a, [wStatusFlags]
|
2015-11-19 15:07:20 -08:00
|
|
|
ld b, a
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall Credits
|
2015-11-19 15:07:20 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
HallOfFame_FadeOutMusic:
|
2017-12-25 10:40:10 -08:00
|
|
|
ld a, LOW(MUSIC_NONE)
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wMusicFadeID], a
|
2017-12-25 10:40:10 -08:00
|
|
|
ld a, HIGH(MUSIC_NONE)
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wMusicFadeID + 1], a
|
2015-11-19 15:07:20 -08:00
|
|
|
ld a, 10
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wMusicFade], a
|
2018-01-24 08:17:05 -08:00
|
|
|
farcall FadeOutPalettes
|
2015-11-19 15:07:20 -08:00
|
|
|
xor a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wVramState], a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hMapAnims], a
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall InitDisplayForHallOfFame
|
2015-11-19 15:07:20 -08:00
|
|
|
ld c, 100
|
|
|
|
jp DelayFrames
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
HallOfFame_PlayMusicDE:
|
2015-11-19 15:07:20 -08:00
|
|
|
push de
|
|
|
|
ld de, MUSIC_NONE
|
|
|
|
call PlayMusic
|
|
|
|
call DelayFrame
|
|
|
|
pop de
|
|
|
|
call PlayMusic
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
AnimateHallOfFame:
|
2015-11-19 15:07:20 -08:00
|
|
|
xor a
|
|
|
|
ld [wJumptableIndex], a
|
2015-11-26 18:05:32 -08:00
|
|
|
call LoadHOFTeam
|
2015-11-19 15:07:20 -08:00
|
|
|
jr c, .done
|
2015-11-26 18:05:32 -08:00
|
|
|
ld de, MUSIC_HALL_OF_FAME
|
|
|
|
call HallOfFame_PlayMusicDE
|
2015-11-19 15:07:20 -08:00
|
|
|
xor a
|
2018-01-11 12:36:11 -08:00
|
|
|
ld [wHallOfFameMonCounter], a
|
2015-11-19 15:07:20 -08:00
|
|
|
.loop
|
2018-01-11 12:36:11 -08:00
|
|
|
ld a, [wHallOfFameMonCounter]
|
2015-11-26 18:05:32 -08:00
|
|
|
cp PARTY_LENGTH
|
2015-11-19 15:07:20 -08:00
|
|
|
jr nc, .done
|
2015-11-26 18:05:32 -08:00
|
|
|
ld hl, wHallOfFameTempMon1
|
|
|
|
ld bc, wHallOfFameTempMon1End - wHallOfFameTempMon1
|
2015-11-19 15:07:20 -08:00
|
|
|
call AddNTimes
|
|
|
|
ld a, [hl]
|
|
|
|
cp -1
|
|
|
|
jr z, .done
|
|
|
|
push hl
|
2015-11-26 18:05:32 -08:00
|
|
|
call AnimateHOFMonEntrance
|
2015-11-19 15:07:20 -08:00
|
|
|
pop hl
|
2015-11-26 18:05:32 -08:00
|
|
|
call .DisplayNewHallOfFamer
|
2015-11-19 15:07:20 -08:00
|
|
|
jr c, .done
|
2018-01-11 12:36:11 -08:00
|
|
|
ld hl, wHallOfFameMonCounter
|
2015-11-19 15:07:20 -08:00
|
|
|
inc [hl]
|
|
|
|
jr .loop
|
|
|
|
|
|
|
|
.done
|
2016-01-12 09:46:18 -08:00
|
|
|
call HOF_AnimatePlayerPic
|
2015-11-19 15:07:20 -08:00
|
|
|
ld a, $4
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wMusicFade], a
|
2015-11-20 08:47:52 -08:00
|
|
|
call RotateThreePalettesRight
|
2015-11-19 15:07:20 -08:00
|
|
|
ld c, 8
|
|
|
|
call DelayFrames
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
.DisplayNewHallOfFamer:
|
2015-11-26 18:05:32 -08:00
|
|
|
call DisplayHOFMon
|
|
|
|
ld de, .String_NewHallOfFamer
|
2015-11-19 15:07:20 -08:00
|
|
|
hlcoord 1, 2
|
|
|
|
call PlaceString
|
|
|
|
call WaitBGMap
|
|
|
|
decoord 6, 5
|
2018-07-22 20:42:50 -07:00
|
|
|
ld c, ANIM_MON_HOF
|
2018-01-16 11:30:10 -08:00
|
|
|
predef HOF_AnimateFrontpic
|
2015-11-19 15:07:20 -08:00
|
|
|
ld c, 60
|
|
|
|
call DelayFrames
|
|
|
|
and a
|
|
|
|
ret
|
|
|
|
|
2015-11-26 18:05:32 -08:00
|
|
|
.String_NewHallOfFamer:
|
2015-11-19 15:07:20 -08:00
|
|
|
db "New Hall of Famer!@"
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
GetHallOfFameParty:
|
2018-03-19 08:36:14 -07:00
|
|
|
ld hl, wHallOfFamePokemonList
|
|
|
|
ld bc, wHallOfFamePokemonListEnd - wHallOfFamePokemonList + 1
|
2015-11-19 15:07:20 -08:00
|
|
|
xor a
|
|
|
|
call ByteFill
|
|
|
|
ld a, [wHallOfFameCount]
|
2018-03-19 08:36:14 -07:00
|
|
|
ld de, wHallOfFamePokemonList
|
2015-11-19 15:07:20 -08:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wPartySpecies
|
2015-11-19 15:07:20 -08:00
|
|
|
ld c, 0
|
|
|
|
.next
|
|
|
|
ld a, [hli]
|
|
|
|
cp -1
|
|
|
|
jr z, .done
|
|
|
|
cp EGG
|
|
|
|
jr nz, .mon
|
|
|
|
inc c
|
|
|
|
jr .next
|
|
|
|
|
|
|
|
.mon
|
|
|
|
push hl
|
|
|
|
push de
|
|
|
|
push bc
|
|
|
|
|
|
|
|
ld a, c
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wPartyMons
|
2015-11-19 15:07:20 -08:00
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
|
|
|
call AddNTimes
|
|
|
|
ld c, l
|
|
|
|
ld b, h
|
|
|
|
|
|
|
|
ld hl, MON_SPECIES
|
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
|
|
|
|
ld hl, MON_ID
|
|
|
|
add hl, bc
|
|
|
|
ld a, [hli]
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld a, [hl]
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
|
|
|
|
ld hl, MON_DVS
|
|
|
|
add hl, bc
|
|
|
|
ld a, [hli]
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld a, [hl]
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
|
|
|
|
ld hl, MON_LEVEL
|
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
|
|
|
|
pop bc
|
|
|
|
push bc
|
|
|
|
ld a, c
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wPartyMonNicknames
|
2018-01-20 09:25:55 -08:00
|
|
|
ld bc, MON_NAME_LENGTH
|
2015-11-19 15:07:20 -08:00
|
|
|
call AddNTimes
|
2018-01-20 09:25:55 -08:00
|
|
|
ld bc, MON_NAME_LENGTH - 1
|
2015-11-19 15:07:20 -08:00
|
|
|
call CopyBytes
|
|
|
|
|
|
|
|
pop bc
|
|
|
|
inc c
|
|
|
|
pop de
|
2018-03-19 08:36:14 -07:00
|
|
|
ld hl, wHallOfFamePokemonListMon1End - wHallOfFamePokemonListMon1
|
2015-11-19 15:07:20 -08:00
|
|
|
add hl, de
|
|
|
|
ld e, l
|
|
|
|
ld d, h
|
|
|
|
pop hl
|
|
|
|
jr .next
|
|
|
|
|
|
|
|
.done
|
2018-03-19 08:36:14 -07:00
|
|
|
ld a, -1
|
2015-11-19 15:07:20 -08:00
|
|
|
ld [de], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
AnimateHOFMonEntrance:
|
2015-11-19 15:07:20 -08:00
|
|
|
push hl
|
|
|
|
call ClearBGPalettes
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall ResetDisplayBetweenHallOfFameMons
|
2015-11-19 15:07:20 -08:00
|
|
|
pop hl
|
|
|
|
ld a, [hli]
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wTempMonSpecies], a
|
|
|
|
ld [wCurPartySpecies], a
|
2015-11-19 15:07:20 -08:00
|
|
|
inc hl
|
2016-05-04 08:46:23 -07:00
|
|
|
inc hl
|
2015-11-19 15:07:20 -08:00
|
|
|
ld a, [hli]
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wTempMonDVs], a
|
2015-11-19 15:07:20 -08:00
|
|
|
ld a, [hli]
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wTempMonDVs + 1], a
|
|
|
|
ld hl, wTempMonDVs
|
2018-01-16 11:30:10 -08:00
|
|
|
predef GetUnownLetter
|
2015-11-19 15:07:20 -08:00
|
|
|
hlcoord 0, 0
|
|
|
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
|
|
|
ld a, " "
|
|
|
|
call ByteFill
|
2017-12-28 04:32:33 -08:00
|
|
|
ld de, vTiles2 tile $31
|
2018-01-16 11:30:10 -08:00
|
|
|
predef GetMonBackpic
|
2015-11-19 15:07:20 -08:00
|
|
|
ld a, $31
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hGraphicStartTile], a
|
2015-11-19 15:07:20 -08:00
|
|
|
hlcoord 6, 6
|
|
|
|
lb bc, 6, 6
|
2018-01-16 11:30:10 -08:00
|
|
|
predef PlaceGraphic
|
2015-11-19 15:07:20 -08:00
|
|
|
ld a, $d0
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hSCY], a
|
2015-11-19 15:07:20 -08:00
|
|
|
ld a, $90
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hSCX], a
|
2015-11-19 15:07:20 -08:00
|
|
|
call WaitBGMap
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hBGMapMode], a
|
2016-05-13 19:46:32 -07:00
|
|
|
ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
|
2015-11-19 15:07:20 -08:00
|
|
|
call GetSGBLayout
|
|
|
|
call SetPalettes
|
2015-11-26 18:05:32 -08:00
|
|
|
call HOF_SlideBackpic
|
2015-11-19 15:07:20 -08:00
|
|
|
xor a
|
2015-12-19 11:48:30 -08:00
|
|
|
ld [wBoxAlignment], a
|
2015-11-19 15:07:20 -08:00
|
|
|
hlcoord 0, 0
|
|
|
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
|
|
|
ld a, " "
|
|
|
|
call ByteFill
|
|
|
|
hlcoord 6, 5
|
|
|
|
call _PrepMonFrontpic
|
|
|
|
call WaitBGMap
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hBGMapMode], a
|
|
|
|
ldh [hSCY], a
|
2015-11-26 18:05:32 -08:00
|
|
|
call HOF_SlideFrontpic
|
2015-11-19 15:07:20 -08:00
|
|
|
ret
|
|
|
|
|
2015-11-26 18:05:32 -08:00
|
|
|
HOF_SlideBackpic:
|
|
|
|
.backpicloop
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh a, [hSCX]
|
2015-11-19 15:07:20 -08:00
|
|
|
cp $70
|
|
|
|
ret z
|
2020-06-16 16:32:36 -07:00
|
|
|
add 4
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hSCX], a
|
2015-11-19 15:07:20 -08:00
|
|
|
call DelayFrame
|
2015-11-26 18:05:32 -08:00
|
|
|
jr .backpicloop
|
2015-11-19 15:07:20 -08:00
|
|
|
|
2015-11-26 18:05:32 -08:00
|
|
|
HOF_SlideFrontpic:
|
|
|
|
.frontpicloop
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh a, [hSCX]
|
2015-11-19 15:07:20 -08:00
|
|
|
and a
|
|
|
|
ret z
|
|
|
|
dec a
|
2016-05-04 08:46:23 -07:00
|
|
|
dec a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hSCX], a
|
2015-11-19 15:07:20 -08:00
|
|
|
call DelayFrame
|
2015-11-26 18:05:32 -08:00
|
|
|
jr .frontpicloop
|
2015-11-19 15:07:20 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
_HallOfFamePC:
|
2015-11-19 15:07:20 -08:00
|
|
|
call LoadFontsBattleExtra
|
|
|
|
xor a
|
|
|
|
ld [wJumptableIndex], a
|
2016-04-10 11:42:14 -07:00
|
|
|
.MasterLoop:
|
2015-11-26 18:05:32 -08:00
|
|
|
call LoadHOFTeam
|
2015-11-19 15:07:20 -08:00
|
|
|
ret c
|
2016-01-12 09:46:18 -08:00
|
|
|
call .DisplayTeam
|
2015-11-19 15:07:20 -08:00
|
|
|
ret c
|
|
|
|
ld hl, wJumptableIndex
|
|
|
|
inc [hl]
|
2016-01-12 09:46:18 -08:00
|
|
|
jr .MasterLoop
|
2015-11-19 15:07:20 -08:00
|
|
|
|
2016-04-10 11:42:14 -07:00
|
|
|
.DisplayTeam:
|
2015-11-19 15:07:20 -08:00
|
|
|
xor a
|
2018-01-11 12:36:11 -08:00
|
|
|
ld [wHallOfFameMonCounter], a
|
2015-11-19 15:07:20 -08:00
|
|
|
.next
|
2016-01-12 09:46:18 -08:00
|
|
|
call .DisplayMonAndStrings
|
2015-11-19 15:07:20 -08:00
|
|
|
jr c, .start_button
|
|
|
|
.loop
|
|
|
|
call JoyTextDelay
|
|
|
|
ld hl, hJoyLast
|
|
|
|
ld a, [hl]
|
|
|
|
and B_BUTTON
|
|
|
|
jr nz, .b_button
|
|
|
|
ld a, [hl]
|
|
|
|
and A_BUTTON
|
|
|
|
jr nz, .a_button
|
|
|
|
ld a, [hl]
|
|
|
|
and START
|
|
|
|
jr nz, .start_button
|
|
|
|
call DelayFrame
|
|
|
|
jr .loop
|
|
|
|
|
|
|
|
.a_button
|
2018-01-11 12:36:11 -08:00
|
|
|
ld hl, wHallOfFameMonCounter
|
2015-11-19 15:07:20 -08:00
|
|
|
inc [hl]
|
|
|
|
jr .next
|
|
|
|
|
|
|
|
.b_button
|
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
|
|
|
.start_button
|
|
|
|
and a
|
|
|
|
ret
|
|
|
|
|
2016-04-10 11:42:14 -07:00
|
|
|
.DisplayMonAndStrings:
|
2015-11-19 15:07:20 -08:00
|
|
|
; Print the number of times the player has entered the Hall of Fame.
|
2018-02-26 08:51:16 -08:00
|
|
|
; If that number is at least HOF_MASTER_COUNT, print "HOF Master!" instead.
|
2018-01-11 12:36:11 -08:00
|
|
|
ld a, [wHallOfFameMonCounter]
|
2016-01-12 09:46:18 -08:00
|
|
|
cp PARTY_LENGTH
|
2015-11-19 15:07:20 -08:00
|
|
|
jr nc, .fail
|
2015-11-26 18:05:32 -08:00
|
|
|
ld hl, wHallOfFameTempMon1
|
|
|
|
ld bc, wHallOfFameTempMon1End - wHallOfFameTempMon1
|
2015-11-19 15:07:20 -08:00
|
|
|
call AddNTimes
|
|
|
|
ld a, [hl]
|
2016-01-12 09:46:18 -08:00
|
|
|
cp -1
|
2015-11-19 15:07:20 -08:00
|
|
|
jr nz, .okay
|
|
|
|
|
|
|
|
.fail
|
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
|
|
|
.okay
|
|
|
|
push hl
|
|
|
|
call ClearBGPalettes
|
|
|
|
pop hl
|
2015-11-26 18:05:32 -08:00
|
|
|
call DisplayHOFMon
|
|
|
|
ld a, [wHallOfFameTempWinCount]
|
2018-03-03 21:27:22 -08:00
|
|
|
cp HOF_MASTER_COUNT + 1 ; should be HOF_MASTER_COUNT
|
2015-11-19 15:07:20 -08:00
|
|
|
jr c, .print_num_hof
|
2016-01-12 09:46:18 -08:00
|
|
|
ld de, .HOFMaster
|
2015-11-19 15:07:20 -08:00
|
|
|
hlcoord 1, 2
|
|
|
|
call PlaceString
|
|
|
|
hlcoord 13, 2
|
|
|
|
jr .finish
|
|
|
|
|
|
|
|
.print_num_hof
|
2016-01-12 09:46:18 -08:00
|
|
|
ld de, .TimeFamer
|
2015-11-19 15:07:20 -08:00
|
|
|
hlcoord 1, 2
|
|
|
|
call PlaceString
|
|
|
|
hlcoord 2, 2
|
2015-11-26 18:05:32 -08:00
|
|
|
ld de, wHallOfFameTempWinCount
|
2015-11-19 15:07:20 -08:00
|
|
|
lb bc, 1, 3
|
|
|
|
call PrintNum
|
|
|
|
hlcoord 11, 2
|
|
|
|
|
|
|
|
.finish
|
2016-01-12 09:46:18 -08:00
|
|
|
ld de, .EmptyString
|
2015-11-19 15:07:20 -08:00
|
|
|
call PlaceString
|
|
|
|
call WaitBGMap
|
2016-05-13 19:46:32 -07:00
|
|
|
ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
|
2015-11-19 15:07:20 -08:00
|
|
|
call GetSGBLayout
|
|
|
|
call SetPalettes
|
|
|
|
decoord 6, 5
|
2018-07-22 20:42:50 -07:00
|
|
|
ld c, ANIM_MON_HOF
|
2018-01-16 11:30:10 -08:00
|
|
|
predef HOF_AnimateFrontpic
|
2015-11-19 15:07:20 -08:00
|
|
|
and a
|
|
|
|
ret
|
|
|
|
|
2016-01-12 09:46:18 -08:00
|
|
|
.EmptyString:
|
2015-11-19 15:07:20 -08:00
|
|
|
db "@"
|
|
|
|
|
2016-01-12 09:46:18 -08:00
|
|
|
.HOFMaster:
|
2015-11-19 15:07:20 -08:00
|
|
|
db " HOF Master!@"
|
|
|
|
|
2016-01-12 09:46:18 -08:00
|
|
|
.TimeFamer:
|
2015-11-19 15:07:20 -08:00
|
|
|
db " -Time Famer@"
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
LoadHOFTeam:
|
2015-11-19 15:07:20 -08:00
|
|
|
ld a, [wJumptableIndex]
|
|
|
|
cp NUM_HOF_TEAMS
|
2015-11-26 18:05:32 -08:00
|
|
|
jr nc, .invalid
|
2015-11-19 15:07:20 -08:00
|
|
|
ld hl, sHallOfFame
|
2018-03-19 08:36:14 -07:00
|
|
|
ld bc, wHallOfFameTempEnd - wHallOfFameTemp + 1
|
2015-11-19 15:07:20 -08:00
|
|
|
call AddNTimes
|
|
|
|
ld a, BANK(sHallOfFame)
|
2020-06-17 14:03:38 -07:00
|
|
|
call OpenSRAM
|
2015-11-19 15:07:20 -08:00
|
|
|
ld a, [hl]
|
|
|
|
and a
|
2015-11-26 18:05:32 -08:00
|
|
|
jr z, .absent
|
|
|
|
ld de, wHallOfFameTemp
|
2018-03-19 08:36:14 -07:00
|
|
|
ld bc, wHallOfFameTempEnd - wHallOfFameTemp + 1
|
2015-11-19 15:07:20 -08:00
|
|
|
call CopyBytes
|
|
|
|
call CloseSRAM
|
|
|
|
and a
|
|
|
|
ret
|
|
|
|
|
2015-11-26 18:05:32 -08:00
|
|
|
.absent
|
2015-11-19 15:07:20 -08:00
|
|
|
call CloseSRAM
|
|
|
|
|
2015-11-26 18:05:32 -08:00
|
|
|
.invalid
|
2015-11-19 15:07:20 -08:00
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
DisplayHOFMon:
|
2015-11-19 15:07:20 -08:00
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hBGMapMode], a
|
2015-11-19 15:07:20 -08:00
|
|
|
ld a, [hli]
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wTempMonSpecies], a
|
2015-11-19 15:07:20 -08:00
|
|
|
ld a, [hli]
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wTempMonID], a
|
2015-11-19 15:07:20 -08:00
|
|
|
ld a, [hli]
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wTempMonID + 1], a
|
2015-11-19 15:07:20 -08:00
|
|
|
ld a, [hli]
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wTempMonDVs], a
|
2015-11-19 15:07:20 -08:00
|
|
|
ld a, [hli]
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wTempMonDVs + 1], a
|
2015-11-19 15:07:20 -08:00
|
|
|
ld a, [hli]
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wTempMonLevel], a
|
|
|
|
ld de, wStringBuffer2
|
2018-01-20 09:25:55 -08:00
|
|
|
ld bc, MON_NAME_LENGTH - 1
|
2015-11-19 15:07:20 -08:00
|
|
|
call CopyBytes
|
|
|
|
ld a, "@"
|
2019-11-23 17:56:22 -08:00
|
|
|
ld [wStringBuffer2 + MON_NAME_LENGTH - 1], a
|
2015-11-19 15:07:20 -08:00
|
|
|
hlcoord 0, 0
|
|
|
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
|
|
|
ld a, " "
|
|
|
|
call ByteFill
|
|
|
|
hlcoord 0, 0
|
|
|
|
lb bc, 3, SCREEN_WIDTH - 2
|
2019-04-08 05:15:10 -07:00
|
|
|
call Textbox
|
2015-11-19 15:07:20 -08:00
|
|
|
hlcoord 0, 12
|
|
|
|
lb bc, 4, SCREEN_WIDTH - 2
|
2019-04-08 05:15:10 -07:00
|
|
|
call Textbox
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wTempMonSpecies]
|
|
|
|
ld [wCurPartySpecies], a
|
2020-12-23 13:29:30 -08:00
|
|
|
ld [wTextDecimalByte], a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wTempMonDVs
|
2018-01-16 11:30:10 -08:00
|
|
|
predef GetUnownLetter
|
2015-11-19 15:07:20 -08:00
|
|
|
xor a
|
2015-12-19 11:48:30 -08:00
|
|
|
ld [wBoxAlignment], a
|
2015-11-19 15:07:20 -08:00
|
|
|
hlcoord 6, 5
|
|
|
|
call _PrepMonFrontpic
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wCurPartySpecies]
|
2015-11-19 15:07:20 -08:00
|
|
|
cp EGG
|
|
|
|
jr z, .print_id_no
|
|
|
|
hlcoord 1, 13
|
|
|
|
ld a, "№"
|
|
|
|
ld [hli], a
|
2017-12-09 16:41:03 -08:00
|
|
|
ld [hl], "<DOT>"
|
2015-11-19 15:07:20 -08:00
|
|
|
hlcoord 3, 13
|
2020-12-23 13:29:30 -08:00
|
|
|
ld de, wTextDecimalByte
|
2015-11-19 15:07:20 -08:00
|
|
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
|
|
|
call PrintNum
|
|
|
|
call GetBasePokemonName
|
|
|
|
hlcoord 7, 13
|
|
|
|
call PlaceString
|
2016-05-11 14:16:03 -07:00
|
|
|
ld a, TEMPMON
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wMonType], a
|
2018-01-16 11:30:10 -08:00
|
|
|
farcall GetGender
|
2015-11-19 15:07:20 -08:00
|
|
|
ld a, " "
|
|
|
|
jr c, .got_gender
|
|
|
|
ld a, "♂"
|
|
|
|
jr nz, .got_gender
|
|
|
|
ld a, "♀"
|
|
|
|
|
|
|
|
.got_gender
|
|
|
|
hlcoord 18, 13
|
|
|
|
ld [hli], a
|
|
|
|
hlcoord 8, 14
|
|
|
|
ld a, "/"
|
|
|
|
ld [hli], a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld de, wStringBuffer2
|
2015-11-19 15:07:20 -08:00
|
|
|
call PlaceString
|
|
|
|
hlcoord 1, 16
|
|
|
|
call PrintLevel
|
|
|
|
|
|
|
|
.print_id_no
|
|
|
|
hlcoord 7, 16
|
|
|
|
ld a, "<ID>"
|
|
|
|
ld [hli], a
|
|
|
|
ld a, "№"
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], "/"
|
|
|
|
hlcoord 10, 16
|
2018-01-23 14:39:09 -08:00
|
|
|
ld de, wTempMonID
|
2015-11-19 15:07:20 -08:00
|
|
|
lb bc, PRINTNUM_LEADINGZEROS | 2, 5
|
|
|
|
call PrintNum
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
HOF_AnimatePlayerPic:
|
2015-11-19 15:07:20 -08:00
|
|
|
call ClearBGPalettes
|
2017-12-28 04:32:33 -08:00
|
|
|
ld hl, vTiles2 tile HALLOFFAME_COLON
|
2017-12-09 09:24:50 -08:00
|
|
|
ld de, FontExtra + 13 tiles ; "<COLON>"
|
2015-11-19 15:07:20 -08:00
|
|
|
lb bc, BANK(FontExtra), 1
|
|
|
|
call Request2bpp
|
|
|
|
hlcoord 0, 0
|
|
|
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
|
|
|
ld a, " "
|
|
|
|
call ByteFill
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall GetPlayerBackpic
|
2015-11-19 15:07:20 -08:00
|
|
|
ld a, $31
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hGraphicStartTile], a
|
2015-11-19 15:07:20 -08:00
|
|
|
hlcoord 6, 6
|
|
|
|
lb bc, 6, 6
|
2018-01-16 11:30:10 -08:00
|
|
|
predef PlaceGraphic
|
2015-11-19 15:07:20 -08:00
|
|
|
ld a, $d0
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hSCY], a
|
2015-11-19 15:07:20 -08:00
|
|
|
ld a, $90
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hSCX], a
|
2015-11-19 15:07:20 -08:00
|
|
|
call WaitBGMap
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hBGMapMode], a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wCurPartySpecies], a
|
2016-05-13 19:46:32 -07:00
|
|
|
ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
|
2015-11-19 15:07:20 -08:00
|
|
|
call GetSGBLayout
|
|
|
|
call SetPalettes
|
2015-11-26 18:05:32 -08:00
|
|
|
call HOF_SlideBackpic
|
2015-11-19 15:07:20 -08:00
|
|
|
xor a
|
2015-12-19 11:48:30 -08:00
|
|
|
ld [wBoxAlignment], a
|
2015-11-19 15:07:20 -08:00
|
|
|
hlcoord 0, 0
|
|
|
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
|
|
|
ld a, " "
|
|
|
|
call ByteFill
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall HOF_LoadTrainerFrontpic
|
2015-11-19 15:07:20 -08:00
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hGraphicStartTile], a
|
2015-11-19 15:07:20 -08:00
|
|
|
hlcoord 12, 5
|
|
|
|
lb bc, 7, 7
|
2018-01-16 11:30:10 -08:00
|
|
|
predef PlaceGraphic
|
2015-11-19 15:07:20 -08:00
|
|
|
ld a, $c0
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hSCX], a
|
2015-11-19 15:07:20 -08:00
|
|
|
call WaitBGMap
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hBGMapMode], a
|
|
|
|
ldh [hSCY], a
|
2015-11-26 18:05:32 -08:00
|
|
|
call HOF_SlideFrontpic
|
2015-11-19 15:07:20 -08:00
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hBGMapMode], a
|
2015-11-19 15:07:20 -08:00
|
|
|
hlcoord 0, 2
|
|
|
|
lb bc, 8, 9
|
2019-04-08 05:15:10 -07:00
|
|
|
call Textbox
|
2015-11-19 15:07:20 -08:00
|
|
|
hlcoord 0, 12
|
|
|
|
lb bc, 4, 18
|
2019-04-08 05:15:10 -07:00
|
|
|
call Textbox
|
2015-11-19 15:07:20 -08:00
|
|
|
hlcoord 2, 4
|
2018-01-23 14:39:09 -08:00
|
|
|
ld de, wPlayerName
|
2015-11-19 15:07:20 -08:00
|
|
|
call PlaceString
|
|
|
|
hlcoord 1, 6
|
|
|
|
ld a, "<ID>"
|
|
|
|
ld [hli], a
|
|
|
|
ld a, "№"
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], "/"
|
|
|
|
hlcoord 4, 6
|
2018-01-23 14:39:09 -08:00
|
|
|
ld de, wPlayerID
|
2015-11-19 15:07:20 -08:00
|
|
|
lb bc, PRINTNUM_LEADINGZEROS | 2, 5
|
|
|
|
call PrintNum
|
|
|
|
hlcoord 1, 8
|
|
|
|
ld de, .PlayTime
|
|
|
|
call PlaceString
|
|
|
|
hlcoord 3, 9
|
2018-01-23 14:39:09 -08:00
|
|
|
ld de, wGameTimeHours
|
2015-11-19 15:07:20 -08:00
|
|
|
lb bc, 2, 3
|
|
|
|
call PrintNum
|
2017-12-09 09:24:50 -08:00
|
|
|
ld [hl], HALLOFFAME_COLON
|
2015-11-19 15:07:20 -08:00
|
|
|
inc hl
|
2018-01-23 14:39:09 -08:00
|
|
|
ld de, wGameTimeMinutes
|
2015-11-19 15:07:20 -08:00
|
|
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
|
|
|
|
call PrintNum
|
|
|
|
call WaitBGMap
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall ProfOaksPCRating
|
2015-11-19 15:07:20 -08:00
|
|
|
ret
|
|
|
|
|
2016-04-10 11:42:14 -07:00
|
|
|
.PlayTime:
|
2015-11-19 15:07:20 -08:00
|
|
|
db "PLAY TIME@"
|