ref: 9808c01f6aa0a2719c9bf39f18e354ae1d435a38
parent: 41eebca5614912abe656e443668b11214c6d51c1
parent: 453844c768f1fd6571bf0b4908b45199b3729fb8
author: Simon Howard <fraggle+github@gmail.com>
date: Tue Jul 28 18:34:20 EDT 2015
Merge pull request #593 from khokh2001/chex Chex Quest
--- a/src/doom/g_game.c
+++ b/src/doom/g_game.c
@@ -614,7 +614,8 @@
// The "Sky never changes in Doom II" bug was fixed in
// the id Anthology version of doom2.exe for Final Doom.
- if ((gamemode == commercial) && (gameversion == exe_final2))
+ if ((gamemode == commercial)
+ && (gameversion == exe_final2 || gameversion == exe_chex))
{
char *skytexturename;
--- a/src/doom/hu_stuff.c
+++ b/src/doom/hu_stuff.c
@@ -48,7 +48,7 @@
#define HU_TITLE2 (mapnames_commercial[gamemap-1])
#define HU_TITLEP (mapnames_commercial[gamemap-1 + 32])
#define HU_TITLET (mapnames_commercial[gamemap-1 + 64])
-#define HU_TITLE_CHEX (mapnames[gamemap - 1])
+#define HU_TITLE_CHEX (mapnames_chex[(gameepisode-1)*9+gamemap-1])
#define HU_TITLEHEIGHT 1
#define HU_TITLEX 0
#define HU_TITLEY (167 - SHORT(hu_font[0]->height))
@@ -163,6 +163,60 @@
"NEWLEVEL"
};
+char* mapnames_chex[] = // Chex Quest names.
+{
+
+ HUSTR_E1M1,
+ HUSTR_E1M2,
+ HUSTR_E1M3,
+ HUSTR_E1M4,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+ HUSTR_E1M5,
+
+ "NEWLEVEL",
+ "NEWLEVEL",
+ "NEWLEVEL",
+ "NEWLEVEL",
+ "NEWLEVEL",
+ "NEWLEVEL",
+ "NEWLEVEL",
+ "NEWLEVEL",
+ "NEWLEVEL"
+};
+
// List of names for levels in commercial IWADs
// (doom2.wad, plutonia.wad, tnt.wad). These are stored in a
// single large array; WADs like pl2.wad have a MAP33, and rely on
@@ -351,10 +405,7 @@
break;
}
- // Chex.exe always uses the episode 1 level title
- // eg. E2M1 gives the title for E1M1
-
- if (gameversion == exe_chex)
+ if (logical_gamemission == doom && gameversion == exe_chex)
{
s = HU_TITLE_CHEX;
}
--- a/src/doom/st_stuff.c
+++ b/src/doom/st_stuff.c
@@ -618,13 +618,21 @@
{
epsd = buf[0] - '0';
map = buf[1] - '0';
- }
- // Chex.exe always warps to episode 1.
+ // Chex.exe always warps to episode 1.
- if (gameversion == exe_chex)
- {
- epsd = 1;
+ if (gameversion == exe_chex)
+ {
+ if (epsd > 1)
+ {
+ epsd = 1;
+ }
+ if (map > 5)
+ {
+ map = 5;
+ }
+ }
+
}
// Catch invalid maps.