summaryrefslogtreecommitdiff
path: root/ZAPD
diff options
context:
space:
mode:
Diffstat (limited to 'ZAPD')
-rw-r--r--ZAPD/GameConfig.cpp6
-rw-r--r--ZAPD/GameConfig.h2
-rw-r--r--ZAPD/OtherStructs/CutsceneMM_Commands.cpp16
3 files changed, 14 insertions, 10 deletions
diff --git a/ZAPD/GameConfig.cpp b/ZAPD/GameConfig.cpp
index cf6cdcc..2140464 100644
--- a/ZAPD/GameConfig.cpp
+++ b/ZAPD/GameConfig.cpp
@@ -247,6 +247,12 @@ void GameConfig::ConfigFunc_EnumData(const tinyxml2::XMLElement& element)
else if (enumKey == "endSfx")
enumData.endSfx[itemIndex] = itemID;
+
+ else if (enumKey == "csSplineInterpType")
+ enumData.interpType[itemIndex] = itemID;
+
+ else if (enumKey == "csSplineRelTo")
+ enumData.relTo[itemIndex] = itemID;
}
}
}
diff --git a/ZAPD/GameConfig.h b/ZAPD/GameConfig.h
index 838d2da..4f3b91f 100644
--- a/ZAPD/GameConfig.h
+++ b/ZAPD/GameConfig.h
@@ -48,6 +48,8 @@ public:
std::map<uint16_t, std::string> rumbleType;
std::map<uint8_t, std::string> spawnFlag;
std::map<uint8_t, std::string> endSfx;
+ std::map<uint8_t, std::string> interpType;
+ std::map<uint16_t, std::string> relTo;
};
class ZFile;
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(