diff --git a/src/game.cc b/src/game.cc index abe6613..648e501 100644 --- a/src/game.cc +++ b/src/game.cc @@ -65,6 +65,7 @@ #include "trait.h" #include "version.h" #include "window_manager.h" +#include "window_manager_private.h" #include "worldmap.h" namespace fallout { @@ -168,6 +169,20 @@ int gameInitWithOptions(const char* windowTitle, bool isMapper, int font, int a4 showSplash(); } + // CE: Handle debug mode (exactly as seen in `mapper2.exe`). + const char* debugMode = settings.debug.mode.c_str(); + if (compat_stricmp(debugMode, "environment") == 0) { + _debug_register_env(); + } else if (compat_stricmp(debugMode, "screen") == 0) { + _debug_register_screen(); + } else if (compat_stricmp(debugMode, "log") == 0) { + _debug_register_log("debug.log", "wt"); + } else if (compat_stricmp(debugMode, "mono") == 0) { + _debug_register_mono(); + } else if (compat_stricmp(debugMode, "gnw") == 0) { + _debug_register_func(_win_debug); + } + interfaceFontsInit(); fontManagerAdd(&gModernFontManager); fontSetCurrent(font);