z_demo documentation (#1327)

* commit old stuff

* progress

* progress

* progress

* progress

* more progress, renaming cues next

* small changes

* enum values added for all actions

* hardcoded values removed when possible

* commands renamed

* first pass of action -> cue

* fix some matches

* some more cleanup

* scriptPtr

* forgot one

* remove cue rot union

* more changes

* some more stuff

* more stuff

* fix matching issues

* some more things

* progress, starting to rename destinations

* small changes

* name some destinations

* more names

* need to switch branch

* progress

* first pass of destination names

* usages fixed

* use destination enum

* fix csdis

* format

* command descriptions

* revert accidental zap changes

* forgot some things

* use a single macro for CutsceneCameraPoint (idk why i didnt think of this sooner)

* typo

* review1

* clarify ruby/sapphire comment

* remove endframe for commands that dont use it

* some more review

* most review, but not all

* scriptPtr -> script, and another small change

* ocarina action

* remove +1 from light settings command, change comment

* actionIndex -> cueIdTemp (i guess)

* _SetCueX -> _SetXFromCue

* format

* tweak fade out seq arg names

* use spline terminology

* more dragorn and engineer review

* misc start/end frame note

* cleanup StartPosRotFromCue vs PosRotFromCue

* cleanup spline terminology

* sPrevCamId -> sReturnToCamId

* comment on debug cs data address

* Cutscene_Init -> Cutscene_InitContext

* single point types are not a list

* remove todo comment

* some more review

* rumble struct names

* some review

* more review

* missed one

* reword pointer comment

* even more review

* match transition terminology with z_play

* change condition and format

* frame count

* command specific structs with alignment

* anon review

* remove unneeded arg from time macro

* yeet `CsCmdGeneric`

* remove unused from single point types

* typo

* compromise attempt -- name endFrame everywhere

* fixes

* fix again

* copied the wrong note

* cutscene data note

* review, format

* compat defines

* idk whats going on man

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
fig02
2022-12-24 13:55:17 -05:00
committed by GitHub
parent 92e03cf747
commit 7927e7b330
130 changed files with 6392 additions and 5954 deletions
+11 -11
View File
@@ -770,14 +770,14 @@ DebugDispObject* DebugDisplay_AddObject(f32 posX, f32 posY, f32 posZ, s16 rotX,
f32 scaleY, f32 scaleZ, u8 red, u8 green, u8 blue, u8 alpha, s16 type,
GraphicsContext* gfxCtx);
void DebugDisplay_DrawObjects(PlayState* play);
void func_8006450C(PlayState* play, CutsceneContext* csCtx);
void func_80064520(PlayState* play, CutsceneContext* csCtx);
void func_80064534(PlayState* play, CutsceneContext* csCtx);
void func_80064558(PlayState* play, CutsceneContext* csCtx);
void func_800645A0(PlayState* play, CutsceneContext* csCtx);
void Cutscene_InitContext(PlayState* play, CutsceneContext* csCtx);
void Cutscene_StartManual(PlayState* play, CutsceneContext* csCtx);
void Cutscene_StopManual(PlayState* play, CutsceneContext* csCtx);
void Cutscene_UpdateManual(PlayState* play, CutsceneContext* csCtx);
void Cutscene_UpdateScripted(PlayState* play, CutsceneContext* csCtx);
void Cutscene_HandleEntranceTriggers(PlayState* play);
void Cutscene_HandleConditionalTriggers(PlayState* play);
void Cutscene_SetSegment(PlayState* play, void* segment);
void Cutscene_SetScript(PlayState* play, void* script);
void* MemCpy(void* dest, const void* src, s32 len);
void GetItem_Draw(PlayState* play, s16 drawId);
void SfxSource_InitAll(PlayState* play);
@@ -786,10 +786,10 @@ void SfxSource_PlaySfxAtFixedWorldPos(PlayState* play, Vec3f* worldPos, s32 dura
u16 QuestHint_GetSariaTextId(PlayState* play);
u16 QuestHint_GetNaviTextId(PlayState* play);
u16 Text_GetFaceReaction(PlayState* play, u32 reactionSet);
void Flags_UnsetAllEnv(PlayState* play);
void Flags_SetEnv(PlayState* play, s16 flag);
void Flags_UnsetEnv(PlayState* play, s16 flag);
s32 Flags_GetEnv(PlayState* play, s16 flag);
void CutsceneFlags_UnsetAll(PlayState* play);
void CutsceneFlags_Set(PlayState* play, s16 flag);
void CutsceneFlags_Unset(PlayState* play, s16 flag);
s32 CutsceneFlags_Get(PlayState* play, s16 flag);
s32 func_8006CFC0(s32 sceneId);
void func_8006D074(PlayState* play);
void func_8006D0AC(PlayState* play);
@@ -1667,7 +1667,7 @@ OcarinaStaff* AudioOcarina_GetPlayingStaff(void);
OcarinaStaff* AudioOcarina_GetPlaybackStaff(void);
void AudioOcarina_MemoryGameInit(u8 minigameRound);
s32 AudioOcarina_MemoryGameNextNote(void);
void AudioOcarina_PlayLongScarecrowAfterCredits(void);
void AudioOcarina_PlayLongScarecrowSong(void);
void AudioDebug_Draw(GfxPrint* printer);
void AudioDebug_ScrPrt(const char* str, u16 num);
void func_800F3054(void);
+1
View File
@@ -200,6 +200,7 @@
#define R_ENABLE_PLAY_LOGS HREG(63)
#define R_EN_GOROIWA_SPEED mREG(12)
#define R_NAVI_MSG_REGION_ALPHA nREG(87)
#define R_USE_DEBUG_CUTSCENE dREG(95)
#define R_HREG_MODE HREG(80) // see `HRegMode` for mode options
+8 -6
View File
@@ -98,7 +98,7 @@ extern u64 gMojiFontTex[]; // original name: "font_ff"
extern KaleidoMgrOverlay gKaleidoMgrOverlayTable[KALEIDO_OVL_MAX];
extern KaleidoMgrOverlay* gKaleidoMgrCurOvl;
extern u8 gBossMarkState;
extern void* D_8012D1F0;
extern void* gDebugCutsceneScript;
extern s32 gScreenWidth;
extern s32 gScreenHeight;
extern Mtx gMtxClear;
@@ -168,10 +168,12 @@ extern u8 gSampleBankTable[];
extern SaveContext gSaveContext;
extern RegEditor* gRegEditor;
extern u16 D_8015FCC0;
extern u16 D_8015FCC2;
extern u16 D_8015FCC4;
extern u8 D_8015FCC8;
extern u16 gCamAtSplinePointsAppliedFrame;
extern u16 gCamEyePointAppliedFrame;
extern u16 gCamAtPointAppliedFrame;
extern u8 gUseCutsceneCam;
extern u8 gCustomLensFlareOn;
extern Vec3f gCustomLensFlarePos;
extern s16 gLensFlareScale;
@@ -182,7 +184,7 @@ extern MapData* gMapData;
extern f32 gBossMarkScale;
extern PauseMapMarksData* gLoadedPauseMarkDataTable;
extern s32 gTrnsnUnkState;
extern Color_RGBA8_u32 D_801614B0;
extern Color_RGBA8_u32 gVisMonoColor;
extern PreNmiBuff* gAppNmiBufferPtr;
extern Scheduler gScheduler;
extern uintptr_t gSegments[NUM_SEGMENTS];
+15 -15
View File
@@ -342,19 +342,19 @@ typedef struct {
typedef struct {
/* 0x00 */ char unk_00[0x4];
/* 0x04 */ void* segment;
/* 0x08 */ u8 state;
/* 0x0C */ f32 unk_0C;
/* 0x10 */ u16 frames;
/* 0x12 */ u16 unk_12;
/* 0x14 */ s32 subCamId;
/* 0x18 */ u16 unk_18;
/* 0x1A */ u8 unk_1A;
/* 0x1B */ u8 unk_1B;
/* 0x1C */ CutsceneCameraPoint* subCamLookAtPoints;
/* 0x20 */ CutsceneCameraPoint* subCamEyePoints;
/* 0x24 */ CsCmdActorAction* linkAction;
/* 0x28 */ CsCmdActorAction* npcActions[10]; // "npcdemopnt"
/* 0x04 */ void* script;
/* 0x08 */ u8 state;
/* 0x0C */ f32 timer;
/* 0x10 */ u16 curFrame; // current frame of the script that is running
/* 0x12 */ u16 unk_12; // set but never used
/* 0x14 */ s32 subCamId;
/* 0x18 */ u16 camEyeSplinePointsAppliedFrame; // stores the frame the cam eye spline points data was last applied on
/* 0x1A */ u8 camAtReady; // cam `at` data is ready to be applied
/* 0x1B */ u8 camEyeReady; // cam `eye` data is ready to be applied
/* 0x1C */ CutsceneCameraPoint* camAtPoints;
/* 0x20 */ CutsceneCameraPoint* camEyePoints;
/* 0x24 */ CsCmdActorCue* playerCue;
/* 0x28 */ CsCmdActorCue* actorCues[10]; // "npcdemopnt"
} CutsceneContext; // size = 0x50
typedef struct {
@@ -1146,7 +1146,7 @@ typedef struct PlayState {
/* 0x11DE0 */ Mtx* billboardMtx;
/* 0x11DE4 */ u32 gameplayFrames;
/* 0x11DE8 */ u8 linkAgeOnLoad;
/* 0x11DE9 */ u8 unk_11DE9;
/* 0x11DE9 */ u8 haltAllActors;
/* 0x11DEA */ u8 spawn;
/* 0x11DEB */ u8 numActorEntries;
/* 0x11DEC */ u8 numRooms;
@@ -1169,7 +1169,7 @@ typedef struct PlayState {
/* 0x11E5D */ s8 bombchuBowlingStatus; // "bombchu_game_flag"
/* 0x11E5E */ u8 transitionType;
/* 0x11E60 */ CollisionCheckContext colChkCtx;
/* 0x120FC */ u16 envFlags[20];
/* 0x120FC */ u16 cutsceneFlags[20];
/* 0x12124 */ PreRender pauseBgPreRender;
/* 0x12174 */ char unk_12174[0x53];
/* 0x121C7 */ s8 unk_121C7;
+487 -259
View File
@@ -3,140 +3,6 @@
#include "ultra64.h"
typedef struct {
/* 0x00 */ u16 entrance; // entrance index upon which the cutscene should trigger
/* 0x02 */ u8 ageRestriction; // 0 for adult only, 1 for child only, 2 for both ages
/* 0x03 */ u8 flag; // eventChkInf flag bound to the entrance cutscene
/* 0x04 */ void* segAddr; // segment offset location of the cutscene
} EntranceCutscene; // size = 0x8
typedef struct {
/* 0x00 */ s8 continueFlag;
/* 0x01 */ s8 cameraRoll;
/* 0x02 */ u16 nextPointFrame;
/* 0x04 */ f32 viewAngle; // in degrees
/* 0x08 */ Vec3s pos;
} CutsceneCameraPoint; // size = 0x10
typedef struct {
/* 0x00 */ Vec3f at;
/* 0x0C */ Vec3f eye;
/* 0x18 */ s16 roll;
/* 0x1A */ s16 fov;
} CutsceneCameraDirection; // size = 0x1C
typedef struct {
/* 0x0 */ CutsceneCameraPoint* atPoints;
/* 0x4 */ CutsceneCameraPoint* eyePoints;
/* 0x8 */ s16 relativeToPlayer;
} CutsceneCameraMove; // size = 0xC
typedef struct {
/* 0x00 */ u16 base;
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame;
} CsCmdBase; // size = 0x6
typedef struct {
/* 0x00 */ u8 unk_00;
/* 0x01 */ u8 setting;
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame;
} CsCmdEnvLighting; // size = 0x6
typedef struct {
/* 0x00 */ u8 unk_00;
/* 0x01 */ u8 sequence;
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame;
} CsCmdMusicChange; // size = 0x6
typedef struct {
/* 0x00 */ u16 type;
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame;
} CsCmdMusicFade; // size = 0x6
typedef struct {
/* 0x00 */ u16 unk_00;
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame;
/* 0x06 */ u8 unk_06;
/* 0x07 */ u8 unk_07;
/* 0x08 */ u8 unk_08;
} CsCmdUnknown9; // size = 0xA
typedef struct {
/* 0x00 */ u16 unk_00;
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame;
/* 0x06 */ u8 hour;
/* 0x07 */ u8 minute;
} CsCmdDayTime; // size = 0x8
typedef struct {
/* 0x00 */ u16 base;
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame;
/* 0x06 */ u16 type;
/* 0x08 */ u16 textId1;
/* 0x0A */ u16 textId2;
} CsCmdTextbox; // size = 0xC
typedef struct {
/* 0x00 */ u16 action; // "dousa"
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame;
union {
/* 0x06 */ Vec3s rot;
/* 0x06 */ Vec3us urot;
};
/* 0x0C */ Vec3i startPos;
/* 0x18 */ Vec3i endPos;
/* 0x24 */ Vec3i normal;
} CsCmdActorAction; // size = 0x30
typedef enum {
CS_STATE_IDLE,
CS_STATE_SKIPPABLE_INIT,
CS_STATE_SKIPPABLE_EXEC,
CS_STATE_UNSKIPPABLE_INIT,
CS_STATE_UNSKIPPABLE_EXEC
} CutsceneState;
typedef enum {
CS_CMD_00 = 0x0000,
CS_CMD_CAM_EYE = 0x0001,
CS_CMD_CAM_AT = 0x0002,
CS_CMD_MISC = 0x0003,
CS_CMD_SET_LIGHTING = 0x0004,
CS_CMD_CAM_EYE_REL_TO_PLAYER = 0x0005,
CS_CMD_CAM_AT_REL_TO_PLAYER = 0x0006,
CS_CMD_07 = 0x0007,
CS_CMD_08 = 0x0008,
CS_CMD_09 = 0x0009,
CS_CMD_TEXTBOX = 0x0013,
CS_CMD_SET_PLAYER_ACTION = 0x000A,
CS_CMD_SET_ACTOR_ACTION_1 = 0x000F,
CS_CMD_SET_ACTOR_ACTION_2 = 0x000E,
CS_CMD_SET_ACTOR_ACTION_3 = 0x0019,
CS_CMD_SET_ACTOR_ACTION_4 = 0x001D,
CS_CMD_SET_ACTOR_ACTION_5 = 0x001E,
CS_CMD_SET_ACTOR_ACTION_6 = 0x002C,
CS_CMD_SET_ACTOR_ACTION_7 = 0x001F,
CS_CMD_SET_ACTOR_ACTION_8 = 0x0031,
CS_CMD_SET_ACTOR_ACTION_9 = 0x003E,
CS_CMD_SET_ACTOR_ACTION_10 = 0x008F,
CS_CMD_SCENE_TRANS_FX = 0x002D,
CS_CMD_NOP = 0x000B,
CS_CMD_PLAYBGM = 0x0056,
CS_CMD_STOPBGM = 0x0057,
CS_CMD_FADEBGM = 0x007C,
CS_CMD_SETTIME = 0x008C,
CS_CMD_TERMINATOR = 0x03E8,
CS_CMD_END = 0xFFFF
} CutsceneCmd;
/**
* Special type for blocks of cutscene data, asm-processor checks
* arrays for CutsceneData type and converts floats within the array
@@ -158,131 +24,493 @@ typedef union CutsceneData {
s8 b[4];
} CutsceneData;
#define CS_CMD_CONTINUE 0
#define CS_CMD_STOP -1
// TODO confirm correctness, clarify names
typedef enum {
/* 0x00 */ INVALID_DESTINATION_0,
/* 0x01 */ CUTSCENE_MAP_GANON_HORSE,
/* 0x02 */ CUTSCENE_MAP_THREE_GODESSES_POST_DEKU_TREE,
/* 0x03 */ GERUDO_VALLEY_DIN,
/* 0x04 */ DEATH_MOUNTAIN_TRAIL_NAYRU,
/* 0x05 */ KOKIRI_FOREST_FARORE,
/* 0x06 */ CUTSCENE_MAP_TRIFORCE_CREATION,
/* 0x07 */ KOKIRI_FOREST_RECEIVE_KOKIRI_EMERALD,
/* 0x08 */ TEMPLE_OF_TIME_AFTER_USE_MS,
/* 0x09 */ GERUDO_VALLEY_DIN_2,
/* 0x0A */ LINKS_HOUSE_INTRO,
/* 0x0B */ KOKIRI_FOREST_INTRO,
/* 0x0C */ DEATH_MOUNTAIN_TRAIL_AFTER_GORON_RUBY,
/* 0x0D */ ZORAS_FOUNTAIN_AFTER_ZORAS_SAPPHIRE,
/* 0x0E */ KOKIRI_FOREST_AFTER_KOKIRI_EMERALD,
/* 0x0F */ TEMPLE_OF_TIME_KOKIRI_EMERALD, //unused
/* 0x10 */ TEMPLE_OF_TIME_GORON_RUBY, //unused
/* 0x11 */ TEMPLE_OF_TIME_ZORAS_SAPPHIRE, //unused
/* 0x12 */ TEMPLE_OF_TIME_AFTER_USE_MS_FIRST,
/* 0x13 */ DEATH_MOUNTAIN_TRAIL_AFTER_INTRO,
/* 0x14 */ INVALID_DESTINATION_14,
/* 0x15 */ LAKE_HYLIA_WATER_RISES,
/* 0x16 */ DESERT_COLOSSUS_REQUIEM,
/* 0x17 */ CUTSCENE_MAP_CURSE_YOU,
/* 0x18 */ JABU_JABU_INTRO,
/* 0x19 */ CHAMBER_OF_SAGES_LIGHT_MEDALLION,
/* 0x1A */ TEMPLE_OF_TIME_KOKIRI_EMERALD_2, //duplicate of 0x000F
/* 0x1B */ TEMPLE_OF_TIME_GORON_RUBY_2, //duplicate of 0x0010
/* 0x1C */ TEMPLE_OF_TIME_ZORAS_SAPPHIRE_2, //duplicate of 0x0011
/* 0x1D */ CHAMBER_OF_SAGES_FOREST_MEDALLION,
/* 0x1E */ CHAMBER_OF_SAGES_FIRE_MEDALLION,
/* 0x1F */ CHAMBER_OF_SAGES_WATER_MEDALLION,
/* 0x20 */ HYRULE_FIELD_FLASHBACK, //lacs part 4
/* 0x21 */ HYRULE_FIELD_AFTER_LAKE_HYLIA_OWL,
/* 0x22 */ CUTSCENE_MAP_GANON_AFTER_USE_MS,
/* 0x23 */ HYRULE_FIELD_INTRO_ZELDA_ESCAPE,
/* 0x24 */ INVALID_DESTINATION_24,
/* 0x25 */ INVALID_DESTINATION_25,
/* 0x26 */ CUTSCENE_MAP_SHEIKAH_LEGEND, //lacs part 2
/* 0x27 */ TEMPLE_OF_TIME_ZELDA_REVEAL, //lacs part 3
/* 0x28 */ TEMPLE_OF_TIME_GET_LIGHT_ARROWS, //lacs part 5
/* 0x29 */ LAKE_HYLIA_AFTER_BLUE_WARP,
/* 0x2A */ KAKARIKO_VILLAGE_DRAIN_WELL,
/* 0x2B */ WINDMILL_AFTER_DRAIN_WELL,
/* 0x2C */ TEMPLE_OF_TIME_AFTER_DOOR_OF_TIME_OPENS,
/* 0x2D */ INVALID_DESTINATION_2D,
/* 0x2E */ TEMPLE_OF_TIME_AFTER_USE_MS_FIRST_2, // duplicate of 0x0012
/* 0x2F */ KAKARIKO_VILLAGE_NOCTURNE_PART_2,
/* 0x30 */ DESERT_COLOSSUS_AFTER_REQUIEM,
/* 0x31 */ TEMPLE_OF_TIME_AFTER_LIGHT_ARROWS,
/* 0x32 */ KAKARIKO_VILLAGE_AFTER_NOCTURNE,
/* 0x33 */ HYRULE_FIELD_IMPA_ESCORT_CS,
/* 0x34 */ TEMPLE_OF_TIME_SONG_OF_TIME,
/* 0x35 */ HYRULE_FIELD_AFTER_SONG_OF_TIME,
/* 0x36 */ GERUDO_VALLEY_CREDITS,
/* 0x37 */ GERUDO_FORTRESS_CREDITS,
/* 0x38 */ KAKARIKO_VILLAGE_CREDITS,
/* 0x39 */ DEATH_MOUNTAIN_TRAIL_CREDITS_1,
/* 0x3A */ GORON_CITY_CREDITS, // unused?
/* 0x3B */ LAKE_HYLIA_CREDITS,
/* 0x3C */ ZORAS_FOUNTAIN_CREDITS, // unused
/* 0x3D */ ZORAS_DOMAIN_CREDITS,
/* 0x3E */ KOKIRI_FOREST_CREDITS_1,
/* 0x3F */ KOKIRI_FOREST_CREDITS_2,
/* 0x40 */ HYRULE_FIELD_CREDITS,
/* 0x41 */ LON_LON_RANCH_CREDITS_1,
/* 0x42 */ KAKARIKO_VILLAGE_AFTER_TRAIL_OWL,
/* 0x43 */ HTRULE_FIELD_UNUSED_ENTRANCE,
/* 0x44 */ CUTSCENE_MAP_FIRE,
/* 0x45 */ KOKIRI_FOREST_POST_FOREST_MEDALLION,
/* 0x46 */ DEATH_MOUNTAIN_TRAIL_CREDITS_2,
/* 0x47 */ TEMPLE_OF_TIME_CREDITS,
/* 0x48 */ ZELDAS_COURTYARD_CREDITS,
/* 0x49 */ LON_LON_RANCH_CREDITS_1_2, // duplicate of 0x0041
/* 0x4A */ LON_LON_RANCH_CREDITS_2,
/* 0x4B */ LON_LON_RANCH_CREDITS_3,
/* 0x4C */ LON_LON_RANCH_CREDITS_4,
/* 0x4D */ LON_LON_RANCH_CREDITS_5,
/* 0x4E */ LON_LON_RANCH_CREDITS_6,
/* 0x4F */ LON_LON_RANCH_NO_CS_1,
/* 0x50 */ LON_LON_RANCH_NO_CS_2,
/* 0x51 */ LON_LON_RANCH_NO_CS_3,
/* 0x52 */ LON_LON_RANCH_NO_CS_4,
/* 0x53 */ LON_LON_RANCH_NO_CS_5,
/* 0x54 */ LON_LON_RANCH_NO_CS_6,
/* 0x55 */ LON_LON_RANCH_NO_CS_7,
/* 0x56 */ LON_LON_RANCH_NO_CS_8,
/* 0x57 */ LON_LON_RANCH_NO_CS_9,
/* 0x58 */ LON_LON_RANCH_NO_CS_10,
/* 0x59 */ LON_LON_RANCH_NO_CS_11,
/* 0x5A */ LON_LON_RANCH_NO_CS_12,
/* 0x5B */ LON_LON_RANCH_NO_CS_13,
/* 0x5C */ LON_LON_RANCH_NO_CS_14,
/* 0x5D */ LON_LON_RANCH_NO_CS_15,
/* 0x5E */ LON_LON_RANCH_NO_CS_EPONAS_SONG,
/* 0x5F */ CONDITIONAL_DESTINATION, // TODO more descriptive name?
/* 0x60 */ DESERT_COLOSSUS_SPIRIT_BLUE_WARP,
/* 0x61 */ GRAVEYARD_AFTER_SHADOW_BLUE_WARP,
/* 0x62 */ DEATH_MOUNTAIN_CRATER_AFTER_FIRE_BLUE_WARP,
/* 0x63 */ SACRED_FOREST_MEADOW_AFTER_FOREST_BLUE_WARP,
/* 0x64 */ KOKIRI_FOREST_AFTER_FOREST_BLUE_WARP,
/* 0x65 */ DESERT_COLOSSUS_AFTER_SILVER_GAUNTLETS,
/* 0x66 */ TEMPLE_OF_TIME_FRONT_OF_PEDESTAL,
/* 0x67 */ HYRULE_FIELD_TITLE_SCREEN,
/* 0x68 */ SPIRIT_TEMPLE_BOSS_TITLE_SCREEN,
/* 0x69 */ GRAVEYARD_SUNS_SONG,
/* 0x6A */ ROYAL_FAMILYS_TOMB_SUNS_SONG,
/* 0x6B */ GANONS_CASTLE_AFTER_FOREST_TRIAL,
/* 0x6C */ GANONS_CASTLE_AFTER_WATER_TRIAL,
/* 0x6D */ GANONS_CASTLE_AFTER_SHADOW_TRIAL,
/* 0x6E */ GANONS_CASTLE_AFTER_FIRE_TRIAL,
/* 0x6F */ GANONS_CASTLE_AFTER_LIGHT_TRIAL,
/* 0x70 */ GANONS_CASTLE_AFTER_SPIRIT_TRIAL,
/* 0x71 */ GANONS_CASTLE_DISPEL_BARRIER_IF_CONDITIONS,
/* 0x72 */ HYRULE_FIELD_INTRO,
/* 0x73 */ HYRULE_FIELD_AFTER_IMPA_ESCORT,
/* 0x74 */ DESERT_COLOSSUS_SPIRIT_BLUE_WARP_2,
/* 0x75 */ HYRULE_FIELD_SKY,
/* 0x76 */ GANON_BATTLE_TOWER_COLLAPSE,
/* 0x77 */ ZELDAS_COURTYARD_RECEIVE_LETTER
} CutsceneTerminatorDestination;
/* 0 */ CS_STATE_IDLE,
/* 1 */ CS_STATE_START,
/* 2 */ CS_STATE_RUN,
/* 3 */ CS_STATE_STOP,
/* 4 */ CS_STATE_RUN_UNSTOPPABLE
} CutsceneState;
typedef enum {
/* 0x0001 */ CS_CMD_CAM_EYE_SPLINE = 0x01,
/* 0x0002 */ CS_CMD_CAM_AT_SPLINE,
/* 0x0003 */ CS_CMD_MISC,
/* 0x0004 */ CS_CMD_LIGHT_SETTING,
/* 0x0005 */ CS_CMD_CAM_EYE_SPLINE_REL_TO_PLAYER,
/* 0x0006 */ CS_CMD_CAM_AT_SPLINE_REL_TO_PLAYER,
/* 0x0007 */ CS_CMD_CAM_EYE,
/* 0x0008 */ CS_CMD_CAM_AT,
/* 0x0009 */ CS_CMD_RUMBLE_CONTROLLER,
/* 0x000A */ CS_CMD_PLAYER_CUE,
/* 0x000B */ CS_CMD_UNIMPLEMENTED_B,
/* 0x000D */ CS_CMD_UNIMPLEMENTED_D = 0x0D,
/* 0x000E */ CS_CMD_ACTOR_CUE_1_0,
/* 0x000F */ CS_CMD_ACTOR_CUE_0_0,
/* 0x0010 */ CS_CMD_ACTOR_CUE_1_1,
/* 0x0011 */ CS_CMD_ACTOR_CUE_0_1,
/* 0x0012 */ CS_CMD_ACTOR_CUE_0_2,
/* 0x0013 */ CS_CMD_TEXT,
/* 0x0015 */ CS_CMD_UNIMPLEMENTED_15 = 0x15,
/* 0x0016 */ CS_CMD_UNIMPLEMENTED_16,
/* 0x0017 */ CS_CMD_ACTOR_CUE_0_3,
/* 0x0018 */ CS_CMD_ACTOR_CUE_1_2,
/* 0x0019 */ CS_CMD_ACTOR_CUE_2_0,
/* 0x001B */ CS_CMD_UNIMPLEMENTED_1B = 0x1B,
/* 0x001C */ CS_CMD_UNIMPLEMENTED_1C,
/* 0x001D */ CS_CMD_ACTOR_CUE_3_0,
/* 0x001E */ CS_CMD_ACTOR_CUE_4_0,
/* 0x001F */ CS_CMD_ACTOR_CUE_6_0,
/* 0x0020 */ CS_CMD_UNIMPLEMENTED_20,
/* 0x0021 */ CS_CMD_UNIMPLEMENTED_21,
/* 0x0022 */ CS_CMD_ACTOR_CUE_0_4,
/* 0x0023 */ CS_CMD_ACTOR_CUE_1_3,
/* 0x0024 */ CS_CMD_ACTOR_CUE_2_1,
/* 0x0025 */ CS_CMD_ACTOR_CUE_3_1,
/* 0x0026 */ CS_CMD_ACTOR_CUE_4_1,
/* 0x0027 */ CS_CMD_ACTOR_CUE_0_5,
/* 0x0028 */ CS_CMD_ACTOR_CUE_1_4,
/* 0x0029 */ CS_CMD_ACTOR_CUE_2_2,
/* 0x002A */ CS_CMD_ACTOR_CUE_3_2,
/* 0x002B */ CS_CMD_ACTOR_CUE_4_2,
/* 0x002C */ CS_CMD_ACTOR_CUE_5_0,
/* 0x002D */ CS_CMD_TRANSITION,
/* 0x002E */ CS_CMD_ACTOR_CUE_0_6,
/* 0x002F */ CS_CMD_ACTOR_CUE_4_3,
/* 0x0030 */ CS_CMD_ACTOR_CUE_1_5,
/* 0x0031 */ CS_CMD_ACTOR_CUE_7_0,
/* 0x0032 */ CS_CMD_ACTOR_CUE_2_3,
/* 0x0033 */ CS_CMD_ACTOR_CUE_3_3,
/* 0x0034 */ CS_CMD_ACTOR_CUE_6_1,
/* 0x0035 */ CS_CMD_ACTOR_CUE_3_4,
/* 0x0036 */ CS_CMD_ACTOR_CUE_4_4,
/* 0x0037 */ CS_CMD_ACTOR_CUE_5_1,
/* 0x0039 */ CS_CMD_ACTOR_CUE_6_2 = 0x39,
/* 0x003A */ CS_CMD_ACTOR_CUE_6_3,
/* 0x003B */ CS_CMD_UNIMPLEMENTED_3B,
/* 0x003C */ CS_CMD_ACTOR_CUE_7_1,
/* 0x003D */ CS_CMD_UNIMPLEMENTED_3D,
/* 0x003E */ CS_CMD_ACTOR_CUE_8_0,
/* 0x003F */ CS_CMD_ACTOR_CUE_3_5,
/* 0x0040 */ CS_CMD_ACTOR_CUE_1_6,
/* 0x0041 */ CS_CMD_ACTOR_CUE_3_6,
/* 0x0042 */ CS_CMD_ACTOR_CUE_3_7,
/* 0x0043 */ CS_CMD_ACTOR_CUE_2_4,
/* 0x0044 */ CS_CMD_ACTOR_CUE_1_7,
/* 0x0045 */ CS_CMD_ACTOR_CUE_2_5,
/* 0x0046 */ CS_CMD_ACTOR_CUE_1_8,
/* 0x0047 */ CS_CMD_UNIMPLEMENTED_47,
/* 0x0048 */ CS_CMD_ACTOR_CUE_2_6,
/* 0x0049 */ CS_CMD_UNIMPLEMENTED_49,
/* 0x004A */ CS_CMD_ACTOR_CUE_2_7,
/* 0x004B */ CS_CMD_ACTOR_CUE_3_8,
/* 0x004C */ CS_CMD_ACTOR_CUE_0_7,
/* 0x004D */ CS_CMD_ACTOR_CUE_5_2,
/* 0x004E */ CS_CMD_ACTOR_CUE_1_9,
/* 0x004F */ CS_CMD_ACTOR_CUE_4_5,
/* 0x0050 */ CS_CMD_ACTOR_CUE_1_10,
/* 0x0051 */ CS_CMD_ACTOR_CUE_2_8,
/* 0x0052 */ CS_CMD_ACTOR_CUE_3_9,
/* 0x0053 */ CS_CMD_ACTOR_CUE_4_6,
/* 0x0054 */ CS_CMD_ACTOR_CUE_5_3,
/* 0x0055 */ CS_CMD_ACTOR_CUE_0_8,
/* 0x0056 */ CS_CMD_START_SEQ,
/* 0x0057 */ CS_CMD_STOP_SEQ,
/* 0x0058 */ CS_CMD_ACTOR_CUE_6_4,
/* 0x0059 */ CS_CMD_ACTOR_CUE_7_2,
/* 0x005A */ CS_CMD_ACTOR_CUE_5_4,
/* 0x005D */ CS_CMD_ACTOR_CUE_0_9 = 0x5D,
/* 0x005E */ CS_CMD_ACTOR_CUE_1_11,
/* 0x0069 */ CS_CMD_ACTOR_CUE_0_10 = 0x69,
/* 0x006A */ CS_CMD_ACTOR_CUE_2_9,
/* 0x006B */ CS_CMD_ACTOR_CUE_0_11,
/* 0x006C */ CS_CMD_ACTOR_CUE_3_10,
/* 0x006D */ CS_CMD_UNIMPLEMENTED_6D,
/* 0x006E */ CS_CMD_ACTOR_CUE_0_12,
/* 0x006F */ CS_CMD_ACTOR_CUE_7_3,
/* 0x0070 */ CS_CMD_UNIMPLEMENTED_70,
/* 0x0071 */ CS_CMD_UNIMPLEMENTED_71,
/* 0x0072 */ CS_CMD_ACTOR_CUE_7_4,
/* 0x0073 */ CS_CMD_ACTOR_CUE_6_5,
/* 0x0074 */ CS_CMD_ACTOR_CUE_1_12,
/* 0x0075 */ CS_CMD_ACTOR_CUE_2_10,
/* 0x0076 */ CS_CMD_ACTOR_CUE_1_13,
/* 0x0077 */ CS_CMD_ACTOR_CUE_0_13,
/* 0x0078 */ CS_CMD_ACTOR_CUE_1_14,
/* 0x0079 */ CS_CMD_ACTOR_CUE_2_11,
/* 0x007B */ CS_CMD_ACTOR_CUE_0_14 = 0x7B,
/* 0x007C */ CS_CMD_FADE_OUT_SEQ,
/* 0x007D */ CS_CMD_ACTOR_CUE_1_15,
/* 0x007E */ CS_CMD_ACTOR_CUE_2_12,
/* 0x007F */ CS_CMD_ACTOR_CUE_3_11,
/* 0x0080 */ CS_CMD_ACTOR_CUE_4_7,
/* 0x0081 */ CS_CMD_ACTOR_CUE_5_5,
/* 0x0082 */ CS_CMD_ACTOR_CUE_6_6,
/* 0x0083 */ CS_CMD_ACTOR_CUE_1_16,
/* 0x0084 */ CS_CMD_ACTOR_CUE_2_13,
/* 0x0085 */ CS_CMD_ACTOR_CUE_3_12,
/* 0x0086 */ CS_CMD_ACTOR_CUE_7_5,
/* 0x0087 */ CS_CMD_ACTOR_CUE_4_8,
/* 0x0088 */ CS_CMD_ACTOR_CUE_5_6,
/* 0x0089 */ CS_CMD_ACTOR_CUE_6_7,
/* 0x008A */ CS_CMD_ACTOR_CUE_0_15,
/* 0x008B */ CS_CMD_ACTOR_CUE_0_16,
/* 0x008C */ CS_CMD_TIME,
/* 0x008D */ CS_CMD_ACTOR_CUE_1_17,
/* 0x008E */ CS_CMD_ACTOR_CUE_7_6,
/* 0x008F */ CS_CMD_ACTOR_CUE_9_0,
/* 0x0090 */ CS_CMD_ACTOR_CUE_0_17,
/* 0x03E8 */ CS_CMD_DESTINATION = 0x03E8,
/* 0xFFFF */ CS_CMD_END = 0xFFFF
} CutsceneCmd;
typedef enum {
/* 0x00 */ CS_MISC_UNIMPLEMENTED_0,
/* 0x01 */ CS_MISC_RAIN,
/* 0x02 */ CS_MISC_LIGHTNING,
/* 0x03 */ CS_MISC_SET_CSFLAG_0, // also sets flag 2 if in Temple of Time
/* 0x04 */ CS_MISC_UNIMPLEMENTED_4,
/* 0x05 */ CS_MISC_UNIMPLEMENTED_5,
/* 0x06 */ CS_MISC_LIFT_FOG,
/* 0x07 */ CS_MISC_CLOUDY_SKY,
/* 0x08 */ CS_MISC_FADE_KOKIRI_GRASS_ENV_ALPHA,
/* 0x09 */ CS_MISC_SNOW,
/* 0x0A */ CS_MISC_SET_CSFLAG_1,
/* 0x0B */ CS_MISC_DEKU_TREE_DEATH,
/* 0x0C */ CS_MISC_STOP_CUTSCENE,
/* 0x0D */ CS_MISC_TRIFORCE_FLASH,
/* 0x0E */ CS_MISC_SET_LOCKED_VIEWPOINT,
/* 0x0F */ CS_MISC_SHOW_TITLE_CARD,
/* 0x10 */ CS_MISC_QUAKE_START,
/* 0x11 */ CS_MISC_QUAKE_STOP,
/* 0x12 */ CS_MISC_STOP_STORM_AND_ADVANCE_TO_DAY,
/* 0x13 */ CS_MISC_SET_FLAG_FAST_WINDMILL,
/* 0x14 */ CS_MISC_SET_FLAG_WELL_DRAINED,
/* 0x15 */ CS_MISC_SET_FLAG_LAKE_HYLIA_RESTORED,
/* 0x16 */ CS_MISC_VISMONO_BLACK_AND_WHITE,
/* 0x17 */ CS_MISC_VISMONO_SEPIA,
/* 0x18 */ CS_MISC_HIDE_ROOM,
/* 0x19 */ CS_MISC_TIME_ADVANCE_TO_NIGHT,
/* 0x1A */ CS_MISC_SET_TIME_BASED_LIGHT_SETTING,
/* 0x1B */ CS_MISC_RED_PULSATING_LIGHTS,
/* 0x1C */ CS_MISC_HALT_ALL_ACTORS,
/* 0x1D */ CS_MISC_RESUME_ALL_ACTORS,
/* 0x1E */ CS_MISC_SET_CSFLAG_3,
/* 0x1F */ CS_MISC_SET_CSFLAG_4,
/* 0x20 */ CS_MISC_SANDSTORM_FILL,
/* 0x21 */ CS_MISC_SUNSSONG_START,
/* 0x22 */ CS_MISC_FREEZE_TIME,
/* 0x23 */ CS_MISC_LONG_SCARECROW_SONG
} CutsceneMiscType;
typedef enum {
/* 0x00 */ CS_TEXT_NORMAL,
/* 0x01 */ CS_TEXT_CHOICE,
/* 0x02 */ CS_TEXT_OCARINA_ACTION,
/* 0x03 */ CS_TEXT_GORON_RUBY, // use `altTextId1` in the ruby cutscene if sapphire is already obtained
/* 0x04 */ CS_TEXT_ZORA_SAPPHIRE // use `altTextId1` in the sapphire cutscene if ruby is already obtained
} CutsceneTextType;
typedef enum {
/* 0x03 */ CS_FADE_OUT_FANFARE = 3,
/* 0x04 */ CS_FADE_OUT_BGM_MAIN
} CutsceneFadeOutSeqPlayer;
typedef enum {
/* 0x01 */ CS_TRANS_GRAY_FILL_IN = 1, // has hardcoded sounds for some scenes
/* 0x02 */ CS_TRANS_BLUE_FILL_IN,
/* 0x03 */ CS_TRANS_RED_FILL_OUT,
/* 0x04 */ CS_TRANS_GREEN_FILL_OUT,
/* 0x05 */ CS_TRANS_GRAY_FILL_OUT,
/* 0x06 */ CS_TRANS_BLUE_FILL_OUT,
/* 0x07 */ CS_TRANS_RED_FILL_IN,
/* 0x08 */ CS_TRANS_GREEN_FILL_IN,
/* 0x09 */ CS_TRANS_TRIGGER_INSTANCE, // used with `TRANS_MODE_INSTANCE_WAIT`
/* 0x0A */ CS_TRANS_BLACK_FILL_OUT,
/* 0x0B */ CS_TRANS_BLACK_FILL_IN,
/* 0x0C */ CS_TRANS_BLACK_FILL_OUT_TO_HALF, // used with `TRANS_MODE_CS_BLACK_FILL`
/* 0x0D */ CS_TRANS_BLACK_FILL_IN_FROM_HALF
} CutsceneTransitionType;
typedef enum {
/* 0x00 */ CS_DEST_UNIMPLEMENTED_0,
/* 0x01 */ CS_DEST_CUTSCENE_MAP_GANON_HORSE,
/* 0x02 */ CS_DEST_CUTSCENE_MAP_THREE_GODDESSES,
/* 0x03 */ CS_DEST_GERUDO_VALLEY_DIN_PART_1,
/* 0x04 */ CS_DEST_DEATH_MOUNTAIN_TRAIL_NAYRU,
/* 0x05 */ CS_DEST_KOKIRI_FOREST_FARORE,
/* 0x06 */ CS_DEST_CUTSCENE_MAP_TRIFORCE_CREATION,
/* 0x07 */ CS_DEST_KOKIRI_FOREST_RECEIVE_KOKIRI_EMERALD,
/* 0x08 */ CS_DEST_TEMPLE_OF_TIME_FROM_MASTER_SWORD,
/* 0x09 */ CS_DEST_GERUDO_VALLEY_DIN_PART_2,
/* 0x0A */ CS_DEST_LINKS_HOUSE_INTRO,
/* 0x0B */ CS_DEST_KOKIRI_FOREST_INTRO,
/* 0x0C */ CS_DEST_DEATH_MOUNTAIN_TRAIL_FROM_GORON_RUBY,
/* 0x0D */ CS_DEST_ZORAS_FOUNTAIN_FROM_ZORAS_SAPPHIRE,
/* 0x0E */ CS_DEST_KOKIRI_FOREST_FROM_KOKIRI_EMERALD,
/* 0x0F */ CS_DEST_TEMPLE_OF_TIME_KOKIRI_EMERALD_RESTORED, // unused
/* 0x10 */ CS_DEST_TEMPLE_OF_TIME_GORON_RUBY_RESTORED, // unused
/* 0x11 */ CS_DEST_TEMPLE_OF_TIME_ZORAS_SAPPHIRE_RESTORED, // unused
/* 0x12 */ CS_DEST_TEMPLE_OF_TIME_AFTER_LIGHT_MEDALLION,
/* 0x13 */ CS_DEST_DEATH_MOUNTAIN_TRAIL, // unused
/* 0x14 */ CS_DEST_UNIMPLEMENTED_14,
/* 0x15 */ CS_DEST_LAKE_HYLIA_WATER_RESTORED,
/* 0x16 */ CS_DEST_DESERT_COLOSSUS_REQUIEM, // unused
/* 0x17 */ CS_DEST_CUTSCENE_MAP_GANONDORF_DEFEATED_CREDITS,
/* 0x18 */ CS_DEST_JABU_JABU,
/* 0x19 */ CS_DEST_CHAMBER_OF_SAGES_LIGHT_MEDALLION,
/* 0x1A */ CS_DEST_TEMPLE_OF_TIME_KOKIRI_EMERALD_RESTORED_2, // unused
/* 0x1B */ CS_DEST_TEMPLE_OF_TIME_GORON_RUBY_RESTORED_2, // unused
/* 0x1C */ CS_DEST_TEMPLE_OF_TIME_ZORAS_SAPPHIRE_RESTORED_2, // unused
/* 0x1D */ CS_DEST_CHAMBER_OF_SAGES_FOREST_MEDALLION,
/* 0x1E */ CS_DEST_CHAMBER_OF_SAGES_FIRE_MEDALLION,
/* 0x1F */ CS_DEST_CHAMBER_OF_SAGES_WATER_MEDALLION,
/* 0x20 */ CS_DEST_HYRULE_FIELD_FLASHBACK,
/* 0x21 */ CS_DEST_HYRULE_FIELD_FROM_ZELDA_ESCAPE,
/* 0x22 */ CS_DEST_CUTSCENE_MAP_GANONDORF_FROM_MASTER_SWORD, // unused
/* 0x23 */ CS_DEST_HYRULE_FIELD_INTRO_DREAM,
/* 0x24 */ CS_DEST_UNIMPLEMENTED_24,
/* 0x25 */ CS_DEST_UNIMPLEMENTED_25,
/* 0x26 */ CS_DEST_CUTSCENE_MAP_SHEIKAH_LEGEND,
/* 0x27 */ CS_DEST_TEMPLE_OF_TIME_ZELDA_REVEAL,
/* 0x28 */ CS_DEST_TEMPLE_OF_TIME_GET_LIGHT_ARROWS,
/* 0x29 */ CS_DEST_LAKE_HYLIA_FROM_LAKE_RESTORED,
/* 0x2A */ CS_DEST_KAKARIKO_VILLAGE_DRAIN_WELL,
/* 0x2B */ CS_DEST_WINDMILL_FROM_WELL_DRAINED,
/* 0x2C */ CS_DEST_TEMPLE_OF_TIME_FROM_ALL_STONES_RESTORED,
/* 0x2D */ CS_DEST_UNIMPLEMENTED_2D,
/* 0x2E */ CS_DEST_TEMPLE_OF_TIME_AFTER_LIGHT_MEDALLION_ALT, // unused, uses a different transition
/* 0x2F */ CS_DEST_KAKARIKO_VILLAGE_NOCTURNE_PART_2,
/* 0x30 */ CS_DEST_DESERT_COLOSSUS_FROM_REQUIEM,
/* 0x31 */ CS_DEST_TEMPLE_OF_TIME_FROM_LIGHT_ARROWS,
/* 0x32 */ CS_DEST_KAKARIKO_VILLAGE_FROM_NOCTURNE,
/* 0x33 */ CS_DEST_HYRULE_FIELD_FROM_ZELDAS_COURTYARD,
/* 0x34 */ CS_DEST_TEMPLE_OF_TIME_SONG_OF_TIME,
/* 0x35 */ CS_DEST_HYRULE_FIELD_FROM_SONG_OF_TIME,
/* 0x36 */ CS_DEST_GERUDO_VALLEY_CREDITS,
/* 0x37 */ CS_DEST_GERUDO_FORTRESS_CREDITS,
/* 0x38 */ CS_DEST_KAKARIKO_VILLAGE_CREDITS,
/* 0x39 */ CS_DEST_DEATH_MOUNTAIN_TRAIL_CREDITS_PART_1,
/* 0x3A */ CS_DEST_GORON_CITY_CREDITS,
/* 0x3B */ CS_DEST_LAKE_HYLIA_CREDITS,
/* 0x3C */ CS_DEST_ZORAS_FOUNTAIN_CREDITS, // unused, crashes
/* 0x3D */ CS_DEST_ZORAS_DOMAIN_CREDITS,
/* 0x3E */ CS_DEST_KOKIRI_FOREST_CREDITS_PART_1,
/* 0x3F */ CS_DEST_KOKIRI_FOREST_CREDITS_PART_2,
/* 0x40 */ CS_DEST_HYRULE_FIELD_CREDITS,
/* 0x41 */ CS_DEST_LON_LON_RANCH_CREDITS_PART_1_ALT, // unused
/* 0x42 */ CS_DEST_KAKARIKO_VILLAGE_FROM_TRAIL_OWL,
/* 0x43 */ CS_DEST_HYRULE_FIELD_FROM_LAKE_HYLIA_OWL,
/* 0x44 */ CS_DEST_CUTSCENE_MAP_DEKU_SPROUT_PART_2,
/* 0x45 */ CS_DEST_KOKIRI_FOREST_DEKU_SPROUT_PART_3,
/* 0x46 */ CS_DEST_DEATH_MOUNTAIN_TRAIL_CREDITS_PART_2,
/* 0x47 */ CS_DEST_TEMPLE_OF_TIME_CREDITS,
/* 0x48 */ CS_DEST_ZELDAS_COURTYARD_CREDITS,
/* 0x49 */ CS_DEST_LON_LON_RANCH_CREDITS_PART_1,
/* 0x4A */ CS_DEST_LON_LON_RANCH_CREDITS_PART_2,
/* 0x4B */ CS_DEST_LON_LON_RANCH_CREDITS_PART_3,
/* 0x4C */ CS_DEST_LON_LON_RANCH_CREDITS_PART_4,
/* 0x4D */ CS_DEST_LON_LON_RANCH_CREDITS_PART_5,
/* 0x4E */ CS_DEST_LON_LON_RANCH_CREDITS_PART_6,
/* 0x4F */ CS_DEST_LON_LON_RANCH_1, // unused
/* 0x50 */ CS_DEST_LON_LON_RANCH_2, // unused
/* 0x51 */ CS_DEST_LON_LON_RANCH_3, // unused
/* 0x52 */ CS_DEST_LON_LON_RANCH_4, // unused
/* 0x53 */ CS_DEST_LON_LON_RANCH_5, // unused
/* 0x54 */ CS_DEST_LON_LON_RANCH_6, // unused
/* 0x55 */ CS_DEST_LON_LON_RANCH_7, // unused
/* 0x56 */ CS_DEST_LON_LON_RANCH_8, // unused
/* 0x57 */ CS_DEST_LON_LON_RANCH_9, // unused
/* 0x58 */ CS_DEST_LON_LON_RANCH_10, // unused
/* 0x59 */ CS_DEST_LON_LON_RANCH_11, // unused
/* 0x5A */ CS_DEST_LON_LON_RANCH_12, // unused
/* 0x5B */ CS_DEST_LON_LON_RANCH_13, // unused
/* 0x5C */ CS_DEST_LON_LON_RANCH_14, // unused
/* 0x5D */ CS_DEST_LON_LON_RANCH_15, // unused
/* 0x5E */ CS_DEST_LON_LON_RANCH_FROM_EPONAS_SONG,
/* 0x5F */ CS_DEST_STONES_RESTORED_CONDITIONAL, // unused
/* 0x60 */ CS_DEST_DESERT_COLOSSUS_FROM_CHAMBER_OF_SAGES,
/* 0x61 */ CS_DEST_GRAVEYARD_FROM_CHAMBER_OF_SAGES,
/* 0x62 */ CS_DEST_DEATH_MOUNTAIN_CRATER_FROM_CHAMBER_OF_SAGES,
/* 0x63 */ CS_DEST_SACRED_FOREST_MEADOW_WARP_PAD, // unused
/* 0x64 */ CS_DEST_KOKIRI_FOREST_FROM_CHAMBER_OF_SAGES,
/* 0x65 */ CS_DEST_DESERT_COLOSSUS_FROM_NABOORU_CAPTURE,
/* 0x66 */ CS_DEST_TEMPLE_OF_TIME_FRONT_OF_PEDESTAL, // unused
/* 0x67 */ CS_DEST_HYRULE_FIELD_TITLE_SCREEN,
/* 0x68 */ CS_DEST_TITLE_SCREEN_DEMO,
/* 0x69 */ CS_DEST_GRAVEYARD_SUNS_SONG_PART_2,
/* 0x6A */ CS_DEST_ROYAL_FAMILYS_TOMB_SUNS_SONG_PART_3,
/* 0x6B */ CS_DEST_GANONS_CASTLE_DISPEL_FOREST_BEAM,
/* 0x6C */ CS_DEST_GANONS_CASTLE_DISPEL_WATER_BEAM,
/* 0x6D */ CS_DEST_GANONS_CASTLE_DISPEL_SHADOW_BEAM,
/* 0x6E */ CS_DEST_GANONS_CASTLE_DISPEL_FIRE_BEAM,
/* 0x6F */ CS_DEST_GANONS_CASTLE_DISPEL_LIGHT_BEAM,
/* 0x70 */ CS_DEST_GANONS_CASTLE_DISPEL_SPIRIT_BEAM,
/* 0x71 */ CS_DEST_GANONS_CASTLE_DISPEL_BARRIER_CONDITONAL,
/* 0x72 */ CS_DEST_HYRULE_FIELD_FROM_FAIRY_OCARINA,
/* 0x73 */ CS_DEST_HYRULE_FIELD_FROM_IMPA_ESCORT,
/* 0x74 */ CS_DEST_FROM_RAURU_FINAL_MESSAGE_CONDITIONAL,
/* 0x75 */ CS_DEST_HYRULE_FIELD_CREDITS_SKY,
/* 0x76 */ CS_DEST_GANON_BATTLE_TOWER_COLLAPSE,
/* 0x77 */ CS_DEST_ZELDAS_COURTYARD_RECEIVE_LETTER
} CutsceneDestination;
typedef union {
struct {
/* 0x00 */ u16 unused0;
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame;
};
s32 _words[2];
} CsCmdCam; // size = 0x8
typedef union {
struct {
/* 0x00 */ u16 type;
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame;
};
s32 _words[12];
} CsCmdMisc; // size = 0x30
typedef union {
struct {
/* 0x00 */ u8 unused0;
/* 0x01 */ u8 settingPlusOne;
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame; // unused
};
s32 _words[12];
} CsCmdLightSetting; // size = 0x30
typedef union {
struct {
/* 0x00 */ u8 unused0;
/* 0x01 */ u8 seqIdPlusOne;
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame; // unused
};
s32 _words[12];
} CsCmdStartSeq; // size = 0x30
typedef union {
struct {
/* 0x00 */ u8 unused0;
/* 0x01 */ u8 seqIdPlusOne;
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame; // unused
};
s32 _words[12];
} CsCmdStopSeq; // size = 0x30
typedef union {
struct {
/* 0x00 */ u16 seqPlayer;
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame;
};
s32 _words[12];
} CsCmdFadeOutSeq; // size = 0x30
typedef union {
struct {
/* 0x00 */ u16 unused0;
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame; // unused
/* 0x06 */ u8 sourceStrength;
/* 0x07 */ u8 duration;
/* 0x08 */ u8 decreaseRate;
};
s32 _words[3];
} CsCmdRumble; // size = 0xC
typedef union {
struct {
/* 0x00 */ u16 unused0;
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame; // unused
/* 0x06 */ u8 hour;
/* 0x07 */ u8 minute;
};
s32 _words[3];
} CsCmdTime; // size = 0xC
typedef union {
struct {
/* 0x00 */ u16 destination;
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame; // unused
};
s32 _words[2];
} CsCmdDestination; // size = 0x8
typedef union {
struct {
/* 0x00 */ u16 textId; // can also be an ocarina action for `CS_TEXT_OCARINA_ACTION`
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame;
/* 0x06 */ u16 type;
/* 0x08 */ u16 altTextId1;
/* 0x0A */ u16 altTextId2;
};
s32 _words[3];
} CsCmdText; // size = 0xC
#define CS_TEXT_ID_NONE 0xFFFF
typedef union {
struct {
/* 0x00 */ u16 type;
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame;
};
s32 _words[2];
} CsCmdTransition; // size = 0x8
typedef union {
struct {
/* 0x00 */ u16 id; // "dousa"
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame;
/* 0x06 */ Vec3us rot;
/* 0x0C */ Vec3i startPos;
/* 0x18 */ Vec3i endPos;
};
s32 _words[12];
} CsCmdActorCue; // size = 0x30
typedef union {
struct {
/* 0x00 */ s8 continueFlag;
/* 0x01 */ s8 cameraRoll;
/* 0x02 */ u16 nextPointFrame;
/* 0x04 */ f32 viewAngle; // in degrees
/* 0x08 */ Vec3s pos;
};
s32 _words[4];
} CutsceneCameraPoint; // size = 0x10
#define CS_CAM_CONTINUE 0
#define CS_CAM_STOP -1
// todo: remove after ZAPD is updated
#define CS_CMD_CONTINUE CS_CAM_CONTINUE
#define CS_CMD_STOP CS_CAM_STOP
#define CS_CAM_DATA_NOT_APPLIED 0xFFFF
typedef struct {
/* 0x00 */ Vec3f at;
/* 0x0C */ Vec3f eye;
/* 0x18 */ s16 roll;
/* 0x1A */ s16 fov;
} CutsceneCameraDirection; // size = 0x1C
typedef struct {
/* 0x0 */ CutsceneCameraPoint* atPoints;
/* 0x4 */ CutsceneCameraPoint* eyePoints;
/* 0x8 */ s16 relativeToPlayer;
} CutsceneCameraMove; // size = 0xC
#endif
+230 -377
View File
@@ -4,6 +4,23 @@
#include "command_macros_base.h"
#include "z64cutscene.h"
/**
* Cutscene scripts are arrays of `CutsceneData` words, including bit-packed integers and floats.
*
* Most command macros have unused arguments. This is to account for the vanilla assets setting specific values
* that don't end up being used by any code. They can safely be set to anything, as they aren't used in the
* implementation.
*
* It is believed the original tool used for cutscenes handled most commands the same way, using similar
* fields, and the code would have accessed them using common structs. Given this, the unused values observed in vanilla
* assets may appear to map to a variable that makes sense, even if it doesn't end up being used in the code. It
* probably isn't garbage data.
*
* This codebase goes with specialized structs and macros to make it easier to follow the code.
* Note this common struct design is still partially reflected in all commands having a `startFrame` and `endFrame`,
* when sometimes only the `startFrame` matters (as documented).
*/
#ifdef __GNUC__
#define CMD_F(a) {.f = (a)}
#else
@@ -11,445 +28,281 @@
#endif
/**
* ARGS
* s32 totalEntries (e), s32 endFrame (n)
* FORMAT
* eeeeeeee nnnnnnnn
* size = 0x8
* Marks the beginning of a cutscene script.
*/
#define CS_BEGIN_CUTSCENE(totalEntries, endFrame) CMD_W(totalEntries), CMD_W(endFrame)
#define CS_BEGIN_CUTSCENE(totalEntries, frameCount) CMD_W(totalEntries), CMD_W(frameCount)
/**
* ARGS
* s16 startFrame (s), s16 endFrame (e)
* FORMAT
* 00000001 0001ssss eeee0000
* size = 0xC
* Defines data for `CutsceneCameraPoint`, which can be used with any of the `eye` or `at` camera commands.
*/
#define CS_CAM_POS_LIST CS_CAM_EYE_LIST
#define CS_CAM_EYE_LIST(startFrame, endFrame) \
#define CS_CAM_POINT(continueFlag, roll, frame, viewAngle, xPos, yPos, zPos, unused) \
CMD_BBH(continueFlag, roll, frame), CMD_F(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
/**
* Declares a list of camera `eye` points that form a spline.
* The points of the spline are interpolated over time to create smooth camera movements.
*/
#define CS_CAM_EYE_SPLINE(startFrame, endFrame) \
CS_CMD_CAM_EYE_SPLINE, CMD_HH(0x0001, startFrame), CMD_HH(endFrame, 0x0000)
/**
* Declares a list of camera `at` points that form a spline.
* The points of the spline are interpolated over time to create smooth camera movements.
*/
#define CS_CAM_AT_SPLINE(startFrame, endFrame) \
CS_CMD_CAM_AT_SPLINE, CMD_HH(0x0001, startFrame), CMD_HH(endFrame, 0x0000)
/**
* Declares a list of camera `eye` points that form a spline.
* The points of the spline are interpolated over time to create smooth camera movements.
* The points are relative to the player's position and yaw.
*/
#define CS_CAM_EYE_SPLINE_REL_TO_PLAYER(startFrame, endFrame) \
CS_CMD_CAM_EYE_SPLINE_REL_TO_PLAYER, CMD_HH(0x0001, startFrame), CMD_HH(endFrame, 0x0000)
/**
* Declares a list of camera `at` points that form a spline.
* The points of the spline are interpolated over time to create smooth camera movements.
* The points are relative to the player's position and yaw.
*/
#define CS_CAM_AT_SPLINE_REL_TO_PLAYER(startFrame, endFrame) \
CS_CMD_CAM_AT_SPLINE_REL_TO_PLAYER, CMD_HH(0x0001, startFrame), CMD_HH(endFrame, 0x0000)
/**
* Declares a single `eye` point that will be set on the specified frame, without any interpolation.
* Should only contain a single point, not a list.
* This feature is not used in the final game and lacks polish, it is recommended to use splines in all cases.
*/
#define CS_CAM_EYE(startFrame, endFrame) \
CS_CMD_CAM_EYE, CMD_HH(0x0001, startFrame), CMD_HH(endFrame, 0x0000)
/**
* ARGS
* s8 continueFlag (c), s8 roll (r), s16 frame (f), f32 viewAngle (a),
* s16 xPos (x), s16 yPos (y), s16 zPos (z)
* FORMAT
* Capital U is Unused
* ccrrffff aaaaaaaa xxxxyyyy zzzzUUUU
* size = 0x10
* Declares a single `at` point that will be set on the specified frame, without any interpolation.
* Should only contain a single point, not a list.
* This feature is not used in the final game and lacks polish, it is recommended to use splines in all cases.
*/
#define CS_CAM_POS CS_CAM_EYE
#define CS_CAM_EYE(continueFlag, roll, frame, viewAngle, xPos, yPos, zPos, unused) \
CMD_BBH(continueFlag, roll, frame), CMD_F(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
/**
* ARGS
* s16 startFrame (s), s16 endFrame (e)
* FORMAT
* 00000002 0001ssss eeee0000
* size = 0xC
*/
#define CS_CAM_FOCUS_POINT_LIST CS_CAM_AT_LIST
#define CS_CAM_AT_LIST(startFrame, endFrame) \
#define CS_CAM_AT(startFrame, endFrame) \
CS_CMD_CAM_AT, CMD_HH(0x0001, startFrame), CMD_HH(endFrame, 0x0000)
/**
* ARGS
* s8 continueFlag (c), s8 roll (r), s16 frame (f), f32 viewAngle (a),
* s16 xPos (x), s16 yPos (y), s16 zPos (z)
* FORMAT
* Capital U is Unused
* ccrrffff aaaaaaaa xxxxyyyy zzzzUUUU
* size = 0x10
* Declares a list of `CS_MISC` entries.
*/
#define CS_CAM_FOCUS_POINT CS_CAM_AT
#define CS_CAM_AT(continueFlag, roll, frame, viewAngle, xPos, yPos, zPos, unused) \
CMD_BBH(continueFlag, roll, frame), CMD_F(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
#define CS_MISC_LIST(entries) \
CS_CMD_MISC, CMD_W(entries)
/**
* ARGS
* s32 entries (e)
* FORMAT
* 00000003 eeeeeeee
* size = 0x8
* Various miscellaneous commands.
* @see `CutsceneMiscType` enum for the different types of commands.
* @note setting `endFrame` to same value as `startFrame` will not behave as expected.
* For commands that only need to last one frame, set `endFrame` to `startFrame + 1`.
*/
#define CS_MISC_LIST(entries) CS_CMD_MISC, CMD_W(entries)
/**
* ARGS
* s16 unk (u), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* uuuussss eeeeUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU
* size = 0x30
*/
#define CS_MISC(unk, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7, unused8, unused9, unused10) \
CMD_HH(unk, startFrame), CMD_HH(endFrame, unused0), \
#define CS_MISC(type, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7, unused8, unused9, unused10) \
CMD_HH(type, startFrame), CMD_HH(endFrame, unused0), \
CMD_W(unused1), CMD_W(unused2), CMD_W(unused3), CMD_W(unused4), CMD_W(unused5), \
CMD_W(unused6), CMD_W(unused7), CMD_W(unused8), CMD_W(unused9), CMD_W(unused10)
/**
* ARGS
* s32 entries (e)
* FORMAT
* 00000004 eeeeeeee
* size = 0x8
* Declares a list of `CS_LIGHT_SETTING` entries.
*/
#define CS_LIGHTING_LIST(entries) CS_CMD_SET_LIGHTING, CMD_W(entries)
#define CS_LIGHT_SETTING_LIST(entries) \
CS_CMD_LIGHT_SETTING, CMD_W(entries)
/**
* ARGS
* s16 setting (m), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* mmmmssss eeeeUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU 00000000 00000000 00000000
* size = 0x30
* Changes the environment lights to the specified setting.
* The lighting change will take place immediately with no blending.
* @note `endFrame` is not used in the implementation of the command, so its value does not matter
*/
#define CS_LIGHTING(setting, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7) \
CMD_HH(setting, startFrame), CMD_HH(endFrame, unused0), \
#define CS_LIGHT_SETTING(lightSetting, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7) \
CMD_BBH(0, (lightSetting + 1), startFrame), CMD_HH(endFrame, unused0), \
CMD_W(unused1), CMD_W(unused2), CMD_W(unused3), CMD_W(unused4), CMD_W(unused5), \
CMD_W(unused6), CMD_W(unused7), 0x00000000, 0x00000000, 0x00000000
/**
* ARGS
* s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused , may be consistently zero
* 00000005 0001ssss eeee0000
* size = 0xC
* Declares a list of `CS_RUMBLE_CONTROLLER` entries.
*/
#define CS_CAM_POS_PLAYER_LIST CS_CAM_EYE_REL_TO_PLAYER_LIST
#define CS_CAM_EYE_REL_TO_PLAYER_LIST(startFrame, endFrame) \
CS_CMD_CAM_EYE_REL_TO_PLAYER, CMD_HH(0x0001, startFrame), CMD_HH(endFrame, 0x0000)
#define CS_RUMBLE_CONTROLLER_LIST(entries) \
CS_CMD_RUMBLE_CONTROLLER, CMD_W(entries)
/**
* ARGS
* s8 continueFlag (c), s8 roll (r), s16 frame (f), f32 viewAngle (a),
* s16 xPos (x), s16 yPos (y), s16 zPos (z)
* FORMAT
* Capital U is Unused
* ccrrffff aaaaaaaa xxxxyyyy zzzzUUUU
* size = 0x10
*/
#define CS_CAM_POS_PLAYER CS_CAM_EYE_REL_TO_PLAYER
#define CS_CAM_EYE_REL_TO_PLAYER(continueFlag, roll, frame, viewAngle, xPos, yPos, zPos, unused) \
CMD_BBH(continueFlag, roll, frame), CMD_F(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
* Rumble the controller.
* @note `endFrame` is not used in the implementation of the command, so its value does not matter
*/
#define CS_RUMBLE_CONTROLLER(unused0, startFrame, endFrame, sourceStrength, duration, decreaseRate, unused1, unused2) \
CMD_HH(unused0, startFrame), CMD_HBB(endFrame, sourceStrength, duration), CMD_BBH(decreaseRate, unused1, unused2)
/**
* ARGS
* s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused , may be consistently zero
* 00000006 0001ssss eeee0000
* size = 0xC
* Declares a list of `CS_ACTOR_CUE` entries.
*/
#define CS_CAM_FOCUS_POINT_PLAYER_LIST CS_CAM_AT_REL_TO_PLAYER_LIST
#define CS_CAM_AT_REL_TO_PLAYER_LIST(startFrame, endFrame) \
CS_CMD_CAM_AT_REL_TO_PLAYER, CMD_HH(0x0001, startFrame), CMD_HH(endFrame, 0x0000)
/**
* ARGS
* s8 continueFlag (c), s8 roll (r), s16 frame (f), f32 viewAngle (a),
* s16 xPos (x), s16 yPos (y), s16 zPos (z)
* FORMAT
* Capital U is Unused
* ccrrffff aaaaaaaa xxxxyyyy zzzzUUUU
* size = 0x10
*/
#define CS_CAM_FOCUS_POINT_PLAYER CS_CAM_AT_REL_TO_PLAYER
#define CS_CAM_AT_REL_TO_PLAYER(continueFlag, roll, frame, viewAngle, xPos, yPos, zPos, unused) \
CMD_BBH(continueFlag, roll, frame), CMD_F(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
#define CS_ACTOR_CUE_LIST(cmdType, entries) \
CMD_W(cmdType), CMD_W(entries)
/**
* ARGS
* s16 unk (u), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* 00000007 uuuussss eeeeUUUU
* size = 0xC
* Defines a cue that an actor can listen for.
* The actor can choose whether or not to use the position and rotation data supplied to it.
* The cue `id` is a number that has an actor-specific meaning.
*/
#define CS_CMD_07_LIST(unk, startFrame, endFrame, unused) \
CS_CMD_07, CMD_HH(unk, startFrame), CMD_HH(endFrame, unused)
#define CS_ACTOR_CUE(id, startFrame, endFrame, rotX, rotY, rotZ, startX, startY, startZ, endX, endY, endZ, unused0, unused1, unused2) \
CMD_HH(id, startFrame), CMD_HH(endFrame, rotX), CMD_HH(rotY, rotZ), \
CMD_W(startX), CMD_W(startY), CMD_W(startZ), \
CMD_W(endX), CMD_W(endY), CMD_W(endZ), \
CMD_F(unused0), CMD_F(unused1), CMD_F(unused2)
/**
* ARGS
* s8 continueFlag (c), s8 roll (r), s16 frame (f), f32 viewAngle (a),
* s16 xPos (x), s16 yPos (y), s16 zPos (z)
* FORMAT
* Capital U is Unused
* ccrrffff aaaaaaaa xxxxyyyy zzzzUUUU
* size = 0x10
* Declares a list of `CS_PLAYER_CUE` entries.
*/
#define CS_CMD_07(continueFlag, roll, frame, viewAngle, xPos, yPos, zPos, unused) \
CMD_BBH(continueFlag, roll, frame), CMD_F(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
#define CS_PLAYER_CUE_LIST(entries) \
CS_CMD_PLAYER_CUE, CMD_W(entries)
/**
* ARGS
* s16 unk (u), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* 00000008 uuuussss eeeeUUUU
* size = 0xC
* A player cue is the same as `CS_ACTOR_CUE` but is specifically for player.
*/
#define CS_CMD_08_LIST(unk, startFrame, endFrame, unused) \
CS_CMD_08, CMD_HH(unk, startFrame), CMD_HH(endFrame, unused)
#define CS_PLAYER_CUE(id, startFrame, endFrame, rotX, rotY, rotZ, startX, startY, startZ, endX, endY, endZ, unused0, unused1, unused2) \
CS_ACTOR_CUE(id, startFrame, endFrame, rotX, rotY, rotZ, startX, startY, startZ, endX, endY, endZ, unused0, unused1, unused2)
/**
* ARGS
* s8 continueFlag (c), s8 roll (r), s16 frame (f), f32 viewAngle (a),
* s16 xPos (x), s16 yPos (y), s16 zPos (z)
* FORMAT
* Capital U is Unused
* ccrrffff aaaaaaaa xxxxyyyy zzzzUUUU
* size = 0x10
* Declares a list of `CS_TEXT_*` entries.
*/
#define CS_CMD_08(continueFlag, roll, frame, viewAngle, xPos, yPos, zPos, unused) \
CMD_BBH(continueFlag, roll, frame), CMD_F(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
#define CS_TEXT_LIST(entries) \
CS_CMD_TEXT, CMD_W(entries)
/**
* ARGS
* s32 entries (e)
* FORMAT
* 00000009 eeeeeeee
* size = 0x8
* Starts a textbox at the specified time.
* For `CS_TEXT_OCARINA_ACTION`, `textId` is used as an ocarina action.
* For a choice textbox, `altTextId1` is the top text id to branch to and `altTextId2` is the bottom.
*/
#define CS_CMD_09_LIST(entries) CS_CMD_09, CMD_W(entries)
#define CS_TEXT(textId, startFrame, endFrame, type, altTextId1, altTextId2) \
CMD_HH(textId, startFrame), CMD_HH(endFrame, type), CMD_HH(altTextId1, altTextId2)
#define CS_TEXT_NONE(startFrame, endFrame) \
CS_TEXT(CS_TEXT_ID_NONE, startFrame, endFrame, 0xFFFF, CS_TEXT_ID_NONE, CS_TEXT_ID_NONE)
#define CS_TEXT_OCARINA_ACTION(ocarinaAction, startFrame, endFrame, messageId) \
CS_TEXT(ocarinaAction, startFrame, endFrame, CS_TEXT_OCARINA_ACTION, messageId, CS_TEXT_ID_NONE)
/**
* ARGS
* s16 unk (u), s16 startFrame (s), s16 endFrame (e), s16 unk2 (v), s16 unk3 (w), s16 unk4 (x)
* FORMAT
* Capital U is Unused
* uuuussss eeeevvww xxUUUUUU
* size = 0xC
* Controls various types of screen transitions.
* @see `CutsceneTransitionType` for type options.
*/
#define CS_CMD_09(unk, startFrame, endFrame, unk2, unk3, unk4, unused0, unused1) \
CMD_HH(unk, startFrame), CMD_HBB(endFrame, unk2, unk3), CMD_BBH(unk4, unused0, unused1)
#define CS_TRANSITION(type, startFrame, endFrame) \
CS_CMD_TRANSITION, 0x00000001, CMD_HH(type, startFrame), CMD_HH(endFrame, endFrame)
/**
* ARGS
* s32 cmdType (c), s32 entries (e)
* FORMAT
* cccccccc eeeeeeee
* size = 0x8
* Declares a list of `CS_START_SEQ` entries.
*/
#define CS_START_SEQ_LIST(entries) \
CS_CMD_START_SEQ, CMD_W(entries)
/**
* Starts a sequence at the specified time.
* @note `endFrame` is not used in the implementation of the command, so its value does not matter
*/
#define CS_START_SEQ(seqId, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7) \
CMD_HH((seqId + 1), startFrame), CMD_HH(endFrame, unused0), \
CMD_W(unused1), CMD_W(unused2), CMD_W(unused3), CMD_W(unused4), CMD_W(unused5), \
CMD_W(unused6), CMD_W(unused7), 0x00000000, 0x00000000, 0x00000000
/**
* Declares a list of `CS_STOP_SEQ` entries.
*/
#define CS_STOP_SEQ_LIST(entries) \
CS_CMD_STOP_SEQ, CMD_W(entries)
/**
* Stops a sequence at the specified time.
* @note `endFrame` is not used in the implementation of the command, so its value does not matter
*/
#define CS_STOP_SEQ(seqId, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7) \
CMD_HH((seqId + 1), startFrame), CMD_HH(endFrame, unused0), \
CMD_W(unused1), CMD_W(unused2), CMD_W(unused3), CMD_W(unused4), CMD_W(unused5), \
CMD_W(unused6), CMD_W(unused7), 0x00000000, 0x00000000, 0x00000000
/**
* Declares a list of `CS_FADE_OUT_SEQ` entries.
*/
#define CS_FADE_OUT_SEQ_LIST(entries) \
CS_CMD_FADE_OUT_SEQ, CMD_W(entries)
/**
* Fade out the sequence that is playing on the specified sequence player, over the specified frame range.
* @see `CutsceneFadeOutSeqPlayer`
*/
#define CS_FADE_OUT_SEQ(seqPlayer, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7) \
CMD_HH(seqPlayer, startFrame), CMD_HH(endFrame, unused0), \
CMD_W(unused1), CMD_W(unused2), CMD_W(unused3), CMD_W(unused4), CMD_W(unused5), \
CMD_W(unused6), CMD_W(unused7), 0x00000000, 0x00000000, 0x00000000
/**
* Declares a list of `CS_TIME` entries.
*/
#define CS_TIME_LIST(entries) \
CS_CMD_TIME, CMD_W(entries)
/**
* Sets the time of day.
* Both the day time and skybox time are set by this command.
* @note `endFrame` is not used in the implementation of the command, so its value does not matter
*/
#define CS_TIME(unused0, startFrame, endFrame, hour, min) \
CMD_HH(unused0, startFrame), CMD_HBB(endFrame, hour, min), CMD_W(0)
/**
* Sends the player to a new destination.
* `destination` maps to a custom block of code that must implement the scene transition on its own.
* This custom code can also do other tasks like changing age, setting flags, or any other setup that is needed
* before going to the next destination.
*
* @see `CutsceneDestination`
* @note `endFrame` is not used in the implementation of the command, so its value does not matter
*/
#define CS_DESTINATION(destination, startFrame, endFrame) \
CS_CMD_DESTINATION, 1, CMD_HH(destination, startFrame), CMD_HH(endFrame, endFrame)
/**
* Marks the end of a cutscene script.
*/
#define CS_END() 0xFFFFFFFF, 0x00000000
// most instances of this look like unimplemented actor cues.
// after confirming this, can probably switch those over and delete this
#define CS_UNK_DATA_LIST(cmdType, entries) CMD_W(cmdType), CMD_W(entries)
/**
* ARGS
* s32 unk1 (a), s32 unk2 (b), s32 unk3 (c), s32 unk4 (d), s32 unk5 (e), s32 unk6 (f),
* s32 unk7 (g), s32 unk8 (h), s32 unk9 (i), s32 unk10 (j), s32 unk11 (k), s32 unk12 (l)
* FORMAT
* aaaaaaaa bbbbbbbb cccccccc dddddddd eeeeeeee ffffffff gggggggg hhhhhhhh iiiiiiii jjjjjjjj kkkkkkkk llllllll
* size = 0x30
*/
#define CS_UNK_DATA(unk1, unk2, unk3, unk4, unk5, unk6, unk7, unk8, unk9, unk10, unk11, unk12) \
CMD_W(unk1), CMD_W(unk2), CMD_W(unk3), CMD_W(unk4), CMD_W(unk5), CMD_W(unk6), \
CMD_W(unk7), CMD_W(unk8), CMD_W(unk9), CMD_W(unk10), CMD_W(unk11), CMD_W(unk12)
/**
* ARGS
* s32 cmdType (c), s32 entries (e)
* FORMAT
* cccccccc eeeeeeee
* size = 0x8
*/
#define CS_NPC_ACTION_LIST(cmdType, entries) CMD_W(cmdType), CMD_W(entries)
// TODO: Fix ZAPD and delete these
#define CS_CAM_POS_LIST CS_CAM_EYE_SPLINE
#define CS_CAM_POS CS_CAM_POINT
#define CS_CAM_FOCUS_POINT_LIST CS_CAM_AT_SPLINE
#define CS_CAM_FOCUS_POINT CS_CAM_POINT
#define CS_CAM_POS_PLAYER_LIST CS_CAM_EYE_SPLINE_REL_TO_PLAYER
#define CS_CAM_POS_PLAYER CS_CAM_POINT
#define CS_CAM_FOCUS_POINT_PLAYER_LIST CS_CAM_AT_SPLINE_REL_TO_PLAYER
#define CS_CAM_FOCUS_POINT_PLAYER CS_CAM_POINT
#define CS_NPC_ACTION_LIST CS_ACTOR_CUE_LIST
#define CS_NPC_ACTION CS_ACTOR_CUE
#define CS_PLAYER_ACTION_LIST CS_PLAYER_CUE_LIST
#define CS_PLAYER_ACTION CS_PLAYER_CUE
#define CS_LIGHTING_LIST CS_LIGHT_SETTING_LIST
#define CS_CMD_09_LIST CS_RUMBLE_CONTROLLER_LIST
#define CS_CMD_09 CS_RUMBLE_CONTROLLER
#define CS_TEXT_DISPLAY_TEXTBOX CS_TEXT
#define CS_TEXT_LEARN_SONG CS_TEXT_OCARINA_ACTION
#define CS_SCENE_TRANS_FX CS_TRANSITION
#define CS_PLAY_BGM_LIST CS_START_SEQ_LIST
#define CS_STOP_BGM_LIST CS_STOP_SEQ_LIST
#define CS_FADE_BGM_LIST CS_FADE_OUT_SEQ_LIST
#define CS_FADE_BGM CS_FADE_OUT_SEQ
#define CS_TERMINATOR CS_DESTINATION
/**
* ARGS
* s16 npcAction (a), s16 startFrame (s), s16 endFrame (e),
* s16 rotX (u), s16 rotY (v), s16 rotZ (w),
* s32 startX (i), s32 startY (j), s32 startZ (k),
* s32 endX (l), s32 endY (m), s32 endZ (n),
* f32 normX (x), f32 normY (y), f32 normZ (z),
* FORMAT
* aaaassss eeeeuuuu vvvvwwww iiiiiiii jjjjjjjj kkkkkkkk llllllll mmmmmmmm nnnnnnnn xxxxxxxx yyyyyyyy zzzzzzzz
* size = 0x30
*/
#define CS_NPC_ACTION(npcAction, startFrame, endFrame, rotX, rotY, rotZ, startX, startY, startZ, endX, endY, endZ, normX, normY, normZ) \
CMD_HH(npcAction, startFrame), CMD_HH(endFrame, rotX), CMD_HH(rotY, rotZ), \
CMD_W(startX), CMD_W(startY), CMD_W(startZ), \
CMD_W(endX), CMD_W(endY), CMD_W(endZ), \
CMD_F(normX), CMD_F(normY), CMD_F(normZ)
#define CS_PLAY_BGM(seqId, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7) \
CS_START_SEQ((seqId)-1, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7)
/**
* ARGS
* s32 cmdType (c), s32 entries (e)
* FORMAT
* cccccccc eeeeeeee
* size = 0x8
*/
#define CS_PLAYER_ACTION_LIST(entries) CS_CMD_SET_PLAYER_ACTION, CMD_W(entries)
#define CS_STOP_BGM(seqId, frame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7, unused8) \
CS_STOP_SEQ((seqId)-1, frame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7, unused8)
/**
* ARGS
* s16 linkAction (a), s16 startFrame (s), s16 endFrame (e),
* s16 rotX (u), s16 rotY (v), s16 rotZ (w),
* s32 startX (i), s32 startY (j), s32 startZ (k),
* s32 endX (l), s32 endY (m), s32 endZ (n),
* f32 normX (x), f32 normY (y), f32 normZ (z),
* FORMAT
* aaaassss eeeeuuuu vvvvwwww iiiiiiii jjjjjjjj kkkkkkkk llllllll mmmmmmmm nnnnnnnn xxxxxxxx yyyyyyyy zzzzzzzz
* size = 0x30
*/
#define CS_PLAYER_ACTION(linkAction, startFrame, endFrame, rotX, rotY, rotZ, startX, startY, startZ, endX, endY, endZ, normX, normY, normZ) \
CS_NPC_ACTION(linkAction, startFrame, endFrame, rotX, rotY, rotZ, startX, startY, startZ, endX, endY, endZ, normX, normY, normZ)
/**
* ARGS
* s32 entries (e)
* FORMAT
* 00000013 eeeeeeee
* size = 0x8
*/
#define CS_TEXT_LIST(entries) CS_CMD_TEXTBOX, CMD_W(entries)
/**
* ARGS
* s16 messageId (i), s16 startFrame (s), s16 endFrame (e), s16 type (o),
* s16 topOptionBranch (y), s16 bottomOptionBranch (n)
* FORMAT
* iiiissss eeeeoooo yyyynnnn
* size = 0xC
*/
#define CS_TEXT_DISPLAY_TEXTBOX(messageId, startFrame, endFrame, type, topOptionBranch, bottomOptionBranch) \
CMD_HH(messageId, startFrame), CMD_HH(endFrame, type), CMD_HH(topOptionBranch, bottomOptionBranch)
/**
* ARGS
* s16 startFrame (s), s16 endFrame (e)
* FORMAT
* FFFFssss eeeeFFFF FFFFFFFF
* size = 0xC
*/
#define CS_TEXT_NONE(startFrame, endFrame) \
CS_TEXT_DISPLAY_TEXTBOX(0xFFFF, startFrame, endFrame, 0xFFFF, 0xFFFF, 0xFFFF)
/**
* ARGS
* s16 ocarinaSongAction (o), s16 startFrame (s), s16 endFrame (e), s16 topOptionBranch (i)
* FORMAT
* oooossss eeee0002 iiiiFFFF
* size = 0xC
*/
#define CS_TEXT_LEARN_SONG(ocarinaSongAction, startFrame, endFrame, messageId) \
CS_TEXT_DISPLAY_TEXTBOX(ocarinaSongAction, startFrame, endFrame, 0x0002, messageId, 0xFFFF)
/**
* ARGS
* s16 transitionType (t), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused , endFrame duplicate
* 0000002D 00000001 ttttssss eeeeUUUU
* size = 0x10
*/
#define CS_SCENE_TRANS_FX(transitionType, startFrame, endFrame) \
CS_CMD_SCENE_TRANS_FX, 0x00000001, CMD_HH(transitionType, startFrame), CMD_HH(endFrame, endFrame)
/**
* ARGS
* s32 entries (e)
* FORMAT
* 00000056 eeeeeeee
* size = 0x8
*/
#define CS_PLAY_BGM_LIST(entries) CS_CMD_PLAYBGM, CMD_W(entries)
/**
* ARGS
* s16 sequence (q), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* qqqqssss eeeeUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU 00000000 00000000 00000000
* size = 0x30
*/
#define CS_PLAY_BGM(sequence, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7) \
CMD_HH(sequence, startFrame), CMD_HH(endFrame, unused0), \
CMD_W(unused1), CMD_W(unused2), CMD_W(unused3), CMD_W(unused4), CMD_W(unused5), \
CMD_W(unused6), CMD_W(unused7), 0x00000000, 0x00000000, 0x00000000
/**
* ARGS
* s32 entries (e)
* FORMAT
* 00000057 eeeeeeee
* size = 0x8
*/
#define CS_STOP_BGM_LIST(entries) CS_CMD_STOPBGM, CMD_W(entries)
/**
* ARGS
* s16 sequence (q), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* uuqqssss eeeeUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU 00000000 00000000 00000000
* size = 0x30
*/
#define CS_STOP_BGM(sequence, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7) \
CMD_HH(sequence, startFrame), CMD_HH(endFrame, unused0), \
CMD_W(unused1), CMD_W(unused2), CMD_W(unused3), CMD_W(unused4), CMD_W(unused5), \
CMD_W(unused6), CMD_W(unused7), 0x00000000, 0x00000000, 0x00000000
/**
* ARGS
* s32 entries (e)
* FORMAT
* 0000007C eeeeeeee
* size = 0x8
*/
#define CS_FADE_BGM_LIST(entries) CS_CMD_FADEBGM, CMD_W(entries)
/**
* ARGS
* s16 fadeType (t), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* ttttssss eeeeUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU 00000000 00000000 00000000
* size = 0x30
*/
#define CS_FADE_BGM(fadeType, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7) \
CMD_HH(fadeType, startFrame), CMD_HH(endFrame, unused0), \
CMD_W(unused1), CMD_W(unused2), CMD_W(unused3), CMD_W(unused4), CMD_W(unused5), \
CMD_W(unused6), CMD_W(unused7), 0x00000000, 0x00000000, 0x00000000
/**
* ARGS
* s32 entries (e)
* FORMAT
* 0000008C eeeeeeee
* size = 0x8
*/
#define CS_TIME_LIST(entries) CS_CMD_SETTIME, CMD_W(entries)
/**
* ARGS
* s16 unk (u), s16 startFrame (s), s16 endFrame (e), s8 hour (h), s8 min (m)
* FORMAT
* Capital U is Unused
* uuuussss eeeehhmm UUUUUUUU
* size = 0xC
*/
#define CS_TIME(unk, startFrame, endFrame, hour, min, unused) \
CMD_HH(unk, startFrame), \
CMD_HBB(endFrame, hour, min), \
CMD_W(unused)
/**
* ARGS
* CutsceneTerminatorDestination dest (d), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused , endFrame duplicate
* 000003E8 00000001 ddddssss eeeeUUUU
* size = 0x10
*/
#define CS_TERMINATOR(dest, startFrame, endFrame) \
CS_CMD_TERMINATOR, 0x00000001, CMD_HH(dest, startFrame), CMD_HH(endFrame, endFrame)
/**
* Marks the end of a cutscene
*/
#define CS_END() 0xFFFFFFFF, 0x00000000
#define CS_LIGHTING(lightSetting, frame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7, unused8) \
CS_LIGHT_SETTING((lightSetting)-1, frame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7, unused8)
#endif
+1 -1
View File
@@ -632,7 +632,7 @@ typedef struct Player {
/* 0x0440 */ Actor* rideActor;
/* 0x0444 */ u8 csMode;
/* 0x0445 */ u8 prevCsMode;
/* 0x0446 */ u8 unk_446;
/* 0x0446 */ u8 cueId;
/* 0x0447 */ u8 unk_447;
/* 0x0448 */ Actor* unk_448;
/* 0x044C */ char unk_44C[0x004];