ref: f062903b4a2559ac530d477921b410cadf1488f7
parent: 38f09a6c92e918c91e57998ea59d8d21d4fd4404
author: Simon Howard <fraggle@gmail.com>
date: Fri Nov 28 17:54:33 EST 2008
Add function to get the number of episodes. Subversion-branch: /branches/raven-branch Subversion-revision: 1392
--- a/src/d_mode.c
+++ b/src/d_mode.c
@@ -18,10 +18,13 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// Common code shared between the client and server
+//-----------------------------------------------------------------------------
//
+// DESCRIPTION:
+// Functions and definitions relating to the game type and operational
+// mode.
+//
-
#include "doomtype.h"
#include "d_mode.h"
@@ -98,6 +101,22 @@
// Unknown mode/mission combination
return false;
+}
+
+// Get the number of valid episodes for the specified mission/mode.
+
+int D_GetNumEpisodes(GameMission_t mission, GameMode_t mode)
+{
+ int episode;
+
+ episode = 1;
+
+ while (D_ValidEpisodeMap(mission, mode, episode, 1))
+ {
+ ++episode;
+ }
+
+ return episode - 1;
}
// Table of valid versions
--- a/src/d_mode.h
+++ b/src/d_mode.h
@@ -20,8 +20,8 @@
// 02111-1307, USA.
//
// DESCRIPTION:
-// Internally used data structures for virtually everything,
-// lots of other stuff.
+// Functions and definitions relating to the game type and operational
+// mode.
//
//-----------------------------------------------------------------------------
@@ -87,6 +87,7 @@
boolean D_ValidGameVersion(GameMission_t mission, GameVersion_t version);
boolean D_ValidEpisodeMap(GameMission_t mission, GameMode_t mode,
int episode, int map);
+int D_GetNumEpisodes(GameMission_t mission, GameMode_t mode);
#endif /* #ifndef __D_MODE__ */
--- a/src/setup-res.rc.in
+++ b/src/setup-res.rc.in
@@ -1,6 +1,6 @@
1 ICON "../data/setup.ico"
-CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "setup-manifest.xml"
+CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "setup/setup-manifest.xml"
1 VERSIONINFO
PRODUCTVERSION @WINDOWS_RC_VERSION@