diff --git a/include/functions.h b/include/functions.h index 1c356bdb80..8b0d7dae6c 100644 --- a/include/functions.h +++ b/include/functions.h @@ -1335,7 +1335,7 @@ s32 Actor_TrackPlayerSetFocusHeight(PlayState* play, Actor* actor, Vec3s* headRo s32 Actor_TrackPlayer(PlayState* play, Actor* actor, Vec3s* headRot, Vec3s* torsoRot, Vec3f focusPos); void SaveContext_Init(void); void GameInfo_Init(void); -// void DebugDisplay_Init(void); +void DebugDisplay_Init(void); DebugDispObject* DebugDisplay_AddObject(f32 posX, f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, f32 scaleX, f32 scaleY, f32 scaleZ, u8 red, u8 green, u8 blue, u8 alpha, s16 type, GraphicsContext* gfxCtx); // void func_800E9C90(void); // void func_800E9CA0(s32 param_1, UNK_TYPE1 param_2, s8* param_3); @@ -1382,11 +1382,11 @@ s16 func_800F1460(s16 param_1); ActorCutscene* ActorCutscene_GetCutsceneImpl(s16 index); void ActorCutscene_Init(PlayState* play, ActorCutscene* cutscenes, s32 num); void func_800F15D8(Camera* camera); -// void ActorCutscene_ClearWaiting(void); +void ActorCutscene_ClearWaiting(void); // void ActorCutscene_ClearNextCutscenes(void); // void ActorCutscene_MarkNextCutscenes(void); // void ActorCutscene_End(void); -// void ActorCutscene_Update(void); +s16 ActorCutscene_Update(void); void ActorCutscene_SetIntentToPlay(s16 index); s16 ActorCutscene_GetCanPlayNext(s16 index); s16 ActorCutscene_StartAndSetUnkLinkFields(s16 index, Actor* actor); diff --git a/src/code/z_play.c b/src/code/z_play.c index d9b82ea62e..d799ca69cc 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -545,8 +545,36 @@ void func_80168DAC(PlayState* this) { } } -void Play_Main(GameState* thisx); -#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_Main.s") +void Play_Main(GameState* thisx) { + PlayState* this = (PlayState*)thisx; + + D_801D0D60 = &this->state.input[0]; + + DebugDisplay_Init(); + + { + GraphicsContext* gfxCtx = this->state.gfxCtx; + + if (1) { + this->state.gfxCtx = NULL; + } + func_80167DE4(this); + this->state.gfxCtx = gfxCtx; + } + + { + Input sp28 = this->state.input[0]; + + if (1) { + this->state.input[0] = D_801F6C18; + } + func_80168DAC(this); + this->state.input[0] = sp28; + } + + ActorCutscene_Update(); + ActorCutscene_ClearWaiting(); +} s32 Play_InCsMode(PlayState* this) { return (this->csCtx.state != 0) || Player_InCsMode(this);