mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-07-11 07:25:50 -04:00
Update lus
This commit is contained in:
+38
-22
@@ -62,10 +62,26 @@ GameEngine::GameEngine() {
|
||||
}
|
||||
}
|
||||
|
||||
this->context = Ship::Context::CreateInstance("Spaghettify", "skart64", "spaghettify.cfg.json", OTRFiles, {}, 3,
|
||||
{ 26800, 512, 1100 });
|
||||
this->context =
|
||||
Ship::Context::CreateUninitializedInstance("Spaghetti Kart", "spaghettify", "spaghettify.cfg.json");
|
||||
|
||||
this->context->InitConfiguration(); // without this line InitConsoleVariables fails at Config::Reload()
|
||||
this->context->InitConsoleVariables(); // without this line the controldeck constructor failes in ShipDeviceIndexMappingManager::UpdateControllerNamesFromConfig()
|
||||
|
||||
auto controlDeck = std::make_shared<LUS::ControlDeck>();
|
||||
|
||||
this->context->InitResourceManager(OTRFiles, {}, 3); // without this line InitWindow fails in Gui::Init()
|
||||
this->context->InitConsole(); // without this line the GuiWindow constructor fails in ConsoleWindow::InitElement()
|
||||
|
||||
auto wnd = std::make_shared<Fast::Fast3dWindow>(std::vector<std::shared_ptr<Ship::GuiWindow>>({}));
|
||||
//auto wnd = std::dynamic_pointer_cast<Fast::Fast3dWindow>(Ship::Context::GetInstance()->GetWindow());
|
||||
|
||||
this->context->Init(OTRFiles, {}, 3, { 26800, 512, 1100 }, wnd, controlDeck);
|
||||
|
||||
|
||||
// this->context = Ship::Context::CreateInstance("Spaghettify", "skart64", "spaghettify.cfg.json", OTRFiles, {}, 3,
|
||||
// { 26800, 512, 1100 });
|
||||
|
||||
auto wnd = std::dynamic_pointer_cast<Fast::Fast3dWindow>(Ship::Context::GetInstance()->GetWindow());
|
||||
|
||||
wnd->SetRendererUCode(ucode_f3dex);
|
||||
this->context->InitGfxDebugger();
|
||||
@@ -84,27 +100,27 @@ GameEngine::GameEngine() {
|
||||
loader->RegisterResourceFactory(std::make_shared<SF64::ResourceFactoryBinaryGenericArrayV0>(),
|
||||
RESOURCE_FORMAT_BINARY, "GenericArray",
|
||||
static_cast<uint32_t>(SF64::ResourceType::GenericArray), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryBinaryTextureV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"Texture", static_cast<uint32_t>(LUS::ResourceType::Texture), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryBinaryTextureV1>(), RESOURCE_FORMAT_BINARY,
|
||||
"Texture", static_cast<uint32_t>(LUS::ResourceType::Texture), 1);
|
||||
loader->RegisterResourceFactory(std::make_shared<Fast::ResourceFactoryBinaryTextureV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"Texture", static_cast<uint32_t>(Fast::ResourceType::Texture), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<Fast::ResourceFactoryBinaryTextureV1>(), RESOURCE_FORMAT_BINARY,
|
||||
"Texture", static_cast<uint32_t>(Fast::ResourceType::Texture), 1);
|
||||
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryBinaryVertexV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"Vertex", static_cast<uint32_t>(LUS::ResourceType::Vertex), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryXMLVertexV0>(), RESOURCE_FORMAT_XML, "Vertex",
|
||||
static_cast<uint32_t>(LUS::ResourceType::Vertex), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<Fast::ResourceFactoryBinaryVertexV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"Vertex", static_cast<uint32_t>(Fast::ResourceType::Vertex), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<Fast::ResourceFactoryXMLVertexV0>(), RESOURCE_FORMAT_XML, "Vertex",
|
||||
static_cast<uint32_t>(Fast::ResourceType::Vertex), 0);
|
||||
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryBinaryDisplayListV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"DisplayList", static_cast<uint32_t>(LUS::ResourceType::DisplayList), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryXMLDisplayListV0>(), RESOURCE_FORMAT_XML,
|
||||
"DisplayList", static_cast<uint32_t>(LUS::ResourceType::DisplayList), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<Fast::ResourceFactoryBinaryDisplayListV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"DisplayList", static_cast<uint32_t>(Fast::ResourceType::DisplayList), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<Fast::ResourceFactoryXMLDisplayListV0>(), RESOURCE_FORMAT_XML,
|
||||
"DisplayList", static_cast<uint32_t>(Fast::ResourceType::DisplayList), 0);
|
||||
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryBinaryMatrixV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"Matrix", static_cast<uint32_t>(LUS::ResourceType::Matrix), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryBinaryBlobV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"Blob", static_cast<uint32_t>(LUS::ResourceType::Blob), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryBinaryLightV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"Lights1", static_cast<uint32_t>(LUS::ResourceType::Light), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<Fast::ResourceFactoryBinaryMatrixV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"Matrix", static_cast<uint32_t>(Fast::ResourceType::Matrix), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<Ship::ResourceFactoryBinaryBlobV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"Blob", static_cast<uint32_t>(Ship::ResourceType::Blob), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<Fast::ResourceFactoryBinaryLightV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"Lights1", static_cast<uint32_t>(Fast::ResourceType::Light), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<MK64::ResourceFactoryBinaryArrayV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"Array", static_cast<uint32_t>(MK64::ResourceType::MK_Array), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<MK64::ResourceFactoryBinaryKartAIV0>(), RESOURCE_FORMAT_BINARY,
|
||||
@@ -233,7 +249,7 @@ void GameEngine::EndAudioFrame() {
|
||||
|
||||
void GameEngine::AudioInit() {
|
||||
const auto resourceMgr = Ship::Context::GetInstance()->GetResourceManager();
|
||||
resourceMgr->LoadDirectory("sound");
|
||||
resourceMgr->LoadResources("sound");
|
||||
const auto banksFiles = resourceMgr->GetArchiveManager()->ListFiles("sound/banks/*");
|
||||
const auto sequences_files = resourceMgr->GetArchiveManager()->ListFiles("sound/sequences/*");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user