hall of fame / credits

This commit is contained in:
YamaArashi 2015-07-14 19:46:52 -07:00
parent a0ed5bd4aa
commit 07dd705637
21 changed files with 221 additions and 179 deletions

View file

@ -2,13 +2,13 @@ Func_213c8:: ; 213c8 (8:53c8)
xor a
ld [H_AUTOBGTRANSFERENABLED], a
call SaveScreenTilesToBuffer2
ld a, [wd5a2]
ld a, [wNumHoFTeams]
and a
jr nz, .asm_213f3
ld a, [wd74b]
bit 5, a
jr z, .asm_213ea
ld a, [wd5a2]
ld a, [wNumHoFTeams]
and a
jr nz, .asm_213f3
hlCoord 0, 0
@ -53,7 +53,7 @@ Func_213c8:: ; 213c8 (8:53c8)
hlCoord 2, 6
ld de, OaksPCText
call PlaceString
ld a, [wd5a2]
ld a, [wNumHoFTeams]
and a
jr z, .asm_2145a
ld a, $4

View file

@ -13,30 +13,32 @@ PKMNLeaguePC: ; 0x7657e
ld [W_SPRITEFLIPPED], a
ld [wUpdateSpritesEnabled], a
ld [wTrainerScreenX], a
ld [wcd42], a
ld a, [wd5a2]
ld [wHoFTeamNo], a
ld a, [wNumHoFTeams]
ld b, a
cp NUM_HOF_TEAMS + 1
jr c, .first
ld b, NUM_HOF_TEAMS
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
sub b
ld [wcd42], a
.first
ld hl, wcd42
ld [wHoFTeamNo], a
.loop
ld hl, wHoFTeamNo
inc [hl]
push bc
ld a, [wTrainerScreenX]
ld [wWhichTrade], a
ld [wHoFMonSpecies], a
callba LoadHallOfFameTeams
call Func_765e5
call LeaguePCShowTeam
pop bc
jr c, .second
jr c, .doneShowingTeams
ld hl, wTrainerScreenX
inc [hl]
ld a, [hl]
cp b
jr nz, .first
.second
jr nz, .loop
.doneShowingTeams
pop af
ld [hTilesetType], a
pop af
@ -48,11 +50,11 @@ PKMNLeaguePC: ; 0x7657e
call GoPAL_SET_CF1C
jp GBPalNormal
Func_765e5: ; 765e5 (1d:65e5)
LeaguePCShowTeam: ; 765e5 (1d:65e5)
ld c, PARTY_LENGTH
.loop
push bc
call Func_76610
call LeaguePCShowMon
call WaitForTextScrollButtonPress
ld a, [hJoyHeld]
bit 1, a
@ -75,18 +77,18 @@ Func_765e5: ; 765e5 (1d:65e5)
scf
ret
Func_76610: ; 76610 (1d:6610)
LeaguePCShowMon: ; 76610 (1d:6610)
call GBPalWhiteOutWithDelay3
call ClearScreen
ld hl, wHallOfFame
ld a, [hli]
ld [wWhichTrade], a
ld [wHoFMonSpecies], a
ld [wcf91], a
ld [wd0b5], a
ld [wBattleMonSpecies2], a
ld [wcf1d], a
ld a, [hli]
ld [wTrainerFacingDirection], a
ld [wHoFMonLevel], a
ld de, wcd6d
ld bc, $000B
call CopyData
@ -105,11 +107,11 @@ Func_76610: ; 76610 (1d:6610)
ld de, HallOfFameNoText
call PlaceString
hlCoord 16, 15
ld de, wcd42
ld de, wHoFTeamNo
ld bc, $0103
call PrintNumber
ld b, BANK(Func_702f0)
ld hl, Func_702f0
ld b, BANK(HoFDisplayMonInfo)
ld hl, HoFDisplayMonInfo
jp Bankswitch
HallOfFameNoText: ; 76670 (1d:6670)

View file

@ -109,7 +109,7 @@ MainMenu: ; 5af2 (1:5af2)
ld [wd52a],a
ld c,10
call DelayFrames
ld a,[wd5a2]
ld a,[wNumHoFTeams]
and a
jp z,SpecialEnterMap
ld a,[W_CURMAP] ; map ID
@ -124,14 +124,14 @@ MainMenu: ; 5af2 (1:5af2)
Func_5bff: ; 5bff (1:5bff)
ld a,1
ld [wd358],a
ld [wLetterPrintingDelayFlags],a
ld a,3
ld [W_OPTIONS],a
ret
LinkMenu: ; 5c0a (1:5c0a)
xor a
ld [wd358], a
ld [wLetterPrintingDelayFlags], a
ld hl, wd72e
set 6, [hl]
ld hl, TextTerminator_6b20
@ -452,7 +452,7 @@ DisplayOptionMenu: ; 5e8a (1:5e8a)
ld [wCurrentMenuItem],a
ld [wLastMenuItem],a
inc a
ld [wd358],a
ld [wLetterPrintingDelayFlags],a
ld [wTrainerScreenY],a
ld a,3 ; text speed cursor Y coordinate
ld [wTopMenuItemY],a