summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Estelami <NEstelami@users.noreply.github.com>2022-03-10 19:57:43 -0500
committerM4xw <m4x@m4xw.net>2022-03-22 02:38:03 +0100
commitae546ee22d76dbf63c83eb74c5bbd8b7a97f8943 (patch)
treefd7c79ee704b047dc556c8ac893247bcbb6678c2
parent93460fd3988014bef7733e96bb4124e614637b82 (diff)
Removed old unused libultra folder
WIP Framebuffer tests
-rw-r--r--OTRExporter/ArrayExporter.cpp15
-rw-r--r--OTRExporter/DisplayListExporter.cpp12
-rw-r--r--OTRExporter/Exporter.cpp2
-rw-r--r--OTRExporter/Main.cpp8
4 files changed, 6 insertions, 31 deletions
diff --git a/OTRExporter/ArrayExporter.cpp b/OTRExporter/ArrayExporter.cpp
index 358b13b..89cd40e 100644
--- a/OTRExporter/ArrayExporter.cpp
+++ b/OTRExporter/ArrayExporter.cpp
@@ -61,19 +61,4 @@ void OTRExporter_Array::Save(ZResource* res, const fs::path& outPath, BinaryWrit
}
}
}
-
-
- ////There has to be a better way™
- //if (arr->resList[0]->GetResourceType() == ZResourceType::Vertex)
- //{
- // OTRExporter_Vtx exporter;
- // exporter.SaveArr(arr->resList,writer);
-
- // //exporter.count = arr->arrayCnt;
- // //exporter.Save(res, outPath, writer);
- //}
- //else if (arr->resList[0]->GetResourceType() == ZResourceType::Vector)
- //{
- // WriteHeader(res, outPath, writer, Ship::ResourceType::Vtx);
- //}
} \ No newline at end of file
diff --git a/OTRExporter/DisplayListExporter.cpp b/OTRExporter/DisplayListExporter.cpp
index 11769c4..49b796f 100644
--- a/OTRExporter/DisplayListExporter.cpp
+++ b/OTRExporter/DisplayListExporter.cpp
@@ -12,8 +12,6 @@
#include "MtxExporter.h"
#include <Utils/File.h>
#include "VersionInfo.h"
-//#include "gbi.h"
-//#include "Lib/Fast3D/U64/PR/gbi.h"
#define GFX_SIZE 8
@@ -474,14 +472,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina
Save(dList->otherDLists[i], outPath, &dlWriter);
-#ifdef _DEBUG
- //if (otrArchive->HasFile(fName))
- //otrArchive->RemoveFile(fName);
-#endif
-
File::WriteAllBytes("Extract\\" + fName, dlStream->ToVector());
-
- //otrArchive->AddFile(fName, (uintptr_t)dlStream->ToVector().data(), dlWriter.GetBaseAddress());
}
}
else
@@ -838,7 +829,6 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina
word0 = hash >> 32;
word1 = hash & 0xFFFFFFFF;
- //if (!otrArchive->HasFile(fName))
if (!File::Exists("Extract\\" + fName))
{
//printf("Exporting VTX Data %s\n", fName.c_str());
@@ -858,7 +848,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina
arrCnt++;
}
- // OTRTODO: Stupid stupid hack we need to just call arrayexporter...
+ // OTRTODO: Once we aren't relying on text representations, we should call ArrayExporter...
OTRExporter::WriteHeader(nullptr, "", &vtxWriter, Ship::ResourceType::Array);
vtxWriter.Write((uint32_t)ZResourceType::Vertex);
diff --git a/OTRExporter/Exporter.cpp b/OTRExporter/Exporter.cpp
index 4070d12..013c7ef 100644
--- a/OTRExporter/Exporter.cpp
+++ b/OTRExporter/Exporter.cpp
@@ -7,5 +7,5 @@ void OTRExporter::WriteHeader(ZResource* res, const fs::path& outPath, BinaryWri
writer->Write((uint32_t)resType);
writer->Write((uint32_t)MAJOR_VERSION);
writer->Write((uint64_t)0xDEADBEEFDEADBEEF); // id
- writer->Write((uint32_t)resourceVersions[resType]); // id
+ writer->Write((uint32_t)resourceVersions[resType]);
}
diff --git a/OTRExporter/Main.cpp b/OTRExporter/Main.cpp
index 705319d..24a156f 100644
--- a/OTRExporter/Main.cpp
+++ b/OTRExporter/Main.cpp
@@ -21,7 +21,7 @@
#include <Utils/MemoryStream.h>
#include <Utils/BinaryWriter.h>
-std::string otrFileName;
+std::string otrFileName = "oot.otr";
std::shared_ptr<Ship::Archive> otrArchive;
BinaryWriter* fileWriter;
std::chrono::steady_clock::time_point fileStart, resStart;
@@ -39,10 +39,10 @@ static void ExporterParseFileMode(const std::string& buildMode, ZFileMode& fileM
{
fileMode = (ZFileMode)ExporterFileMode::BuildOTR;
- if (File::Exists("oot.otr"))
- otrArchive = std::shared_ptr<Ship::Archive>(new Ship::Archive("oot.otr", true));
+ if (File::Exists(otrFileName))
+ otrArchive = std::shared_ptr<Ship::Archive>(new Ship::Archive(otrFileName, true));
else
- otrArchive = Ship::Archive::CreateArchive("oot.otr", 65536 / 2);
+ otrArchive = Ship::Archive::CreateArchive(otrFileName, 65536 / 2);
auto lst = Directory::ListFiles("Extract");