- changed TObjPtr to take a pointer as its template argument and not the class it points to.

This addresses the main issue with TObjPtr, namely that using it required pulling in the entire class hierarchy in basic headers like r_defs which polluted nearly every single source file in the project.
This commit is contained in:
Christoph Oelckers 2017-03-08 13:34:26 +01:00
parent 1cb89c6b37
commit b8f7e305db
37 changed files with 124 additions and 140 deletions

View file

@ -1058,17 +1058,17 @@ public:
SBYTE visdir;
SWORD movecount; // when 0, select a new dir
SWORD strafecount; // for MF3_AVOIDMELEE
TObjPtr<AActor> target; // thing being chased/attacked (or NULL)
TObjPtr<AActor*> target; // thing being chased/attacked (or NULL)
// also the originator for missiles
TObjPtr<AActor> lastenemy; // Last known enemy -- killough 2/15/98
TObjPtr<AActor> LastHeard; // [RH] Last actor this one heard
TObjPtr<AActor*> lastenemy; // Last known enemy -- killough 2/15/98
TObjPtr<AActor*> LastHeard; // [RH] Last actor this one heard
int32_t reactiontime; // if non 0, don't attack yet; used by
// player to freeze a bit after teleporting
int32_t threshold; // if > 0, the target will be chased
int32_t DefThreshold; // [MC] Default threshold which the actor will reset its threshold to after switching targets
// no matter what (even if shot)
player_t *player; // only valid if type of APlayerPawn
TObjPtr<AActor> LastLookActor; // Actor last looked for (if TIDtoHate != 0)
TObjPtr<AActor*> LastLookActor; // Actor last looked for (if TIDtoHate != 0)
DVector3 SpawnPoint; // For nightmare respawn
WORD SpawnAngle;
int StartHealth;
@ -1077,9 +1077,9 @@ public:
int skillrespawncount;
int TIDtoHate; // TID of things to hate (0 if none)
FNameNoInit Species; // For monster families
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> master; // Thing which spawned this one (prevents mutual attacks)
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*> master; // Thing which spawned this one (prevents mutual attacks)
int tid; // thing identifier
int special; // special
@ -1088,7 +1088,7 @@ public:
int accuracy, stamina; // [RH] Strife stats -- [XA] moved here for DECORATE/ACS access.
AActor *inext, **iprev;// Links to other mobjs in same bucket
TObjPtr<AActor> goal; // Monster's goal if not chasing anything
TObjPtr<AActor*> goal; // Monster's goal if not chasing anything
int waterlevel; // 0=none, 1=feet, 2=waist, 3=eyes
BYTE boomwaterlevel; // splash information for non-swimmable water sectors
BYTE MinMissileChance;// [RH] If a random # is > than this, then missile attack.
@ -1126,7 +1126,7 @@ public:
FNameNoInit PoisonDamageTypeReceived; // Damage type received by poison.
int PoisonDurationReceived; // Duration left for receiving poison damage.
int PoisonPeriodReceived; // How often poison damage is applied. (Every X tics.)
TObjPtr<AActor> Poisoner; // Last source of received poison damage.
TObjPtr<AActor*> Poisoner; // Last source of received poison damage.
// a linked list of sectors where this object appears
struct msecnode_t *touching_sectorlist; // phares 3/14/98
@ -1136,7 +1136,7 @@ public:
int validcount;
TObjPtr<AInventory> Inventory; // [RH] This actor's inventory
TObjPtr<AInventory*> Inventory; // [RH] This actor's inventory
DWORD InventoryID; // A unique ID to keep track of inventory items
BYTE smokecounter;
@ -1434,7 +1434,7 @@ public:
// begin of GZDoom specific additions
TArray<TObjPtr<AActor> > dynamiclights;
TArray<TObjPtr<AActor*> > dynamiclights;
void * lightassociations;
bool hasmodel;
// end of GZDoom specific additions

View file

@ -116,9 +116,9 @@ public:
botinfo_t *botinfo;
int spawn_tries;
int wanted_botnum;
TObjPtr<AActor> firstthing;
TObjPtr<AActor> body1;
TObjPtr<AActor> body2;
TObjPtr<AActor*> firstthing;
TObjPtr<AActor*> body1;
TObjPtr<AActor*> body2;
bool m_Thinking;
@ -152,12 +152,12 @@ public:
player_t *player;
DAngle Angle; // The wanted angle that the bot try to get every tic.
// (used to get a smooth view movement)
TObjPtr<AActor> dest; // Move Destination.
TObjPtr<AActor> prev; // Previous move destination.
TObjPtr<AActor> enemy; // The dead meat.
TObjPtr<AActor> missile; // A threatening missile that needs to be avoided.
TObjPtr<AActor> mate; // Friend (used for grouping in teamplay or coop).
TObjPtr<AActor> last_mate; // If bots mate disappeared (not if died) that mate is
TObjPtr<AActor*> dest; // Move Destination.
TObjPtr<AActor*> prev; // Previous move destination.
TObjPtr<AActor*> enemy; // The dead meat.
TObjPtr<AActor*> missile; // A threatening missile that needs to be avoided.
TObjPtr<AActor*> mate; // Friend (used for grouping in teamplay or coop).
TObjPtr<AActor*> last_mate; // If bots mate disappeared (not if died) that mate is
// pointed to by this. Allows bot to roam to it if
// necessary.

View file

@ -131,8 +131,8 @@ public:
int RunHealth;
int PlayerFlags;
double FullHeight;
TObjPtr<AInventory> InvFirst; // first inventory item displayed on inventory bar
TObjPtr<AInventory> InvSel; // selected inventory item
TObjPtr<AInventory*> InvFirst; // first inventory item displayed on inventory bar
TObjPtr<AInventory*> InvSel; // selected inventory item
// [GRB] Player class properties
double JumpZ;
@ -427,7 +427,7 @@ public:
AWeapon *ReadyWeapon;
AWeapon *PendingWeapon; // WP_NOCHANGE if not changing
TObjPtr<DPSprite> psprites; // view sprites (gun, etc)
TObjPtr<DPSprite*> psprites; // view sprites (gun, etc)
int cheats; // bit flags
int timefreezer; // Player has an active time freezer
@ -442,8 +442,8 @@ public:
int poisoncount; // screen flash for poison damage
FName poisontype; // type of poison damage to apply
FName poisonpaintype; // type of Pain state to enter for poison damage
TObjPtr<AActor> poisoner; // NULL for non-player actors
TObjPtr<AActor> attacker; // who did damage (NULL for floors)
TObjPtr<AActor*> poisoner; // NULL for non-player actors
TObjPtr<AActor*> attacker; // who did damage (NULL for floors)
int extralight; // so gun flashes light up areas
short fixedcolormap; // can be set to REDCOLORMAP, etc.
short fixedlightlevel;
@ -451,19 +451,19 @@ public:
PClassActor *MorphedPlayerClass; // [MH] (for SBARINFO) class # for this player instance when morphed
int MorphStyle; // which effects to apply for this player instance when morphed
PClassActor *MorphExitFlash; // flash to apply when demorphing (cache of value given to P_MorphPlayer)
TObjPtr<AWeapon> PremorphWeapon; // ready weapon before morphing
TObjPtr<AWeapon*> PremorphWeapon; // ready weapon before morphing
int chickenPeck; // chicken peck countdown
int jumpTics; // delay the next jump for a moment
bool onground; // Identifies if this player is on the ground or other object
int respawn_time; // [RH] delay respawning until this tic
TObjPtr<AActor> camera; // [RH] Whose eyes this player sees through
TObjPtr<AActor*> camera; // [RH] Whose eyes this player sees through
int air_finished; // [RH] Time when you start drowning
FName LastDamageType; // [RH] For damage-specific pain and death sounds
TObjPtr<AActor> MUSINFOactor; // For MUSINFO purposes
TObjPtr<AActor*> MUSINFOactor; // For MUSINFO purposes
SBYTE MUSINFOtics;
bool settings_controller; // Player can control game settings.
@ -471,7 +471,7 @@ public:
SBYTE crouchdir;
//Added by MC:
TObjPtr<DBot> Bot;
TObjPtr<DBot*> Bot;
float BlendR; // [RH] Final blending values
float BlendG;
@ -490,7 +490,7 @@ public:
FWeaponSlots weapons;
// [CW] I moved these here for multiplayer conversation support.
TObjPtr<AActor> ConversationNPC, ConversationPC;
TObjPtr<AActor*> ConversationNPC, ConversationPC;
DAngle ConversationNPCAngle;
bool ConversationFaceTalker;

View file

@ -115,7 +115,7 @@ struct DDecalThinker : public DThinker
public:
DDecalThinker (DBaseDecal *decal) : DThinker (STAT_DECALTHINKER), TheDecal (decal) {}
void Serialize(FSerializer &arc);
TObjPtr<DBaseDecal> TheDecal;
TObjPtr<DBaseDecal*> TheDecal;
protected:
DDecalThinker () : DThinker (STAT_DECALTHINKER) {}
};

View file

@ -542,7 +542,7 @@ size_t DObject::StaticPointerSubstitution (DObject *old, DObject *notOld, bool s
for (auto &sec : level.sectors)
{
#define SECTOR_CHECK(f,t) \
if (sec.f.p == static_cast<t *>(old)) { sec.f = static_cast<t *>(notOld); changed++; }
if (sec.f.pp == static_cast<t *>(old)) { sec.f = static_cast<t *>(notOld); changed++; }
SECTOR_CHECK( SoundTarget, AActor );
SECTOR_CHECK( SecActTarget, AActor );
SECTOR_CHECK( floordata, DSectorEffect );
@ -552,9 +552,9 @@ if (sec.f.p == static_cast<t *>(old)) { sec.f = static_cast<t *>(notOld); change
}
// Go through bot stuff.
if (bglobal.firstthing.p == (AActor *)old) bglobal.firstthing = (AActor *)notOld, ++changed;
if (bglobal.body1.p == (AActor *)old) bglobal.body1 = (AActor *)notOld, ++changed;
if (bglobal.body2.p == (AActor *)old) bglobal.body2 = (AActor *)notOld, ++changed;
if (bglobal.firstthing.pp == (AActor *)old) bglobal.firstthing = (AActor *)notOld, ++changed;
if (bglobal.body1.pp == (AActor *)old) bglobal.body1 = (AActor *)notOld, ++changed;
if (bglobal.body2.pp == (AActor *)old) bglobal.body2 = (AActor *)notOld, ++changed;
return changed;
}

View file

@ -348,70 +348,54 @@ class TObjPtr
{
union
{
T *p;
T pp;
DObject *o;
};
public:
TObjPtr() throw()
{
}
TObjPtr(T *q) throw()
: p(q)
TObjPtr(T q) throw()
: pp(q)
{
}
TObjPtr(const TObjPtr<T> &q) throw()
: p(q.p)
: pp(q.pp)
{
}
T *operator=(T *q) throw()
T operator=(T q) throw()
{
return p = q;
return pp = q;
// The caller must now perform a write barrier.
}
operator T*() throw()
operator T() throw()
{
return GC::ReadBarrier(p);
return GC::ReadBarrier(pp);
}
T &operator*()
{
T *q = GC::ReadBarrier(p);
T q = GC::ReadBarrier(pp);
assert(q != NULL);
return *q;
}
T **operator&() throw()
T *operator&() throw()
{
// Does not perform a read barrier. The only real use for this is with
// the DECLARE_POINTER macro, where a read barrier would be a very bad
// thing.
return &p;
return &pp;
}
T *operator->() throw()
T operator->() throw()
{
return GC::ReadBarrier(p);
return GC::ReadBarrier(pp);
}
bool operator<(T *u) throw()
bool operator!=(T u) throw()
{
return GC::ReadBarrier(p) < u;
return GC::ReadBarrier(o) != u;
}
bool operator<=(T *u) throw()
bool operator==(T u) throw()
{
return GC::ReadBarrier(p) <= u;
}
bool operator>(T *u) throw()
{
return GC::ReadBarrier(p) > u;
}
bool operator>=(T *u) throw()
{
return GC::ReadBarrier(p) >= u;
}
bool operator!=(T *u) throw()
{
return GC::ReadBarrier(p) != u;
}
bool operator==(T *u) throw()
{
return GC::ReadBarrier(p) == u;
return GC::ReadBarrier(o) == u;
}
template<class U> friend inline void GC::Mark(TObjPtr<U> &obj);
@ -424,7 +408,7 @@ public:
// the contents of a TObjPtr to a related type.
template<class T,class U> inline T barrier_cast(TObjPtr<U> &o)
{
return static_cast<T>(static_cast<U *>(o));
return static_cast<T>(static_cast<U>(o));
}
template<class T> inline void GC::Mark(TObjPtr<T> &obj)

View file

@ -29,7 +29,7 @@ public:
DMover (sector_t *sector);
void StopInterpolation(bool force = false);
protected:
TObjPtr<DInterpolation> interpolation;
TObjPtr<DInterpolation*> interpolation;
private:
protected:
DMover ();

View file

@ -3257,7 +3257,7 @@ void FParser::SF_SpawnMissile()
void FParser::SF_MapThingNumExist()
{
TArray<TObjPtr<AActor> > &SpawnedThings = DFraggleThinker::ActiveThinker->SpawnedThings;
auto &SpawnedThings = DFraggleThinker::ActiveThinker->SpawnedThings;
int intval;
@ -3295,7 +3295,7 @@ void FParser::SF_MapThingNumExist()
void FParser::SF_MapThings()
{
TArray<TObjPtr<AActor> > &SpawnedThings = DFraggleThinker::ActiveThinker->SpawnedThings;
auto &SpawnedThings = DFraggleThinker::ActiveThinker->SpawnedThings;
t_return.type = svt_int;
t_return.value.i = SpawnedThings.Size();

View file

@ -375,7 +375,7 @@ void T_AddSpawnedThing(AActor * ac)
{
if (DFraggleThinker::ActiveThinker)
{
TArray<TObjPtr<AActor> > &SpawnedThings = DFraggleThinker::ActiveThinker->SpawnedThings;
auto &SpawnedThings = DFraggleThinker::ActiveThinker->SpawnedThings;
SpawnedThings.Push(GC::ReadBarrier(ac));
}
}

View file

@ -388,7 +388,7 @@ IMPLEMENT_POINTERS_START(DFraggleThinker)
IMPLEMENT_POINTER(LevelScript)
IMPLEMENT_POINTERS_END
TObjPtr<DFraggleThinker> DFraggleThinker::ActiveThinker;
TObjPtr<DFraggleThinker*> DFraggleThinker::ActiveThinker;
//==========================================================================
//

View file

@ -174,11 +174,11 @@ struct DFsVariable : public DObject
public:
FString Name;
TObjPtr<DFsVariable> next; // for hashing
TObjPtr<DFsVariable*> next; // for hashing
int type; // svt_string or svt_int: same as in svalue_t
FString string;
TObjPtr<AActor> actor;
TObjPtr<AActor*> actor;
union value_t
{
@ -241,7 +241,7 @@ public:
int start_index;
int end_index;
int loop_index;
TObjPtr<DFsSection> next; // for hashing
TObjPtr<DFsSection*> next; // for hashing
DFsSection()
{
@ -320,27 +320,27 @@ public:
// {} sections
TObjPtr<DFsSection> sections[SECTIONSLOTS];
TObjPtr<DFsSection*> sections[SECTIONSLOTS];
// variables:
TObjPtr<DFsVariable> variables[VARIABLESLOTS];
TObjPtr<DFsVariable*> variables[VARIABLESLOTS];
// ptr to the parent script
// the parent script is the script above this level
// eg. individual linetrigger scripts are children
// of the levelscript, which is a child of the
// global_script
TObjPtr<DFsScript> parent;
TObjPtr<DFsScript*> parent;
// haleyjd: 8-17
// child scripts.
// levelscript holds ptrs to all of the level's scripts
// here.
TObjPtr<DFsScript> children[MAXSCRIPTS];
TObjPtr<DFsScript*> children[MAXSCRIPTS];
TObjPtr<AActor> trigger; // object which triggered this script
TObjPtr<AActor*> trigger; // object which triggered this script
bool lastiftrue; // haleyjd: whether last "if" statement was
// true or false
@ -665,7 +665,7 @@ public:
void OnDestroy() override;
void Serialize(FSerializer &arc);
TObjPtr<DFsScript> script;
TObjPtr<DFsScript*> script;
// where we are
int save_point;
@ -674,10 +674,10 @@ public:
int wait_data; // data for wait: tagnum, counter, script number etc
// saved variables
TObjPtr<DFsVariable> variables[VARIABLESLOTS];
TObjPtr<DFsVariable*> variables[VARIABLESLOTS];
TObjPtr<DRunningScript> prev, next; // for chain
TObjPtr<AActor> trigger;
TObjPtr<DRunningScript*> prev, next; // for chain
TObjPtr<AActor*> trigger;
};
//-----------------------------------------------------------------------------
@ -691,9 +691,9 @@ class DFraggleThinker : public DThinker
HAS_OBJECT_POINTERS
public:
TObjPtr<DFsScript> LevelScript;
TObjPtr<DRunningScript> RunningScripts;
TArray<TObjPtr<AActor> > SpawnedThings;
TObjPtr<DFsScript*> LevelScript;
TObjPtr<DRunningScript*> RunningScripts;
TArray<TObjPtr<AActor*> > SpawnedThings;
bool nocheckposition;
bool setcolormaterial;
@ -708,7 +708,7 @@ public:
bool wait_finished(DRunningScript *script);
void AddRunningScript(DRunningScript *runscr);
static TObjPtr<DFraggleThinker> ActiveThinker;
static TObjPtr<DFraggleThinker*> ActiveThinker;
};
//-----------------------------------------------------------------------------

View file

@ -153,7 +153,7 @@ AActor* actorvalue(const svalue_t &svalue)
}
else
{
TArray<TObjPtr<AActor> > &SpawnedThings = DFraggleThinker::ActiveThinker->SpawnedThings;
auto &SpawnedThings = DFraggleThinker::ActiveThinker->SpawnedThings;
// this requires some creativity. We use the intvalue
// as the thing number of a thing in the level.
intval = intvalue(svalue);

View file

@ -85,7 +85,7 @@ public:
AInventory *PrevInv(); // Returns the previous item with IF_INVBAR set.
AInventory *NextInv(); // Returns the next item with IF_INVBAR set.
TObjPtr<AActor> Owner; // Who owns this item? NULL if it's still a pickup.
TObjPtr<AActor*> Owner; // Who owns this item? NULL if it's still a pickup.
int Amount; // Amount of item this instance has
int MaxAmount; // Max amount of item this instance can have
int InterHubAmount; // Amount of item that can be kept between hubs or levels

View file

@ -113,8 +113,8 @@ public:
int SlotPriority;
// In-inventory instance variables
TObjPtr<AInventory> Ammo1, Ammo2;
TObjPtr<AWeapon> SisterWeapon;
TObjPtr<AInventory*> Ammo1, Ammo2;
TObjPtr<AWeapon*> SisterWeapon;
float FOVScale;
int Crosshair; // 0 to use player's crosshair
bool GivenAsMorphWeapon;

View file

@ -86,7 +86,7 @@ public:
DCorpsePointer (AActor *ptr);
void OnDestroy() override;
void Serialize(FSerializer &arc);
TObjPtr<AActor> Corpse;
TObjPtr<AActor*> Corpse;
DWORD Count; // Only the first corpse pointer's count is valid.
private:
DCorpsePointer () {}

View file

@ -95,7 +95,7 @@ protected:
float Blends[2][4];
int TotalTics;
int StartTic;
TObjPtr<AActor> ForWho;
TObjPtr<AActor*> ForWho;
void SetBlend (float time);
DFlashFader ();
@ -131,7 +131,7 @@ public:
void Serialize(FSerializer &arc);
void Tick ();
TObjPtr<AActor> m_Spot;
TObjPtr<AActor*> m_Spot;
double m_TremorRadius, m_DamageRadius;
int m_Countdown;
int m_CountdownStart;
@ -164,7 +164,7 @@ public:
void Die (AActor *source, AActor *inflictor, int dmgflags);
void OnDestroy() override;
TObjPtr<AActor> UnmorphedMe;
TObjPtr<AActor*> UnmorphedMe;
int UnmorphTime, MorphStyle;
PClassActor *MorphExitFlash;
ActorFlags FlagsSave;

View file

@ -46,7 +46,7 @@ static FRandom pr_spawnmace ("SpawnMace");
IMPLEMENT_CLASS(DSpotState, false, false)
IMPLEMENT_CLASS(ASpecialSpot, false, false)
TObjPtr<DSpotState> DSpotState::SpotState;
TObjPtr<DSpotState*> DSpotState::SpotState;
//----------------------------------------------------------------------------
//

View file

@ -21,7 +21,7 @@ struct FSpotList;
class DSpotState : public DThinker
{
DECLARE_CLASS(DSpotState, DThinker)
static TObjPtr<DSpotState> SpotState;
static TObjPtr<DSpotState*> SpotState;
TArray<FSpotList> SpotLists;
public:

View file

@ -133,7 +133,7 @@ protected:
DHUDMessage () : SourceText(NULL) {}
private:
TObjPtr<DHUDMessage> Next;
TObjPtr<DHUDMessage*> Next;
DWORD SBarID;
char *SourceText;
@ -415,7 +415,7 @@ private:
void DrawConsistancy () const;
void DrawWaiting () const;
TObjPtr<DHUDMessage> Messages[NUM_HUDMSGLAYERS];
TObjPtr<DHUDMessage*> Messages[NUM_HUDMSGLAYERS];
bool ShowLog;
};

View file

@ -285,7 +285,7 @@ class DIntermissionController : public DObject
HAS_OBJECT_POINTERS
FIntermissionDescriptor *mDesc;
TObjPtr<DIntermissionScreen> mScreen;
TObjPtr<DIntermissionScreen*> mScreen;
bool mDeleteDesc;
bool mFirst;
bool mAdvance, mSentAdvance;

View file

@ -628,7 +628,7 @@ class DSuicider : public DThinker
DECLARE_CLASS(DSuicider, DThinker)
HAS_OBJECT_POINTERS;
public:
TObjPtr<APlayerPawn> Pawn;
TObjPtr<APlayerPawn*> Pawn;
void Tick()
{

View file

@ -262,7 +262,7 @@ public:
MOUSE_Release
};
TObjPtr<DMenu> mParentMenu;
TObjPtr<DMenu*> mParentMenu;
bool mMouseCapture;
bool mBackbuttonSelected;
bool DontDim;

View file

@ -1383,7 +1383,7 @@ private:
double WatchD, LastD;
int Special;
int Args[5];
TObjPtr<AActor> Activator;
TObjPtr<AActor*> Activator;
line_t *Line;
bool LineSide;
bool bCeiling;
@ -2879,7 +2879,7 @@ IMPLEMENT_POINTERS_START(DACSThinker)
IMPLEMENT_POINTER(Scripts)
IMPLEMENT_POINTERS_END
TObjPtr<DACSThinker> DACSThinker::ActiveThinker;
TObjPtr<DACSThinker*> DACSThinker::ActiveThinker;
DACSThinker::DACSThinker ()
: DThinker(STAT_SCRIPTS)

View file

@ -895,7 +895,7 @@ protected:
int *pc;
EScriptState state;
int statedata;
TObjPtr<AActor> activator;
TObjPtr<AActor*> activator;
line_t *activationline;
bool backSide;
FFont *activefont;
@ -955,7 +955,7 @@ public:
typedef TMap<int, DLevelScript *> ScriptMap;
ScriptMap RunningScripts; // Array of all synchronous scripts
static TObjPtr<DACSThinker> ActiveThinker;
static TObjPtr<DACSThinker*> ActiveThinker;
void DumpScriptStatus();
void StopScriptsFor (AActor *actor);

View file

@ -90,8 +90,8 @@ private:
void Tick();
public: // must be public to be able to generate the field export tables. Grrr...
TObjPtr<AActor> Caller;
TObjPtr<DPSprite> Next;
TObjPtr<AActor*> Caller;
TObjPtr<DPSprite*> Next;
player_t *Owner;
FState *State;
int Sprite;

View file

@ -66,7 +66,7 @@ public:
protected:
EPusher m_Type;
TObjPtr<AActor> m_Source;// Point source if point pusher
TObjPtr<AActor*> m_Source;// Point source if point pusher
DVector2 m_PushVec;
double m_Magnitude; // Vector strength for point pusher
double m_Radius; // Effective radius for point pusher

View file

@ -66,7 +66,7 @@ protected:
double m_vdx, m_vdy; // Accumulated velocity if accelerative
int m_Accel; // Whether it's accelerative
EScrollPos m_Parts; // Which parts of a sidedef are being scrolled?
TObjPtr<DInterpolation> m_Interpolations[3];
TObjPtr<DInterpolation*> m_Interpolations[3];
private:
DScroller ()

View file

@ -254,8 +254,8 @@ protected:
double m_CeilingTarget;
int m_Crush;
bool m_Hexencrush;
TObjPtr<DInterpolation> m_Interp_Ceiling;
TObjPtr<DInterpolation> m_Interp_Floor;
TObjPtr<DInterpolation*> m_Interp_Ceiling;
TObjPtr<DInterpolation*> m_Interp_Floor;
private:
DPillar ();
@ -595,8 +595,8 @@ protected:
double m_FloorDestDist;
double m_CeilingDestDist;
double m_Speed;
TObjPtr<DInterpolation> m_Interp_Ceiling;
TObjPtr<DInterpolation> m_Interp_Floor;
TObjPtr<DInterpolation*> m_Interp_Ceiling;
TObjPtr<DInterpolation*> m_Interp_Floor;
void StartFloorSound ();

View file

@ -3157,7 +3157,7 @@ void P_UnPredictPlayer ()
APlayerPawn *act = player->mo;
AActor *savedcamera = player->camera;
TObjPtr<AInventory> InvSel = act->InvSel;
TObjPtr<AInventory*> InvSel = act->InvSel;
int inventorytics = player->inventorytics;
*player = PredictionPlayerBackup;

View file

@ -22,7 +22,7 @@ protected:
int m_PolyObj;
double m_Speed;
double m_Dist;
TObjPtr<DInterpolation> m_Interpolation;
TObjPtr<DInterpolation*> m_Interpolation;
void SetInterpolation();
};
@ -87,8 +87,8 @@ struct FPolyObj
int seqType;
double Size; // polyobj size (area of POLY_AREAUNIT == size of FRACUNIT)
FPolyNode *subsectorlinks;
TObjPtr<DPolyAction> specialdata; // pointer to a thinker, if the poly is moving
TObjPtr<DInterpolation> interpolation;
TObjPtr<DPolyAction*> specialdata; // pointer to a thinker, if the poly is moving
TObjPtr<DInterpolation*> interpolation;
FPolyObj();
DInterpolation *SetInterpolation();

View file

@ -227,7 +227,7 @@ struct FSectorPortal
sector_t *mDestination;
DVector2 mDisplacement;
double mPlaneZ;
TObjPtr<AActor> mSkybox;
TObjPtr<AActor*> mSkybox;
bool MergeAllowed() const
{

View file

@ -15,8 +15,8 @@ class DInterpolation : public DObject
DECLARE_ABSTRACT_CLASS(DInterpolation, DObject)
HAS_OBJECT_POINTERS
TObjPtr<DInterpolation> Next;
TObjPtr<DInterpolation> Prev;
TObjPtr<DInterpolation*> Next;
TObjPtr<DInterpolation*> Prev;
protected:
int refcount;
@ -43,7 +43,7 @@ public:
struct FInterpolator
{
TObjPtr<DInterpolation> Head;
TObjPtr<DInterpolation*> Head;
bool didInterp;
int count;

View file

@ -491,10 +491,10 @@ void FRemapTable::AddColourisation(int start, int end, int r, int g, int b)
{
for (int i = start; i < end; ++i)
{
float br = GPalette.BaseColors[i].r;
float bg = GPalette.BaseColors[i].g;
float bb = GPalette.BaseColors[i].b;
float grey = (br * 0.299 + bg * 0.587 + bb * 0.114) / 255.0f;
double br = GPalette.BaseColors[i].r;
double bg = GPalette.BaseColors[i].g;
double bb = GPalette.BaseColors[i].b;
double grey = (br * 0.299 + bg * 0.587 + bb * 0.114) / 255.0f;
if (grey > 1.0) grey = 1.0;
br = r * grey;
bg = g * grey;

View file

@ -975,7 +975,7 @@ public:
PalEntry SpecialColors[5];
TObjPtr<AActor> SoundTarget;
TObjPtr<AActor*> SoundTarget;
short special;
short lightlevel;
@ -996,9 +996,9 @@ public:
int terrainnum[2];
// thinker_t for reversable actions
TObjPtr<DSectorEffect> floordata; // jff 2/22/98 make thinkers on
TObjPtr<DSectorEffect> ceilingdata; // floors, ceilings, lighting,
TObjPtr<DSectorEffect> lightingdata; // independent of one another
TObjPtr<DSectorEffect*> floordata; // jff 2/22/98 make thinkers on
TObjPtr<DSectorEffect*> ceilingdata; // floors, ceilings, lighting,
TObjPtr<DSectorEffect*> lightingdata; // independent of one another
enum
{
@ -1007,7 +1007,7 @@ public:
CeilingScroll,
FloorScroll
};
TObjPtr<DInterpolation> interpolations[4];
TObjPtr<DInterpolation*> interpolations[4];
int prevsec; // -1 or number of sector for previous step
int nextsec; // -1 or number of next step sector
@ -1044,7 +1044,7 @@ public:
// flexible in a Bloody way. SecActTarget forms a list of actors
// joined by their tracer fields. When a potential sector action
// occurs, SecActTarget's TriggerAction method is called.
TObjPtr<AActor> SecActTarget;
TObjPtr<AActor*> SecActTarget;
// [RH] The portal or skybox to render for this sector.
unsigned Portals[2];
@ -1126,7 +1126,7 @@ struct side_t
double xScale;
double yScale;
FTextureID texture;
TObjPtr<DInterpolation> interpolation;
TObjPtr<DInterpolation*> interpolation;
//int Light;
};

View file

@ -108,7 +108,7 @@ extern void R_ClearPastViewer (AActor *actor);
struct FCanvasTextureInfo
{
FCanvasTextureInfo *Next;
TObjPtr<AActor> Viewpoint;
TObjPtr<AActor*> Viewpoint;
FCanvasTexture *Texture;
FTextureID PicNum;
int FOV;

View file

@ -126,7 +126,7 @@ public:
}
private:
DSeqActorNode() {}
TObjPtr<AActor> m_Actor;
TObjPtr<AActor*> m_Actor;
};
class DSeqPolyNode : public DSeqNode

View file

@ -55,8 +55,8 @@ protected:
int m_ModeNum;
TArray<int> m_SequenceChoices;
TObjPtr<DSeqNode> m_ChildSeqNode;
TObjPtr<DSeqNode> m_ParentSeqNode;
TObjPtr<DSeqNode*> m_ChildSeqNode;
TObjPtr<DSeqNode*> m_ParentSeqNode;
private:
static DSeqNode *SequenceListHead;