summaryrefslogtreecommitdiff
path: root/src/strife
diff options
context:
space:
mode:
Diffstat (limited to 'src/strife')
-rw-r--r--src/strife/d_main.c14
-rw-r--r--src/strife/f_finale.c8
-rw-r--r--src/strife/g_game.c1
-rw-r--r--src/strife/p_saveg.c4
-rw-r--r--src/strife/p_setup.c7
-rw-r--r--src/strife/p_tick.c7
-rw-r--r--src/strife/st_stuff.c4
7 files changed, 30 insertions, 15 deletions
diff --git a/src/strife/d_main.c b/src/strife/d_main.c
index 35d2c908..cc1a9022 100644
--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -1285,6 +1285,11 @@ void D_IntroTick(void)
//
//=============================================================================
+static void G_CheckDemoStatusAtExit (void)
+{
+ G_CheckDemoStatus();
+}
+
//
// D_DoomMain
//
@@ -1606,9 +1611,12 @@ void D_DoomMain (void)
if (p)
{
+ char *uc_filename = strdup(myargv[p + 1]);
+ M_ForceUppercase(uc_filename);
+
// With Vanilla you have to specify the file without extension,
// but make that optional.
- if (M_StringEndsWith(myargv[p + 1], ".lmp"))
+ if (M_StringEndsWith(uc_filename, ".LMP"))
{
M_StringCopy(file, myargv[p + 1], sizeof(file));
}
@@ -1617,6 +1625,8 @@ void D_DoomMain (void)
DEH_snprintf(file, sizeof(file), "%s.lmp", myargv[p+1]);
}
+ free(uc_filename);
+
if (D_AddFile (file))
{
M_StringCopy(demolumpname, lumpinfo[numlumps - 1].name,
@@ -1634,7 +1644,7 @@ void D_DoomMain (void)
printf("Playing demo %s.\n", file);
}
- I_AtExit((atexit_func_t) G_CheckDemoStatus, true);
+ I_AtExit(G_CheckDemoStatusAtExit, true);
// Generate the WAD hash table. Speed things up a bit.
diff --git a/src/strife/f_finale.c b/src/strife/f_finale.c
index 9c55c102..23ed3dec 100644
--- a/src/strife/f_finale.c
+++ b/src/strife/f_finale.c
@@ -934,11 +934,11 @@ void F_DrawMap34End (void)
{
signed int scrolled;
int x;
- patch_t* p1;
- patch_t* p2;
+// patch_t* p1;
+// patch_t* p2;
- p1 = W_CacheLumpName (DEH_String("credit"), PU_LEVEL);
- p2 = W_CacheLumpName (DEH_String("vellogo"), PU_LEVEL);
+// p1 = W_CacheLumpName (DEH_String("credit"), PU_LEVEL);
+// p2 = W_CacheLumpName (DEH_String("vellogo"), PU_LEVEL);
V_MarkRect (0, 0, SCREENWIDTH, SCREENHEIGHT);
diff --git a/src/strife/g_game.c b/src/strife/g_game.c
index e0c0ae27..906d3c99 100644
--- a/src/strife/g_game.c
+++ b/src/strife/g_game.c
@@ -984,7 +984,6 @@ void G_Ticker (void)
&& turbodetected[i])
{
static char turbomessage[80];
- extern char player_names[8][16];
M_snprintf(turbomessage, sizeof(turbomessage),
"%s is turbo!", player_names[i]);
players[consoleplayer].message = turbomessage;
diff --git a/src/strife/p_saveg.c b/src/strife/p_saveg.c
index 9fec0c02..ffe9dbcb 100644
--- a/src/strife/p_saveg.c
+++ b/src/strife/p_saveg.c
@@ -186,12 +186,12 @@ static void saveg_write_pad(void)
static void *saveg_readp(void)
{
- return (void *) saveg_read32();
+ return (void *) (intptr_t) saveg_read32();
}
static void saveg_writep(void *p)
{
- saveg_write32((int) p);
+ saveg_write32((intptr_t) p);
}
// Enum values are 32-bit integers.
diff --git a/src/strife/p_setup.c b/src/strife/p_setup.c
index 1fd889fa..ad65f20e 100644
--- a/src/strife/p_setup.c
+++ b/src/strife/p_setup.c
@@ -324,7 +324,7 @@ void P_LoadThings (int lump)
mapthing_t *mt;
mapthing_t spawnthing;
int numthings;
- boolean spawn;
+// boolean spawn;
data = W_CacheLumpNum (lump,PU_STATIC);
numthings = W_LumpLength (lump) / sizeof(mapthing_t);
@@ -332,7 +332,7 @@ void P_LoadThings (int lump)
mt = (mapthing_t *)data;
for (i=0 ; i<numthings ; i++, mt++)
{
- spawn = true;
+// spawn = true;
// Do not spawn cool, new monsters if !commercial
// STRIFE-TODO: replace with isregistered stuff
@@ -785,6 +785,9 @@ P_SetupLevel
// UNUSED W_Profile ();
P_InitThinkers ();
+ // if working with a devlopment map, reload it
+ W_Reload();
+
// [STRIFE] Removed ExMy map support
if (map<10)
DEH_snprintf(lumpname, 9, "map0%i", map);
diff --git a/src/strife/p_tick.c b/src/strife/p_tick.c
index f4ed2711..c0dd4786 100644
--- a/src/strife/p_tick.c
+++ b/src/strife/p_tick.c
@@ -99,11 +99,13 @@ void P_AllocateThinker (thinker_t* thinker)
//
void P_RunThinkers (void)
{
- thinker_t* currentthinker;
+ thinker_t *currentthinker, *nextthinker;
currentthinker = thinkercap.next;
while (currentthinker != &thinkercap)
{
+ nextthinker = currentthinker->next;
+
if ( currentthinker->function.acv == (actionf_v)(-1) )
{
// time to remove it
@@ -116,7 +118,8 @@ void P_RunThinkers (void)
if (currentthinker->function.acp1)
currentthinker->function.acp1 (currentthinker);
}
- currentthinker = currentthinker->next;
+
+ currentthinker = nextthinker;
}
}
diff --git a/src/strife/st_stuff.c b/src/strife/st_stuff.c
index 59017690..9b055a77 100644
--- a/src/strife/st_stuff.c
+++ b/src/strife/st_stuff.c
@@ -1495,8 +1495,8 @@ void ST_loadGraphics(void)
void ST_loadData(void)
{
- static int dword_8848C = 1; // STRIFE-TODO: what is the purpose of this?
- dword_8848C = 0;
+// static int dword_8848C = 1; // STRIFE-TODO: what is the purpose of this?
+// dword_8848C = 0;
lu_palette = W_GetNumForName (DEH_String("PLAYPAL"));
ST_loadGraphics();