diff --git a/soh/soh/Enhancements/controls/InputViewer.cpp b/soh/soh/Enhancements/controls/InputViewer.cpp index 6a1393ebd..25bd36000 100644 --- a/soh/soh/Enhancements/controls/InputViewer.cpp +++ b/soh/soh/Enhancements/controls/InputViewer.cpp @@ -354,7 +354,6 @@ void InputViewer::DrawElement() { } InputViewerSettingsWindow::~InputViewerSettingsWindow() { - // SPDLOG_TRACE("destruct input viewer settings window"); } void InputViewerSettingsWindow::DrawElement() { diff --git a/soh/soh/Enhancements/tts/tts.cpp b/soh/soh/Enhancements/tts/tts.cpp index 859a7b913..ff78fd0ab 100644 --- a/soh/soh/Enhancements/tts/tts.cpp +++ b/soh/soh/Enhancements/tts/tts.cpp @@ -1041,9 +1041,6 @@ void InitTTSBank() { if (sceneFile != nullptr) { sceneMap = nlohmann::json::parse(*sceneFile->Buffer.get(), nullptr, true, true); } - // use binaryreader as base for rawjsonfactory - // just pass a shared pointer to initdata in here - // sceneMap = LUS::Context::GetInstance()->GetResourceManager()->LoadResource("accessibility/texts/scenes" + languageSuffix, initdata); auto miscFile = LUS::Context::GetInstance()->GetResourceManager()->GetArchiveManager()->LoadFileRaw("accessibility/texts/misc" + languageSuffix); if (miscFile != nullptr) { diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 2e436c01f..61f0e2b93 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -870,7 +870,6 @@ OTRVersion ReadPortVersionFromOTR(std::string otrPath) { // Use a temporary archive instance to load the otr and read the version file auto archive = LUS::OtrArchive(otrPath); if (archive.Open()) { - // for now just make a portVersion resource auto t = archive.LoadFileRaw("portVersion"); if (t != nullptr && t->IsLoaded) { auto stream = std::make_shared(t->Buffer->data(), t->Buffer->size()); @@ -1582,10 +1581,6 @@ extern "C" void ResourceMgr_UnloadOriginalWhenAltExists(const char* resName) { } } -// extern "C" void ResourceMgr_LoadFile(const char* resName) { -// LUS::Context::GetInstance()->GetResourceManager()->LoadResource(resName); -// } - std::shared_ptr GetResourceByNameHandlingMQ(const char* path) { std::string Path = path; if (ResourceMgr_IsGameMasterQuest()) { @@ -1607,20 +1602,6 @@ extern "C" char* GetResourceDataByNameHandlingMQ(const char* path) { return (char*)res->GetRawPointer(); } -// extern "C" char* ResourceMgr_LoadFileFromDisk(const char* filePath) { -// FILE* file = fopen(filePath, "r"); -// fseek(file, 0, SEEK_END); -// int fSize = ftell(file); -// fseek(file, 0, SEEK_SET); - -// char* data = (char*)malloc(fSize); -// fread(data, 1, fSize, file); - -// fclose(file); - -// return data; -// } - extern "C" uint8_t ResourceMgr_TexIsRaw(const char* texPath) { auto res = std::static_pointer_cast(GetResourceByNameHandlingMQ(texPath)); return res->Flags & TEX_FLAG_LOAD_AS_RAW; diff --git a/soh/soh/OTRGlobals.h b/soh/soh/OTRGlobals.h index b87576786..a4af676e0 100644 --- a/soh/soh/OTRGlobals.h +++ b/soh/soh/OTRGlobals.h @@ -95,8 +95,6 @@ uint8_t ResourceMgr_FileExists(const char* resName); uint8_t ResourceMgr_FileAltExists(const char* resName); void ResourceMgr_UnloadOriginalWhenAltExists(const char* resName); char* GetResourceDataByNameHandlingMQ(const char* path); -// void ResourceMgr_LoadFile(const char* resName); -// char* ResourceMgr_LoadFileFromDisk(const char* filePath); uint8_t ResourceMgr_TexIsRaw(const char* texPath); uint8_t ResourceMgr_ResourceIsBackground(char* texPath); char* ResourceMgr_LoadJPEG(char* data, size_t dataSize); diff --git a/soh/soh/resource/importer/RawJsonFactory.cpp b/soh/soh/resource/importer/RawJsonFactory.cpp deleted file mode 100644 index b1c79167a..000000000 --- a/soh/soh/resource/importer/RawJsonFactory.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "resource/factory/BlobFactory.h" -#include "resource/type/Blob.h" -#include "spdlog/spdlog.h" - -namespace LUS { -std::shared_ptr ResourceFactoryBinaryBlobV0::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { - return nullptr; - } - - auto blob = std::make_shared(file->InitData); - auto reader = std::get>(file->Reader); - - uint32_t dataSize = reader->ReadUInt32(); - - blob->Data.reserve(dataSize); - - for (uint32_t i = 0; i < dataSize; i++) { - blob->Data.push_back(reader->ReadUByte()); - } - - return blob; -} -} // namespace LUS diff --git a/soh/soh/resource/importer/RawJsonFactory.h b/soh/soh/resource/importer/RawJsonFactory.h deleted file mode 100644 index 38295858d..000000000 --- a/soh/soh/resource/importer/RawJsonFactory.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -#include "resource/Resource.h" -#include "resource/ResourceFactoryBinary.h" - -namespace LUS { -class ResourceFactoryBinaryBlobV0 : public ResourceFactoryBinary { - public: - std::shared_ptr ReadResource(std::shared_ptr file) override; -}; -}; // namespace LUS diff --git a/soh/soh/resource/type/RawJson.cpp b/soh/soh/resource/type/RawJson.cpp deleted file mode 100644 index 619c6231a..000000000 --- a/soh/soh/resource/type/RawJson.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "Blob.h" - -namespace LUS { -Blob::Blob() : Resource(std::shared_ptr()) { -} - -void* Blob::GetPointer() { - return Data.data(); -} - -size_t Blob::GetPointerSize() { - return Data.size() * sizeof(uint8_t); -} -} // namespace LUS diff --git a/soh/soh/resource/type/RawJson.h b/soh/soh/resource/type/RawJson.h deleted file mode 100644 index 54622af47..000000000 --- a/soh/soh/resource/type/RawJson.h +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once - -#include "Resource.h" - -namespace SOH { -class RawJson : public LUS::Resource { - public: - using Resource::Resource; - - RawJson(); - - void* GetPointer() override; - size_t GetPointerSize() override; - - std::vector Data; -}; -}; // namespace LUS diff --git a/soh/soh/z_scene_otr.cpp b/soh/soh/z_scene_otr.cpp index 8a080f30a..0b9ba98f9 100644 --- a/soh/soh/z_scene_otr.cpp +++ b/soh/soh/z_scene_otr.cpp @@ -39,17 +39,6 @@ extern "C" s32 Object_Spawn(ObjectContext* objectCtx, s16 objectId); extern "C" RomFile sNaviMsgFiles[]; s32 OTRScene_ExecuteCommands(PlayState* play, SOH::Scene* scene); -// std::shared_ptr ResourceMgr_LoadFile(const char* path) { -// std::string Path = path; -// if (IsGameMasterQuest()) { -// size_t pos = 0; -// if ((pos = Path.find("/nonmq/", 0)) != std::string::npos) { -// Path.replace(pos, 7, "/mq/"); -// } -// } -// return LUS::Context::GetInstance()->GetResourceManager()->LoadFile(Path.c_str()); -// } - // Forward Declaration of function declared in OTRGlobals.cpp std::shared_ptr GetResourceByNameHandlingMQ(const char* path);