summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Estelami <NEstelami@users.noreply.github.com>2022-01-10 23:35:30 -0500
committerNicholas Estelami <NEstelami@users.noreply.github.com>2022-01-10 23:35:30 -0500
commit2087ee55733e2b30f078d426434b23696d646ac2 (patch)
tree06de1afda3f5bba7ad2f1860edc7ab72278f1b08
parent768ac46d172efeee4616cf3472ed4a69bf5678ec (diff)
Naming updates
-rw-r--r--CFG/Config.xml2
-rw-r--r--OTRExporter/AnimationExporter.cpp12
-rw-r--r--OTRExporter/AnimationExporter.h2
-rw-r--r--OTRExporter/ArrayExporter.cpp4
-rw-r--r--OTRExporter/ArrayExporter.h2
-rw-r--r--OTRExporter/BackgroundExporter.cpp2
-rw-r--r--OTRExporter/BackgroundExporter.h2
-rw-r--r--OTRExporter/CollisionExporter.cpp4
-rw-r--r--OTRExporter/CollisionExporter.h2
-rw-r--r--OTRExporter/CutsceneExporter.cpp6
-rw-r--r--OTRExporter/DisplayListExporter.cpp10
-rw-r--r--OTRExporter/DisplayListExporter.h2
-rw-r--r--OTRExporter/Exporter.cpp (renamed from OTRExporter/OTRExporter.cpp)6
-rw-r--r--OTRExporter/Exporter.h (renamed from OTRExporter/OTRExporter.h)6
-rw-r--r--OTRExporter/Main.cpp28
-rw-r--r--OTRExporter/Main.h4
-rw-r--r--OTRExporter/OTRExporter.vcxproj12
-rw-r--r--OTRExporter/OTRExporter.vcxproj.filters20
-rw-r--r--OTRExporter/PathExporter.cpp2
-rw-r--r--OTRExporter/PathExporter.h2
-rw-r--r--OTRExporter/PlayerAnimationExporter.cpp6
-rw-r--r--OTRExporter/PlayerAnimationExporter.h2
-rw-r--r--OTRExporter/RoomExporter.cpp4
-rw-r--r--OTRExporter/RoomExporter.h2
-rw-r--r--OTRExporter/SkeletonExporter.cpp (renamed from OTRExporter/OTRSkeletonExporter.cpp)6
-rw-r--r--OTRExporter/SkeletonExporter.h (renamed from OTRExporter/OTRSkeletonExporter.h)2
-rw-r--r--OTRExporter/SkeletonLimbExporter.cpp (renamed from OTRExporter/OTRSkeletonLimbExporter.cpp)6
-rw-r--r--OTRExporter/SkeletonLimbExporter.h (renamed from OTRExporter/OTRSkeletonLimbExporter.h)2
-rw-r--r--OTRExporter/TextureExporter.cpp2
-rw-r--r--OTRExporter/TextureExporter.h2
-rw-r--r--OTRExporter/VtxExporter.cpp8
-rw-r--r--OTRExporter/VtxExporter.h2
-rwxr-xr-xextract_assets.py10
33 files changed, 93 insertions, 91 deletions
diff --git a/CFG/Config.xml b/CFG/Config.xml
index 483ebc5..1c6b31b 100644
--- a/CFG/Config.xml
+++ b/CFG/Config.xml
@@ -2,6 +2,6 @@
<SymbolMap File="SymbolMap_OoTMqDbg.txt"/>
<ActorList File="ActorList_OoTMqDbg.txt"/>
<ObjectList File="ObjectList_OoTMqDbg.txt"/>
- <ExternalXMLFolder Path="assets/xml/"/>
+ <ExternalXMLFolder Path="../otr/assets/xml/"/>
<ExternalFile XmlPath="objects/gameplay_keep.xml" OutPath="objects/gameplay_keep/"/>
</Root>
diff --git a/OTRExporter/AnimationExporter.cpp b/OTRExporter/AnimationExporter.cpp
index eed3f6d..8f0b9be 100644
--- a/OTRExporter/AnimationExporter.cpp
+++ b/OTRExporter/AnimationExporter.cpp
@@ -1,24 +1,24 @@
#include "AnimationExporter.h"
-#include <OTRAnimation.h>
+#include <Animation.h>
void OTRExporter_Animation::Save(ZResource* res, const fs::path outPath, BinaryWriter* writer)
{
ZAnimation* anim = (ZAnimation*)res;
- WriteHeader(res, outPath, writer, OtrLib::ResourceType::OTRAnimation);
+ WriteHeader(res, outPath, writer, Ship::ResourceType::OTRAnimation);
ZNormalAnimation* normalAnim = dynamic_cast<ZNormalAnimation*>(anim);
ZCurveAnimation* curveAnim = dynamic_cast<ZCurveAnimation*>(anim);
ZLinkAnimation* linkAnim = dynamic_cast<ZLinkAnimation*>(anim);
if (linkAnim != nullptr)
{
- writer->Write((uint32_t)OtrLib::AnimationType::Link);
+ writer->Write((uint32_t)Ship::AnimationType::Link);
writer->Write((uint16_t)linkAnim->frameCount);
writer->Write((uint32_t)linkAnim->segmentAddress);
}
else if (curveAnim != nullptr)
{
- writer->Write((uint32_t)OtrLib::AnimationType::Curve);
+ writer->Write((uint32_t)Ship::AnimationType::Curve);
writer->Write((uint16_t)curveAnim->frameCount);
writer->Write((uint32_t)curveAnim->refIndexArr.size());
@@ -44,7 +44,7 @@ void OTRExporter_Animation::Save(ZResource* res, const fs::path outPath, BinaryW
}
else if (normalAnim != nullptr)
{
- writer->Write((uint32_t)OtrLib::AnimationType::Normal);
+ writer->Write((uint32_t)Ship::AnimationType::Normal);
writer->Write((uint16_t)normalAnim->frameCount);
writer->Write((uint32_t)normalAnim->rotationValues.size());
@@ -65,6 +65,6 @@ void OTRExporter_Animation::Save(ZResource* res, const fs::path outPath, BinaryW
}
else
{
- writer->Write((uint32_t)OtrLib::AnimationType::Legacy);
+ writer->Write((uint32_t)Ship::AnimationType::Legacy);
}
}
diff --git a/OTRExporter/AnimationExporter.h b/OTRExporter/AnimationExporter.h
index 66fad50..ec5a5b8 100644
--- a/OTRExporter/AnimationExporter.h
+++ b/OTRExporter/AnimationExporter.h
@@ -3,7 +3,7 @@
#include "ZResource.h"
#include "ZTexture.h"
#include "ZAnimation.h"
-#include "OTRExporter.h"
+#include "Exporter.h"
#include <Utils/BinaryWriter.h>
class OTRExporter_Animation : public OTRExporter
diff --git a/OTRExporter/ArrayExporter.cpp b/OTRExporter/ArrayExporter.cpp
index 7fc73fa..484cf1b 100644
--- a/OTRExporter/ArrayExporter.cpp
+++ b/OTRExporter/ArrayExporter.cpp
@@ -4,7 +4,7 @@ void OTRExporter_Array::Save(ZResource* res, fs::path outPath, BinaryWriter* wri
{
ZArray* arr = (ZArray*)res;
- WriteHeader(res, outPath, writer, OtrLib::ResourceType::OTRArray);
+ WriteHeader(res, outPath, writer, Ship::ResourceType::OTRArray);
writer->Write((uint32_t)arr->resList[0]->GetResourceType());
writer->Write((uint32_t)arr->arrayCnt);
@@ -57,6 +57,6 @@ void OTRExporter_Array::Save(ZResource* res, fs::path outPath, BinaryWriter* wri
//}
//else if (arr->resList[0]->GetResourceType() == ZResourceType::Vector)
//{
- // WriteHeader(res, outPath, writer, OtrLib::ResourceType::OTRVtx);
+ // WriteHeader(res, outPath, writer, Ship::ResourceType::OTRVtx);
//}
} \ No newline at end of file
diff --git a/OTRExporter/ArrayExporter.h b/OTRExporter/ArrayExporter.h
index bb2c067..cb4101b 100644
--- a/OTRExporter/ArrayExporter.h
+++ b/OTRExporter/ArrayExporter.h
@@ -1,7 +1,7 @@
#pragma once
#include "ZResource.h"
#include "ZArray.h"
-#include "OTRExporter.h"
+#include "Exporter.h"
#include <Utils/BinaryWriter.h>
class OTRExporter_Array : public OTRExporter
diff --git a/OTRExporter/BackgroundExporter.cpp b/OTRExporter/BackgroundExporter.cpp
index 08a4896..fcae5e1 100644
--- a/OTRExporter/BackgroundExporter.cpp
+++ b/OTRExporter/BackgroundExporter.cpp
@@ -17,5 +17,5 @@ void OTRExporter_Background::Save(ZResource* res, fs::path outPath, BinaryWriter
auto end = std::chrono::steady_clock::now();
size_t diff = std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();
- printf("Exported BG %s in %zums\n", bg->GetName().c_str(), diff);
+ //printf("Exported BG %s in %zums\n", bg->GetName().c_str(), diff);
} \ No newline at end of file
diff --git a/OTRExporter/BackgroundExporter.h b/OTRExporter/BackgroundExporter.h
index d631f46..30202de 100644
--- a/OTRExporter/BackgroundExporter.h
+++ b/OTRExporter/BackgroundExporter.h
@@ -2,7 +2,7 @@
#include "ZResource.h"
#include "ZBackground.h"
-#include "OTRExporter.h"
+#include "Exporter.h"
#include <Utils/BinaryWriter.h>
class OTRExporter_Background : public OTRExporter
diff --git a/OTRExporter/CollisionExporter.cpp b/OTRExporter/CollisionExporter.cpp
index 7c567ed..cec5420 100644
--- a/OTRExporter/CollisionExporter.cpp
+++ b/OTRExporter/CollisionExporter.cpp
@@ -1,11 +1,11 @@
#include "CollisionExporter.h"
-#include <OTRResource.h>
+#include <Resource.h>
void OTRExporter_Collision::Save(ZResource* res, fs::path outPath, BinaryWriter* writer)
{
ZCollisionHeader* col = (ZCollisionHeader*)res;
- WriteHeader(res, outPath, writer, OtrLib::ResourceType::OTRCollisionHeader);
+ WriteHeader(res, outPath, writer, Ship::ResourceType::OTRCollisionHeader);
writer->Write(col->absMinX);
writer->Write(col->absMinY);
diff --git a/OTRExporter/CollisionExporter.h b/OTRExporter/CollisionExporter.h
index c3a2a0f..196383d 100644
--- a/OTRExporter/CollisionExporter.h
+++ b/OTRExporter/CollisionExporter.h
@@ -2,7 +2,7 @@
#include "ZResource.h"
#include "ZCollision.h"
-#include "OTRExporter.h"
+#include "Exporter.h"
class OTRExporter_Collision : public OTRExporter
{
diff --git a/OTRExporter/CutsceneExporter.cpp b/OTRExporter/CutsceneExporter.cpp
index a39505e..a20edfa 100644
--- a/OTRExporter/CutsceneExporter.cpp
+++ b/OTRExporter/CutsceneExporter.cpp
@@ -1,13 +1,13 @@
#include "CutsceneExporter.h"
-#include <OTRResource.h>
+#include <Resource.h>
void OTRExporter_Cutscene::Save(ZResource* res, fs::path outPath, BinaryWriter* writer)
{
ZCutscene* cs = (ZCutscene*)res;
writer->Write((uint8_t)Endianess::Little);
- writer->Write((uint32_t)OtrLib::ResourceType::OTRCutscene);
- writer->Write((uint32_t)OtrLib::OTRVersion::Deckard);
+ writer->Write((uint32_t)Ship::ResourceType::OTRCutscene);
+ writer->Write((uint32_t)Ship::Version::Deckard);
writer->Write((uint64_t)0xDEADBEEFDEADBEEF); // id
//writer->Write((uint32_t)cs->commands.size() + 2 + 2);
diff --git a/OTRExporter/DisplayListExporter.cpp b/OTRExporter/DisplayListExporter.cpp
index 546da76..9a4356b 100644
--- a/OTRExporter/DisplayListExporter.cpp
+++ b/OTRExporter/DisplayListExporter.cpp
@@ -48,7 +48,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, fs::path outPath, BinaryWrite
printf("Exporting DList %s\n", dList->GetName().c_str());
- WriteHeader(res, outPath, writer, OtrLib::ResourceType::OTRDisplayList);
+ WriteHeader(res, outPath, writer, Ship::ResourceType::OTRDisplayList);
while (writer->GetBaseAddress() % 8 != 0)
writer->Write((uint8_t)0xFF);
@@ -661,8 +661,8 @@ void OTRExporter_DisplayList::Save(ZResource* res, fs::path outPath, BinaryWrite
}*/
//#ifdef _DEBUG
- //if (otrArchive->HasFile(fName))
- //otrArchive->RemoveFile(fName);
+ //if (otrotrArchive->HasFile(fName))
+ //otrotrArchive->RemoveFile(fName);
//#endif
otrArchive->AddFile(fName, (uintptr_t)vtxStream->ToVector().data(), vtxWriter.GetBaseAddress());
@@ -670,7 +670,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, fs::path outPath, BinaryWrite
auto end = std::chrono::steady_clock::now();
size_t diff = std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();
- printf("Exported VTX Array %s in %zums\n", fName.c_str(), diff);
+ //printf("Exported VTX Array %s in %zums\n", fName.c_str(), diff);
}
}
}
@@ -699,7 +699,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, fs::path outPath, BinaryWrite
auto dlEnd = std::chrono::steady_clock::now();
size_t dlDiff = std::chrono::duration_cast<std::chrono::milliseconds>(dlEnd - dlStart).count();
- printf("Display List Gen in %zums\n", dlDiff);
+ //printf("Display List Gen in %zums\n", dlDiff);
}
std::string OTRExporter_DisplayList::GetPathToRes(ZResource* res, std::string varName)
diff --git a/OTRExporter/DisplayListExporter.h b/OTRExporter/DisplayListExporter.h
index c0c7402..d7d183a 100644
--- a/OTRExporter/DisplayListExporter.h
+++ b/OTRExporter/DisplayListExporter.h
@@ -3,7 +3,7 @@
#include "ZResource.h"
#include "ZTexture.h"
#include "ZDisplayList.h"
-#include "OTRExporter.h"
+#include "Exporter.h"
#include <Utils/BinaryWriter.h>
class OTRExporter_DisplayList : public OTRExporter
diff --git a/OTRExporter/OTRExporter.cpp b/OTRExporter/Exporter.cpp
index 234ef31..e814244 100644
--- a/OTRExporter/OTRExporter.cpp
+++ b/OTRExporter/Exporter.cpp
@@ -1,9 +1,9 @@
-#include "OTRExporter.h"
+#include "Exporter.h"
-void OTRExporter::WriteHeader(ZResource* res, fs::path outPath, BinaryWriter* writer, OtrLib::ResourceType resType)
+void OTRExporter::WriteHeader(ZResource* res, fs::path outPath, BinaryWriter* writer, Ship::ResourceType resType)
{
writer->Write((uint8_t)Endianess::Little);
writer->Write((uint32_t)resType);
- writer->Write((uint32_t)OtrLib::OTRVersion::Deckard);
+ writer->Write((uint32_t)Ship::Version::Deckard);
writer->Write((uint64_t)0xDEADBEEFDEADBEEF); // id
}
diff --git a/OTRExporter/OTRExporter.h b/OTRExporter/Exporter.h
index 924d7ee..56cb25e 100644
--- a/OTRExporter/OTRExporter.h
+++ b/OTRExporter/Exporter.h
@@ -1,12 +1,12 @@
#pragma once
#include "ZResource.h"
#include "ZArray.h"
-#include "OTRExporter.h"
+//#include "OTRExporter.h"
#include <Utils/BinaryWriter.h>
-#include <OTRResource.h>
+#include <Resource.h>
class OTRExporter : public ZResourceExporter
{
protected:
- void WriteHeader(ZResource* res, fs::path outPath, BinaryWriter* writer, OtrLib::ResourceType resType);
+ void WriteHeader(ZResource* res, fs::path outPath, BinaryWriter* writer, Ship::ResourceType resType);
}; \ No newline at end of file
diff --git a/OTRExporter/Main.cpp b/OTRExporter/Main.cpp
index 16db56f..50c61bc 100644
--- a/OTRExporter/Main.cpp
+++ b/OTRExporter/Main.cpp
@@ -1,13 +1,13 @@
-#include <OTRArchive.h>
-//#include <Factories/OTRArchiveFactory.h>
+#include <Archive.h>
+//#include <Factories/ARCHIVEFactory.h>
#include "BackgroundExporter.h"
#include "TextureExporter.h"
#include "RoomExporter.h"
#include "CollisionExporter.h"
#include "DisplayListExporter.h"
#include "PlayerAnimationExporter.h"
-#include "OTRSkeletonExporter.h"
-#include "OTRSkeletonLimbExporter.h"
+#include "SkeletonExporter.h"
+#include "SkeletonLimbExporter.h"
#include "ArrayExporter.h"
#include "VtxExporter.h"
#include "AnimationExporter.h"
@@ -19,7 +19,7 @@
#include <Utils/MemoryStream.h>
#include <Utils/BinaryWriter.h>
-std::shared_ptr<OtrLib::OTRArchive> otrArchive;
+std::shared_ptr<Ship::Archive> otrArchive;
BinaryWriter* fileWriter;
std::chrono::steady_clock::time_point fileStart, resStart;
@@ -70,7 +70,7 @@ static bool ExporterProcessFileMode(ZFileMode fileMode)
static void ExporterFileBegin(ZFile* file)
{
- printf("ExporterFileBegin() called on ZFile %s.\n", file->GetName().c_str());
+ //printf("ExporterFileBegin() called on ZFile %s.\n", file->GetName().c_str());
fileStart = std::chrono::steady_clock::now();
@@ -80,12 +80,12 @@ static void ExporterFileBegin(ZFile* file)
static void ExporterFileEnd(ZFile* file)
{
- printf("ExporterFileEnd() called on ZFile %s.\n", file->GetName().c_str());
+ //printf("ExporterFileEnd() called on ZFile %s.\n", file->GetName().c_str());
auto fileEnd = std::chrono::steady_clock::now();
size_t diff = std::chrono::duration_cast<std::chrono::milliseconds>(fileEnd - fileStart).count();
- printf("File Export Ended %s in %zums\n", file->GetName().c_str(), diff);
+ //printf("File Export Ended %s in %zums\n", file->GetName().c_str(), diff);
//MemoryStream* strem = (MemoryStream*)fileWriter->GetStream().get();
//otrArchive->AddFile(file->GetName(), (uintptr_t)strem->ToVector().data(), strem->GetLength());
@@ -136,24 +136,24 @@ static void ExporterResourceEnd(ZResource* res, BinaryWriter& writer)
size_t diff = std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();
//if (diff > 10)
- printf("Exported Resource End %s in %zums\n", res->GetName().c_str(), diff);
+ //printf("Exported Resource End %s in %zums\n", res->GetName().c_str(), diff);
}
static void ExporterXMLBegin()
{
- printf("ExporterXMLBegin() called.\n");
+ //printf("ExporterXMLBegin() called.\n");
if (File::Exists("oot.otr"))
- otrArchive = std::shared_ptr<OtrLib::OTRArchive>(new OtrLib::OTRArchive("oot.otr"));
+ otrArchive = std::shared_ptr<Ship::Archive>(new Ship::Archive("oot.otr"));
else
- otrArchive = OtrLib::OTRArchive::CreateArchive("oot.otr");
+ otrArchive = Ship::Archive::CreateArchive("oot.otr");
}
static void ExporterXMLEnd()
{
- printf("ExporterXMLEnd() called.\n");
+ //printf("ExporterXMLEnd() called.\n");
- //otrArchive;
+ //ARCHIVE;
}
static void ImportExporters()
diff --git a/OTRExporter/Main.h b/OTRExporter/Main.h
index b0255e1..a29e218 100644
--- a/OTRExporter/Main.h
+++ b/OTRExporter/Main.h
@@ -1,5 +1,5 @@
#pragma once
-#include <OTRArchive.h>
+#include <Archive.h>
-extern std::shared_ptr<OtrLib::OTRArchive> otrArchive; \ No newline at end of file
+extern std::shared_ptr<Ship::Archive> otrArchive; \ No newline at end of file
diff --git a/OTRExporter/OTRExporter.vcxproj b/OTRExporter/OTRExporter.vcxproj
index ddaa07f..7b640c2 100644
--- a/OTRExporter/OTRExporter.vcxproj
+++ b/OTRExporter/OTRExporter.vcxproj
@@ -27,9 +27,9 @@
<ClInclude Include="DisplayListExporter.h" />
<ClInclude Include="AnimationExporter.h" />
<ClInclude Include="Main.h" />
- <ClInclude Include="OTRExporter.h" />
- <ClInclude Include="OTRSkeletonExporter.h" />
- <ClInclude Include="OTRSkeletonLimbExporter.h" />
+ <ClInclude Include="Exporter.h" />
+ <ClInclude Include="SkeletonExporter.h" />
+ <ClInclude Include="SkeletonLimbExporter.h" />
<ClInclude Include="PathExporter.h" />
<ClInclude Include="PlayerAnimationExporter.h" />
<ClInclude Include="RoomExporter.h" />
@@ -46,9 +46,9 @@
<ClCompile Include="DisplayListExporter.cpp" />
<ClCompile Include="AnimationExporter.cpp" />
<ClCompile Include="Main.cpp" />
- <ClCompile Include="OTRExporter.cpp" />
- <ClCompile Include="OTRSkeletonExporter.cpp" />
- <ClCompile Include="OTRSkeletonLimbExporter.cpp" />
+ <ClCompile Include="Exporter.cpp" />
+ <ClCompile Include="SkeletonExporter.cpp" />
+ <ClCompile Include="SkeletonLimbExporter.cpp" />
<ClCompile Include="PathExporter.cpp" />
<ClCompile Include="PlayerAnimationExporter.cpp" />
<ClCompile Include="RoomExporter.cpp" />
diff --git a/OTRExporter/OTRExporter.vcxproj.filters b/OTRExporter/OTRExporter.vcxproj.filters
index eff628c..ed559ee 100644
--- a/OTRExporter/OTRExporter.vcxproj.filters
+++ b/OTRExporter/OTRExporter.vcxproj.filters
@@ -33,12 +33,6 @@
<ClInclude Include="PlayerAnimationExporter.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="OTRSkeletonExporter.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="OTRSkeletonLimbExporter.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="BackgroundExporter.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -48,7 +42,7 @@
<ClInclude Include="ArrayExporter.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="OTRExporter.h">
+ <ClInclude Include="Exporter.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="AnimationExporter.h">
@@ -69,6 +63,12 @@
<ClInclude Include="PathExporter.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="SkeletonExporter.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="SkeletonLimbExporter.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="CollisionExporter.cpp">
@@ -89,10 +89,10 @@
<ClCompile Include="PlayerAnimationExporter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="OTRSkeletonExporter.cpp">
+ <ClCompile Include="SkeletonExporter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="OTRSkeletonLimbExporter.cpp">
+ <ClCompile Include="SkeletonLimbExporter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="BackgroundExporter.cpp">
@@ -104,7 +104,7 @@
<ClCompile Include="ArrayExporter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="OTRExporter.cpp">
+ <ClCompile Include="Exporter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="AnimationExporter.cpp">
diff --git a/OTRExporter/PathExporter.cpp b/OTRExporter/PathExporter.cpp
index ed00646..a5357b6 100644
--- a/OTRExporter/PathExporter.cpp
+++ b/OTRExporter/PathExporter.cpp
@@ -5,7 +5,7 @@ void OTRExporter_Path::Save(ZResource* res, fs::path outPath, BinaryWriter* writ
{
ZPath* path = (ZPath*)res;
- WriteHeader(res, outPath, writer, OtrLib::ResourceType::OTRPath);
+ WriteHeader(res, outPath, writer, Ship::ResourceType::OTRPath);
writer->Write((uint32_t)path->pathways[0].points.size());
diff --git a/OTRExporter/PathExporter.h b/OTRExporter/PathExporter.h
index 50beb08..a30dccf 100644
--- a/OTRExporter/PathExporter.h
+++ b/OTRExporter/PathExporter.h
@@ -2,7 +2,7 @@
#include "ZResource.h"
#include "ZPath.h"
-#include "OTRExporter.h"
+#include "Exporter.h"
#include <Utils/BinaryWriter.h>
class OTRExporter_Path : public OTRExporter
diff --git a/OTRExporter/PlayerAnimationExporter.cpp b/OTRExporter/PlayerAnimationExporter.cpp
index 934ebec..78bdd6c 100644
--- a/OTRExporter/PlayerAnimationExporter.cpp
+++ b/OTRExporter/PlayerAnimationExporter.cpp
@@ -1,11 +1,11 @@
#include "PlayerAnimationExporter.h"
-#include <OTRResource.h>
+#include <Resource.h>
void OTRExporter_PlayerAnimationExporter::Save(ZResource* res, fs::path outPath, BinaryWriter* writer)
{
ZPlayerAnimationData* anim = (ZPlayerAnimationData*)res;
- WriteHeader(res, outPath, writer, OtrLib::ResourceType::OTRPlayerAnimation);
+ WriteHeader(res, outPath, writer, Ship::ResourceType::OTRPlayerAnimation);
auto start = std::chrono::steady_clock::now();
@@ -17,5 +17,5 @@ void OTRExporter_PlayerAnimationExporter::Save(ZResource* res, fs::path outPath,
auto end = std::chrono::steady_clock::now();
size_t diff = std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();
- printf("Exported Player Anim %s in %zums\n", anim->GetName().c_str(), diff);
+ //printf("Exported Player Anim %s in %zums\n", anim->GetName().c_str(), diff);
}
diff --git a/OTRExporter/PlayerAnimationExporter.h b/OTRExporter/PlayerAnimationExporter.h
index 6351830..9de7f20 100644
--- a/OTRExporter/PlayerAnimationExporter.h
+++ b/OTRExporter/PlayerAnimationExporter.h
@@ -3,7 +3,7 @@
#include "ZResource.h"
#include "ZTexture.h"
#include "ZPlayerAnimationData.h"
-#include "OTRExporter.h"
+#include "Exporter.h"
#include <Utils/BinaryWriter.h>
class OTRExporter_PlayerAnimationExporter : public OTRExporter
diff --git a/OTRExporter/RoomExporter.cpp b/OTRExporter/RoomExporter.cpp
index 0269506..646f413 100644
--- a/OTRExporter/RoomExporter.cpp
+++ b/OTRExporter/RoomExporter.cpp
@@ -23,7 +23,7 @@
#include <ZRoom/Commands/SetAlternateHeaders.h>
#include "CollisionExporter.h"
#include "DisplayListExporter.h"
-#include "OTRResource.h"
+#include "Resource.h"
#include <Globals.h>
#include <ZRoom/Commands/SetExitList.h>
#include <ZRoom/Commands/SetPathways.h>
@@ -38,7 +38,7 @@ void OTRExporter_Room::Save(ZResource* res, const fs::path outPath, BinaryWriter
{
ZRoom* room = (ZRoom*)res;
- WriteHeader(res, outPath, writer, OtrLib::ResourceType::OTRRoom);
+ WriteHeader(res, outPath, writer, Ship::ResourceType::OTRRoom);
writer->Write((uint32_t)room->commands.size());
diff --git a/OTRExporter/RoomExporter.h b/OTRExporter/RoomExporter.h
index d342cf9..27eaf75 100644
--- a/OTRExporter/RoomExporter.h
+++ b/OTRExporter/RoomExporter.h
@@ -1,7 +1,7 @@
#pragma once
#include "ZResource.h"
-#include "OTRExporter.h"
+#include "Exporter.h"
#include "ZRoom/ZRoom.h"
class PolygonDlist;
diff --git a/OTRExporter/OTRSkeletonExporter.cpp b/OTRExporter/SkeletonExporter.cpp
index eaba5ab..5e3a1e1 100644
--- a/OTRExporter/OTRSkeletonExporter.cpp
+++ b/OTRExporter/SkeletonExporter.cpp
@@ -1,11 +1,11 @@
-#include "OTRSkeletonExporter.h"
-#include <OTRResource.h>
+#include "SkeletonExporter.h"
+#include <Resource.h>
void OTRExporter_Skeleton::Save(ZResource* res, fs::path outPath, BinaryWriter* writer)
{
ZSkeleton* skel = (ZSkeleton*)res;
- WriteHeader(res, outPath, writer, OtrLib::ResourceType::OTRSkeleton);
+ WriteHeader(res, outPath, writer, Ship::ResourceType::OTRSkeleton);
writer->Write((uint8_t)skel->type);
writer->Write((uint8_t)skel->limbType);
diff --git a/OTRExporter/OTRSkeletonExporter.h b/OTRExporter/SkeletonExporter.h
index 005433a..57b96fc 100644
--- a/OTRExporter/OTRSkeletonExporter.h
+++ b/OTRExporter/SkeletonExporter.h
@@ -4,7 +4,7 @@
#include "ZTexture.h"
#include "ZDisplayList.h"
#include "ZSkeleton.h"
-#include "OTRExporter.h"
+#include "Exporter.h"
#include <Utils/BinaryWriter.h>
class OTRExporter_Skeleton : public OTRExporter
diff --git a/OTRExporter/OTRSkeletonLimbExporter.cpp b/OTRExporter/SkeletonLimbExporter.cpp
index fb9974c..fcb4788 100644
--- a/OTRExporter/OTRSkeletonLimbExporter.cpp
+++ b/OTRExporter/SkeletonLimbExporter.cpp
@@ -1,12 +1,12 @@
-#include "OTRSkeletonLimbExporter.h"
+#include "SkeletonLimbExporter.h"
#include "DisplayListExporter.h"
-#include <OTRResource.h>
+#include <Resource.h>
void OTRExporter_SkeletonLimb::Save(ZResource* res, fs::path outPath, BinaryWriter* writer)
{
ZLimb* limb = (ZLimb*)res;
- WriteHeader(res, outPath, writer, OtrLib::ResourceType::OTRSkeletonLimb);
+ WriteHeader(res, outPath, writer, Ship::ResourceType::OTRSkeletonLimb);
writer->Write((uint8_t)limb->type);
writer->Write((uint8_t)limb->skinSegmentType);
diff --git a/OTRExporter/OTRSkeletonLimbExporter.h b/OTRExporter/SkeletonLimbExporter.h
index fd241c2..294e76d 100644
--- a/OTRExporter/OTRSkeletonLimbExporter.h
+++ b/OTRExporter/SkeletonLimbExporter.h
@@ -5,7 +5,7 @@
#include "ZDisplayList.h"
#include "ZSkeleton.h"
#include "ZLimb.h"
-#include "OTRExporter.h"
+#include "Exporter.h"
#include <Utils/BinaryWriter.h>
class OTRExporter_SkeletonLimb : public OTRExporter
diff --git a/OTRExporter/TextureExporter.cpp b/OTRExporter/TextureExporter.cpp
index f946611..ada7c15 100644
--- a/OTRExporter/TextureExporter.cpp
+++ b/OTRExporter/TextureExporter.cpp
@@ -17,7 +17,7 @@ void OTRExporter_Texture::Save(ZResource* res, fs::path outPath, BinaryWriter* w
auto end = std::chrono::steady_clock::now();
size_t diff = std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();
- printf("Exported Texture %s in %zums\n", tex->GetName().c_str(), diff);
+ //printf("Exported Texture %s in %zums\n", tex->GetName().c_str(), diff);
//if (diff > 2)
//printf("Export took %lms\n", diff);
diff --git a/OTRExporter/TextureExporter.h b/OTRExporter/TextureExporter.h
index 7951edc..9ec92c6 100644
--- a/OTRExporter/TextureExporter.h
+++ b/OTRExporter/TextureExporter.h
@@ -2,7 +2,7 @@
#include "ZResource.h"
#include "ZTexture.h"
-#include "OTRExporter.h"
+#include "Exporter.h"
#include <Utils/BinaryWriter.h>
class OTRExporter_Texture : public OTRExporter
diff --git a/OTRExporter/VtxExporter.cpp b/OTRExporter/VtxExporter.cpp
index 2907fe2..e135ce8 100644
--- a/OTRExporter/VtxExporter.cpp
+++ b/OTRExporter/VtxExporter.cpp
@@ -1,12 +1,12 @@
#include "VtxExporter.h"
-#include "OTRResource.h"
+#include "Resource.h"
void OTRExporter_Vtx::SaveArr(const std::vector<ZResource*>& vec, BinaryWriter* writer)
{
writer->Write((uint8_t)Endianess::Little);
- writer->Write((uint32_t)OtrLib::ResourceType::OTRVtx);
- writer->Write((uint32_t)OtrLib::OTRVersion::Deckard);
+ writer->Write((uint32_t)Ship::ResourceType::OTRVtx);
+ writer->Write((uint32_t)Ship::Version::Deckard);
writer->Write((uint64_t)0xDEADBEEFDEADBEEF); // id
writer->Write((uint32_t)vec.size());
@@ -30,7 +30,7 @@ void OTRExporter_Vtx::Save(ZResource* res, fs::path outPath, BinaryWriter* write
{
ZVtx* vtx = (ZVtx*)res;
- WriteHeader(res, outPath, writer, OtrLib::ResourceType::OTRVtx);
+ WriteHeader(res, outPath, writer, Ship::ResourceType::OTRVtx);
writer->Write((uint32_t)1); //Yes I'm hard coding it to one, it *should* be fine.
diff --git a/OTRExporter/VtxExporter.h b/OTRExporter/VtxExporter.h
index 051e58a..645ac28 100644
--- a/OTRExporter/VtxExporter.h
+++ b/OTRExporter/VtxExporter.h
@@ -2,7 +2,7 @@
#include "ZResource.h"
#include "ZVtx.h"
-#include "OTRExporter.h"
+#include "Exporter.h"
#include <Utils/BinaryWriter.h>
class OTRExporter_Vtx : public OTRExporter
diff --git a/extract_assets.py b/extract_assets.py
index 6f33a52..af8dd17 100755
--- a/extract_assets.py
+++ b/extract_assets.py
@@ -3,7 +3,7 @@
import argparse, json, os, signal, time, sys
from multiprocessing import Pool, cpu_count, Event, Manager, ProcessError
-EXTRACTED_ASSETS_NAMEFILE = ".extracted-assets.json"
+#EXTRACTED_ASSETS_NAMEFILE = ".extracted-assets.json"
def SignalHandler(sig, frame):
@@ -18,6 +18,7 @@ def ExtractFile(xmlPath, outputPath, outputSourcePath):
execStr = "x64\\Release\\ZAPD.exe" if sys.platform == "win32" else "../ZAPD/ZAPD.out"
+ #execStr += " e -eh -i %s -b baserom/ -o %s -osf %s -gsf 1 -rconf CFG/Config.xml -se OTR" % (xmlPath, outputPath, outputSourcePath)
execStr += " e -eh -i %s -b baserom/ -o %s -osf %s -gsf 1 -rconf CFG/Config.xml -se OTR" % (xmlPath, outputPath, outputSourcePath)
if "overlays" in xmlPath:
@@ -28,6 +29,7 @@ def ExtractFile(xmlPath, outputPath, outputSourcePath):
print(execStr)
exitValue = os.system(execStr)
+ #exitValue = 0
if exitValue != 0:
# globalAbort.set()
print("\n")
@@ -39,7 +41,7 @@ def ExtractFunc(fullPath):
*pathList, xmlName = fullPath.split(os.sep)
objectName = os.path.splitext(xmlName)[0]
- outPath = os.path.join("assets", *pathList[2:], objectName)
+ outPath = os.path.join("..\\otr\\assets\\", *pathList[4:], objectName)
outSourcePath = outPath
#if fullPath in globalExtractedAssetsTracker:
@@ -80,7 +82,7 @@ def main():
asset_path = args.single
if asset_path is not None:
- fullPath = os.path.join("assets", "xml", asset_path + ".xml")
+ fullPath = os.path.join("..\\otr\\assets", "xml", asset_path + ".xml")
if not os.path.exists(fullPath):
print(f"Error. File {fullPath} doesn't exists.", file=os.sys.stderr)
exit(1)
@@ -98,7 +100,7 @@ def main():
extract_staff_text_path = None
xmlFiles = []
- for currentPath, _, files in os.walk(os.path.join("assets", "xml")):
+ for currentPath, _, files in os.walk(os.path.join("..\\otr\\assets", "xml")):
for file in files:
fullPath = os.path.join(currentPath, file)
if file.endswith(".xml"):