Merge branch 'master' of https://github.com/crimsondusk/zdoom
Conflicts: src/actor.h
This commit is contained in:
commit
84351419a3
20 changed files with 256 additions and 94 deletions
|
|
@ -60,7 +60,7 @@ static TArray<FVariableInfo*> variables;
|
|||
#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),
|
||||
|
|
@ -306,7 +306,7 @@ static FFlagDef ActorFlags[]=
|
|||
DEFINE_DUMMY_FLAG(EXPLODEONDEATH), // seems useless
|
||||
};
|
||||
|
||||
static FFlagDef InventoryFlags[] =
|
||||
static FFlagDef InventoryFlagDefs[] =
|
||||
{
|
||||
// Inventory flags
|
||||
DEFINE_FLAG(IF, QUIET, AInventory, ItemFlags),
|
||||
|
|
@ -333,7 +333,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),
|
||||
|
|
@ -360,7 +360,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),
|
||||
|
|
@ -368,7 +368,7 @@ static FFlagDef PlayerPawnFlags[] =
|
|||
DEFINE_FLAG(PPF, CROUCHABLEMORPH, APlayerPawn, PlayerFlags),
|
||||
};
|
||||
|
||||
static FFlagDef PowerSpeedFlags[] =
|
||||
static FFlagDef PowerSpeedFlagDefs[] =
|
||||
{
|
||||
// PowerSpeed flags
|
||||
DEFINE_FLAG(PSF, NOTRAIL, APowerSpeed, SpeedFlags),
|
||||
|
|
@ -376,11 +376,11 @@ static FFlagDef PowerSpeedFlags[] =
|
|||
|
||||
static const struct FFlagList { const PClass *Type; FFlagDef *Defs; int NumDefs; } FlagLists[] =
|
||||
{
|
||||
{ RUNTIME_CLASS(AActor), ActorFlags, countof(ActorFlags) },
|
||||
{ RUNTIME_CLASS(AInventory), InventoryFlags, countof(InventoryFlags) },
|
||||
{ RUNTIME_CLASS(AWeapon), WeaponFlags, countof(WeaponFlags) },
|
||||
{ RUNTIME_CLASS(APlayerPawn), PlayerPawnFlags,countof(PlayerPawnFlags) },
|
||||
{ RUNTIME_CLASS(APowerSpeed), PowerSpeedFlags,countof(PowerSpeedFlags) },
|
||||
{ RUNTIME_CLASS(AActor), ActorFlagDefs, countof(ActorFlagDefs) },
|
||||
{ RUNTIME_CLASS(AInventory), InventoryFlagDefs, countof(InventoryFlagDefs) },
|
||||
{ RUNTIME_CLASS(AWeapon), WeaponFlagDefs, countof(WeaponFlagDefs) },
|
||||
{ RUNTIME_CLASS(APlayerPawn), PlayerPawnFlagDefs, countof(PlayerPawnFlagDefs) },
|
||||
{ RUNTIME_CLASS(APowerSpeed), PowerSpeedFlagDefs, countof(PowerSpeedFlagDefs) },
|
||||
};
|
||||
#define NUM_FLAG_LISTS (countof(FlagLists))
|
||||
|
||||
|
|
@ -467,11 +467,11 @@ FFlagDef *FindFlag (const PClass *type, const char *part1, const char *part2)
|
|||
|
||||
const char *GetFlagName(unsigned int flagnum, int flagoffset)
|
||||
{
|
||||
for(unsigned i = 0; i < countof(ActorFlags); i++)
|
||||
for(unsigned 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