mirror of https://github.com/zeldaret/mm.git
`ovl_opening` OK (#300)
* ovl_opening OK * un-format z64save.h * Actually change the other uses of nextCutsceneIndex * format * Review * engineer's review * Get it to match again
This commit is contained in:
parent
1713e8a97d
commit
ddc643f708
|
@ -2820,7 +2820,7 @@ void Sram_IncrementDay(void);
|
||||||
u32 Sram_CalcChecksum(u8* data, u32 length);
|
u32 Sram_CalcChecksum(u8* data, u32 length);
|
||||||
// void func_80144628(void);
|
// void func_80144628(void);
|
||||||
// void Sram_GenerateRandomSaveFields(void);
|
// void Sram_GenerateRandomSaveFields(void);
|
||||||
// void func_80144890(void);
|
void func_80144890(void);
|
||||||
// void func_80144968(void);
|
// void func_80144968(void);
|
||||||
// void func_80144A94(void);
|
// void func_80144A94(void);
|
||||||
// void func_80144E78(void);
|
// void func_80144E78(void);
|
||||||
|
|
|
@ -910,7 +910,7 @@ extern UNK_TYPE1 D_801BA550;
|
||||||
// extern UNK_TYPE1 D_801BB100;
|
// extern UNK_TYPE1 D_801BB100;
|
||||||
// extern UNK_TYPE2 D_801BB124;
|
// extern UNK_TYPE2 D_801BB124;
|
||||||
// extern UNK_TYPE2 D_801BB128;
|
// extern UNK_TYPE2 D_801BB128;
|
||||||
// extern UNK_TYPE1 D_801BB12C;
|
extern u8 D_801BB12C;
|
||||||
// extern UNK_TYPE1 D_801BB130;
|
// extern UNK_TYPE1 D_801BB130;
|
||||||
extern cutscene_update_func sCsStateHandlers1[5];
|
extern cutscene_update_func sCsStateHandlers1[5];
|
||||||
extern cutscene_update_func sCsStateHandlers2[5];
|
extern cutscene_update_func sCsStateHandlers2[5];
|
||||||
|
|
3
spec
3
spec
|
@ -712,8 +712,7 @@ beginseg
|
||||||
name "ovl_opening"
|
name "ovl_opening"
|
||||||
compress
|
compress
|
||||||
include "build/src/overlays/gamestates/ovl_opening/z_opening.o"
|
include "build/src/overlays/gamestates/ovl_opening/z_opening.o"
|
||||||
include "build/data/ovl_opening/ovl_opening.data.o"
|
include "build/src/overlays/gamestates/ovl_opening/ovl_opening_reloc.o"
|
||||||
include "build/data/ovl_opening/ovl_opening.reloc.o"
|
|
||||||
endseg
|
endseg
|
||||||
|
|
||||||
beginseg
|
beginseg
|
||||||
|
|
|
@ -1,18 +1,64 @@
|
||||||
/*
|
/*
|
||||||
* File: z_opening.c
|
* File: z_opening.c
|
||||||
* Overlay: ovl_opening
|
* Overlay: ovl_opening
|
||||||
* Description:
|
* Description: Initializes the game into the title screen
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "z_opening.h"
|
#include "z_opening.h"
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_opening/Opening_SetupForTitleCutscene.s")
|
void Opening_SetupForTitleCutscene(OpeningContext* this) {
|
||||||
|
static s32 openingEntrances[] = { 0x1C00, 0x1C10 };
|
||||||
|
static s32 openingCutscenes[] = { 0xFFFA, 0xFFFA };
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_opening/func_80803EA0.s")
|
gSaveContext.eventInf[1] &= (u8)~0x80;
|
||||||
|
gSaveContext.gameMode = 1;
|
||||||
|
|
||||||
void Opening_Main(GameState* thisx);
|
func_80144890();
|
||||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_opening/Opening_Main.s")
|
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_opening/Opening_Destroy.s")
|
gSaveContext.entranceIndex = openingEntrances[D_801BB12C];
|
||||||
|
gSaveContext.nextCutsceneIndex = gSaveContext.cutscene = openingCutscenes[D_801BB12C];
|
||||||
|
gSaveContext.sceneSetupIndex = 0;
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_opening/Opening_Init.s")
|
gSaveContext.time = CLOCK_TIME(8, 0);
|
||||||
|
gSaveContext.day = 1;
|
||||||
|
|
||||||
|
{
|
||||||
|
GameState* thisx = &this->gameState;
|
||||||
|
thisx->running = false;
|
||||||
|
}
|
||||||
|
SET_NEXT_GAMESTATE(&this->gameState, Play_Init, GlobalContext);
|
||||||
|
gSaveContext.playerForm = PLAYER_FORM_HUMAN;
|
||||||
|
}
|
||||||
|
|
||||||
|
void func_80803EA0(OpeningContext* this) {
|
||||||
|
SREG(33) |= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Opening_Main(GameState* thisx) {
|
||||||
|
OpeningContext* this = (OpeningContext*)thisx;
|
||||||
|
|
||||||
|
func_8012CF0C(this->gameState.gfxCtx, 0, 1, 0, 0, 0);
|
||||||
|
Opening_SetupForTitleCutscene(this);
|
||||||
|
func_80803EA0(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Opening_Destroy(GameState* thisx) {
|
||||||
|
ShrinkWindow_Fini();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Opening_Init(GameState* thisx) {
|
||||||
|
OpeningContext* this = (OpeningContext*)thisx;
|
||||||
|
|
||||||
|
Game_SetFramerateDivisor(&this->gameState, 1);
|
||||||
|
SysMatrix_StateAlloc(&this->gameState);
|
||||||
|
ShrinkWindow_Init();
|
||||||
|
View_Init(&this->view, this->gameState.gfxCtx);
|
||||||
|
this->gameState.main = Opening_Main;
|
||||||
|
this->gameState.destroy = Opening_Destroy;
|
||||||
|
|
||||||
|
gSaveContext.respawnFlag = 0;
|
||||||
|
gSaveContext.respawn[4].entranceIndex = 0xFF;
|
||||||
|
gSaveContext.respawn[5].entranceIndex = 0xFF;
|
||||||
|
gSaveContext.respawn[6].entranceIndex = 0xFF;
|
||||||
|
gSaveContext.respawn[7].entranceIndex = 0xFF;
|
||||||
|
}
|
||||||
|
|
|
@ -7,8 +7,8 @@ void Opening_Init(GameState* thisx);
|
||||||
void Opening_Destroy(GameState* thisx);
|
void Opening_Destroy(GameState* thisx);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* 0x000 */ GameState common;
|
/* 0x000 */ GameState gameState;
|
||||||
/* 0x0A4 */ UNK_TYPE1 padA4[0x4];
|
/* 0x0A4 */ UNK_TYPE1 unk_A4[0x4];
|
||||||
/* 0x0A8 */ View view;
|
/* 0x0A8 */ View view;
|
||||||
} OpeningContext; // size = 0x210
|
} OpeningContext; // size = 0x210
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue