mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +00:00
Merge pull request #321 from edward-san/tflags_fix
- Fixed compiler errors and warnings from TFlags.
This commit is contained in:
commit
a6dcd20447
4 changed files with 14 additions and 13 deletions
|
@ -1180,8 +1180,8 @@ static int PatchThing (int thingy)
|
||||||
else
|
else
|
||||||
info->renderflags &= ~RF_INVISIBLE;
|
info->renderflags &= ~RF_INVISIBLE;
|
||||||
}
|
}
|
||||||
DPrintf ("Bits: %d,%d (0x%08x,0x%08x)\n", info->flags, info->flags2,
|
DPrintf ("Bits: %d,%d (0x%08x,0x%08x)\n", info->flags.GetValue(), info->flags2.GetValue(),
|
||||||
info->flags, info->flags2);
|
info->flags.GetValue(), info->flags2.GetValue());
|
||||||
}
|
}
|
||||||
else if (stricmp (Line1, "ID #") == 0)
|
else if (stricmp (Line1, "ID #") == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -660,7 +660,7 @@ void AActor::Die (AActor *source, AActor *inflictor, int dmgflags)
|
||||||
|
|
||||||
FState *diestate = NULL;
|
FState *diestate = NULL;
|
||||||
int gibhealth = GibHealth();
|
int gibhealth = GibHealth();
|
||||||
int iflags4 = inflictor == NULL ? 0 : inflictor->flags4;
|
ActorFlags4 iflags4 = inflictor == NULL ? ActorFlags4::FromInt(0) : inflictor->flags4;
|
||||||
bool extremelydead = ((health < gibhealth || iflags4 & MF4_EXTREMEDEATH) && !(iflags4 & MF4_NOEXTREMEDEATH));
|
bool extremelydead = ((health < gibhealth || iflags4 & MF4_EXTREMEDEATH) && !(iflags4 & MF4_NOEXTREMEDEATH));
|
||||||
|
|
||||||
// Special check for 'extreme' damage type to ensure that it gets recorded properly as an extreme death for subsequent checks.
|
// Special check for 'extreme' damage type to ensure that it gets recorded properly as an extreme death for subsequent checks.
|
||||||
|
|
|
@ -6465,35 +6465,35 @@ void PrintMiscActorInfo(AActor *query)
|
||||||
"OptFuzzy", "Stencil", "Translucent", "Add", "Shaded", "TranslucentStencil",
|
"OptFuzzy", "Stencil", "Translucent", "Add", "Shaded", "TranslucentStencil",
|
||||||
"Shadow", "Subtract", "AddStencil", "AddShaded"};
|
"Shadow", "Subtract", "AddStencil", "AddShaded"};
|
||||||
|
|
||||||
Printf("%s @ %p has the following flags:\n flags: %x", query->GetTag(), query, query->flags);
|
Printf("%s @ %p has the following flags:\n flags: %x", query->GetTag(), query, query->flags.GetValue());
|
||||||
for (flagi = 0; flagi <= 31; flagi++)
|
for (flagi = 0; flagi <= 31; flagi++)
|
||||||
if (query->flags & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags));
|
if (query->flags & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags));
|
||||||
Printf("\n flags2: %x", query->flags2);
|
Printf("\n flags2: %x", query->flags2.GetValue());
|
||||||
for (flagi = 0; flagi <= 31; flagi++)
|
for (flagi = 0; flagi <= 31; flagi++)
|
||||||
if (query->flags2 & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags2));
|
if (query->flags2 & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags2));
|
||||||
Printf("\n flags3: %x", query->flags3);
|
Printf("\n flags3: %x", query->flags3.GetValue());
|
||||||
for (flagi = 0; flagi <= 31; flagi++)
|
for (flagi = 0; flagi <= 31; flagi++)
|
||||||
if (query->flags3 & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags3));
|
if (query->flags3 & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags3));
|
||||||
Printf("\n flags4: %x", query->flags4);
|
Printf("\n flags4: %x", query->flags4.GetValue());
|
||||||
for (flagi = 0; flagi <= 31; flagi++)
|
for (flagi = 0; flagi <= 31; flagi++)
|
||||||
if (query->flags4 & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags4));
|
if (query->flags4 & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags4));
|
||||||
Printf("\n flags5: %x", query->flags5);
|
Printf("\n flags5: %x", query->flags5.GetValue());
|
||||||
for (flagi = 0; flagi <= 31; flagi++)
|
for (flagi = 0; flagi <= 31; flagi++)
|
||||||
if (query->flags5 & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags5));
|
if (query->flags5 & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags5));
|
||||||
Printf("\n flags6: %x", query->flags6);
|
Printf("\n flags6: %x", query->flags6.GetValue());
|
||||||
for (flagi = 0; flagi <= 31; flagi++)
|
for (flagi = 0; flagi <= 31; flagi++)
|
||||||
if (query->flags6 & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags6));
|
if (query->flags6 & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags6));
|
||||||
Printf("\n flags7: %x", query->flags7);
|
Printf("\n flags7: %x", query->flags7.GetValue());
|
||||||
for (flagi = 0; flagi <= 31; flagi++)
|
for (flagi = 0; flagi <= 31; flagi++)
|
||||||
if (query->flags7 & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags7));
|
if (query->flags7 & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags7));
|
||||||
Printf("\nBounce flags: %x\nBounce factors: f:%f, w:%f",
|
Printf("\nBounce flags: %x\nBounce factors: f:%f, w:%f",
|
||||||
query->BounceFlags, FIXED2FLOAT(query->bouncefactor),
|
query->BounceFlags.GetValue(), FIXED2FLOAT(query->bouncefactor),
|
||||||
FIXED2FLOAT(query->wallbouncefactor));
|
FIXED2FLOAT(query->wallbouncefactor));
|
||||||
/*for (flagi = 0; flagi < 31; flagi++)
|
/*for (flagi = 0; flagi < 31; flagi++)
|
||||||
if (query->BounceFlags & 1<<flagi) Printf(" %s", flagnamesb[flagi]);*/
|
if (query->BounceFlags & 1<<flagi) Printf(" %s", flagnamesb[flagi]);*/
|
||||||
Printf("\nRender style = %i:%s, alpha %f\nRender flags: %x",
|
Printf("\nRender style = %i:%s, alpha %f\nRender flags: %x",
|
||||||
querystyle, (querystyle < STYLE_Count ? renderstyles[querystyle] : "Unknown"),
|
querystyle, (querystyle < STYLE_Count ? renderstyles[querystyle] : "Unknown"),
|
||||||
FIXED2FLOAT(query->alpha), query->renderflags);
|
FIXED2FLOAT(query->alpha), query->renderflags.GetValue());
|
||||||
/*for (flagi = 0; flagi < 31; flagi++)
|
/*for (flagi = 0; flagi < 31; flagi++)
|
||||||
if (query->renderflags & 1<<flagi) Printf(" %s", flagnamesr[flagi]);*/
|
if (query->renderflags & 1<<flagi) Printf(" %s", flagnamesr[flagi]);*/
|
||||||
Printf("\nSpecial+args: %s(%i, %i, %i, %i, %i)\nspecial1: %i, special2: %i.",
|
Printf("\nSpecial+args: %s(%i, %i, %i, %i, %i)\nspecial1: %i, special2: %i.",
|
||||||
|
|
|
@ -108,3 +108,4 @@ inline T operator| (T::EnumType a, T b) { return T::FromInt (T::IntType (a) | T:
|
||||||
inline T operator& (T::EnumType a, T b) { return T::FromInt (T::IntType (a) & T::IntType (b)); } \
|
inline T operator& (T::EnumType a, T b) { return T::FromInt (T::IntType (a) & T::IntType (b)); } \
|
||||||
inline T operator^ (T::EnumType a, T b) { return T::FromInt (T::IntType (a) ^ T::IntType (b)); } \
|
inline T operator^ (T::EnumType a, T b) { return T::FromInt (T::IntType (a) ^ T::IntType (b)); } \
|
||||||
inline T operator~ (T::EnumType a) { return T::FromInt (~T::IntType (a)); }
|
inline T operator~ (T::EnumType a) { return T::FromInt (~T::IntType (a)); }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue