summaryrefslogtreecommitdiff
path: root/src/doom
diff options
context:
space:
mode:
authorSimon Howard2014-03-24 00:18:33 -0400
committerSimon Howard2014-03-24 00:18:33 -0400
commit19466db77813385693cf78b8bc7d97b58dd2b14c (patch)
tree47a31cfb8ac8ae0dadacdfa6906a0abb4f4d5c91 /src/doom
parent42faefce1fd03f5d613bf709d3c14925ee560064 (diff)
downloadchocolate-doom-19466db77813385693cf78b8bc7d97b58dd2b14c.tar.gz
chocolate-doom-19466db77813385693cf78b8bc7d97b58dd2b14c.tar.bz2
chocolate-doom-19466db77813385693cf78b8bc7d97b58dd2b14c.zip
Fix various Clang compiler warnings.
Diffstat (limited to 'src/doom')
-rw-r--r--src/doom/doomstat.h7
-rw-r--r--src/doom/g_game.c6
-rw-r--r--src/doom/statdump.c18
3 files changed, 15 insertions, 16 deletions
diff --git a/src/doom/doomstat.h b/src/doom/doomstat.h
index bb203e0d..7984a7b3 100644
--- a/src/doom/doomstat.h
+++ b/src/doom/doomstat.h
@@ -112,10 +112,9 @@ extern boolean respawnmonsters;
// Netgame? Only true if >1 player.
extern boolean netgame;
-// Flag: true only if started as net deathmatch.
-// An enum might handle altdeath/cooperative better.
-extern boolean deathmatch;
-
+// 0=Cooperative; 1=Deathmatch; 2=Altdeath
+extern int deathmatch;
+
// -------------------------
// Internal parameters for sound rendering.
// These have been taken from the DOS version,
diff --git a/src/doom/g_game.c b/src/doom/g_game.c
index 4a814871..1c838e92 100644
--- a/src/doom/g_game.c
+++ b/src/doom/g_game.c
@@ -123,7 +123,7 @@ int starttime; // for comparative timing purposes
boolean viewactive;
-boolean deathmatch; // only if started as net death
+int deathmatch; // only if started as net death
boolean netgame; // only true if packets are broadcast
boolean playeringame[MAXPLAYERS];
player_t players[MAXPLAYERS];
@@ -642,8 +642,8 @@ void G_DoLoadLevel (void)
joyxmove = joyymove = 0;
mousex = mousey = 0;
sendpause = sendsave = paused = false;
- memset (mousebuttons, 0, sizeof(mousebuttons));
- memset (joybuttons, 0, sizeof(joybuttons));
+ memset(mousearray, 0, sizeof(mousearray));
+ memset(joyarray, 0, sizeof(joyarray));
if (testcontrols)
{
diff --git a/src/doom/statdump.c b/src/doom/statdump.c
index cba91776..a8c9ad30 100644
--- a/src/doom/statdump.c
+++ b/src/doom/statdump.c
@@ -59,7 +59,7 @@ static const char *player_colors[] =
static wbstartstruct_t captured_stats[MAX_CAPTURES];
static int num_captured_stats = 0;
-static GameMode_t discovered_gamemode = indetermined;
+static GameMission_t discovered_gamemission = none;
/* Try to work out whether this is a Doom 1 or Doom 2 game, by looking
* at the episode and map, and the par times. This is used to decide
@@ -72,7 +72,7 @@ static void DiscoverGamemode(wbstartstruct_t *stats, int num_stats)
int level;
int i;
- if (discovered_gamemode != indetermined)
+ if (discovered_gamemission != none)
{
return;
}
@@ -85,7 +85,7 @@ static void DiscoverGamemode(wbstartstruct_t *stats, int num_stats)
if (stats[i].epsd > 0)
{
- discovered_gamemode = doom;
+ discovered_gamemission = doom;
return;
}
@@ -94,7 +94,7 @@ static void DiscoverGamemode(wbstartstruct_t *stats, int num_stats)
if (level >= 9)
{
- discovered_gamemode = doom2;
+ discovered_gamemission = doom2;
return;
}
@@ -106,14 +106,14 @@ static void DiscoverGamemode(wbstartstruct_t *stats, int num_stats)
if (partime == doom1_par_times[level] * TICRATE
&& partime != doom2_par_times[level] * TICRATE)
{
- discovered_gamemode = doom;
+ discovered_gamemission = doom;
return;
}
if (partime != doom1_par_times[level] * TICRATE
&& partime == doom2_par_times[level] * TICRATE)
{
- discovered_gamemode = doom2;
+ discovered_gamemission = doom2;
return;
}
}
@@ -251,7 +251,7 @@ static void PrintLevelName(FILE *stream, int episode, int level)
{
PrintBanner(stream);
- switch (discovered_gamemode)
+ switch (discovered_gamemission)
{
case doom:
@@ -261,7 +261,7 @@ static void PrintLevelName(FILE *stream, int episode, int level)
fprintf(stream, "MAP%02i\n", level + 1);
break;
default:
- case indetermined:
+ case none:
fprintf(stream, "E%iM%i / MAP%02i\n",
episode + 1, level + 1, level + 1);
break;
@@ -332,7 +332,7 @@ void StatDump(void)
{
printf("Statistics captured for %i level(s)\n", num_captured_stats);
- // We actually know what the real gamemode is, but this has
+ // We actually know what the real gamemission is, but this has
// to match the output from statdump.exe.
DiscoverGamemode(captured_stats, num_captured_stats);