mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 13:41:05 +00:00
- did a bit of reordering AActor's variables to group the ones together which are accessed by the renderer. Tested with some actor-heavy maps this does provide a small, approx 3-4% speedup in the OpenGL sprite processing function.
This commit is contained in:
parent
3532e50575
commit
4dc0599a6c
1 changed files with 22 additions and 18 deletions
40
src/actor.h
40
src/actor.h
|
@ -978,30 +978,43 @@ public:
|
||||||
// NOTE: The first member variable *must* be snext.
|
// NOTE: The first member variable *must* be snext.
|
||||||
AActor *snext, **sprev; // links in sector (if needed)
|
AActor *snext, **sprev; // links in sector (if needed)
|
||||||
DVector3 __Pos; // double underscores so that it won't get used by accident. Access to this should be exclusively through the designated access functions.
|
DVector3 __Pos; // double underscores so that it won't get used by accident. Access to this should be exclusively through the designated access functions.
|
||||||
DVector3 OldRenderPos;
|
|
||||||
|
|
||||||
DAngle SpriteAngle;
|
DAngle SpriteAngle;
|
||||||
DAngle SpriteRotation;
|
DAngle SpriteRotation;
|
||||||
DAngle VisibleStartAngle;
|
|
||||||
DAngle VisibleStartPitch;
|
|
||||||
DAngle VisibleEndAngle;
|
|
||||||
DAngle VisibleEndPitch;
|
|
||||||
DRotator Angles;
|
DRotator Angles;
|
||||||
DVector3 Vel;
|
DVector2 Scale; // Scaling values; 1 is normal size
|
||||||
double Speed;
|
|
||||||
double FloatSpeed;
|
|
||||||
|
|
||||||
int sprite; // used to find patch_t and flip value
|
int sprite; // used to find patch_t and flip value
|
||||||
uint8_t frame; // sprite frame to draw
|
uint8_t frame; // sprite frame to draw
|
||||||
uint8_t effects; // [RH] see p_effect.h
|
uint8_t effects; // [RH] see p_effect.h
|
||||||
uint8_t fountaincolor; // Split out of 'effect' to have easier access.
|
uint8_t fountaincolor; // Split out of 'effect' to have easier access.
|
||||||
DVector2 Scale; // Scaling values; 1 is normal size
|
|
||||||
FRenderStyle RenderStyle; // Style to draw this actor with
|
FRenderStyle RenderStyle; // Style to draw this actor with
|
||||||
ActorRenderFlags renderflags; // Different rendering flags
|
ActorRenderFlags renderflags; // Different rendering flags
|
||||||
FTextureID picnum; // Draw this instead of sprite if valid
|
FTextureID picnum; // Draw this instead of sprite if valid
|
||||||
double Alpha; // Since P_CheckSight makes an alpha check this can't be a float. It has to be a double.
|
double Alpha; // Since P_CheckSight makes an alpha check this can't be a float. It has to be a double.
|
||||||
DWORD fillcolor; // Color to draw when STYLE_Shaded
|
DWORD fillcolor; // Color to draw when STYLE_Shaded
|
||||||
|
|
||||||
|
ActorFlags flags;
|
||||||
|
ActorFlags2 flags2; // Heretic flags
|
||||||
|
ActorFlags3 flags3; // [RH] Hexen/Heretic actor-dependant behavior made flaggable
|
||||||
|
ActorFlags4 flags4; // [RH] Even more flags!
|
||||||
|
ActorFlags5 flags5; // OMG! We need another one.
|
||||||
|
ActorFlags6 flags6; // Shit! Where did all the flags go?
|
||||||
|
ActorFlags7 flags7; // WHO WANTS TO BET ON 8!?
|
||||||
|
double Floorclip; // value to use for floor clipping
|
||||||
|
DWORD Translation;
|
||||||
|
|
||||||
|
|
||||||
|
DAngle VisibleStartAngle;
|
||||||
|
DAngle VisibleStartPitch;
|
||||||
|
DAngle VisibleEndAngle;
|
||||||
|
DAngle VisibleEndPitch;
|
||||||
|
|
||||||
|
DVector3 OldRenderPos;
|
||||||
|
DVector3 Vel;
|
||||||
|
double Speed;
|
||||||
|
double FloatSpeed;
|
||||||
|
|
||||||
// interaction info
|
// interaction info
|
||||||
FBlockNode *BlockNode; // links in blocks (if needed)
|
FBlockNode *BlockNode; // links in blocks (if needed)
|
||||||
struct sector_t *Sector;
|
struct sector_t *Sector;
|
||||||
|
@ -1031,13 +1044,6 @@ public:
|
||||||
int DamageVal;
|
int DamageVal;
|
||||||
VMFunction *DamageFunc;
|
VMFunction *DamageFunc;
|
||||||
int projectileKickback;
|
int projectileKickback;
|
||||||
ActorFlags flags;
|
|
||||||
ActorFlags2 flags2; // Heretic flags
|
|
||||||
ActorFlags3 flags3; // [RH] Hexen/Heretic actor-dependant behavior made flaggable
|
|
||||||
ActorFlags4 flags4; // [RH] Even more flags!
|
|
||||||
ActorFlags5 flags5; // OMG! We need another one.
|
|
||||||
ActorFlags6 flags6; // Shit! Where did all the flags go?
|
|
||||||
ActorFlags7 flags7; // WHO WANTS TO BET ON 8!?
|
|
||||||
|
|
||||||
// [BB] If 0, everybody can see the actor, if > 0, only members of team (VisibleToTeam-1) can see it.
|
// [BB] If 0, everybody can see the actor, if > 0, only members of team (VisibleToTeam-1) can see it.
|
||||||
DWORD VisibleToTeam;
|
DWORD VisibleToTeam;
|
||||||
|
@ -1075,7 +1081,6 @@ public:
|
||||||
TObjPtr<AActor> alternative; // (Un)Morphed actors stored here. Those with the MF_UNMORPHED flag are the originals.
|
TObjPtr<AActor> alternative; // (Un)Morphed actors stored here. Those with the MF_UNMORPHED flag are the originals.
|
||||||
TObjPtr<AActor> tracer; // Thing being chased/attacked for tracers
|
TObjPtr<AActor> tracer; // Thing being chased/attacked for tracers
|
||||||
TObjPtr<AActor> master; // Thing which spawned this one (prevents mutual attacks)
|
TObjPtr<AActor> master; // Thing which spawned this one (prevents mutual attacks)
|
||||||
double Floorclip; // value to use for floor clipping
|
|
||||||
|
|
||||||
int tid; // thing identifier
|
int tid; // thing identifier
|
||||||
int special; // special
|
int special; // special
|
||||||
|
@ -1138,7 +1143,6 @@ public:
|
||||||
BYTE smokecounter;
|
BYTE smokecounter;
|
||||||
BYTE FloatBobPhase;
|
BYTE FloatBobPhase;
|
||||||
BYTE FriendPlayer; // [RH] Player # + 1 this friendly monster works for (so 0 is no player, 1 is player 0, etc)
|
BYTE FriendPlayer; // [RH] Player # + 1 this friendly monster works for (so 0 is no player, 1 is player 0, etc)
|
||||||
DWORD Translation;
|
|
||||||
PalEntry BloodColor;
|
PalEntry BloodColor;
|
||||||
DWORD BloodTranslation;
|
DWORD BloodTranslation;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue