shithub: choc

Download patch

ref: 7241db5446fc08ec7f96a7cdf1022ca9ec219a57
parent: 5c02df23669063ca28bbfc64e0519216ab7fe1ca
author: Simon Howard <[email protected]>
date: Mon Oct 14 21:36:49 EDT 2013

Remove gamemission variables for Heretic and Hexen and hard-code to the
appropriate values.

Subversion-branch: /branches/v2-branch
Subversion-revision: 2708

--- a/src/heretic/d_main.c
+++ b/src/heretic/d_main.c
@@ -61,7 +61,6 @@
 #define STARTUP_WINDOW_X 17
 #define STARTUP_WINDOW_Y 7
 
-GameMission_t gamemission = heretic;
 GameMode_t gamemode = indetermined;
 char *gamedescription = "unknown";
 
@@ -805,6 +804,7 @@
 
 void D_DoomMain(void)
 {
+    GameMission_t gamemission;
     int p;
     char file[256];
 
@@ -1160,7 +1160,7 @@
     // Check valid episode and map
     if (autostart || netgame)
     {
-        if (!D_ValidEpisodeMap(gamemission, gamemode, startepisode, startmap))
+        if (!D_ValidEpisodeMap(heretic, gamemode, startepisode, startmap))
         {
             startepisode = 1;
             startmap = 1;
--- a/src/heretic/d_net.c
+++ b/src/heretic/d_net.c
@@ -164,7 +164,7 @@
     // Game type fields:
 
     connect_data->gamemode = gamemode;
-    connect_data->gamemission = gamemission;
+    connect_data->gamemission = heretic;
 
     connect_data->lowres_turn = false;
 
--- a/src/heretic/doomdef.h
+++ b/src/heretic/doomdef.h
@@ -499,7 +499,6 @@
 extern boolean paused;
 
 extern GameMode_t gamemode;
-extern GameMission_t gamemission;
 
 extern boolean ExtendedWAD;     // true if main WAD is the extended version
 
--- a/src/heretic/sb_bar.c
+++ b/src/heretic/sb_bar.c
@@ -1241,7 +1241,7 @@
 
     episode = args[0] - '0';
     map = args[1] - '0';
-    if (D_ValidEpisodeMap(gamemission, gamemode, episode, map))
+    if (D_ValidEpisodeMap(heretic, gamemode, episode, map))
     {
         G_DeferedInitNew(gameskill, episode, map);
         P_SetMessage(player, DEH_String(TXT_CHEATWARP), false);
--- a/src/hexen/d_net.c
+++ b/src/hexen/d_net.c
@@ -174,7 +174,7 @@
     // Game type fields:
 
     connect_data->gamemode = gamemode;
-    connect_data->gamemission = gamemission;
+    connect_data->gamemission = hexen;
 
     connect_data->lowres_turn = false;
     connect_data->drone = false;
--- a/src/hexen/h2_main.c
+++ b/src/hexen/h2_main.c
@@ -101,7 +101,6 @@
 // PUBLIC DATA DEFINITIONS -------------------------------------------------
 
 GameMode_t gamemode;
-GameMission_t gamemission;
 char *iwadfile;
 boolean nomonsters;             // checkparm of -nomonsters
 boolean respawnparm;            // checkparm of -respawn
@@ -235,6 +234,7 @@
 
 void D_DoomMain(void)
 {
+    GameMission_t gamemission;
     int p;
 
     I_AtExit(D_HexenQuitMessage, false);
--- a/src/hexen/h2def.h
+++ b/src/hexen/h2def.h
@@ -593,7 +593,6 @@
 #define TELEFOGHEIGHT (32*FRACUNIT)
 
 extern GameMode_t gamemode;         // Always commercial
-extern GameMission_t gamemission;   // Always hexen
 
 extern gameaction_t gameaction;