From 4d0b888e577db400a2c8e87157ffa17257074856 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 29 Jul 2008 00:50:56 +0000 Subject: Add magic dehacked comment to enable long cheat sequences (also for Chex Quest support) Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1160 --- src/deh_main.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/deh_main.c') 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 -- cgit v1.2.3