- Added support for automatically loading ACS objects (even for Doom-format
maps). To use it, compile the ACS files as ordinary libraries placed between A_START/A_END markers. Then outside the markers, create a lump called LOADACS. This is just a plain text lump that lists all the libraries you want to autoload with every map. You can do this with as many libraries as you want, and LOADACS lumps are also cummulative. SVN r123 (trunk)
This commit is contained in:
parent
3e9fbf5616
commit
c770d4a99a
6 changed files with 50 additions and 23 deletions
|
|
@ -62,6 +62,8 @@
|
|||
#include "w_wad.h"
|
||||
#include "r_sky.h"
|
||||
#include "gstrings.h"
|
||||
#include "gi.h"
|
||||
#include "sc_man.h"
|
||||
|
||||
extern FILE *Logfile;
|
||||
|
||||
|
|
@ -456,6 +458,38 @@ void DPlaneWatcher::Tick ()
|
|||
|
||||
//---- ACS lump manager ----//
|
||||
|
||||
// Load user-specified default modules. This must be called after the level's
|
||||
// own behavior is loaded (if it has one).
|
||||
void FBehavior::StaticLoadDefaultModules ()
|
||||
{
|
||||
// When playing Strife, STRFHELP is always loaded.
|
||||
if (gameinfo.gametype == GAME_Strife)
|
||||
{
|
||||
StaticLoadModule (Wads.CheckNumForName ("STRFHELP", ns_acslibrary));
|
||||
}
|
||||
|
||||
// Scan each LOADACS lump and load the specified modules in order
|
||||
int lump, lastlump = 0;
|
||||
|
||||
while ((lump = Wads.FindLump ("LOADACS", &lastlump)) != -1)
|
||||
{
|
||||
SC_OpenLumpNum (lump, "LOADACS");
|
||||
while (SC_GetString())
|
||||
{
|
||||
int acslump = Wads.CheckNumForName (sc_String, ns_acslibrary);
|
||||
if (acslump >= 0)
|
||||
{
|
||||
StaticLoadModule (acslump);
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf ("Could not find autoloaded ACS library %s\n", sc_String);
|
||||
}
|
||||
}
|
||||
SC_Close ();
|
||||
}
|
||||
}
|
||||
|
||||
FBehavior *FBehavior::StaticLoadModule (int lumpnum)
|
||||
{
|
||||
for (unsigned int i = 0; i < StaticModules.Size(); ++i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue