mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-02-02 16:23:57 +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);
|
||||
break;
|
||||
|
||||
case LEVEL_TRAINING:
|
||||
case LEVEL_TRAINING: {
|
||||
static Vtx trainingGroundVtx_FIX[] = {
|
||||
{ { { 4000, 0, -6000 }, 0, { 20947, -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;
|
||||
prevPlayerPath2 = sp1D4;
|
||||
break;
|
||||
}
|
||||
|
||||
case LEVEL_AQUAS:
|
||||
RCP_SetupDL(&gMasterDisp, SETUPDL_20);
|
||||
|
@ -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);
|
||||
|
@ -488,17 +488,29 @@ void DrawHit64Menu() {
|
||||
}
|
||||
}
|
||||
|
||||
const char* debugInfoPages[6] = {
|
||||
"Object",
|
||||
"Check Surface",
|
||||
"Map",
|
||||
"Stage",
|
||||
"Effect",
|
||||
"Enemy",
|
||||
static const char* debugInfoPages[6] = {
|
||||
"Object",
|
||||
"Check Surface",
|
||||
"Map",
|
||||
"Stage",
|
||||
"Effect",
|
||||
"Enemy",
|
||||
};
|
||||
|
||||
static const char* logLevels[] = {
|
||||
"trace", "debug", "info", "warn", "error", "critical", "off",
|
||||
};
|
||||
|
||||
void DrawDebugMenu() {
|
||||
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, {
|
||||
.tooltip = "Enables the Gfx Debugger window, allowing you to input commands, type help for some examples"
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user