2016-06-12 00:24:04 +00:00
|
|
|
AnimateHallOfFame:
|
2015-07-15 02:46:52 +00:00
|
|
|
call HoFFadeOutScreenAndMusic
|
2014-05-22 22:13:20 +00:00
|
|
|
call ClearScreen
|
2014-06-14 21:24:35 +00:00
|
|
|
ld c, 100
|
2014-05-22 22:13:20 +00:00
|
|
|
call DelayFrames
|
|
|
|
call LoadFontTilePatterns
|
|
|
|
call LoadTextBoxTilePatterns
|
|
|
|
call DisableLCD
|
2017-12-30 00:54:27 +00:00
|
|
|
ld hl, vBGMap0
|
2014-05-22 22:13:20 +00:00
|
|
|
ld bc, $800
|
2015-08-05 21:20:29 +00:00
|
|
|
ld a, " "
|
2014-05-22 22:13:20 +00:00
|
|
|
call FillMemory
|
|
|
|
call EnableLCD
|
2015-07-03 19:37:53 +00:00
|
|
|
ld hl, rLCDC
|
2014-05-22 22:13:20 +00:00
|
|
|
set 3, [hl]
|
|
|
|
xor a
|
2014-06-14 21:24:35 +00:00
|
|
|
ld hl, wHallOfFame
|
|
|
|
ld bc, HOF_TEAM
|
2014-05-22 22:13:20 +00:00
|
|
|
call FillMemory
|
|
|
|
xor a
|
2014-09-13 07:50:56 +00:00
|
|
|
ld [wUpdateSpritesEnabled], a
|
2014-09-14 18:29:18 +00:00
|
|
|
ld [hTilesetType], a
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wSpriteFlipped], a
|
2015-07-15 02:46:52 +00:00
|
|
|
ld [wLetterPrintingDelayFlags], a ; no delay
|
|
|
|
ld [wHoFMonOrPlayer], a ; mon
|
2014-05-22 22:13:20 +00:00
|
|
|
inc a
|
2015-07-03 19:37:53 +00:00
|
|
|
ld [H_AUTOBGTRANSFERENABLED], a
|
2015-07-15 02:46:52 +00:00
|
|
|
ld hl, wNumHoFTeams
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, [hl]
|
|
|
|
inc a
|
2015-07-15 02:46:52 +00:00
|
|
|
jr z, .skipInc ; don't wrap around to 0
|
2014-05-22 22:13:20 +00:00
|
|
|
inc [hl]
|
2015-07-15 02:46:52 +00:00
|
|
|
.skipInc
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, $90
|
2014-09-23 22:02:03 +00:00
|
|
|
ld [hWY], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld c, BANK(Music_HallOfFame)
|
|
|
|
ld a, MUSIC_HALL_OF_FAME
|
|
|
|
call PlayMusic
|
2014-06-14 11:12:40 +00:00
|
|
|
ld hl, wPartySpecies
|
2014-05-22 22:13:20 +00:00
|
|
|
ld c, $ff
|
2015-07-15 02:46:52 +00:00
|
|
|
.partyMonLoop
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, [hli]
|
|
|
|
cp $ff
|
2015-07-15 02:46:52 +00:00
|
|
|
jr z, .doneShowingParty
|
2014-05-22 22:13:20 +00:00
|
|
|
inc c
|
|
|
|
push hl
|
|
|
|
push bc
|
2015-07-15 02:46:52 +00:00
|
|
|
ld [wHoFMonSpecies], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, c
|
2015-07-15 02:46:52 +00:00
|
|
|
ld [wHoFPartyMonIndex], a
|
2015-07-03 19:37:53 +00:00
|
|
|
ld hl, wPartyMon1Level
|
2014-06-14 21:24:35 +00:00
|
|
|
ld bc, wPartyMon2 - wPartyMon1
|
2014-05-22 22:13:20 +00:00
|
|
|
call AddNTimes
|
|
|
|
ld a, [hl]
|
2015-07-15 02:46:52 +00:00
|
|
|
ld [wHoFMonLevel], a
|
|
|
|
call HoFShowMonOrPlayer
|
|
|
|
call HoFDisplayAndRecordMonInfo
|
2015-07-03 19:37:53 +00:00
|
|
|
ld c, 80
|
2014-05-22 22:13:20 +00:00
|
|
|
call DelayFrames
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 2, 13
|
2016-06-12 17:11:31 +00:00
|
|
|
ld b, 3
|
|
|
|
ld c, 14
|
2014-05-22 22:13:20 +00:00
|
|
|
call TextBoxBorder
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 4, 15
|
2014-05-22 22:13:20 +00:00
|
|
|
ld de, HallOfFameText
|
|
|
|
call PlaceString
|
2014-06-14 21:24:35 +00:00
|
|
|
ld c, 180
|
2014-05-22 22:13:20 +00:00
|
|
|
call DelayFrames
|
2014-09-13 07:50:56 +00:00
|
|
|
call GBFadeOutToWhite
|
2014-05-22 22:13:20 +00:00
|
|
|
pop bc
|
|
|
|
pop hl
|
2015-07-15 02:46:52 +00:00
|
|
|
jr .partyMonLoop
|
|
|
|
.doneShowingParty
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, c
|
|
|
|
inc a
|
2014-06-14 21:24:35 +00:00
|
|
|
ld hl, wHallOfFame
|
|
|
|
ld bc, HOF_MON
|
2014-05-22 22:13:20 +00:00
|
|
|
call AddNTimes
|
|
|
|
ld [hl], $ff
|
2014-06-14 21:24:35 +00:00
|
|
|
call SaveHallOfFameTeams
|
2014-05-22 22:13:20 +00:00
|
|
|
xor a
|
2015-07-15 02:46:52 +00:00
|
|
|
ld [wHoFMonSpecies], a
|
2014-05-22 22:13:20 +00:00
|
|
|
inc a
|
2015-07-15 02:46:52 +00:00
|
|
|
ld [wHoFMonOrPlayer], a ; player
|
|
|
|
call HoFShowMonOrPlayer
|
2015-07-03 19:37:53 +00:00
|
|
|
call HoFDisplayPlayerStats
|
2015-07-15 02:46:52 +00:00
|
|
|
call HoFFadeOutScreenAndMusic
|
2014-05-22 22:13:20 +00:00
|
|
|
xor a
|
2014-09-23 22:02:03 +00:00
|
|
|
ld [hWY], a
|
2015-07-03 19:37:53 +00:00
|
|
|
ld hl, rLCDC
|
2014-05-22 22:13:20 +00:00
|
|
|
res 3, [hl]
|
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
HallOfFameText:
|
2014-05-22 22:13:20 +00:00
|
|
|
db "HALL OF FAME@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
HoFShowMonOrPlayer:
|
2014-05-22 22:13:20 +00:00
|
|
|
call ClearScreen
|
|
|
|
ld a, $d0
|
2015-02-07 10:43:08 +00:00
|
|
|
ld [hSCY], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, $c0
|
2015-02-07 10:43:08 +00:00
|
|
|
ld [hSCX], a
|
2015-07-15 02:46:52 +00:00
|
|
|
ld a, [wHoFMonSpecies]
|
2014-05-26 21:04:56 +00:00
|
|
|
ld [wcf91], a
|
|
|
|
ld [wd0b5], a
|
2014-06-14 11:12:40 +00:00
|
|
|
ld [wBattleMonSpecies2], a
|
2015-08-12 09:16:56 +00:00
|
|
|
ld [wWholeScreenPaletteMonSpecies], a
|
2015-07-15 02:46:52 +00:00
|
|
|
ld a, [wHoFMonOrPlayer]
|
2014-05-22 22:13:20 +00:00
|
|
|
and a
|
2015-07-15 02:46:52 +00:00
|
|
|
jr z, .showMon
|
|
|
|
; show player
|
2015-07-03 19:37:53 +00:00
|
|
|
call HoFLoadPlayerPics
|
2015-07-15 02:46:52 +00:00
|
|
|
jr .next1
|
|
|
|
.showMon
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 12, 5
|
2014-05-22 22:13:20 +00:00
|
|
|
call GetMonHeader
|
|
|
|
call LoadFrontSpriteByMonIndex
|
2014-06-16 20:57:26 +00:00
|
|
|
predef LoadMonBackPic
|
2015-07-15 02:46:52 +00:00
|
|
|
.next1
|
2015-08-12 09:16:56 +00:00
|
|
|
ld b, SET_PAL_POKEMON_WHOLE_SCREEN
|
|
|
|
ld c, 0
|
|
|
|
call RunPaletteCommand
|
2015-07-15 02:46:52 +00:00
|
|
|
ld a, %11100100
|
2015-07-03 19:37:53 +00:00
|
|
|
ld [rBGP], a
|
2015-07-15 02:46:52 +00:00
|
|
|
ld c, $31 ; back pic
|
|
|
|
call HoFLoadMonPlayerPicTileIDs
|
2014-05-22 22:13:20 +00:00
|
|
|
ld d, $a0
|
2015-07-15 02:46:52 +00:00
|
|
|
ld e, 4
|
2014-09-13 07:50:56 +00:00
|
|
|
ld a, [wOnSGB]
|
2014-05-22 22:13:20 +00:00
|
|
|
and a
|
2015-07-15 02:46:52 +00:00
|
|
|
jr z, .next2
|
|
|
|
sla e ; scroll more slowly on SGB
|
|
|
|
.next2
|
|
|
|
call .ScrollPic ; scroll back pic left
|
2014-05-22 22:13:20 +00:00
|
|
|
xor a
|
2015-02-07 10:43:08 +00:00
|
|
|
ld [hSCY], a
|
2015-07-15 02:46:52 +00:00
|
|
|
ld c, a ; front pic
|
|
|
|
call HoFLoadMonPlayerPicTileIDs
|
|
|
|
ld d, 0
|
|
|
|
ld e, -4
|
|
|
|
; scroll front pic right
|
|
|
|
|
|
|
|
.ScrollPic
|
2014-05-22 22:13:20 +00:00
|
|
|
call DelayFrame
|
2015-02-07 10:43:08 +00:00
|
|
|
ld a, [hSCX]
|
2014-05-22 22:13:20 +00:00
|
|
|
add e
|
2015-02-07 10:43:08 +00:00
|
|
|
ld [hSCX], a
|
2014-05-22 22:13:20 +00:00
|
|
|
cp d
|
2015-07-15 02:46:52 +00:00
|
|
|
jr nz, .ScrollPic
|
2014-05-22 22:13:20 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
HoFDisplayAndRecordMonInfo:
|
2015-07-15 02:46:52 +00:00
|
|
|
ld a, [wHoFPartyMonIndex]
|
2015-07-03 19:37:53 +00:00
|
|
|
ld hl, wPartyMonNicks
|
2014-05-22 22:13:20 +00:00
|
|
|
call GetPartyMonName
|
2015-07-15 02:46:52 +00:00
|
|
|
call HoFDisplayMonInfo
|
|
|
|
jp HoFRecordMonInfo
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
HoFDisplayMonInfo:
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 0, 2
|
2015-07-15 02:46:52 +00:00
|
|
|
ld b, 9
|
|
|
|
ld c, 10
|
2014-05-22 22:13:20 +00:00
|
|
|
call TextBoxBorder
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 2, 6
|
2014-05-22 22:13:20 +00:00
|
|
|
ld de, HoFMonInfoText
|
|
|
|
call PlaceString
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 1, 4
|
2014-05-26 21:04:56 +00:00
|
|
|
ld de, wcd6d
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaceString
|
2015-07-15 02:46:52 +00:00
|
|
|
ld a, [wHoFMonLevel]
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 8, 7
|
2014-05-22 22:13:20 +00:00
|
|
|
call PrintLevelCommon
|
2015-07-15 02:46:52 +00:00
|
|
|
ld a, [wHoFMonSpecies]
|
2014-05-26 21:04:56 +00:00
|
|
|
ld [wd0b5], a
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 3, 9
|
2015-02-08 00:24:16 +00:00
|
|
|
predef PrintMonType
|
2015-07-15 02:46:52 +00:00
|
|
|
ld a, [wHoFMonSpecies]
|
2014-05-22 22:13:20 +00:00
|
|
|
jp PlayCry
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
HoFMonInfoText:
|
2014-05-22 22:13:20 +00:00
|
|
|
db "LEVEL/"
|
|
|
|
next "TYPE1/"
|
|
|
|
next "TYPE2/@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
HoFLoadPlayerPics:
|
2015-07-03 19:37:53 +00:00
|
|
|
ld de, RedPicFront
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, BANK(RedPicFront)
|
|
|
|
call UncompressSpriteFromDE
|
2015-08-31 03:15:32 +00:00
|
|
|
ld hl, sSpriteBuffer1
|
|
|
|
ld de, sSpriteBuffer0
|
2014-05-22 22:13:20 +00:00
|
|
|
ld bc, $310
|
|
|
|
call CopyData
|
2014-05-29 08:31:46 +00:00
|
|
|
ld de, vFrontPic
|
2014-05-22 22:13:20 +00:00
|
|
|
call InterlaceMergeSpriteBuffers
|
2015-07-03 19:37:53 +00:00
|
|
|
ld de, RedPicBack
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, BANK(RedPicBack)
|
|
|
|
call UncompressSpriteFromDE
|
2014-06-16 20:57:26 +00:00
|
|
|
predef ScaleSpriteByTwo
|
2014-05-29 08:31:46 +00:00
|
|
|
ld de, vBackPic
|
2014-05-22 22:13:20 +00:00
|
|
|
call InterlaceMergeSpriteBuffers
|
|
|
|
ld c, $1
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
HoFLoadMonPlayerPicTileIDs:
|
2015-07-15 02:46:52 +00:00
|
|
|
; c = base tile ID
|
|
|
|
ld b, 0
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 12, 5
|
2015-02-07 10:43:08 +00:00
|
|
|
predef_jump CopyTileIDsFromList
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
HoFDisplayPlayerStats:
|
2015-07-21 21:21:14 +00:00
|
|
|
SetEvent EVENT_HALL_OF_FAME_DEX_RATING
|
2014-06-16 20:57:26 +00:00
|
|
|
predef DisplayDexRating
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 0, 4
|
2016-06-12 04:30:05 +00:00
|
|
|
ld b, 6
|
|
|
|
ld c, 10
|
2014-05-22 22:13:20 +00:00
|
|
|
call TextBoxBorder
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 5, 0
|
2016-06-12 04:30:05 +00:00
|
|
|
ld b, 2
|
|
|
|
ld c, 9
|
2014-05-22 22:13:20 +00:00
|
|
|
call TextBoxBorder
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 7, 2
|
2015-07-03 19:37:53 +00:00
|
|
|
ld de, wPlayerName
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaceString
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 1, 6
|
2014-05-22 22:13:20 +00:00
|
|
|
ld de, HoFPlayTimeText
|
|
|
|
call PlaceString
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 5, 7
|
2016-01-03 19:17:10 +00:00
|
|
|
ld de, wPlayTimeHours
|
2015-07-28 01:48:44 +00:00
|
|
|
lb bc, 1, 3
|
2014-05-22 22:13:20 +00:00
|
|
|
call PrintNumber
|
|
|
|
ld [hl], $6d
|
|
|
|
inc hl
|
2016-01-03 19:17:10 +00:00
|
|
|
ld de, wPlayTimeMinutes
|
2015-07-28 01:48:44 +00:00
|
|
|
lb bc, LEADING_ZEROES | 1, 2
|
2014-05-22 22:13:20 +00:00
|
|
|
call PrintNumber
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 1, 9
|
2014-05-22 22:13:20 +00:00
|
|
|
ld de, HoFMoneyText
|
|
|
|
call PlaceString
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 4, 10
|
2015-07-03 19:37:53 +00:00
|
|
|
ld de, wPlayerMoney
|
2014-05-22 22:13:20 +00:00
|
|
|
ld c, $a3
|
|
|
|
call PrintBCDNumber
|
|
|
|
ld hl, DexSeenOwnedText
|
2015-07-03 19:37:53 +00:00
|
|
|
call HoFPrintTextAndDelay
|
2014-05-22 22:13:20 +00:00
|
|
|
ld hl, DexRatingText
|
2015-07-03 19:37:53 +00:00
|
|
|
call HoFPrintTextAndDelay
|
2015-08-13 05:14:31 +00:00
|
|
|
ld hl, wDexRatingText
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
HoFPrintTextAndDelay:
|
2014-05-22 22:13:20 +00:00
|
|
|
call PrintText
|
2015-07-03 19:37:53 +00:00
|
|
|
ld c, 120
|
2014-05-22 22:13:20 +00:00
|
|
|
jp DelayFrames
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
HoFPlayTimeText:
|
2014-05-22 22:13:20 +00:00
|
|
|
db "PLAY TIME@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
HoFMoneyText:
|
2014-05-22 22:13:20 +00:00
|
|
|
db "MONEY@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
DexSeenOwnedText:
|
2014-05-22 22:13:20 +00:00
|
|
|
TX_FAR _DexSeenOwnedText
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
DexRatingText:
|
2014-05-22 22:13:20 +00:00
|
|
|
TX_FAR _DexRatingText
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
HoFRecordMonInfo:
|
2014-06-14 21:24:35 +00:00
|
|
|
ld hl, wHallOfFame
|
|
|
|
ld bc, HOF_MON
|
2015-07-15 02:46:52 +00:00
|
|
|
ld a, [wHoFPartyMonIndex]
|
2014-05-22 22:13:20 +00:00
|
|
|
call AddNTimes
|
2015-07-15 02:46:52 +00:00
|
|
|
ld a, [wHoFMonSpecies]
|
2014-05-22 22:13:20 +00:00
|
|
|
ld [hli], a
|
2015-07-15 02:46:52 +00:00
|
|
|
ld a, [wHoFMonLevel]
|
2014-05-22 22:13:20 +00:00
|
|
|
ld [hli], a
|
|
|
|
ld e, l
|
|
|
|
ld d, h
|
2014-05-26 21:04:56 +00:00
|
|
|
ld hl, wcd6d
|
2015-08-11 04:51:20 +00:00
|
|
|
ld bc, NAME_LENGTH
|
2014-05-22 22:13:20 +00:00
|
|
|
jp CopyData
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
HoFFadeOutScreenAndMusic:
|
2015-08-09 05:32:44 +00:00
|
|
|
ld a, 10
|
|
|
|
ld [wAudioFadeOutCounterReloadValue], a
|
|
|
|
ld [wAudioFadeOutCounter], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, $ff
|
2015-08-09 05:32:44 +00:00
|
|
|
ld [wAudioFadeOutControl], a
|
2014-09-13 07:50:56 +00:00
|
|
|
jp GBFadeOutToWhite
|