Play (2 NON_MATCHINGS) (#1109)

* Bring over progress from another branch

Co-authored-by: Maide <34639600+Kelebek1@users.noreply.github.com>

* cleanup, fake match Play_Init

* small fixes

* Some small cleanup

* Match func_80165460 (from debug)

* Match func_80165658

* Match func_80165DB8, func_80165DCC, func_80165DF0, func_80165E04

* Match func_80167DE4 (from debug)

* Match func_80167F0C

* Match func_80168DAC

* Matched func_80169100

* Matched func_801691F0

* import D_801DFA18

* match Play_Main thanks to debug

* cleanup

* synray does it again

* add docs from debug

* fix func_801656A4

* more docs and cleanup

* Match func_80166B30 and diff fake match in Init

* import transition docs from OoT

* Play Update, sort of

* cleanup Play_Update

* more cleanup

* slightly more docs

* small docs

* Play_Draw WIP Thanks @petrie911

* progress?

* two more matches

* format

* misc play docs

* transitions cleanup

* Motion Blur

* Transitions

* Fog

* Bombers notebook + small cleanup

* bss

* Camera Functions

* Picto functions

* Init

* MotionBlur Clean up

* Floor Surface

* Pictographs some more

* regs

* fix circular dependency problem

* Cleanup PR commits outside play

* namefixer

* PR picto

* PR audio

* PR small clean ups

* debug strings

* Picto defines

* bss

* enums

* remove void

* typedefs

* Hireso -> BombersNotebook

* bss comments

* bss and I8/I5 functions

* Smaller PR comments

* Transitions

* Combine enums

* Revert "Combine enums"

This reverts commit 0da1ebcaed.

* Fix Transition defines

* RGBA16 macros

* Unname

* worldCoverAlpha

* Rename Update and Draw

* PR review, plus annotate bug

* Clean up nonmatchings with a closer DrawGame

* Format

* New macros

* UpdateMain and DrawMain

* Fix merge

* Small cleanups from PR

* zFar

* Intensity macros

* Format

* Remove bss comments

* Compression/decompression

* Small cleanup

* Format

* More PR cleanup

* Cleanup picto stuff

* format

* Fix compression comments

* Play processes state enums DONE -> READY

* cutscene comment

* fix bss

Co-authored-by: Maide <34639600+Kelebek1@users.noreply.github.com>
Co-authored-by: engineer124 <engineer124engineer124@gmail.com>
Co-authored-by: petrie911 <pmontag@PHYS-S129.iowa.uiowa.edu>
Co-authored-by: angie <angheloalf95@gmail.com>
This commit is contained in:
Derek Hensley 2023-01-14 07:18:13 -08:00 committed by GitHub
parent e2b61f88e4
commit ab8d34b8dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
129 changed files with 2634 additions and 751 deletions

View File

@ -978,7 +978,7 @@ s32 Camera_ChangeMode(Camera* camera, s16 mode);
s32 func_800DF86C(Camera* camera, s16 arg1); s32 func_800DF86C(Camera* camera, s16 arg1);
// void func_800DF8EC(void); // void func_800DF8EC(void);
s32 Camera_ChangeSetting(Camera* camera, s16 setting); s32 Camera_ChangeSetting(Camera* camera, s16 setting);
u32 Camera_ChangeDataIdx(Camera* camera, u32 camDataIdx); s32 Camera_ChangeDataIdx(Camera* camera, s32 camDataIdx);
// void func_800DFC1C(void); // void func_800DFC1C(void);
// void func_800DFC40(void); // void func_800DFC40(void);
s32 Camera_GetInputDirYaw(Camera* camera); s32 Camera_GetInputDirYaw(Camera* camera);
@ -988,7 +988,7 @@ s16 Camera_GetCamDirYaw(Camera* camera);
void Camera_AddQuake(Camera* camera, s32 arg1, s16 y, s32 countdown); void Camera_AddQuake(Camera* camera, s32 arg1, s16 y, s32 countdown);
s32 Camera_SetViewParam(Camera* camera, s32 viewFlag, void* param); s32 Camera_SetViewParam(Camera* camera, s32 viewFlag, void* param);
// UNK_TYPE4 func_800DFEF0(s32 param_1, u16 param_2); // UNK_TYPE4 func_800DFEF0(s32 param_1, u16 param_2);
// UNK_TYPE4 func_800DFF18(Camera* iParm1, UNK_TYPE2 uParm2); void func_800DFF18(Camera* camera, s32 arg1);
// UNK_TYPE4 func_800DFF34(s32 param_1); // UNK_TYPE4 func_800DFF34(s32 param_1);
// UNK_TYPE4 func_800DFF44(void); // UNK_TYPE4 func_800DFF44(void);
s16 Camera_SetFlags(Camera* iParm1, s16 flags); s16 Camera_SetFlags(Camera* iParm1, s16 flags);
@ -1227,7 +1227,8 @@ s32 Actor_TrackPlayerSetFocusHeight(PlayState* play, Actor* actor, Vec3s* headRo
s32 Actor_TrackPlayer(PlayState* play, Actor* actor, Vec3s* headRot, Vec3s* torsoRot, Vec3f focusPos); s32 Actor_TrackPlayer(PlayState* play, Actor* actor, Vec3s* headRot, Vec3s* torsoRot, Vec3f focusPos);
void SaveContext_Init(void); void SaveContext_Init(void);
void GameInfo_Init(void); void GameInfo_Init(void);
// void DebugDisplay_Init(void); DebugDispObject* DebugDisplay_Init(void);
void DebugDisplay_DrawObjects(PlayState* play);
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); 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_800E9C90(void);
// void func_800E9CA0(s32 param_1, UNK_TYPE1 param_2, s8* param_3); // void func_800E9CA0(s32 param_1, UNK_TYPE1 param_2, s8* param_3);
@ -1274,11 +1275,11 @@ s16 func_800F1460(s16 param_1);
ActorCutscene* ActorCutscene_GetCutsceneImpl(s16 index); ActorCutscene* ActorCutscene_GetCutsceneImpl(s16 index);
void ActorCutscene_Init(PlayState* play, ActorCutscene* cutscenes, s32 num); void ActorCutscene_Init(PlayState* play, ActorCutscene* cutscenes, s32 num);
void func_800F15D8(Camera* camera); void func_800F15D8(Camera* camera);
// void ActorCutscene_ClearWaiting(void); void ActorCutscene_ClearWaiting(void);
// void ActorCutscene_ClearNextCutscenes(void); // void ActorCutscene_ClearNextCutscenes(void);
// void ActorCutscene_MarkNextCutscenes(void); // void ActorCutscene_MarkNextCutscenes(void);
// void ActorCutscene_End(void); // void ActorCutscene_End(void);
// void ActorCutscene_Update(void); s16 ActorCutscene_Update(void);
void ActorCutscene_SetIntentToPlay(s16 index); void ActorCutscene_SetIntentToPlay(s16 index);
s16 ActorCutscene_GetCanPlayNext(s16 index); s16 ActorCutscene_GetCanPlayNext(s16 index);
s16 ActorCutscene_StartAndSetUnkLinkFields(s16 index, Actor* actor); s16 ActorCutscene_StartAndSetUnkLinkFields(s16 index, Actor* actor);
@ -1323,13 +1324,13 @@ void Font_LoadMessageBoxEndIcon(Font* font, u16 icon);
void Font_LoadOrderedFont(Font* font); void Font_LoadOrderedFont(Font* font);
// void func_800F5090(void); // void func_800F5090(void);
// void func_800F50D4(void); // void func_800F50D4(void);
void Kankyo_Init(PlayState* play, EnvironmentContext* envCtx); void Environment_Init(PlayState* play, EnvironmentContext* envCtx, s32 arg2);
u32 func_800F5954(u8* param_1, u32 param_2, u32 param_3, u8 param_4, u8 param_5); u32 func_800F5954(u8* param_1, u32 param_2, u32 param_3, u8 param_4, u8 param_5);
f32 Environment_LerpWeight(u16 max, u16 min, u16 val); f32 Environment_LerpWeight(u16 max, u16 min, u16 val);
// void func_800F5B10(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5); // void func_800F5B10(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5);
// void func_800F5CD0(void); void Environment_UpdateSkybox(u8 skyboxId, EnvironmentContext* envCtx, SkyboxContext* skyboxCtx);
void func_800F6834(PlayState* play, s32 waterLightsIndex); void func_800F6834(PlayState* play, s32 waterLightsIndex);
// void func_800F694C(void); void func_800F694C(PlayState* play);
// void func_800F6A04(void); // void func_800F6A04(void);
// void func_800F6A40(void); // void func_800F6A40(void);
// void func_800F6AB8(void); // void func_800F6AB8(void);
@ -1342,13 +1343,15 @@ void func_800F6FF8(PlayState* play, EnvironmentContext* envCtx, LightContext* li
// void func_800F88C4(void); // void func_800F88C4(void);
// void func_800F8970(void); // void func_800F8970(void);
// void func_800F8A9C(void); // void func_800F8A9C(void);
// void func_800F8CD4(PlayState* play, EnvironmentContext* envCtx, LightContext* lightCtx, s32 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6); void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContext* lightCtx,
PauseContext* pauseCtx, MessageContext* msgCtx, GameOverContext* gameOverCtx,
GraphicsContext* gfxCtx);
// void func_800F8D84(void); // void func_800F8D84(void);
// void func_800F9728(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7); void Environment_DrawSunLensFlare(PlayState* play, EnvironmentContext* envCtx, View* view, GraphicsContext* gfxCtx, Vec3f pos);
void func_800F9824(PlayState* play, EnvironmentContext* envCtx, View* view, GraphicsContext* gfxCtx, Vec3f vec, f32 arg5, f32 arg6, s8 arg7, s8 arg8); void func_800F9824(PlayState* play, EnvironmentContext* envCtx, View* view, GraphicsContext* gfxCtx, Vec3f vec, f32 arg5, f32 arg6, s8 arg7, s8 arg8);
// void func_800FA39C(void); // void func_800FA39C(void);
// void func_800FA3C4(void); // void func_800FA3C4(void);
// void func_800FA9FC(void); void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx);
void func_800FAAB4(PlayState* play, u8 arg1); void func_800FAAB4(PlayState* play, u8 arg1);
// void func_800FAC20(void); // void func_800FAC20(void);
// void func_800FAF74(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE1 param_5); // void func_800FAF74(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE1 param_5);
@ -1357,13 +1360,13 @@ void Environment_AddLightningBolts(PlayState* play, u8 num);
// void func_800FB388(void); // void func_800FB388(void);
void func_800FB758(PlayState* play); void func_800FB758(PlayState* play);
// void func_800FB9B4(void); // void func_800FB9B4(void);
// void func_800FBCBC(void); void Environment_DrawCustomLensFlare(PlayState* play);
void Kankyo_InitGameOverLights(PlayState* play); void Kankyo_InitGameOverLights(PlayState* play);
void Kankyo_FadeInGameOverLights(PlayState* play); void Kankyo_FadeInGameOverLights(PlayState* play);
void Kankyo_FadeOutGameOverLights(PlayState* play); void Kankyo_FadeOutGameOverLights(PlayState* play);
// void func_800FC3DC(void); // void func_800FC3DC(void);
void func_800FC444(GraphicsContext* gfxCtx, u8 arg1, u8 arg2, u8 arg3, u8 arg4, UNK_TYPE arg5); void Environment_FillScreen(GraphicsContext* gfxCtx, u8 red, u8 green, u8 blue, u8 alpha, u8 drawFlags);
// void func_800FC64C(void); void Environment_DrawSandstorm(PlayState* play, u8 sandstormState);
s32 func_800FD2B4(PlayState* play, f32 arg1, f32 arg2, f32 arg3, f32 arg4); s32 func_800FD2B4(PlayState* play, f32 arg1, f32 arg2, f32 arg3, f32 arg4);
void func_800FD538(Color_RGB8* param_1, Color_RGB8* param_2, f32 param_3, Vec3s* param_4); void func_800FD538(Color_RGB8* param_1, Color_RGB8* param_2, f32 param_3, Vec3s* param_4);
void func_800FD59C(PlayState* play, Color_RGB8* pzParm2, f32 fParm3); void func_800FD59C(PlayState* play, Color_RGB8* pzParm2, f32 fParm3);
@ -1374,20 +1377,20 @@ void func_800FD698(PlayState* play, s16 arg1, s16 arg2, f32 arg3);
// void reset_days_elapsed(void); // void reset_days_elapsed(void);
// u32 get_current_day(void); // u32 get_current_day(void);
void func_800FD750(u16 seqId); void func_800FD750(u16 seqId);
// void func_800FD768(void); s32 func_800FD768(void);
void func_800FD78C(PlayState* play); void func_800FD78C(PlayState* play);
void func_800FD858(PlayState* play); void func_800FD858(PlayState* play);
void func_800FD928(s32 param_1); void func_800FD928(s32 param_1);
// void func_800FD980(void); // void func_800FD980(void);
// void func_800FDAF8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5); // void func_800FDAF8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_800FDC94(void); // void func_800FDC94(void);
// void func_800FE390(void); void func_800FE390(PlayState* play);
// void func_800FE3E0(void); void func_800FE3E0(PlayState* play);
void Environment_StopTime(void); void Environment_StopTime(void);
void Environment_StartTime(void); void Environment_StartTime(void);
u8 Environment_IsTimeStopped(void); u8 Environment_IsTimeStopped(void);
u32 func_800FE4B8(PlayState* play); u32 func_800FE4B8(PlayState* play);
// void func_800FE590(void); s32 func_800FE590(PlayState* play);
// void func_800FE5D0(void); // void func_800FE5D0(void);
// UNK_TYPE4 func_800FE610(void); // UNK_TYPE4 func_800FE610(void);
u32 func_800FE620(PlayState* play); u32 func_800FE620(PlayState* play);
@ -1496,7 +1499,7 @@ LightNode* Lights_FindBufSlot();
void Lights_FreeNode(LightNode* light); void Lights_FreeNode(LightNode* light);
void LightContext_Init(PlayState* play, LightContext* lightCtx); void LightContext_Init(PlayState* play, LightContext* lightCtx);
void LightContext_SetAmbientColor(LightContext* lightCtx, u8 r, u8 g, u8 b); void LightContext_SetAmbientColor(LightContext* lightCtx, u8 r, u8 g, u8 b);
void func_80102544(LightContext* lightCtx, u8 a1, u8 a2, u8 a3, s16 numLights, s16 sp16); void LightContext_SetFog(LightContext* lightCtx, u8 r, u8 g, u8 b, s16 near, s16 far);
Lights* LightContext_NewLights(LightContext* lightCtx, GraphicsContext* gfxCtx); Lights* LightContext_NewLights(LightContext* lightCtx, GraphicsContext* gfxCtx);
void LightContext_InitList(PlayState* play, LightContext* lightCtx); void LightContext_InitList(PlayState* play, LightContext* lightCtx);
void LightContext_DestroyList(PlayState* play, LightContext* lightCtx); void LightContext_DestroyList(PlayState* play, LightContext* lightCtx);
@ -1514,7 +1517,7 @@ void* ZeldaArena_Calloc(u32 num, size_t size);
void ZeldaArena_GetSizes(size_t* outMaxFree, size_t* outFree, size_t* outAlloc); void ZeldaArena_GetSizes(size_t* outMaxFree, size_t* outFree, size_t* outAlloc);
s32 ZeldaArena_Check(); s32 ZeldaArena_Check();
void ZeldaArena_Init(void* start, size_t size); void ZeldaArena_Init(void* start, size_t size);
void ZeldaArena_Cleanup(); void ZeldaArena_Cleanup(void);
u8 ZeldaArena_IsInitialized(); u8 ZeldaArena_IsInitialized();
// void func_80102E40(void); // void func_80102E40(void);
// void func_80102E90(void); // void func_80102E90(void);
@ -1974,7 +1977,7 @@ void Scene_SetExitFade(PlayState* play);
s32 Scene_ProcessHeader(PlayState* play, SceneCmd* header); s32 Scene_ProcessHeader(PlayState* play, SceneCmd* header);
u16 Entrance_Create(s32 scene, s32 spawn, s32 layer); u16 Entrance_Create(s32 scene, s32 spawn, s32 layer);
u16 Entrance_CreateFromSpawn(s32 spawn); u16 Entrance_CreateFromSpawn(s32 spawn);
void Scene_ExecuteDrawConfig(PlayState* play); void Scene_Draw(PlayState* play);
void Scene_DrawConfigDefault(PlayState* play); void Scene_DrawConfigDefault(PlayState* play);
Gfx* AnimatedMat_TexScroll(PlayState* play, AnimatedMatTexScrollParams* params); Gfx* AnimatedMat_TexScroll(PlayState* play, AnimatedMatTexScrollParams* params);
void AnimatedMat_DrawTexScroll(PlayState* play, s32 segment, void* params); void AnimatedMat_DrawTexScroll(PlayState* play, s32 segment, void* params);
@ -2141,8 +2144,8 @@ void func_80140900(void* arg0);
void func_80140CE0(void* arg0); void func_80140CE0(void* arg0);
void func_80140D04(void* arg0); void func_80140D04(void* arg0);
void func_80140D10(void* arg0, Gfx** gfx, u32 arg2); void func_80140D10(void* arg0, Gfx** gfx, u32 arg2);
void func_80140E80(void* param_1); void func_80140E80(Struct_80140E80* arg0);
// void func_80140EA0(void); void func_80140EA0(Struct_80140E80* arg0);
// void func_80140EAC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6); // void func_80140EAC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_80141008(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10); // void func_80141008(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10);
void func_8014116C(Gfx** gfxP, u16* arg1, u16* arg2, s32 width, s32 height, s32 arg5); void func_8014116C(Gfx** gfxP, u16* arg1, u16* arg2, s32 width, s32 height, s32 arg5);
@ -2150,7 +2153,7 @@ void func_8014116C(Gfx** gfxP, u16* arg1, u16* arg2, s32 width, s32 height, s32
// void func_80141200(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6); // void func_80141200(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_8014151C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6); // void func_8014151C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_80141678(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5); // void func_80141678(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_80141778(void); void func_80141778(Struct_80140E80* arg0, Gfx** gfxp, void* unk_18E60, GraphicsContext* gfxCtx);
void VisMono_Init(VisMono* this); void VisMono_Init(VisMono* this);
void VisMono_Destroy(VisMono* this); void VisMono_Destroy(VisMono* this);
// void VisMono_DesaturateTLUT(u16* tlut); // void VisMono_DesaturateTLUT(u16* tlut);
@ -2169,7 +2172,7 @@ void Skybox_Init(GameState* gameState, SkyboxContext* skyboxCtx, s16 skyboxId);
Mtx* SkyboxDraw_UpdateMatrix(SkyboxContext* skyboxCtx, f32 x, f32 y, f32 z); Mtx* SkyboxDraw_UpdateMatrix(SkyboxContext* skyboxCtx, f32 x, f32 y, f32 z);
void SkyboxDraw_SetColors(SkyboxContext* skyboxCtx, u8 primR, u8 primG, u8 primB, u8 envR, u8 envG, u8 envB); void SkyboxDraw_SetColors(SkyboxContext* skyboxCtx, u8 primR, u8 primG, u8 primB, u8 envR, u8 envG, u8 envB);
void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyboxId, s16 blend, f32 x, f32 y, f32 z); void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyboxId, s16 blend, f32 x, f32 y, f32 z);
void SkyboxDraw_Noop(SkyboxContext* skyboxCtx); void SkyboxDraw_Update(SkyboxContext* skyboxCtx);
// void func_80147520(void); // void func_80147520(void);
void func_80147564(PlayState* play); void func_80147564(PlayState* play);
@ -2221,8 +2224,8 @@ u8 Message_GetState(MessageContext* msgCtx);
// void func_80153E7C(void); // void func_80153E7C(void);
// void func_80153EF0(void); // void func_80153EF0(void);
void func_801541D4(PlayState* play, Gfx** gfxp); void func_801541D4(PlayState* play, Gfx** gfxp);
// void func_80156758(void); void Message_Draw(PlayState* play);
void func_8015680C(PlayState* play); void Message_Update(PlayState* play);
void func_801586A4(PlayState* play); void func_801586A4(PlayState* play);
void Message_Init(PlayState* play); void Message_Init(PlayState* play);
void Message_FindMessageNES(PlayState* play, u16 textId); void Message_FindMessageNES(PlayState* play, u16 textId);
@ -2265,7 +2268,7 @@ void* KaleidoManager_FaultAddrConvFunc(void* address, void* param);
void KaleidoManager_LoadOvl(KaleidoMgrOverlay* ovl); void KaleidoManager_LoadOvl(KaleidoMgrOverlay* ovl);
void KaleidoManager_ClearOvl(KaleidoMgrOverlay* ovl); void KaleidoManager_ClearOvl(KaleidoMgrOverlay* ovl);
void KaleidoManager_Init(PlayState* play); void KaleidoManager_Init(PlayState* play);
void KaleidoManager_Destroy(); void KaleidoManager_Destroy(void);
void* KaleidoManager_GetRamAddr(void* vram); void* KaleidoManager_GetRamAddr(void* vram);
void KaleidoScopeCall_LoadPlayer(void); void KaleidoScopeCall_LoadPlayer(void);
void KaleidoScopeCall_Init(PlayState* play); void KaleidoScopeCall_Init(PlayState* play);
@ -2276,21 +2279,22 @@ void Transition_Init(TransitionContext* transitionCtx);
void Transition_Destroy(TransitionContext* transitionCtx); void Transition_Destroy(TransitionContext* transitionCtx);
// void func_80163DC0(void); // void func_80163DC0(void);
// void func_8016418C(void); // void func_8016418C(void);
// void func_8016424C(void); void TransitionUnk_Destroy(FbDemoStruct* this);
// void func_801642D8(void); FbDemoStruct* TransitionUnk_Init(FbDemoStruct* this, s32 row, s32 col);
// void func_80164438(void); // void func_80164438(void);
// void func_8016454C(void); void TransitionUnk_Draw(FbDemoStruct* this, Gfx**);
// void func_80164678(void); // void func_80164678(void);
// void func_801647AC(void); void func_801647AC(FbDemoStruct* this);
// UNK_TYPE4 func_801647B8(void); // UNK_TYPE4 func_801647B8(void);
// void TransitionFade_Start(void); // void TransitionFade_Start(void);
void* TransitionFade_Init(void* param_1); void* TransitionFade_Init(TransitionFade* arg0);
// void TransitionFade_Destroy(void); void TransitionFade_Destroy(TransitionFade* arg0);
// void TransitionFade_Update(void); void TransitionFade_Update(TransitionFade* thisx, s32 updateRate);
// void TransitionFade_Draw(void); void TransitionFade_Draw(void* thisx, Gfx** gfxP);
// void TransitionFade_IsDone(void); // void TransitionFade_IsDone(void);
// void TransitionFade_SetColor(void); void TransitionFade_SetColor(TransitionFade* arg0, u32 color);
// void TransitionFade_SetType(void); void TransitionFade_SetType(TransitionFade* arg0, s32 arg1);
void TransitionFade_Start(TransitionFade* arg0);
void TransitionOverlay_ClearLoadInfo(TransitionOverlay *overlayEntry); void TransitionOverlay_ClearLoadInfo(TransitionOverlay *overlayEntry);
void TransitionOverlay_SetSegment(TransitionOverlay *overlayEntry, void* vramStart, void* vramEnd, uintptr_t vromStart, uintptr_t vromEnd); void TransitionOverlay_SetSegment(TransitionOverlay *overlayEntry, void* vramStart, void* vramEnd, uintptr_t vromStart, uintptr_t vromEnd);
void TransitionCircle_Start(void* thisx); void TransitionCircle_Start(void* thisx);
@ -2299,8 +2303,7 @@ void TransitionCircle_Destroy(void* thisx);
void TransitionCircle_Update(void* thisx); void TransitionCircle_Update(void* thisx);
void TransitionCircle_SetColor(void* thisx, u32 color); void TransitionCircle_SetColor(void* thisx, u32 color);
void TransitionCircle_SetType(void* thisx, s32 type); void TransitionCircle_SetType(void* thisx, s32 type);
void TransitionCircle_LoadAndSetTexture(Gfx** gfxp, TexturePtr texture, s32 fmt, s32 arg3, s32 masks, s32 maskt, void TransitionCircle_LoadAndSetTexture(Gfx** gfxp, TexturePtr texture, s32 fmt, s32 arg3, s32 masks, s32 maskt, f32 arg6);
f32 arg6);
void TransitionCircle_Draw(void* thisx, Gfx** gfxp); void TransitionCircle_Draw(void* thisx, Gfx** gfxp);
s32 TransitionCircle_IsDone(void* thisx); s32 TransitionCircle_IsDone(void* thisx);
void* TransitionOverlay_VramToRam(TransitionOverlay *overlayEntry, void* vramAddr); void* TransitionOverlay_VramToRam(TransitionOverlay *overlayEntry, void* vramAddr);
@ -2309,39 +2312,26 @@ s32 TransitionOverlay_Load(TransitionOverlay *overlayEntry);
s32 TransitionOverlay_Free(TransitionOverlay *overlayEntry); s32 TransitionOverlay_Free(TransitionOverlay *overlayEntry);
void func_80165438(UNK_PTR param_1); void func_80165438(UNK_PTR param_1);
// void func_80165444(s32 param_1, UNK_TYPE4 param_2, UNK_TYPE4 param_3, UNK_TYPE4 param_4, UNK_TYPE4 param_5); // void func_80165444(s32 param_1, UNK_TYPE4 param_2, UNK_TYPE4 param_3, UNK_TYPE4 param_4, UNK_TYPE4 param_5);
// void func_80165460(void);
// void func_80165608(void); void Play_SetMotionBlurAlpha(u32 alpha);
// void func_80165630(void); void Play_EnableMotionBlur(u32 alpha);
void func_80165658(u32 arg0); void Play_DisableMotionBlur(void);
void func_8016566C(u32 arg0); void Play_SetMotionBlurPriorityAlpha(u32 alpha);
void func_80165690(void); void Play_EnableMotionBlurPriority(u32 alpha);
// void func_801656A4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8); void Play_DisableMotionBlurPriority(void);
void func_80165DCC(s32 arg0); void Play_TriggerPictoPhoto(void);
void func_80165DF0(void); Gfx* Play_SetFog(PlayState* this, Gfx* gfx);
// void func_80165E1C(void);
// void func_80165E7C(void);
// void func_80165EC0(void);
// void func_80166060(void);
Gfx* func_801660B8(PlayState* play, Gfx* gfx);
void Play_Destroy(GameState* thisx); void Play_Destroy(GameState* thisx);
void Play_CompressI8ToI5(void* srcI8, void* destI5, size_t size); void Play_CompressI8ToI5(void* srcI8, void* destI5, size_t size);
void Play_DecompressI5ToI8(void* srcI5, void* destI8, size_t size); void Play_DecompressI5ToI8(void* srcI5, void* destI8, size_t size);
// void func_801668B4(void); void Play_Update(PlayState* this);
void func_80166968(PlayState* play, Camera* camera); void Play_Draw(PlayState* this);
void func_80166B30(PlayState* play); void Play_Main(GameState* thisx);
void Play_Update(PlayState* play);
void func_80167DE4(PlayState* play);
// void func_80167F0C(void);
void Play_Draw(PlayState* play);
void func_80168DAC(PlayState* play);
void Play_Main(PlayState* play);
s32 Play_InCsMode(PlayState* this); s32 Play_InCsMode(PlayState* this);
f32 func_80169100(PlayState* play, MtxF* mtx, CollisionPoly** arg2, s32* arg3, Vec3f* feetPosPtr); f32 Play_GetFloorSurfaceImpl(PlayState* this, MtxF* mtx, CollisionPoly** poly, s32* bgId, Vec3f* pos);
void func_801691F0(PlayState* play, MtxF* mtx, Vec3f* arg2); void Play_GetFloorSurface(PlayState* this, MtxF* mtx, Vec3f* pos);
void* Play_LoadScene(PlayState* play, RomFile* entry); void* Play_LoadFile(PlayState* this, RomFile* entry);
void func_8016927C(PlayState* play, s16 sParm2); void Play_InitEnvironment(PlayState* this, s16 skyboxId);
// void func_801692C4(PlayState* play, UNK_TYPE1 uParm2);
// void Play_SceneInit(PlayState* play, s32 sceneIndex, UNK_TYPE1 param_3);
void Play_GetScreenPos(PlayState* this, Vec3f* worldPos, Vec3f* screenPos); void Play_GetScreenPos(PlayState* this, Vec3f* worldPos, Vec3f* screenPos);
s16 Play_CreateSubCamera(PlayState* this); s16 Play_CreateSubCamera(PlayState* this);
s16 Play_GetActiveCamId(PlayState* this); s16 Play_GetActiveCamId(PlayState* this);
@ -2371,8 +2361,9 @@ s32 func_8016A02C(GameState* thisx, Actor* actor, s16* yaw);
s32 Play_IsUnderwater(PlayState* this, Vec3f* pos); s32 Play_IsUnderwater(PlayState* this, Vec3f* pos);
s32 Play_IsDebugCamEnabled(void); s32 Play_IsDebugCamEnabled(void);
void Play_AssignPlayerActorCsIdsFromScene(GameState* thisx, s32 startActorCsId); void Play_AssignPlayerActorCsIdsFromScene(GameState* thisx, s32 startActorCsId);
void Play_FillScreen(GameState* gameState, s16 fillScreenOn, u8 red, u8 green, u8 blue, u8 alpha); void Play_FillScreen(GameState* thisx, s16 fillScreenOn, u8 red, u8 green, u8 blue, u8 alpha);
void Play_Init(GameState* gameState); void Play_Init(GameState* thisx);
// void func_8016AC10(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10); // void func_8016AC10(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10);
// void func_8016AE1C(void); // void func_8016AE1C(void);
// void func_8016B278(void); // void func_8016B278(void);
@ -2381,11 +2372,11 @@ void Play_Init(GameState* gameState);
// void func_8016CD4C(void); // void func_8016CD4C(void);
// void func_8016E40C(void); // void func_8016E40C(void);
// void func_8016EA90(void); // void func_8016EA90(void);
// void func_8016F1A8(void); void BombersNotebook_Draw(BombersNotebook* this, GraphicsContext* gfxCtx);
// void func_8016F4EC(void); // void func_8016F4EC(void);
void func_8016F5A8(PlayState* play, s8* pcParm2, Input* iParm3); void BombersNotebook_Update(PlayState* play, BombersNotebook* this, Input* input);
// void func_8016FC78(void); void BombersNotebook_Init(BombersNotebook* this);
// void func_8016FC98(void); void BombersNotebook_Destroy(BombersNotebook* this);
void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg); void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg);
void PreRender_Init(PreRender* this); void PreRender_Init(PreRender* this);
void PreRender_SetValues(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf); void PreRender_SetValues(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf);
@ -2556,12 +2547,12 @@ void Mtx_SetTranslateScaleMtx(Mtx* mtx, f32 scaleX, f32 scaleY, f32 scaleZ, f32
void Mtx_SetRotationMtx(Mtx* mtx, s32 angle, f32 axisX, f32 axisY, f32 axisZ); void Mtx_SetRotationMtx(Mtx* mtx, s32 angle, f32 axisX, f32 axisY, f32 axisZ);
void Mtx_SetTranslationRotationScaleMtx(Mtx* mtx, f32 scaleX, f32 scaleY, f32 scaleZ, s32 angle, f32 axisX, f32 axisY, f32 axisZ,f32 translateX, f32 translateY, f32 translateZ); void Mtx_SetTranslationRotationScaleMtx(Mtx* mtx, f32 scaleX, f32 scaleY, f32 scaleZ, s32 angle, f32 axisX, f32 axisY, f32 axisZ,f32 translateX, f32 translateY, f32 translateZ);
// void func_80178750(void); void func_80178750(void);
// void func_80178818(void); void func_80178818(void);
void func_80178978(void); void func_80178978(void);
// void func_801789D4(void); // void func_801789D4(void);
u32 SysCfb_GetFbPtr(s32 index); void* SysCfb_GetFbPtr(s32 index);
u32 SysCfb_GetZBuffer(void); void* SysCfb_GetZBuffer(void);
// UNK_TYPE4 func_80178A24(void); // UNK_TYPE4 func_80178A24(void);
// void func_80178A34(void); // void func_80178A34(void);
s32 func_80178A94(s32 param_1, s32 param_2); s32 func_80178A94(s32 param_1, s32 param_2);
@ -2990,14 +2981,14 @@ void func_801A3CD8(s8 param_1);
void func_801A3CF4(s8 arg0); void func_801A3CF4(s8 arg0);
void func_801A3D98(s8 audioSetting); void func_801A3D98(s8 audioSetting);
void func_801A3E38(u8 arg0); void func_801A3E38(u8 arg0);
// void func_801A3EC0(void); void func_801A3EC0(u8 arg0);
void Audio_SetCutsceneFlag(s8 flag); void Audio_SetCutsceneFlag(s8 flag);
// void func_801A3F6C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6); // void func_801A3F6C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_801A3FB4(void); // void func_801A3FB4(void);
// void func_801A3FFC(UNK_TYPE1 param_1); // void func_801A3FFC(UNK_TYPE1 param_1);
void Audio_SetSpec(u32 specId); void Audio_SetSpec(u32 specId);
void func_801A4058(UNK_TYPE arg0); void func_801A4058(UNK_TYPE arg0);
// void func_801A41C8(void); void func_801A41C8(s32 arg0);
void func_801A41F8(UNK_TYPE arg0); void func_801A41F8(UNK_TYPE arg0);
// void func_801A429C(void); // void func_801A429C(void);
// void func_801A42C8(void); // void func_801A42C8(void);
@ -3073,6 +3064,6 @@ u8 func_801A982C(void);
void GameOver_Init(PlayState* play); void GameOver_Init(PlayState* play);
void GameOver_FadeLights(PlayState* play); void GameOver_FadeLights(PlayState* play);
void GameOver_Update(PlayState* play); void GameOver_Update(PlayState* play);
void func_801AAAA0(PlayState* play); void Regs_InitData(PlayState* play);
#endif #endif

View File

@ -140,6 +140,10 @@ extern GraphicsContext* __gfxCtx;
#define CLAMP_MAX(x, max) ((x) > (max) ? (max) : (x)) #define CLAMP_MAX(x, max) ((x) > (max) ? (max) : (x))
#define CLAMP_MIN(x, min) ((x) < (min) ? (min) : (x)) #define CLAMP_MIN(x, min) ((x) < (min) ? (min) : (x))
#define RGBA16_GET_R(pixel) (((pixel) >> 11) & 0x1F)
#define RGBA16_GET_G(pixel) (((pixel) >> 6) & 0x1F)
#define RGBA16_GET_B(pixel) (((pixel) >> 1) & 0x1F)
#define ROUND(x) (s32)(((x) >= 0.0) ? ((x) + 0.5) : ((x) - 0.5)) #define ROUND(x) (s32)(((x) >= 0.0) ? ((x) + 0.5) : ((x) - 0.5))
#define SWAP(type, a, b) \ #define SWAP(type, a, b) \

View File

@ -52,6 +52,11 @@
#define R_FB_FILTER_PRIM_COLOR(c) SREG(81 + c) #define R_FB_FILTER_PRIM_COLOR(c) SREG(81 + c)
#define R_FB_FILTER_A SREG(84) #define R_FB_FILTER_A SREG(84)
#define R_FB_FILTER_ENV_COLOR(c) SREG(85 + c) #define R_FB_FILTER_ENV_COLOR(c) SREG(85 + c)
#define R_PICTO_PHOTO_STATE SREG(89)
#define R_MOTION_BLUR_ALPHA SREG(90)
#define R_MOTION_BLUR_ENABLED SREG(91)
#define R_MOTION_BLUR_PRIORITY_ALPHA SREG(92)
#define R_MOTION_BLUR_PRIORITY_ENABLED SREG(93)
#define R_PAUSE_BG_PRERENDER_STATE SREG(94) #define R_PAUSE_BG_PRERENDER_STATE SREG(94)
#define R_PLAY_FILL_SCREEN_ON MREG(64) #define R_PLAY_FILL_SCREEN_ON MREG(64)

View File

@ -810,8 +810,8 @@ extern KaleidoMgrOverlay* gKaleidoMgrCurOvl;
extern Gfx D_801D0D00[]; extern Gfx D_801D0D00[];
extern s32 gDbgCamEnabled; extern s32 gDbgCamEnabled;
// extern UNK_TYPE1 D_801D0D54; // extern UNK_TYPE1 D_801D0D54;
// extern UNK_TYPE2 D_801D0D58; // extern UNK_TYPE2 sQuakeIndex;
// extern UNK_TYPE2 D_801D0D5C; // extern UNK_TYPE2 sIsCameraUnderwater;
extern Input* D_801D0D60; extern Input* D_801D0D60;
// extern UNK_TYPE2 D_801D0D64; // extern UNK_TYPE2 D_801D0D64;
// extern UNK_TYPE1 D_801D0D7A; // extern UNK_TYPE1 D_801D0D7A;
@ -2325,26 +2325,17 @@ extern TriNorm D_801EDBB0;
// extern UNK_TYPE1 D_801EDBD8; // extern UNK_TYPE1 D_801EDBD8;
// extern UNK_TYPE1 D_801EDBDC; // extern UNK_TYPE1 D_801EDBDC;
// extern UNK_TYPE1 D_801EDBE0; // extern UNK_TYPE1 D_801EDBE0;
// extern UNK_TYPE1 D_801EDBF4;
// extern UNK_TYPE1 D_801EDBF8; // extern s16 D_801EDBF0;
// extern UNK_TYPE1 D_801EDC00; // extern f32 D_801EDBF4;
// extern UNK_TYPE1 D_801EDC04; // extern f32 D_801EDBF8;
// extern UNK_TYPE1 D_801EDC08; // extern CameraCollision D_801EDC00;
// extern UNK_TYPE1 D_801EDC0C; // extern PlayState* sCamPlayState;
// extern UNK_TYPE1 D_801EDC10; // extern SwingAnimation D_801EDC30[4];
// extern UNK_TYPE1 D_801EDC14; // extern Vec3f D_801EDDD0;
// extern UNK_TYPE1 D_801EDC28; // extern Vec3f D_801EDDE0;
// extern UNK_TYPE1 D_801EDC30; // extern Vec3f D_801EDDF0;
// extern UNK_TYPE1 D_801EDC8C;
// extern UNK_TYPE1 D_801EDC90;
// extern UNK_TYPE1 D_801EDC92;
// extern UNK_TYPE1 D_801EDC94;
// extern UNK_TYPE1 D_801EDC96;
// extern UNK_TYPE1 D_801EDDD0;
// extern UNK_TYPE1 D_801EDDD4;
// extern UNK_TYPE1 D_801EDDD8;
// extern UNK_TYPE1 D_801EDDE0;
// extern UNK_TYPE1 D_801EDDF0;
extern Vec3f D_801EDE00; extern Vec3f D_801EDE00;
extern Vec3f D_801EDE10; extern Vec3f D_801EDE10;
extern Vec3f D_801EDE20; extern Vec3f D_801EDE20;
@ -2488,18 +2479,18 @@ extern s16 D_801F4E7A;
extern void (*sKaleidoScopeUpdateFunc)(PlayState* play); extern void (*sKaleidoScopeUpdateFunc)(PlayState* play);
extern void (*sKaleidoScopeDrawFunc)(PlayState* play); extern void (*sKaleidoScopeDrawFunc)(PlayState* play);
extern FaultAddrConvClient sKaleidoAreaFaultClient; extern FaultAddrConvClient sKaleidoAreaFaultClient;
// extern UNK_TYPE1 D_801F6C10; extern s16 sTransitionFillTimer;
extern Input D_801F6C18; extern Input D_801F6C18;
// extern UNK_TYPE1 D_801F6C30; extern FbDemoStruct sTrnsnUnk;
// extern UNK_TYPE1 D_801F6D0C; extern u16* D_801F6D0C;
extern UNK_TYPE4 D_801F6D10; extern s32 gTrnsnUnkState;
// extern UNK_TYPE1 D_801F6D18; extern VisMono sVisMono;
extern Color_RGBA8 D_801F6D30; extern Color_RGBA8_u32 gVisMonoColor;
// extern UNK_TYPE1 D_801F6D38; extern Struct_80140E80 D_801F6D38;
// extern UNK_TYPE4 D_801F6D4C; extern Struct_80140E80* D_801F6D4C;
// extern UNK_TYPE1 D_801F6D50; extern BombersNotebook sBombersNotebook;
extern u8 D_801F6DFC; extern u8 sBombersNotebookOpen;
// extern UNK_TYPE1 D_801F6DFD; extern u8 sMotionBlurStatus;
extern SlowlyTask D_801F6E00; extern SlowlyTask D_801F6E00;
extern s32 D_801F6FC0; extern s32 D_801F6FC0;
extern StackEntry slowlyStackEntry; extern StackEntry slowlyStackEntry;
@ -2573,7 +2564,7 @@ extern UNK_TYPE2 D_801FBBCC;
extern UNK_TYPE2 D_801FBBCE; extern UNK_TYPE2 D_801FBBCE;
// extern UNK_TYPE1 D_801FBBD0; // extern UNK_TYPE1 D_801FBBD0;
// extern UNK_TYPE1 D_801FBBD2; // extern UNK_TYPE1 D_801FBBD2;
// extern UNK_TYPE1 D_801FBBD4; extern u8 D_801FBBD4;
extern Vec3f D_801FBBF0; extern Vec3f D_801FBBF0;
extern LineSegment Math3D_ColSphereTri_line; extern LineSegment Math3D_ColSphereTri_line;
extern Vec3f Math3D_ColSphereTri_point; extern Vec3f Math3D_ColSphereTri_point;

View File

@ -245,9 +245,9 @@ typedef struct GraphicsContext {
/* 0x2E4 */ u32 viConfigFeatures; /* 0x2E4 */ u32 viConfigFeatures;
/* 0x2E8 */ char unk_2E8[0x2]; /* 0x2E8 */ char unk_2E8[0x2];
/* 0x2EA */ u8 updateViMode; /* 0x2EA */ u8 updateViMode;
/* 0x2EB */ u8 framebufferIdx; /* 0x2EB */ u8 framebufferIndex;
/* 0x2EC */ void (*callback)(struct GraphicsContext*, u32); /* 0x2EC */ void (*callback)(struct GraphicsContext*, u32);
/* 0x2F0 */ u32 callbackParam; /* 0x2F0 */ u32 callbackArg;
/* 0x2F4 */ f32 xScale; /* 0x2F4 */ f32 xScale;
/* 0x2F8 */ f32 yScale; /* 0x2F8 */ f32 yScale;
/* 0x2FC */ GfxMasterList* masterList; /* 0x2FC */ GfxMasterList* masterList;
@ -534,8 +534,8 @@ typedef struct {
/* 0xE5 */ u8 fillScreen; /* 0xE5 */ u8 fillScreen;
/* 0xE6 */ u8 screenFillColor[4]; /* 0xE6 */ u8 screenFillColor[4];
/* 0xEA */ u8 sandstormState; /* 0xEA */ u8 sandstormState;
/* 0xEB */ u8 unk_EB; /* 0xEB */ u8 sandstormPrimA;
/* 0xEC */ u8 unk_EC; /* 0xEC */ u8 sandstormEnvA;
/* 0xED */ u8 unk_ED; /* 0xED */ u8 unk_ED;
/* 0xEE */ u8 unk_EE[4]; /* 0xEE */ u8 unk_EE[4];
/* 0xF2 */ u8 unk_F2[8]; // [3] is used by both DemoKankyo and ObjectKankyo effect count /* 0xF2 */ u8 unk_F2[8]; // [3] is used by both DemoKankyo and ObjectKankyo effect count
@ -619,64 +619,6 @@ typedef struct {
/* 0x24 */ u32 flags; /* 0x24 */ u32 flags;
} PreRenderParams; // size = 0x28 } PreRenderParams; // size = 0x28
#define TRANS_TRIGGER_OFF 0 // transition is not active
#define TRANS_TRIGGER_START 20 // start transition (exiting an area)
#define TRANS_TRIGGER_END -20 // transition is ending (arriving in a new area)
typedef enum TransitionMode {
/* 0 */ TRANS_MODE_OFF,
/* 1 */ TRANS_MODE_01,
/* 2 */ TRANS_MODE_02,
/* 3 */ TRANS_MODE_03,
/* 4 */ TRANS_MODE_04,
/* 5 */ TRANS_MODE_05,
/* 6 */ TRANS_MODE_06,
/* 7 */ TRANS_MODE_07,
/* 8 */ TRANS_MODE_08,
/* 9 */ TRANS_MODE_09,
/* 10 */ TRANS_MODE_10,
/* 11 */ TRANS_MODE_11,
/* 12 */ TRANS_MODE_12,
/* 13 */ TRANS_MODE_13,
/* 14 */ TRANS_MODE_14,
/* 15 */ TRANS_MODE_15,
/* 16 */ TRANS_MODE_16,
/* 17 */ TRANS_MODE_17
} TransitionMode;
typedef enum TransitionType {
/* 0 */ TRANS_TYPE_00,
/* 1 */ TRANS_TYPE_01,
/* 2 */ TRANS_TYPE_02,
/* 3 */ TRANS_TYPE_03,
/* 4 */ TRANS_TYPE_04,
/* 5 */ TRANS_TYPE_05,
/* 6 */ TRANS_TYPE_06,
/* 7 */ TRANS_TYPE_07,
/* 8 */ TRANS_TYPE_08,
/* 9 */ TRANS_TYPE_09,
/* 10 */ TRANS_TYPE_10,
/* 11 */ TRANS_TYPE_11,
/* 12 */ TRANS_TYPE_12,
/* 13 */ TRANS_TYPE_13,
/* 14 */ TRANS_TYPE_14,
/* 15 */ TRANS_TYPE_15,
/* 16 */ TRANS_TYPE_16,
/* 17 */ TRANS_TYPE_17,
/* 18 */ TRANS_TYPE_18,
/* 19 */ TRANS_TYPE_19,
/* 20 */ TRANS_TYPE_20,
/* 21 */ TRANS_TYPE_21,
/* 64 */ TRANS_TYPE_64 = 64,
/* 70 */ TRANS_TYPE_70 = 70,
/* 72 */ TRANS_TYPE_72 = 72,
/* 73 */ TRANS_TYPE_73,
/* 80 */ TRANS_TYPE_80 = 80,
/* 86 */ TRANS_TYPE_86 = 86
} TransitionType;
#define TRANS_NEXT_TYPE_DEFAULT 0xFF
typedef struct FaultAddrConvClient { typedef struct FaultAddrConvClient {
/* 0x0 */ struct FaultAddrConvClient* next; /* 0x0 */ struct FaultAddrConvClient* next;
/* 0x4 */ void* (*callback)(void*, void*); /* 0x4 */ void* (*callback)(void*, void*);
@ -708,10 +650,6 @@ typedef struct {
/* 0x844 */ void* fb; /* 0x844 */ void* fb;
} FaultThreadStruct; // size = 0x848 } FaultThreadStruct; // size = 0x848
typedef struct FireObj FireObj;
typedef struct FireObjLight FireObjLight;
struct GameState; struct GameState;
typedef void (*GameStateFunc)(struct GameState* gameState); typedef void (*GameStateFunc)(struct GameState* gameState);
@ -767,15 +705,14 @@ typedef struct {
/* 0x10 */ OSTime resetTime; /* 0x10 */ OSTime resetTime;
} PreNmiBuff; // size = 0x18 (actually osAppNmiBuffer is 0x40 bytes large but the rest is unused) } PreNmiBuff; // size = 0x18 (actually osAppNmiBuffer is 0x40 bytes large but the rest is unused)
typedef struct PlayState PlayState;
typedef s32 (*ColChkResetFunc)(PlayState*, Collider*); typedef s32 (*ColChkResetFunc)(struct PlayState*, Collider*);
typedef void (*ColChkBloodFunc)(PlayState*, Collider*, Vec3f*); typedef void (*ColChkBloodFunc)(struct PlayState*, Collider*, Vec3f*);
typedef void (*ColChkApplyFunc)(PlayState*, CollisionCheckContext*, Collider*); typedef void (*ColChkApplyFunc)(struct PlayState*, CollisionCheckContext*, Collider*);
typedef void (*ColChkVsFunc)(PlayState*, CollisionCheckContext*, Collider*, Collider*); typedef void (*ColChkVsFunc)(struct PlayState*, CollisionCheckContext*, Collider*, Collider*);
typedef s32 (*ColChkLineFunc)(PlayState*, CollisionCheckContext*, Collider*, Vec3f*, Vec3f*); typedef s32 (*ColChkLineFunc)(struct PlayState*, CollisionCheckContext*, Collider*, Vec3f*, Vec3f*);
typedef void(*room_draw_func)(PlayState* play, Room* room, u32 flags); typedef void(*room_draw_func)(struct PlayState* play, Room* room, u32 flags);
typedef struct { typedef struct {
/* 0x000 */ u8 controllers; // bit 0 is set if controller 1 is plugged in, etc. /* 0x000 */ u8 controllers; // bit 0 is set if controller 1 is plugged in, etc.
@ -816,11 +753,11 @@ typedef enum {
STACK_STATUS_OVERFLOW = 2 STACK_STATUS_OVERFLOW = 2
} StackStatus; } StackStatus;
struct FireObjLight { typedef struct FireObjLight {
/* 0x00 */ LightNode* light; /* 0x00 */ LightNode* light;
/* 0x04 */ LightInfo lightInfo; /* 0x04 */ LightInfo lightInfo;
/* 0x12 */ u8 lightParamsIndex; /* 0x12 */ u8 lightParamsIndex;
}; // size = 0x14 } FireObjLight; // size = 0x14
#define OS_SC_RETRACE_MSG 1 #define OS_SC_RETRACE_MSG 1
#define OS_SC_DONE_MSG 2 #define OS_SC_DONE_MSG 2
@ -859,7 +796,7 @@ typedef struct {
/* 0x5E */ u16 age; /* 0x5E */ u16 age;
} EffFootmark; // size = 0x60 } EffFootmark; // size = 0x60
struct FireObj { typedef struct FireObj {
/* 0x00 */ Vec3f position; /* 0x00 */ Vec3f position;
/* 0x0C */ f32 size; /* 0x0C */ f32 size;
/* 0x10 */ f32 sizeInv; /* 0x10 */ f32 sizeInv;
@ -876,7 +813,7 @@ struct FireObj {
/* 0x2A */ s16 ignitionDelay; /* 0x2A */ s16 ignitionDelay;
/* 0x2C */ ColliderCylinder collision; /* 0x2C */ ColliderCylinder collision;
/* 0x78 */ FireObjLight light; /* 0x78 */ FireObjLight light;
}; // size = 0x8B } FireObj; // size = 0x8B
typedef struct { typedef struct {
/* 0x0 */ u8 seqId; /* 0x0 */ u8 seqId;
@ -904,7 +841,7 @@ typedef struct {
/* 0x0 */ u16 state; /* 0x0 */ u16 state;
} GameOverContext; // size = 0x2 } GameOverContext; // size = 0x2
struct PlayState { typedef struct PlayState {
/* 0x00000 */ GameState state; /* 0x00000 */ GameState state;
/* 0x000A4 */ s16 sceneId; /* 0x000A4 */ s16 sceneId;
/* 0x000A6 */ u8 sceneConfig; /* 0x000A6 */ u8 sceneConfig;
@ -951,12 +888,12 @@ struct PlayState {
/* 0x18798 */ s32 (*setPlayerTalkAnim)(struct PlayState* play, LinkAnimationHeader* talkAnim, s32 animMode); /* 0x18798 */ s32 (*setPlayerTalkAnim)(struct PlayState* play, LinkAnimationHeader* talkAnim, s32 animMode);
/* 0x1879C */ s16 playerActorCsIds[10]; /* 0x1879C */ s16 playerActorCsIds[10];
/* 0x187B0 */ MtxF viewProjectionMtxF; /* 0x187B0 */ MtxF viewProjectionMtxF;
/* 0x187F0 */ Vec3f unk_187F0; /* 0x187F0 */ Vec3f projectionMtxFDiagonal;
/* 0x187FC */ MtxF billboardMtxF; /* 0x187FC */ MtxF billboardMtxF;
/* 0x1883C */ Mtx* billboardMtx; /* 0x1883C */ Mtx* billboardMtx;
/* 0x18840 */ u32 gameplayFrames; /* 0x18840 */ u32 gameplayFrames;
/* 0x18844 */ u8 unk_18844; /* 0x18844 */ u8 unk_18844;
/* 0x18845 */ u8 unk_18845; /* 0x18845 */ u8 haltAllActors;
/* 0x18846 */ s16 numSetupActors; /* 0x18846 */ s16 numSetupActors;
/* 0x18848 */ u8 numRooms; /* 0x18848 */ u8 numRooms;
/* 0x1884C */ RomFile* roomList; /* 0x1884C */ RomFile* roomList;
@ -971,7 +908,7 @@ struct PlayState {
/* 0x18870 */ void* specialEffects; /* 0x18870 */ void* specialEffects;
/* 0x18874 */ u8 skyboxId; /* 0x18874 */ u8 skyboxId;
/* 0x18875 */ s8 transitionTrigger; // "fade_direction" /* 0x18875 */ s8 transitionTrigger; // "fade_direction"
/* 0x18876 */ s16 unk_18876; /* 0x18876 */ s16 worldCoverAlpha;
/* 0x18878 */ s16 bgCoverAlpha; /* 0x18878 */ s16 bgCoverAlpha;
/* 0x1887A */ u16 nextEntrance; /* 0x1887A */ u16 nextEntrance;
/* 0x1887C */ s8 unk_1887C; // shootingGalleryStatus? /* 0x1887C */ s8 unk_1887C; // shootingGalleryStatus?
@ -985,14 +922,57 @@ struct PlayState {
/* 0x18B49 */ u8 unk_18B49; /* 0x18B49 */ u8 unk_18B49;
/* 0x18B4A */ u8 transitionMode; /* 0x18B4A */ u8 transitionMode;
/* 0x18B4C */ PreRender pauseBgPreRender; /* 0x18B4C */ PreRender pauseBgPreRender;
/* 0x18B9C */ char unk_18B9C[0x2B8]; /* 0x18B9C */ char unk_18B9C[0x54];
/* 0x18BF0 */ TransitionContext transitionCtx;
/* 0x18E48 */ TransitionFade unk_18E48;
/* 0x18E54 */ SceneTableEntry* loadedScene; /* 0x18E54 */ SceneTableEntry* loadedScene;
/* 0x18E58 */ char unk_18E58[0x4]; /* 0x18E58 */ void* unk_18E58;
/* 0x18E5C */ TexturePtr pictoPhotoI8; /* 0x18E5C */ TexturePtr pictoPhotoI8;
/* 0x18E60 */ char unk_18E60[0x8]; /* 0x18E60 */ void* unk_18E60;
/* 0x18E64 */ void* unk_18E64;
/* 0x18E68 */ void* unk_18E68; /* 0x18E68 */ void* unk_18E68;
/* 0x18E6C */ char unk_18E6C[0x3EC]; /* 0x18E6C */ char unk_18E6C[0x3EC];
}; // size = 0x19258 } PlayState; // size = 0x19258
typedef struct {
/* 0x00 */ u8 unk_00;
/* 0x01 */ char unk_01[0x3F];
/* 0x40 */ void* unk_40;
/* 0x44 */ u32 unk_44;
/* 0x48 */ u32 unk_48;
/* 0x4C */ DmaRequest unk_4C;
/* 0x6C */ OSMesgQueue unk_6C;
/* 0x84 */ OSMesg unk_84[1];
/* 0x88 */ void* unk_88;
/* 0x8C */ uintptr_t unk_8C;
/* 0x90 */ size_t unk_90;
/* 0x94 */ s32 unk_94;
/* 0x98 */ s32 unk_98;
/* 0x9C */ s32 unk_9C;
/* 0xA0 */ char unk_A0[0x4];
/* 0xA4 */ s32 unk_A4;
/* 0xA8 */ s32 unk_A8;
} BombersNotebook; // size = 0xAC
typedef enum {
/* 0 */ PICTO_PHOTO_STATE_OFF,
/* 1 */ PICTO_PHOTO_STATE_SETUP,
/* 2 */ PICTO_PHOTO_STATE_PROCESS,
/* 3 */ PICTO_PHOTO_STATE_READY
} PictoPhotoState;
// OoT's TransitionUnk
typedef struct {
/* 0x00 */ char unk_00[0xDC];
} FbDemoStruct; // size = 0xDC
typedef struct {
/* 0x00 */ u8 mode;
/* 0x04 */ f32 scale;
/* 0x08 */ f32 lodProportion; // expected to be between 0.0f and 1.0f
/* 0x0C */ Color_RGBA8_u32 primColor;
/* 0x10 */ Color_RGBA8_u32 envColor;
} Struct_80140E80; // size = 0x14
typedef struct { typedef struct {
/* 0x00 */ s32 unk0; /* 0x00 */ s32 unk0;

View File

@ -13,7 +13,7 @@ typedef struct {
/* 0x0C */ u8 diffuseColor[3]; /* 0x0C */ u8 diffuseColor[3];
/* 0x0F */ u8 fogColor[3]; /* 0x0F */ u8 fogColor[3];
/* 0x12 */ s16 fogNear; /* 0x12 */ s16 fogNear;
/* 0x14 */ s16 fogFar; /* 0x14 */ s16 zFar;
} LightSettings; // size = 0x16 } LightSettings; // size = 0x16
typedef struct { typedef struct {
@ -22,7 +22,7 @@ typedef struct {
/* 0x0C */ s16 diffuseColor2[3]; /* 0x0C */ s16 diffuseColor2[3];
/* 0x12 */ s16 fogColor[3]; /* 0x12 */ s16 fogColor[3];
/* 0x18 */ s16 fogNear; /* 0x18 */ s16 fogNear;
/* 0x1A */ s16 fogFar; /* 0x1A */ s16 zFar;
} EnvLightSettings; // size = 0x1C } EnvLightSettings; // size = 0x1C
typedef struct { typedef struct {
@ -74,11 +74,9 @@ typedef struct LightsBuffer {
typedef struct LightContext { typedef struct LightContext {
/* 0x0 */ LightNode* listHead; /* 0x0 */ LightNode* listHead;
/* 0x4 */ Color_RGB8 ambient; /* 0x4 */ Color_RGB8 ambient;
/* 0x7 */ u8 unk7; /* 0x7 */ Color_RGB8 fogColor;
/* 0x8 */ u8 unk8; /* 0xA */ s16 fogNear; // how close until fog starts taking effect. range 0 - 996
/* 0x9 */ u8 unk9; /* 0xC */ s16 zFar; // draw distance. range 0 - 12800
/* 0xA */ s16 unkA;
/* 0xC */ s16 unkC;
} LightContext; // size = 0x10 } LightContext; // size = 0x10
typedef enum LightType { typedef enum LightType {

View File

@ -117,7 +117,8 @@ typedef struct {
#define RADF_TO_BINANG(radf) (s16)((radf) * (0x8000 / M_PI)) #define RADF_TO_BINANG(radf) (s16)((radf) * (0x8000 / M_PI))
#define RADF_TO_DEGF(radf) ((radf) * (180.0f / M_PI)) #define RADF_TO_DEGF(radf) ((radf) * (180.0f / M_PI))
#define DEGF_TO_RADF(degf) ((degf) * (M_PI / 180.0f)) #define DEGF_TO_RADF(degf) ((degf) * (M_PI / 180.0f))
#define BINANG_TO_RAD(binang) (((f32)binang / 0x8000) * M_PI) #define BINANG_TO_RAD(binang) ((f32)binang * (M_PI / 0x8000))
#define BINANG_TO_RAD_ALT(binang) (((f32)binang / 0x8000) * M_PI)
// Angle arithmetic macros // Angle arithmetic macros
#define BINANG_ROT180(angle) ((s16)(angle + 0x8000)) #define BINANG_ROT180(angle) ((s16)(angle + 0x8000))

View File

@ -745,7 +745,7 @@ typedef enum PlayerCsMode {
#define PLAYER_STATE3_2000 (1 << 13) #define PLAYER_STATE3_2000 (1 << 13)
// //
#define PLAYER_STATE3_4000 (1 << 14) #define PLAYER_STATE3_4000 (1 << 14)
// // Swimming Zora
#define PLAYER_STATE3_8000 (1 << 15) #define PLAYER_STATE3_8000 (1 << 15)
// //
#define PLAYER_STATE3_10000 (1 << 16) #define PLAYER_STATE3_10000 (1 << 16)

View File

@ -47,9 +47,9 @@ s32 Quake_NumActiveQuakes(void);
void Quake_Init(void); void Quake_Init(void);
#define DISTORTION_TYPE_0 (1 << 0) #define DISTORTION_TYPE_0 (1 << 0)
#define DISTORTION_TYPE_2 (1 << 2) #define DISTORTION_TYPE_NON_ZORA_SWIMMING (1 << 2)
#define DISTORTION_TYPE_3 (1 << 3) #define DISTORTION_TYPE_ZORA_SWIMMING (1 << 3)
#define DISTORTION_TYPE_4 (1 << 4) #define DISTORTION_TYPE_UNDERWATER_ENTRY (1 << 4)
#define DISTORTION_TYPE_5 (1 << 5) #define DISTORTION_TYPE_5 (1 << 5)
#define DISTORTION_TYPE_6 (1 << 6) #define DISTORTION_TYPE_6 (1 << 6)
#define DISTORTION_TYPE_7 (1 << 7) #define DISTORTION_TYPE_7 (1 << 7)

View File

@ -253,7 +253,7 @@ typedef struct SavePlayerData {
} SavePlayerData; // size = 0x28 } SavePlayerData; // size = 0x28
typedef struct Save { typedef struct Save {
/* 0x0000 */ u32 entrance; // "scene_no" /* 0x0000 */ s32 entrance; // "scene_no"
/* 0x0004 */ u8 equippedMask; // "player_mask" /* 0x0004 */ u8 equippedMask; // "player_mask"
/* 0x0005 */ u8 isFirstCycle; // "opening_flag" /* 0x0005 */ u8 isFirstCycle; // "opening_flag"
/* 0x0006 */ u8 unk_06; /* 0x0006 */ u8 unk_06;

View File

@ -341,6 +341,7 @@ typedef struct {
/* 0xA */ u8 unk_A; /* 0xA */ u8 unk_A;
/* 0xB */ u8 drawConfig; /* 0xB */ u8 drawConfig;
/* 0xC */ u8 unk_C; /* 0xC */ u8 unk_C;
/* 0xD */ u8 unk_D;
} SceneTableEntry; // size = 0x10 } SceneTableEntry; // size = 0x10
typedef struct { typedef struct {

View File

@ -11,36 +11,36 @@ typedef struct {
/* 0x144 */ PictoValidationFunc validationFunc; /* 0x144 */ PictoValidationFunc validationFunc;
} PictoActor; } PictoActor;
// Picto box flags // Picto validation flags
typedef enum { typedef enum {
// Used externally, set and read by actors // Used externally, set and read by actors
/* 0x00 */ PICTOGRAPH_0, /* 0x00 */ PICTO_VALID_0,
/* 0x01 */ PICTOGRAPH_IN_SWAMP, /* 0x01 */ PICTO_VALID_IN_SWAMP,
/* 0x02 */ PICTOGRAPH_MONKEY, /* 0x02 */ PICTO_VALID_MONKEY,
/* 0x03 */ PICTOGRAPH_BIG_OCTO, /* 0x03 */ PICTO_VALID_BIG_OCTO,
/* 0x04 */ PICTOGRAPH_LULU_HEAD, /* 0x04 */ PICTO_VALID_LULU_HEAD,
/* 0x05 */ PICTOGRAPH_LULU_RIGHT_ARM, /* 0x05 */ PICTO_VALID_LULU_RIGHT_ARM,
/* 0x06 */ PICTOGRAPH_LULU_LEFT_ARM, // Need all three of these to qualify as a good picture /* 0x06 */ PICTO_VALID_LULU_LEFT_ARM, // Need all three of these to qualify as a good picture
/* 0x07 */ PICTOGRAPH_SCARECROW, /* 0x07 */ PICTO_VALID_SCARECROW,
/* 0x08 */ PICTOGRAPH_TINGLE, /* 0x08 */ PICTO_VALID_TINGLE,
/* 0x09 */ PICTOGRAPH_PIRATE_GOOD, /* 0x09 */ PICTO_VALID_PIRATE_GOOD,
/* 0x0A */ PICTOGRAPH_DEKU_KING, /* 0x0A */ PICTO_VALID_DEKU_KING,
/* 0x0B */ PICTOGRAPH_PIRATE_TOO_FAR, // overlaps with PICTOGRAPH_PIRATE_GOOD, but that is checked first /* 0x0B */ PICTO_VALID_PIRATE_TOO_FAR, // overlaps with PICTO_VALID_PIRATE_GOOD, but that is checked first
// Used internally, test for failures of position, angle etc. // Used internally, test for failures of position, angle etc.
/* 0x3B */ PICTOGRAPH_BEHIND_COLLISION = 0x3B, /* 0x3B */ PICTO_VALID_BEHIND_COLLISION = 0x3B,
/* 0x3C */ PICTOGRAPH_BEHIND_BG, /* 0x3C */ PICTO_VALID_BEHIND_BG,
/* 0x3D */ PICTOGRAPH_NOT_IN_VIEW, /* 0x3D */ PICTO_VALID_NOT_IN_VIEW,
/* 0x3E */ PICTOGRAPH_BAD_ANGLE, /* 0x3E */ PICTO_VALID_BAD_ANGLE,
/* 0x3F */ PICTOGRAPH_BAD_DISTANCE /* 0x3F */ PICTO_VALID_BAD_DISTANCE
} PictographFlag; } PictoValidFlag;
// The following macros are subject to renaming once the capture system is better understood // The subregion of the picto photo that will set the flag for an actor being in the photo
#define PICTO_RESOLUTION_HORIZONTAL 150 #define PICTO_VALID_WIDTH 150
#define PICTO_RESOLUTION_VERTICAL 105 #define PICTO_VALID_HEIGHT 105
#define PICTO_CAPTURE_REGION_TOPLEFT_X ((SCREEN_WIDTH - PICTO_RESOLUTION_HORIZONTAL) / 2) #define PICTO_VALID_TOPLEFT_X ((SCREEN_WIDTH - PICTO_VALID_WIDTH) / 2)
#define PICTO_CAPTURE_REGION_TOPLEFT_Y ((SCREEN_HEIGHT - PICTO_RESOLUTION_VERTICAL) / 2) #define PICTO_VALID_TOPLEFT_Y ((SCREEN_HEIGHT - PICTO_VALID_HEIGHT) / 2)
s32 Snap_RecordPictographedActors(PlayState* play); s32 Snap_RecordPictographedActors(PlayState* play);
void Snap_SetFlag(s32 flag); void Snap_SetFlag(s32 flag);

View File

@ -1,8 +1,14 @@
#ifndef _Z64_TRANSITION_H_ #ifndef Z64_TRANSITION_H
#define _Z64_TRANSITION_H_ #define Z64_TRANSITION_H
#include "ultra64.h" #include "ultra64.h"
#include "overlays/fbdemos/ovl_fbdemo_triforce/z_fbdemo_triforce.h"
#include "overlays/fbdemos/ovl_fbdemo_wipe1/z_fbdemo_wipe1.h"
#include "overlays/fbdemos/ovl_fbdemo_wipe3/z_fbdemo_wipe3.h"
#include "overlays/fbdemos/ovl_fbdemo_wipe4/z_fbdemo_wipe4.h"
#include "overlays/fbdemos/ovl_fbdemo_wipe5/z_fbdemo_wipe5.h"
#define TC_SET_PARAMS (1 << 7) #define TC_SET_PARAMS (1 << 7)
typedef struct { typedef struct {
@ -33,22 +39,6 @@ typedef struct {
/* 0x18 */ size_t size; /* 0x18 */ size_t size;
} TransitionOverlay; } TransitionOverlay;
typedef struct {
/* 0x000 */ s16 transitionType;
/* 0x002 */ s8 fbdemoType;
/* 0x003 */ char unk_003[0x22B];
/* 0x230 */ void* (*init)(void* transition);
/* 0x234 */ void (*destroy)(void* transition);
/* 0x238 */ void (*update)(void* transition, s32 updateRate);
/* 0x23C */ void (*draw)(void* transition, Gfx** gfxP);
/* 0x240 */ void (*start)(void* transition);
/* 0x244 */ void (*setType)(void* transition, s32 type);
/* 0x248 */ void (*setColor)(void* transition, u32 color);
/* 0x24C */ void (*setEnvColor)(void* transition, u32 color);
/* 0x250 */ s32 (*isDone)(void* transition);
/* 0x254 */ char unk_254[0x4];
} TransitionContext; // size = 0x258
typedef struct { typedef struct {
/* 0x0 */ char unk_0[0xC]; /* 0x0 */ char unk_0[0xC];
} TransitionFade; // size = 0xC } TransitionFade; // size = 0xC
@ -76,4 +66,107 @@ typedef struct {
/* 0x1F */ s8 unk_1F; // Set to 0 and never used /* 0x1F */ s8 unk_1F; // Set to 0 and never used
} TransitionCircle; // size = 0x20 } TransitionCircle; // size = 0x20
#define TRANS_TRIGGER_OFF 0 // transition is not active
#define TRANS_TRIGGER_START 20 // start transition (exiting an area)
#define TRANS_TRIGGER_END -20 // transition is ending (arriving in a new area)
typedef enum {
/* 0 */ TRANS_MODE_OFF,
/* 1 */ TRANS_MODE_SETUP,
/* 2 */ TRANS_MODE_INSTANCE_INIT,
/* 3 */ TRANS_MODE_INSTANCE_RUNNING,
/* 4 */ TRANS_MODE_FILL_WHITE_INIT,
/* 5 */ TRANS_MODE_FILL_IN,
/* 6 */ TRANS_MODE_FILL_OUT,
/* 7 */ TRANS_MODE_FILL_BROWN_INIT,
/* 8 */ TRANS_MODE_08, // unused
/* 9 */ TRANS_MODE_09, // unused
/* 10 */ TRANS_MODE_INSTANT,
/* 11 */ TRANS_MODE_INSTANCE_WAIT,
/* 12 */ TRANS_MODE_SANDSTORM_INIT,
/* 13 */ TRANS_MODE_SANDSTORM,
/* 14 */ TRANS_MODE_SANDSTORM_END_INIT,
/* 15 */ TRANS_MODE_SANDSTORM_END,
/* 16 */ TRANS_MODE_CS_BLACK_FILL_INIT,
/* 17 */ TRANS_MODE_CS_BLACK_FILL
} TransitionMode;
#define TRANS_TYPE_WIPE4 (1 << 5)
#define TRANS_TYPE_WIPE3 (1 << 6)
#define TRANS_TYPE_SET_PARAMS (1 << 7)
typedef enum {
/* 0 */ TRANS_TYPE_WIPE,
/* 1 */ TRANS_TYPE_TRIFORCE,
/* 2 */ TRANS_TYPE_FADE_BLACK,
/* 3 */ TRANS_TYPE_FADE_WHITE,
/* 4 */ TRANS_TYPE_FADE_BLACK_FAST,
/* 5 */ TRANS_TYPE_FADE_WHITE_FAST,
/* 6 */ TRANS_TYPE_FADE_BLACK_SLOW,
/* 7 */ TRANS_TYPE_FADE_WHITE_SLOW,
/* 8 */ TRANS_TYPE_WIPE_FAST,
/* 9 */ TRANS_TYPE_FILL_WHITE_FAST, // Not actually fast due to bug in Play_UpdateTransition
/* 10 */ TRANS_TYPE_FILL_WHITE,
/* 11 */ TRANS_TYPE_INSTANT,
/* 12 */ TRANS_TYPE_FILL_BROWN,
/* 13 */ TRANS_TYPE_FADE_WHITE_CS_DELAYED,
/* 14 */ TRANS_TYPE_SANDSTORM_PERSIST,
/* 15 */ TRANS_TYPE_SANDSTORM_END,
/* 16 */ TRANS_TYPE_CS_BLACK_FILL,
/* 17 */ TRANS_TYPE_FADE_WHITE_INSTANT,
/* 18 */ TRANS_TYPE_FADE_GREEN,
/* 19 */ TRANS_TYPE_FADE_BLUE,
/* 20 */ TRANS_TYPE_FADE_DYNAMIC, // Chooses Black or White based on time of day
/* 21 */ TRANS_TYPE_CIRCLE,
/* 22 */ TRANS_TYPE_WIPE5,
// transition types 23 - 31 are unused
// transition types 32 - 39 are Wipe4 TODO needs macro
// transition types 40 - 63 are unused
// transition types 64 - 127 are Wipe3 TODO needs macro
/* 64 */ TRANS_TYPE_64 = 64,
/* 70 */ TRANS_TYPE_70 = 70,
/* 72 */ TRANS_TYPE_72 = 72,
/* 73 */ TRANS_TYPE_73,
/* 80 */ TRANS_TYPE_80 = 80,
/* 86 */ TRANS_TYPE_86 = 86
} TransitionType;
typedef enum {
/* 0 */ FBDEMO_FADE,
/* 1 */ FBDEMO_TRIFORCE,
/* 2 */ FBDEMO_WIPE1,
/* 3 */ FBDEMO_WIPE3,
/* 4 */ FBDEMO_WIPE4,
/* 5 */ FBDEMO_CIRCLE,
/* 6 */ FBDEMO_WIPE5
} FbDemoType;
#define TRANS_NEXT_TYPE_DEFAULT 0xFF
typedef struct {
/* 0x000 */ s16 transitionType;
/* 0x002 */ s8 fbdemoType;
/* 0x003 */ char unk_003[0x5];
/* 0x008 */ union {
TransitionFade fade;
TransitionCircle circle;
TransitionTriforce triforce;
TransitionWipe1 wipe1;
TransitionWipe3 wipe3;
TransitionWipe4 wipe4;
TransitionWipe5 wipe5;
} instanceData;
/* 0x220 */ char unk_220[0x10];
/* 0x230 */ void* (*init)(void* transition);
/* 0x234 */ void (*destroy)(void* transition);
/* 0x238 */ void (*update)(void* transition, s32 updateRate);
/* 0x23C */ void (*draw)(void* transition, Gfx** gfxP);
/* 0x240 */ void (*start)(void* transition);
/* 0x244 */ void (*setType)(void* transition, s32 type);
/* 0x248 */ void (*setColor)(void* transition, u32 color);
/* 0x24C */ void (*setEnvColor)(void* transition, u32 color);
/* 0x250 */ s32 (*isDone)(void* transition);
/* 0x254 */ char unk_254[0x4];
} TransitionContext; // size = 0x258
#endif #endif

2
spec
View File

@ -554,8 +554,6 @@ beginseg
include "build/src/code/z_fbdemo_circle.o" include "build/src/code/z_fbdemo_circle.o"
include "build/src/code/z_overlay.o" include "build/src/code/z_overlay.o"
include "build/src/code/z_play.o" include "build/src/code/z_play.o"
include "build/data/code/z_play.data.o"
include "build/data/code/z_play.bss.o"
include "build/src/code/z_play_hireso.o" include "build/src/code/z_play_hireso.o"
include "build/data/code/z_play_hireso.data.o" include "build/data/code/z_play_hireso.data.o"
include "build/src/code/PreRender.o" include "build/src/code/PreRender.o"

View File

@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "global.h" #include "global.h"
StackEntry sBootThreadInfo; StackEntry sBootThreadInfo;

View File

@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "global.h" #include "global.h"
u8 D_80096B20 = 1; u8 D_80096B20 = 1;

View File

@ -50,7 +50,7 @@ void Graph_SetNextGfxPool(GraphicsContext* gfxCtx) {
gfxCtx->workBuffer = pool->workBuffer; gfxCtx->workBuffer = pool->workBuffer;
gfxCtx->debugBuffer = pool->debugBuffer; gfxCtx->debugBuffer = pool->debugBuffer;
gfxCtx->curFrameBuffer = (u16*)SysCfb_GetFbPtr(gfxCtx->framebufferIdx % 2); gfxCtx->curFrameBuffer = SysCfb_GetFbPtr(gfxCtx->framebufferIndex % 2);
gSegments[0x0F] = gfxCtx->curFrameBuffer; gSegments[0x0F] = gfxCtx->curFrameBuffer;
gfxCtx->zbuffer = SysCfb_GetZBuffer(); gfxCtx->zbuffer = SysCfb_GetZBuffer();
@ -116,7 +116,7 @@ void* Graph_FaultAddrConvFunc(void* address, void* param) {
void Graph_Init(GraphicsContext* gfxCtx) { void Graph_Init(GraphicsContext* gfxCtx) {
bzero(gfxCtx, sizeof(GraphicsContext)); bzero(gfxCtx, sizeof(GraphicsContext));
gfxCtx->gfxPoolIdx = 0; gfxCtx->gfxPoolIdx = 0;
gfxCtx->framebufferIdx = 0; gfxCtx->framebufferIndex = 0;
gfxCtx->viMode = NULL; gfxCtx->viMode = NULL;
gfxCtx->viConfigFeatures = gViConfigFeatures; gfxCtx->viConfigFeatures = gViConfigFeatures;
gfxCtx->xScale = gViConfigXScale; gfxCtx->xScale = gViConfigXScale;
@ -165,7 +165,7 @@ retry:
gfxCtx->masterList = gGfxMasterDL; gfxCtx->masterList = gGfxMasterDL;
if (gfxCtx->callback != NULL) { if (gfxCtx->callback != NULL) {
gfxCtx->callback(gfxCtx, gfxCtx->callbackParam); gfxCtx->callback(gfxCtx, gfxCtx->callbackArg);
} }
task->type = M_GFXTASK; task->type = M_GFXTASK;
@ -191,7 +191,7 @@ retry:
if (SREG(33) & 1) { if (SREG(33) & 1) {
SREG(33) &= ~1; SREG(33) &= ~1;
scTask->flags &= ~OS_SC_SWAPBUFFER; scTask->flags &= ~OS_SC_SWAPBUFFER;
gfxCtx->framebufferIdx--; gfxCtx->framebufferIndex--;
} }
scTask->msgQ = &gfxCtx->queue; scTask->msgQ = &gfxCtx->queue;
@ -305,7 +305,7 @@ void Graph_ExecuteAndDraw(GraphicsContext* gfxCtx, GameState* gameState) {
if (!problem) { if (!problem) {
Graph_TaskSet00(gfxCtx, gameState); Graph_TaskSet00(gfxCtx, gameState);
gfxCtx->gfxPoolIdx++; gfxCtx->gfxPoolIdx++;
gfxCtx->framebufferIdx++; gfxCtx->framebufferIndex++;
} }
{ {

View File

@ -224,7 +224,7 @@ void ActorShadow_DrawFeet(Actor* actor, Lights* mapper, PlayState* play) {
for (i = 0; i < ARRAY_COUNT(floorHeight); i++, spB8 >>= 1) { for (i = 0; i < ARRAY_COUNT(floorHeight); i++, spB8 >>= 1) {
feetPosPtr->y += 50.0f; feetPosPtr->y += 50.0f;
*floorHeightPtr = func_80169100(play, &sp13C, &spF8, &bgId, feetPosPtr); *floorHeightPtr = Play_GetFloorSurfaceImpl(play, &sp13C, &spF8, &bgId, feetPosPtr);
feetPosPtr->y -= 50.0f; feetPosPtr->y -= 50.0f;
distToFloor = feetPosPtr->y - *floorHeightPtr; distToFloor = feetPosPtr->y - *floorHeightPtr;
@ -2442,7 +2442,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
params.player = player; params.player = player;
params.play = play; params.play = play;
if (play->unk_18844 != 0) { if (play->unk_18844) {
params.unk_18 = ACTOR_FLAG_200000; params.unk_18 = ACTOR_FLAG_200000;
} else { } else {
params.unk_18 = ACTOR_FLAG_200000 | ACTOR_FLAG_40 | ACTOR_FLAG_10; params.unk_18 = ACTOR_FLAG_200000 | ACTOR_FLAG_40 | ACTOR_FLAG_10;
@ -2698,7 +2698,7 @@ void Actor_DrawLensActors(PlayState* play, s32 numInvisibleActors, Actor** invis
spAC = tmp; spAC = tmp;
Actor_DrawLensOverlay(&spAC, play->actorCtx.lensMaskSize); Actor_DrawLensOverlay(&spAC, play->actorCtx.lensMaskSize);
tmp = func_801660B8(play, spAC); tmp = Play_SetFog(play, spAC);
for (spB4 = 0, invisibleActor = invisibleActors; spB4 < numInvisibleActors; spB4++, invisibleActor++) { for (spB4 = 0, invisibleActor = invisibleActors; spB4 < numInvisibleActors; spB4++, invisibleActor++) {
POLY_XLU_DISP = tmp; POLY_XLU_DISP = tmp;
@ -2779,9 +2779,9 @@ s32 func_800BA2FC(PlayState* play, Actor* actor, Vec3f* projectedPos, f32 projec
f32 phi_f16; f32 phi_f16;
if (play->view.fovy != 60.0f) { if (play->view.fovy != 60.0f) {
phi_f12 = actor->uncullZoneScale * play->unk_187F0.x * 0.76980036f; // sqrt(16/27) phi_f12 = actor->uncullZoneScale * play->projectionMtxFDiagonal.x * 0.76980036f; // sqrt(16/27)
phi_f14 = play->unk_187F0.y * 0.57735026f; // 1 / sqrt(3) phi_f14 = play->projectionMtxFDiagonal.y * 0.57735026f; // 1 / sqrt(3)
phi_f16 = actor->uncullZoneScale * phi_f14; phi_f16 = actor->uncullZoneScale * phi_f14;
phi_f14 *= actor->uncullZoneDownward; phi_f14 *= actor->uncullZoneDownward;
} else { } else {
@ -2809,7 +2809,7 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
s32 actorFlags; s32 actorFlags;
s32 i; s32 i;
if (play->unk_18844 != 0) { if (play->unk_18844) {
actorFlags = ACTOR_FLAG_200000; actorFlags = ACTOR_FLAG_200000;
} else { } else {
actorFlags = ACTOR_FLAG_200000 | ACTOR_FLAG_40 | ACTOR_FLAG_20; actorFlags = ACTOR_FLAG_200000 | ACTOR_FLAG_40 | ACTOR_FLAG_20;
@ -2880,7 +2880,7 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
gSPBranchList(ref2, &tmp2[1]); gSPBranchList(ref2, &tmp2[1]);
POLY_XLU_DISP = &tmp2[1]; POLY_XLU_DISP = &tmp2[1];
if (play->unk_18844 == 0) { if (!play->unk_18844) {
Lights_DrawGlow(play); Lights_DrawGlow(play);
} }

View File

@ -1,4 +1,5 @@
#include "global.h" #include "global.h"
void func_801AAAA0(PlayState* play) { // Remnant from OoT
void Regs_InitData(PlayState* play) {
} }

View File

@ -161,8 +161,8 @@ void Cutscene_Command_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdBase* c
} }
break; break;
case 0x3: case 0x3:
if (play->envCtx.lightSettings.fogFar < 12800) { if (play->envCtx.lightSettings.zFar < 12800) {
play->envCtx.lightSettings.fogFar += 35; play->envCtx.lightSettings.zFar += 35;
} }
break; break;
case 0x4: case 0x4:
@ -206,16 +206,16 @@ void Cutscene_Command_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdBase* c
} }
break; break;
case 0xA: case 0xA:
D_801F6D30.r = 255; gVisMonoColor.r = 255;
D_801F6D30.g = 255; gVisMonoColor.g = 255;
D_801F6D30.b = 255; gVisMonoColor.b = 255;
D_801F6D30.a = 255 * progress; gVisMonoColor.a = 255 * progress;
break; break;
case 0xB: case 0xB:
D_801F6D30.r = 255; gVisMonoColor.r = 255;
D_801F6D30.g = 180; gVisMonoColor.g = 180;
D_801F6D30.b = 100; gVisMonoColor.b = 100;
D_801F6D30.a = 255 * progress; gVisMonoColor.a = 255 * progress;
break; break;
case 0xC: case 0xC:
play->roomCtx.curRoom.segment = NULL; play->roomCtx.curRoom.segment = NULL;
@ -236,10 +236,10 @@ void Cutscene_Command_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdBase* c
} }
break; break;
case 0xE: case 0xE:
play->unk_18845 = 1; play->haltAllActors = true;
break; break;
case 0xF: case 0xF:
play->unk_18845 = 0; play->haltAllActors = false;
break; break;
case 0x10: case 0x10:
if (isStartFrame) { if (isStartFrame) {
@ -295,7 +295,7 @@ void Cutscene_Command_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdBase* c
play->nextEntrance = ENTRANCE(CUTSCENE, 0); play->nextEntrance = ENTRANCE(CUTSCENE, 0);
gSaveContext.nextCutsceneIndex = 0xFFF8; gSaveContext.nextCutsceneIndex = 0xFFF8;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
} }
break; break;
case 0x1C: case 0x1C:
@ -555,7 +555,7 @@ void Cutscene_Command_SetTime(PlayState* play, CutsceneContext* csCtx, CsCmdDayT
void Cutscene_TerminatorImpl(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) { void Cutscene_TerminatorImpl(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) {
csCtx->state = CS_STATE_4; csCtx->state = CS_STATE_4;
func_80165690(); Play_DisableMotionBlur();
Audio_SetCutsceneFlag(false); Audio_SetCutsceneFlag(false);
gSaveContext.cutsceneTransitionControl = 1; gSaveContext.cutsceneTransitionControl = 1;
@ -575,7 +575,7 @@ void Cutscene_TerminatorImpl(PlayState* play, CutsceneContext* csCtx, CsCmdBase*
if (D_801BB12C >= 2) { if (D_801BB12C >= 2) {
D_801BB12C = 0; D_801BB12C = 0;
} }
play->transitionType = TRANS_TYPE_04; play->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
} }
if ((play->nextEntrance & 0xF) > 0) { if ((play->nextEntrance & 0xF) > 0) {
@ -594,19 +594,19 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
} }
} else if (cmd->base == 2) { } else if (cmd->base == 2) {
if (csCtx->frames == cmd->startFrame) { if (csCtx->frames == cmd->startFrame) {
func_80165690(); Play_DisableMotionBlur();
switch (D_801F4DE2) { switch (D_801F4DE2) {
case 0x1F: case 0x1F:
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_20_02)) { if (CHECK_WEEKEVENTREG(WEEKEVENTREG_20_02)) {
play->nextEntrance = ENTRANCE(WOODFALL_TEMPLE, 1); play->nextEntrance = ENTRANCE(WOODFALL_TEMPLE, 1);
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
} else { } else {
play->nextEntrance = ENTRANCE(WOODFALL, 0); play->nextEntrance = ENTRANCE(WOODFALL, 0);
gSaveContext.nextCutsceneIndex = 0xFFF0; gSaveContext.nextCutsceneIndex = 0xFFF0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
} }
break; break;
@ -614,12 +614,12 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_33_80)) { if (CHECK_WEEKEVENTREG(WEEKEVENTREG_33_80)) {
play->nextEntrance = ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 7); play->nextEntrance = ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 7);
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
} else { } else {
play->nextEntrance = ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 0); play->nextEntrance = ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 0);
gSaveContext.nextCutsceneIndex = 0xFFF0; gSaveContext.nextCutsceneIndex = 0xFFF0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
} }
break; break;
@ -628,7 +628,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
play->nextEntrance = ENTRANCE(ZORA_CAPE, 8); play->nextEntrance = ENTRANCE(ZORA_CAPE, 8);
gSaveContext.nextCutsceneIndex = 0xFFF0; gSaveContext.nextCutsceneIndex = 0xFFF0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
break; break;
case 0x36: case 0x36:
@ -636,7 +636,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
play->nextEntrance = ENTRANCE(IKANA_CANYON, 0); play->nextEntrance = ENTRANCE(IKANA_CANYON, 0);
gSaveContext.nextCutsceneIndex = 0xFFF1; gSaveContext.nextCutsceneIndex = 0xFFF1;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
break; break;
} }
} }
@ -764,16 +764,16 @@ void Cutscene_Command_ChooseCreditsScenes(PlayState* play, CutsceneContext* csCt
void Cutscene_Command_MotionBlur(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) { void Cutscene_Command_MotionBlur(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) {
if ((csCtx->frames >= cmd->startFrame) && (cmd->endFrame >= csCtx->frames)) { if ((csCtx->frames >= cmd->startFrame) && (cmd->endFrame >= csCtx->frames)) {
if ((csCtx->frames == cmd->startFrame) && (cmd->base == 1)) { if ((csCtx->frames == cmd->startFrame) && (cmd->base == 1)) {
func_8016566C(180); Play_EnableMotionBlur(180);
} }
if (cmd->base == 2) { if (cmd->base == 2) {
f32 progress = Environment_LerpWeight(cmd->endFrame, cmd->startFrame, csCtx->frames); f32 progress = Environment_LerpWeight(cmd->endFrame, cmd->startFrame, csCtx->frames);
if (progress >= 0.9f) { if (progress >= 0.9f) {
func_80165690(); Play_DisableMotionBlur();
} else { } else {
func_80165658((1.0f - progress) * 180.0f); Play_SetMotionBlurAlpha((1.0f - progress) * 180.0f);
} }
} }
} }

View File

@ -837,7 +837,7 @@ void GetItem_DrawRemains(PlayState* play, s16 drawId) {
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].drawResources[0]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].drawResources[0]);
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
CLOSE_DISPS(play->state.gfxCtx); CLOSE_DISPS(play->state.gfxCtx);
} }

View File

@ -50,7 +50,7 @@ void func_800AE5A0(PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
gDPPipeSync(POLY_OPA_DISP++); gDPPipeSync(POLY_OPA_DISP++);
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
CLOSE_DISPS(play->state.gfxCtx); CLOSE_DISPS(play->state.gfxCtx);
} }
@ -105,7 +105,7 @@ void func_800AE8EC(PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
gDPPipeSync(POLY_XLU_DISP++); gDPPipeSync(POLY_XLU_DISP++);
POLY_XLU_DISP = func_801660B8(play, POLY_XLU_DISP); POLY_XLU_DISP = Play_SetFog(play, POLY_XLU_DISP);
CLOSE_DISPS(play->state.gfxCtx); CLOSE_DISPS(play->state.gfxCtx);
} }

View File

@ -819,7 +819,7 @@ void EnItem00_DrawSprite(EnItem00* this, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
if (this->actor.params == ITEM00_NUTS_10) { if (this->actor.params == ITEM00_NUTS_10) {
texIndex = 6; texIndex = 6;

View File

@ -5,13 +5,13 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_8016418C.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_8016418C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_8016424C.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/TransitionUnk_Destroy.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_801642D8.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/TransitionUnk_Init.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_80164438.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_80164438.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_8016454C.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/TransitionUnk_Draw.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_80164678.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_80164678.s")

View File

@ -73,7 +73,7 @@ void GameOver_Update(PlayState* play) {
if (gSaveContext.respawnFlag != -7) { if (gSaveContext.respawnFlag != -7) {
gSaveContext.respawnFlag = -6; gSaveContext.respawnFlag = -6;
} }
gSaveContext.nextTransitionType = TRANS_TYPE_02; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
gSaveContext.save.playerData.health = 0x30; gSaveContext.save.playerData.health = 0x30;
gameOverCtx->state++; gameOverCtx->state++;
if (INV_CONTENT(ITEM_MASK_DEKU) == ITEM_MASK_DEKU) { if (INV_CONTENT(ITEM_MASK_DEKU) == ITEM_MASK_DEKU) {

View File

@ -50,7 +50,7 @@ void KaleidoScopeCall_Update(PlayState* play) {
pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1; pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1;
} else if ((pauseCtx->state == PAUSE_STATE_OPENING_1) || (pauseCtx->state == PAUSE_STATE_GAMEOVER_1) || } else if ((pauseCtx->state == PAUSE_STATE_OPENING_1) || (pauseCtx->state == PAUSE_STATE_GAMEOVER_1) ||
(pauseCtx->state == PAUSE_STATE_OWLWARP_1)) { (pauseCtx->state == PAUSE_STATE_OWLWARP_1)) {
if (R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_DONE) { if (R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_READY) {
pauseCtx->state++; pauseCtx->state++;
} }
} else if (pauseCtx->state != PAUSE_STATE_OFF) { } else if (pauseCtx->state != PAUSE_STATE_OFF) {
@ -77,7 +77,7 @@ void KaleidoScopeCall_Update(PlayState* play) {
void KaleidoScopeCall_Draw(PlayState* play) { void KaleidoScopeCall_Draw(PlayState* play) {
KaleidoMgrOverlay* kaleidoScopeOvl = &gKaleidoMgrOverlayTable[KALEIDO_OVL_KALEIDO_SCOPE]; KaleidoMgrOverlay* kaleidoScopeOvl = &gKaleidoMgrOverlayTable[KALEIDO_OVL_KALEIDO_SCOPE];
if (R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_DONE) { if (R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_READY) {
if (((play->pauseCtx.state >= PAUSE_STATE_OPENING_3) && (play->pauseCtx.state <= PAUSE_STATE_SAVEPROMPT)) || if (((play->pauseCtx.state >= PAUSE_STATE_OPENING_3) && (play->pauseCtx.state <= PAUSE_STATE_SAVEPROMPT)) ||
((play->pauseCtx.state >= PAUSE_STATE_GAMEOVER_3) && (play->pauseCtx.state <= PAUSE_STATE_UNPAUSE_SETUP))) { ((play->pauseCtx.state >= PAUSE_STATE_GAMEOVER_3) && (play->pauseCtx.state <= PAUSE_STATE_UNPAUSE_SETUP))) {
if (gKaleidoMgrCurOvl == kaleidoScopeOvl) { if (gKaleidoMgrCurOvl == kaleidoScopeOvl) {

View File

@ -4,7 +4,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F50D4.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F50D4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Kankyo_Init.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Environment_Init.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F5954.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F5954.s")
@ -12,7 +12,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F5B10.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F5B10.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F5CD0.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Environment_UpdateSkybox.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F6834.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F6834.s")
@ -42,11 +42,11 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F8A9C.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F8A9C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F8CD4.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Environment_Update.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F8D84.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F8D84.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F9728.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Environment_DrawSunLensFlare.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F9824.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F9824.s")
@ -54,7 +54,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FA3C4.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FA3C4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FA9FC.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Environment_DrawRain.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FAAB4.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FAAB4.s")
@ -72,7 +72,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FB9B4.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FB9B4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FBCBC.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Environment_DrawCustomLensFlare.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Kankyo_InitGameOverLights.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Kankyo_InitGameOverLights.s")
@ -82,9 +82,9 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FC3DC.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FC3DC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FC444.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Environment_FillScreen.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FC64C.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Environment_DrawSandstorm.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FD2B4.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FD2B4.s")

View File

@ -251,7 +251,7 @@ void Lights_FreeNode(LightNode* light) {
void LightContext_Init(PlayState* play, LightContext* lightCtx) { void LightContext_Init(PlayState* play, LightContext* lightCtx) {
LightContext_InitList(play, lightCtx); LightContext_InitList(play, lightCtx);
LightContext_SetAmbientColor(lightCtx, 80, 80, 80); LightContext_SetAmbientColor(lightCtx, 80, 80, 80);
func_80102544(lightCtx, 0, 0, 0, 0x3E4, 0x3200); LightContext_SetFog(lightCtx, 0, 0, 0, 996, 12800);
bzero(&sLightsBuffer, sizeof(LightsBuffer)); bzero(&sLightsBuffer, sizeof(LightsBuffer));
} }
@ -261,12 +261,12 @@ void LightContext_SetAmbientColor(LightContext* lightCtx, u8 r, u8 g, u8 b) {
lightCtx->ambient.b = b; lightCtx->ambient.b = b;
} }
void func_80102544(LightContext* lightCtx, u8 a1, u8 a2, u8 a3, s16 numLights, s16 sp16) { void LightContext_SetFog(LightContext* lightCtx, u8 r, u8 g, u8 b, s16 near, s16 far) {
lightCtx->unk7 = a1; lightCtx->fogColor.r = r;
lightCtx->unk8 = a2; lightCtx->fogColor.g = g;
lightCtx->unk9 = a3; lightCtx->fogColor.b = b;
lightCtx->unkA = numLights; lightCtx->fogNear = near;
lightCtx->unkC = sp16; lightCtx->zFar = far;
} }
/** /**

View File

@ -531,7 +531,7 @@ void func_80153E7C(PlayState* play, void* arg1) {
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_801541D4.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_801541D4.s")
void func_80156758(PlayState* play) { void Message_Draw(PlayState* play) {
Gfx* nextDisplayList; Gfx* nextDisplayList;
Gfx* polyOpa; Gfx* polyOpa;
GraphicsContext* gfxCtx = play->state.gfxCtx; GraphicsContext* gfxCtx = play->state.gfxCtx;
@ -551,7 +551,7 @@ void func_80156758(PlayState* play) {
CLOSE_DISPS(gfxCtx); CLOSE_DISPS(gfxCtx);
} }
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_8015680C.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_message/Message_Update.s")
void func_801586A4(PlayState* play) { void func_801586A4(PlayState* play) {
play->msgCtx.messageEntryTableNes = D_801C6B98; play->msgCtx.messageEntryTableNes = D_801C6B98;

View File

@ -4333,7 +4333,7 @@ void Interface_StartMoonCrash(PlayState* play) {
play->nextEntrance = ENTRANCE(TERMINA_FIELD, 12); play->nextEntrance = ENTRANCE(TERMINA_FIELD, 12);
gSaveContext.nextCutsceneIndex = 0; gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
} }
void Interface_GetTimerDigits(u64 timer, s16* timerArr) { void Interface_GetTimerDigits(u64 timer, s16* timerArr) {

File diff suppressed because it is too large Load Diff

View File

@ -16,12 +16,12 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/func_8016EA90.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/func_8016EA90.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/func_8016F1A8.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/BombersNotebook_Draw.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/func_8016F4EC.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/func_8016F4EC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/func_8016F5A8.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/BombersNotebook_Update.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/func_8016FC78.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/BombersNotebook_Init.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/func_8016FC98.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/BombersNotebook_Destroy.s")

View File

@ -141,7 +141,7 @@ void func_801229A0(PlayState* play, Player* player) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
if ((gSaveContext.jinxTimer != 0) || (player->invincibilityTimer > 0)) { if ((gSaveContext.jinxTimer != 0) || (player->invincibilityTimer > 0)) {
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
} }
CLOSE_DISPS(play->state.gfxCtx); CLOSE_DISPS(play->state.gfxCtx);

View File

@ -668,7 +668,7 @@ void Distortion_Update(void) {
zScaleFactor = 1.0f; zScaleFactor = 1.0f;
xyScaleFactor = 1.0f; xyScaleFactor = 1.0f;
speedScaleFactor = 1.0f; speedScaleFactor = 1.0f;
} else if (sDistortionRequest.type & DISTORTION_TYPE_4) { } else if (sDistortionRequest.type & DISTORTION_TYPE_UNDERWATER_ENTRY) {
if (sDistortionRequest.state == DISTORTION_SETUP) { if (sDistortionRequest.state == DISTORTION_SETUP) {
countdownMax = sDistortionRequest.countdown; countdownMax = sDistortionRequest.countdown;
depthPhase = 0x760; depthPhase = 0x760;
@ -690,7 +690,7 @@ void Distortion_Update(void) {
countdownRatio = sDistortionRequest.countdown / (f32)countdownMax; countdownRatio = sDistortionRequest.countdown / (f32)countdownMax;
zScaleFactor = xyScaleFactor = countdownRatio; zScaleFactor = xyScaleFactor = countdownRatio;
speedScaleFactor = 1.0f; speedScaleFactor = 1.0f;
} else if (sDistortionRequest.type & DISTORTION_TYPE_3) { } else if (sDistortionRequest.type & DISTORTION_TYPE_ZORA_SWIMMING) {
depthPhase = 0x3F0; depthPhase = 0x3F0;
screenPlanePhase = 0x156; screenPlanePhase = 0x156;
@ -745,7 +745,7 @@ void Distortion_Update(void) {
} }
zScaleFactor = -xyScaleFactor; zScaleFactor = -xyScaleFactor;
speedScaleFactor = 1.0f; speedScaleFactor = 1.0f;
} else if (sDistortionRequest.type & DISTORTION_TYPE_2) { } else if (sDistortionRequest.type & DISTORTION_TYPE_NON_ZORA_SWIMMING) {
depthPhase = 0x3F0; depthPhase = 0x3F0;
screenPlanePhase = 0x156; screenPlanePhase = 0x156;

View File

@ -778,19 +778,19 @@ Gfx* Gfx_SetFog(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 n, s32 f) {
if (n >= 997) { if (n >= 997) {
if (n >= 1000) { if (n >= 1000) {
gSPFogFactor(gfx + 1, 0, 0); // gSPFogPosition(gfx++, ?, ?) gSPFogFactor(&gfx[1], 0, 0); // gSPFogPosition(gfx++, ?, ?)
} else { } else {
gSPFogFactor(gfx + 1, 0x7FFF, 0x8100); // gSPFogPosition(gfx++, ?, ?) gSPFogFactor(&gfx[1], 0x7FFF, 0x8100); // gSPFogPosition(gfx++, ?, ?)
} }
} else { } else {
if (n < 0) { if (n < 0) {
gSPFogFactor(gfx + 1, 0, 255); // gSPFogPosition(gfx++, ?, ?) gSPFogFactor(&gfx[1], 0, 255); // gSPFogPosition(gfx++, ?, ?)
} else { } else {
gSPFogPosition(gfx + 1, n, f); gSPFogPosition(&gfx[1], n, f);
} }
} }
return gfx + 2; return &gfx[2];
} }
Gfx* Gfx_SetFogWithSync(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 n, s32 f) { Gfx* Gfx_SetFogWithSync(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 n, s32 f) {
@ -1299,7 +1299,7 @@ void func_8012CF0C(GraphicsContext* gfxCtx, s32 clearFb, s32 clearZb, u8 r, u8 g
} }
void func_8012D374(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) { void func_8012D374(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) {
if ((R_PAUSE_BG_PRERENDER_STATE <= PAUSE_BG_PRERENDER_SETUP) && (D_801F6D10 < 2)) { if ((R_PAUSE_BG_PRERENDER_STATE <= PAUSE_BG_PRERENDER_SETUP) && (gTrnsnUnkState < 2)) {
func_8012CF0C(gfxCtx, true, true, r, g, b); func_8012CF0C(gfxCtx, true, true, r, g, b);
} else { } else {
func_8012CF0C(gfxCtx, false, false, r, g, b); func_8012CF0C(gfxCtx, false, false, r, g, b);

View File

@ -149,7 +149,7 @@ void Scene_HeaderCmdSpawnList(PlayState* play, SceneCmd* cmd) {
play->linkActorEntry = play->linkActorEntry =
(ActorEntry*)Lib_SegmentedToVirtual(cmd->spawnList.segment) + play->setupEntranceList[play->curSpawn].spawn; (ActorEntry*)Lib_SegmentedToVirtual(cmd->spawnList.segment) + play->setupEntranceList[play->curSpawn].spawn;
if ((PLAYER_GET_INITMODE(play->linkActorEntry) == PLAYER_INITMODE_TELESCOPE) || if ((PLAYER_GET_INITMODE(play->linkActorEntry) == PLAYER_INITMODE_TELESCOPE) ||
((gSaveContext.respawnFlag == 0x02) && ((gSaveContext.respawnFlag == 2) &&
(gSaveContext.respawn[RESPAWN_MODE_RETURN].playerParams == PLAYER_PARAMS(0xFF, PLAYER_INITMODE_TELESCOPE)))) { (gSaveContext.respawn[RESPAWN_MODE_RETURN].playerParams == PLAYER_PARAMS(0xFF, PLAYER_INITMODE_TELESCOPE)))) {
// Skull Kid Object // Skull Kid Object
Object_Spawn(&play->objectCtx, OBJECT_STK); Object_Spawn(&play->objectCtx, OBJECT_STK);
@ -231,7 +231,7 @@ void Scene_HeaderCmdSpecialFiles(PlayState* play, SceneCmd* cmd) {
} }
if (cmd->specialFiles.naviQuestHintFileId != NAVI_QUEST_HINTS_NONE) { if (cmd->specialFiles.naviQuestHintFileId != NAVI_QUEST_HINTS_NONE) {
play->naviQuestHints = Play_LoadScene(play, &naviQuestHintFiles[cmd->specialFiles.naviQuestHintFileId - 1]); play->naviQuestHints = Play_LoadFile(play, &naviQuestHintFiles[cmd->specialFiles.naviQuestHintFileId - 1]);
} }
} }
@ -603,5 +603,5 @@ u16 Entrance_Create(s32 scene, s32 spawn, s32 layer) {
* Creates an layer 0 entranace from the current entrance and the given spawn. * Creates an layer 0 entranace from the current entrance and the given spawn.
*/ */
u16 Entrance_CreateFromSpawn(s32 spawn) { u16 Entrance_CreateFromSpawn(s32 spawn) {
return Entrance_Create(gSaveContext.save.entrance >> 9, spawn, 0); return Entrance_Create((u32)gSaveContext.save.entrance >> 9, spawn, 0);
} }

View File

@ -22,7 +22,7 @@ static Gfx sSceneDrawDefaultDL[] = {
/** /**
* Executes the current scene draw config handler. * Executes the current scene draw config handler.
*/ */
void Scene_ExecuteDrawConfig(PlayState* play) { void Scene_Draw(PlayState* play) {
static void (*sceneDrawConfigHandlers[])(PlayState*) = { static void (*sceneDrawConfigHandlers[])(PlayState*) = {
Scene_DrawConfigDefault, Scene_DrawConfigDefault,
Scene_DrawConfigMatAnim, Scene_DrawConfigMatAnim,

View File

@ -1,10 +1,10 @@
#include "global.h" #include "global.h"
#define SCENE_ENTRY(name, textId, config) \ #define SCENE_ENTRY(name, textId, config) \
{ { SEGMENT_ROM_START(name), SEGMENT_ROM_END(name) }, textId, 0, config, 0 } { { SEGMENT_ROM_START(name), SEGMENT_ROM_END(name) }, textId, 0, config, 0, 0 }
#define SCENE_ENTRY_NONE() \ #define SCENE_ENTRY_NONE() \
{ { 0, 0 }, 0, 0, 0, 0 } { { 0, 0 }, 0, 0, 0, 0, 0 }
SceneTableEntry gSceneTable[] = { SceneTableEntry gSceneTable[] = {
/* 0x00 */ SCENE_ENTRY(Z2_20SICHITAI2, 0x0116, SCENE_DRAW_CFG_MAT_ANIM), /* 0x00 */ SCENE_ENTRY(Z2_20SICHITAI2, 0x0116, SCENE_DRAW_CFG_MAT_ANIM),

View File

@ -22,7 +22,7 @@ s32 Snap_RecordPictographedActors(PlayState* play) {
gSaveContext.save.pictoFlags1 = 0; gSaveContext.save.pictoFlags1 = 0;
if (play->sceneId == SCENE_20SICHITAI) { if (play->sceneId == SCENE_20SICHITAI) {
Snap_SetFlag(PICTOGRAPH_IN_SWAMP); Snap_SetFlag(PICTO_VALID_IN_SWAMP);
} }
for (; category < ACTORCAT_MAX; category++) { for (; category < ACTORCAT_MAX; category++) {
@ -155,43 +155,43 @@ s32 Snap_ValidatePictograph(PlayState* play, Actor* actor, s32 flag, Vec3f* pos,
// Check distance // Check distance
distance = OLib_Vec3fDist(pos, &camera->eye); distance = OLib_Vec3fDist(pos, &camera->eye);
if ((distance < distanceMin) || (distanceMax < distance)) { if ((distance < distanceMin) || (distanceMax < distance)) {
Snap_SetFlag(PICTOGRAPH_BAD_DISTANCE); Snap_SetFlag(PICTO_VALID_BAD_DISTANCE);
ret = PICTOGRAPH_BAD_DISTANCE; ret = PICTO_VALID_BAD_DISTANCE;
} }
// Check rot is facing camera? // Check rot is facing camera?
x = Snap_AbsS(Camera_GetCamDirPitch(camera) + rot->x); x = Snap_AbsS(Camera_GetCamDirPitch(camera) + rot->x);
y = Snap_AbsS(Camera_GetCamDirYaw(camera) - BINANG_SUB(rot->y, 0x7FFF)); y = Snap_AbsS(Camera_GetCamDirYaw(camera) - BINANG_SUB(rot->y, 0x7FFF));
if ((0 < angleRange) && ((angleRange < x) || (angleRange < y))) { if ((0 < angleRange) && ((angleRange < x) || (angleRange < y))) {
Snap_SetFlag(PICTOGRAPH_BAD_ANGLE); Snap_SetFlag(PICTO_VALID_BAD_ANGLE);
ret |= PICTOGRAPH_BAD_ANGLE; ret |= PICTO_VALID_BAD_ANGLE;
} }
// Check in capture region // Check in capture region
Actor_GetProjectedPos(play, pos, &projectedPos, &distance); Actor_GetProjectedPos(play, pos, &projectedPos, &distance);
// Convert to projected position to device coordinates, shift to be relative to the capture region's top-left corner // Convert to projected position to device coordinates, shift to be relative to the capture region's top-left corner
x = (s16)PROJECTED_TO_SCREEN_X(projectedPos, distance) - PICTO_CAPTURE_REGION_TOPLEFT_X; x = (s16)PROJECTED_TO_SCREEN_X(projectedPos, distance) - PICTO_VALID_TOPLEFT_X;
y = (s16)PROJECTED_TO_SCREEN_Y(projectedPos, distance) - PICTO_CAPTURE_REGION_TOPLEFT_Y; y = (s16)PROJECTED_TO_SCREEN_Y(projectedPos, distance) - PICTO_VALID_TOPLEFT_Y;
// checks if the coordinates are within the capture region // checks if the coordinates are within the capture region
if ((x < 0) || (x > PICTO_RESOLUTION_HORIZONTAL) || (y < 0) || (y > PICTO_RESOLUTION_VERTICAL)) { if ((x < 0) || (x > PICTO_VALID_WIDTH) || (y < 0) || (y > PICTO_VALID_HEIGHT)) {
Snap_SetFlag(PICTOGRAPH_NOT_IN_VIEW); Snap_SetFlag(PICTO_VALID_NOT_IN_VIEW);
ret |= PICTOGRAPH_NOT_IN_VIEW; ret |= PICTO_VALID_NOT_IN_VIEW;
} }
// Check not obscured by bg collision // Check not obscured by bg collision
if (BgCheck_ProjectileLineTest(&play->colCtx, pos, &camera->eye, &projectedPos, &poly, true, true, true, true, if (BgCheck_ProjectileLineTest(&play->colCtx, pos, &camera->eye, &projectedPos, &poly, true, true, true, true,
&bgId)) { &bgId)) {
Snap_SetFlag(PICTOGRAPH_BEHIND_BG); Snap_SetFlag(PICTO_VALID_BEHIND_BG);
ret |= PICTOGRAPH_BEHIND_BG; ret |= PICTO_VALID_BEHIND_BG;
} }
// Check not obscured by actor collision // Check not obscured by actor collision
actors[0] = actor; actors[0] = actor;
actors[1] = &GET_PLAYER(play)->actor; actors[1] = &GET_PLAYER(play)->actor;
if (CollisionCheck_LineOCCheck(play, &play->colChkCtx, pos, &camera->eye, actors, 2)) { if (CollisionCheck_LineOCCheck(play, &play->colChkCtx, pos, &camera->eye, actors, 2)) {
Snap_SetFlag(PICTOGRAPH_BEHIND_COLLISION); Snap_SetFlag(PICTO_VALID_BEHIND_COLLISION);
ret |= PICTOGRAPH_BEHIND_COLLISION; ret |= PICTO_VALID_BEHIND_COLLISION;
} }
// If all of the above checks pass, set the flag // If all of the above checks pass, set the flag

View File

@ -220,7 +220,7 @@ void Skybox_Setup(GameState* gameState, SkyboxContext* skyboxCtx, s16 skyboxId)
// Inverted Stone Tower Temple and Inverted Stone Tower // Inverted Stone Tower Temple and Inverted Stone Tower
if ((play->sceneId == SCENE_F41) || (play->sceneId == SCENE_INISIE_R)) { if ((play->sceneId == SCENE_F41) || (play->sceneId == SCENE_INISIE_R)) {
skyboxCtx->rotZ = 3.15000009537f; skyboxCtx->rotZ = 3.15f;
} }
break; break;
@ -288,7 +288,7 @@ void func_80143324(PlayState* play, SkyboxContext* skyboxCtx, s16 skyboxId) {
} }
void Skybox_Init(GameState* gameState, SkyboxContext* skyboxCtx, s16 skyboxId) { void Skybox_Init(GameState* gameState, SkyboxContext* skyboxCtx, s16 skyboxId) {
skyboxCtx->skyboxShouldDraw = 0; skyboxCtx->skyboxShouldDraw = false;
skyboxCtx->rotX = skyboxCtx->rotY = skyboxCtx->rotZ = 0.0f; skyboxCtx->rotX = skyboxCtx->rotY = skyboxCtx->rotZ = 0.0f;
Skybox_Setup(gameState, skyboxCtx, skyboxId); Skybox_Setup(gameState, skyboxCtx, skyboxId);

View File

@ -63,5 +63,5 @@ void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyb
CLOSE_DISPS(gfxCtx); CLOSE_DISPS(gfxCtx);
} }
void SkyboxDraw_Noop(SkyboxContext* skyboxCtx) { void SkyboxDraw_Update(SkyboxContext* skyboxCtx) {
} }

View File

@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "ultra64.h" #include "ultra64.h"
#include "global.h" #include "global.h"

View File

@ -328,7 +328,7 @@ void BgCraceMovebg_ClosingDoor_Close(BgCraceMovebg* this, PlayState* play) {
if (Math_StepToF(&this->doorHeight, 0.0f, 1.0f)) { if (Math_StepToF(&this->doorHeight, 0.0f, 1.0f)) {
if (!(this->stateFlags & BG_CRACE_MOVEBG_FLAG_PLAYER_IS_BEYOND_DOOR) && if (!(this->stateFlags & BG_CRACE_MOVEBG_FLAG_PLAYER_IS_BEYOND_DOOR) &&
!Flags_GetSwitch(play, BG_CRACE_MOVEBG_GET_SWITCH_FLAG(&this->dyna.actor) + 1)) { !Flags_GetSwitch(play, BG_CRACE_MOVEBG_GET_SWITCH_FLAG(&this->dyna.actor) + 1)) {
play->unk_18845 = 1; play->haltAllActors = true;
func_80169FDC(&play->state); func_80169FDC(&play->state);
play_sound(NA_SE_OC_ABYSS); play_sound(NA_SE_OC_ABYSS);
} }

View File

@ -4,7 +4,6 @@
* Description: Great Bay Temple - Waterwheels, push switches, gear shafts, and whirlpools * Description: Great Bay Temple - Waterwheels, push switches, gear shafts, and whirlpools
*/ */
#include "prevent_bss_reordering.h"
#include "z_bg_dblue_movebg.h" #include "z_bg_dblue_movebg.h"
#include "objects/object_dblue_object/object_dblue_object.h" #include "objects/object_dblue_object/object_dblue_object.h"
#include "overlays/actors/ovl_Obj_Hunsui/z_obj_hunsui.h" #include "overlays/actors/ovl_Obj_Hunsui/z_obj_hunsui.h"

View File

@ -651,7 +651,7 @@ void func_80B814B8(BgIkanaRotaryroom* this, PlayState* play) {
func_800B8E58(player, NA_SE_VO_LI_DAMAGE_S + player->ageProperties->voiceSfxIdOffset); func_800B8E58(player, NA_SE_VO_LI_DAMAGE_S + player->ageProperties->voiceSfxIdOffset);
func_80169EFC(&play->state); func_80169EFC(&play->state);
func_800B8E58(player, NA_SE_VO_LI_TAKEN_AWAY + player->ageProperties->voiceSfxIdOffset); func_800B8E58(player, NA_SE_VO_LI_TAKEN_AWAY + player->ageProperties->voiceSfxIdOffset);
play->unk_18845 = 1; play->haltAllActors = true;
play_sound(NA_SE_OC_ABYSS); play_sound(NA_SE_OC_ABYSS);
this->actionFunc = NULL; this->actionFunc = NULL;
} }

View File

@ -251,8 +251,8 @@ void func_809542A0(BgIngate* this, PlayState* play) {
} }
gSaveContext.nextCutsceneIndex = 0; gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
this->actionFunc = func_80953F8C; this->actionFunc = func_80953F8C;
CLEAR_WEEKEVENTREG(WEEKEVENTREG_90_40); CLEAR_WEEKEVENTREG(WEEKEVENTREG_90_40);
Environment_StartTime(); Environment_StartTime();

View File

@ -751,9 +751,9 @@ void func_809DAB78(Boss02* this, PlayState* play) {
this->unk_01BC[this->unk_014E].y = this->actor.world.pos.y; this->unk_01BC[this->unk_014E].y = this->actor.world.pos.y;
this->unk_01BC[this->unk_014E].z = this->actor.world.pos.z; this->unk_01BC[this->unk_014E].z = this->actor.world.pos.z;
this->unk_0B1C[this->unk_014E].x = BINANG_TO_RAD(this->actor.world.rot.x); this->unk_0B1C[this->unk_014E].x = BINANG_TO_RAD_ALT(this->actor.world.rot.x);
this->unk_0B1C[this->unk_014E].y = BINANG_TO_RAD(this->actor.world.rot.y); this->unk_0B1C[this->unk_014E].y = BINANG_TO_RAD_ALT(this->actor.world.rot.y);
this->unk_0B1C[this->unk_014E].z = BINANG_TO_RAD(this->actor.world.rot.z); this->unk_0B1C[this->unk_014E].z = BINANG_TO_RAD_ALT(this->actor.world.rot.z);
} }
if ((this->unk_0144 < 10) && (otherTwinmold->unk_0144 >= 20)) { if ((this->unk_0144 < 10) && (otherTwinmold->unk_0144 >= 20)) {
@ -1391,7 +1391,7 @@ void Boss02_Twinmold_Draw(Actor* thisx, PlayState* play2) {
} }
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, NULL, &this->actor); SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, NULL, &this->actor);
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
spA4 = 0.0f; spA4 = 0.0f;
spA0 = 0.0f; spA0 = 0.0f;
@ -1426,7 +1426,7 @@ void Boss02_Twinmold_Draw(Actor* thisx, PlayState* play2) {
if (sp98 < this->unk_01BC[phi_v0].y) { if (sp98 < this->unk_01BC[phi_v0].y) {
gSPDisplayList(POLY_OPA_DISP++, D_809DFA9C[i]); gSPDisplayList(POLY_OPA_DISP++, D_809DFA9C[i]);
} }
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
} }
if (i == 21) { if (i == 21) {
@ -1636,7 +1636,7 @@ void func_809DD934(Boss02* this, PlayState* play) {
this->subCamId = Play_CreateSubCamera(play); this->subCamId = Play_CreateSubCamera(play);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE); Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
func_8016566C(150); Play_EnableMotionBlur(150);
this->unk_1D14 = 0; this->unk_1D14 = 0;
this->subCamAtVel = 0.0f; this->subCamAtVel = 0.0f;
this->unk_1D58 = 0.0f; this->unk_1D58 = 0.0f;
@ -1756,7 +1756,7 @@ void func_809DD934(Boss02* this, PlayState* play) {
this->actor.flags |= ACTOR_FLAG_1; this->actor.flags |= ACTOR_FLAG_1;
player->stateFlags1 &= ~PLAYER_STATE1_100; player->stateFlags1 &= ~PLAYER_STATE1_100;
this->unk_1D70 = 0.01f; this->unk_1D70 = 0.01f;
func_80165690(); Play_DisableMotionBlur();
break; break;
} }

View File

@ -48,7 +48,6 @@
* - Effect Update/Draw * - Effect Update/Draw
* - Seaweed * - Seaweed
*/ */
#include "prevent_bss_reordering.h"
#include "z_boss_03.h" #include "z_boss_03.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
#include "overlays/actors/ovl_En_Water_Effect/z_en_water_effect.h" #include "overlays/actors/ovl_En_Water_Effect/z_en_water_effect.h"
@ -780,7 +779,7 @@ void Boss03_CatchPlayer(Boss03* this, PlayState* play) {
player->unk_AE8 = 101; player->unk_AE8 = 101;
player->actor.parent = NULL; player->actor.parent = NULL;
player->csMode = PLAYER_CSMODE_0; player->csMode = PLAYER_CSMODE_0;
func_80165690(); Play_DisableMotionBlur();
} }
func_809E344C(this, play); func_809E344C(this, play);
@ -852,7 +851,7 @@ void Boss03_ChewPlayer(Boss03* this, PlayState* play) {
this->unk_25C = 15; this->unk_25C = 15;
if (this->workTimer[WORK_TIMER_CURRENT_ACTION] == 90) { if (this->workTimer[WORK_TIMER_CURRENT_ACTION] == 90) {
func_8016566C(0x96); Play_EnableMotionBlur(150);
} }
SkelAnime_Update(&this->skelAnime); SkelAnime_Update(&this->skelAnime);
@ -908,7 +907,7 @@ void Boss03_ChewPlayer(Boss03* this, PlayState* play) {
player->unk_AE8 = 101; player->unk_AE8 = 101;
player->actor.parent = NULL; player->actor.parent = NULL;
player->csMode = PLAYER_CSMODE_0; player->csMode = PLAYER_CSMODE_0;
func_80165690(); Play_DisableMotionBlur();
func_800B8D50(play, NULL, 10.0f, this->actor.shape.rot.y, 0.0f, 0x20); func_800B8D50(play, NULL, 10.0f, this->actor.shape.rot.y, 0.0f, 0x20);
} }
@ -1187,7 +1186,7 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) {
this->csState = 2; this->csState = 2;
this->csTimer = 0; this->csTimer = 0;
this->unk_240 = 0; this->unk_240 = 0;
func_8016566C(0x96); Play_EnableMotionBlur(150);
this->subCamFov = 80.0f; this->subCamFov = 80.0f;
case 2: case 2:
@ -1280,7 +1279,7 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) {
this->actor.speedXZ = -200.0f; this->actor.speedXZ = -200.0f;
Actor_MoveWithoutGravityReverse(&this->actor); Actor_MoveWithoutGravityReverse(&this->actor);
this->actor.world.pos.y = this->waterHeight - 150.0f; this->actor.world.pos.y = this->waterHeight - 150.0f;
func_80165690(); Play_DisableMotionBlur();
case 5: case 5:
SkelAnime_Update(&this->skelAnime); SkelAnime_Update(&this->skelAnime);
@ -1627,7 +1626,7 @@ void Boss03_DeathCutscene(Boss03* this, PlayState* play) {
Cutscene_End(play, &play->csCtx); Cutscene_End(play, &play->csCtx);
func_800B7298(play, &this->actor, PLAYER_CSMODE_6); func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
this->csState = 3; this->csState = 3;
func_80165690(); Play_DisableMotionBlur();
Boss03_PlayUnderwaterSfx(&this->actor.projectedPos, NA_SE_EN_KONB_INIT_OLD); Boss03_PlayUnderwaterSfx(&this->actor.projectedPos, NA_SE_EN_KONB_INIT_OLD);
Boss03_PlayUnderwaterSfx(&D_809E9848, NA_SE_EN_KONB_INIT_OLD); Boss03_PlayUnderwaterSfx(&D_809E9848, NA_SE_EN_KONB_INIT_OLD);
} }
@ -1751,7 +1750,7 @@ void Boss03_SetupStunned(Boss03* this, PlayState* play) {
player->unk_AE8 = 101; player->unk_AE8 = 101;
player->actor.parent = NULL; player->actor.parent = NULL;
player->csMode = PLAYER_CSMODE_0; player->csMode = PLAYER_CSMODE_0;
func_80165690(); Play_DisableMotionBlur();
} }
this->unk_240 = 0; this->unk_240 = 0;
@ -1903,7 +1902,7 @@ void Boss03_UpdateCollision(Boss03* this, PlayState* play) {
player->unk_AE8 = 101; player->unk_AE8 = 101;
player->actor.parent = NULL; player->actor.parent = NULL;
player->csMode = PLAYER_CSMODE_0; player->csMode = PLAYER_CSMODE_0;
func_80165690(); Play_DisableMotionBlur();
} }
continue; continue;
@ -2270,7 +2269,7 @@ void Boss03_Draw(Actor* thisx, PlayState* play) {
Matrix_Translate(0.0f, -600.0f, 0.0f, MTXMODE_APPLY); Matrix_Translate(0.0f, -600.0f, 0.0f, MTXMODE_APPLY);
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
Boss03_OverrideLimbDraw, Boss03_PostLimbDraw, &this->actor); Boss03_OverrideLimbDraw, Boss03_PostLimbDraw, &this->actor);
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
} }
this->unk_2BC = 0; this->unk_2BC = 0;

View File

@ -271,7 +271,7 @@ void func_809EC568(Boss04* this, PlayState* play) {
Math_Vec3f_Copy(&this->subCamEye, &player->actor.world.pos); Math_Vec3f_Copy(&this->subCamEye, &player->actor.world.pos);
this->subCamEye.y += 100.0f; this->subCamEye.y += 100.0f;
Math_Vec3f_Copy(&this->subCamAt, &this->actor.world.pos); Math_Vec3f_Copy(&this->subCamAt, &this->actor.world.pos);
func_8016566C(150); Play_EnableMotionBlur(150);
this->subCamFov = 60.0f; this->subCamFov = 60.0f;
boss = play->actorCtx.actorLists[ACTORCAT_BOSS].first; boss = play->actorCtx.actorLists[ACTORCAT_BOSS].first;
@ -391,7 +391,7 @@ void func_809EC568(Boss04* this, PlayState* play) {
this->subCamId = SUB_CAM_ID_DONE; this->subCamId = SUB_CAM_ID_DONE;
Cutscene_End(play, &play->csCtx); Cutscene_End(play, &play->csCtx);
func_800B7298(play, &this->actor, PLAYER_CSMODE_6); func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
func_80165690(); Play_DisableMotionBlur();
SET_EVENTINF(EVENTINF_60); SET_EVENTINF(EVENTINF_60);
} }
break; break;
@ -828,7 +828,7 @@ void Boss04_Draw(Actor* thisx, PlayState* play) {
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
Boss04_OverrideLimbDraw, Boss04_PostLimbDraw, &this->actor); Boss04_OverrideLimbDraw, Boss04_PostLimbDraw, &this->actor);
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
if (this->actionFunc != func_809EC568) { if (this->actionFunc != func_809EC568) {
func_8012C448(play->state.gfxCtx); func_8012C448(play->state.gfxCtx);

View File

@ -220,7 +220,7 @@ void func_809F24C8(Boss06* this, PlayState* play) {
case 1: case 1:
if (this->unk_1CA >= 10) { if (this->unk_1CA >= 10) {
Math_ApproachF(&this->unk_1E4, 30.0f, 0.2f, 1.0f); Math_ApproachF(&this->unk_1E4, 30.0f, 0.2f, 1.0f);
play->envCtx.fillScreen = 1; play->envCtx.fillScreen = true;
play->envCtx.screenFillColor[2] = 0; play->envCtx.screenFillColor[2] = 0;
play->envCtx.screenFillColor[1] = 0; play->envCtx.screenFillColor[1] = 0;
play->envCtx.screenFillColor[0] = 0; play->envCtx.screenFillColor[0] = 0;
@ -233,7 +233,7 @@ void func_809F24C8(Boss06* this, PlayState* play) {
} }
if (this->unk_1CA >= 60) { if (this->unk_1CA >= 60) {
play->envCtx.fillScreen = 0; play->envCtx.fillScreen = false;
this->unk_1C8 = 0; this->unk_1C8 = 0;
this->unk_1DC = 0.0f; this->unk_1DC = 0.0f;
this->unk_1D8 = 0.0f; this->unk_1D8 = 0.0f;

View File

@ -1024,9 +1024,9 @@ void DmStk_Init(Actor* thisx, PlayState* play) {
this->deflectCount = 0; this->deflectCount = 0;
this->maskType = SK_MASK_TYPE_NORMAL; this->maskType = SK_MASK_TYPE_NORMAL;
this->animIndex = SK_ANIM_IDLE; this->animIndex = SK_ANIM_IDLE;
this->fogR = play->lightCtx.unk7; this->fogR = play->lightCtx.fogColor.r;
this->fogG = play->lightCtx.unk8; this->fogG = play->lightCtx.fogColor.g;
this->fogB = play->lightCtx.unk9; this->fogB = play->lightCtx.fogColor.b;
if ((play->sceneId == SCENE_LOST_WOODS) && (gSaveContext.sceneLayer == 1)) { if ((play->sceneId == SCENE_LOST_WOODS) && (gSaveContext.sceneLayer == 1)) {
this->alpha = 0; this->alpha = 0;
@ -1594,9 +1594,9 @@ void DmStk_UpdateCutscenes(DmStk* this, PlayState* play) {
this->fadeInState++; this->fadeInState++;
} }
this->fogR = play->lightCtx.unk7 * this->fogScale; this->fogR = play->lightCtx.fogColor.r * this->fogScale;
this->fogG = play->lightCtx.unk8 * this->fogScale; this->fogG = play->lightCtx.fogColor.g * this->fogScale;
this->fogB = play->lightCtx.unk9 * this->fogScale; this->fogB = play->lightCtx.fogColor.b * this->fogScale;
} else if (this->fadeInState == SK_FADE_IN_STATE_INCREASE_FOG) { } else if (this->fadeInState == SK_FADE_IN_STATE_INCREASE_FOG) {
if (this->fogN < 996) { if (this->fogN < 996) {
this->fogN += 10; this->fogN += 10;
@ -1895,7 +1895,7 @@ void DmStk_PostLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot
POLY_OPA_DISP = Gfx_SetFog(POLY_OPA_DISP, this->fogR, this->fogG, this->fogB, this->fogA, POLY_OPA_DISP = Gfx_SetFog(POLY_OPA_DISP, this->fogR, this->fogG, this->fogB, this->fogA,
this->fogN, this->fogF); this->fogN, this->fogF);
gSPDisplayList(POLY_OPA_DISP++, gSkullKidMajorasMask1DL); gSPDisplayList(POLY_OPA_DISP++, gSkullKidMajorasMask1DL);
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
} else { } else {
gSPDisplayList(POLY_OPA_DISP++, gSkullKidMajorasMask1DL); gSPDisplayList(POLY_OPA_DISP++, gSkullKidMajorasMask1DL);
} }

View File

@ -158,8 +158,8 @@ s32 func_80C224D8(DmTag* this, PlayState* play) {
play->nextEntrance = ENTRANCE(STOCK_POT_INN, 5); play->nextEntrance = ENTRANCE(STOCK_POT_INN, 5);
gSaveContext.nextCutsceneIndex = 0; gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_02; play->transitionType = TRANS_TYPE_FADE_BLACK;
gSaveContext.nextTransitionType = TRANS_TYPE_06; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK_SLOW;
this->unk_1A4++; this->unk_1A4++;
break; break;
} }
@ -172,8 +172,8 @@ s32 func_80C227E8(DmTag* this, PlayState* play) {
play->nextEntrance = ENTRANCE(STOCK_POT_INN, 4); play->nextEntrance = ENTRANCE(STOCK_POT_INN, 4);
gSaveContext.nextCutsceneIndex = 0; gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_02; play->transitionType = TRANS_TYPE_FADE_BLACK;
gSaveContext.nextTransitionType = TRANS_TYPE_06; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK_SLOW;
this->unk_1A4++; this->unk_1A4++;
} }
return false; return false;

View File

@ -410,8 +410,8 @@ void func_808B958C(DoorWarp1* this, PlayState* play) {
this->unk_1D0++; this->unk_1D0++;
if ((this->unk_1D0 > 120) && (gSaveContext.nextCutsceneIndex == 0xFFEF)) { if ((this->unk_1D0 > 120) && (gSaveContext.nextCutsceneIndex == 0xFFEF)) {
func_808BA10C(this, play); func_808BA10C(this, play);
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
} }
Math_SmoothStepToF(&this->unk_1A8, 6.0f, 0.2f, 0.02f, 0.01f); Math_SmoothStepToF(&this->unk_1A8, 6.0f, 0.2f, 0.02f, 0.01f);
@ -705,8 +705,8 @@ void func_808BA10C(DoorWarp1* this, PlayState* play) {
} }
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
} else { } else {
switch (phi_v0_2) { switch (phi_v0_2) {
case 0: case 0:
@ -714,14 +714,14 @@ void func_808BA10C(DoorWarp1* this, PlayState* play) {
SET_WEEKEVENTREG(WEEKEVENTREG_07_80); SET_WEEKEVENTREG(WEEKEVENTREG_07_80);
play->nextEntrance = ENTRANCE(WOODFALL_TEMPLE, 1); play->nextEntrance = ENTRANCE(WOODFALL_TEMPLE, 1);
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
} else { } else {
play->nextEntrance = ENTRANCE(WOODFALL, 0); play->nextEntrance = ENTRANCE(WOODFALL, 0);
gSaveContext.nextCutsceneIndex = 0xFFF0; gSaveContext.nextCutsceneIndex = 0xFFF0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
} }
break; break;
@ -729,8 +729,8 @@ void func_808BA10C(DoorWarp1* this, PlayState* play) {
SET_WEEKEVENTREG(WEEKEVENTREG_33_80); SET_WEEKEVENTREG(WEEKEVENTREG_33_80);
play->nextEntrance = ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 7); play->nextEntrance = ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 7);
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
break; break;
case 3: case 3:
@ -738,15 +738,15 @@ void func_808BA10C(DoorWarp1* this, PlayState* play) {
play->nextEntrance = ENTRANCE(ZORA_CAPE, 9); play->nextEntrance = ENTRANCE(ZORA_CAPE, 9);
gSaveContext.nextCutsceneIndex = 0xFFF0; gSaveContext.nextCutsceneIndex = 0xFFF0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
} else { } else {
SET_WEEKEVENTREG(WEEKEVENTREG_55_80); SET_WEEKEVENTREG(WEEKEVENTREG_55_80);
play->nextEntrance = ENTRANCE(ZORA_CAPE, 8); play->nextEntrance = ENTRANCE(ZORA_CAPE, 8);
gSaveContext.nextCutsceneIndex = 0xFFF0; gSaveContext.nextCutsceneIndex = 0xFFF0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
} }
break; break;
@ -755,14 +755,14 @@ void func_808BA10C(DoorWarp1* this, PlayState* play) {
play->nextEntrance = ENTRANCE(IKANA_CANYON, 15); play->nextEntrance = ENTRANCE(IKANA_CANYON, 15);
gSaveContext.nextCutsceneIndex = 0xFFF2; gSaveContext.nextCutsceneIndex = 0xFFF2;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
break; break;
} }
} }
} else if (DOORWARP1_GET_FF00_1(&this->dyna.actor) != 0xFF) { } else if (DOORWARP1_GET_FF00_1(&this->dyna.actor) != 0xFF) {
if (DOORWARP1_GET_FF(&this->dyna.actor) == ENDOORWARP1_FF_6) { if (DOORWARP1_GET_FF(&this->dyna.actor) == ENDOORWARP1_FF_6) {
gSaveContext.respawnFlag = ~1; gSaveContext.respawnFlag = -2;
} }
play->nextEntrance = play->setupExitList[DOORWARP1_GET_FF00_3(&this->dyna.actor)]; play->nextEntrance = play->setupExitList[DOORWARP1_GET_FF00_3(&this->dyna.actor)];
Scene_SetExitFade(play); Scene_SetExitFade(play);
@ -833,7 +833,7 @@ void func_808BA550(DoorWarp1* this, PlayState* play) {
} }
if (this->unk_1D0 > 140) { if (this->unk_1D0 > 140) {
play->envCtx.fillScreen = 1; play->envCtx.fillScreen = true;
temp_f0 = (this->unk_1D0 - 140) / 20.0f; temp_f0 = (this->unk_1D0 - 140) / 20.0f;
if (temp_f0 > 1.0f) { if (temp_f0 > 1.0f) {
temp_f0 = 1.0f; temp_f0 = 1.0f;

View File

@ -677,7 +677,7 @@ void func_809C2788(EnAob01* this, PlayState* play) {
play->nextEntrance = ENTRANCE(DOGGY_RACETRACK, 1); play->nextEntrance = ENTRANCE(DOGGY_RACETRACK, 1);
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & (u8)~7) | 3; gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & (u8)~7) | 3;
play->transitionType = TRANS_TYPE_64; play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
} }
} }

View File

@ -151,8 +151,8 @@ void func_80A94AB8(EnAz* this, PlayState* play, s32 spawnIndex) {
play->nextEntrance = Entrance_CreateFromSpawn(spawnIndex); play->nextEntrance = Entrance_CreateFromSpawn(spawnIndex);
gSaveContext.nextCutsceneIndex = 0; gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
} }
void func_80A94B20(PlayState* play) { void func_80A94B20(PlayState* play) {
@ -1471,7 +1471,7 @@ void func_80A97C4C(EnAz* this, PlayState* play) {
gSaveContext.nextCutsceneIndex = 0; gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_80; play->transitionType = TRANS_TYPE_80;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
func_80A979DC(this, play); func_80A979DC(this, play);
} else { } else {
Actor_MoveWithGravity(&this->actor); Actor_MoveWithGravity(&this->actor);
@ -1552,8 +1552,8 @@ void func_80A97F9C(EnAz* this, PlayState* play) {
play->nextEntrance = Entrance_CreateFromSpawn(2); play->nextEntrance = Entrance_CreateFromSpawn(2);
gSaveContext.nextCutsceneIndex = 0; gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
this->actor.speedXZ = 0.0f; this->actor.speedXZ = 0.0f;
func_80A979DC(this, play); func_80A979DC(this, play);
} else { } else {

View File

@ -179,7 +179,7 @@ void EnBigokuta_ShootPlayer(EnBigokuta* this, PlayState* play) {
} }
s32 EnBigokuta_ValidatePictograph(PlayState* play, Actor* thisx) { s32 EnBigokuta_ValidatePictograph(PlayState* play, Actor* thisx) {
return Snap_ValidatePictograph(play, thisx, PICTOGRAPH_BIG_OCTO, &thisx->focus.pos, &thisx->shape.rot, 280.0f, return Snap_ValidatePictograph(play, thisx, PICTO_VALID_BIG_OCTO, &thisx->focus.pos, &thisx->shape.rot, 280.0f,
1800.0f, -1); 1800.0f, -1);
} }

View File

@ -336,7 +336,7 @@ void func_809C51B4(EnBomBowlMan* this, PlayState* play) {
gSaveContext.nextCutsceneIndex = 0; gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_86; play->transitionType = TRANS_TYPE_86;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
CLEAR_WEEKEVENTREG(WEEKEVENTREG_75_40); CLEAR_WEEKEVENTREG(WEEKEVENTREG_75_40);
if (player->transformation == PLAYER_FORM_HUMAN) { if (player->transformation == PLAYER_FORM_HUMAN) {
SET_WEEKEVENTREG(WEEKEVENTREG_84_80); SET_WEEKEVENTREG(WEEKEVENTREG_84_80);

View File

@ -773,7 +773,7 @@ void func_80BFFBC4(EnBomjima* this, PlayState* play) {
gSaveContext.nextCutsceneIndex = 0; gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_86; play->transitionType = TRANS_TYPE_86;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
ActorCutscene_Stop(this->cutscenes[1]); ActorCutscene_Stop(this->cutscenes[1]);
} }
} }

View File

@ -799,7 +799,7 @@ void func_80C02CA4(EnBomjimb* this, PlayState* play) {
gSaveContext.nextCutsceneIndex = 0; gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_86; play->transitionType = TRANS_TYPE_86;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
} }
SET_WEEKEVENTREG(WEEKEVENTREG_75_40); SET_WEEKEVENTREG(WEEKEVENTREG_75_40);
SET_WEEKEVENTREG(WEEKEVENTREG_83_04); SET_WEEKEVENTREG(WEEKEVENTREG_83_04);

View File

@ -244,7 +244,7 @@ void func_80AFE4AC(Actor* thisx, PlayState* play) {
func_8012C2DC(play->state.gfxCtx); func_8012C2DC(play->state.gfxCtx);
func_8012C28C(play->state.gfxCtx); func_8012C28C(play->state.gfxCtx);
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP); POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP);
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(gDropRecoveryHeartTex)); gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(gDropRecoveryHeartTex));
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@ -266,7 +266,7 @@ void func_80AFE584(Actor* thisx, PlayState* play) {
void func_80AFE650(Actor* thisx, PlayState* play) { void func_80AFE650(Actor* thisx, PlayState* play) {
func_8012C28C(play->state.gfxCtx); func_8012C28C(play->state.gfxCtx);
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP); POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP);
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(gDropBombTex)); gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(gDropBombTex));
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -83,7 +83,7 @@ static AnimationInfoS sAnimationInfo[] = {
}; };
s32 EnDnq_ValidatePictograph(PlayState* play, Actor* thisx) { s32 EnDnq_ValidatePictograph(PlayState* play, Actor* thisx) {
return Snap_ValidatePictograph(play, thisx, PICTOGRAPH_DEKU_KING, &thisx->focus.pos, &thisx->world.rot, 120.0f, return Snap_ValidatePictograph(play, thisx, PICTO_VALID_DEKU_KING, &thisx->focus.pos, &thisx->world.rot, 120.0f,
480.0f, 0x38E3); 480.0f, 0x38E3);
} }

View File

@ -440,8 +440,8 @@ void func_8092D330(EnDns* this, PlayState* play) {
play->nextEntrance = ENTRANCE(DEKU_PALACE, 1); play->nextEntrance = ENTRANCE(DEKU_PALACE, 1);
gSaveContext.nextCutsceneIndex = 0; gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
} }
} }

View File

@ -1453,7 +1453,7 @@ void EnEgol_Draw(Actor* thisx, PlayState* play2) {
AnimatedMat_Draw(play, Lib_SegmentedToVirtual(gEyegoreEyeLaserTexAnim)); AnimatedMat_Draw(play, Lib_SegmentedToVirtual(gEyegoreEyeLaserTexAnim));
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnEgol_OverrideLimbDraw, EnEgol_PostLimbDraw, &this->actor); EnEgol_OverrideLimbDraw, EnEgol_PostLimbDraw, &this->actor);
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
} }
if (this->dmgEffectTimer != 0) { if (this->dmgEffectTimer != 0) {
f32 drawDmgEffAlpha = 0.05f * this->dmgEffectTimer; f32 drawDmgEffAlpha = 0.05f * this->dmgEffectTimer;

View File

@ -344,8 +344,8 @@ void EnFall_CrashingMoon_HandleGiantsCutscene(EnFall* this, PlayState* play) {
play->nextEntrance = ENTRANCE(CLOCK_TOWER_ROOFTOP, 0); play->nextEntrance = ENTRANCE(CLOCK_TOWER_ROOFTOP, 0);
gSaveContext.nextCutsceneIndex = 0xFFF2; gSaveContext.nextCutsceneIndex = 0xFFF2;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_02; play->transitionType = TRANS_TYPE_FADE_BLACK;
gSaveContext.nextTransitionType = TRANS_TYPE_02; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
sGiantsCutsceneState = 9; sGiantsCutsceneState = 9;
} }
break; break;
@ -784,7 +784,7 @@ void EnFall_LodMoon_Draw(Actor* thisx, PlayState* play) {
gSPDisplayList(POLY_OPA_DISP++, gLodmoonEyesDL); gSPDisplayList(POLY_OPA_DISP++, gLodmoonEyesDL);
gSPLoadGeometryMode(POLY_OPA_DISP++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH); gSPLoadGeometryMode(POLY_OPA_DISP++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH);
gSPDisplayList(POLY_OPA_DISP++, gLodmoonMoonDL); gSPDisplayList(POLY_OPA_DISP++, gLodmoonMoonDL);
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
CLOSE_DISPS(play->state.gfxCtx); CLOSE_DISPS(play->state.gfxCtx);
} }

View File

@ -3,7 +3,6 @@
* Overlay: ovl_En_Fishing * Overlay: ovl_En_Fishing
* Description: Fishing Pond Elements (Owner, Fish, Props, Effects...) * Description: Fishing Pond Elements (Owner, Fish, Props, Effects...)
*/ */
#include "prevent_bss_reordering.h" #include "prevent_bss_reordering.h"
#include "z_en_fishing.h" #include "z_en_fishing.h"
#include "z64rumble.h" #include "z64rumble.h"
@ -2169,7 +2168,7 @@ void EnFishing_UpdateLure(EnFishing* this, PlayState* play) {
if (D_80917204 == 18) { if (D_80917204 == 18) {
D_8090CD14 = 1; D_8090CD14 = 1;
sLurePos = sRodTipPos; sLurePos = sRodTipPos;
Matrix_RotateYF(BINANG_TO_RAD(player->actor.shape.rot.y), MTXMODE_NEW); Matrix_RotateYF(BINANG_TO_RAD_ALT(player->actor.shape.rot.y), MTXMODE_NEW);
sp90.x = 0.0f; sp90.x = 0.0f;
sp90.y = 0.0f; sp90.y = 0.0f;
sp90.z = 25.0f; sp90.z = 25.0f;
@ -5362,7 +5361,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
D_8090CD54 = 1; D_8090CD54 = 1;
Math_ApproachF(&D_80911F64, 71.0f, 0.5f, 3.0f); Math_ApproachF(&D_80911F64, 71.0f, 0.5f, 3.0f);
Matrix_RotateYF(BINANG_TO_RAD(player->actor.shape.rot.y), MTXMODE_NEW); Matrix_RotateYF(BINANG_TO_RAD_ALT(player->actor.shape.rot.y), MTXMODE_NEW);
sp114.x = Math_SinS(play->gameplayFrames * 0x1000); sp114.x = Math_SinS(play->gameplayFrames * 0x1000);
sp114.y = D_80911F64; sp114.y = D_80911F64;

View File

@ -1448,7 +1448,7 @@ void func_80964950(PlayState* play, EnFuUnkStruct* ptr, s32 len) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP); POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP);
for (i = 0; i < len; i++, ptr++) { for (i = 0; i < len; i++, ptr++) {

View File

@ -384,10 +384,10 @@ void EnGe1_Update(Actor* thisx, PlayState* play) {
} }
s32 EnGe1_ValidatePictograph(PlayState* play, Actor* thisx) { s32 EnGe1_ValidatePictograph(PlayState* play, Actor* thisx) {
s32 ret = Snap_ValidatePictograph(play, thisx, PICTOGRAPH_PIRATE_GOOD, &thisx->focus.pos, &thisx->shape.rot, 10.0f, s32 ret = Snap_ValidatePictograph(play, thisx, PICTO_VALID_PIRATE_GOOD, &thisx->focus.pos, &thisx->shape.rot, 10.0f,
400.0f, -1); 400.0f, -1);
ret |= Snap_ValidatePictograph(play, thisx, PICTOGRAPH_PIRATE_TOO_FAR, &thisx->focus.pos, &thisx->shape.rot, 10.0f, ret |= Snap_ValidatePictograph(play, thisx, PICTO_VALID_PIRATE_TOO_FAR, &thisx->focus.pos, &thisx->shape.rot, 10.0f,
1200.0f, -1); 1200.0f, -1);
return ret; return ret;

View File

@ -722,8 +722,8 @@ void func_80B51B40(EnGk* this, PlayState* play) {
if (this->unk_31C == 0xE8F) { if (this->unk_31C == 0xE8F) {
play->nextEntrance = ENTRANCE(GORON_RACETRACK, 1); play->nextEntrance = ENTRANCE(GORON_RACETRACK, 1);
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
Magic_Add(play, MAGIC_FILL_TO_CAPACITY); Magic_Add(play, MAGIC_FILL_TO_CAPACITY);
} else { } else {
this->actionFunc = func_80B51760; this->actionFunc = func_80B51760;

View File

@ -170,7 +170,7 @@ void EnGs_Destroy(Actor* thisx, PlayState* play) {
EnGs* this = THIS; EnGs* this = THIS;
Collider_DestroyCylinder(play, &this->collider); Collider_DestroyCylinder(play, &this->collider);
func_80165690(); Play_DisableMotionBlur();
} }
void func_80997D14(EnGs* this, PlayState* play) { void func_80997D14(EnGs* this, PlayState* play) {
@ -902,16 +902,16 @@ void func_80999AC0(EnGs* this) {
void func_80999B34(EnGs* this) { void func_80999B34(EnGs* this) {
if (this->unk_216 > 0) { if (this->unk_216 > 0) {
if (this->unk_218 == 0) { if (this->unk_218 == 0) {
func_8016566C(this->unk_216); Play_EnableMotionBlur(this->unk_216);
this->unk_218 = this->unk_216; this->unk_218 = this->unk_216;
} else { } else {
func_80165658(this->unk_218); Play_SetMotionBlurAlpha(this->unk_218);
} }
} else if (this->unk_218 > 0) { } else if (this->unk_218 > 0) {
Math_StepToS(&this->unk_218, this->unk_216, 20); Math_StepToS(&this->unk_218, this->unk_216, 20);
func_80165658(this->unk_218); Play_SetMotionBlurAlpha(this->unk_218);
if (this->unk_218 <= 0) { if (this->unk_218 <= 0) {
func_80165690(); Play_DisableMotionBlur();
} }
} }
} }

View File

@ -158,14 +158,14 @@ s32 func_808F8EB0(EnHorseGameCheck* this, PlayState* play) {
if (GET_WEEKEVENTREG_RACE_FLAGS == WEEKEVENTREG_RACE_FLAG_3) { if (GET_WEEKEVENTREG_RACE_FLAGS == WEEKEVENTREG_RACE_FLAG_3) {
play->transitionType = TRANS_TYPE_64; play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_02; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
} else if (GET_WEEKEVENTREG_RACE_FLAGS == WEEKEVENTREG_RACE_FLAG_2) { } else if (GET_WEEKEVENTREG_RACE_FLAGS == WEEKEVENTREG_RACE_FLAG_2) {
play->transitionType = TRANS_TYPE_80; play->transitionType = TRANS_TYPE_80;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
} else if (GET_WEEKEVENTREG_RACE_FLAGS == WEEKEVENTREG_RACE_FLAG_4) { } else if (GET_WEEKEVENTREG_RACE_FLAGS == WEEKEVENTREG_RACE_FLAG_4) {
SET_WEEKEVENTREG_RACE_FLAGS(WEEKEVENTREG_RACE_FLAG_3); SET_WEEKEVENTREG_RACE_FLAGS(WEEKEVENTREG_RACE_FLAG_3);
play->transitionType = TRANS_TYPE_02; play->transitionType = TRANS_TYPE_FADE_BLACK;
gSaveContext.nextTransitionType = TRANS_TYPE_02; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
} }
D_801BDA9C = 0; D_801BDA9C = 0;

View File

@ -820,7 +820,7 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
SET_WEEKEVENTREG_RACE_FLAGS(WEEKEVENTREG_RACE_FLAG_START); SET_WEEKEVENTREG_RACE_FLAGS(WEEKEVENTREG_RACE_FLAG_START);
func_800FD750(NA_BGM_HORSE); func_800FD750(NA_BGM_HORSE);
play->nextEntrance = ENTRANCE(GORMAN_TRACK, 5); play->nextEntrance = ENTRANCE(GORMAN_TRACK, 5);
play->transitionType = TRANS_TYPE_05; play->transitionType = TRANS_TYPE_FADE_WHITE_FAST;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
SET_WEEKEVENTREG(WEEKEVENTREG_57_01); SET_WEEKEVENTREG(WEEKEVENTREG_57_01);
break; break;
@ -1067,7 +1067,7 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
SET_WEEKEVENTREG_RACE_FLAGS(WEEKEVENTREG_RACE_FLAG_START); SET_WEEKEVENTREG_RACE_FLAGS(WEEKEVENTREG_RACE_FLAG_START);
func_800FD750(NA_BGM_HORSE); func_800FD750(NA_BGM_HORSE);
play->nextEntrance = ENTRANCE(GORMAN_TRACK, 5); play->nextEntrance = ENTRANCE(GORMAN_TRACK, 5);
play->transitionType = TRANS_TYPE_05; play->transitionType = TRANS_TYPE_FADE_WHITE_FAST;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
SET_WEEKEVENTREG(WEEKEVENTREG_57_01); SET_WEEKEVENTREG(WEEKEVENTREG_57_01);
break; break;

View File

@ -3,7 +3,7 @@
* Overlay: ovl_En_Invadepoh * Overlay: ovl_En_Invadepoh
* Description: Ranch nighttime actors * Description: Ranch nighttime actors
*/ */
#include "prevent_bss_reordering.h"
#include "z_en_invadepoh.h" #include "z_en_invadepoh.h"
#include "overlays/actors/ovl_En_Door/z_en_door.h" #include "overlays/actors/ovl_En_Door/z_en_door.h"
#include "objects/gameplay_keep/gameplay_keep.h" #include "objects/gameplay_keep/gameplay_keep.h"

View File

@ -370,7 +370,7 @@ void func_80C144F8(EnJgameTsn* this, PlayState* play) {
play->nextEntrance = ENTRANCE(GREAT_BAY_COAST, 13); play->nextEntrance = ENTRANCE(GREAT_BAY_COAST, 13);
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_80; play->transitionType = TRANS_TYPE_80;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
} }
void func_80C14540(EnJgameTsn* this) { void func_80C14540(EnJgameTsn* this) {

View File

@ -110,7 +110,7 @@ void EnJs_Init(Actor* thisx, PlayState* play) {
this->actionFunc = func_8096A6F4; this->actionFunc = func_8096A6F4;
Animation_PlayLoop(&this->skelAnime, &gMoonChildSittingAnim); Animation_PlayLoop(&this->skelAnime, &gMoonChildSittingAnim);
func_8016566C(0x3C); Play_EnableMotionBlur(60);
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_84_20)) { if (CHECK_WEEKEVENTREG(WEEKEVENTREG_84_20)) {
Inventory_DeleteItem(ITEM_MASK_FIERCE_DEITY, SLOT(ITEM_MASK_FIERCE_DEITY)); Inventory_DeleteItem(ITEM_MASK_FIERCE_DEITY, SLOT(ITEM_MASK_FIERCE_DEITY));
@ -151,7 +151,7 @@ void EnJs_Destroy(Actor* thisx, PlayState* play) {
paramsF = ENJS_GET_TYPE(&this->actor); paramsF = ENJS_GET_TYPE(&this->actor);
switch (paramsF) { switch (paramsF) {
case 0: case 0:
func_80165690(); Play_DisableMotionBlur();
break; break;
case 5: case 5:
case 6: case 6:

View File

@ -446,10 +446,10 @@ void EnKaizoku_ChangeAnim(EnKaizoku* this, EnKaizokuAnimation animIndex) {
} }
s32 EnKaizoku_ValidatePictograph(PlayState* play, Actor* actor) { s32 EnKaizoku_ValidatePictograph(PlayState* play, Actor* actor) {
s32 ret = Snap_ValidatePictograph(play, actor, PICTOGRAPH_PIRATE_GOOD, &actor->focus.pos, &actor->shape.rot, 10.0f, s32 ret = Snap_ValidatePictograph(play, actor, PICTO_VALID_PIRATE_GOOD, &actor->focus.pos, &actor->shape.rot, 10.0f,
400.0f, -1); 400.0f, -1);
ret |= Snap_ValidatePictograph(play, actor, PICTOGRAPH_PIRATE_TOO_FAR, &actor->focus.pos, &actor->shape.rot, 10.0f, ret |= Snap_ValidatePictograph(play, actor, PICTO_VALID_PIRATE_TOO_FAR, &actor->focus.pos, &actor->shape.rot, 10.0f,
1200.0f, -1); 1200.0f, -1);
return ret; return ret;
} }

View File

@ -813,7 +813,7 @@ void EnKakasi_SetupDanceNightAway(EnKakasi* this) {
this->subCamFovNext = 60.0f; this->subCamFovNext = 60.0f;
EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_TWIRL); EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_TWIRL);
Math_Vec3f_Copy(&this->unk22C, &this->picto.actor.home.pos); Math_Vec3f_Copy(&this->unk22C, &this->picto.actor.home.pos);
func_8016566C(0xB4); Play_EnableMotionBlur(180);
this->actionFunc = EnKakasi_DancingNightAway; this->actionFunc = EnKakasi_DancingNightAway;
} }
@ -917,7 +917,7 @@ void EnKakasi_DancingNightAway(EnKakasi* this, PlayState* play) {
this->unk204 = 0xA; this->unk204 = 0xA;
if (this->unk190 == 0xE) { if (this->unk190 == 0xE) {
func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_73); func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_73);
func_80165690(); Play_DisableMotionBlur();
this->unk204 = 0x14; this->unk204 = 0x14;
} }
} }

View File

@ -4,6 +4,7 @@
* Description: Grass / Bush * Description: Grass / Bush
*/ */
#include "prevent_bss_reordering.h"
#include "z_en_kusa.h" #include "z_en_kusa.h"
#include "objects/object_kusa/object_kusa.h" #include "objects/object_kusa/object_kusa.h"
#include "objects/gameplay_keep/gameplay_keep.h" #include "objects/gameplay_keep/gameplay_keep.h"

View File

@ -4,6 +4,7 @@
* Description: Keaton grass * Description: Keaton grass
*/ */
#include "prevent_bss_reordering.h"
#include "z_en_kusa2.h" #include "z_en_kusa2.h"
#include "objects/gameplay_field_keep/gameplay_field_keep.h" #include "objects/gameplay_field_keep/gameplay_field_keep.h"
#include "objects/gameplay_keep/gameplay_keep.h" #include "objects/gameplay_keep/gameplay_keep.h"

View File

@ -740,7 +740,7 @@ void func_80AEB148(EnLiftNuts* this, PlayState* play) {
if (player->stateFlags3 & PLAYER_STATE3_200) { if (player->stateFlags3 & PLAYER_STATE3_200) {
this->actor.speedXZ = 2.0f; this->actor.speedXZ = 2.0f;
gSaveContext.eventInf[3] |= 0x10; SET_EVENTINF(EVENTINF_34);
Interface_StartTimer(4, 0); Interface_StartTimer(4, 0);
func_80AE9B4C(1, 2); func_80AE9B4C(1, 2);
Actor_PlaySfxAtPos(&this->actor, NA_SE_SY_FOUND); Actor_PlaySfxAtPos(&this->actor, NA_SE_SY_FOUND);
@ -750,7 +750,7 @@ void func_80AEB148(EnLiftNuts* this, PlayState* play) {
void func_80AEB1C8(EnLiftNuts* this) { void func_80AEB1C8(EnLiftNuts* this) {
this->actor.speedXZ = 2.0f; this->actor.speedXZ = 2.0f;
gSaveContext.eventInf[3] |= 0x10; SET_EVENTINF(EVENTINF_34);
Interface_StartTimer(4, 0); Interface_StartTimer(4, 0);
func_80AE9B4C(1, 2); func_80AE9B4C(1, 2);
this->actionFunc = func_80AEB230; this->actionFunc = func_80AEB230;
@ -815,13 +815,13 @@ void func_80AEB428(EnLiftNuts* this, PlayState* play) {
this->textId = 0x27EC; this->textId = 0x27EC;
} }
} else if (this->unk_354 == 30) { } else if (this->unk_354 == 30) {
gSaveContext.eventInf[3] &= (u8)~0x10; CLEAR_EVENTINF(EVENTINF_34);
gSaveContext.respawn[RESPAWN_MODE_DOWN].entrance = ENTRANCE(DEKU_SCRUB_PLAYGROUND, 1); gSaveContext.respawn[RESPAWN_MODE_DOWN].entrance = ENTRANCE(DEKU_SCRUB_PLAYGROUND, 1);
gSaveContext.nextCutsceneIndex = 0; gSaveContext.nextCutsceneIndex = 0;
func_80169EFC(&play->state); func_80169EFC(&play->state);
gSaveContext.respawnFlag = -2; gSaveContext.respawnFlag = -2;
play->transitionType = TRANS_TYPE_64; play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_02; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
} }
this->unk_354++; this->unk_354++;
} }

View File

@ -666,7 +666,7 @@ void EnMa4_BeginHorsebackGame(EnMa4* this, PlayState* play) {
gSaveContext.nextCutsceneIndex = 0xFFF0; gSaveContext.nextCutsceneIndex = 0xFFF0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_80; play->transitionType = TRANS_TYPE_80;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
} }
void EnMa4_HorsebackGameCheckPlayerInteractions(EnMa4* this, PlayState* play) { void EnMa4_HorsebackGameCheckPlayerInteractions(EnMa4* this, PlayState* play) {
@ -760,10 +760,10 @@ void EnMa4_HorsebackGameEnd(EnMa4* this, PlayState* play) {
if (this->poppedBalloonCounter == 10) { if (this->poppedBalloonCounter == 10) {
play->transitionType = TRANS_TYPE_80; play->transitionType = TRANS_TYPE_80;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
} else { } else {
play->transitionType = TRANS_TYPE_64; play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_02; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
} }
this->poppedBalloonCounter = 0; this->poppedBalloonCounter = 0;
@ -863,7 +863,7 @@ void EnMa4_BeginDescribeThemCs(EnMa4* this, PlayState* play) {
gSaveContext.nextCutsceneIndex = 0xFFF5; gSaveContext.nextCutsceneIndex = 0xFFF5;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_64; play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_02; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
} }
void EnMa4_StartDialogue(EnMa4* this, PlayState* play) { void EnMa4_StartDialogue(EnMa4* this, PlayState* play) {

View File

@ -1091,7 +1091,7 @@ void EnMaYto_PostMilkRunEnd(EnMaYto* this, PlayState* play) {
gSaveContext.nextCutsceneIndex = 0; gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_80; play->transitionType = TRANS_TYPE_80;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
} }
void EnMaYto_DefaultStartDialogue(EnMaYto* this, PlayState* play) { void EnMaYto_DefaultStartDialogue(EnMaYto* this, PlayState* play) {

View File

@ -390,7 +390,7 @@ void EnMag_Update(Actor* thisx, PlayState* play) {
play_sound(NA_SE_SY_PIECE_OF_HEART); play_sound(NA_SE_SY_PIECE_OF_HEART);
gSaveContext.gameMode = 2; // Go to FileChoose gSaveContext.gameMode = 2; // Go to FileChoose
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_02; play->transitionType = TRANS_TYPE_FADE_BLACK;
play->nextEntrance = ENTRANCE(CUTSCENE, 0); play->nextEntrance = ENTRANCE(CUTSCENE, 0);
gSaveContext.save.cutscene = 0; gSaveContext.save.cutscene = 0;
gSaveContext.sceneLayer = 0; gSaveContext.sceneLayer = 0;

View File

@ -398,10 +398,10 @@ void EnMttag_RaceFinish(EnMttag* this, PlayState* play) {
if (DECR(this->timer) == 0) { if (DECR(this->timer) == 0) {
if (CHECK_EVENTINF(EVENTINF_11)) { if (CHECK_EVENTINF(EVENTINF_11)) {
// Player won // Player won
EnMttag_ExitRace(play, TRANS_TYPE_03, TRANS_TYPE_03); EnMttag_ExitRace(play, TRANS_TYPE_FADE_WHITE, TRANS_TYPE_FADE_WHITE);
} else { } else {
// A non-player Goron won // A non-player Goron won
EnMttag_ExitRace(play, TRANS_TYPE_02, TRANS_TYPE_02); EnMttag_ExitRace(play, TRANS_TYPE_FADE_BLACK, TRANS_TYPE_FADE_BLACK);
} }
Actor_Kill(&this->actor); Actor_Kill(&this->actor);
@ -429,8 +429,8 @@ void EnMttag_PotentiallyRestartRace(EnMttag* this, PlayState* play) {
} }
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_02; play->transitionType = TRANS_TYPE_FADE_BLACK;
gSaveContext.nextTransitionType = TRANS_TYPE_02; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
func_801477B4(play); func_801477B4(play);
func_800B7298(play, &this->actor, PLAYER_CSMODE_7); func_800B7298(play, &this->actor, PLAYER_CSMODE_7);
Magic_Add(play, MAGIC_FILL_TO_CAPACITY); Magic_Add(play, MAGIC_FILL_TO_CAPACITY);
@ -441,7 +441,7 @@ void EnMttag_PotentiallyRestartRace(EnMttag* this, PlayState* play) {
CLEAR_EVENTINF(EVENTINF_13); CLEAR_EVENTINF(EVENTINF_13);
gSaveContext.eventInf[2] = ((gSaveContext.eventInf[2] & 0xF) + 1) | (gSaveContext.eventInf[2] & 0xF0); gSaveContext.eventInf[2] = ((gSaveContext.eventInf[2] & 0xF) + 1) | (gSaveContext.eventInf[2] & 0xF0);
} else { } else {
EnMttag_ExitRace(play, TRANS_TYPE_02, TRANS_TYPE_02); EnMttag_ExitRace(play, TRANS_TYPE_FADE_BLACK, TRANS_TYPE_FADE_BLACK);
} }
Actor_Kill(&this->actor); Actor_Kill(&this->actor);
} }
@ -457,7 +457,7 @@ void EnMttag_HandleCantWinChoice(EnMttag* this, PlayState* play) {
// Exit the race // Exit the race
func_8019F230(); func_8019F230();
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_OFF; gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_OFF;
EnMttag_ExitRace(play, TRANS_TYPE_02, TRANS_TYPE_02); EnMttag_ExitRace(play, TRANS_TYPE_FADE_BLACK, TRANS_TYPE_FADE_BLACK);
CLEAR_EVENTINF(EVENTINF_13); CLEAR_EVENTINF(EVENTINF_13);
SET_EVENTINF(EVENTINF_12); SET_EVENTINF(EVENTINF_12);
Actor_Kill(&this->actor); Actor_Kill(&this->actor);

View File

@ -335,7 +335,7 @@ s32 func_80BC01DC(Actor* thisx, PlayState* play) {
R_PLAY_FILL_SCREEN_ALPHA = (s16)(s32)(255.0f - (((f32)ABS_ALT(20 - this->storyTimer) / 20.0f) * 255.0f)); R_PLAY_FILL_SCREEN_ALPHA = (s16)(s32)(255.0f - (((f32)ABS_ALT(20 - this->storyTimer) / 20.0f) * 255.0f));
if (this->storyTimer == 20) { if (this->storyTimer == 20) {
if (gSaveContext.eventInf[4] & 4) { if (CHECK_EVENTINF(EVENTINF_42)) {
// play->interfaceCtx.storyType = STORY_TYPE_MASK_FESTIVAL; // play->interfaceCtx.storyType = STORY_TYPE_MASK_FESTIVAL;
play->interfaceCtx.storyType = 0; play->interfaceCtx.storyType = 0;
} else { } else {
@ -365,7 +365,7 @@ s32 func_80BC01DC(Actor* thisx, PlayState* play) {
this->behaviour++; this->behaviour++;
// fallthrough // fallthrough
case ENNB_BEHAVIOUR_5: case ENNB_BEHAVIOUR_5:
if (!(gSaveContext.eventInf[4] & 4)) { if (!CHECK_EVENTINF(EVENTINF_42)) {
gSaveContext.save.time = CLOCK_TIME(8, 0); gSaveContext.save.time = CLOCK_TIME(8, 0);
Sram_IncrementDay(); Sram_IncrementDay();
} else { } else {
@ -376,9 +376,9 @@ s32 func_80BC01DC(Actor* thisx, PlayState* play) {
play->nextEntrance = ENTRANCE(STOCK_POT_INN, 2); play->nextEntrance = ENTRANCE(STOCK_POT_INN, 2);
gSaveContext.nextCutsceneIndex = 0; gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_02; play->transitionType = TRANS_TYPE_FADE_BLACK;
gSaveContext.nextTransitionType = TRANS_TYPE_06; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK_SLOW;
gSaveContext.eventInf[4] |= 8; SET_EVENTINF(EVENTINF_43);
break; break;
} }
@ -386,7 +386,7 @@ s32 func_80BC01DC(Actor* thisx, PlayState* play) {
} }
u8* func_80BC045C(EnNb* this, PlayState* play) { u8* func_80BC045C(EnNb* this, PlayState* play) {
if (gSaveContext.eventInf[4] & 8) { if (CHECK_EVENTINF(EVENTINF_43)) {
this->msgEventCallback = func_80BC01DC; this->msgEventCallback = func_80BC01DC;
return D_80BC1464; return D_80BC1464;
} else if (this->scheduleResult == EN_NB_SCH_2) { } else if (this->scheduleResult == EN_NB_SCH_2) {
@ -586,7 +586,7 @@ s32 func_80BC0B98(EnNb* this, PlayState* play, ScheduleOutput* scheduleOutput) {
} }
s32 func_80BC0C0C(EnNb* this, PlayState* play, ScheduleOutput* scheduleOutput) { s32 func_80BC0C0C(EnNb* this, PlayState* play, ScheduleOutput* scheduleOutput) {
if (!(gSaveContext.eventInf[4] & 8)) { if (!CHECK_EVENTINF(EVENTINF_43)) {
SubS_UpdateFlags(&this->stateFlags, EN_NB_FLAG_1 | EN_NB_FLAG_2, EN_NB_FLAG_1 | EN_NB_FLAG_2 | EN_NB_FLAG_4); SubS_UpdateFlags(&this->stateFlags, EN_NB_FLAG_1 | EN_NB_FLAG_2, EN_NB_FLAG_1 | EN_NB_FLAG_2 | EN_NB_FLAG_4);
} else { } else {
SubS_UpdateFlags(&this->stateFlags, EN_NB_FLAG_4, EN_NB_FLAG_1 | EN_NB_FLAG_2 | EN_NB_FLAG_4); SubS_UpdateFlags(&this->stateFlags, EN_NB_FLAG_4, EN_NB_FLAG_1 | EN_NB_FLAG_2 | EN_NB_FLAG_4);
@ -640,7 +640,7 @@ void EnNb_FollowSchedule(EnNb* this, PlayState* play) {
this->timePathTimeSpeed = R_TIME_SPEED + ((void)0, gSaveContext.save.timeSpeedOffset); this->timePathTimeSpeed = R_TIME_SPEED + ((void)0, gSaveContext.save.timeSpeedOffset);
if (gSaveContext.eventInf[4] & 8) { if (CHECK_EVENTINF(EVENTINF_43)) {
scheduleOutput.result = EN_NB_SCH_1; scheduleOutput.result = EN_NB_SCH_1;
EnNb_ProcessScheduleOutput(this, play, &scheduleOutput); EnNb_ProcessScheduleOutput(this, play, &scheduleOutput);
this->actor.shape.shadowDraw = ActorShadow_DrawCircle; this->actor.shape.shadowDraw = ActorShadow_DrawCircle;
@ -663,9 +663,9 @@ void EnNb_FollowSchedule(EnNb* this, PlayState* play) {
void func_80BC0EAC(EnNb* this, PlayState* play) { void func_80BC0EAC(EnNb* this, PlayState* play) {
if (func_8010BF58(&this->actor, play, this->msgEventScript, this->msgEventCallback, &this->msgEventArg4)) { if (func_8010BF58(&this->actor, play, this->msgEventScript, this->msgEventCallback, &this->msgEventArg4)) {
if (gSaveContext.eventInf[4] & 8) { if (CHECK_EVENTINF(EVENTINF_43)) {
gSaveContext.eventInf[4] &= (u8)~4; CLEAR_EVENTINF(EVENTINF_42);
gSaveContext.eventInf[4] &= (u8)~8; CLEAR_EVENTINF(EVENTINF_43);
} }
SubS_UpdateFlags(&this->stateFlags, EN_NB_FLAG_1 | EN_NB_FLAG_2, EN_NB_FLAG_1 | EN_NB_FLAG_2 | EN_NB_FLAG_4); SubS_UpdateFlags(&this->stateFlags, EN_NB_FLAG_1 | EN_NB_FLAG_2, EN_NB_FLAG_1 | EN_NB_FLAG_2 | EN_NB_FLAG_4);
@ -695,11 +695,11 @@ void EnNb_Init(Actor* thisx, PlayState* play) {
Actor_SetScale(&this->actor, 0.01f); Actor_SetScale(&this->actor, 0.01f);
this->stateFlags = EN_NB_FLAG_NONE; this->stateFlags = EN_NB_FLAG_NONE;
if (gSaveContext.eventInf[4] & 8) { if (CHECK_EVENTINF(EVENTINF_43)) {
SubS_UpdateFlags(&this->stateFlags, EN_NB_FLAG_4, EN_NB_FLAG_1 | EN_NB_FLAG_2 | EN_NB_FLAG_4); SubS_UpdateFlags(&this->stateFlags, EN_NB_FLAG_4, EN_NB_FLAG_1 | EN_NB_FLAG_2 | EN_NB_FLAG_4);
} else { } else {
gSaveContext.eventInf[4] &= (u8)~4; CLEAR_EVENTINF(EVENTINF_42);
gSaveContext.eventInf[4] &= (u8)~8; CLEAR_EVENTINF(EVENTINF_43);
} }
this->actionFunc = EnNb_FollowSchedule; this->actionFunc = EnNb_FollowSchedule;

View File

@ -1137,7 +1137,7 @@ void func_80B5E1D8(PlayState* play, EnOtUnkStruct* arg1, s32 arg2) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP); POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP);
for (i = 0; i < arg2; i++, arg1++) { for (i = 0; i < arg2; i++, arg1++) {

View File

@ -691,7 +691,7 @@ void func_80BD9C70(EnPamera* this, PlayState* play) {
play->nextEntrance = ENTRANCE(IKANA_CANYON, 2); play->nextEntrance = ENTRANCE(IKANA_CANYON, 2);
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_70; play->transitionType = TRANS_TYPE_70;
gSaveContext.nextTransitionType = TRANS_TYPE_02; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
} }
s32 func_80BD9CB8(EnPamera* this, PlayState* play) { s32 func_80BD9CB8(EnPamera* this, PlayState* play) {

View File

@ -227,8 +227,8 @@ s32 func_80AE65F4(EnShn* this, PlayState* play) {
s32 func_80AE6704(Actor* thisx, PlayState* play) { s32 func_80AE6704(Actor* thisx, PlayState* play) {
static s32 sPictographFlags[] = { static s32 sPictographFlags[] = {
PICTOGRAPH_0, PICTOGRAPH_MONKEY, PICTOGRAPH_BIG_OCTO, PICTO_VALID_0, PICTO_VALID_MONKEY, PICTO_VALID_BIG_OCTO,
PICTOGRAPH_TINGLE, PICTOGRAPH_DEKU_KING, PICTOGRAPH_IN_SWAMP, PICTO_VALID_TINGLE, PICTO_VALID_DEKU_KING, PICTO_VALID_IN_SWAMP,
}; };
EnShn* this = THIS; EnShn* this = THIS;
s32 ret = 0; s32 ret = 0;
@ -263,8 +263,8 @@ s32 func_80AE6704(Actor* thisx, PlayState* play) {
play->nextEntrance = ENTRANCE(SOUTHERN_SWAMP_POISONED, 6); play->nextEntrance = ENTRANCE(SOUTHERN_SWAMP_POISONED, 6);
gSaveContext.nextCutsceneIndex = 0; gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextTransitionType = TRANS_TYPE_07; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE_SLOW;
this->unk_2C6++; this->unk_2C6++;
break; break;
} }

View File

@ -595,7 +595,7 @@ s32 EnSsh_SetCylinderOC(EnSsh* this, PlayState* play) {
Matrix_Push(); Matrix_Push();
Matrix_Translate(colliderPos.x, colliderPos.y, colliderPos.z, MTXMODE_NEW); Matrix_Translate(colliderPos.x, colliderPos.y, colliderPos.z, MTXMODE_NEW);
Matrix_RotateYF(BINANG_TO_RAD(this->initialYaw), MTXMODE_APPLY); Matrix_RotateYF(BINANG_TO_RAD_ALT(this->initialYaw), MTXMODE_APPLY);
Matrix_MultVec3f(&colliderOffsets[i], &colliderPos); Matrix_MultVec3f(&colliderOffsets[i], &colliderPos);
Matrix_Pop(); Matrix_Pop();

View File

@ -277,7 +277,7 @@ void func_808D90F0(EnSw* this, s32 arg1, s16 arg2) {
temp = arg2; temp = arg2;
} }
Matrix_RotateAxisF(BINANG_TO_RAD(temp), &this->unk_368, MTXMODE_NEW); Matrix_RotateAxisF(BINANG_TO_RAD_ALT(temp), &this->unk_368, MTXMODE_NEW);
Matrix_MultVec3f(&this->unk_350, &sp2C); Matrix_MultVec3f(&this->unk_350, &sp2C);
Math_Vec3f_Copy(&this->unk_350, &sp2C); Math_Vec3f_Copy(&this->unk_350, &sp2C);
Math3D_CrossProduct(&this->unk_368, &this->unk_350, &this->unk_35C); Math3D_CrossProduct(&this->unk_368, &this->unk_350, &this->unk_35C);

View File

@ -458,7 +458,7 @@ void EnTanron3_Draw(Actor* thisx, PlayState* play) {
} }
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnTanron3_OverrideLimbDraw, NULL, &this->actor); EnTanron3_OverrideLimbDraw, NULL, &this->actor);
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
CLOSE_DISPS(play->state.gfxCtx); CLOSE_DISPS(play->state.gfxCtx);
} }

View File

@ -1294,7 +1294,7 @@ void EnTest3_Draw(Actor* thisx, PlayState* play2) {
this->player.skelAnime.dListCount, EnTest3_OverrideLimbDraw, EnTest3_PostLimbDraw, this->player.skelAnime.dListCount, EnTest3_OverrideLimbDraw, EnTest3_PostLimbDraw,
&this->player.actor, 0); &this->player.actor, 0);
if (this->player.invincibilityTimer > 0) { if (this->player.invincibilityTimer > 0) {
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
} }
if ((this->player.getItemDrawId - 1) != GID_NONE) { if ((this->player.getItemDrawId - 1) != GID_NONE) {
Player_DrawGetItem(play, &this->player); Player_DrawGetItem(play, &this->player);

View File

@ -283,7 +283,7 @@ void func_80A425E4(EnTest4* this, PlayState* play) {
gSaveContext.screenScale = 1000.0f; gSaveContext.screenScale = 1000.0f;
} }
if (gSaveContext.screenScale != 1000.0f) { if (gSaveContext.screenScale != 1000.0f) {
gSaveContext.screenScaleFlag = 1; gSaveContext.screenScaleFlag = true;
} }
} }
} }
@ -310,7 +310,7 @@ void EnTest4_Init(Actor* thisx, PlayState* play) {
} else { } else {
sIsLoaded = true; sIsLoaded = true;
this->actor.room = -1; this->actor.room = -1;
gSaveContext.screenScaleFlag = 0; gSaveContext.screenScaleFlag = false;
gSaveContext.screenScale = 1000.0f; gSaveContext.screenScale = 1000.0f;
if (CURRENT_DAY == 0) { if (CURRENT_DAY == 0) {
if (gSaveContext.save.time < CLOCK_TIME(6, 1)) { if (gSaveContext.save.time < CLOCK_TIME(6, 1)) {
@ -355,7 +355,7 @@ void EnTest4_Init(Actor* thisx, PlayState* play) {
this->lastBellTime = gSaveContext.save.time; this->lastBellTime = gSaveContext.save.time;
if ((sCutscenes[this->unk_144] < 0) || (play->actorCtx.flags & ACTORCTX_FLAG_1)) { if ((sCutscenes[this->unk_144] < 0) || (play->actorCtx.flags & ACTORCTX_FLAG_1)) {
gSaveContext.screenScaleFlag = 0; gSaveContext.screenScaleFlag = false;
gSaveContext.screenScale = 1000.0f; gSaveContext.screenScale = 1000.0f;
} }
} }
@ -456,7 +456,7 @@ void func_80A42AB8(EnTest4* this, PlayState* play) {
} }
gSaveContext.nextCutsceneIndex = 0xFFF1; gSaveContext.nextCutsceneIndex = 0xFFF1;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_02; play->transitionType = TRANS_TYPE_FADE_BLACK;
player->stateFlags1 |= PLAYER_STATE1_200; player->stateFlags1 |= PLAYER_STATE1_200;
Actor_Kill(&this->actor); Actor_Kill(&this->actor);
} }

View File

@ -183,16 +183,16 @@ void func_80A90730(EnTest6* this, PlayState* play) {
} }
} }
void func_80A90C08(s16 arg0) { void EnTest6_EnableMotionBlur(s16 alpha) {
func_8016566C(arg0); Play_EnableMotionBlur(alpha);
} }
void func_80A90C34(void) { void EnTest6_DisableMotionBlur(void) {
func_80165690(); Play_DisableMotionBlur();
} }
void func_80A90C54(PlayState* play, f32 arg1) { void func_80A90C54(PlayState* play, f32 arg1) {
play->envCtx.fillScreen = 1; play->envCtx.fillScreen = true;
play->envCtx.screenFillColor[0] = 250; play->envCtx.screenFillColor[0] = 250;
play->envCtx.screenFillColor[1] = 250; play->envCtx.screenFillColor[1] = 250;
play->envCtx.screenFillColor[2] = 250; play->envCtx.screenFillColor[2] = 250;
@ -200,7 +200,7 @@ void func_80A90C54(PlayState* play, f32 arg1) {
} }
void func_80A90D20(PlayState* play) { void func_80A90D20(PlayState* play) {
play->envCtx.fillScreen = 0; play->envCtx.fillScreen = false;
} }
void func_80A90D34(EnTest6* this, PlayState* play, EnTest6Struct* ptr) { void func_80A90D34(EnTest6* this, PlayState* play, EnTest6Struct* ptr) {
@ -211,7 +211,7 @@ void func_80A90D34(EnTest6* this, PlayState* play, EnTest6Struct* ptr) {
if (ptr->unk_00 != 0) { if (ptr->unk_00 != 0) {
Matrix_Translate(ptr->unk_08 * ptr->unk_04, ptr->unk_0C, ptr->unk_10 * ptr->unk_04, MTXMODE_NEW); Matrix_Translate(ptr->unk_08 * ptr->unk_04, ptr->unk_0C, ptr->unk_10 * ptr->unk_04, MTXMODE_NEW);
Matrix_Scale(ptr->unk_04 * 0.02f, ptr->unk_04 * 0.02f, ptr->unk_04 * 0.02f, MTXMODE_APPLY); Matrix_Scale(ptr->unk_04 * 0.02f, ptr->unk_04 * 0.02f, ptr->unk_04 * 0.02f, MTXMODE_APPLY);
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP); POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP);
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_80A9402C[ptr->unk_00])); gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_80A9402C[ptr->unk_00]));
@ -338,8 +338,8 @@ void EnTest6_Destroy(Actor* thisx, PlayState* play2) {
play->envCtx.lightSettings.fogColor[1] = 0; play->envCtx.lightSettings.fogColor[1] = 0;
play->envCtx.lightSettings.fogColor[2] = 0; play->envCtx.lightSettings.fogColor[2] = 0;
play->envCtx.lightSettings.fogNear = 0; play->envCtx.lightSettings.fogNear = 0;
play->envCtx.lightSettings.fogFar = 0; play->envCtx.lightSettings.zFar = 0;
play->envCtx.fillScreen = 0; play->envCtx.fillScreen = false;
for (i = 0; i < ARRAY_COUNT(this->lights); i++) { for (i = 0; i < ARRAY_COUNT(this->lights); i++) {
LightContext_RemoveLight(play, &play->lightCtx, this->lights[i].node); LightContext_RemoveLight(play, &play->lightCtx, this->lights[i].node);
@ -393,10 +393,10 @@ void func_80A916F0(EnTest6* this, PlayState* play) {
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
player->actor.freezeTimer = 0; player->actor.freezeTimer = 0;
play->unk_18844 = 0; play->unk_18844 = false;
ActorCutscene_Stop(play->playerActorCsIds[8]); ActorCutscene_Stop(play->playerActorCsIds[8]);
func_800B7298(play, NULL, PLAYER_CSMODE_6); func_800B7298(play, NULL, PLAYER_CSMODE_6);
func_80A90C34(); EnTest6_DisableMotionBlur();
Distortion_ClearType(DISTORTION_TYPE_5); Distortion_ClearType(DISTORTION_TYPE_5);
Actor_Kill(&this->actor); Actor_Kill(&this->actor);
} }
@ -462,10 +462,10 @@ void func_80A91760(EnTest6* this, PlayState* play) {
((subCam->at.z - subCam->eye.z) * 0.2f); ((subCam->at.z - subCam->eye.z) * 0.2f);
} }
} }
func_80A90C08(0x78); EnTest6_EnableMotionBlur(120);
Distortion_SetType(DISTORTION_TYPE_5); Distortion_SetType(DISTORTION_TYPE_5);
Distortion_SetCountdown(80); Distortion_SetCountdown(80);
play->unk_18844 = 1; play->unk_18844 = true;
this->unk_274 = 95; this->unk_274 = 95;
} }
break; break;
@ -517,9 +517,9 @@ void func_80A91760(EnTest6* this, PlayState* play) {
if (this->unk_27A == 10) { if (this->unk_27A == 10) {
this->unk_14C = 0.1f; this->unk_14C = 0.1f;
func_80A90C34(); EnTest6_DisableMotionBlur();
Distortion_ClearType(DISTORTION_TYPE_5); Distortion_ClearType(DISTORTION_TYPE_5);
play->unk_18844 = 0; play->unk_18844 = false;
if (this->unk_254 != NULL) { if (this->unk_254 != NULL) {
ZeldaArena_Free(this->unk_254); ZeldaArena_Free(this->unk_254);
} }
@ -614,10 +614,10 @@ void func_80A92118(EnTest6* this, PlayState* play) {
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
player->actor.freezeTimer = 0; player->actor.freezeTimer = 0;
play->unk_18844 = 0; play->unk_18844 = false;
ActorCutscene_Stop(play->playerActorCsIds[8]); ActorCutscene_Stop(play->playerActorCsIds[8]);
func_800B7298(play, NULL, PLAYER_CSMODE_6); func_800B7298(play, NULL, PLAYER_CSMODE_6);
func_80A90C34(); EnTest6_DisableMotionBlur();
Distortion_ClearType(DISTORTION_TYPE_5); Distortion_ClearType(DISTORTION_TYPE_5);
Actor_Kill(&this->actor); Actor_Kill(&this->actor);
} }
@ -657,7 +657,7 @@ void func_80A92188(EnTest6* this, PlayState* play) {
func_800FD5E0(play, &D_80A94070, 1.0f); func_800FD5E0(play, &D_80A94070, 1.0f);
func_800FD654(play, &D_80A94068, 1.0f); func_800FD654(play, &D_80A94068, 1.0f);
func_800FD698(play, D_80A94074, D_80A94078, 1.0f); func_800FD698(play, D_80A94074, D_80A94078, 1.0f);
play->unk_18844 = 1; play->unk_18844 = true;
} }
if (this->unk_27A == 15) { if (this->unk_27A == 15) {
@ -665,7 +665,7 @@ void func_80A92188(EnTest6* this, PlayState* play) {
func_800FD5E0(play, &D_80A94070, 0.0f); func_800FD5E0(play, &D_80A94070, 0.0f);
func_800FD654(play, &D_80A94068, 0.0f); func_800FD654(play, &D_80A94068, 0.0f);
func_800FD698(play, D_80A94074, D_80A94078, 0.0f); func_800FD698(play, D_80A94074, D_80A94078, 0.0f);
play->unk_18844 = 0; play->unk_18844 = false;
} }
if (this->unk_286 >= 20) { if (this->unk_286 >= 20) {
@ -673,18 +673,18 @@ void func_80A92188(EnTest6* this, PlayState* play) {
func_800FD5E0(play, &D_80A94070, this->unk_160); func_800FD5E0(play, &D_80A94070, this->unk_160);
func_800FD654(play, &D_80A94068, this->unk_160); func_800FD654(play, &D_80A94068, this->unk_160);
func_800FD698(play, D_80A94074, D_80A94078, this->unk_160); func_800FD698(play, D_80A94074, D_80A94078, this->unk_160);
play->unk_18844 = 0; play->unk_18844 = false;
} }
func_800B8F98(&player->actor, NA_SE_PL_FLYING_AIR - SFX_FLAG); func_800B8F98(&player->actor, NA_SE_PL_FLYING_AIR - SFX_FLAG);
switch (this->unk_27A) { switch (this->unk_27A) {
case 119: case 119:
func_80A90C08(0x32); EnTest6_EnableMotionBlur(50);
break; break;
case 115: case 115:
func_80A90C08(0x14); EnTest6_EnableMotionBlur(20);
Distortion_SetType(DISTORTION_TYPE_5); Distortion_SetType(DISTORTION_TYPE_5);
Distortion_SetCountdown(90); Distortion_SetCountdown(90);
this->unk_274 = 2; this->unk_274 = 2;
@ -704,24 +704,24 @@ void func_80A92188(EnTest6* this, PlayState* play) {
break; break;
case 61: case 61:
func_80A90C08(0x96); EnTest6_EnableMotionBlur(150);
this->unk_274 = 4; this->unk_274 = 4;
break; break;
case 51: case 51:
func_80A90C08(0xB4); EnTest6_EnableMotionBlur(180);
this->unk_274 = 5; this->unk_274 = 5;
break; break;
case 14: case 14:
case 15: case 15:
func_80A90C08(0x32); EnTest6_EnableMotionBlur(50);
Distortion_ClearType(DISTORTION_TYPE_5); Distortion_ClearType(DISTORTION_TYPE_5);
this->unk_274 = 0; this->unk_274 = 0;
break; break;
case 1: case 1:
func_80A90C34(); EnTest6_DisableMotionBlur();
if (CHECK_EVENTINF(EVENTINF_52)) { if (CHECK_EVENTINF(EVENTINF_52)) {
this->unk_274 = 9; this->unk_274 = 9;
} }
@ -976,7 +976,7 @@ void func_80A92950(EnTest6* this, PlayState* play) {
this->unk_276 = 99; this->unk_276 = 99;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->nextEntrance = gSaveContext.respawn[RESPAWN_MODE_RETURN].entrance; play->nextEntrance = gSaveContext.respawn[RESPAWN_MODE_RETURN].entrance;
play->transitionType = TRANS_TYPE_02; play->transitionType = TRANS_TYPE_FADE_BLACK;
if ((gSaveContext.save.time > CLOCK_TIME(18, 0)) || (gSaveContext.save.time < CLOCK_TIME(6, 0))) { if ((gSaveContext.save.time > CLOCK_TIME(18, 0)) || (gSaveContext.save.time < CLOCK_TIME(6, 0))) {
gSaveContext.respawnFlag = -0x63; gSaveContext.respawnFlag = -0x63;
SET_EVENTINF(EVENTINF_27); SET_EVENTINF(EVENTINF_27);
@ -1058,7 +1058,7 @@ void func_80A92950(EnTest6* this, PlayState* play) {
this->unk_276 = 99; this->unk_276 = 99;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->nextEntrance = gSaveContext.respawn[RESPAWN_MODE_RETURN].entrance; play->nextEntrance = gSaveContext.respawn[RESPAWN_MODE_RETURN].entrance;
play->transitionType = TRANS_TYPE_02; play->transitionType = TRANS_TYPE_FADE_BLACK;
gSaveContext.respawnFlag = 2; gSaveContext.respawnFlag = 2;
play->msgCtx.ocarinaMode = 4; play->msgCtx.ocarinaMode = 4;
} }

View File

@ -438,7 +438,7 @@ void func_80AF19A8(EnTest7* this, PlayState* play) {
} else { } else {
ActorCutscene_Start(play->playerActorCsIds[8], NULL); ActorCutscene_Start(play->playerActorCsIds[8], NULL);
func_80AF082C(this, func_80AF1A2C); func_80AF082C(this, func_80AF1A2C);
play->unk_18844 = 1; play->unk_18844 = true;
} }
} }
@ -461,7 +461,7 @@ void func_80AF1A2C(EnTest7* this, PlayState* play) {
func_80AF082C(this, func_80AF1CA0); func_80AF082C(this, func_80AF1CA0);
this->unk_144 |= 0x20; this->unk_144 |= 0x20;
Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_PL_WARP_WING_OPEN); Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_PL_WARP_WING_OPEN);
func_8016566C(0x78); Play_EnableMotionBlur(120);
} }
} }
@ -599,10 +599,10 @@ void func_80AF2030(EnTest7* this, PlayState* play) {
R_PLAY_FILL_SCREEN_G = 255; R_PLAY_FILL_SCREEN_G = 255;
R_PLAY_FILL_SCREEN_B = 255; R_PLAY_FILL_SCREEN_B = 255;
R_PLAY_FILL_SCREEN_ALPHA = 255; R_PLAY_FILL_SCREEN_ALPHA = 255;
play->unk_18844 = 0; play->unk_18844 = false;
this->unk_144 &= ~4; this->unk_144 &= ~4;
func_80AF082C(this, func_80AF21E8); func_80AF082C(this, func_80AF21E8);
func_80165690(); Play_DisableMotionBlur();
} }
} }
@ -676,7 +676,7 @@ void func_80AF2350(EnTest7* this, PlayState* play) {
} }
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_02; play->transitionType = TRANS_TYPE_FADE_BLACK;
gSaveContext.seqId = (u8)NA_BGM_DISABLED; gSaveContext.seqId = (u8)NA_BGM_DISABLED;
gSaveContext.ambienceId = AMBIENCE_ID_DISABLED; gSaveContext.ambienceId = AMBIENCE_ID_DISABLED;
} }

View File

@ -259,7 +259,7 @@ void EnTg_DrawHearts(PlayState* play, EnTgHeartEffect* effect, s32 numEffects) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP); POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP);
for (i = 0; i < numEffects; i++, effect++) { for (i = 0; i < numEffects; i++, effect++) {

View File

@ -394,8 +394,8 @@ void func_80B76BB8(EnTruMt* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_5) { if (Message_GetState(&play->msgCtx) == TEXT_STATE_5) {
if (Message_ShouldAdvance(play)) { if (Message_ShouldAdvance(play)) {
play->nextEntrance = ENTRANCE(TOURIST_INFORMATION, 1); play->nextEntrance = ENTRANCE(TOURIST_INFORMATION, 1);
play->transitionType = TRANS_TYPE_03; play->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;
} }
} }

View File

@ -326,12 +326,12 @@ void func_80AE04FC(EnTsn* this, PlayState* play) {
this->actionFunc = func_80AE0704; this->actionFunc = func_80AE0704;
if (itemAction == PLAYER_IA_PICTO_BOX) { if (itemAction == PLAYER_IA_PICTO_BOX) {
if (CHECK_QUEST_ITEM(QUEST_PICTOGRAPH)) { if (CHECK_QUEST_ITEM(QUEST_PICTOGRAPH)) {
if (Snap_CheckFlag(PICTOGRAPH_PIRATE_GOOD)) { if (Snap_CheckFlag(PICTO_VALID_PIRATE_GOOD)) {
player->actor.textId = 0x107B; player->actor.textId = 0x107B;
return; return;
} }
if (Snap_CheckFlag(PICTOGRAPH_PIRATE_TOO_FAR)) { if (Snap_CheckFlag(PICTO_VALID_PIRATE_TOO_FAR)) {
player->actor.textId = 0x10A9; player->actor.textId = 0x10A9;
return; return;
} }

View File

@ -157,7 +157,7 @@ void EnWarpTag_RespawnPlayer(EnWarptag* this, PlayState* play) {
} else { } else {
ActorCutscene_StartAndSetUnkLinkFields(play->playerActorCsIds[4], &this->dyna.actor); ActorCutscene_StartAndSetUnkLinkFields(play->playerActorCsIds[4], &this->dyna.actor);
func_800B8E58(player, NA_SE_PL_WARP_PLATE); func_800B8E58(player, NA_SE_PL_WARP_PLATE);
func_8016566C(0); Play_EnableMotionBlur(0);
} }
} else { } else {
@ -209,13 +209,13 @@ void EnWarpTag_RespawnPlayer(EnWarptag* this, PlayState* play) {
// why are we getting player home rotation from the room data? doesnt player have home.rot.y? // why are we getting player home rotation from the room data? doesnt player have home.rot.y?
// especially because we are converting from deg to binang, but isnt home.rot.y already in binang?? // especially because we are converting from deg to binang, but isnt home.rot.y already in binang??
Play_SetRespawnData( Play_SetRespawnData(
&play->state, 0, entrance, // parameter 3 is called "sceneSetup" &play->state, 0, entrance, play->setupEntranceList[playerSpawnIndex].room, playerParams,
play->setupEntranceList[playerSpawnIndex].room, playerParams, &newRespawnPos, &newRespawnPos,
((((playerActorEntry->rot.y >> 7) & 0x1FF) / 180.0f) * 32768.0f)); // DEG_TO_BINANG ? ((((playerActorEntry->rot.y >> 7) & 0x1FF) / 180.0f) * 32768.0f)); // DEG_TO_BINANG ?
func_80169EFC(&play->state); func_80169EFC(&play->state);
gSaveContext.respawnFlag = ~0x4; gSaveContext.respawnFlag = -5;
func_80165690(); Play_DisableMotionBlur();
} }
} }
@ -224,7 +224,7 @@ void EnWarpTag_RespawnPlayer(EnWarptag* this, PlayState* play) {
if (new15E < 0) { if (new15E < 0) {
new15E = 0; new15E = 0;
} }
func_80165658(new15E * 0.04f); // unknown Play_ function Play_SetMotionBlurAlpha(new15E * (1 / 25.0f));
} }
} }

View File

@ -570,7 +570,7 @@ void func_80A5A184(Actor* thisx, PlayState* play2) {
} }
} }
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
CLOSE_DISPS(gfxCtx); CLOSE_DISPS(gfxCtx);
} }

View File

@ -769,7 +769,7 @@ void EnZob_Draw(Actor* thisx, PlayState* play) {
func_80BA0F64, func_80BA0FAC, &this->actor); func_80BA0F64, func_80BA0FAC, &this->actor);
if (this->unk_2F4 & 0x20) { if (this->unk_2F4 & 0x20) {
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
} }
CLOSE_DISPS(play->state.gfxCtx); CLOSE_DISPS(play->state.gfxCtx);

Some files were not shown because too many files have changed in this diff Show More