diff --git a/source/build/src/engine.cpp b/source/build/src/engine.cpp index a51456f77..c0e39bc6b 100644 --- a/source/build/src/engine.cpp +++ b/source/build/src/engine.cpp @@ -28,6 +28,7 @@ #include "imgui.h" #include "stats.h" #include "menu.h" +#include "version.h" #ifdef USE_OPENGL # include "glsurface.h" @@ -1454,8 +1455,8 @@ static int32_t bakrendmode; #endif static int32_t baktile; -#ifdef APPNAME -char apptitle[256] = APPNAME; +#ifdef GAMENAME +char apptitle[256] = GAMENAME; #else char apptitle[256] = "Build Engine"; #endif diff --git a/source/common/console/c_bind.cpp b/source/common/console/c_bind.cpp index cfa0b9f4f..368fb335d 100644 --- a/source/common/console/c_bind.cpp +++ b/source/common/console/c_bind.cpp @@ -682,7 +682,7 @@ void ReadBindings(int lump, bool override) void CONFIG_SetDefaultKeys(const char* baseconfig) { - auto lump = fileSystem.GetFile("demolition/commonbinds.txt", ELookupMode::FullName, 0); + auto lump = fileSystem.GetFile("engine/commonbinds.txt", ELookupMode::FullName, 0); if (lump >= 0) ReadBindings(lump, true); int lastlump = 0; @@ -700,7 +700,7 @@ void CONFIG_SetDefaultKeys(const char* baseconfig) void C_BindDefaults() { - CONFIG_SetDefaultKeys(cl_defaultconfiguration == 1 ? "demolition/origbinds.txt" : cl_defaultconfiguration == 2 ? "demolition/leftbinds.txt" : "demolition/defbinds.txt"); + CONFIG_SetDefaultKeys(cl_defaultconfiguration == 1 ? "engine/origbinds.txt" : cl_defaultconfiguration == 2 ? "engine/leftbinds.txt" : "engine/defbinds.txt"); } #if 0 diff --git a/source/common/fonts/v_font.cpp b/source/common/fonts/v_font.cpp index da2caa409..9458fae6f 100644 --- a/source/common/fonts/v_font.cpp +++ b/source/common/fonts/v_font.cpp @@ -404,7 +404,7 @@ void V_InitFontColors () TranslationLookup.Clear(); TranslationColors.Clear(); - while ((lump = fileSystem.Iterate("demolition/textcolors.txt", &lastlump)) != -1) + while ((lump = fileSystem.Iterate("engine/textcolors.txt", &lastlump)) != -1) { FScanner sc(lump); while (sc.GetString()) @@ -714,13 +714,13 @@ void V_InitFonts() FFont *CreateHexLumpFont(const char *fontname, const char* lump); FFont *CreateHexLumpFont2(const char *fontname, const char * lump); - if (fileSystem.FindFile("demolition/newconsolefont.hex") < 0) + if (fileSystem.FindFile("engine/newconsolefont.hex") < 0) I_Error("newconsolefont.hex not found"); // This font is needed - do not start up without it. - NewConsoleFont = CreateHexLumpFont("NewConsoleFont", "demolition/newconsolefont.hex"); - NewSmallFont = CreateHexLumpFont2("NewSmallFont", "demolition/newconsolefont.hex"); + NewConsoleFont = CreateHexLumpFont("NewConsoleFont", "engine/newconsolefont.hex"); + NewSmallFont = CreateHexLumpFont2("NewSmallFont", "engine/newconsolefont.hex"); CurrentConsoleFont = NewConsoleFont; - ConFont = V_GetFont("ConsoleFont", "demolition/confont.lmp"); // The con font is needed for the slider graphics + ConFont = V_GetFont("ConsoleFont", "engine/confont.lmp"); // The con font is needed for the slider graphics SmallFont = ConFont; // This is so that it doesn't crash and that it immediately gets seen as a proble. The SmallFont should later be mapped to the small game font. } diff --git a/source/common/gamecontrol.cpp b/source/common/gamecontrol.cpp index 3e5d30e16..273958146 100644 --- a/source/common/gamecontrol.cpp +++ b/source/common/gamecontrol.cpp @@ -521,7 +521,7 @@ int RunGame() FString logfile = Args->TakeValue("+logfile"); // As long as this engine is still in prerelease mode let's always write a log file. - if (logfile.IsEmpty()) logfile.Format("%sdemolition.log", M_GetDocumentsPath().GetChars()); + if (logfile.IsEmpty()) logfile.Format("%s" GAMENAMELOWERCASE ".log", M_GetDocumentsPath().GetChars()); if (logfile.IsNotEmpty()) { @@ -576,7 +576,7 @@ int RunGame() TileFiles.AddArt(addArt); inputState.ClearAllInput(); - CONFIG_SetDefaultKeys(cl_defaultconfiguration == 1 ? "demolition/origbinds.txt" : cl_defaultconfiguration == 2 ? "demolition/leftbinds.txt" : "demolition/defbinds.txt"); + CONFIG_SetDefaultKeys(cl_defaultconfiguration == 1 ? "engine/origbinds.txt" : cl_defaultconfiguration == 2 ? "engine/leftbinds.txt" : "engine/defbinds.txt"); if (!GameConfig->IsInitialized()) { @@ -589,7 +589,7 @@ int RunGame() } V_InitFonts(); C_CON_SetAliases(); - sfx_empty = fileSystem.FindFile("demolition/dsempty.lmp"); // this must be done outside the sound code because it's initialized late. + sfx_empty = fileSystem.FindFile("engine/dsempty.lmp"); // this must be done outside the sound code because it's initialized late. Mus_Init(); InitStatistics(); M_Init(); @@ -639,7 +639,7 @@ FStringCVar* const CombatMacros[] = { &combatmacro0, &combatmacro1, &combatmacro void CONFIG_ReadCombatMacros() { FScanner sc; - sc.Open("demolition/combatmacros.txt"); + sc.Open("engine/combatmacros.txt"); for (auto s : CombatMacros) { sc.MustGetToken(TK_StringConst); diff --git a/source/common/initfs.cpp b/source/common/initfs.cpp index fedad69b8..4a1bd31c5 100644 --- a/source/common/initfs.cpp +++ b/source/common/initfs.cpp @@ -41,6 +41,7 @@ #include "gameconfigfile.h" #include "printf.h" #include "m_argv.h" +#include "version.h" #include "../platform/win32/i_findfile.h" // This is a temporary direct path. Needs to be fixed when stuff gets cleaned up. #ifndef PATH_MAX @@ -296,7 +297,7 @@ void InitFileSystem(TArray& groups) TArray Files; // First comes the engine's own stuff. - FString baseres = progdir + "demolition.pk3"; + FString baseres = progdir + ENGINERES_FILE; D_AddFile(Files, baseres); bool insertdirectoriesafter = Args->CheckParm("-insertdirafter"); diff --git a/source/common/menu/menu.cpp b/source/common/menu/menu.cpp index 3d0c9c0be..7d01f7e5f 100644 --- a/source/common/menu/menu.cpp +++ b/source/common/menu/menu.cpp @@ -265,7 +265,7 @@ bool DMenu::MouseEventBack(int type, int x, int y) { if (m_show_backbutton >= 0) { - FTexture* tex = TileFiles.GetTexture("demolition/graphics/m_back.png"); + FTexture* tex = TileFiles.GetTexture("engine/graphics/m_back.png"); if (tex != NULL) { if (m_show_backbutton&1) x -= screen->GetWidth() - tex->GetWidth() * CleanXfac; @@ -321,7 +321,7 @@ void DMenu::Drawer () { if (this == DMenu::CurrentMenu && BackbuttonAlpha > 0 && m_show_backbutton >= 0 && m_use_mouse) { - FTexture* tex = TileFiles.GetTexture("demolition/graphics/m_back.png"); + FTexture* tex = TileFiles.GetTexture("engine/graphics/m_back.png"); int w = tex->GetWidth() * CleanXfac; int h = tex->GetHeight() * CleanYfac; int x = (!(m_show_backbutton&1))? 0:screen->GetWidth() - w; diff --git a/source/common/menu/menudef.cpp b/source/common/menu/menudef.cpp index 81a450564..29e421df7 100644 --- a/source/common/menu/menudef.cpp +++ b/source/common/menu/menudef.cpp @@ -1145,7 +1145,7 @@ void M_ParseMenuDefs() DefaultOptionMenuSettings.Reset(); M_DeinitMenus(); - while ((lump = fileSystem.Iterate("demolition/menudef.txt", &lastlump)) != -1) + while ((lump = fileSystem.Iterate("engine/menudef.txt", &lastlump)) != -1) { FScanner sc(lump); diff --git a/source/common/music/i_music.cpp b/source/common/music/i_music.cpp index dd4093b1f..638b3a99c 100644 --- a/source/common/music/i_music.cpp +++ b/source/common/music/i_music.cpp @@ -226,7 +226,7 @@ static void SetupGenMidi() { // The OPL renderer should not care about where this comes from. // Note: No I_Error here - this needs to be consistent with the rest of the music code. - auto lump = fileSystem.FindFile("demolition/genmidi.op2"); + auto lump = fileSystem.FindFile("engine/genmidi.op2"); if (lump < 0) { Printf("No GENMIDI lump found. OPL playback not available."); diff --git a/source/common/music/i_soundfont.cpp b/source/common/music/i_soundfont.cpp index 666c07544..46c6a32d5 100644 --- a/source/common/music/i_soundfont.cpp +++ b/source/common/music/i_soundfont.cpp @@ -40,6 +40,7 @@ #include "filereadermusicinterface.h" #include "zmusic/zmusic.h" #include "resourcefile.h" +#include "version.h" #include "../platform/win32/i_findfile.h" // This is a temporary direct path. Needs to be fixed when stuff gets cleaned up. //========================================================================== @@ -436,7 +437,7 @@ void FSoundFontManager::CollectSoundfonts() if (soundfonts.Size() == 0) { - ProcessOneFile(NicePath("$PROGDIR/soundfonts/demolition.sf2")); + ProcessOneFile(NicePath("$PROGDIR/soundfonts/" GAMENAMELOWERCASE ".sf2")); } } diff --git a/source/common/music/music_config.cpp b/source/common/music/music_config.cpp index 2f8cc98ab..a4762ee9f 100644 --- a/source/common/music/music_config.cpp +++ b/source/common/music/music_config.cpp @@ -38,6 +38,7 @@ #include #include "c_cvars.h" #include "s_music.h" +#include "version.h" #include "zmusic/zmusic.h" //========================================================================== @@ -74,7 +75,7 @@ CUSTOM_CVAR(String, fluid_lib, "", CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_VIRTU FORWARD_STRING_CVAR(fluid_lib); } -CUSTOM_CVAR(String, fluid_patchset, "demolition", CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_VIRTUAL) +CUSTOM_CVAR(String, fluid_patchset, GAMENAMELOWERCASE, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_VIRTUAL) { FORWARD_STRING_CVAR(fluid_patchset); } @@ -273,7 +274,7 @@ CUSTOM_CVAR(Float, min_sustain_time, 5000, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CV FORWARD_CVAR(min_sustain_time); } -CUSTOM_CVAR(String, timidity_config, "demolition", CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_VIRTUAL) +CUSTOM_CVAR(String, timidity_config, GAMENAMELOWERCASE, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_VIRTUAL) { FORWARD_STRING_CVAR(timidity_config); } diff --git a/source/common/music/s_advsound.cpp b/source/common/music/s_advsound.cpp index aeaae7d36..f236adc14 100644 --- a/source/common/music/s_advsound.cpp +++ b/source/common/music/s_advsound.cpp @@ -97,7 +97,7 @@ void S_ParseSndInfo () { int lump, lastlump = 0; - while ((lump = fileSystem.Iterate("demolition/mussetting.txt", &lastlump)) >= 0) + while ((lump = fileSystem.Iterate("engine/mussetting.txt", &lastlump)) >= 0) { S_AddSNDINFO (lump); } diff --git a/source/common/ns.h b/source/common/ns.h index e7a3b0d85..48e8230e9 100644 --- a/source/common/ns.h +++ b/source/common/ns.h @@ -30,10 +30,3 @@ #endif -#ifndef APPNAME -#define APPNAME "Demolition" -#endif - -#ifndef APPBASENAME -#define APPBASENAME "demolition" -#endif diff --git a/source/common/rendering/v_video.cpp b/source/common/rendering/v_video.cpp index 8cc554bbf..c323fd1af 100644 --- a/source/common/rendering/v_video.cpp +++ b/source/common/rendering/v_video.cpp @@ -373,7 +373,7 @@ FString V_GetColorStringByName (const char *name, FScriptPosition *sc) if (fileSystem.GetNumEntries()==0) return FString(); - rgblump = fileSystem.FindFile ("demolition/X11R6RGB.txt"); + rgblump = fileSystem.FindFile ("engine/X11R6RGB.txt"); if (rgblump == -1) { if (!sc) Printf ("X11R6RGB lump not found\n"); diff --git a/source/common/screenshot.cpp b/source/common/screenshot.cpp index 305bbc24a..5b4fc1be8 100644 --- a/source/common/screenshot.cpp +++ b/source/common/screenshot.cpp @@ -76,7 +76,7 @@ CVAR(String, screenshot_dir, "", CVAR_ARCHIVE) // same here. static void WritePNGfile(FileWriter* file, const uint8_t* buffer, const PalEntry* palette, ESSType color_type, int width, int height, int pitch, float gamma) { - FStringf software("Demolition %s", GetVersionString()); + FStringf software(GAMENAME " %s", GetVersionString()); if (!M_CreatePNG(file, buffer, palette, color_type, width, height, pitch, gamma) || !M_AppendPNGText(file, "Software", software) || !M_FinishPNG(file)) diff --git a/source/common/searchpaths.cpp b/source/common/searchpaths.cpp index 9c85d0da0..0d02ab48a 100644 --- a/source/common/searchpaths.cpp +++ b/source/common/searchpaths.cpp @@ -35,6 +35,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "resourcefile.h" #include "printf.h" #include "common.h" +#include "version.h" #include "gamecontrol.h" #include "filesystem/filesystem.h" @@ -843,17 +844,17 @@ TArray ParseAllGrpInfos(TArray& filelist) extern FString progdir; // This opens the base resource only for reading the grpinfo from it which we need before setting up the game state. std::unique_ptr engine_res; - FString baseres = progdir + "demolition.pk3"; + FString baseres = progdir + ENGINERES_FILE; engine_res.reset(FResourceFile::OpenResourceFile(baseres, true, true)); if (engine_res) { - auto basegrp = engine_res->FindLump("demolition/grpinfo.txt"); + auto basegrp = engine_res->FindLump("engine/grpinfo.txt"); if (basegrp) { auto fr = basegrp->NewReader(); if (fr.isOpen()) { - groups = ParseGrpInfo("demolition/grpinfo.txt", fr, CRCMap); + groups = ParseGrpInfo("engine/grpinfo.txt", fr, CRCMap); } } } diff --git a/source/common/statistics.cpp b/source/common/statistics.cpp index 8405e541c..746a37b75 100644 --- a/source/common/statistics.cpp +++ b/source/common/statistics.cpp @@ -48,9 +48,10 @@ #include "savegamehelp.h" #include "sjson.h" #include "gstrings.h" +#include "version.h" CVAR(Int, savestatistics, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) -CVAR(String, statfile, "demolitionstat.txt", CVAR_ARCHIVE|CVAR_GLOBALCONFIG) +CVAR(String, statfile, GAMENAMELOWERCASE "stat.txt", CVAR_ARCHIVE|CVAR_GLOBALCONFIG) //========================================================================== // diff --git a/source/common/utility/stringtable.cpp b/source/common/utility/stringtable.cpp index 5f5b9809f..eca32f315 100644 --- a/source/common/utility/stringtable.cpp +++ b/source/common/utility/stringtable.cpp @@ -61,13 +61,13 @@ void FStringTable::LoadStrings () int lastlump, lump; lastlump = 0; - while ((lump = fileSystem.Iterate("demolition/lmacros", &lastlump, ELookupMode::NoExtension)) != -1) + while ((lump = fileSystem.Iterate("engine/lmacros", &lastlump, ELookupMode::NoExtension)) != -1) { readMacros(lump); } lastlump = 0; - while ((lump = fileSystem.Iterate ("demolition/language", &lastlump, ELookupMode::NoExtension)) != -1) + while ((lump = fileSystem.Iterate ("engine/language", &lastlump, ELookupMode::NoExtension)) != -1) { auto lumpdata = fileSystem.GetFileData(lump); diff --git a/source/common/version.h b/source/common/version.h index 8fce4a3ca..0f3ae30c4 100644 --- a/source/common/version.h +++ b/source/common/version.h @@ -58,11 +58,12 @@ const char *GetVersionString(); #define GAMENAMELOWERCASE "demolition" #define FORUM_URL "http://forum.zdoom.org/" #define BUGS_FORUM_URL "http://forum.zdoom.org/viewforum.php?f=2" // fixme before release!!! +#define ENGINERES_FILE GAMENAMELOWERCASE ".pk3" -#define SAVESIG_DN3D "Demolition.Duke" -#define SAVESIG_BLD "Demolition.Blood" -#define SAVESIG_RR "Demolition.Redneck" -#define SAVESIG_SW "Demolition.SW" +#define SAVESIG_DN3D GAMENAME ".Duke" +#define SAVESIG_BLD GAMENAME "Blood" +#define SAVESIG_RR GAMENAME "Redneck" +#define SAVESIG_SW GAMENAME "SW" #define MINSAVEVER_DN3D 1 #define MINSAVEVER_BLD 1 diff --git a/source/duke3d/src/duke3d.h b/source/duke3d/src/duke3d.h index 0fd7fb128..241fce099 100644 --- a/source/duke3d/src/duke3d.h +++ b/source/duke3d/src/duke3d.h @@ -36,8 +36,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "menu/menu.h" #include "memarena.h" -#define HEAD2 APPNAME - #ifdef EDUKE32_STANDALONE #define VOLUMEALL (1) #define PLUTOPAK (1) diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index e16daa1ca..a1345ab51 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -263,7 +263,7 @@ void G_GameExit(const char *msg) { if (!(msg[0] == ' ' && msg[1] == 0)) { - I_Error("%s", msg); + I_FatalError("%s", msg); } } throw ExitEvent(0); diff --git a/source/duke3d/src/gameexec.cpp b/source/duke3d/src/gameexec.cpp index c74162c37..4a60ee240 100644 --- a/source/duke3d/src/gameexec.cpp +++ b/source/duke3d/src/gameexec.cpp @@ -41,6 +41,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "c_dispatch.h" #include "quotemgr.h" #include "mapinfo.h" +#include "version.h" #include "debugbreak.h" extern bool rotatesprite_2doverride; @@ -3776,7 +3777,7 @@ badindex: quoteMgr.InitializeQuote(q, g_player[vm.playerNum].user_name); break; case STR_VERSION: - Bsprintf(tempbuf, HEAD2 " %s", GetGitDescription()); + Bsprintf(tempbuf, GAMENAME " %s", GetGitDescription()); quoteMgr.InitializeQuote(q, tempbuf); break; case STR_GAMETYPE: quoteMgr.InitializeQuote(q, g_gametypeNames[ud.coop]); break; @@ -6222,12 +6223,14 @@ badindex: vmErrorCase: // you're not supposed to be here VM_ScriptInfo(insptr, 64); debug_break(); - G_GameExit("An error has occurred in the " APPNAME " virtual machine.\n\n" - "If you are an end user, please e-mail the file " APPBASENAME ".log\n" + G_GameExit("An error has occurred in the " GAMENAME " virtual machine.\n\n"); +#if 0 + "If you are an end user, please e-mail the file " GAMENAMELOWERCASE ".log\n" "along with links to any mods you're using to development@voidpoint.com.\n\n" "If you are a developer, please attach all of your script files\n" "along with instructions on how to reproduce this error.\n\n" "Thank you!"); +#endif } #ifndef CON_USE_COMPUTED_GOTO } diff --git a/source/glbackend/glbackend.cpp b/source/glbackend/glbackend.cpp index a9aa4f995..aec7b1ad3 100644 --- a/source/glbackend/glbackend.cpp +++ b/source/glbackend/glbackend.cpp @@ -98,8 +98,8 @@ void GLInstance::Init(int ydim) ImGui_ImplOpenGL3_Init(); if (!ttf.Size()) { - //ttf = fileSystem.LoadFile("demolition/Capsmall_clean.ttf", 0); - ttf = fileSystem.LoadFile("demolition/Roboto-Regular.ttf", 0); + //ttf = fileSystem.LoadFile("engine/Capsmall_clean.ttf", 0); + ttf = fileSystem.LoadFile("engine/Roboto-Regular.ttf", 0); } if (ttf.Size()) io.Fonts->AddFontFromMemoryTTF(ttf.Data(), ttf.Size(), std::clamp(ydim / 40, 10, 30)); #endif @@ -107,9 +107,9 @@ void GLInstance::Init(int ydim) void GLInstance::LoadPolymostShader() { - auto fr1 = GetResource("demolition/shaders/glsl/polymost.vp"); + auto fr1 = GetResource("engine/shaders/glsl/polymost.vp"); TArray Vert = fr1.Read(); - fr1 = GetResource("demolition/shaders/glsl/polymost.fp"); + fr1 = GetResource("engine/shaders/glsl/polymost.fp"); TArray Frag = fr1.Read(); // Zero-terminate both strings. Vert.Push(0); @@ -121,9 +121,9 @@ void GLInstance::LoadPolymostShader() void GLInstance::LoadVPXShader() { - auto fr1 = GetResource("demolition/shaders/glsl/animvpx.vp"); + auto fr1 = GetResource("engine/shaders/glsl/animvpx.vp"); TArray Vert = fr1.Read(); - fr1 = GetResource("demolition/shaders/glsl/animvpx.fp"); + fr1 = GetResource("engine/shaders/glsl/animvpx.fp"); TArray Frag = fr1.Read(); // Zero-terminate both strings. Vert.Push(0); @@ -134,9 +134,9 @@ void GLInstance::LoadVPXShader() void GLInstance::LoadSurfaceShader() { - auto fr1 = GetResource("demolition/shaders/glsl/glsurface.vp"); + auto fr1 = GetResource("engine/shaders/glsl/glsurface.vp"); TArray Vert = fr1.Read(); - fr1 = GetResource("demolition/shaders/glsl/glsurface.fp"); + fr1 = GetResource("engine/shaders/glsl/glsurface.fp"); TArray Frag = fr1.Read(); // Zero-terminate both strings. Vert.Push(0); diff --git a/source/platform/win32/i_specialpaths.cpp b/source/platform/win32/i_specialpaths.cpp index 9a07e0584..a64cb03fc 100644 --- a/source/platform/win32/i_specialpaths.cpp +++ b/source/platform/win32/i_specialpaths.cpp @@ -44,14 +44,11 @@ #include "i_findfile.h" #include "gamecontrol.h" #include "m_argv.h" -//#include "version.h" // for GAMENAME +#include "version.h" // for GAMENAME // Stuff that needs to be set up later. FString progdir; static bool batchrun; -#define GAMENAMELOWERCASE "demolition" -#define GAMENAME "Demolition" -#define GAME_DIR "demolition" // Vanilla MinGW does not have folder ids #if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) @@ -136,8 +133,6 @@ FString M_GetAppDataPath(bool create) { // Failed (e.g. On Win9x): use program directory path = progdir; } - // Don't use GAME_DIR and such so that demolition and its child ports can - // share the node cache. path += "/" GAMENAMELOWERCASE; path.Substitute("//", "/"); // needed because progdir ends with a slash. if (create) @@ -165,8 +160,8 @@ FString M_GetAutoexecPath() // M_GetConfigPath Windows // // Returns the path to the config file. On Windows, this can vary for reading -// vs writing. i.e. If $PROGDIR/demolition-.ini does not exist, it will try -// to read from $PROGDIR/demolition.ini, but it will never write to demolition.ini. +// vs writing. i.e. If the user specific ini does not exist, it will try +// to read from a neutral version, but never write to it. // //=========================================================================== @@ -190,7 +185,7 @@ FString M_GetConfigPath(bool for_reading) path += "/" GAMENAMELOWERCASE ".ini"; } else - { // construct "$PROGDIR/demolition-$USER.ini" + { // construct "$PROGDIR/-$USER.ini" WCHAR uname[UNLEN+1]; DWORD unamelen = UNLEN; @@ -210,13 +205,13 @@ FString M_GetConfigPath(bool for_reading) path << GAMENAMELOWERCASE "-" << FString(uname) << ".ini"; } else - { // Couldn't get user name, so just use demolition.ini + { // Couldn't get user name, so just use base version. path += GAMENAMELOWERCASE ".ini"; } } // If we are reading the config file, check if it exists. If not, fallback - // to $PROGDIR/demolition.ini + // to base version. if (for_reading) { if (!FileExists(path)) diff --git a/source/rr/src/duke3d.h b/source/rr/src/duke3d.h index b71040bc9..afd4db0cd 100644 --- a/source/rr/src/duke3d.h +++ b/source/rr/src/duke3d.h @@ -38,8 +38,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_RR_NS -#define HEAD2 APPNAME - #define VOLUMEALL (g_Shareware == 0) #define PLUTOPAK (g_scriptVersion >= 14) #define VOLUMEONE (g_Shareware == 1) diff --git a/source/rr/src/game.cpp b/source/rr/src/game.cpp index 894c6209b..decc30058 100644 --- a/source/rr/src/game.cpp +++ b/source/rr/src/game.cpp @@ -371,7 +371,7 @@ void G_GameExit(const char *msg) { if (!(msg[0] == ' ' && msg[1] == 0)) { - I_Error(msg); + I_FatalError(msg); } } throw ExitEvent(0); diff --git a/source/rr/src/gameexec.cpp b/source/rr/src/gameexec.cpp index 39b36ee33..36ca27625 100644 --- a/source/rr/src/gameexec.cpp +++ b/source/rr/src/gameexec.cpp @@ -33,6 +33,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "osdcmds.h" #include "savegame.h" #include "gamecvars.h" +#include "version.h" #include "debugbreak.h" extern bool rotatesprite_2doverride; @@ -2528,12 +2529,14 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop) } debug_break(); VM_ScriptInfo(insptr, 64); - G_GameExit("An error has occurred in the " APPNAME " virtual machine.\n\n" - "If you are an end user, please e-mail the file " APPBASENAME ".log\n" + G_GameExit("An error has occurred in the " GAMENAME " virtual machine.\n\n"); +#if 0 + "If you are an end user, please e-mail the file " GAMENAMELOWERCASE ".log\n" "along with links to any mods you're using to development@voidpoint.com.\n\n" "If you are a developer, please attach all of your script files\n" "along with instructions on how to reproduce this error.\n\n" "Thank you!"); +#endif break; } } diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index f8056ad51..ba0d95d79 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -852,7 +852,7 @@ bool InitGame() LoadKVXFromScript("swvoxfil.txt"); // Load voxels from script file LoadPLockFromScript("swplock.txt"); // Get Parental Lock setup info - LoadCustomInfoFromScript("demolition/swcustom.txt"); // load the internal definitions. These also apply to the shareware version. + LoadCustomInfoFromScript("engine/swcustom.txt"); // load the internal definitions. These also apply to the shareware version. if (!SW_SHAREWARE) { LoadCustomInfoFromScript("swcustom.txt"); // Load user customisation information diff --git a/wadsrc/static/demolition/GENMIDI.op2 b/wadsrc/static/engine/GENMIDI.op2 similarity index 100% rename from wadsrc/static/demolition/GENMIDI.op2 rename to wadsrc/static/engine/GENMIDI.op2 diff --git a/wadsrc/static/demolition/Roboto-Regular.ttf b/wadsrc/static/engine/Roboto-Regular.ttf similarity index 100% rename from wadsrc/static/demolition/Roboto-Regular.ttf rename to wadsrc/static/engine/Roboto-Regular.ttf diff --git a/wadsrc/static/demolition/commonbinds.txt b/wadsrc/static/engine/commonbinds.txt similarity index 100% rename from wadsrc/static/demolition/commonbinds.txt rename to wadsrc/static/engine/commonbinds.txt diff --git a/wadsrc/static/demolition/confont.lmp b/wadsrc/static/engine/confont.lmp similarity index 100% rename from wadsrc/static/demolition/confont.lmp rename to wadsrc/static/engine/confont.lmp diff --git a/wadsrc/static/demolition/defbinds.txt b/wadsrc/static/engine/defbinds.txt similarity index 100% rename from wadsrc/static/demolition/defbinds.txt rename to wadsrc/static/engine/defbinds.txt diff --git a/wadsrc/static/demolition/dsempty.lmp b/wadsrc/static/engine/dsempty.lmp similarity index 100% rename from wadsrc/static/demolition/dsempty.lmp rename to wadsrc/static/engine/dsempty.lmp diff --git a/wadsrc/static/demolition/graphics/M_BACK.png b/wadsrc/static/engine/graphics/M_BACK.png similarity index 100% rename from wadsrc/static/demolition/graphics/M_BACK.png rename to wadsrc/static/engine/graphics/M_BACK.png diff --git a/wadsrc/static/demolition/grpinfo.txt b/wadsrc/static/engine/grpinfo.txt similarity index 100% rename from wadsrc/static/demolition/grpinfo.txt rename to wadsrc/static/engine/grpinfo.txt diff --git a/wadsrc/static/demolition/language.csv b/wadsrc/static/engine/language.csv similarity index 100% rename from wadsrc/static/demolition/language.csv rename to wadsrc/static/engine/language.csv diff --git a/wadsrc/static/demolition/leftbinds.txt b/wadsrc/static/engine/leftbinds.txt similarity index 100% rename from wadsrc/static/demolition/leftbinds.txt rename to wadsrc/static/engine/leftbinds.txt diff --git a/wadsrc/static/demolition/menudef.txt b/wadsrc/static/engine/menudef.txt similarity index 100% rename from wadsrc/static/demolition/menudef.txt rename to wadsrc/static/engine/menudef.txt diff --git a/wadsrc/static/demolition/newconsolefont.hex b/wadsrc/static/engine/newconsolefont.hex similarity index 100% rename from wadsrc/static/demolition/newconsolefont.hex rename to wadsrc/static/engine/newconsolefont.hex diff --git a/wadsrc/static/demolition/origbinds.txt b/wadsrc/static/engine/origbinds.txt similarity index 100% rename from wadsrc/static/demolition/origbinds.txt rename to wadsrc/static/engine/origbinds.txt diff --git a/wadsrc/static/demolition/shaders/glsl/animvpx.fp b/wadsrc/static/engine/shaders/glsl/animvpx.fp similarity index 100% rename from wadsrc/static/demolition/shaders/glsl/animvpx.fp rename to wadsrc/static/engine/shaders/glsl/animvpx.fp diff --git a/wadsrc/static/demolition/shaders/glsl/animvpx.vp b/wadsrc/static/engine/shaders/glsl/animvpx.vp similarity index 100% rename from wadsrc/static/demolition/shaders/glsl/animvpx.vp rename to wadsrc/static/engine/shaders/glsl/animvpx.vp diff --git a/wadsrc/static/demolition/shaders/glsl/glsurface.fp b/wadsrc/static/engine/shaders/glsl/glsurface.fp similarity index 100% rename from wadsrc/static/demolition/shaders/glsl/glsurface.fp rename to wadsrc/static/engine/shaders/glsl/glsurface.fp diff --git a/wadsrc/static/demolition/shaders/glsl/glsurface.vp b/wadsrc/static/engine/shaders/glsl/glsurface.vp similarity index 100% rename from wadsrc/static/demolition/shaders/glsl/glsurface.vp rename to wadsrc/static/engine/shaders/glsl/glsurface.vp diff --git a/wadsrc/static/demolition/shaders/glsl/polymost.fp b/wadsrc/static/engine/shaders/glsl/polymost.fp similarity index 100% rename from wadsrc/static/demolition/shaders/glsl/polymost.fp rename to wadsrc/static/engine/shaders/glsl/polymost.fp diff --git a/wadsrc/static/demolition/shaders/glsl/polymost.vp b/wadsrc/static/engine/shaders/glsl/polymost.vp similarity index 100% rename from wadsrc/static/demolition/shaders/glsl/polymost.vp rename to wadsrc/static/engine/shaders/glsl/polymost.vp diff --git a/wadsrc/static/demolition/textcolors.txt b/wadsrc/static/engine/textcolors.txt similarity index 100% rename from wadsrc/static/demolition/textcolors.txt rename to wadsrc/static/engine/textcolors.txt diff --git a/wadsrc/static/filter/blood/demolition/combatmacros.txt b/wadsrc/static/filter/blood/engine/combatmacros.txt similarity index 100% rename from wadsrc/static/filter/blood/demolition/combatmacros.txt rename to wadsrc/static/filter/blood/engine/combatmacros.txt diff --git a/wadsrc/static/filter/blood/demolition/defbinds.txt b/wadsrc/static/filter/blood/engine/defbinds.txt similarity index 100% rename from wadsrc/static/filter/blood/demolition/defbinds.txt rename to wadsrc/static/filter/blood/engine/defbinds.txt diff --git a/wadsrc/static/filter/blood/demolition/leftbinds.txt b/wadsrc/static/filter/blood/engine/leftbinds.txt similarity index 100% rename from wadsrc/static/filter/blood/demolition/leftbinds.txt rename to wadsrc/static/filter/blood/engine/leftbinds.txt diff --git a/wadsrc/static/filter/blood/demolition/origbinds.txt b/wadsrc/static/filter/blood/engine/origbinds.txt similarity index 100% rename from wadsrc/static/filter/blood/demolition/origbinds.txt rename to wadsrc/static/filter/blood/engine/origbinds.txt diff --git a/wadsrc/static/filter/duke/demolition/combatmacros.txt b/wadsrc/static/filter/duke/engine/combatmacros.txt similarity index 100% rename from wadsrc/static/filter/duke/demolition/combatmacros.txt rename to wadsrc/static/filter/duke/engine/combatmacros.txt diff --git a/wadsrc/static/filter/duke/demolition/defbinds.txt b/wadsrc/static/filter/duke/engine/defbinds.txt similarity index 100% rename from wadsrc/static/filter/duke/demolition/defbinds.txt rename to wadsrc/static/filter/duke/engine/defbinds.txt diff --git a/wadsrc/static/filter/duke/demolition/leftbinds.txt b/wadsrc/static/filter/duke/engine/leftbinds.txt similarity index 100% rename from wadsrc/static/filter/duke/demolition/leftbinds.txt rename to wadsrc/static/filter/duke/engine/leftbinds.txt diff --git a/wadsrc/static/filter/duke/demolition/origbinds.txt b/wadsrc/static/filter/duke/engine/origbinds.txt similarity index 100% rename from wadsrc/static/filter/duke/demolition/origbinds.txt rename to wadsrc/static/filter/duke/engine/origbinds.txt diff --git a/wadsrc/static/filter/ionfury/demolition/combatmacros.txt b/wadsrc/static/filter/ionfury/engine/combatmacros.txt similarity index 100% rename from wadsrc/static/filter/ionfury/demolition/combatmacros.txt rename to wadsrc/static/filter/ionfury/engine/combatmacros.txt diff --git a/wadsrc/static/filter/ionfury/demolition/defbinds.txt b/wadsrc/static/filter/ionfury/engine/defbinds.txt similarity index 100% rename from wadsrc/static/filter/ionfury/demolition/defbinds.txt rename to wadsrc/static/filter/ionfury/engine/defbinds.txt diff --git a/wadsrc/static/filter/ionfury/demolition/graphics/M_BACK.png b/wadsrc/static/filter/ionfury/engine/graphics/M_BACK.png similarity index 100% rename from wadsrc/static/filter/ionfury/demolition/graphics/M_BACK.png rename to wadsrc/static/filter/ionfury/engine/graphics/M_BACK.png diff --git a/wadsrc/static/filter/ionfury/demolition/leftbinds.txt b/wadsrc/static/filter/ionfury/engine/leftbinds.txt similarity index 100% rename from wadsrc/static/filter/ionfury/demolition/leftbinds.txt rename to wadsrc/static/filter/ionfury/engine/leftbinds.txt diff --git a/wadsrc/static/filter/ionfury/demolition/origbinds.txt b/wadsrc/static/filter/ionfury/engine/origbinds.txt similarity index 100% rename from wadsrc/static/filter/ionfury/demolition/origbinds.txt rename to wadsrc/static/filter/ionfury/engine/origbinds.txt diff --git a/wadsrc/static/filter/nam/demolition/combatmacros.txt b/wadsrc/static/filter/nam/engine/combatmacros.txt similarity index 100% rename from wadsrc/static/filter/nam/demolition/combatmacros.txt rename to wadsrc/static/filter/nam/engine/combatmacros.txt diff --git a/wadsrc/static/filter/nam/demolition/defbinds.txt b/wadsrc/static/filter/nam/engine/defbinds.txt similarity index 100% rename from wadsrc/static/filter/nam/demolition/defbinds.txt rename to wadsrc/static/filter/nam/engine/defbinds.txt diff --git a/wadsrc/static/filter/nam/demolition/graphics/M_BACK.png b/wadsrc/static/filter/nam/engine/graphics/M_BACK.png similarity index 100% rename from wadsrc/static/filter/nam/demolition/graphics/M_BACK.png rename to wadsrc/static/filter/nam/engine/graphics/M_BACK.png diff --git a/wadsrc/static/filter/nam/demolition/leftbinds.txt b/wadsrc/static/filter/nam/engine/leftbinds.txt similarity index 100% rename from wadsrc/static/filter/nam/demolition/leftbinds.txt rename to wadsrc/static/filter/nam/engine/leftbinds.txt diff --git a/wadsrc/static/filter/nam/demolition/origbinds.txt b/wadsrc/static/filter/nam/engine/origbinds.txt similarity index 100% rename from wadsrc/static/filter/nam/demolition/origbinds.txt rename to wadsrc/static/filter/nam/engine/origbinds.txt diff --git a/wadsrc/static/filter/redneck/demolition/combatmacros.txt b/wadsrc/static/filter/redneck/engine/combatmacros.txt similarity index 100% rename from wadsrc/static/filter/redneck/demolition/combatmacros.txt rename to wadsrc/static/filter/redneck/engine/combatmacros.txt diff --git a/wadsrc/static/filter/redneck/demolition/defbinds.txt b/wadsrc/static/filter/redneck/engine/defbinds.txt similarity index 100% rename from wadsrc/static/filter/redneck/demolition/defbinds.txt rename to wadsrc/static/filter/redneck/engine/defbinds.txt diff --git a/wadsrc/static/filter/redneck/demolition/graphics/M_BACK.png b/wadsrc/static/filter/redneck/engine/graphics/M_BACK.png similarity index 100% rename from wadsrc/static/filter/redneck/demolition/graphics/M_BACK.png rename to wadsrc/static/filter/redneck/engine/graphics/M_BACK.png diff --git a/wadsrc/static/filter/redneck/demolition/leftbinds.txt b/wadsrc/static/filter/redneck/engine/leftbinds.txt similarity index 100% rename from wadsrc/static/filter/redneck/demolition/leftbinds.txt rename to wadsrc/static/filter/redneck/engine/leftbinds.txt diff --git a/wadsrc/static/filter/redneck/demolition/origbinds.txt b/wadsrc/static/filter/redneck/engine/origbinds.txt similarity index 100% rename from wadsrc/static/filter/redneck/demolition/origbinds.txt rename to wadsrc/static/filter/redneck/engine/origbinds.txt diff --git a/wadsrc/static/filter/shadowwarrior/demolition/SWCustom.txt b/wadsrc/static/filter/shadowwarrior/engine/SWCustom.txt similarity index 100% rename from wadsrc/static/filter/shadowwarrior/demolition/SWCustom.txt rename to wadsrc/static/filter/shadowwarrior/engine/SWCustom.txt diff --git a/wadsrc/static/filter/shadowwarrior/demolition/combatmacros.txt b/wadsrc/static/filter/shadowwarrior/engine/combatmacros.txt similarity index 100% rename from wadsrc/static/filter/shadowwarrior/demolition/combatmacros.txt rename to wadsrc/static/filter/shadowwarrior/engine/combatmacros.txt diff --git a/wadsrc/static/filter/shadowwarrior/demolition/defbinds.txt b/wadsrc/static/filter/shadowwarrior/engine/defbinds.txt similarity index 100% rename from wadsrc/static/filter/shadowwarrior/demolition/defbinds.txt rename to wadsrc/static/filter/shadowwarrior/engine/defbinds.txt diff --git a/wadsrc/static/filter/shadowwarrior/demolition/leftbinds.txt b/wadsrc/static/filter/shadowwarrior/engine/leftbinds.txt similarity index 100% rename from wadsrc/static/filter/shadowwarrior/demolition/leftbinds.txt rename to wadsrc/static/filter/shadowwarrior/engine/leftbinds.txt diff --git a/wadsrc/static/filter/shadowwarrior/demolition/origbinds.txt b/wadsrc/static/filter/shadowwarrior/engine/origbinds.txt similarity index 100% rename from wadsrc/static/filter/shadowwarrior/demolition/origbinds.txt rename to wadsrc/static/filter/shadowwarrior/engine/origbinds.txt diff --git a/wadsrc/static/filter/ww2gi/demolition/combatmacros.txt b/wadsrc/static/filter/ww2gi/engine/combatmacros.txt similarity index 100% rename from wadsrc/static/filter/ww2gi/demolition/combatmacros.txt rename to wadsrc/static/filter/ww2gi/engine/combatmacros.txt diff --git a/wadsrc/static/filter/ww2gi/demolition/defbinds.txt b/wadsrc/static/filter/ww2gi/engine/defbinds.txt similarity index 100% rename from wadsrc/static/filter/ww2gi/demolition/defbinds.txt rename to wadsrc/static/filter/ww2gi/engine/defbinds.txt diff --git a/wadsrc/static/filter/ww2gi/demolition/graphics/M_BACK.png b/wadsrc/static/filter/ww2gi/engine/graphics/M_BACK.png similarity index 100% rename from wadsrc/static/filter/ww2gi/demolition/graphics/M_BACK.png rename to wadsrc/static/filter/ww2gi/engine/graphics/M_BACK.png diff --git a/wadsrc/static/filter/ww2gi/demolition/leftbinds.txt b/wadsrc/static/filter/ww2gi/engine/leftbinds.txt similarity index 100% rename from wadsrc/static/filter/ww2gi/demolition/leftbinds.txt rename to wadsrc/static/filter/ww2gi/engine/leftbinds.txt diff --git a/wadsrc/static/filter/ww2gi/demolition/origbinds.txt b/wadsrc/static/filter/ww2gi/engine/origbinds.txt similarity index 100% rename from wadsrc/static/filter/ww2gi/demolition/origbinds.txt rename to wadsrc/static/filter/ww2gi/engine/origbinds.txt