summaryrefslogtreecommitdiff
path: root/ZAPD/ZRoom/Commands/SetCsCamera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ZAPD/ZRoom/Commands/SetCsCamera.cpp')
-rw-r--r--ZAPD/ZRoom/Commands/SetCsCamera.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/ZAPD/ZRoom/Commands/SetCsCamera.cpp b/ZAPD/ZRoom/Commands/SetCsCamera.cpp
index 31bb6cf..5cf0a3d 100644
--- a/ZAPD/ZRoom/Commands/SetCsCamera.cpp
+++ b/ZAPD/ZRoom/Commands/SetCsCamera.cpp
@@ -1,5 +1,6 @@
#include "SetCsCamera.h"
+#include "Globals.h"
#include "Utils/BitConverter.h"
#include "Utils/StringHelper.h"
#include "ZFile.h"
@@ -39,9 +40,6 @@ void SetCsCamera::ParseRawData()
points.push_back(vec);
}
}
-
- if (segmentOffset != 0)
- parent->AddDeclarationPlaceholder(segmentOffset);
}
void SetCsCamera::DeclareReferences(const std::string& prefix)
@@ -52,9 +50,7 @@ void SetCsCamera::DeclareReferences(const std::string& prefix)
size_t index = 0;
for (auto& point : points)
{
- declaration +=
- StringHelper::Sprintf("\t%s, //0x%06X", point.GetBodySourceCode().c_str(),
- cameras.at(0).segmentOffset + (index * 6));
+ declaration += StringHelper::Sprintf("\t{ %s },", point.GetBodySourceCode().c_str());
if (index < points.size() - 1)
declaration += "\n";
@@ -73,7 +69,9 @@ void SetCsCamera::DeclareReferences(const std::string& prefix)
if (!cameras.empty())
{
- std::string camPointsName = parent->GetDeclarationName(cameras.at(0).GetSegmentOffset());
+ std::string camPointsName;
+ Globals::Instance->GetSegmentedPtrName(cameras.at(0).GetCamAddress(), parent, "Vec3s",
+ camPointsName);
std::string declaration;
size_t index = 0;
@@ -104,7 +102,8 @@ void SetCsCamera::DeclareReferences(const std::string& prefix)
std::string SetCsCamera::GetBodySourceCode() const
{
- std::string listName = parent->GetDeclarationPtrName(cmdArg2);
+ std::string listName;
+ Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "CsCameraEntry", listName);
return StringHelper::Sprintf("SCENE_CMD_ACTOR_CUTSCENE_CAM_LIST(%i, %s)", cameras.size(),
listName.c_str());
}