summaryrefslogtreecommitdiff
path: root/ZAPD/ZVtx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ZAPD/ZVtx.cpp')
-rw-r--r--ZAPD/ZVtx.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/ZAPD/ZVtx.cpp b/ZAPD/ZVtx.cpp
index 54420f0..d5214e8 100644
--- a/ZAPD/ZVtx.cpp
+++ b/ZAPD/ZVtx.cpp
@@ -1,4 +1,5 @@
#include "ZVtx.h"
+
#include "Utils/BitConverter.h"
#include "Utils/StringHelper.h"
#include "ZFile.h"
@@ -36,22 +37,17 @@ void ZVtx::ParseRawData()
a = rawData[rawDataIndex + 15];
}
-std::string ZVtx::GetBodySourceCode() const
+Declaration* ZVtx::DeclareVar(const std::string& prefix, const std::string& bodyStr)
{
- return StringHelper::Sprintf(" VTX(%i, %i, %i, %i, %i, %i, %i, %i, %i)", x, y, z, s, t, r, g,
- b, a);
+ Declaration* decl = ZResource::DeclareVar(prefix, bodyStr);
+ decl->isExternal = true;
+ return decl;
}
-std::string ZVtx::GetSourceOutputCode([[maybe_unused]] const std::string& prefix)
+std::string ZVtx::GetBodySourceCode() const
{
- std::string output = GetBodySourceCode();
-
- Declaration* decl = parent->AddDeclaration(rawDataIndex, DeclarationAlignment::Align16,
- GetRawDataSize(), GetSourceTypeName(), name, output);
- decl->isExternal = true;
- decl->staticConf = staticConf;
-
- return "";
+ return StringHelper::Sprintf("VTX(%i, %i, %i, %i, %i, %i, %i, %i, %i)", x, y, z, s, t, r, g, b,
+ a);
}
size_t ZVtx::GetRawDataSize() const
@@ -83,3 +79,8 @@ std::string ZVtx::GetExternalExtension() const
{
return "vtx";
}
+
+DeclarationAlignment ZVtx::GetDeclarationAlignment() const
+{
+ return DeclarationAlignment::Align16;
+}