mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- Updated <pitch>/flat/roll/wall sprites submission to 2.9+. (ZDoom compatibility submission. )
- FLATSPRITE: An actor becomes flat as if they were a decal on the floor. - PITCHFLATSPRITE: A flat sprite tilts up and down based on pitch. - WALLSPRITE: Similar to a Y billboarded sprite. The degree of the flattening is determined by the FlatAngle property. - ROLLSPRITE: The sprite of the actor is affected by the Roll property.
This commit is contained in:
parent
a17ec55d0d
commit
a8248433e9
6 changed files with 36 additions and 4 deletions
|
@ -407,12 +407,14 @@ enum ActorRenderFlag
|
|||
RF_SPRITETYPEMASK = 0x7000, // ---Different sprite types, not all implemented
|
||||
RF_FACESPRITE = 0x0000, // Face sprite
|
||||
RF_WALLSPRITE = 0x1000, // Wall sprite
|
||||
RF_FLOORSPRITE = 0x2000, // Floor sprite
|
||||
RF_FLATSPRITE = 0x2000, // Flat sprite
|
||||
RF_VOXELSPRITE = 0x3000, // Voxel object
|
||||
RF_PITCHFLATSPRITE = 0x4000, // [MC] Flat sprite that rotates around pitch (GZDoom only)
|
||||
RF_INVISIBLE = 0x8000, // Don't bother drawing this actor
|
||||
|
||||
RF_FORCEYBILLBOARD = 0x10000, // [BB] OpenGL only: draw with y axis billboard, i.e. anchored to the floor (overrides gl_billboard_mode setting)
|
||||
RF_FORCEXYBILLBOARD = 0x20000, // [BB] OpenGL only: draw with xy axis billboard, i.e. unanchored (overrides gl_billboard_mode setting)
|
||||
RF_ROLLSPRITE = 0x40000, //[marrub]roll the sprite billboard
|
||||
};
|
||||
|
||||
// This translucency value produces the closest match to Heretic's TINTTAB.
|
||||
|
@ -974,6 +976,7 @@ public:
|
|||
DVector3 OldRenderPos;
|
||||
|
||||
DRotator Angles;
|
||||
DAngle FlatAngle;
|
||||
DVector3 Vel;
|
||||
double Speed;
|
||||
double FloatSpeed;
|
||||
|
|
|
@ -262,7 +262,8 @@ void AActor::Serialize(FArchive &arc)
|
|||
<< projectilepassheight
|
||||
<< Vel
|
||||
<< tics
|
||||
<< state;
|
||||
<< state
|
||||
<< FlatAngle;
|
||||
if (arc.IsStoring())
|
||||
{
|
||||
int dmg;
|
||||
|
|
|
@ -6881,3 +6881,25 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FaceMovementDirection)
|
|||
}
|
||||
ACTION_RETURN_BOOL(true);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_SetFlatAngle
|
||||
//
|
||||
// Set actor's flat angle (in degrees). GZDoom only. Requires the
|
||||
// (PITCH)FLATSPRITE flag to have any visible effect.
|
||||
//
|
||||
//===========================================================================
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetFlatAngle)
|
||||
{
|
||||
PARAM_ACTION_PROLOGUE;
|
||||
PARAM_FLOAT_OPT(flatangle) { flatangle = 0; }
|
||||
PARAM_INT_OPT(ptr) { ptr = AAPTR_DEFAULT; }
|
||||
|
||||
AActor *ref = COPY_AAPTR(self, ptr);
|
||||
if (ref != NULL)
|
||||
{
|
||||
ref->FlatAngle = flatangle;
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -265,6 +265,11 @@ static FFlagDef ActorFlagDefs[]=
|
|||
DEFINE_FLAG(RF, INVISIBLE, AActor, renderflags),
|
||||
DEFINE_FLAG(RF, FORCEYBILLBOARD, AActor, renderflags),
|
||||
DEFINE_FLAG(RF, FORCEXYBILLBOARD, AActor, renderflags),
|
||||
DEFINE_FLAG(RF, ROLLSPRITE, AActor, renderflags), // [marrub] roll the sprite billboard
|
||||
// [fgsfds] Flat sprites
|
||||
DEFINE_FLAG(RF, FLATSPRITE, AActor, renderflags),
|
||||
DEFINE_FLAG(RF, WALLSPRITE, AActor, renderflags),
|
||||
DEFINE_FLAG(RF, PITCHFLATSPRITE, AActor, renderflags),
|
||||
|
||||
// Bounce flags
|
||||
DEFINE_FLAG2(BOUNCE_Walls, BOUNCEONWALLS, AActor, BounceFlags),
|
||||
|
|
|
@ -72,11 +72,11 @@ const char *GetVersionString();
|
|||
// SAVESIG should match SAVEVER.
|
||||
|
||||
// MINSAVEVER is the minimum level snapshot version that can be loaded.
|
||||
#define MINSAVEVER 4545
|
||||
#define MINSAVEVER 4546
|
||||
|
||||
// Use 4500 as the base git save version, since it's higher than the
|
||||
// SVN revision ever got.
|
||||
#define SAVEVER 4545
|
||||
#define SAVEVER 4546
|
||||
|
||||
#define SAVEVERSTRINGIFY2(x) #x
|
||||
#define SAVEVERSTRINGIFY(x) SAVEVERSTRINGIFY2(x)
|
||||
|
|
|
@ -325,6 +325,7 @@ ACTOR Actor native //: Thinker
|
|||
native state A_CheckSightOrRange(float distance, state label, bool two_dimension = false);
|
||||
native state A_CheckRange(float distance, state label, bool two_dimension = false);
|
||||
action native bool A_FaceMovementDirection(float offset = 0, float anglelimit = 0, float pitchlimit = 0, int flags = 0, int ptr = AAPTR_DEFAULT);
|
||||
action native A_SetFlatAngle(float flatangle = 0, int ptr = AAPTR_DEFAULT);
|
||||
|
||||
native void A_RearrangePointers(int newtarget, int newmaster = AAPTR_DEFAULT, int newtracer = AAPTR_DEFAULT, int flags=0);
|
||||
native void A_TransferPointer(int ptr_source, int ptr_recepient, int sourcefield, int recepientfield=AAPTR_DEFAULT, int flags=0);
|
||||
|
|
Loading…
Reference in a new issue