diff --git a/libultraship b/libultraship index 1a8f6c0d..944f0b47 160000 --- a/libultraship +++ b/libultraship @@ -1 +1 @@ -Subproject commit 1a8f6c0db9a56017611eba57298d9c2eddc18f88 +Subproject commit 944f0b474b5b2c0ca2605890c0b02b30b78f356a diff --git a/src/port/Engine.cpp b/src/port/Engine.cpp index 66a6aab4..40f8d083 100644 --- a/src/port/Engine.cpp +++ b/src/port/Engine.cpp @@ -82,8 +82,11 @@ GameEngine::GameEngine() { } } + auto controlDeck = std::make_shared(); + auto window = std::make_shared(std::vector>({})); + this->context = - Ship::Context::CreateInstance("Starship", "ship", "starship.cfg.json", OTRFiles, {}, 3, { 44100, 1024*2, 2480*2 }); + Ship::Context::CreateInstance("Starship", "ship", "starship.cfg.json", OTRFiles, {}, 3, { 44100, 1024*2, 2480*2 }, window, controlDeck); Ship::Context::GetInstance()->GetLogger()->set_level((spdlog::level::level_enum)CVarGetInteger("gDeveloperTools.LogLevel", 1)); Ship::Context::GetInstance()->GetLogger()->set_pattern("[%H:%M:%S.%e] [%s:%#] [%l] %v"); @@ -120,26 +123,26 @@ GameEngine::GameEngine() { loader->RegisterResourceFactory(std::make_shared(), RESOURCE_FORMAT_BINARY, "GenericArray", static_cast(SF64::ResourceType::GenericArray), 0); - loader->RegisterResourceFactory(std::make_shared(), RESOURCE_FORMAT_BINARY, - "Texture", static_cast(LUS::ResourceType::Texture), 0); - loader->RegisterResourceFactory(std::make_shared(), RESOURCE_FORMAT_BINARY, - "Texture", static_cast(LUS::ResourceType::Texture), 1); + loader->RegisterResourceFactory(std::make_shared(), RESOURCE_FORMAT_BINARY, + "Texture", static_cast(Fast::ResourceType::Texture), 0); + loader->RegisterResourceFactory(std::make_shared(), RESOURCE_FORMAT_BINARY, + "Texture", static_cast(Fast::ResourceType::Texture), 1); - loader->RegisterResourceFactory(std::make_shared(), RESOURCE_FORMAT_BINARY, - "Vertex", static_cast(LUS::ResourceType::Vertex), 0); - loader->RegisterResourceFactory(std::make_shared(), RESOURCE_FORMAT_XML, - "Vertex", static_cast(LUS::ResourceType::Vertex), 0); + loader->RegisterResourceFactory(std::make_shared(), RESOURCE_FORMAT_BINARY, + "Vertex", static_cast(Fast::ResourceType::Vertex), 0); + loader->RegisterResourceFactory(std::make_shared(), RESOURCE_FORMAT_XML, + "Vertex", static_cast(Fast::ResourceType::Vertex), 0); - loader->RegisterResourceFactory(std::make_shared(), RESOURCE_FORMAT_BINARY, - "DisplayList", static_cast(LUS::ResourceType::DisplayList), 0); - loader->RegisterResourceFactory(std::make_shared(), RESOURCE_FORMAT_XML, - "DisplayList", static_cast(LUS::ResourceType::DisplayList), 0); + loader->RegisterResourceFactory(std::make_shared(), RESOURCE_FORMAT_BINARY, + "DisplayList", static_cast(Fast::ResourceType::DisplayList), 0); + loader->RegisterResourceFactory(std::make_shared(), RESOURCE_FORMAT_XML, + "DisplayList", static_cast(Fast::ResourceType::DisplayList), 0); - loader->RegisterResourceFactory(std::make_shared(), RESOURCE_FORMAT_BINARY, - "Matrix", static_cast(LUS::ResourceType::Matrix), 0); + loader->RegisterResourceFactory(std::make_shared(), RESOURCE_FORMAT_BINARY, + "Matrix", static_cast(Fast::ResourceType::Matrix), 0); - loader->RegisterResourceFactory(std::make_shared(), RESOURCE_FORMAT_BINARY, - "Blob", static_cast(LUS::ResourceType::Blob), 0); + loader->RegisterResourceFactory(std::make_shared(), RESOURCE_FORMAT_BINARY, + "Blob", static_cast(Ship::ResourceType::Blob), 0); loader->RegisterResourceFactory(std::make_shared(), RESOURCE_FORMAT_BINARY, "AudioTable", static_cast(SF64::ResourceType::AudioTable), 0); diff --git a/src/port/GBIMiddleware.cpp b/src/port/GBIMiddleware.cpp index 68c3a3c6..a3055edd 100644 --- a/src/port/GBIMiddleware.cpp +++ b/src/port/GBIMiddleware.cpp @@ -10,7 +10,7 @@ extern "C" void gSPDisplayList(Gfx* pkt, Gfx* dl) { if (GameEngine_OTRSigCheck(imgData) == 1) { auto resource = Ship::Context::GetInstance()->GetResourceManager()->LoadResource(imgData); - auto res = std::static_pointer_cast(resource); + auto res = std::static_pointer_cast(resource); dl = &res->Instructions[0]; // dl->words.trace.file = imgData; // dl->words.trace.idx = 0; @@ -35,8 +35,8 @@ extern "C" void gSPInvalidateTexCache(Gfx* pkt, uintptr_t texAddr) { if (texAddr != 0 && GameEngine_OTRSigCheck(imgData)) { auto res = Ship::Context::GetInstance()->GetResourceManager()->LoadResource(imgData); - if (res->GetInitData()->Type == (uint32_t) LUS::ResourceType::DisplayList) - texAddr = (uintptr_t)&((std::static_pointer_cast(res))->Instructions[0]); + if (res->GetInitData()->Type == (uint32_t) Fast::ResourceType::DisplayList) + texAddr = (uintptr_t)&((std::static_pointer_cast(res))->Instructions[0]); else { texAddr = (uintptr_t) res->GetRawPointer(); }