2016-03-01 15:47:10 +00:00
|
|
|
/*
|
|
|
|
** compatibility.cpp
|
|
|
|
** Handles compatibility flags for maps that are unlikely to be updated.
|
|
|
|
**
|
|
|
|
**---------------------------------------------------------------------------
|
|
|
|
** Copyright 2009 Randy Heit
|
|
|
|
** All rights reserved.
|
|
|
|
**
|
|
|
|
** Redistribution and use in source and binary forms, with or without
|
|
|
|
** modification, are permitted provided that the following conditions
|
|
|
|
** are met:
|
|
|
|
**
|
|
|
|
** 1. Redistributions of source code must retain the above copyright
|
|
|
|
** notice, this list of conditions and the following disclaimer.
|
|
|
|
** 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
** notice, this list of conditions and the following disclaimer in the
|
|
|
|
** documentation and/or other materials provided with the distribution.
|
|
|
|
** 3. The name of the author may not be used to endorse or promote products
|
|
|
|
** derived from this software without specific prior written permission.
|
|
|
|
**
|
|
|
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
**---------------------------------------------------------------------------
|
|
|
|
**
|
|
|
|
** This file is for maps that have been rendered broken by bug fixes or other
|
|
|
|
** changes that seemed minor at the time, and it is unlikely that the maps
|
|
|
|
** will be changed. If you are making a map and you know it needs a
|
|
|
|
** compatibility option to play properly, you are advised to specify so with
|
|
|
|
** a MAPINFO.
|
|
|
|
*/
|
|
|
|
|
|
|
|
// HEADER FILES ------------------------------------------------------------
|
|
|
|
|
|
|
|
#include "compatibility.h"
|
|
|
|
#include "sc_man.h"
|
|
|
|
#include "cmdlib.h"
|
|
|
|
#include "doomdef.h"
|
|
|
|
#include "doomdata.h"
|
|
|
|
#include "doomstat.h"
|
|
|
|
#include "c_dispatch.h"
|
|
|
|
#include "gi.h"
|
|
|
|
#include "g_level.h"
|
|
|
|
#include "p_lnspec.h"
|
|
|
|
#include "p_tags.h"
|
|
|
|
#include "r_state.h"
|
|
|
|
#include "w_wad.h"
|
2017-05-06 18:38:36 +00:00
|
|
|
#include "textures.h"
|
2017-01-08 17:45:30 +00:00
|
|
|
#include "g_levellocals.h"
|
2018-04-09 14:53:52 +00:00
|
|
|
#include "vm.h"
|
2018-04-28 13:52:55 +00:00
|
|
|
#include "actor.h"
|
2019-07-03 10:11:48 +00:00
|
|
|
#include "types.h"
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
// MACROS ------------------------------------------------------------------
|
|
|
|
|
|
|
|
// TYPES -------------------------------------------------------------------
|
|
|
|
|
|
|
|
struct FCompatOption
|
|
|
|
{
|
|
|
|
const char *Name;
|
2017-03-08 17:50:37 +00:00
|
|
|
uint32_t CompatFlags;
|
2016-03-01 15:47:10 +00:00
|
|
|
int WhichSlot;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
SLOT_COMPAT,
|
|
|
|
SLOT_COMPAT2,
|
|
|
|
SLOT_BCOMPAT
|
|
|
|
};
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
CP_END,
|
|
|
|
CP_CLEARFLAGS,
|
|
|
|
CP_SETFLAGS,
|
|
|
|
CP_SETSPECIAL,
|
|
|
|
CP_CLEARSPECIAL,
|
|
|
|
CP_SETACTIVATION,
|
2016-12-22 14:10:06 +00:00
|
|
|
CP_SETSECTOROFFSET,
|
2016-12-19 08:40:31 +00:00
|
|
|
CP_SETSECTORSPECIAL,
|
2016-03-01 15:47:10 +00:00
|
|
|
CP_SETWALLYSCALE,
|
2016-12-22 10:50:34 +00:00
|
|
|
CP_SETWALLTEXTURE,
|
2016-03-01 15:47:10 +00:00
|
|
|
CP_SETTHINGZ,
|
|
|
|
CP_SETTAG,
|
|
|
|
CP_SETTHINGFLAGS,
|
2017-03-01 21:06:39 +00:00
|
|
|
CP_SETVERTEX,
|
2016-12-22 10:42:56 +00:00
|
|
|
CP_SETTHINGSKILLS,
|
2017-05-11 16:38:47 +00:00
|
|
|
CP_SETSECTORTEXTURE,
|
|
|
|
CP_SETSECTORLIGHT,
|
2018-02-27 08:52:42 +00:00
|
|
|
CP_SETLINESECTORREF,
|
2016-03-01 15:47:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
|
|
|
|
|
|
|
|
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------
|
|
|
|
|
|
|
|
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
|
|
|
|
|
|
|
|
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
|
|
|
|
extern TArray<FMapThing> MapThingsConverted;
|
2018-04-11 17:10:15 +00:00
|
|
|
extern bool ForceNodeBuild;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
// PUBLIC DATA DEFINITIONS -------------------------------------------------
|
|
|
|
|
|
|
|
TMap<FMD5Holder, FCompatValues, FMD5HashTraits> BCompatMap;
|
|
|
|
|
2019-07-05 12:45:01 +00:00
|
|
|
CVAR (Bool, sv_njnoautolevelcompat, false, CVAR_SERVERINFO | CVAR_LATCH)
|
|
|
|
|
2016-03-01 15:47:10 +00:00
|
|
|
// PRIVATE DATA DEFINITIONS ------------------------------------------------
|
|
|
|
|
|
|
|
static FCompatOption Options[] =
|
|
|
|
{
|
|
|
|
{ "setslopeoverflow", BCOMPATF_SETSLOPEOVERFLOW, SLOT_BCOMPAT },
|
|
|
|
{ "resetplayerspeed", BCOMPATF_RESETPLAYERSPEED, SLOT_BCOMPAT },
|
|
|
|
{ "vileghosts", BCOMPATF_VILEGHOSTS, SLOT_BCOMPAT },
|
|
|
|
{ "ignoreteleporttags", BCOMPATF_BADTELEPORTERS, SLOT_BCOMPAT },
|
|
|
|
{ "rebuildnodes", BCOMPATF_REBUILDNODES, SLOT_BCOMPAT },
|
|
|
|
{ "linkfrozenprops", BCOMPATF_LINKFROZENPROPS, SLOT_BCOMPAT },
|
|
|
|
{ "floatbob", BCOMPATF_FLOATBOB, SLOT_BCOMPAT },
|
2016-08-09 08:07:06 +00:00
|
|
|
{ "noslopeid", BCOMPATF_NOSLOPEID, SLOT_BCOMPAT },
|
2017-02-23 11:32:53 +00:00
|
|
|
{ "clipmidtex", BCOMPATF_CLIPMIDTEX, SLOT_BCOMPAT },
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
// list copied from g_mapinfo.cpp
|
|
|
|
{ "shorttex", COMPATF_SHORTTEX, SLOT_COMPAT },
|
|
|
|
{ "stairs", COMPATF_STAIRINDEX, SLOT_COMPAT },
|
|
|
|
{ "limitpain", COMPATF_LIMITPAIN, SLOT_COMPAT },
|
|
|
|
{ "nopassover", COMPATF_NO_PASSMOBJ, SLOT_COMPAT },
|
|
|
|
{ "notossdrops", COMPATF_NOTOSSDROPS, SLOT_COMPAT },
|
|
|
|
{ "useblocking", COMPATF_USEBLOCKING, SLOT_COMPAT },
|
|
|
|
{ "nodoorlight", COMPATF_NODOORLIGHT, SLOT_COMPAT },
|
|
|
|
{ "ravenscroll", COMPATF_RAVENSCROLL, SLOT_COMPAT },
|
|
|
|
{ "soundtarget", COMPATF_SOUNDTARGET, SLOT_COMPAT },
|
|
|
|
{ "dehhealth", COMPATF_DEHHEALTH, SLOT_COMPAT },
|
|
|
|
{ "trace", COMPATF_TRACE, SLOT_COMPAT },
|
|
|
|
{ "dropoff", COMPATF_DROPOFF, SLOT_COMPAT },
|
|
|
|
{ "boomscroll", COMPATF_BOOMSCROLL, SLOT_COMPAT },
|
|
|
|
{ "invisibility", COMPATF_INVISIBILITY, SLOT_COMPAT },
|
|
|
|
{ "silentinstantfloors", COMPATF_SILENT_INSTANT_FLOORS, SLOT_COMPAT },
|
|
|
|
{ "sectorsounds", COMPATF_SECTORSOUNDS, SLOT_COMPAT },
|
|
|
|
{ "missileclip", COMPATF_MISSILECLIP, SLOT_COMPAT },
|
|
|
|
{ "crossdropoff", COMPATF_CROSSDROPOFF, SLOT_COMPAT },
|
|
|
|
{ "wallrun", COMPATF_WALLRUN, SLOT_COMPAT }, // [GZ] Added for CC MAP29
|
|
|
|
{ "anybossdeath", COMPATF_ANYBOSSDEATH, SLOT_COMPAT },// [GZ] Added for UAC_DEAD
|
|
|
|
{ "mushroom", COMPATF_MUSHROOM, SLOT_COMPAT },
|
|
|
|
{ "mbfmonstermove", COMPATF_MBFMONSTERMOVE, SLOT_COMPAT },
|
|
|
|
{ "corpsegibs", COMPATF_CORPSEGIBS, SLOT_COMPAT },
|
|
|
|
{ "noblockfriends", COMPATF_NOBLOCKFRIENDS, SLOT_COMPAT },
|
|
|
|
{ "spritesort", COMPATF_SPRITESORT, SLOT_COMPAT },
|
|
|
|
{ "hitscan", COMPATF_HITSCAN, SLOT_COMPAT },
|
|
|
|
{ "lightlevel", COMPATF_LIGHT, SLOT_COMPAT },
|
|
|
|
{ "polyobj", COMPATF_POLYOBJ, SLOT_COMPAT },
|
|
|
|
{ "maskedmidtex", COMPATF_MASKEDMIDTEX, SLOT_COMPAT },
|
|
|
|
{ "badangles", COMPATF2_BADANGLES, SLOT_COMPAT2 },
|
|
|
|
{ "floormove", COMPATF2_FLOORMOVE, SLOT_COMPAT2 },
|
|
|
|
{ "soundcutoff", COMPATF2_SOUNDCUTOFF, SLOT_COMPAT2 },
|
|
|
|
{ "pointonline", COMPATF2_POINTONLINE, SLOT_COMPAT2 },
|
|
|
|
{ "multiexit", COMPATF2_MULTIEXIT, SLOT_COMPAT2 },
|
2016-08-07 20:03:36 +00:00
|
|
|
{ "teleport", COMPATF2_TELEPORT, SLOT_COMPAT2 },
|
2016-08-09 18:15:13 +00:00
|
|
|
{ "disablepushwindowcheck", COMPATF2_PUSHWINDOW, SLOT_COMPAT2 },
|
2019-02-11 14:26:11 +00:00
|
|
|
{ "checkswitchrange", COMPATF2_CHECKSWITCHRANGE, SLOT_COMPAT2 },
|
2019-03-24 08:38:26 +00:00
|
|
|
{ "explode1", COMPATF2_EXPLODE1, SLOT_COMPAT2 },
|
|
|
|
{ "explode2", COMPATF2_EXPLODE2, SLOT_COMPAT2 },
|
2019-03-25 23:38:54 +00:00
|
|
|
{ "railing", COMPATF2_RAILING, SLOT_COMPAT2 },
|
2019-09-07 07:34:50 +00:00
|
|
|
{ "scriptwait", COMPATF2_SCRIPTWAIT, SLOT_COMPAT2 },
|
2016-03-01 15:47:10 +00:00
|
|
|
{ NULL, 0, 0 }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const char *const LineSides[] =
|
|
|
|
{
|
|
|
|
"Front", "Back", NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
static const char *const WallTiers[] =
|
|
|
|
{
|
|
|
|
"Top", "Mid", "Bot", NULL
|
|
|
|
};
|
|
|
|
|
2016-12-22 14:10:06 +00:00
|
|
|
static const char *const SectorPlanes[] =
|
|
|
|
{
|
|
|
|
"floor", "ceil", NULL
|
|
|
|
};
|
|
|
|
|
2016-03-01 15:47:10 +00:00
|
|
|
// CODE --------------------------------------------------------------------
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
// ParseCompatibility
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void ParseCompatibility()
|
|
|
|
{
|
|
|
|
TArray<FMD5Holder> md5array;
|
|
|
|
FMD5Holder md5;
|
|
|
|
FCompatValues flags;
|
|
|
|
int i, x;
|
|
|
|
unsigned int j;
|
|
|
|
|
|
|
|
BCompatMap.Clear();
|
|
|
|
|
|
|
|
// The contents of this file are not cumulative, as it should not
|
|
|
|
// be present in user-distributed maps.
|
|
|
|
FScanner sc(Wads.GetNumForFullName("compatibility.txt"));
|
|
|
|
|
|
|
|
while (sc.GetString()) // Get MD5 signature
|
|
|
|
{
|
|
|
|
do
|
|
|
|
{
|
|
|
|
if (strlen(sc.String) != 32)
|
|
|
|
{
|
|
|
|
sc.ScriptError("MD5 signature must be exactly 32 characters long");
|
|
|
|
}
|
|
|
|
for (i = 0; i < 32; ++i)
|
|
|
|
{
|
|
|
|
if (sc.String[i] >= '0' && sc.String[i] <= '9')
|
|
|
|
{
|
|
|
|
x = sc.String[i] - '0';
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
sc.String[i] |= 'a' ^ 'A';
|
|
|
|
if (sc.String[i] >= 'a' && sc.String[i] <= 'f')
|
|
|
|
{
|
|
|
|
x = sc.String[i] - 'a' + 10;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
x = 0;
|
|
|
|
sc.ScriptError("MD5 signature must be a hexadecimal value");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!(i & 1))
|
|
|
|
{
|
|
|
|
md5.Bytes[i / 2] = x << 4;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
md5.Bytes[i / 2] |= x;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
md5array.Push(md5);
|
|
|
|
sc.MustGetString();
|
|
|
|
} while (!sc.Compare("{"));
|
|
|
|
memset(flags.CompatFlags, 0, sizeof(flags.CompatFlags));
|
|
|
|
flags.ExtCommandIndex = ~0u;
|
|
|
|
while (sc.GetString())
|
|
|
|
{
|
|
|
|
if ((i = sc.MatchString(&Options[0].Name, sizeof(*Options))) >= 0)
|
|
|
|
{
|
|
|
|
flags.CompatFlags[Options[i].WhichSlot] |= Options[i].CompatFlags;
|
|
|
|
}
|
2017-03-01 21:06:39 +00:00
|
|
|
else
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
sc.UnGet();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sc.MustGetStringName("}");
|
|
|
|
for (j = 0; j < md5array.Size(); ++j)
|
|
|
|
{
|
|
|
|
BCompatMap[md5array[j]] = flags;
|
|
|
|
}
|
|
|
|
md5array.Clear();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
// CheckCompatibility
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
2018-04-09 20:09:28 +00:00
|
|
|
FName CheckCompatibility(MapData *map)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
FMD5Holder md5;
|
|
|
|
FCompatValues *flags;
|
2017-06-14 12:24:11 +00:00
|
|
|
|
|
|
|
ii_compatflags = 0;
|
|
|
|
ii_compatflags2 = 0;
|
|
|
|
ib_compatflags = 0;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
// When playing Doom IWAD levels force COMPAT_SHORTTEX and COMPATF_LIGHT.
|
|
|
|
// I'm not sure if the IWAD maps actually need COMPATF_LIGHT but it certainly does not hurt.
|
|
|
|
// TNT's MAP31 also needs COMPATF_STAIRINDEX but that only gets activated for TNT.WAD.
|
2017-10-21 07:47:13 +00:00
|
|
|
if (Wads.GetLumpFile(map->lumpnum) == Wads.GetIwadNum() && (gameinfo.flags & GI_COMPATSHORTTEX) && level.maptype == MAPTYPE_DOOM)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
ii_compatflags = COMPATF_SHORTTEX|COMPATF_LIGHT;
|
|
|
|
if (gameinfo.flags & GI_COMPATSTAIRS) ii_compatflags |= COMPATF_STAIRINDEX;
|
|
|
|
}
|
|
|
|
|
|
|
|
map->GetChecksum(md5.Bytes);
|
|
|
|
|
|
|
|
flags = BCompatMap.CheckKey(md5);
|
|
|
|
|
2018-04-09 20:09:28 +00:00
|
|
|
FString hash;
|
|
|
|
|
|
|
|
for (size_t j = 0; j < sizeof(md5.Bytes); ++j)
|
|
|
|
{
|
|
|
|
hash.AppendFormat("%02X", md5.Bytes[j]);
|
|
|
|
}
|
|
|
|
|
2016-08-28 07:55:04 +00:00
|
|
|
if (developer >= DMSG_NOTIFY)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
2018-04-09 20:09:28 +00:00
|
|
|
Printf("MD5 = %s", hash.GetChars());
|
2016-03-01 15:47:10 +00:00
|
|
|
if (flags != NULL)
|
|
|
|
{
|
|
|
|
Printf(", cflags = %08x, cflags2 = %08x, bflags = %08x\n",
|
|
|
|
flags->CompatFlags[SLOT_COMPAT], flags->CompatFlags[SLOT_COMPAT2], flags->CompatFlags[SLOT_BCOMPAT]);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Printf("\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (flags != NULL)
|
|
|
|
{
|
2017-06-14 12:24:11 +00:00
|
|
|
ii_compatflags |= flags->CompatFlags[SLOT_COMPAT];
|
|
|
|
ii_compatflags2 |= flags->CompatFlags[SLOT_COMPAT2];
|
|
|
|
ib_compatflags |= flags->CompatFlags[SLOT_BCOMPAT];
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
2017-06-14 12:24:11 +00:00
|
|
|
|
2016-03-01 15:47:10 +00:00
|
|
|
// Reset i_compatflags
|
|
|
|
compatflags.Callback();
|
|
|
|
compatflags2.Callback();
|
|
|
|
// Set floatbob compatibility for all maps with an original Hexen MAPINFO.
|
|
|
|
if (level.flags2 & LEVEL2_HEXENHACK)
|
|
|
|
{
|
|
|
|
ib_compatflags |= BCOMPATF_FLOATBOB;
|
|
|
|
}
|
2018-04-09 20:09:28 +00:00
|
|
|
return FName(hash, true); // if this returns NAME_None it means there is no scripted compatibility handler.
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
2019-11-13 12:42:42 +00:00
|
|
|
// PostProcessLevel
|
2016-03-01 15:47:10 +00:00
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
2019-11-13 12:42:42 +00:00
|
|
|
class DLevelPostProcessor : public DObject
|
2019-04-02 10:44:48 +00:00
|
|
|
{
|
2019-11-13 12:42:42 +00:00
|
|
|
DECLARE_ABSTRACT_CLASS(DLevelPostProcessor, DObject)
|
2019-04-02 10:44:48 +00:00
|
|
|
};
|
|
|
|
|
2019-11-13 12:42:42 +00:00
|
|
|
IMPLEMENT_CLASS(DLevelPostProcessor, true, false);
|
2019-04-02 10:44:48 +00:00
|
|
|
|
2019-11-13 12:42:42 +00:00
|
|
|
void PostProcessLevel(FName checksum)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
2019-11-13 12:42:42 +00:00
|
|
|
auto lc = Create<DLevelPostProcessor>();
|
2019-07-05 12:45:01 +00:00
|
|
|
|
|
|
|
if (sv_njnoautolevelcompat)
|
|
|
|
{
|
|
|
|
Printf("Warning: auto level compatibility disabled. Severe problems could arise.\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2019-01-24 23:55:28 +00:00
|
|
|
for (auto cls : PClass::AllClasses)
|
2018-04-09 14:53:52 +00:00
|
|
|
{
|
2019-11-13 12:42:42 +00:00
|
|
|
if (cls->IsDescendantOf(RUNTIME_CLASS(DLevelPostProcessor)))
|
2018-04-09 14:53:52 +00:00
|
|
|
{
|
2019-01-24 23:55:28 +00:00
|
|
|
PFunction *const func = dyn_cast<PFunction>(cls->FindSymbol("Apply", false));
|
2019-07-03 10:11:48 +00:00
|
|
|
if (func == nullptr)
|
2018-04-09 20:09:28 +00:00
|
|
|
{
|
2019-07-03 10:11:48 +00:00
|
|
|
Printf("Missing 'Apply' method in class '%s', level compatibility object ignored\n", cls->TypeName.GetChars());
|
|
|
|
continue;
|
2018-04-09 20:09:28 +00:00
|
|
|
}
|
2019-07-03 10:11:48 +00:00
|
|
|
|
|
|
|
auto argTypes = func->Variants[0].Proto->ArgumentTypes;
|
|
|
|
if (argTypes.Size() != 3 || argTypes[1] != TypeName || argTypes[2] != TypeString)
|
|
|
|
{
|
|
|
|
Printf("Wrong signature of 'Apply' method in class '%s', level compatibility object ignored\n", cls->TypeName.GetChars());
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
VMValue param[] = { lc, checksum.GetIndex(), &level.MapName };
|
|
|
|
VMCall(func->Variants[0].Implementation, param, 3, nullptr, 0);
|
2018-04-09 14:53:52 +00:00
|
|
|
}
|
|
|
|
}
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
|
2019-11-13 12:42:42 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, OffsetSectorPlane)
|
2018-04-10 21:19:22 +00:00
|
|
|
{
|
2019-11-13 12:42:42 +00:00
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
2018-04-10 21:19:22 +00:00
|
|
|
PARAM_INT(sector);
|
|
|
|
PARAM_INT(planeval);
|
|
|
|
PARAM_FLOAT(delta);
|
|
|
|
|
2019-01-02 14:35:23 +00:00
|
|
|
if ((unsigned)sector < level.sectors.Size())
|
|
|
|
{
|
|
|
|
sector_t *sec = &level.sectors[sector];
|
|
|
|
secplane_t& plane = sector_t::floor == planeval? sec->floorplane : sec->ceilingplane;
|
|
|
|
plane.ChangeHeight(delta);
|
|
|
|
sec->ChangePlaneTexZ(planeval, delta);
|
|
|
|
}
|
2018-04-10 21:19:22 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-11-13 12:42:42 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, ClearSectorTags)
|
2018-04-10 21:19:22 +00:00
|
|
|
{
|
2019-11-13 12:42:42 +00:00
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
2018-04-10 21:19:22 +00:00
|
|
|
PARAM_INT(sector);
|
|
|
|
tagManager.RemoveSectorTags(sector);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-11-13 12:42:42 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, AddSectorTag)
|
2018-04-10 21:19:22 +00:00
|
|
|
{
|
2019-11-13 12:42:42 +00:00
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
2018-04-10 21:19:22 +00:00
|
|
|
PARAM_INT(sector);
|
|
|
|
PARAM_INT(tag);
|
2019-01-02 14:35:23 +00:00
|
|
|
|
|
|
|
if ((unsigned)sector < level.sectors.Size())
|
|
|
|
{
|
|
|
|
tagManager.AddSectorTag(sector, tag);
|
|
|
|
}
|
2018-04-10 21:19:22 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-11-13 12:42:42 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, ClearLineIDs)
|
2019-01-17 00:41:42 +00:00
|
|
|
{
|
2019-11-13 12:42:42 +00:00
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
2019-01-17 00:41:42 +00:00
|
|
|
PARAM_INT(line);
|
|
|
|
tagManager.RemoveLineIDs(line);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-11-13 12:42:42 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, AddLineID)
|
2019-01-17 00:41:42 +00:00
|
|
|
{
|
2019-11-13 12:42:42 +00:00
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
2019-01-17 00:41:42 +00:00
|
|
|
PARAM_INT(line);
|
|
|
|
PARAM_INT(tag);
|
2019-11-13 12:42:42 +00:00
|
|
|
|
2019-01-17 00:41:42 +00:00
|
|
|
if ((unsigned)line < level.lines.Size())
|
|
|
|
{
|
|
|
|
tagManager.AddLineID(line, tag);
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-10-27 12:22:49 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingCount)
|
|
|
|
{
|
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
|
|
|
ACTION_RETURN_INT(MapThingsConverted.Size());
|
|
|
|
}
|
|
|
|
|
2019-10-27 14:29:00 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, AddThing)
|
|
|
|
{
|
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
|
|
|
PARAM_UINT(ednum);
|
|
|
|
PARAM_FLOAT(x);
|
|
|
|
PARAM_FLOAT(y);
|
|
|
|
PARAM_FLOAT(z);
|
|
|
|
PARAM_INT(angle);
|
|
|
|
PARAM_UINT(skills);
|
|
|
|
PARAM_UINT(flags);
|
|
|
|
|
|
|
|
auto &things = MapThingsConverted;
|
|
|
|
const unsigned newindex = things.Size();
|
|
|
|
things.Resize(newindex + 1);
|
|
|
|
|
|
|
|
auto &newthing = things.Last();
|
|
|
|
memset(&newthing, 0, sizeof newthing);
|
|
|
|
|
|
|
|
newthing.Gravity = 1;
|
|
|
|
newthing.SkillFilter = skills;
|
|
|
|
newthing.ClassFilter = 0xFFFF;
|
|
|
|
newthing.RenderStyle = STYLE_Count;
|
|
|
|
newthing.Alpha = -1;
|
|
|
|
newthing.Health = 1;
|
|
|
|
newthing.FloatbobPhase = -1;
|
|
|
|
newthing.pos.X = x;
|
|
|
|
newthing.pos.Y = y;
|
|
|
|
newthing.pos.Z = z;
|
|
|
|
newthing.angle = angle;
|
|
|
|
newthing.EdNum = ednum;
|
|
|
|
newthing.info = DoomEdMap.CheckKey(ednum);
|
|
|
|
newthing.flags = flags;
|
|
|
|
|
|
|
|
ACTION_RETURN_INT(newindex);
|
|
|
|
}
|
|
|
|
|
2019-10-27 12:50:38 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingEdNum)
|
|
|
|
{
|
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
|
|
|
PARAM_UINT(thing);
|
|
|
|
|
2019-10-27 14:31:56 +00:00
|
|
|
const int ednum = thing < MapThingsConverted.Size()
|
2019-10-27 12:50:38 +00:00
|
|
|
? MapThingsConverted[thing].EdNum : 0;
|
2019-10-27 14:31:56 +00:00
|
|
|
ACTION_RETURN_INT(ednum);
|
2019-10-27 12:50:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetThingEdNum)
|
|
|
|
{
|
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
|
|
|
PARAM_UINT(thing);
|
|
|
|
PARAM_UINT(ednum);
|
|
|
|
|
|
|
|
if (thing < MapThingsConverted.Size())
|
|
|
|
{
|
|
|
|
auto &mti = MapThingsConverted[thing];
|
|
|
|
mti.EdNum = ednum;
|
|
|
|
mti.info = DoomEdMap.CheckKey(ednum);
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-10-27 14:31:56 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingPos)
|
2019-10-27 12:50:38 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
|
|
|
PARAM_UINT(thing);
|
|
|
|
|
2019-10-27 14:31:56 +00:00
|
|
|
const DVector3 pos = thing < MapThingsConverted.Size()
|
|
|
|
? MapThingsConverted[thing].pos
|
|
|
|
: DVector3(0, 0, 0);
|
|
|
|
ACTION_RETURN_VEC3(pos);
|
2019-10-27 12:50:38 +00:00
|
|
|
}
|
|
|
|
|
2019-10-27 14:31:56 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetThingXY)
|
2019-10-27 12:50:38 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
|
|
|
PARAM_UINT(thing);
|
2019-10-27 14:31:56 +00:00
|
|
|
PARAM_FLOAT(x);
|
|
|
|
PARAM_FLOAT(y);
|
2019-10-27 12:50:38 +00:00
|
|
|
|
|
|
|
if (thing < MapThingsConverted.Size())
|
|
|
|
{
|
2019-10-27 14:31:56 +00:00
|
|
|
auto& pos = MapThingsConverted[thing].pos;
|
|
|
|
pos.X = x;
|
|
|
|
pos.Y = y;
|
2019-10-27 12:50:38 +00:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-10-27 14:31:56 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetThingZ)
|
2018-04-10 21:19:22 +00:00
|
|
|
{
|
2019-11-13 12:42:42 +00:00
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
2019-10-27 12:22:49 +00:00
|
|
|
PARAM_UINT(thing);
|
2019-10-27 14:31:56 +00:00
|
|
|
PARAM_FLOAT(z);
|
2018-04-10 21:19:22 +00:00
|
|
|
|
2019-10-27 12:22:49 +00:00
|
|
|
if (thing < MapThingsConverted.Size())
|
2018-04-10 21:19:22 +00:00
|
|
|
{
|
2019-10-27 14:31:56 +00:00
|
|
|
MapThingsConverted[thing].pos.Z = z;
|
2018-04-10 21:19:22 +00:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-10-27 14:31:56 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingAngle)
|
2019-10-27 12:22:49 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
|
|
|
PARAM_UINT(thing);
|
|
|
|
|
2019-10-27 14:31:56 +00:00
|
|
|
const int angle = thing < MapThingsConverted.Size()
|
|
|
|
? MapThingsConverted[thing].angle : 0;
|
|
|
|
ACTION_RETURN_INT(angle);
|
2019-10-27 12:22:49 +00:00
|
|
|
}
|
|
|
|
|
2019-10-27 14:31:56 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetThingAngle)
|
2018-04-16 11:30:21 +00:00
|
|
|
{
|
2019-11-13 12:42:42 +00:00
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
2019-10-27 12:22:49 +00:00
|
|
|
PARAM_UINT(thing);
|
2019-10-27 14:31:56 +00:00
|
|
|
PARAM_INT(angle);
|
2018-04-16 11:30:21 +00:00
|
|
|
|
2019-10-27 12:22:49 +00:00
|
|
|
if (thing < MapThingsConverted.Size())
|
2018-04-16 11:30:21 +00:00
|
|
|
{
|
2019-10-27 14:31:56 +00:00
|
|
|
MapThingsConverted[thing].angle = angle;
|
2018-04-16 11:30:21 +00:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-10-27 14:31:56 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingSkills)
|
2018-04-10 21:19:22 +00:00
|
|
|
{
|
2019-11-13 12:42:42 +00:00
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
2019-10-27 12:22:49 +00:00
|
|
|
PARAM_UINT(thing);
|
2019-10-27 14:31:56 +00:00
|
|
|
|
|
|
|
const int skills = thing < MapThingsConverted.Size()
|
|
|
|
? MapThingsConverted[thing].SkillFilter : 0;
|
|
|
|
ACTION_RETURN_INT(skills);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetThingSkills)
|
|
|
|
{
|
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
|
|
|
PARAM_UINT(thing);
|
|
|
|
PARAM_UINT(skillmask);
|
2018-04-10 21:19:22 +00:00
|
|
|
|
2019-10-27 12:22:49 +00:00
|
|
|
if (thing < MapThingsConverted.Size())
|
2018-04-10 21:19:22 +00:00
|
|
|
{
|
2019-10-27 14:31:56 +00:00
|
|
|
MapThingsConverted[thing].SkillFilter = skillmask;
|
2018-04-10 21:19:22 +00:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-10-27 12:22:49 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingFlags)
|
|
|
|
{
|
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
|
|
|
PARAM_UINT(thing);
|
|
|
|
|
2019-10-27 14:31:56 +00:00
|
|
|
const unsigned flags = thing < MapThingsConverted.Size()
|
2019-10-27 12:22:49 +00:00
|
|
|
? MapThingsConverted[thing].flags : 0;
|
2019-10-27 14:31:56 +00:00
|
|
|
ACTION_RETURN_INT(flags);
|
2019-10-27 12:22:49 +00:00
|
|
|
}
|
|
|
|
|
2019-11-13 12:42:42 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetThingFlags)
|
2018-04-10 21:19:22 +00:00
|
|
|
{
|
2019-11-13 12:42:42 +00:00
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
2019-10-27 12:22:49 +00:00
|
|
|
PARAM_UINT(thing);
|
|
|
|
PARAM_UINT(flags);
|
2018-04-10 21:19:22 +00:00
|
|
|
|
2019-10-27 12:22:49 +00:00
|
|
|
if (thing < MapThingsConverted.Size())
|
2018-04-10 21:19:22 +00:00
|
|
|
{
|
|
|
|
MapThingsConverted[thing].flags = flags;
|
|
|
|
}
|
2019-10-27 13:30:48 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingSpecial)
|
|
|
|
{
|
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
|
|
|
PARAM_UINT(thing);
|
|
|
|
|
2019-10-27 14:31:56 +00:00
|
|
|
const int special = thing < MapThingsConverted.Size()
|
2019-10-27 13:30:48 +00:00
|
|
|
? MapThingsConverted[thing].special : 0;
|
2019-10-27 14:31:56 +00:00
|
|
|
ACTION_RETURN_INT(special);
|
2019-10-27 13:30:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetThingSpecial)
|
|
|
|
{
|
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
|
|
|
PARAM_UINT(thing);
|
|
|
|
PARAM_INT(special);
|
|
|
|
|
|
|
|
if (thing < MapThingsConverted.Size())
|
|
|
|
{
|
|
|
|
MapThingsConverted[thing].special = special;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingArgument)
|
|
|
|
{
|
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
|
|
|
PARAM_UINT(thing);
|
|
|
|
PARAM_UINT(index);
|
|
|
|
|
2019-10-27 14:31:56 +00:00
|
|
|
const int argument = index < 5 && thing < MapThingsConverted.Size()
|
2019-10-27 13:30:48 +00:00
|
|
|
? MapThingsConverted[thing].args[index] : 0;
|
2019-10-27 14:31:56 +00:00
|
|
|
ACTION_RETURN_INT(argument);
|
2019-10-27 13:30:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetThingArgument)
|
|
|
|
{
|
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
|
|
|
PARAM_UINT(thing);
|
|
|
|
PARAM_UINT(index);
|
|
|
|
PARAM_INT(value);
|
|
|
|
|
|
|
|
if (index < 5 && thing < MapThingsConverted.Size())
|
|
|
|
{
|
|
|
|
MapThingsConverted[thing].args[index] = value;
|
|
|
|
}
|
2019-10-27 14:36:59 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingID)
|
|
|
|
{
|
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
|
|
|
PARAM_UINT(thing);
|
|
|
|
|
|
|
|
const int id = thing < MapThingsConverted.Size()
|
|
|
|
? MapThingsConverted[thing].thingid : 0;
|
|
|
|
ACTION_RETURN_INT(id);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetThingID)
|
|
|
|
{
|
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
|
|
|
PARAM_UINT(thing);
|
|
|
|
PARAM_INT(id);
|
|
|
|
|
|
|
|
if (thing < MapThingsConverted.Size())
|
|
|
|
{
|
|
|
|
MapThingsConverted[thing].thingid = id;
|
|
|
|
}
|
2018-04-10 21:19:22 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-11-13 12:42:42 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetVertex)
|
2018-04-11 09:35:45 +00:00
|
|
|
{
|
2019-11-13 12:42:42 +00:00
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
2018-04-11 09:35:45 +00:00
|
|
|
PARAM_UINT(vertex);
|
|
|
|
PARAM_FLOAT(x);
|
|
|
|
PARAM_FLOAT(y);
|
|
|
|
|
|
|
|
if (vertex < level.vertexes.Size())
|
|
|
|
{
|
|
|
|
level.vertexes[vertex].p = DVector2(x, y);
|
|
|
|
}
|
2018-04-11 17:10:15 +00:00
|
|
|
ForceNodeBuild = true;
|
2018-04-11 09:35:45 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2018-04-10 21:19:22 +00:00
|
|
|
|
2019-11-13 12:42:42 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetLineSectorRef)
|
2018-04-11 14:01:57 +00:00
|
|
|
{
|
2019-11-13 12:42:42 +00:00
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
2018-04-11 14:01:57 +00:00
|
|
|
PARAM_UINT(lineidx);
|
|
|
|
PARAM_UINT(sideidx);
|
|
|
|
PARAM_UINT(sectoridx);
|
|
|
|
|
|
|
|
if ( sideidx < 2
|
|
|
|
&& lineidx < level.lines.Size()
|
|
|
|
&& sectoridx < level.sectors.Size())
|
|
|
|
{
|
2018-04-11 21:08:59 +00:00
|
|
|
line_t *line = &level.lines[lineidx];
|
|
|
|
side_t *side = line->sidedef[sideidx];
|
|
|
|
side->sector = &level.sectors[sectoridx];
|
|
|
|
if (sideidx == 0) line->frontsector = side->sector;
|
|
|
|
else line->backsector = side->sector;
|
2018-04-11 14:01:57 +00:00
|
|
|
}
|
2018-04-11 17:10:15 +00:00
|
|
|
ForceNodeBuild = true;
|
2018-04-11 14:01:57 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-11-13 12:42:42 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetDefaultActor)
|
2018-04-28 13:52:55 +00:00
|
|
|
{
|
2019-11-13 12:42:42 +00:00
|
|
|
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
2018-04-28 13:52:55 +00:00
|
|
|
PARAM_NAME(actorclass);
|
|
|
|
ACTION_RETURN_OBJECT(GetDefaultByName(actorclass));
|
|
|
|
}
|
|
|
|
|
2018-04-10 21:19:22 +00:00
|
|
|
|
2016-03-01 15:47:10 +00:00
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
// CCMD mapchecksum
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
CCMD (mapchecksum)
|
|
|
|
{
|
|
|
|
MapData *map;
|
2017-03-08 17:47:52 +00:00
|
|
|
uint8_t cksum[16];
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
if (argv.argc() < 2)
|
|
|
|
{
|
|
|
|
Printf("Usage: mapchecksum <map> ...\n");
|
|
|
|
}
|
|
|
|
for (int i = 1; i < argv.argc(); ++i)
|
|
|
|
{
|
|
|
|
map = P_OpenMapData(argv[i], true);
|
|
|
|
if (map == NULL)
|
|
|
|
{
|
|
|
|
Printf("Cannot load %s as a map\n", argv[i]);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
map->GetChecksum(cksum);
|
|
|
|
const char *wadname = Wads.GetWadName(Wads.GetLumpFile(map->lumpnum));
|
|
|
|
delete map;
|
|
|
|
for (size_t j = 0; j < sizeof(cksum); ++j)
|
|
|
|
{
|
|
|
|
Printf("%02X", cksum[j]);
|
|
|
|
}
|
|
|
|
Printf(" // %s %s\n", wadname, argv[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
// CCMD hiddencompatflags
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
CCMD (hiddencompatflags)
|
|
|
|
{
|
|
|
|
Printf("%08x %08x %08x\n", ii_compatflags, ii_compatflags2, ib_compatflags);
|
|
|
|
}
|
2018-04-11 21:08:59 +00:00
|
|
|
|