Merge branch 'develop' of github.com:Malkierian/Shipwright into dev-to-rando-5-5

This commit is contained in:
Malkierian
2024-05-05 22:05:10 -07:00
339 changed files with 7337 additions and 10809 deletions
+5 -5
View File
@@ -1,7 +1,7 @@
#include "OTRGlobals.h"
#include <libultraship/libultraship.h>
#include "soh/resource/type/Scene.h"
#include <Utils/StringHelper.h>
#include <utils/StringHelper.h>
#include "global.h"
#include "vt.h"
#include "soh/resource/type/Text.h"
@@ -23,10 +23,10 @@ static void SetMessageEntry(MessageTableEntry& entry, const SOH::MessageEntry& m
}
static void OTRMessage_LoadCustom(const std::string& folderPath, MessageTableEntry*& table, size_t tableSize) {
auto lst = *LUS::Context::GetInstance()->GetResourceManager()->GetArchiveManager()->ListFiles(folderPath).get();
auto lst = *Ship::Context::GetInstance()->GetResourceManager()->GetArchiveManager()->ListFiles(folderPath).get();
for (auto& tPath : lst) {
auto file = std::static_pointer_cast<SOH::Text>(LUS::Context::GetInstance()->GetResourceManager()->LoadResource(tPath));
auto file = std::static_pointer_cast<SOH::Text>(Ship::Context::GetInstance()->GetResourceManager()->LoadResource(tPath));
for (size_t j = 0; j < file->messages.size(); ++j) {
// Check if same text ID exists already
@@ -43,7 +43,7 @@ static void OTRMessage_LoadCustom(const std::string& folderPath, MessageTableEnt
}
MessageTableEntry* OTRMessage_LoadTable(const std::string& filePath, bool isNES) {
auto file = std::static_pointer_cast<SOH::Text>(LUS::Context::GetInstance()->GetResourceManager()->LoadResource(filePath));
auto file = std::static_pointer_cast<SOH::Text>(Ship::Context::GetInstance()->GetResourceManager()->LoadResource(filePath));
if (file == nullptr)
return nullptr;
@@ -120,7 +120,7 @@ extern "C" void OTRMessage_Init()
if (sStaffMessageEntryTablePtr == NULL) {
auto file2 =
std::static_pointer_cast<SOH::Text>(LUS::Context::GetInstance()->GetResourceManager()->LoadResource(
std::static_pointer_cast<SOH::Text>(Ship::Context::GetInstance()->GetResourceManager()->LoadResource(
"text/staff_message_data_static/staff_message_data_static"));
// OTRTODO: Should not be malloc'ing here. It's fine for now since we check that the message table is already null.
sStaffMessageEntryTablePtr = (MessageTableEntry*)malloc(sizeof(MessageTableEntry) * file2->messages.size());