summaryrefslogtreecommitdiff
path: root/ZAPD/OtherStructs/CutsceneMM_Commands.cpp
diff options
context:
space:
mode:
authorlouist103 <35883445+louist103@users.noreply.github.com>2024-01-09 20:17:20 -0500
committerGitHub <noreply@github.com>2024-01-09 20:17:20 -0500
commit9601f2699c142bb8273d33763ef4d84e8a7d650f (patch)
tree61be8e5ab2be9a83949a82e3c05c56eeb6afe13b /ZAPD/OtherStructs/CutsceneMM_Commands.cpp
parent5238d604ecb8d661008c1e1be64889f13cb054ec (diff)
Mm spline fixes (#311)
* Add enum file * Last fix
Diffstat (limited to 'ZAPD/OtherStructs/CutsceneMM_Commands.cpp')
-rw-r--r--ZAPD/OtherStructs/CutsceneMM_Commands.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/ZAPD/OtherStructs/CutsceneMM_Commands.cpp b/ZAPD/OtherStructs/CutsceneMM_Commands.cpp
index 004213d..b47bc40 100644
--- a/ZAPD/OtherStructs/CutsceneMM_Commands.cpp
+++ b/ZAPD/OtherStructs/CutsceneMM_Commands.cpp
@@ -137,14 +137,14 @@ CutsceneSubCommandEntry_SplineCamPoint::CutsceneSubCommandEntry_SplineCamPoint(c
posY = BitConverter::ToUInt16BE(rawData, rawDataIndex + 6);
posZ = BitConverter::ToUInt16BE(rawData, rawDataIndex + 8);
relTo = BitConverter::ToUInt16BE(rawData, rawDataIndex + 10);
- printf("%s\n", GetBodySourceCode().c_str());
-
}
-/*#define CS_CAM_POINT(interpType, weight, duration, posX, posY, posZ, relativeTo) \
- { CMD_BBH(interpType, weight, duration) }, { CMD_HH(posX, posY) }, { CMD_HH(posZ, relativeTo) }*/
+
std::string CutsceneSubCommandEntry_SplineCamPoint::GetBodySourceCode() const
{
- return StringHelper::Sprintf("CS_CAM_POINT(0x%02X, 0x%02X, 0x%04X, 0x%04X, 0x%04X, 0x%04X, 0x%04X)", interpType, weight, duration, posX, posY, posZ, relTo);
+ const auto interpTypeMap = &Globals::Instance->cfg.enumData.interpType;
+ const auto relToMap = &Globals::Instance->cfg.enumData.relTo;
+
+ return StringHelper::Sprintf("CS_CAM_POINT(%s, 0x%02X, 0x%04X, 0x%04X, 0x%04X, 0x%04X, %s)", interpTypeMap->at(interpType).c_str(), weight, duration, posX, posY, posZ, relToMap->at(relTo).c_str());
}
size_t CutsceneSubCommandEntry_SplineCamPoint::GetRawSize() const
@@ -162,9 +162,6 @@ CutsceneSubCommandEntry_SplineMiscPoint::CutsceneSubCommandEntry_SplineMiscPoint
unused1 = BitConverter::ToUInt16BE(rawData, rawDataIndex + 6);
}
-/*#define CS_CAM_MISC(unused0, roll, fov, unused1) \
- { CMD_HH(unused0, roll) }, { CMD_HH(fov, unused1) }*/
-
std::string CutsceneSubCommandEntry_SplineMiscPoint::GetBodySourceCode() const
{
return StringHelper::Sprintf("CS_CAM_MISC(0x%04X, 0x%04X, 0x%04X, 0x%04X)", unused0, roll, fov, unused1);
@@ -207,7 +204,7 @@ CutsceneSubCommandEntry_SplineFooter::CutsceneSubCommandEntry_SplineFooter(const
firstHalfWord, secondHalfWord));
}
}
-/*#define CS_CAM_END() */
+
std::string CutsceneSubCommandEntry_SplineFooter::GetBodySourceCode() const
{
return "CS_CAM_END()";
@@ -276,7 +273,6 @@ size_t CutsceneMMCommand_Spline::GetCommandSize() const
return 8 + (8 * numHeaders) + ((totalCommands * 2) * 0xC) + (totalCommands * 8) + 4;
}
-
/**** TRANSITION GENERAL ****/
CutsceneSubCommandEntry_TransitionGeneral::CutsceneSubCommandEntry_TransitionGeneral(