mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 14:34:32 +00:00
Document Transition System (#1131)
* transition type enum * mode enum, start documenting some types * some more * use enums for entrance table * entrance table filled out * sceneLoadFlag -> transitionTrigger * sandstorm state/mode/type * done i think * fixes * clean up circle weirdness * circle use enum + fix texture names * fix * how did that even happen lol * jesus * review2 * some more review * most review, still some more to do * new transition trigger names * some of review * next type default
This commit is contained in:
parent
fed9ac3e20
commit
16790bc253
46 changed files with 2477 additions and 1382 deletions
|
@ -1496,7 +1496,7 @@ void KaleidoScopeCall_Draw(GlobalContext* globalCtx);
|
|||
void func_800BC490(GlobalContext* globalCtx, s16 point);
|
||||
s32 func_800BC56C(GlobalContext* globalCtx, s16 arg1);
|
||||
void func_800BC590(GlobalContext* globalCtx);
|
||||
void func_800BC5E0(GlobalContext* globalCtx, s32 transitionType);
|
||||
void Gameplay_SetupTransition(GlobalContext* globalCtx, s32 transitionType);
|
||||
Gfx* Gameplay_SetFog(GlobalContext* globalCtx, Gfx* gfx);
|
||||
void Gameplay_Destroy(GameState* thisx);
|
||||
void Gameplay_Init(GameState* thisx);
|
||||
|
|
|
@ -86,6 +86,8 @@
|
|||
#define R_ITEM_ICON_X(i) ZREG(82 + i)
|
||||
#define R_ITEM_ICON_Y(i) ZREG(86 + i)
|
||||
#define R_ITEM_ICON_DD(i) ZREG(90 + i)
|
||||
#define R_TRANS_DBG_ENABLED CREG(11)
|
||||
#define R_TRANS_DBG_TYPE CREG(12)
|
||||
#define R_ENV_WIND_DIR(i) CREG(16 + i)
|
||||
#define R_ENV_WIND_SPEED CREG(19)
|
||||
#define R_A_BTN_Y XREG(16)
|
||||
|
|
|
@ -1019,6 +1019,82 @@ typedef struct {
|
|||
/* 0x4C */ u32 unk_4C;
|
||||
} PreRender; // size = 0x50
|
||||
|
||||
#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;
|
||||
|
||||
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_WHITE2,
|
||||
/* 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,
|
||||
// transition types 20 - 31 are unused
|
||||
// transition types 32 - 55 are constructed using the TRANS_TYPE_CIRCLE macro
|
||||
/* 56 */ TRANS_TYPE_MAX = 56
|
||||
} TransitionType;
|
||||
|
||||
#define TRANS_NEXT_TYPE_DEFAULT 0xFF // when `nextTransitionType` is set to default, the type will be taken from the entrance table for the ending transition
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ TCA_NORMAL,
|
||||
/* 1 */ TCA_WAVE,
|
||||
/* 2 */ TCA_RIPPLE,
|
||||
/* 3 */ TCA_STARBURST
|
||||
} TransitionCircleAppearance;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ TCC_BLACK,
|
||||
/* 1 */ TCC_WHITE,
|
||||
/* 2 */ TCC_GRAY,
|
||||
/* 3 */ TCC_SPECIAL // color varies depending on appearance. unused and appears broken
|
||||
} TransitionCircleColor;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ TCS_FAST,
|
||||
/* 1 */ TCS_SLOW
|
||||
} TransitionCircleSpeed;
|
||||
|
||||
#define TC_SET_PARAMS (1 << 7)
|
||||
|
||||
#define TRANS_TYPE_CIRCLE(appearance, color, speed) ((1 << 5) | ((color & 3) << 3) | ((appearance & 3) << 1) | (speed & 1))
|
||||
|
||||
typedef struct {
|
||||
union {
|
||||
TransitionFade fade;
|
||||
|
@ -1229,14 +1305,14 @@ typedef struct GlobalContext {
|
|||
/* 0x11E0C */ ElfMessage* cUpElfMsgs;
|
||||
/* 0x11E10 */ void* specialEffects;
|
||||
/* 0x11E14 */ u8 skyboxId;
|
||||
/* 0x11E15 */ s8 sceneLoadFlag; // "fade_direction"
|
||||
/* 0x11E15 */ s8 transitionTrigger; // "fade_direction"
|
||||
/* 0x11E16 */ s16 unk_11E16;
|
||||
/* 0x11E18 */ s16 unk_11E18;
|
||||
/* 0x11E1A */ s16 nextEntranceIndex;
|
||||
/* 0x11E1C */ char unk_11E1C[0x40];
|
||||
/* 0x11E5C */ s8 shootingGalleryStatus;
|
||||
/* 0x11E5D */ s8 bombchuBowlingStatus; // "bombchu_game_flag"
|
||||
/* 0x11E5E */ u8 fadeTransition;
|
||||
/* 0x11E5E */ u8 transitionType;
|
||||
/* 0x11E60 */ CollisionCheckContext colChkCtx;
|
||||
/* 0x120FC */ u16 envFlags[20];
|
||||
/* 0x12124 */ PreRender pauseBgPreRender;
|
||||
|
|
|
@ -30,6 +30,14 @@ typedef enum {
|
|||
/* 13 */ SKYBOX_DMA_PAL2_START
|
||||
} SkyboxDmaState;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ SANDSTORM_OFF,
|
||||
/* 1 */ SANDSTORM_FILL,
|
||||
/* 2 */ SANDSTORM_UNFILL,
|
||||
/* 3 */ SANDSTORM_ACTIVE,
|
||||
/* 4 */ SANDSTORM_DISSIPATE
|
||||
} SandstormState;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 state;
|
||||
/* 0x01 */ u8 flashRed;
|
||||
|
|
|
@ -158,17 +158,17 @@ typedef struct {
|
|||
/* 0x140B */ char unk_140B[0x0001];
|
||||
/* 0x140C */ u8 zTargetSetting; // 0: Switch; 1: Hold
|
||||
/* 0x140E */ u16 forcedSeqId; // immediately start playing the sequence if set
|
||||
/* 0x1410 */ u8 unk_1410; // transition related
|
||||
/* 0x1410 */ u8 cutsceneTransitionControl; // context dependent usage: can either trigger a delayed fade or control fill alpha
|
||||
/* 0x1411 */ char unk_1411[0x0001];
|
||||
/* 0x1412 */ u16 nextCutsceneIndex;
|
||||
/* 0x1414 */ u8 cutsceneTrigger;
|
||||
/* 0x1415 */ u8 chamberCutsceneNum;
|
||||
/* 0x1416 */ u16 nextDayTime; // "next_zelda_time"
|
||||
/* 0x1418 */ u8 fadeDuration;
|
||||
/* 0x1419 */ u8 unk_1419; // transition related
|
||||
/* 0x1418 */ u8 transFadeDuration;
|
||||
/* 0x1419 */ u8 transWipeSpeed;
|
||||
/* 0x141A */ u16 skyboxTime;
|
||||
/* 0x141C */ u8 dogIsLost;
|
||||
/* 0x141D */ u8 nextTransition;
|
||||
/* 0x141D */ u8 nextTransitionType;
|
||||
/* 0x141E */ char unk_141E[0x0002];
|
||||
/* 0x1420 */ s16 worldMapArea;
|
||||
/* 0x1422 */ s16 sunsSongState; // controls the effects of suns song
|
||||
|
|
|
@ -309,6 +309,10 @@ typedef enum {
|
|||
/* 0x6E */ SCENE_ID_MAX
|
||||
} SceneID;
|
||||
|
||||
// this define exists to preserve shiftability for an unused scene that is
|
||||
// listed in the entrance table
|
||||
#define SCENE_UNUSED_6E SCENE_ID_MAX
|
||||
|
||||
#undef DEFINE_SCENE
|
||||
|
||||
// Scene commands
|
||||
|
|
|
@ -50,11 +50,11 @@ typedef struct {
|
|||
/* 0x004 */ Color_RGBA8_u32 envColor;
|
||||
/* 0x008 */ s32 texX;
|
||||
/* 0x00C */ s32 texY;
|
||||
/* 0x010 */ s32 step;
|
||||
/* 0x014 */ u8 unk_14;
|
||||
/* 0x015 */ u8 typeColor;
|
||||
/* 0x016 */ u8 speed;
|
||||
/* 0x017 */ u8 effect;
|
||||
/* 0x010 */ s32 speed;
|
||||
/* 0x014 */ u8 direction;
|
||||
/* 0x015 */ u8 colorType;
|
||||
/* 0x016 */ u8 speedType;
|
||||
/* 0x017 */ u8 appearanceType;
|
||||
/* 0x018 */ u8 isDone;
|
||||
/* 0x019 */ u8 frame;
|
||||
/* 0x01A */ u16 normal;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue