mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-04 15:04:31 +00:00
Create Macros for Cutscene Data (#63)
* Added additional (potentially unused) fields to macros, now builds OK * Ran formatter, attempted better macro formatting * Formatted unknown fields as hex, further cleanups * Rename and prefix macros, use command base macros, format cutscenes with indents * Move command macros into a new file and include it globally * Generate cutscene command macros for Bg_Toki_Swd, Cleanups * Rename CS_TEXTBOX commands to CS_TEXT, fix typo ic command_macros_base.h * Introduce CS_CMD_CONTINUE and CS_CMD_STOP * Remove apparently redundant arguments in certain commands, include the values in the macros directly * Re-add cutscene terminator destination enum values to example cutscene data * Format what should be floats as hex, Change actorAnim to actorAction * Allow floating-point representation of values in cutscene data (asm-processor hack) * Include cutscene commands only where necessary, documentation fixes * Rename actor actions to npc actions, separate player action from npc actions * Remove PlayerActionIDs for now as relevant information on it is not yet decompiled * Generate cutscene data for en_ru1, remove apparent redundancies in CS_LIGHTING and CS_PLAY/STOP/FADE_BGM commands, relax static requirement in asm-processor CutsceneData float conversion
This commit is contained in:
parent
2bccbe7679
commit
43dfaa7518
15 changed files with 1538 additions and 506 deletions
|
@ -1594,7 +1594,7 @@ void Cutscene_ProcessCommands(GlobalContext* globalCtx, CutsceneContext* csCtx,
|
|||
cutscenePtr += 0xC;
|
||||
}
|
||||
break;
|
||||
case CS_CMD_SET_ACTOR_ACTION_0:
|
||||
case CS_CMD_SET_PLAYER_ACTION:
|
||||
MemCopy(&cmdEntries, cutscenePtr, 4);
|
||||
cutscenePtr += 4;
|
||||
for (j = 0; j < cmdEntries; j++) {
|
||||
|
@ -1628,12 +1628,12 @@ void Cutscene_ProcessCommands(GlobalContext* globalCtx, CutsceneContext* csCtx,
|
|||
for (j = 0; j < cmdEntries; j++) {
|
||||
cmd = (CsCmdBase*)cutscenePtr;
|
||||
if ((cmd->startFrame < csCtx->frames) && (csCtx->frames <= cmd->endFrame)) {
|
||||
csCtx->actorActions[0] = (void*)cutscenePtr;
|
||||
csCtx->npcActions[0] = (void*)cutscenePtr;
|
||||
}
|
||||
cutscenePtr += 0x30;
|
||||
}
|
||||
break;
|
||||
case 14:
|
||||
case CS_CMD_SET_ACTOR_ACTION_2:
|
||||
case 16:
|
||||
case 24:
|
||||
case 35:
|
||||
|
@ -1656,12 +1656,12 @@ void Cutscene_ProcessCommands(GlobalContext* globalCtx, CutsceneContext* csCtx,
|
|||
for (j = 0; j < cmdEntries; j++) {
|
||||
cmd = (CsCmdBase*)cutscenePtr;
|
||||
if ((cmd->startFrame < csCtx->frames) && (csCtx->frames <= cmd->endFrame)) {
|
||||
csCtx->actorActions[1] = (void*)cutscenePtr;
|
||||
csCtx->npcActions[1] = (void*)cutscenePtr;
|
||||
}
|
||||
cutscenePtr += 0x30;
|
||||
}
|
||||
break;
|
||||
case 25:
|
||||
case CS_CMD_SET_ACTOR_ACTION_3:
|
||||
case 36:
|
||||
case 41:
|
||||
case 50:
|
||||
|
@ -1680,12 +1680,12 @@ void Cutscene_ProcessCommands(GlobalContext* globalCtx, CutsceneContext* csCtx,
|
|||
for (j = 0; j < cmdEntries; j++) {
|
||||
cmd = (CsCmdBase*)cutscenePtr;
|
||||
if ((cmd->startFrame < csCtx->frames) && (csCtx->frames <= cmd->endFrame)) {
|
||||
csCtx->actorActions[2] = (void*)cutscenePtr;
|
||||
csCtx->npcActions[2] = (void*)cutscenePtr;
|
||||
}
|
||||
cutscenePtr += 0x30;
|
||||
}
|
||||
break;
|
||||
case 29:
|
||||
case CS_CMD_SET_ACTOR_ACTION_4:
|
||||
case 37:
|
||||
case 42:
|
||||
case 51:
|
||||
|
@ -1703,12 +1703,12 @@ void Cutscene_ProcessCommands(GlobalContext* globalCtx, CutsceneContext* csCtx,
|
|||
for (j = 0; j < cmdEntries; j++) {
|
||||
cmd = (CsCmdBase*)cutscenePtr;
|
||||
if ((cmd->startFrame < csCtx->frames) && (csCtx->frames <= cmd->endFrame)) {
|
||||
csCtx->actorActions[3] = (void*)cutscenePtr;
|
||||
csCtx->npcActions[3] = (void*)cutscenePtr;
|
||||
}
|
||||
cutscenePtr += 0x30;
|
||||
}
|
||||
break;
|
||||
case 30:
|
||||
case CS_CMD_SET_ACTOR_ACTION_5:
|
||||
case 38:
|
||||
case 43:
|
||||
case 47:
|
||||
|
@ -1722,12 +1722,12 @@ void Cutscene_ProcessCommands(GlobalContext* globalCtx, CutsceneContext* csCtx,
|
|||
for (j = 0; j < cmdEntries; j++) {
|
||||
cmd = (CsCmdBase*)cutscenePtr;
|
||||
if ((cmd->startFrame < csCtx->frames) && (csCtx->frames <= cmd->endFrame)) {
|
||||
csCtx->actorActions[4] = (void*)cutscenePtr;
|
||||
csCtx->npcActions[4] = (void*)cutscenePtr;
|
||||
}
|
||||
cutscenePtr += 0x30;
|
||||
}
|
||||
break;
|
||||
case 44:
|
||||
case CS_CMD_SET_ACTOR_ACTION_6:
|
||||
case 55:
|
||||
case 77:
|
||||
case 84:
|
||||
|
@ -1739,12 +1739,12 @@ void Cutscene_ProcessCommands(GlobalContext* globalCtx, CutsceneContext* csCtx,
|
|||
for (j = 0; j < cmdEntries; j++) {
|
||||
cmd = (CsCmdBase*)cutscenePtr;
|
||||
if ((cmd->startFrame < csCtx->frames) && (csCtx->frames <= cmd->endFrame)) {
|
||||
csCtx->actorActions[5] = (void*)cutscenePtr;
|
||||
csCtx->npcActions[5] = (void*)cutscenePtr;
|
||||
}
|
||||
cutscenePtr += 0x30;
|
||||
}
|
||||
break;
|
||||
case 31:
|
||||
case CS_CMD_SET_ACTOR_ACTION_7:
|
||||
case 52:
|
||||
case 57:
|
||||
case 58:
|
||||
|
@ -1757,12 +1757,12 @@ void Cutscene_ProcessCommands(GlobalContext* globalCtx, CutsceneContext* csCtx,
|
|||
for (j = 0; j < cmdEntries; j++) {
|
||||
cmd = (CsCmdBase*)cutscenePtr;
|
||||
if ((cmd->startFrame < csCtx->frames) && (csCtx->frames <= cmd->endFrame)) {
|
||||
csCtx->actorActions[6] = (void*)cutscenePtr;
|
||||
csCtx->npcActions[6] = (void*)cutscenePtr;
|
||||
}
|
||||
cutscenePtr += 0x30;
|
||||
}
|
||||
break;
|
||||
case 49:
|
||||
case CS_CMD_SET_ACTOR_ACTION_8:
|
||||
case 60:
|
||||
case 89:
|
||||
case 111:
|
||||
|
@ -1774,18 +1774,18 @@ void Cutscene_ProcessCommands(GlobalContext* globalCtx, CutsceneContext* csCtx,
|
|||
for (j = 0; j < cmdEntries; j++) {
|
||||
cmd = (CsCmdBase*)cutscenePtr;
|
||||
if ((cmd->startFrame < csCtx->frames) && (csCtx->frames <= cmd->endFrame)) {
|
||||
csCtx->actorActions[7] = (void*)cutscenePtr;
|
||||
csCtx->npcActions[7] = (void*)cutscenePtr;
|
||||
}
|
||||
cutscenePtr += 0x30;
|
||||
}
|
||||
break;
|
||||
case 62:
|
||||
case CS_CMD_SET_ACTOR_ACTION_9:
|
||||
MemCopy(&cmdEntries, cutscenePtr, 4);
|
||||
cutscenePtr += 4;
|
||||
for (j = 0; j < cmdEntries; j++) {
|
||||
cmd = (CsCmdBase*)cutscenePtr;
|
||||
if ((cmd->startFrame < csCtx->frames) && (csCtx->frames <= cmd->endFrame)) {
|
||||
csCtx->actorActions[8] = (void*)cutscenePtr;
|
||||
csCtx->npcActions[8] = (void*)cutscenePtr;
|
||||
}
|
||||
cutscenePtr += 0x30;
|
||||
}
|
||||
|
@ -1796,7 +1796,7 @@ void Cutscene_ProcessCommands(GlobalContext* globalCtx, CutsceneContext* csCtx,
|
|||
for (j = 0; j < cmdEntries; j++) {
|
||||
cmd = (CsCmdBase*)cutscenePtr;
|
||||
if ((cmd->startFrame < csCtx->frames) && (csCtx->frames <= cmd->endFrame)) {
|
||||
csCtx->actorActions[9] = (void*)cutscenePtr;
|
||||
csCtx->npcActions[9] = (void*)cutscenePtr;
|
||||
}
|
||||
cutscenePtr += 0x30;
|
||||
}
|
||||
|
@ -1804,13 +1804,13 @@ void Cutscene_ProcessCommands(GlobalContext* globalCtx, CutsceneContext* csCtx,
|
|||
case CS_CMD_CAMERA_POS:
|
||||
cutscenePtr += Cutscene_Command_CameraPositions(globalCtx, csCtx, (void*)cutscenePtr, 0);
|
||||
break;
|
||||
case CS_CMD_CAMERA_POS_LINK:
|
||||
case CS_CMD_CAMERA_POS_PLAYER:
|
||||
cutscenePtr += Cutscene_Command_CameraPositions(globalCtx, csCtx, (void*)cutscenePtr, 1);
|
||||
break;
|
||||
case CS_CMD_CAMERA_FOCUS:
|
||||
cutscenePtr += Cutscene_Command_CameraFocus(globalCtx, csCtx, (void*)cutscenePtr, 0);
|
||||
break;
|
||||
case CS_CMD_CAMERA_FOCUS_LINK:
|
||||
case CS_CMD_CAMERA_FOCUS_PLAYER:
|
||||
cutscenePtr += Cutscene_Command_CameraFocus(globalCtx, csCtx, (void*)cutscenePtr, 1);
|
||||
break;
|
||||
case CS_CMD_07:
|
||||
|
@ -1900,7 +1900,7 @@ void func_80068DC0(GlobalContext* globalCtx, CutsceneContext* csCtx) {
|
|||
csCtx->linkAction = NULL;
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
csCtx->actorActions[i] = NULL;
|
||||
csCtx->npcActions[i] = NULL;
|
||||
}
|
||||
|
||||
// Translates to: "RIGHT HERE, HUH"
|
||||
|
@ -1943,7 +1943,7 @@ void func_80068ECC(GlobalContext* globalCtx, CutsceneContext* csCtx) {
|
|||
csCtx->linkAction = NULL;
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
csCtx->actorActions[i] = NULL;
|
||||
csCtx->npcActions[i] = NULL;
|
||||
}
|
||||
|
||||
csCtx->state++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue