summaryrefslogtreecommitdiff
path: root/engine/intro_menu.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/intro_menu.asm')
-rwxr-xr-xengine/intro_menu.asm142
1 files changed, 70 insertions, 72 deletions
diff --git a/engine/intro_menu.asm b/engine/intro_menu.asm
index 8e3c90204..c73535459 100755
--- a/engine/intro_menu.asm
+++ b/engine/intro_menu.asm
@@ -6,7 +6,7 @@ _MainMenu: ; 5ae8
ld a, e
ld [wMapMusic], a
call PlayMusic
- callba MainMenu
+ farcall MainMenu
jp StartTitleScreen
; 5b04
@@ -56,13 +56,13 @@ NewGame_ClearTileMapEtc: ; 5b44
MysteryGift: ; 5b54
call UpdateTime
- callba DoMysteryGiftIfDayHasPassed
- callba DoMysteryGift
+ farcall DoMysteryGiftIfDayHasPassed
+ farcall DoMysteryGift
ret
; 5b64
OptionsMenu: ; 5b64
- callba _OptionsMenu
+ farcall _OptionsMenu
ret
; 5b6b
@@ -86,14 +86,14 @@ NewGame: ; 5b6b
; 5b8f
AreYouABoyOrAreYouAGirl: ; 5b8f
- callba Mobile_AlwaysReturnNotCarry ; some mobile stuff
+ farcall Mobile_AlwaysReturnNotCarry ; some mobile stuff
jr c, .ok
- callba InitGender
+ farcall InitGender
ret
.ok
ld c, 0
- callba InitMobileProfile ; mobile
+ farcall InitMobileProfile ; mobile
ret
; 5ba7
@@ -111,8 +111,8 @@ _ResetWRAM: ; 5bae
xor a
call ByteFill
- ld hl, wd000
- ld bc, wGameData - wd000
+ ld hl, wRAM1Start
+ ld bc, wGameData - wRAM1Start
xor a
call ByteFill
@@ -199,8 +199,6 @@ _ResetWRAM: ; 5bae
ld [Coins], a
ld [Coins + 1], a
-START_MONEY EQU 3000
-
IF START_MONEY / $10000
ld a, START_MONEY / $10000
ENDC
@@ -214,19 +212,19 @@ ENDC
ld [wWhichMomItem], a
ld hl, MomItemTriggerBalance
- ld [hl], 2300 / $10000
+ ld [hl], MOM_MONEY / $10000
inc hl
- ld [hl], 2300 / $100 % $100
+ ld [hl], MOM_MONEY / $100 % $100
inc hl
- ld [hl], 2300 % $100
+ ld [hl], MOM_MONEY % $100
call InitializeNPCNames
- callba InitDecorations
+ farcall InitDecorations
- callba DeletePartyMonMail
+ farcall DeletePartyMonMail
- callba DeleteMobileEventIndex
+ farcall DeleteMobileEventIndex
call ResetGameTime
ret
@@ -318,8 +316,8 @@ InitializeNPCNames: ; 5ce9
InitializeWorld: ; 5d23
call ShrinkPlayer
- callba SpawnPlayer
- callba _InitializeStartDay
+ farcall SpawnPlayer
+ farcall _InitializeStartDay
ret
; 5d33
@@ -351,9 +349,9 @@ LoadOrRegenerateLuckyIDNumber: ; 5d33
; 5d65
Continue: ; 5d65
- callba TryLoadSaveFile
+ farcall TryLoadSaveFile
jr c, .FailToLoad
- callba _LoadData
+ farcall _LoadData
call LoadStandardMenuDataHeader
call DisplaySaveInfoOnContinue
ld a, $1
@@ -375,18 +373,18 @@ Continue: ; 5d65
ld a, $8
ld [MusicFade], a
ld a, MUSIC_NONE % $100
- ld [MusicFadeIDLo], a
+ ld [MusicFadeID], a
ld a, MUSIC_NONE / $100
- ld [MusicFadeIDHi], a
+ ld [MusicFadeID + 1], a
call ClearBGPalettes
call Continue_MobileAdapterMenu
call CloseWindow
call ClearTileMap
ld c, 20
call DelayFrames
- callba JumpRoamMons
- callba MysteryGift_CopyReceivedDecosToPC ; Mystery Gift
- callba Function140ae ; time-related
+ farcall JumpRoamMons
+ farcall MysteryGift_CopyReceivedDecosToPC ; Mystery Gift
+ farcall Function140ae ; time-related
ld a, [wSpawnAfterChampion]
cp SPAWN_LANCE
jr z, .SpawnAfterE4
@@ -418,7 +416,7 @@ PostCreditsSpawn: ; 5de7
; 5df0
Continue_MobileAdapterMenu: ; 5df0
- callba Mobile_AlwaysReturnNotCarry ; mobile check
+ farcall Mobile_AlwaysReturnNotCarry ; mobile check
ret nc
; the rest of this stuff is never reached because
@@ -429,20 +427,20 @@ Continue_MobileAdapterMenu: ; 5df0
ld a, 5
ld [MusicFade], a
ld a, MUSIC_MOBILE_ADAPTER_MENU % $100
- ld [MusicFadeIDLo], a
+ ld [MusicFadeID], a
ld a, MUSIC_MOBILE_ADAPTER_MENU / $100
- ld [MusicFadeIDHi], a
+ ld [MusicFadeID + 1], a
ld c, 20
call DelayFrames
ld c, $1
- callba InitMobileProfile ; mobile
- callba _SaveData
+ farcall InitMobileProfile ; mobile
+ farcall _SaveData
ld a, 8
ld [MusicFade], a
ld a, MUSIC_NONE % $100
- ld [MusicFadeIDLo], a
+ ld [MusicFadeID], a
ld a, MUSIC_NONE / $100
- ld [MusicFadeIDHi], a
+ ld [MusicFadeID + 1], a
ld c, 35
call DelayFrames
ret
@@ -468,7 +466,7 @@ Continue_CheckRTC_RestartClock: ; 5e48
call CheckRTCStatus
and %10000000 ; Day count exceeded 16383
jr z, .pass
- callba RestartClock
+ farcall RestartClock
ld a, c
and a
jr z, .pass
@@ -490,7 +488,7 @@ FinishContinueFunction: ; 5e5d
res 7, [hl]
ld hl, wEnteredMapFromContinue
set 1, [hl]
- callba OverworldLoop
+ farcall OverworldLoop
ld a, [wSpawnAfterChampion]
cp SPAWN_RED
jr z, .AfterRed
@@ -673,7 +671,7 @@ Continue_DisplayGameTime: ; 5f84
OakSpeech: ; 0x5f99
- callba InitClock
+ farcall InitClock
call RotateFourPalettesLeft
call ClearTileMap
@@ -737,7 +735,7 @@ OakSpeech: ; 0x5f99
xor a
ld [CurPartySpecies], a
- callba DrawIntroPlayerPic
+ farcall DrawIntroPlayerPic
ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
call GetSGBLayout
@@ -784,20 +782,20 @@ OakText7: ; 0x606f
db "@"
NamePlayer: ; 0x6074
- callba MovePlayerPicRight
- callba ShowPlayerNamingChoices
+ farcall MovePlayerPicRight
+ farcall ShowPlayerNamingChoices
ld a, [wMenuCursorY]
dec a
jr z, .NewName
call StorePlayerName
- callba ApplyMonOrTrainerPals
- callba MovePlayerPicLeft
+ farcall ApplyMonOrTrainerPals
+ farcall MovePlayerPicLeft
ret
.NewName:
ld b, 1
ld de, PlayerName
- callba NamingScreen
+ farcall NamingScreen
call RotateThreePalettesRight
call ClearTileMap
@@ -807,7 +805,7 @@ NamePlayer: ; 0x6074
xor a
ld [CurPartySpecies], a
- callba DrawIntroPlayerPic
+ farcall DrawIntroPlayerPic
ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
call GetSGBLayout
@@ -859,9 +857,9 @@ ShrinkPlayer: ; 610f
ld [MusicFade], a
ld de, MUSIC_NONE
ld a, e
- ld [MusicFadeIDLo], a
+ ld [MusicFadeID], a
ld a, d
- ld [MusicFadeIDHi], a
+ ld [MusicFadeID + 1], a
ld de, SFX_ESCAPE_ROPE
call PlaySFX
@@ -945,7 +943,7 @@ Intro_WipeInFrontpic: ; 6182
Intro_PrepTrainerPic: ; 619c
ld de, VTiles2
- callba GetTrainerPic
+ farcall GetTrainerPic
xor a
ld [hGraphicStartTile], a
hlcoord 6, 4
@@ -968,7 +966,7 @@ ShrinkFrame: ; 61b4
Intro_PlacePlayerSprite: ; 61cd
- callba GetPlayerIcon
+ farcall GetPlayerIcon
ld c, $c
ld hl, VTiles0
call Request2bpp
@@ -1014,9 +1012,9 @@ Intro_PlacePlayerSprite: ; 61cd
CrystalIntroSequence: ; 620b
- callab Copyright_GFPresents
+ callfar Copyright_GFPresents
jr c, StartTitleScreen
- callba CrystalIntro
+ farcall CrystalIntro
StartTitleScreen: ; 6219
ld a, [rSVBK]
@@ -1051,7 +1049,7 @@ StartTitleScreen: ; 6219
ld b, SCGB_DIPLOMA
call GetSGBLayout
call UpdateTimePals
- ld a, [wcf64]
+ ld a, [wIntroSceneFrameCounter]
cp $5
jr c, .ok
xor a
@@ -1077,7 +1075,7 @@ StartTitleScreen: ; 6219
.TitleScreen: ; 6274
- callba _TitleScreen
+ farcall _TitleScreen
ret
; 627b
@@ -1086,7 +1084,7 @@ RunTitleScreen: ; 627b
bit 7, a
jr nz, .done_title
call TitleScreenScene
- callba SuicuneFrameIterator
+ farcall SuicuneFrameIterator
call DelayFrame
and a
ret
@@ -1164,7 +1162,7 @@ TitleScreenEntrance: ; 62bc
dec b
jr nz, .loop
- callba AnimateTitleCrystal
+ farcall AnimateTitleCrystal
ret
.done
@@ -1191,7 +1189,7 @@ TitleScreenTimer: ; 62f6
inc [hl]
; Start a timer
- ld hl, wcf65
+ ld hl, wTitleScreenTimer
ld de, 73 * 60 + 36
ld [hl], e
inc hl
@@ -1202,7 +1200,7 @@ TitleScreenTimer: ; 62f6
TitleScreenMain: ; 6304
; Run the timer down.
- ld hl, wcf65
+ ld hl, wTitleScreenTimer
ld e, [hl]
inc hl
ld d, [hl]
@@ -1268,7 +1266,7 @@ TitleScreenMain: ; 6304
ld a, 1
.done
- ld [wcf64], a
+ ld [wIntroSceneFrameCounter], a
; Return to the intro sequence.
ld hl, wJumptableIndex
@@ -1282,18 +1280,18 @@ TitleScreenMain: ; 6304
; Fade out the title screen music
xor a
- ld [MusicFadeIDLo], a
- ld [MusicFadeIDHi], a
+ ld [MusicFadeID], a
+ ld [MusicFadeID + 1], a
ld hl, MusicFade
ld [hl], 8 ; 1 second
- ld hl, wcf65
+ ld hl, wTitleScreenTimer
inc [hl]
ret
.clock_reset
ld a, 4
- ld [wcf64], a
+ ld [wIntroSceneFrameCounter], a
; Return to the intro sequence.
ld hl, wJumptableIndex
@@ -1305,7 +1303,7 @@ TitleScreenEnd: ; 6375
; Wait until the music is done fading.
- ld hl, wcf65
+ ld hl, wTitleScreenTimer
inc [hl]
ld a, [MusicFade]
@@ -1313,7 +1311,7 @@ TitleScreenEnd: ; 6375
ret nz
ld a, 2
- ld [wcf64], a
+ ld [wIntroSceneFrameCounter], a
; Back to the intro.
ld hl, wJumptableIndex
@@ -1322,18 +1320,18 @@ TitleScreenEnd: ; 6375
; 6389
DeleteSaveData: ; 6389
- callba _DeleteSaveData
+ farcall _DeleteSaveData
jp Init
; 6392
ResetClock: ; 6392
- callba _ResetClock
+ farcall _ResetClock
jp Init
; 639b
Function639b: ; unreferenced
- ; If bit 0 or 1 of [wcf65] is set, we don't need to be here.
- ld a, [wcf65]
+ ; If bit 0 or 1 of [wTitleScreenTimer] is set, we don't need to be here.
+ ld a, [wTitleScreenTimer]
and $3
ret nz
ld bc, SpriteAnim10
@@ -1343,10 +1341,10 @@ Function639b: ; unreferenced
ld h, 0
add hl, hl
add hl, hl
- ld de, Data63ca
+ ld de, .Data63ca
add hl, de
- ; If bit 2 of [wcf65] is set, get the second dw; else, get the first dw
- ld a, [wcf65]
+ ; If bit 2 of [wTitleScreenTimer] is set, get the second dw; else, get the first dw
+ ld a, [wTitleScreenTimer]
and %00000100
srl a
srl a
@@ -1359,12 +1357,12 @@ Function639b: ; unreferenced
ret z
ld e, a
ld d, [hl]
- ld a, SPRITE_ANIM_INDEX_01
+ ld a, SPRITE_ANIM_INDEX_GS_TITLE_TRAIL
call _InitSpriteAnimStruct
ret
; 63ca
-Data63ca: ; 63ca
+.Data63ca: ; 63ca
; frame 0 y, x; frame 1 y, x
db 11 * 8 + 4, 10 * 8, 0 * 8, 0 * 8
db 11 * 8 + 4, 13 * 8, 11 * 8 + 4, 11 * 8
@@ -1403,7 +1401,7 @@ CopyrightString: ; 63fd
; 642e
GameInit:: ; 642e
- callba TryLoadSaveData
+ farcall TryLoadSaveData
call ClearWindowData
call ClearBGPalettes
call ClearTileMap