summaryrefslogtreecommitdiff
path: root/src/deh_main.c
diff options
context:
space:
mode:
authorSimon Howard2008-07-29 00:50:56 +0000
committerSimon Howard2008-07-29 00:50:56 +0000
commit4d0b888e577db400a2c8e87157ffa17257074856 (patch)
tree157ea46c3bb5edd6f94e9475156c0dd71a78f041 /src/deh_main.c
parent530888d2e243f27bd36aa71a68570195276c4173 (diff)
downloadchocolate-doom-4d0b888e577db400a2c8e87157ffa17257074856.tar.gz
chocolate-doom-4d0b888e577db400a2c8e87157ffa17257074856.tar.bz2
chocolate-doom-4d0b888e577db400a2c8e87157ffa17257074856.zip
Add magic dehacked comment to enable long cheat sequences (also for Chex
Quest support) Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1160
Diffstat (limited to 'src/deh_main.c')
-rw-r--r--src/deh_main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/deh_main.c b/src/deh_main.c
index e4ae7251..3ace70e5 100644
--- a/src/deh_main.c
+++ b/src/deh_main.c
@@ -63,6 +63,10 @@ extern deh_section_t deh_section_weapon;
boolean deh_allow_long_strings = false;
+// If true, we can do cheat replacements longer than the originals.
+
+boolean deh_allow_long_cheats = false;
+
//
// List of section types:
//
@@ -246,6 +250,15 @@ static void DEH_ParseComment(char *comment)
{
deh_allow_long_strings = true;
}
+
+ // Allow magic comments to allow longer cheat replacements than
+ // those permitted by DOS dehacked. This is also for Chex
+ // Quest.
+
+ if (strstr(comment, "*allow-long-cheats*") != NULL)
+ {
+ deh_allow_long_cheats = true;
+ }
}
// Parses a dehacked file by reading from the context
@@ -265,6 +278,7 @@ static void DEH_ParseContext(deh_context_t *context)
}
deh_allow_long_strings = false;
+ deh_allow_long_cheats = false;
// Read the file