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

@ -8,7 +8,7 @@ NUM_BOXES EQU 12
HOF_MON EQU $10
HOF_TEAM EQU PARTY_LENGTH * HOF_MON
NUM_HOF_TEAMS EQU 50
HOF_TEAM_CAPACITY EQU 50
A_BUTTON EQU %00000001

View file

@ -6,10 +6,10 @@ HallOfFamePC: ; 7405c (1d:405c)
call DisableLCD
ld hl, vFont
ld bc, $800 / 2
call Func_74171
call ZeroMemory
ld hl, vChars2 + $600
ld bc, $200 / 2
call Func_74171
call ZeroMemory
ld hl, vChars2 + $7e0
ld bc, $10
ld a, $ff
@ -30,12 +30,12 @@ HallOfFamePC: ; 7405c (1d:405c)
call DelayFrames
xor a
ld [wWhichTrade], a
ld [wTrainerEngageDistance], a
ld [wNumCreditsMonsDisplayed], a
jp Credits
Func_740ba: ; 740ba (1d:40ba)
FadeInCreditsText: ; 740ba (1d:40ba)
ld hl, HoFGBPalettes
ld b, $4
ld b, 4
.asm_740bf
ld a, [hli]
ld [rBGP], a
@ -52,7 +52,7 @@ DisplayCreditsMon: ; 740cb (1d:40cb)
call FillMiddleOfScreenWithWhite
; display the next monster from CreditsMons
ld hl,wTrainerEngageDistance
ld hl,wNumCreditsMonsDisplayed
ld c,[hl] ; how many monsters have we displayed so far?
inc [hl]
ld b,0
@ -65,62 +65,69 @@ DisplayCreditsMon: ; 740cb (1d:40cb)
call GetMonHeader
call LoadFrontSpriteByMonIndex
ld hl,vBGMap0 + $c
call Func_74164
call CopyTileMapToVRAM
xor a
ld [H_AUTOBGTRANSFERENABLED],a
call LoadScreenTilesFromBuffer1
ld hl,vBGMap0
call Func_74164
call CopyTileMapToVRAM
ld a,$A7
ld [$FF4B],a
ld [rWX],a
ld hl,vBGMap1
call Func_74164
call CopyTileMapToVRAM
call FillMiddleOfScreenWithWhite
ld a,$FC
ld a,%11111100 ; make the mon a black silhouette
ld [rBGP],a
; scroll the mon left by one tile 7 times
ld bc,7
.next
call Func_74140
.scrollLoop1
call ScrollCreditsMonLeft
dec c
jr nz,.next
ld c,$14
.next2
call Func_74140
ld a,[$FF4B]
jr nz,.scrollLoop1
; scroll the mon left by one tile 20 times
; This time, we have to move the window left too in order to hide the text that
; is wrapping around to the right side of the screen.
ld c,20
.scrollLoop2
call ScrollCreditsMonLeft
ld a,[rWX]
sub 8
ld [$FF4B],a
ld [rWX],a
dec c
jr nz,.next2
jr nz,.scrollLoop2
xor a
ld [hWY],a
ld a,$C0
ld a,%11000000
ld [rBGP],a
ret
INCLUDE "data/credit_mons.asm"
Func_74140: ; 74140 (1d:4140)
ScrollCreditsMonLeft: ; 74140 (1d:4140)
ld h, b
ld l, $20
call Func_74152
call ScrollCreditsMonLeft_SetSCX
ld h, $0
ld l, $70
call Func_74152
call ScrollCreditsMonLeft_SetSCX
ld a, b
add $8
ld b, a
ret
Func_74152: ; 74152 (1d:4152)
ld a, [$ff44]
ScrollCreditsMonLeft_SetSCX: ; 74152 (1d:4152)
ld a, [rLY]
cp l
jr nz, Func_74152
jr nz, ScrollCreditsMonLeft_SetSCX
ld a, h
ld [rSCX], a
.asm_7415a
ld a, [$ff44]
.loop
ld a, [rLY]
cp h
jr z, .asm_7415a
jr z, .loop
ret
HoFGBPalettes: ; 74160 (1d:4160)
@ -129,7 +136,7 @@ HoFGBPalettes: ; 74160 (1d:4160)
db %11100000
db %11110000
Func_74164: ; 74164 (1d:4164)
CopyTileMapToVRAM: ; 74164 (1d:4164)
ld a, l
ld [H_AUTOBGTRANSFERDEST], a
ld a, h
@ -138,14 +145,15 @@ Func_74164: ; 74164 (1d:4164)
ld [H_AUTOBGTRANSFERENABLED], a
jp Delay3
Func_74171: ; 74171 (1d:4171)
ld [hl], $0
ZeroMemory: ; 74171 (1d:4171)
; zero bc bytes at hl
ld [hl], 0
inc hl
inc hl
dec bc
ld a, b
or c
jr nz, Func_74171
jr nz, ZeroMemory
ret
FillFourRowsWithBlack: ; 7417b (1d:417b)
@ -162,26 +170,26 @@ FillMiddleOfScreenWithWhite: ; 74183 (1d:4183)
Credits: ; 7418e (1d:418e)
ld de, CreditsOrder
push de
.asm_74192
.nextCreditsScreen
pop de
hlCoord 9, 6
push hl
call FillMiddleOfScreenWithWhite
pop hl
.asm_7419b
.nextCreditsCommand
ld a, [de]
inc de
push de
cp $ff
jr z, .asm_741d5
jr z, .fadeInTextAndShowMon
cp $fe
jr z, .asm_741dc
jr z, .showTextAndShowMon
cp $fd
jr z, .asm_741e6
jr z, .fadeInText
cp $fc
jr z, .asm_741ed
jr z, .showText
cp $fb
jr z, .asm_741f4
jr z, .showCopyrightText
cp $fa
jr z, .showTheEnd
push hl
@ -189,7 +197,7 @@ Credits: ; 7418e (1d:418e)
ld hl, CreditsTextPointers
add a
ld c, a
ld b, $0
ld b, 0
add hl, bc
ld e, [hl]
inc hl
@ -205,32 +213,32 @@ Credits: ; 7418e (1d:418e)
ld bc, SCREEN_WIDTH * 2
add hl, bc
pop de
jr .asm_7419b
.asm_741d5
call Func_740ba
jr .nextCreditsCommand
.fadeInTextAndShowMon
call FadeInCreditsText
ld c, 90
jr .asm_741de
.asm_741dc
jr .next1
.showTextAndShowMon
ld c, 110
.asm_741de
.next1
call DelayFrames
call DisplayCreditsMon
jr .asm_74192
.asm_741e6
call Func_740ba
jr .nextCreditsScreen
.fadeInText
call FadeInCreditsText
ld c, 120
jr .asm_741ef
.asm_741ed
jr .next2
.showText
ld c, 140
.asm_741ef
.next2
call DelayFrames
jr .asm_74192
.asm_741f4
jr .nextCreditsScreen
.showCopyrightText
push de
callba LoadCopyrightTiles
pop de
pop de
jr .asm_7419b
jr .nextCreditsCommand
.showTheEnd
ld c, 16
call DelayFrames
@ -246,7 +254,7 @@ Credits: ; 7418e (1d:418e)
hlCoord 4, 9
inc de
call PlaceString
jp Func_740ba
jp FadeInCreditsText
TheEndTextString: ; 74229 (1d:4229)
; "T H E E N D"

View file

@ -1973,7 +1973,7 @@ AnimationWavyScreen: ; 79666 (1e:5666)
push hl
.asm_79680
call Func_796ae
ld a, [$ff44]
ld a, [rLY]
cp e
jr nz, .asm_79680
pop hl

View file

@ -6856,7 +6856,7 @@ DetermineWildOpponent: ; 3ef23 (f:6f23)
InitBattleCommon: ; 3ef3d (f:6f3d)
ld a, [wMapPalOffset]
push af
ld hl, wd358
ld hl, wLetterPrintingDelayFlags
ld a, [hl]
push af
res 1, [hl]
@ -6963,7 +6963,7 @@ InitBattle_Common: ; 3efeb (f:6feb)
call StartBattle
callab EndOfBattle
pop af
ld [wd358], a
ld [wLetterPrintingDelayFlags], a
pop af
ld [wMapPalOffset], a
ld a, [wd0d4]

View file

@ -1,5 +1,5 @@
AnimateHallOfFame: ; 701a0 (1c:41a0)
call Func_70423
call HoFFadeOutScreenAndMusic
call ClearScreen
ld c, 100
call DelayFrames
@ -21,16 +21,16 @@ AnimateHallOfFame: ; 701a0 (1c:41a0)
ld [wUpdateSpritesEnabled], a
ld [hTilesetType], a
ld [W_SPRITEFLIPPED], a
ld [wd358], a
ld [wTrainerScreenY], a
ld [wLetterPrintingDelayFlags], a ; no delay
ld [wHoFMonOrPlayer], a ; mon
inc a
ld [H_AUTOBGTRANSFERENABLED], a
ld hl, wd5a2
ld hl, wNumHoFTeams
ld a, [hl]
inc a
jr z, .asm_701eb
jr z, .skipInc ; don't wrap around to 0
inc [hl]
.asm_701eb
.skipInc
ld a, $90
ld [hWY], a
ld c, BANK(Music_HallOfFame)
@ -38,23 +38,23 @@ AnimateHallOfFame: ; 701a0 (1c:41a0)
call PlayMusic
ld hl, wPartySpecies
ld c, $ff
.asm_701fb
.partyMonLoop
ld a, [hli]
cp $ff
jr z, .asm_70241
jr z, .doneShowingParty
inc c
push hl
push bc
ld [wWhichTrade], a
ld [wHoFMonSpecies], a
ld a, c
ld [wTrainerEngageDistance], a
ld [wHoFPartyMonIndex], a
ld hl, wPartyMon1Level
ld bc, wPartyMon2 - wPartyMon1
call AddNTimes
ld a, [hl]
ld [wTrainerFacingDirection], a
call Func_70278
call Func_702e1
ld [wHoFMonLevel], a
call HoFShowMonOrPlayer
call HoFDisplayAndRecordMonInfo
ld c, 80
call DelayFrames
hlCoord 2, 13
@ -69,8 +69,8 @@ AnimateHallOfFame: ; 701a0 (1c:41a0)
call GBFadeOutToWhite
pop bc
pop hl
jr .asm_701fb
.asm_70241
jr .partyMonLoop
.doneShowingParty
ld a, c
inc a
ld hl, wHallOfFame
@ -79,12 +79,12 @@ AnimateHallOfFame: ; 701a0 (1c:41a0)
ld [hl], $ff
call SaveHallOfFameTeams
xor a
ld [wWhichTrade], a
ld [wHoFMonSpecies], a
inc a
ld [wTrainerScreenY], a
call Func_70278
ld [wHoFMonOrPlayer], a ; player
call HoFShowMonOrPlayer
call HoFDisplayPlayerStats
call Func_70423
call HoFFadeOutScreenAndMusic
xor a
ld [hWY], a
ld hl, rLCDC
@ -94,69 +94,72 @@ AnimateHallOfFame: ; 701a0 (1c:41a0)
HallOfFameText: ; 7026b (1c:426b)
db "HALL OF FAME@"
Func_70278: ; 70278 (1c:4278)
HoFShowMonOrPlayer: ; 70278 (1c:4278)
call ClearScreen
ld a, $d0
ld [hSCY], a
ld a, $c0
ld [hSCX], a
ld a, [wWhichTrade]
ld a, [wHoFMonSpecies]
ld [wcf91], a
ld [wd0b5], a
ld [wBattleMonSpecies2], a
ld [wcf1d], a
ld a, [wTrainerScreenY]
ld a, [wHoFMonOrPlayer]
and a
jr z, .asm_7029d
jr z, .showMon
; show player
call HoFLoadPlayerPics
jr .asm_702ab
.asm_7029d
jr .next1
.showMon
hlCoord 12, 5
call GetMonHeader
call LoadFrontSpriteByMonIndex
predef LoadMonBackPic
.asm_702ab
.next1
ld b, $b
ld c, $0
call GoPAL_SET
ld a, $e4
ld a, %11100100
ld [rBGP], a
ld c, $31
call Func_7036d
ld c, $31 ; back pic
call HoFLoadMonPlayerPicTileIDs
ld d, $a0
ld e, $4
ld e, 4
ld a, [wOnSGB]
and a
jr z, .asm_702c7
sla e
.asm_702c7
call .asm_702d5
jr z, .next2
sla e ; scroll more slowly on SGB
.next2
call .ScrollPic ; scroll back pic left
xor a
ld [hSCY], a
ld c, a
call Func_7036d
ld d, $0
ld e, $fc
.asm_702d5
ld c, a ; front pic
call HoFLoadMonPlayerPicTileIDs
ld d, 0
ld e, -4
; scroll front pic right
.ScrollPic
call DelayFrame
ld a, [hSCX]
add e
ld [hSCX], a
cp d
jr nz, .asm_702d5
jr nz, .ScrollPic
ret
Func_702e1: ; 702e1 (1c:42e1)
ld a, [wTrainerEngageDistance]
HoFDisplayAndRecordMonInfo: ; 702e1 (1c:42e1)
ld a, [wHoFPartyMonIndex]
ld hl, wPartyMonNicks
call GetPartyMonName
call Func_702f0
jp Func_70404
call HoFDisplayMonInfo
jp HoFRecordMonInfo
Func_702f0: ; 702f0 (1c:42f0)
HoFDisplayMonInfo: ; 702f0 (1c:42f0)
hlCoord 0, 2
ld b, $9
ld c, $a
ld b, 9
ld c, 10
call TextBoxBorder
hlCoord 2, 6
ld de, HoFMonInfoText
@ -164,14 +167,14 @@ Func_702f0: ; 702f0 (1c:42f0)
hlCoord 1, 4
ld de, wcd6d
call PlaceString
ld a, [wTrainerFacingDirection]
ld a, [wHoFMonLevel]
hlCoord 8, 7
call PrintLevelCommon
ld a, [wWhichTrade]
ld a, [wHoFMonSpecies]
ld [wd0b5], a
hlCoord 3, 9
predef PrintMonType
ld a, [wWhichTrade]
ld a, [wHoFMonSpecies]
jp PlayCry
HoFMonInfoText: ; 70329 (1c:4329)
@ -197,8 +200,9 @@ HoFLoadPlayerPics: ; 7033e (1c:433e)
call InterlaceMergeSpriteBuffers
ld c, $1
Func_7036d: ; 7036d (1c:436d)
ld b, $0
HoFLoadMonPlayerPicTileIDs: ; 7036d (1c:436d)
; c = base tile ID
ld b, 0
hlCoord 12, 5
predef_jump CopyTileIDsFromList
@ -261,14 +265,14 @@ DexRatingText: ; 703ff (1c:43ff)
TX_FAR _DexRatingText
db "@"
Func_70404: ; 70404 (1c:4404)
HoFRecordMonInfo: ; 70404 (1c:4404)
ld hl, wHallOfFame
ld bc, HOF_MON
ld a, [wTrainerEngageDistance]
ld a, [wHoFPartyMonIndex]
call AddNTimes
ld a, [wWhichTrade]
ld a, [wHoFMonSpecies]
ld [hli], a
ld a, [wTrainerFacingDirection]
ld a, [wHoFMonLevel]
ld [hli], a
ld e, l
ld d, h
@ -276,7 +280,7 @@ Func_70404: ; 70404 (1c:4404)
ld bc, $b
jp CopyData
Func_70423: ; 70423 (1c:4423)
HoFFadeOutScreenAndMusic: ; 70423 (1c:4423)
ld a, $a
ld [wcfc8], a
ld [wcfc9], a

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

View file

@ -1,5 +1,5 @@
SetDefaultNames: ; 60ca (1:60ca)
ld a, [wd358]
ld a, [wLetterPrintingDelayFlags]
push af
ld a, [W_OPTIONS]
push af
@ -18,7 +18,7 @@ SetDefaultNames: ; 60ca (1:60ca)
pop af
ld [W_OPTIONS], a
pop af
ld [wd358], a
ld [wLetterPrintingDelayFlags], a
ld a, [wd08a]
and a
call z, Func_5bff
@ -193,18 +193,18 @@ IntroFadePalettes: ; 6282 (1:6282)
MovePicLeft: ; 6288 (1:6288)
ld a,119
ld [$FF4B],a
ld [rWX],a
call DelayFrame
ld a,$E4
ld [rBGP],a
.next
call DelayFrame
ld a,[$FF4B]
ld a,[rWX]
sub 8
cp $FF
ret z
ld [$FF4B],a
ld [rWX],a
jr .next
Predef3B: ; 62a1 (1:62a1)

View file

@ -26,7 +26,7 @@ UsedCut: ; ef54 (3:6f54)
db "@"
.asm_ef82
ld [wcd4d], a
ld [wCutTile], a
ld a, $1
ld [wcd6a], a
ld a, [wWhichPokemon]
@ -76,7 +76,7 @@ AnimateCutTree: ; eff7 (3:6ff7)
ld [wWhichAnimationOffsets], a
ld a, $e4
ld [rOBP1], a
ld a, [wcd4d]
ld a, [wCutTile]
cp $52
jr z, .asm_f020
ld de, Overworld_GFX + $2d0 ; cuttable tree sprite top row

View file

@ -1,5 +1,5 @@
Func_79e96: ; 79e96 (1e:5e96)
ld a, [wcd4d]
ld a, [wCutTile]
cp $52
jr z, .asm_79ec8
ld c, $8

View file

@ -620,9 +620,9 @@ SAVCheckRandomID: ; 73ad1 (1c:7ad1)
ret
SaveHallOfFameTeams: ; 73b0d (1c:7b0d)
ld a, [wd5a2]
ld a, [wNumHoFTeams]
dec a
cp NUM_HOF_TEAMS
cp HOF_TEAM_CAPACITY
jr nc, .asm_73b28
ld hl, sHallOfFame
ld bc, HOF_TEAM
@ -636,10 +636,10 @@ SaveHallOfFameTeams: ; 73b0d (1c:7b0d)
.asm_73b28
ld hl, sHallOfFame + HOF_TEAM
ld de, sHallOfFame
ld bc, HOF_TEAM * (NUM_HOF_TEAMS - 1)
ld bc, HOF_TEAM * (HOF_TEAM_CAPACITY - 1)
call HallOfFame_Copy
ld hl, wcc5b
ld de, sHallOfFame + HOF_TEAM * (NUM_HOF_TEAMS - 1)
ld de, sHallOfFame + HOF_TEAM * (HOF_TEAM_CAPACITY - 1)
ld bc, HOF_TEAM
jr HallOfFame_Copy

View file

@ -12,7 +12,7 @@ SetDefaultNamesBeforeTitlescreen: ; 42b7 (1:42b7)
call CopyFixedLengthText
xor a
ld [hWY], a
ld [wd358], a
ld [wLetterPrintingDelayFlags], a
ld hl, wd732
ld [hli], a
ld [hli], a
@ -284,7 +284,7 @@ Func_44c1: ; 44c1 (1:44c1)
Func_44cf: ; 44cf (1:44cf)
.wait
ld a, [$ff44] ; rLY
ld a, [rLY]
cp l
jr nz, .wait
@ -292,7 +292,7 @@ Func_44cf: ; 44cf (1:44cf)
ld [rSCX], a
.wait2
ld a, [$ff44] ; rLY
ld a, [rLY]
cp h
jr z, .wait2
ret

View file

@ -69,7 +69,7 @@ _TitleScroll: ; 3726a (d:726a)
.ScrollBetween ; 37292 (d:7292)
.wait
ld a, [$ff44] ; rLY
ld a, [rLY] ; rLY
cp l
jr nz, .wait
@ -77,7 +77,7 @@ _TitleScroll: ; 3726a (d:726a)
ld [rSCX], a
.wait2
ld a, [$ff44] ; rLY
ld a, [rLY] ; rLY
cp h
jr z, .wait2
ret

View file

@ -3538,18 +3538,18 @@ Divide:: ; 38b9 (0:38b9)
; This function is used to wait a short period after printing a letter to the
; screen unless the player presses the A/B button or the delay is turned off
; through the [wd730] or [wd358] flags.
; through the [wd730] or [wLetterPrintingDelayFlags] flags.
PrintLetterDelay:: ; 38d3 (0:38d3)
ld a,[wd730]
bit 6,a
ret nz
ld a,[wd358]
ld a,[wLetterPrintingDelayFlags]
bit 1,a
ret z
push hl
push de
push bc
ld a,[wd358]
ld a,[wLetterPrintingDelayFlags]
bit 0,a
jr z,.waitOneFrame
ld a,[W_OPTIONS]

View file

@ -27,7 +27,7 @@ rLCDC_DEFAULT EQU %11100011
ld [$ff42], a
ld [rSB], a
ld [rSC], a
ld [$ff4b], a
ld [rWX], a
ld [$ff4a], a
ld [$ff06], a
ld [$ff07], a

View file

@ -368,13 +368,13 @@ ProtectedDelay3:: ; 1b3a (0:1b3a)
ret
TextCommandProcessor:: ; 1b40 (0:1b40)
ld a,[wd358]
ld a,[wLetterPrintingDelayFlags]
push af
set 1,a
ld e,a
ld a,[$fff4]
xor e
ld [wd358],a
ld [wLetterPrintingDelayFlags],a
ld a,c
ld [wcc3a],a
ld a,b
@ -385,7 +385,7 @@ NextTextCommand:: ; 1b55 (0:1b55)
cp a, "@" ; terminator
jr nz,.doTextCommand
pop af
ld [wd358],a
ld [wLetterPrintingDelayFlags],a
ret
.doTextCommand
push hl

View file

@ -21,13 +21,13 @@ HallofFameRoomScript3: ; 5a4ba (16:64ba)
HallofFameRoomScript2: ; 5a4bb (16:64bb)
call Delay3
ld a, [wd358]
ld a, [wLetterPrintingDelayFlags]
push af
xor a
ld [wJoyIgnore], a
predef HallOfFamePC
pop af
ld [wd358], a
ld [wLetterPrintingDelayFlags], a
ld hl, W_FLAGS_D733
res 1, [hl]
inc hl

View file

@ -167,13 +167,13 @@ VermilionDock_1dc7c: ; 1dc7c (7:5c7c)
ld h, $0
ld l, $80
.asm_1dc86
ld a, [$ff44]
ld a, [rLY]
cp l
jr nz, .asm_1dc86
ld a, h
ld [$ff43], a
.asm_1dc8e
ld a, [$ff44]
ld a, [rLY]
cp h
jr z, .asm_1dc8e
ret

View file

@ -6,7 +6,7 @@ S_SPRITEBUFFER2:: ds SPRITEBUFFERSIZE ; a310
ds $100
sHallOfFame:: ds HOF_TEAM * NUM_HOF_TEAMS ; a598
sHallOfFame:: ds HOF_TEAM * HOF_TEAM_CAPACITY ; a598
SECTION "Save Data", SRAM, BANK[1]

View file

@ -601,6 +601,8 @@ wOverrideSimulatedJoypadStatesMask:: ; cd3b
ds 1
wHoFMonSpecies:: ; cd3d
wFieldMoves:: ; cd3d
; 4 bytes
; the current mon's field moves
@ -642,6 +644,11 @@ wWhichTrade:: ; cd3d
wTrainerSpriteOffset:: ; cd3d
ds 1
wHoFPartyMonIndex:: ; cd3e
wNumCreditsMonsDisplayed:: ; cd3e
; the number of credits mons that have been displayed so far
wBadgeNameTile:: ; cd3e
; first tile ID of the name being drawn
@ -665,6 +672,8 @@ wHiddenObjectFunctionRomBank:: ; cd3e
wTrainerEngageDistance:: ; cd3e
ds 1
wHoFMonLevel:: ; cd3f
wBadgeOrFaceTiles:: ; cd3f
; 8 bytes
; a list of the first tile IDs of each badge or face (depending on whether the
@ -686,6 +695,11 @@ wTrainerFacingDirection:: ; cd3f
wcd3f:: ; used with daycare text for money amount
ds 1
wHoFMonOrPlayer:: ; cd40
; show mon or show player?
; 0 = mon
; 1 = player
wSlotMachineWheel3Offset:: ; cd40
wPlayerSpinInPlaceAnimSoundID:: ; cd40
@ -710,6 +724,8 @@ wTrainerScreenX:: ; cd41
ds 1
; a lot of the uses for these values use more than the said address
wHoFTeamNo:: ; cd42
wSlotMachineWheel1MiddleTile:: ; cd42
wFieldMovesLeftmostXCoord:: ; cd42
@ -776,7 +792,10 @@ wSlotMachineFlags:: ; cd4c
wSlotMachineWheel1SlipCounter:: ; cd4d
; wheel 1 can "slip" while this is non-zero
wcd4d:: ds 1 ; used with cut and slot machine
wCutTile:: ; cd4d
; $3d = tree tile
; $52 = grass tile
ds 1
wSlotMachineWheel2SlipCounter:: ; cd4e
; wheel 2 can "slip" while this is non-zero
@ -1695,7 +1714,12 @@ W_OBTAINEDBADGES:: ; d356
ds 1
wd358:: ds 1 ; bit 0 set = no delay when printing text (W_OPTIONS is still checked though)
wLetterPrintingDelayFlags:: ; d358
; bit 0: If 0, limit the delay to 1 frame. Note that this has no effect if
; the delay has been disabled entirely through bit 1 of this variable
; or bit 6 of wd730.
; bit 1: If 0, no delay.
ds 1
wPlayerID:: ; d359
ds 2
@ -1904,7 +1928,11 @@ wBoxItems:: ; d53b
ds 1 ; end
wd5a0:: ds 2 ; current box number
wd5a2:: ds 1 ; number of HOF teams
wNumHoFTeams:: ; d5a2
; number of HOF teams
ds 1
wd5a3:: ds 1 ; unused? (written to when loading map data)
wPlayerCoins:: ; d5a4