summaryrefslogtreecommitdiff
path: root/src/heretic/deh_htic.c
diff options
context:
space:
mode:
authorSimon Howard2013-09-27 22:54:23 +0000
committerSimon Howard2013-09-27 22:54:23 +0000
commit600ac5db6bf147ab689763a672e3f2ec0a9ac6b3 (patch)
treeb1522a354c1b90ac4a459779308a83a7817a4e61 /src/heretic/deh_htic.c
parent3ab0057eae1f361eb3e930d5ba062d410abc53bd (diff)
downloadchocolate-doom-600ac5db6bf147ab689763a672e3f2ec0a9ac6b3.tar.gz
chocolate-doom-600ac5db6bf147ab689763a672e3f2ec0a9ac6b3.tar.bz2
chocolate-doom-600ac5db6bf147ab689763a672e3f2ec0a9ac6b3.zip
Translate HHE thing numbers according to patch exe version number, as
our mobjinfo table contains an extra entry. Subversion-branch: /branches/v2-branch Subversion-revision: 2688
Diffstat (limited to 'src/heretic/deh_htic.c')
-rw-r--r--src/heretic/deh_htic.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/heretic/deh_htic.c b/src/heretic/deh_htic.c
index 5a0a571e..5bd198ed 100644
--- a/src/heretic/deh_htic.c
+++ b/src/heretic/deh_htic.c
@@ -138,6 +138,24 @@ void DEH_HereticInit(void)
}
}
+int DEH_MapHereticThingType(int type)
+{
+ // Heretic 1.0 had an extra entry in the mobjinfo table that was removed
+ // in later versions. This has been added back into the table for
+ // compatibility. However, it also means that if we're loading a patch
+ // for a later version, we need to translate to the index used internally.
+
+ if (deh_hhe_version > deh_hhe_1_0)
+ {
+ if (type >= MT_PHOENIXFX_REMOVED)
+ {
+ ++type;
+ }
+ }
+
+ return type;
+}
+
int DEH_MapHereticFrameNumber(int frame)
{
if (deh_hhe_version < deh_hhe_1_2)