diff options
| author | louist103 <35883445+louist103@users.noreply.github.com> | 2024-01-09 20:57:31 -0500 |
|---|---|---|
| committer | louist103 <35883445+louist103@users.noreply.github.com> | 2024-01-09 20:57:31 -0500 |
| commit | f30b7de367aceb8d3d09d12f4880bf4bd75972dd (patch) | |
| tree | 238c205cec921cea4c53d77e32904911c978ee4f /ZAPD/OtherStructs/CutsceneOoT_Commands.cpp | |
| parent | 01615a6c4c6f8e95149fd52ab85b1ae970167bc3 (diff) | |
| parent | 9601f2699c142bb8273d33763ef4d84e8a7d650f (diff) | |
conflicts
Diffstat (limited to 'ZAPD/OtherStructs/CutsceneOoT_Commands.cpp')
| -rw-r--r-- | ZAPD/OtherStructs/CutsceneOoT_Commands.cpp | 52 |
1 files changed, 24 insertions, 28 deletions
diff --git a/ZAPD/OtherStructs/CutsceneOoT_Commands.cpp b/ZAPD/OtherStructs/CutsceneOoT_Commands.cpp index 68d472a..f057739 100644 --- a/ZAPD/OtherStructs/CutsceneOoT_Commands.cpp +++ b/ZAPD/OtherStructs/CutsceneOoT_Commands.cpp @@ -15,9 +15,9 @@ const std::unordered_map<CutsceneOoT_CommandType, CsCommandListDescriptor> csCom {CutsceneOoT_CommandType::CS_CMD_LIGHT_SETTING, {"CS_LIGHT_SETTING", "(0x%02X, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}}, {CutsceneOoT_CommandType::CS_CMD_START_SEQ, - {"CS_START_SEQ", "(%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}}, + {"CS_START_SEQ", "(%s, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}}, {CutsceneOoT_CommandType::CS_CMD_STOP_SEQ, - {"CS_STOP_SEQ", "(%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}}, + {"CS_STOP_SEQ", "(%s, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}}, {CutsceneOoT_CommandType::CS_CMD_FADE_OUT_SEQ, {"CS_FADE_OUT_SEQ", "(%s, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}}, }; @@ -51,6 +51,7 @@ std::string CutsceneOoTSubCommandEntry_GenericCmd::GetBodySourceCode() const bool isIndexInMisc = enumData->miscType.find(base) != enumData->miscType.end(); bool isIndexInFade = enumData->fadeOutSeqPlayer.find(base) != enumData->fadeOutSeqPlayer.end(); + bool isIndexInSeqId = enumData->seqId.find(base - 1) != enumData->seqId.end(); std::string entryFmt = element->second.cmdMacro; std::string firstArg; entryFmt += element->second.args; @@ -59,24 +60,16 @@ std::string CutsceneOoTSubCommandEntry_GenericCmd::GetBodySourceCode() const firstArg = enumData->miscType[base]; else if (commandId == CutsceneOoT_CommandType::CS_CMD_FADE_OUT_SEQ && isIndexInFade) firstArg = enumData->fadeOutSeqPlayer[base]; + else if (commandId == CutsceneOoT_CommandType::CS_CMD_START_SEQ && isIndexInSeqId) + firstArg = enumData->seqId[base - 1]; + else if (commandId == CutsceneOoT_CommandType::CS_CMD_STOP_SEQ && isIndexInSeqId) + firstArg = enumData->seqId[base - 1]; else { - bool baseOne = (commandId == CutsceneOoT_CommandType::CS_CMD_LIGHT_SETTING || - commandId == CutsceneOoT_CommandType::CS_CMD_START_SEQ || - commandId == CutsceneOoT_CommandType::CS_CMD_STOP_SEQ); - - return StringHelper::Sprintf(entryFmt.c_str(), firstArg.c_str(), startFrame, endFrame, - pad, unused1, unused2, unused3, unused4, unused5, unused6, + return StringHelper::Sprintf(entryFmt.c_str(), base - 1, startFrame, endFrame, pad, + unused1, unused2, unused3, unused4, unused5, unused6, unused7, unused8, unused9, unused10); - - //return StringHelper::Sprintf(entryFmt.c_str(), baseOne ? base - 1 : base, startFrame, - //endFrame, pad, unused1, unused2, unused3, unused4, unused5, - //unused6, unused7, unused8, unused9, unused10); } - - //return StringHelper::Sprintf(entryFmt.c_str(), firstArg.c_str(), startFrame, endFrame, pad, - //unused1, unused2, unused3, unused4, unused5, unused6, unused7, - //unused8, unused9, unused10); } return StringHelper::Sprintf("CS_UNK_DATA(0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, " "0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X)", @@ -276,9 +269,11 @@ std::string CutsceneOoTSubCommandEntry_Text::GetBodySourceCode() const { return StringHelper::Sprintf("CS_TEXT_NONE(%i, %i)", startFrame, endFrame); } - if (type == 2) + if (type == 2 && + enumData->ocarinaSongActionId.find(base) != enumData->ocarinaSongActionId.end()) { - return StringHelper::Sprintf("CS_TEXT_OCARINA_ACTION(%i, %i, %i, 0x%X)", base, startFrame, + return StringHelper::Sprintf("CS_TEXT_OCARINA_ACTION(%s, %i, %i, 0x%X)", + enumData->ocarinaSongActionId[base].c_str(), startFrame, endFrame, textId1); } @@ -339,24 +334,25 @@ CutsceneOoTSubCommandEntry_ActorCue::CutsceneOoTSubCommandEntry_ActorCue( std::string CutsceneOoTSubCommandEntry_ActorCue::GetBodySourceCode() const { - std::string result; + EnumData* enumData = &Globals::Instance->cfg.enumData; if (static_cast<CutsceneOoT_CommandType>(commandID) == CutsceneOoT_CommandType::CS_CMD_PLAYER_CUE) { - result = "CS_PLAYER_CUE"; + return StringHelper::Sprintf("CS_PLAYER_CUE(%s, %i, %i, 0x%04X, 0x%04X, 0x%04X, %i, %i, " + "%i, %i, %i, %i, %.8ef, %.8ef, %.8ef)", + enumData->playerCueId[base].c_str(), startFrame, endFrame, + rotX, rotY, rotZ, startPosX, startPosY, startPosZ, endPosX, + endPosY, endPosZ, normalX, normalY, normalZ); } else { - result = "CS_ACTOR_CUE"; + return StringHelper::Sprintf("CS_ACTOR_CUE(%i, %i, %i, 0x%04X, 0x%04X, 0x%04X, %i, %i, " + "%i, %i, %i, %i, %.8ef, %.8ef, %.8ef)", + base, startFrame, endFrame, rotX, rotY, rotZ, startPosX, + startPosY, startPosZ, endPosX, endPosY, endPosZ, normalX, + normalY, normalZ); } - - result += - StringHelper::Sprintf("(%i, %i, %i, 0x%04X, 0x%04X, 0x%04X, %i, %i, " - "%i, %i, %i, %i, %.8ef, %.8ef, %.8ef)", - base, startFrame, endFrame, rotX, rotY, rotZ, startPosX, startPosY, - startPosZ, endPosX, endPosY, endPosZ, normalX, normalY, normalZ); - return result; } size_t CutsceneOoTSubCommandEntry_ActorCue::GetRawSize() const |
