Merge branch 'master' into scripting
Conflicts: src/g_shared/a_sharedglobal.h src/thingdef/thingdef_codeptr.cpp src/thingdef/thingdef_data.cpp
This commit is contained in:
commit
5f1c4d157c
26 changed files with 327 additions and 120 deletions
|
|
@ -59,7 +59,7 @@ static TArray<AFuncDesc> AFTable;
|
|||
#define DEFINE_DEPRECATED_FLAG(name) { DEPF_##name, #name, -1, 0 }
|
||||
#define DEFINE_DUMMY_FLAG(name) { DEPF_UNUSED, #name, -1, 0 }
|
||||
|
||||
static FFlagDef ActorFlags[]=
|
||||
static FFlagDef ActorFlagDefs[]=
|
||||
{
|
||||
DEFINE_FLAG(MF, PICKUP, APlayerPawn, flags),
|
||||
DEFINE_FLAG(MF, SPECIAL, APlayerPawn, flags),
|
||||
|
|
@ -252,6 +252,10 @@ static FFlagDef ActorFlags[]=
|
|||
DEFINE_FLAG(MF7, HITTARGET, AActor, flags7),
|
||||
DEFINE_FLAG(MF7, HITMASTER, AActor, flags7),
|
||||
DEFINE_FLAG(MF7, HITTRACER, AActor, flags7),
|
||||
|
||||
// [ZK] Decal flags
|
||||
DEFINE_FLAG(MF7, NODECAL, AActor, flags7),
|
||||
DEFINE_FLAG(MF7, FORCEDECAL, AActor, flags7),
|
||||
|
||||
// Effect flags
|
||||
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
||||
|
|
@ -301,7 +305,7 @@ static FFlagDef ActorFlags[]=
|
|||
DEFINE_DUMMY_FLAG(EXPLODEONDEATH), // seems useless
|
||||
};
|
||||
|
||||
static FFlagDef InventoryFlags[] =
|
||||
static FFlagDef InventoryFlagDefs[] =
|
||||
{
|
||||
// Inventory flags
|
||||
DEFINE_FLAG(IF, QUIET, AInventory, ItemFlags),
|
||||
|
|
@ -328,7 +332,7 @@ static FFlagDef InventoryFlags[] =
|
|||
DEFINE_DEPRECATED_FLAG(PICKUPFLASH),
|
||||
DEFINE_DEPRECATED_FLAG(INTERHUBSTRIP),};
|
||||
|
||||
static FFlagDef WeaponFlags[] =
|
||||
static FFlagDef WeaponFlagDefs[] =
|
||||
{
|
||||
// Weapon flags
|
||||
DEFINE_FLAG(WIF, NOAUTOFIRE, AWeapon, WeaponFlags),
|
||||
|
|
@ -355,7 +359,7 @@ static FFlagDef WeaponFlags[] =
|
|||
DEFINE_DUMMY_FLAG(ALLOW_WITH_RESPAWN_INVUL),
|
||||
};
|
||||
|
||||
static FFlagDef PlayerPawnFlags[] =
|
||||
static FFlagDef PlayerPawnFlagDefs[] =
|
||||
{
|
||||
// PlayerPawn flags
|
||||
DEFINE_FLAG(PPF, NOTHRUSTWHENINVUL, APlayerPawn, PlayerFlags),
|
||||
|
|
@ -363,7 +367,7 @@ static FFlagDef PlayerPawnFlags[] =
|
|||
DEFINE_FLAG(PPF, CROUCHABLEMORPH, APlayerPawn, PlayerFlags),
|
||||
};
|
||||
|
||||
static FFlagDef PowerSpeedFlags[] =
|
||||
static FFlagDef PowerSpeedFlagDefs[] =
|
||||
{
|
||||
// PowerSpeed flags
|
||||
DEFINE_FLAG(PSF, NOTRAIL, APowerSpeed, SpeedFlags),
|
||||
|
|
@ -371,11 +375,11 @@ static FFlagDef PowerSpeedFlags[] =
|
|||
|
||||
static const struct FFlagList { const PClass * const *Type; FFlagDef *Defs; int NumDefs; } FlagLists[] =
|
||||
{
|
||||
{ &RUNTIME_CLASS_CASTLESS(AActor), ActorFlags, countof(ActorFlags) },
|
||||
{ &RUNTIME_CLASS_CASTLESS(AInventory), InventoryFlags, countof(InventoryFlags) },
|
||||
{ &RUNTIME_CLASS_CASTLESS(AWeapon), WeaponFlags, countof(WeaponFlags) },
|
||||
{ &RUNTIME_CLASS_CASTLESS(APlayerPawn), PlayerPawnFlags,countof(PlayerPawnFlags) },
|
||||
{ &RUNTIME_CLASS_CASTLESS(APowerSpeed), PowerSpeedFlags,countof(PowerSpeedFlags) },
|
||||
{ &RUNTIME_CLASS_CASTLESS(AActor), ActorFlagDefs, countof(ActorFlagDefs) },
|
||||
{ &RUNTIME_CLASS_CASTLESS(AInventory), InventoryFlagDefs, countof(InventoryFlagDefs) },
|
||||
{ &RUNTIME_CLASS_CASTLESS(AWeapon), WeaponFlagDefs, countof(WeaponFlagDefs) },
|
||||
{ &RUNTIME_CLASS_CASTLESS(APlayerPawn), PlayerPawnFlagDefs, countof(PlayerPawnFlagDefs) },
|
||||
{ &RUNTIME_CLASS_CASTLESS(APowerSpeed), PowerSpeedFlagDefs, countof(PowerSpeedFlagDefs) },
|
||||
};
|
||||
#define NUM_FLAG_LISTS (countof(FlagLists))
|
||||
|
||||
|
|
@ -462,11 +466,11 @@ FFlagDef *FindFlag (const PClass *type, const char *part1, const char *part2)
|
|||
|
||||
const char *GetFlagName(unsigned int flagnum, int flagoffset)
|
||||
{
|
||||
for(size_t i = 0; i < countof(ActorFlags); i++)
|
||||
for(size_t i = 0; i < countof(ActorFlagDefs); i++)
|
||||
{
|
||||
if (ActorFlags[i].flagbit == flagnum && ActorFlags[i].structoffset == flagoffset)
|
||||
if (ActorFlagDefs[i].flagbit == flagnum && ActorFlagDefs[i].structoffset == flagoffset)
|
||||
{
|
||||
return ActorFlags[i].name;
|
||||
return ActorFlagDefs[i].name;
|
||||
}
|
||||
}
|
||||
return "(unknown)"; // return something printable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue