mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-02-03 00:33:55 +03:00
Fixed compilation and added an option to set the logging config
This commit is contained in:
parent
d0e1e25af2
commit
e61aeddb64
@ -1417,7 +1417,7 @@ void Background_DrawGround(void) {
|
|||||||
Matrix_Pop(&gGfxMatrix);
|
Matrix_Pop(&gGfxMatrix);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LEVEL_TRAINING:
|
case LEVEL_TRAINING: {
|
||||||
static Vtx trainingGroundVtx_FIX[] = {
|
static Vtx trainingGroundVtx_FIX[] = {
|
||||||
{ { { 4000, 0, -6000 }, 0, { 20947, -19923 }, { 0, 120, 0, 255 } } },
|
{ { { 4000, 0, -6000 }, 0, { 20947, -19923 }, { 0, 120, 0, 255 } } },
|
||||||
{ { { -4000, 0, -6000 }, 0, { 0, -19923 }, { 0, 120, 0, 255 } } },
|
{ { { -4000, 0, -6000 }, 0, { 0, -19923 }, { 0, 120, 0, 255 } } },
|
||||||
@ -1523,6 +1523,7 @@ void Background_DrawGround(void) {
|
|||||||
prevPlayerPath = gPlayer[gPlayerNum].xPath;
|
prevPlayerPath = gPlayer[gPlayerNum].xPath;
|
||||||
prevPlayerPath2 = sp1D4;
|
prevPlayerPath2 = sp1D4;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case LEVEL_AQUAS:
|
case LEVEL_AQUAS:
|
||||||
RCP_SetupDL(&gMasterDisp, SETUPDL_20);
|
RCP_SetupDL(&gMasterDisp, SETUPDL_20);
|
||||||
|
@ -85,6 +85,9 @@ GameEngine::GameEngine() {
|
|||||||
this->context =
|
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 });
|
||||||
|
|
||||||
|
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();
|
auto loader = context->GetResourceManager()->GetResourceLoader();
|
||||||
loader->RegisterResourceFactory(std::make_shared<SF64::ResourceFactoryBinaryAnimV0>(), RESOURCE_FORMAT_BINARY,
|
loader->RegisterResourceFactory(std::make_shared<SF64::ResourceFactoryBinaryAnimV0>(), RESOURCE_FORMAT_BINARY,
|
||||||
"Animation", static_cast<uint32_t>(SF64::ResourceType::AnimData), 0);
|
"Animation", static_cast<uint32_t>(SF64::ResourceType::AnimData), 0);
|
||||||
|
@ -488,7 +488,7 @@ void DrawHit64Menu() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* debugInfoPages[6] = {
|
static const char* debugInfoPages[6] = {
|
||||||
"Object",
|
"Object",
|
||||||
"Check Surface",
|
"Check Surface",
|
||||||
"Map",
|
"Map",
|
||||||
@ -497,8 +497,20 @@ const char* debugInfoPages[6] = {
|
|||||||
"Enemy",
|
"Enemy",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const char* logLevels[] = {
|
||||||
|
"trace", "debug", "info", "warn", "error", "critical", "off",
|
||||||
|
};
|
||||||
|
|
||||||
void DrawDebugMenu() {
|
void DrawDebugMenu() {
|
||||||
if (UIWidgets::BeginMenu("Developer")) {
|
if (UIWidgets::BeginMenu("Developer")) {
|
||||||
|
if (UIWidgets::CVarCombobox("Log Level", "gDeveloperTools.LogLevel", logLevels, {
|
||||||
|
.tooltip = "The log level determines which messages are printed to the "
|
||||||
|
"console. This does not affect the log file output",
|
||||||
|
.defaultIndex = 1,
|
||||||
|
})) {
|
||||||
|
Ship::Context::GetInstance()->GetLogger()->set_level((spdlog::level::level_enum)CVarGetInteger("gDeveloperTools.LogLevel", 1));
|
||||||
|
}
|
||||||
|
|
||||||
UIWidgets::WindowButton("Gfx Debugger", "gGfxDebuggerEnabled", GameUI::mGfxDebuggerWindow, {
|
UIWidgets::WindowButton("Gfx Debugger", "gGfxDebuggerEnabled", GameUI::mGfxDebuggerWindow, {
|
||||||
.tooltip = "Enables the Gfx Debugger window, allowing you to input commands, type help for some examples"
|
.tooltip = "Enables the Gfx Debugger window, allowing you to input commands, type help for some examples"
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user