2014-05-22 22:13:20 +00:00
|
|
|
PKMNLeaguePC: ; 0x7657e
|
|
|
|
ld hl, AccessedHoFPCText
|
|
|
|
call PrintText
|
2014-05-26 21:04:56 +00:00
|
|
|
ld hl, wd730
|
2014-05-22 22:13:20 +00:00
|
|
|
set 6, [hl]
|
|
|
|
push hl
|
2014-09-13 07:50:56 +00:00
|
|
|
ld a, [wUpdateSpritesEnabled]
|
2014-05-22 22:13:20 +00:00
|
|
|
push af
|
2014-09-14 18:29:18 +00:00
|
|
|
ld a, [hTilesetType]
|
2014-05-22 22:13:20 +00:00
|
|
|
push af
|
|
|
|
xor a
|
2014-09-14 18:29:18 +00:00
|
|
|
ld [hTilesetType], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld [W_SPRITEFLIPPED], a
|
2014-09-13 07:50:56 +00:00
|
|
|
ld [wUpdateSpritesEnabled], a
|
2015-07-19 03:49:52 +00:00
|
|
|
ld [wHoFTeamIndex2], a
|
2015-07-15 02:46:52 +00:00
|
|
|
ld [wHoFTeamNo], a
|
|
|
|
ld a, [wNumHoFTeams]
|
2014-05-22 22:13:20 +00:00
|
|
|
ld b, a
|
2015-07-15 02:46:52 +00:00
|
|
|
cp HOF_TEAM_CAPACITY + 1
|
|
|
|
jr c, .loop
|
|
|
|
; If the total number of hall of fame teams is greater than the storage
|
|
|
|
; capacity, then calculate the number of the first team that is still recorded.
|
|
|
|
ld b, HOF_TEAM_CAPACITY
|
2014-05-22 22:13:20 +00:00
|
|
|
sub b
|
2015-07-15 02:46:52 +00:00
|
|
|
ld [wHoFTeamNo], a
|
|
|
|
.loop
|
|
|
|
ld hl, wHoFTeamNo
|
2014-05-22 22:13:20 +00:00
|
|
|
inc [hl]
|
|
|
|
push bc
|
2015-07-19 03:49:52 +00:00
|
|
|
ld a, [wHoFTeamIndex2]
|
|
|
|
ld [wHoFTeamIndex], a
|
2014-06-14 21:24:35 +00:00
|
|
|
callba LoadHallOfFameTeams
|
2015-07-15 02:46:52 +00:00
|
|
|
call LeaguePCShowTeam
|
2014-05-22 22:13:20 +00:00
|
|
|
pop bc
|
2015-07-15 02:46:52 +00:00
|
|
|
jr c, .doneShowingTeams
|
2015-07-19 03:49:52 +00:00
|
|
|
ld hl, wHoFTeamIndex2
|
2014-05-22 22:13:20 +00:00
|
|
|
inc [hl]
|
|
|
|
ld a, [hl]
|
|
|
|
cp b
|
2015-07-15 02:46:52 +00:00
|
|
|
jr nz, .loop
|
|
|
|
.doneShowingTeams
|
2014-05-22 22:13:20 +00:00
|
|
|
pop af
|
2014-09-14 18:29:18 +00:00
|
|
|
ld [hTilesetType], a
|
2014-05-22 22:13:20 +00:00
|
|
|
pop af
|
2014-09-13 07:50:56 +00:00
|
|
|
ld [wUpdateSpritesEnabled], a
|
2014-05-22 22:13:20 +00:00
|
|
|
pop hl
|
|
|
|
res 6, [hl]
|
|
|
|
call GBPalWhiteOutWithDelay3
|
|
|
|
call ClearScreen
|
|
|
|
call GoPAL_SET_CF1C
|
|
|
|
jp GBPalNormal
|
|
|
|
|
2015-07-15 02:46:52 +00:00
|
|
|
LeaguePCShowTeam: ; 765e5 (1d:65e5)
|
2014-06-14 21:24:35 +00:00
|
|
|
ld c, PARTY_LENGTH
|
|
|
|
.loop
|
2014-05-22 22:13:20 +00:00
|
|
|
push bc
|
2015-07-15 02:46:52 +00:00
|
|
|
call LeaguePCShowMon
|
2014-05-22 22:13:20 +00:00
|
|
|
call WaitForTextScrollButtonPress
|
2014-05-25 17:51:53 +00:00
|
|
|
ld a, [hJoyHeld]
|
2014-05-22 22:13:20 +00:00
|
|
|
bit 1, a
|
2014-06-14 21:24:35 +00:00
|
|
|
jr nz, .exit
|
|
|
|
ld hl, wHallOfFame + HOF_MON
|
|
|
|
ld de, wHallOfFame
|
|
|
|
ld bc, HOF_TEAM - HOF_MON
|
2014-05-22 22:13:20 +00:00
|
|
|
call CopyData
|
|
|
|
pop bc
|
2014-06-14 21:24:35 +00:00
|
|
|
ld a, [wHallOfFame + 0]
|
|
|
|
cp $ff
|
|
|
|
jr z, .done
|
2014-05-22 22:13:20 +00:00
|
|
|
dec c
|
2014-06-14 21:24:35 +00:00
|
|
|
jr nz, .loop
|
|
|
|
.done
|
2014-05-22 22:13:20 +00:00
|
|
|
and a
|
|
|
|
ret
|
2014-06-14 21:24:35 +00:00
|
|
|
.exit
|
2014-05-22 22:13:20 +00:00
|
|
|
pop bc
|
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
2015-07-15 02:46:52 +00:00
|
|
|
LeaguePCShowMon: ; 76610 (1d:6610)
|
2014-05-22 22:13:20 +00:00
|
|
|
call GBPalWhiteOutWithDelay3
|
|
|
|
call ClearScreen
|
2014-06-14 21:24:35 +00:00
|
|
|
ld hl, wHallOfFame
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, [hli]
|
2015-07-15 02:46:52 +00:00
|
|
|
ld [wHoFMonSpecies], a
|
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
|
2014-05-26 21:04:56 +00:00
|
|
|
ld [wcf1d], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, [hli]
|
2015-07-15 02:46:52 +00:00
|
|
|
ld [wHoFMonLevel], a
|
2014-05-26 21:04:56 +00:00
|
|
|
ld de, wcd6d
|
2015-08-05 21:20:29 +00:00
|
|
|
ld bc, 11
|
2014-05-22 22:13:20 +00:00
|
|
|
call CopyData
|
|
|
|
ld b, $0B
|
|
|
|
ld c, 0
|
|
|
|
call GoPAL_SET
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 12, 5
|
2014-05-22 22:13:20 +00:00
|
|
|
call GetMonHeader
|
|
|
|
call LoadFrontSpriteByMonIndex
|
|
|
|
call GBPalNormal
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 0, 13
|
2014-05-22 22:13:20 +00:00
|
|
|
ld b, 2
|
|
|
|
ld c, $12
|
|
|
|
call TextBoxBorder
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 1, 15
|
2014-05-22 22:13:20 +00:00
|
|
|
ld de, HallOfFameNoText
|
|
|
|
call PlaceString
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 16, 15
|
2015-07-15 02:46:52 +00:00
|
|
|
ld de, wHoFTeamNo
|
2015-07-28 01:48:44 +00:00
|
|
|
lb bc, 1, 3
|
2014-05-22 22:13:20 +00:00
|
|
|
call PrintNumber
|
2015-07-19 18:56:13 +00:00
|
|
|
jpba HoFDisplayMonInfo
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
HallOfFameNoText: ; 76670 (1d:6670)
|
|
|
|
db "HALL OF FAME No @"
|
|
|
|
|
|
|
|
AccessedHoFPCText: ; 76683 (1d:6683)
|
|
|
|
TX_FAR _AccessedHoFPCText
|
|
|
|
db "@"
|