From 39cdb7cf30d5b6ddbee19c6c968a1da434b85ea0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 10 Jan 2016 10:21:17 +0100 Subject: [PATCH] - implement 'loadacs' option for MAPINFO. --- src/edf.cpp | 13 ++++++++++++- src/p_setup.cpp | 4 ++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/edf.cpp b/src/edf.cpp index 3676e445c..50ac2835c 100644 --- a/src/edf.cpp +++ b/src/edf.cpp @@ -47,6 +47,7 @@ #include "p_tags.h" #include "p_terrain.h" #include "v_palette.h" +#include "p_acs.h" #include "r_data/colormaps.h" @@ -770,4 +771,14 @@ void ProcessEDFSectors() } } delete[] edfsectorrecord; -} \ No newline at end of file +} + +void LoadMapinfoACSLump() +{ + FEdfOptions *opt = level.info->GetOptData("EDF", false); + if (opt != NULL) + { + int lump = Wads.CheckNumForName(opt->acsName); + if (lump >= 0) FBehavior::StaticLoadModule(lump); + } +} diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 6bbb85035..46f984bf1 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -3702,6 +3702,10 @@ void P_SetupLevel (const char *lumpname, int position) } FBehavior::StaticLoadDefaultModules (); +#ifndef NO_EDF + LoadMapinfoACSLump(); +#endif + P_LoadStrifeConversations (map, lumpname);