Fixed compilation and added an option to set the logging config

This commit is contained in:
KiritoDv 2024-11-28 17:38:48 -06:00
parent d0e1e25af2
commit e61aeddb64
3 changed files with 24 additions and 8 deletions

View file

@ -85,6 +85,9 @@ GameEngine::GameEngine() {
this->context =
Ship::Context::CreateInstance("Starship", "ship", "starship.cfg.json", OTRFiles, {}, 3, { 44100, 1024*2, 2480*2 });
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");
auto loader = context->GetResourceManager()->GetResourceLoader();
loader->RegisterResourceFactory(std::make_shared<SF64::ResourceFactoryBinaryAnimV0>(), RESOURCE_FORMAT_BINARY,
"Animation", static_cast<uint32_t>(SF64::ResourceType::AnimData), 0);