summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDerek Hensley <hensley.derek58@gmail.com>2022-12-23 18:46:56 -0800
committerGitHub <noreply@github.com>2022-12-24 03:46:56 +0100
commit4a9873775cfda32008cc1f66bd26310b3c2afdf3 (patch)
tree5de59688279dcd8625800f1fd1577bd7638cda05 /include
parent1c6878b070b6dcafaff89a843d6e508a09402a1b (diff)
TransitionFade docs and clean up other transitions (#1459)
* TransitionFade docs * PR suggestions * Fix * Fill * Other transitions + enums * Prefix transition assests with trans * Fix end_title * format * OutNames * nitpicks PR * cleaner
Diffstat (limited to 'include')
-rw-r--r--include/functions.h2
-rw-r--r--include/regs.h1
-rw-r--r--include/z64.h2
-rw-r--r--include/z64transition.h19
4 files changed, 16 insertions, 8 deletions
diff --git a/include/functions.h b/include/functions.h
index b466b0a37..37106ba0f 100644
--- a/include/functions.h
+++ b/include/functions.h
@@ -1239,7 +1239,7 @@ void TransitionCircle_Draw(void* thisx, Gfx** gfxP);
s32 TransitionCircle_IsDone(void* thisx);
void TransitionCircle_SetType(void* thisx, s32 type);
void TransitionCircle_SetColor(void* thisx, u32 color);
-void TransitionCircle_SetUnkColor(void* thisx, u32 unkColor);
+void TransitionCircle_SetUnkColor(void* thisx, u32 color);
void TransitionFade_Start(void* thisx);
void* TransitionFade_Init(void* thisx);
void TransitionFade_Destroy(void* thisx);
diff --git a/include/regs.h b/include/regs.h
index 41a3af177..dc8558c4f 100644
--- a/include/regs.h
+++ b/include/regs.h
@@ -154,6 +154,7 @@
#define R_TEXTBOX_TEXHEIGHT_TARGET XREG(77)
#define R_ENV_LIGHT1_DIR(i) cREG(3 + (i))
#define R_ENV_LIGHT2_DIR(i) cREG(6 + (i))
+#define R_TRANS_FADE_FLASH_ALPHA_STEP iREG(50) // Set to a negative number to start the flash
#define R_ROOM_CULL_DEBUG_MODE iREG(86)
#define R_ROOM_CULL_NUM_ENTRIES iREG(87)
#define R_ROOM_CULL_USED_ENTRIES iREG(88)
diff --git a/include/z64.h b/include/z64.h
index d9068377b..d7f97efc1 100644
--- a/include/z64.h
+++ b/include/z64.h
@@ -1176,7 +1176,7 @@ typedef struct PlayState {
/* 0x121C8 */ TransitionContext transitionCtx;
/* 0x12418 */ char unk_12418[0x3];
/* 0x1241B */ u8 transitionMode; // "fbdemo_wipe_modem"
- /* 0x1241C */ TransitionFade transitionFade;
+ /* 0x1241C */ TransitionFade transitionFadeFlash; // Transition fade instance which flashes screen, see R_TRANS_FADE_FLASH_ALPHA_STEP
/* 0x12428 */ char unk_12428[0x3];
/* 0x1242B */ u8 viewpoint; // toggleable camera setting by shops or player. Is also equal to the bgCamIndex + 1
/* 0x1242C */ SceneTableEntry* loadedScene;
diff --git a/include/z64transition.h b/include/z64transition.h
index 17d20d3f4..e49ef1e66 100644
--- a/include/z64transition.h
+++ b/include/z64transition.h
@@ -23,9 +23,14 @@ typedef struct {
/* 0xDC */ u16* zBuffer;
} TransitionUnk; // size = 0xE0
+typedef enum {
+ /* 1 */ TRANS_INSTANCE_TYPE_FILL_OUT = 1,
+ /* 2 */ TRANS_INSTANCE_TYPE_FILL_IN
+} TransitionInstanceType;
+
typedef struct {
/* 0x000 */ Color_RGBA8_u32 color;
- /* 0x004 */ Color_RGBA8_u32 envColor;
+ /* 0x004 */ Color_RGBA8_u32 unkColor;
/* 0x008 */ u8 direction;
/* 0x009 */ u8 frame;
/* 0x00A */ u8 isDone;
@@ -37,12 +42,14 @@ typedef struct {
/* 0x098 */ Mtx modelView[2][3];
} TransitionWipe; // size = 0x218
+#define TRANS_INSTANCE_TYPE_FADE_FLASH 3
+
typedef struct {
- /* 0x000 */ u8 fadeType;
+ /* 0x000 */ u8 type;
/* 0x001 */ u8 isDone;
- /* 0x002 */ u8 fadeDirection;
- /* 0x004 */ Color_RGBA8_u32 fadeColor;
- /* 0x008 */ u16 fadeTimer;
+ /* 0x002 */ u8 direction;
+ /* 0x004 */ Color_RGBA8_u32 color;
+ /* 0x008 */ u16 timer;
} TransitionFade; // size = 0xC
typedef struct {
@@ -69,7 +76,7 @@ typedef struct {
/* 0x004 */ f32 transPos;
/* 0x008 */ f32 step;
/* 0x00C */ s32 state;
- /* 0x010 */ s32 fadeDirection;
+ /* 0x010 */ s32 type;
/* 0x018 */ Mtx projection;
/* 0x058 */ s32 frame;
/* 0x060 */ Mtx modelView[2][3];