- renamed the internal resource directory to "engine" and routed most literal mentions of the engine name through version.h
All this comes from a time when I didn't use version.h so it's better to do it the same way as GZDoom to allow easy renaming of the engine.
|
@ -28,6 +28,7 @@
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
#include "stats.h"
|
#include "stats.h"
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#ifdef USE_OPENGL
|
#ifdef USE_OPENGL
|
||||||
# include "glsurface.h"
|
# include "glsurface.h"
|
||||||
|
@ -1454,8 +1455,8 @@ static int32_t bakrendmode;
|
||||||
#endif
|
#endif
|
||||||
static int32_t baktile;
|
static int32_t baktile;
|
||||||
|
|
||||||
#ifdef APPNAME
|
#ifdef GAMENAME
|
||||||
char apptitle[256] = APPNAME;
|
char apptitle[256] = GAMENAME;
|
||||||
#else
|
#else
|
||||||
char apptitle[256] = "Build Engine";
|
char apptitle[256] = "Build Engine";
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -682,7 +682,7 @@ void ReadBindings(int lump, bool override)
|
||||||
|
|
||||||
void CONFIG_SetDefaultKeys(const char* baseconfig)
|
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);
|
if (lump >= 0) ReadBindings(lump, true);
|
||||||
int lastlump = 0;
|
int lastlump = 0;
|
||||||
|
|
||||||
|
@ -700,7 +700,7 @@ void CONFIG_SetDefaultKeys(const char* baseconfig)
|
||||||
|
|
||||||
void C_BindDefaults()
|
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
|
#if 0
|
||||||
|
|
|
@ -404,7 +404,7 @@ void V_InitFontColors ()
|
||||||
TranslationLookup.Clear();
|
TranslationLookup.Clear();
|
||||||
TranslationColors.Clear();
|
TranslationColors.Clear();
|
||||||
|
|
||||||
while ((lump = fileSystem.Iterate("demolition/textcolors.txt", &lastlump)) != -1)
|
while ((lump = fileSystem.Iterate("engine/textcolors.txt", &lastlump)) != -1)
|
||||||
{
|
{
|
||||||
FScanner sc(lump);
|
FScanner sc(lump);
|
||||||
while (sc.GetString())
|
while (sc.GetString())
|
||||||
|
@ -714,13 +714,13 @@ void V_InitFonts()
|
||||||
FFont *CreateHexLumpFont(const char *fontname, const char* lump);
|
FFont *CreateHexLumpFont(const char *fontname, const char* lump);
|
||||||
FFont *CreateHexLumpFont2(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.
|
I_Error("newconsolefont.hex not found"); // This font is needed - do not start up without it.
|
||||||
NewConsoleFont = CreateHexLumpFont("NewConsoleFont", "demolition/newconsolefont.hex");
|
NewConsoleFont = CreateHexLumpFont("NewConsoleFont", "engine/newconsolefont.hex");
|
||||||
NewSmallFont = CreateHexLumpFont2("NewSmallFont", "demolition/newconsolefont.hex");
|
NewSmallFont = CreateHexLumpFont2("NewSmallFont", "engine/newconsolefont.hex");
|
||||||
CurrentConsoleFont = NewConsoleFont;
|
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.
|
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.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -521,7 +521,7 @@ int RunGame()
|
||||||
FString logfile = Args->TakeValue("+logfile");
|
FString logfile = Args->TakeValue("+logfile");
|
||||||
|
|
||||||
// As long as this engine is still in prerelease mode let's always write a log file.
|
// 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())
|
if (logfile.IsNotEmpty())
|
||||||
{
|
{
|
||||||
|
@ -576,7 +576,7 @@ int RunGame()
|
||||||
TileFiles.AddArt(addArt);
|
TileFiles.AddArt(addArt);
|
||||||
|
|
||||||
inputState.ClearAllInput();
|
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())
|
if (!GameConfig->IsInitialized())
|
||||||
{
|
{
|
||||||
|
@ -589,7 +589,7 @@ int RunGame()
|
||||||
}
|
}
|
||||||
V_InitFonts();
|
V_InitFonts();
|
||||||
C_CON_SetAliases();
|
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();
|
Mus_Init();
|
||||||
InitStatistics();
|
InitStatistics();
|
||||||
M_Init();
|
M_Init();
|
||||||
|
@ -639,7 +639,7 @@ FStringCVar* const CombatMacros[] = { &combatmacro0, &combatmacro1, &combatmacro
|
||||||
void CONFIG_ReadCombatMacros()
|
void CONFIG_ReadCombatMacros()
|
||||||
{
|
{
|
||||||
FScanner sc;
|
FScanner sc;
|
||||||
sc.Open("demolition/combatmacros.txt");
|
sc.Open("engine/combatmacros.txt");
|
||||||
for (auto s : CombatMacros)
|
for (auto s : CombatMacros)
|
||||||
{
|
{
|
||||||
sc.MustGetToken(TK_StringConst);
|
sc.MustGetToken(TK_StringConst);
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
#include "gameconfigfile.h"
|
#include "gameconfigfile.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "m_argv.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.
|
#include "../platform/win32/i_findfile.h" // This is a temporary direct path. Needs to be fixed when stuff gets cleaned up.
|
||||||
|
|
||||||
#ifndef PATH_MAX
|
#ifndef PATH_MAX
|
||||||
|
@ -296,7 +297,7 @@ void InitFileSystem(TArray<GrpEntry>& groups)
|
||||||
TArray<FString> Files;
|
TArray<FString> Files;
|
||||||
|
|
||||||
// First comes the engine's own stuff.
|
// First comes the engine's own stuff.
|
||||||
FString baseres = progdir + "demolition.pk3";
|
FString baseres = progdir + ENGINERES_FILE;
|
||||||
D_AddFile(Files, baseres);
|
D_AddFile(Files, baseres);
|
||||||
|
|
||||||
bool insertdirectoriesafter = Args->CheckParm("-insertdirafter");
|
bool insertdirectoriesafter = Args->CheckParm("-insertdirafter");
|
||||||
|
|
|
@ -265,7 +265,7 @@ bool DMenu::MouseEventBack(int type, int x, int y)
|
||||||
{
|
{
|
||||||
if (m_show_backbutton >= 0)
|
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 (tex != NULL)
|
||||||
{
|
{
|
||||||
if (m_show_backbutton&1) x -= screen->GetWidth() - tex->GetWidth() * CleanXfac;
|
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)
|
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 w = tex->GetWidth() * CleanXfac;
|
||||||
int h = tex->GetHeight() * CleanYfac;
|
int h = tex->GetHeight() * CleanYfac;
|
||||||
int x = (!(m_show_backbutton&1))? 0:screen->GetWidth() - w;
|
int x = (!(m_show_backbutton&1))? 0:screen->GetWidth() - w;
|
||||||
|
|
|
@ -1145,7 +1145,7 @@ void M_ParseMenuDefs()
|
||||||
DefaultOptionMenuSettings.Reset();
|
DefaultOptionMenuSettings.Reset();
|
||||||
|
|
||||||
M_DeinitMenus();
|
M_DeinitMenus();
|
||||||
while ((lump = fileSystem.Iterate("demolition/menudef.txt", &lastlump)) != -1)
|
while ((lump = fileSystem.Iterate("engine/menudef.txt", &lastlump)) != -1)
|
||||||
{
|
{
|
||||||
FScanner sc(lump);
|
FScanner sc(lump);
|
||||||
|
|
||||||
|
|
|
@ -226,7 +226,7 @@ static void SetupGenMidi()
|
||||||
{
|
{
|
||||||
// The OPL renderer should not care about where this comes from.
|
// 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.
|
// 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)
|
if (lump < 0)
|
||||||
{
|
{
|
||||||
Printf("No GENMIDI lump found. OPL playback not available.");
|
Printf("No GENMIDI lump found. OPL playback not available.");
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include "filereadermusicinterface.h"
|
#include "filereadermusicinterface.h"
|
||||||
#include "zmusic/zmusic.h"
|
#include "zmusic/zmusic.h"
|
||||||
#include "resourcefile.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.
|
#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)
|
if (soundfonts.Size() == 0)
|
||||||
{
|
{
|
||||||
ProcessOneFile(NicePath("$PROGDIR/soundfonts/demolition.sf2"));
|
ProcessOneFile(NicePath("$PROGDIR/soundfonts/" GAMENAMELOWERCASE ".sf2"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "c_cvars.h"
|
#include "c_cvars.h"
|
||||||
#include "s_music.h"
|
#include "s_music.h"
|
||||||
|
#include "version.h"
|
||||||
#include "zmusic/zmusic.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);
|
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);
|
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);
|
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);
|
FORWARD_STRING_CVAR(timidity_config);
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ void S_ParseSndInfo ()
|
||||||
{
|
{
|
||||||
int lump, lastlump = 0;
|
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);
|
S_AddSNDINFO (lump);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,10 +30,3 @@
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef APPNAME
|
|
||||||
#define APPNAME "Demolition"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef APPBASENAME
|
|
||||||
#define APPBASENAME "demolition"
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -373,7 +373,7 @@ FString V_GetColorStringByName (const char *name, FScriptPosition *sc)
|
||||||
|
|
||||||
if (fileSystem.GetNumEntries()==0) return FString();
|
if (fileSystem.GetNumEntries()==0) return FString();
|
||||||
|
|
||||||
rgblump = fileSystem.FindFile ("demolition/X11R6RGB.txt");
|
rgblump = fileSystem.FindFile ("engine/X11R6RGB.txt");
|
||||||
if (rgblump == -1)
|
if (rgblump == -1)
|
||||||
{
|
{
|
||||||
if (!sc) Printf ("X11R6RGB lump not found\n");
|
if (!sc) Printf ("X11R6RGB lump not found\n");
|
||||||
|
|
|
@ -76,7 +76,7 @@ CVAR(String, screenshot_dir, "", CVAR_ARCHIVE) // same here.
|
||||||
static void WritePNGfile(FileWriter* file, const uint8_t* buffer, const PalEntry* palette,
|
static void WritePNGfile(FileWriter* file, const uint8_t* buffer, const PalEntry* palette,
|
||||||
ESSType color_type, int width, int height, int pitch, float gamma)
|
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) ||
|
if (!M_CreatePNG(file, buffer, palette, color_type, width, height, pitch, gamma) ||
|
||||||
!M_AppendPNGText(file, "Software", software) ||
|
!M_AppendPNGText(file, "Software", software) ||
|
||||||
!M_FinishPNG(file))
|
!M_FinishPNG(file))
|
||||||
|
|
|
@ -35,6 +35,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "resourcefile.h"
|
#include "resourcefile.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "version.h"
|
||||||
#include "gamecontrol.h"
|
#include "gamecontrol.h"
|
||||||
#include "filesystem/filesystem.h"
|
#include "filesystem/filesystem.h"
|
||||||
|
|
||||||
|
@ -843,17 +844,17 @@ TArray<GrpInfo> ParseAllGrpInfos(TArray<FileEntry>& filelist)
|
||||||
extern FString progdir;
|
extern FString progdir;
|
||||||
// This opens the base resource only for reading the grpinfo from it which we need before setting up the game state.
|
// This opens the base resource only for reading the grpinfo from it which we need before setting up the game state.
|
||||||
std::unique_ptr<FResourceFile> engine_res;
|
std::unique_ptr<FResourceFile> engine_res;
|
||||||
FString baseres = progdir + "demolition.pk3";
|
FString baseres = progdir + ENGINERES_FILE;
|
||||||
engine_res.reset(FResourceFile::OpenResourceFile(baseres, true, true));
|
engine_res.reset(FResourceFile::OpenResourceFile(baseres, true, true));
|
||||||
if (engine_res)
|
if (engine_res)
|
||||||
{
|
{
|
||||||
auto basegrp = engine_res->FindLump("demolition/grpinfo.txt");
|
auto basegrp = engine_res->FindLump("engine/grpinfo.txt");
|
||||||
if (basegrp)
|
if (basegrp)
|
||||||
{
|
{
|
||||||
auto fr = basegrp->NewReader();
|
auto fr = basegrp->NewReader();
|
||||||
if (fr.isOpen())
|
if (fr.isOpen())
|
||||||
{
|
{
|
||||||
groups = ParseGrpInfo("demolition/grpinfo.txt", fr, CRCMap);
|
groups = ParseGrpInfo("engine/grpinfo.txt", fr, CRCMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,9 +48,10 @@
|
||||||
#include "savegamehelp.h"
|
#include "savegamehelp.h"
|
||||||
#include "sjson.h"
|
#include "sjson.h"
|
||||||
#include "gstrings.h"
|
#include "gstrings.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
CVAR(Int, savestatistics, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
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)
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
|
|
|
@ -61,13 +61,13 @@ void FStringTable::LoadStrings ()
|
||||||
int lastlump, lump;
|
int lastlump, lump;
|
||||||
|
|
||||||
lastlump = 0;
|
lastlump = 0;
|
||||||
while ((lump = fileSystem.Iterate("demolition/lmacros", &lastlump, ELookupMode::NoExtension)) != -1)
|
while ((lump = fileSystem.Iterate("engine/lmacros", &lastlump, ELookupMode::NoExtension)) != -1)
|
||||||
{
|
{
|
||||||
readMacros(lump);
|
readMacros(lump);
|
||||||
}
|
}
|
||||||
|
|
||||||
lastlump = 0;
|
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);
|
auto lumpdata = fileSystem.GetFileData(lump);
|
||||||
|
|
||||||
|
|
|
@ -58,11 +58,12 @@ const char *GetVersionString();
|
||||||
#define GAMENAMELOWERCASE "demolition"
|
#define GAMENAMELOWERCASE "demolition"
|
||||||
#define FORUM_URL "http://forum.zdoom.org/"
|
#define FORUM_URL "http://forum.zdoom.org/"
|
||||||
#define BUGS_FORUM_URL "http://forum.zdoom.org/viewforum.php?f=2" // fixme before release!!!
|
#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_DN3D GAMENAME ".Duke"
|
||||||
#define SAVESIG_BLD "Demolition.Blood"
|
#define SAVESIG_BLD GAMENAME "Blood"
|
||||||
#define SAVESIG_RR "Demolition.Redneck"
|
#define SAVESIG_RR GAMENAME "Redneck"
|
||||||
#define SAVESIG_SW "Demolition.SW"
|
#define SAVESIG_SW GAMENAME "SW"
|
||||||
|
|
||||||
#define MINSAVEVER_DN3D 1
|
#define MINSAVEVER_DN3D 1
|
||||||
#define MINSAVEVER_BLD 1
|
#define MINSAVEVER_BLD 1
|
||||||
|
|
|
@ -36,8 +36,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "menu/menu.h"
|
#include "menu/menu.h"
|
||||||
#include "memarena.h"
|
#include "memarena.h"
|
||||||
|
|
||||||
#define HEAD2 APPNAME
|
|
||||||
|
|
||||||
#ifdef EDUKE32_STANDALONE
|
#ifdef EDUKE32_STANDALONE
|
||||||
#define VOLUMEALL (1)
|
#define VOLUMEALL (1)
|
||||||
#define PLUTOPAK (1)
|
#define PLUTOPAK (1)
|
||||||
|
|
|
@ -263,7 +263,7 @@ void G_GameExit(const char *msg)
|
||||||
{
|
{
|
||||||
if (!(msg[0] == ' ' && msg[1] == 0))
|
if (!(msg[0] == ' ' && msg[1] == 0))
|
||||||
{
|
{
|
||||||
I_Error("%s", msg);
|
I_FatalError("%s", msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ExitEvent(0);
|
throw ExitEvent(0);
|
||||||
|
|
|
@ -41,6 +41,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "c_dispatch.h"
|
#include "c_dispatch.h"
|
||||||
#include "quotemgr.h"
|
#include "quotemgr.h"
|
||||||
#include "mapinfo.h"
|
#include "mapinfo.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#include "debugbreak.h"
|
#include "debugbreak.h"
|
||||||
extern bool rotatesprite_2doverride;
|
extern bool rotatesprite_2doverride;
|
||||||
|
@ -3776,7 +3777,7 @@ badindex:
|
||||||
quoteMgr.InitializeQuote(q, g_player[vm.playerNum].user_name);
|
quoteMgr.InitializeQuote(q, g_player[vm.playerNum].user_name);
|
||||||
break;
|
break;
|
||||||
case STR_VERSION:
|
case STR_VERSION:
|
||||||
Bsprintf(tempbuf, HEAD2 " %s", GetGitDescription());
|
Bsprintf(tempbuf, GAMENAME " %s", GetGitDescription());
|
||||||
quoteMgr.InitializeQuote(q, tempbuf);
|
quoteMgr.InitializeQuote(q, tempbuf);
|
||||||
break;
|
break;
|
||||||
case STR_GAMETYPE: quoteMgr.InitializeQuote(q, g_gametypeNames[ud.coop]); 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
|
vmErrorCase: // you're not supposed to be here
|
||||||
VM_ScriptInfo(insptr, 64);
|
VM_ScriptInfo(insptr, 64);
|
||||||
debug_break();
|
debug_break();
|
||||||
G_GameExit("An error has occurred in the " APPNAME " virtual machine.\n\n"
|
G_GameExit("An error has occurred in the " GAMENAME " virtual machine.\n\n");
|
||||||
"If you are an end user, please e-mail the file " APPBASENAME ".log\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"
|
"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"
|
"If you are a developer, please attach all of your script files\n"
|
||||||
"along with instructions on how to reproduce this error.\n\n"
|
"along with instructions on how to reproduce this error.\n\n"
|
||||||
"Thank you!");
|
"Thank you!");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#ifndef CON_USE_COMPUTED_GOTO
|
#ifndef CON_USE_COMPUTED_GOTO
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,8 +98,8 @@ void GLInstance::Init(int ydim)
|
||||||
ImGui_ImplOpenGL3_Init();
|
ImGui_ImplOpenGL3_Init();
|
||||||
if (!ttf.Size())
|
if (!ttf.Size())
|
||||||
{
|
{
|
||||||
//ttf = fileSystem.LoadFile("demolition/Capsmall_clean.ttf", 0);
|
//ttf = fileSystem.LoadFile("engine/Capsmall_clean.ttf", 0);
|
||||||
ttf = fileSystem.LoadFile("demolition/Roboto-Regular.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));
|
if (ttf.Size()) io.Fonts->AddFontFromMemoryTTF(ttf.Data(), ttf.Size(), std::clamp(ydim / 40, 10, 30));
|
||||||
#endif
|
#endif
|
||||||
|
@ -107,9 +107,9 @@ void GLInstance::Init(int ydim)
|
||||||
|
|
||||||
void GLInstance::LoadPolymostShader()
|
void GLInstance::LoadPolymostShader()
|
||||||
{
|
{
|
||||||
auto fr1 = GetResource("demolition/shaders/glsl/polymost.vp");
|
auto fr1 = GetResource("engine/shaders/glsl/polymost.vp");
|
||||||
TArray<uint8_t> Vert = fr1.Read();
|
TArray<uint8_t> Vert = fr1.Read();
|
||||||
fr1 = GetResource("demolition/shaders/glsl/polymost.fp");
|
fr1 = GetResource("engine/shaders/glsl/polymost.fp");
|
||||||
TArray<uint8_t> Frag = fr1.Read();
|
TArray<uint8_t> Frag = fr1.Read();
|
||||||
// Zero-terminate both strings.
|
// Zero-terminate both strings.
|
||||||
Vert.Push(0);
|
Vert.Push(0);
|
||||||
|
@ -121,9 +121,9 @@ void GLInstance::LoadPolymostShader()
|
||||||
|
|
||||||
void GLInstance::LoadVPXShader()
|
void GLInstance::LoadVPXShader()
|
||||||
{
|
{
|
||||||
auto fr1 = GetResource("demolition/shaders/glsl/animvpx.vp");
|
auto fr1 = GetResource("engine/shaders/glsl/animvpx.vp");
|
||||||
TArray<uint8_t> Vert = fr1.Read();
|
TArray<uint8_t> Vert = fr1.Read();
|
||||||
fr1 = GetResource("demolition/shaders/glsl/animvpx.fp");
|
fr1 = GetResource("engine/shaders/glsl/animvpx.fp");
|
||||||
TArray<uint8_t> Frag = fr1.Read();
|
TArray<uint8_t> Frag = fr1.Read();
|
||||||
// Zero-terminate both strings.
|
// Zero-terminate both strings.
|
||||||
Vert.Push(0);
|
Vert.Push(0);
|
||||||
|
@ -134,9 +134,9 @@ void GLInstance::LoadVPXShader()
|
||||||
|
|
||||||
void GLInstance::LoadSurfaceShader()
|
void GLInstance::LoadSurfaceShader()
|
||||||
{
|
{
|
||||||
auto fr1 = GetResource("demolition/shaders/glsl/glsurface.vp");
|
auto fr1 = GetResource("engine/shaders/glsl/glsurface.vp");
|
||||||
TArray<uint8_t> Vert = fr1.Read();
|
TArray<uint8_t> Vert = fr1.Read();
|
||||||
fr1 = GetResource("demolition/shaders/glsl/glsurface.fp");
|
fr1 = GetResource("engine/shaders/glsl/glsurface.fp");
|
||||||
TArray<uint8_t> Frag = fr1.Read();
|
TArray<uint8_t> Frag = fr1.Read();
|
||||||
// Zero-terminate both strings.
|
// Zero-terminate both strings.
|
||||||
Vert.Push(0);
|
Vert.Push(0);
|
||||||
|
|
|
@ -44,14 +44,11 @@
|
||||||
#include "i_findfile.h"
|
#include "i_findfile.h"
|
||||||
#include "gamecontrol.h"
|
#include "gamecontrol.h"
|
||||||
#include "m_argv.h"
|
#include "m_argv.h"
|
||||||
//#include "version.h" // for GAMENAME
|
#include "version.h" // for GAMENAME
|
||||||
|
|
||||||
// Stuff that needs to be set up later.
|
// Stuff that needs to be set up later.
|
||||||
FString progdir;
|
FString progdir;
|
||||||
static bool batchrun;
|
static bool batchrun;
|
||||||
#define GAMENAMELOWERCASE "demolition"
|
|
||||||
#define GAMENAME "Demolition"
|
|
||||||
#define GAME_DIR "demolition"
|
|
||||||
|
|
||||||
// Vanilla MinGW does not have folder ids
|
// Vanilla MinGW does not have folder ids
|
||||||
#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
|
#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
|
||||||
|
@ -136,8 +133,6 @@ FString M_GetAppDataPath(bool create)
|
||||||
{ // Failed (e.g. On Win9x): use program directory
|
{ // Failed (e.g. On Win9x): use program directory
|
||||||
path = progdir;
|
path = progdir;
|
||||||
}
|
}
|
||||||
// Don't use GAME_DIR and such so that demolition and its child ports can
|
|
||||||
// share the node cache.
|
|
||||||
path += "/" GAMENAMELOWERCASE;
|
path += "/" GAMENAMELOWERCASE;
|
||||||
path.Substitute("//", "/"); // needed because progdir ends with a slash.
|
path.Substitute("//", "/"); // needed because progdir ends with a slash.
|
||||||
if (create)
|
if (create)
|
||||||
|
@ -165,8 +160,8 @@ FString M_GetAutoexecPath()
|
||||||
// M_GetConfigPath Windows
|
// M_GetConfigPath Windows
|
||||||
//
|
//
|
||||||
// Returns the path to the config file. On Windows, this can vary for reading
|
// Returns the path to the config file. On Windows, this can vary for reading
|
||||||
// vs writing. i.e. If $PROGDIR/demolition-<user>.ini does not exist, it will try
|
// vs writing. i.e. If the user specific ini does not exist, it will try
|
||||||
// to read from $PROGDIR/demolition.ini, but it will never write to demolition.ini.
|
// to read from a neutral version, but never write to it.
|
||||||
//
|
//
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
|
@ -190,7 +185,7 @@ FString M_GetConfigPath(bool for_reading)
|
||||||
path += "/" GAMENAMELOWERCASE ".ini";
|
path += "/" GAMENAMELOWERCASE ".ini";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // construct "$PROGDIR/demolition-$USER.ini"
|
{ // construct "$PROGDIR/-$USER.ini"
|
||||||
WCHAR uname[UNLEN+1];
|
WCHAR uname[UNLEN+1];
|
||||||
DWORD unamelen = UNLEN;
|
DWORD unamelen = UNLEN;
|
||||||
|
|
||||||
|
@ -210,13 +205,13 @@ FString M_GetConfigPath(bool for_reading)
|
||||||
path << GAMENAMELOWERCASE "-" << FString(uname) << ".ini";
|
path << GAMENAMELOWERCASE "-" << FString(uname) << ".ini";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // Couldn't get user name, so just use demolition.ini
|
{ // Couldn't get user name, so just use base version.
|
||||||
path += GAMENAMELOWERCASE ".ini";
|
path += GAMENAMELOWERCASE ".ini";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we are reading the config file, check if it exists. If not, fallback
|
// 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 (for_reading)
|
||||||
{
|
{
|
||||||
if (!FileExists(path))
|
if (!FileExists(path))
|
||||||
|
|
|
@ -38,8 +38,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
BEGIN_RR_NS
|
BEGIN_RR_NS
|
||||||
|
|
||||||
#define HEAD2 APPNAME
|
|
||||||
|
|
||||||
#define VOLUMEALL (g_Shareware == 0)
|
#define VOLUMEALL (g_Shareware == 0)
|
||||||
#define PLUTOPAK (g_scriptVersion >= 14)
|
#define PLUTOPAK (g_scriptVersion >= 14)
|
||||||
#define VOLUMEONE (g_Shareware == 1)
|
#define VOLUMEONE (g_Shareware == 1)
|
||||||
|
|
|
@ -371,7 +371,7 @@ void G_GameExit(const char *msg)
|
||||||
{
|
{
|
||||||
if (!(msg[0] == ' ' && msg[1] == 0))
|
if (!(msg[0] == ' ' && msg[1] == 0))
|
||||||
{
|
{
|
||||||
I_Error(msg);
|
I_FatalError(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ExitEvent(0);
|
throw ExitEvent(0);
|
||||||
|
|
|
@ -33,6 +33,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "osdcmds.h"
|
#include "osdcmds.h"
|
||||||
#include "savegame.h"
|
#include "savegame.h"
|
||||||
#include "gamecvars.h"
|
#include "gamecvars.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#include "debugbreak.h"
|
#include "debugbreak.h"
|
||||||
extern bool rotatesprite_2doverride;
|
extern bool rotatesprite_2doverride;
|
||||||
|
@ -2528,12 +2529,14 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
|
||||||
}
|
}
|
||||||
debug_break();
|
debug_break();
|
||||||
VM_ScriptInfo(insptr, 64);
|
VM_ScriptInfo(insptr, 64);
|
||||||
G_GameExit("An error has occurred in the " APPNAME " virtual machine.\n\n"
|
G_GameExit("An error has occurred in the " GAMENAME " virtual machine.\n\n");
|
||||||
"If you are an end user, please e-mail the file " APPBASENAME ".log\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"
|
"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"
|
"If you are a developer, please attach all of your script files\n"
|
||||||
"along with instructions on how to reproduce this error.\n\n"
|
"along with instructions on how to reproduce this error.\n\n"
|
||||||
"Thank you!");
|
"Thank you!");
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -852,7 +852,7 @@ bool InitGame()
|
||||||
LoadKVXFromScript("swvoxfil.txt"); // Load voxels from script file
|
LoadKVXFromScript("swvoxfil.txt"); // Load voxels from script file
|
||||||
LoadPLockFromScript("swplock.txt"); // Get Parental Lock setup info
|
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)
|
if (!SW_SHAREWARE)
|
||||||
{
|
{
|
||||||
LoadCustomInfoFromScript("swcustom.txt"); // Load user customisation information
|
LoadCustomInfoFromScript("swcustom.txt"); // Load user customisation information
|
||||||
|
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |