diff --git a/src/actor.h b/src/actor.h index e435a1fb72..119214398b 100644 --- a/src/actor.h +++ b/src/actor.h @@ -1058,17 +1058,17 @@ public: SBYTE visdir; SWORD movecount; // when 0, select a new dir SWORD strafecount; // for MF3_AVOIDMELEE - TObjPtr target; // thing being chased/attacked (or NULL) + TObjPtr target; // thing being chased/attacked (or NULL) // also the originator for missiles - TObjPtr lastenemy; // Last known enemy -- killough 2/15/98 - TObjPtr LastHeard; // [RH] Last actor this one heard + TObjPtr lastenemy; // Last known enemy -- killough 2/15/98 + TObjPtr 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 LastLookActor; // Actor last looked for (if TIDtoHate != 0) + TObjPtr 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 alternative; // (Un)Morphed actors stored here. Those with the MF_UNMORPHED flag are the originals. - TObjPtr tracer; // Thing being chased/attacked for tracers - TObjPtr master; // Thing which spawned this one (prevents mutual attacks) + TObjPtr alternative; // (Un)Morphed actors stored here. Those with the MF_UNMORPHED flag are the originals. + TObjPtr tracer; // Thing being chased/attacked for tracers + TObjPtr 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 goal; // Monster's goal if not chasing anything + TObjPtr 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 Poisoner; // Last source of received poison damage. + TObjPtr 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 Inventory; // [RH] This actor's inventory + TObjPtr 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 > dynamiclights; + TArray > dynamiclights; void * lightassociations; bool hasmodel; // end of GZDoom specific additions diff --git a/src/b_bot.h b/src/b_bot.h index 58a9b76407..df4ba0a32a 100644 --- a/src/b_bot.h +++ b/src/b_bot.h @@ -116,9 +116,9 @@ public: botinfo_t *botinfo; int spawn_tries; int wanted_botnum; - TObjPtr firstthing; - TObjPtr body1; - TObjPtr body2; + TObjPtr firstthing; + TObjPtr body1; + TObjPtr 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 dest; // Move Destination. - TObjPtr prev; // Previous move destination. - TObjPtr enemy; // The dead meat. - TObjPtr missile; // A threatening missile that needs to be avoided. - TObjPtr mate; // Friend (used for grouping in teamplay or coop). - TObjPtr last_mate; // If bots mate disappeared (not if died) that mate is + TObjPtr dest; // Move Destination. + TObjPtr prev; // Previous move destination. + TObjPtr enemy; // The dead meat. + TObjPtr missile; // A threatening missile that needs to be avoided. + TObjPtr mate; // Friend (used for grouping in teamplay or coop). + TObjPtr last_mate; // If bots mate disappeared (not if died) that mate is // pointed to by this. Allows bot to roam to it if // necessary. diff --git a/src/d_player.h b/src/d_player.h index 379265cab1..2b1b386a97 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -131,8 +131,8 @@ public: int RunHealth; int PlayerFlags; double FullHeight; - TObjPtr InvFirst; // first inventory item displayed on inventory bar - TObjPtr InvSel; // selected inventory item + TObjPtr InvFirst; // first inventory item displayed on inventory bar + TObjPtr 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 psprites; // view sprites (gun, etc) + TObjPtr 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 poisoner; // NULL for non-player actors - TObjPtr attacker; // who did damage (NULL for floors) + TObjPtr poisoner; // NULL for non-player actors + TObjPtr 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 PremorphWeapon; // ready weapon before morphing + TObjPtr 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 camera; // [RH] Whose eyes this player sees through + TObjPtr 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 MUSINFOactor; // For MUSINFO purposes + TObjPtr 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 Bot; + TObjPtr 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 ConversationNPC, ConversationPC; + TObjPtr ConversationNPC, ConversationPC; DAngle ConversationNPCAngle; bool ConversationFaceTalker; diff --git a/src/decallib.cpp b/src/decallib.cpp index 52a4eadf5b..c8bdfb9ba8 100644 --- a/src/decallib.cpp +++ b/src/decallib.cpp @@ -115,7 +115,7 @@ struct DDecalThinker : public DThinker public: DDecalThinker (DBaseDecal *decal) : DThinker (STAT_DECALTHINKER), TheDecal (decal) {} void Serialize(FSerializer &arc); - TObjPtr TheDecal; + TObjPtr TheDecal; protected: DDecalThinker () : DThinker (STAT_DECALTHINKER) {} }; diff --git a/src/dobject.cpp b/src/dobject.cpp index b8097f5498..1485096aea 100644 --- a/src/dobject.cpp +++ b/src/dobject.cpp @@ -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(old)) { sec.f = static_cast(notOld); changed++; } +if (sec.f.pp == static_cast(old)) { sec.f = static_cast(notOld); changed++; } SECTOR_CHECK( SoundTarget, AActor ); SECTOR_CHECK( SecActTarget, AActor ); SECTOR_CHECK( floordata, DSectorEffect ); @@ -552,9 +552,9 @@ if (sec.f.p == static_cast(old)) { sec.f = static_cast(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; } diff --git a/src/dobject.h b/src/dobject.h index cc6672cdfd..31215b9814 100644 --- a/src/dobject.h +++ b/src/dobject.h @@ -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 &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 friend inline void GC::Mark(TObjPtr &obj); @@ -424,7 +408,7 @@ public: // the contents of a TObjPtr to a related type. template inline T barrier_cast(TObjPtr &o) { - return static_cast(static_cast(o)); + return static_cast(static_cast(o)); } template inline void GC::Mark(TObjPtr &obj) diff --git a/src/dsectoreffect.h b/src/dsectoreffect.h index 5139aaabd4..e72e5bc56b 100644 --- a/src/dsectoreffect.h +++ b/src/dsectoreffect.h @@ -29,7 +29,7 @@ public: DMover (sector_t *sector); void StopInterpolation(bool force = false); protected: - TObjPtr interpolation; + TObjPtr interpolation; private: protected: DMover (); diff --git a/src/fragglescript/t_func.cpp b/src/fragglescript/t_func.cpp index 1a979824f7..f12dd8a013 100644 --- a/src/fragglescript/t_func.cpp +++ b/src/fragglescript/t_func.cpp @@ -3257,7 +3257,7 @@ void FParser::SF_SpawnMissile() void FParser::SF_MapThingNumExist() { - TArray > &SpawnedThings = DFraggleThinker::ActiveThinker->SpawnedThings; + auto &SpawnedThings = DFraggleThinker::ActiveThinker->SpawnedThings; int intval; @@ -3295,7 +3295,7 @@ void FParser::SF_MapThingNumExist() void FParser::SF_MapThings() { - TArray > &SpawnedThings = DFraggleThinker::ActiveThinker->SpawnedThings; + auto &SpawnedThings = DFraggleThinker::ActiveThinker->SpawnedThings; t_return.type = svt_int; t_return.value.i = SpawnedThings.Size(); diff --git a/src/fragglescript/t_load.cpp b/src/fragglescript/t_load.cpp index eb7b602bf7..16eab219e5 100644 --- a/src/fragglescript/t_load.cpp +++ b/src/fragglescript/t_load.cpp @@ -375,7 +375,7 @@ void T_AddSpawnedThing(AActor * ac) { if (DFraggleThinker::ActiveThinker) { - TArray > &SpawnedThings = DFraggleThinker::ActiveThinker->SpawnedThings; + auto &SpawnedThings = DFraggleThinker::ActiveThinker->SpawnedThings; SpawnedThings.Push(GC::ReadBarrier(ac)); } } diff --git a/src/fragglescript/t_script.cpp b/src/fragglescript/t_script.cpp index 1ff4321fa9..9dc1533106 100644 --- a/src/fragglescript/t_script.cpp +++ b/src/fragglescript/t_script.cpp @@ -388,7 +388,7 @@ IMPLEMENT_POINTERS_START(DFraggleThinker) IMPLEMENT_POINTER(LevelScript) IMPLEMENT_POINTERS_END -TObjPtr DFraggleThinker::ActiveThinker; +TObjPtr DFraggleThinker::ActiveThinker; //========================================================================== // diff --git a/src/fragglescript/t_script.h b/src/fragglescript/t_script.h index eb0cc382b8..bf990b6797 100644 --- a/src/fragglescript/t_script.h +++ b/src/fragglescript/t_script.h @@ -174,11 +174,11 @@ struct DFsVariable : public DObject public: FString Name; - TObjPtr next; // for hashing + TObjPtr next; // for hashing int type; // svt_string or svt_int: same as in svalue_t FString string; - TObjPtr actor; + TObjPtr actor; union value_t { @@ -241,7 +241,7 @@ public: int start_index; int end_index; int loop_index; - TObjPtr next; // for hashing + TObjPtr next; // for hashing DFsSection() { @@ -320,27 +320,27 @@ public: // {} sections - TObjPtr sections[SECTIONSLOTS]; + TObjPtr sections[SECTIONSLOTS]; // variables: - TObjPtr variables[VARIABLESLOTS]; + TObjPtr 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 parent; + TObjPtr parent; // haleyjd: 8-17 // child scripts. // levelscript holds ptrs to all of the level's scripts // here. - TObjPtr children[MAXSCRIPTS]; + TObjPtr children[MAXSCRIPTS]; - TObjPtr trigger; // object which triggered this script + TObjPtr 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 script; + TObjPtr 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 variables[VARIABLESLOTS]; + TObjPtr variables[VARIABLESLOTS]; - TObjPtr prev, next; // for chain - TObjPtr trigger; + TObjPtr prev, next; // for chain + TObjPtr trigger; }; //----------------------------------------------------------------------------- @@ -691,9 +691,9 @@ class DFraggleThinker : public DThinker HAS_OBJECT_POINTERS public: - TObjPtr LevelScript; - TObjPtr RunningScripts; - TArray > SpawnedThings; + TObjPtr LevelScript; + TObjPtr RunningScripts; + TArray > SpawnedThings; bool nocheckposition; bool setcolormaterial; @@ -708,7 +708,7 @@ public: bool wait_finished(DRunningScript *script); void AddRunningScript(DRunningScript *runscr); - static TObjPtr ActiveThinker; + static TObjPtr ActiveThinker; }; //----------------------------------------------------------------------------- diff --git a/src/fragglescript/t_variable.cpp b/src/fragglescript/t_variable.cpp index 9bdddda34d..a87d2c1e60 100644 --- a/src/fragglescript/t_variable.cpp +++ b/src/fragglescript/t_variable.cpp @@ -153,7 +153,7 @@ AActor* actorvalue(const svalue_t &svalue) } else { - TArray > &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); diff --git a/src/g_inventory/a_pickups.h b/src/g_inventory/a_pickups.h index 9b2fc1cc1a..eb9731ddcf 100644 --- a/src/g_inventory/a_pickups.h +++ b/src/g_inventory/a_pickups.h @@ -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 Owner; // Who owns this item? NULL if it's still a pickup. + TObjPtr 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 diff --git a/src/g_inventory/a_weapons.h b/src/g_inventory/a_weapons.h index 606c96e98e..49e9e3aa0c 100644 --- a/src/g_inventory/a_weapons.h +++ b/src/g_inventory/a_weapons.h @@ -113,8 +113,8 @@ public: int SlotPriority; // In-inventory instance variables - TObjPtr Ammo1, Ammo2; - TObjPtr SisterWeapon; + TObjPtr Ammo1, Ammo2; + TObjPtr SisterWeapon; float FOVScale; int Crosshair; // 0 to use player's crosshair bool GivenAsMorphWeapon; diff --git a/src/g_shared/a_action.cpp b/src/g_shared/a_action.cpp index 2d1a95cdd1..fc7c354b3a 100644 --- a/src/g_shared/a_action.cpp +++ b/src/g_shared/a_action.cpp @@ -86,7 +86,7 @@ public: DCorpsePointer (AActor *ptr); void OnDestroy() override; void Serialize(FSerializer &arc); - TObjPtr Corpse; + TObjPtr Corpse; DWORD Count; // Only the first corpse pointer's count is valid. private: DCorpsePointer () {} diff --git a/src/g_shared/a_sharedglobal.h b/src/g_shared/a_sharedglobal.h index ea367dd3a4..5a16c54d68 100644 --- a/src/g_shared/a_sharedglobal.h +++ b/src/g_shared/a_sharedglobal.h @@ -95,7 +95,7 @@ protected: float Blends[2][4]; int TotalTics; int StartTic; - TObjPtr ForWho; + TObjPtr ForWho; void SetBlend (float time); DFlashFader (); @@ -131,7 +131,7 @@ public: void Serialize(FSerializer &arc); void Tick (); - TObjPtr m_Spot; + TObjPtr 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 UnmorphedMe; + TObjPtr UnmorphedMe; int UnmorphTime, MorphStyle; PClassActor *MorphExitFlash; ActorFlags FlagsSave; diff --git a/src/g_shared/a_specialspot.cpp b/src/g_shared/a_specialspot.cpp index 46a9ccc412..2c41b20990 100644 --- a/src/g_shared/a_specialspot.cpp +++ b/src/g_shared/a_specialspot.cpp @@ -46,7 +46,7 @@ static FRandom pr_spawnmace ("SpawnMace"); IMPLEMENT_CLASS(DSpotState, false, false) IMPLEMENT_CLASS(ASpecialSpot, false, false) -TObjPtr DSpotState::SpotState; +TObjPtr DSpotState::SpotState; //---------------------------------------------------------------------------- // diff --git a/src/g_shared/a_specialspot.h b/src/g_shared/a_specialspot.h index 3b1e772d1f..4bfef3b634 100644 --- a/src/g_shared/a_specialspot.h +++ b/src/g_shared/a_specialspot.h @@ -21,7 +21,7 @@ struct FSpotList; class DSpotState : public DThinker { DECLARE_CLASS(DSpotState, DThinker) - static TObjPtr SpotState; + static TObjPtr SpotState; TArray SpotLists; public: diff --git a/src/g_statusbar/sbar.h b/src/g_statusbar/sbar.h index 1e8af15144..ff7f5d75e6 100644 --- a/src/g_statusbar/sbar.h +++ b/src/g_statusbar/sbar.h @@ -133,7 +133,7 @@ protected: DHUDMessage () : SourceText(NULL) {} private: - TObjPtr Next; + TObjPtr Next; DWORD SBarID; char *SourceText; @@ -415,7 +415,7 @@ private: void DrawConsistancy () const; void DrawWaiting () const; - TObjPtr Messages[NUM_HUDMSGLAYERS]; + TObjPtr Messages[NUM_HUDMSGLAYERS]; bool ShowLog; }; diff --git a/src/intermission/intermission.h b/src/intermission/intermission.h index f0b423150c..f8923eb381 100644 --- a/src/intermission/intermission.h +++ b/src/intermission/intermission.h @@ -285,7 +285,7 @@ class DIntermissionController : public DObject HAS_OBJECT_POINTERS FIntermissionDescriptor *mDesc; - TObjPtr mScreen; + TObjPtr mScreen; bool mDeleteDesc; bool mFirst; bool mAdvance, mSentAdvance; diff --git a/src/m_cheat.cpp b/src/m_cheat.cpp index 652385df28..ab937dc3e1 100644 --- a/src/m_cheat.cpp +++ b/src/m_cheat.cpp @@ -628,7 +628,7 @@ class DSuicider : public DThinker DECLARE_CLASS(DSuicider, DThinker) HAS_OBJECT_POINTERS; public: - TObjPtr Pawn; + TObjPtr Pawn; void Tick() { diff --git a/src/menu/menu.h b/src/menu/menu.h index 0b6b55ea26..5c40b7f7b7 100644 --- a/src/menu/menu.h +++ b/src/menu/menu.h @@ -262,7 +262,7 @@ public: MOUSE_Release }; - TObjPtr mParentMenu; + TObjPtr mParentMenu; bool mMouseCapture; bool mBackbuttonSelected; bool DontDim; diff --git a/src/p_acs.cpp b/src/p_acs.cpp index e2070083df..e912a87691 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -1383,7 +1383,7 @@ private: double WatchD, LastD; int Special; int Args[5]; - TObjPtr Activator; + TObjPtr Activator; line_t *Line; bool LineSide; bool bCeiling; @@ -2879,7 +2879,7 @@ IMPLEMENT_POINTERS_START(DACSThinker) IMPLEMENT_POINTER(Scripts) IMPLEMENT_POINTERS_END -TObjPtr DACSThinker::ActiveThinker; +TObjPtr DACSThinker::ActiveThinker; DACSThinker::DACSThinker () : DThinker(STAT_SCRIPTS) diff --git a/src/p_acs.h b/src/p_acs.h index dae4103ca5..154c53ea8a 100644 --- a/src/p_acs.h +++ b/src/p_acs.h @@ -895,7 +895,7 @@ protected: int *pc; EScriptState state; int statedata; - TObjPtr activator; + TObjPtr activator; line_t *activationline; bool backSide; FFont *activefont; @@ -955,7 +955,7 @@ public: typedef TMap ScriptMap; ScriptMap RunningScripts; // Array of all synchronous scripts - static TObjPtr ActiveThinker; + static TObjPtr ActiveThinker; void DumpScriptStatus(); void StopScriptsFor (AActor *actor); diff --git a/src/p_pspr.h b/src/p_pspr.h index 130e27ce2c..0fc5674c39 100644 --- a/src/p_pspr.h +++ b/src/p_pspr.h @@ -90,8 +90,8 @@ private: void Tick(); public: // must be public to be able to generate the field export tables. Grrr... - TObjPtr Caller; - TObjPtr Next; + TObjPtr Caller; + TObjPtr Next; player_t *Owner; FState *State; int Sprite; diff --git a/src/p_pusher.cpp b/src/p_pusher.cpp index 5190b5ced0..af63467106 100644 --- a/src/p_pusher.cpp +++ b/src/p_pusher.cpp @@ -66,7 +66,7 @@ public: protected: EPusher m_Type; - TObjPtr m_Source;// Point source if point pusher + TObjPtr 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 diff --git a/src/p_scroll.cpp b/src/p_scroll.cpp index 8dcf18a53f..d74c6273f2 100644 --- a/src/p_scroll.cpp +++ b/src/p_scroll.cpp @@ -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 m_Interpolations[3]; + TObjPtr m_Interpolations[3]; private: DScroller () diff --git a/src/p_spec.h b/src/p_spec.h index 930ae51434..2dad6fb097 100644 --- a/src/p_spec.h +++ b/src/p_spec.h @@ -254,8 +254,8 @@ protected: double m_CeilingTarget; int m_Crush; bool m_Hexencrush; - TObjPtr m_Interp_Ceiling; - TObjPtr m_Interp_Floor; + TObjPtr m_Interp_Ceiling; + TObjPtr m_Interp_Floor; private: DPillar (); @@ -595,8 +595,8 @@ protected: double m_FloorDestDist; double m_CeilingDestDist; double m_Speed; - TObjPtr m_Interp_Ceiling; - TObjPtr m_Interp_Floor; + TObjPtr m_Interp_Ceiling; + TObjPtr m_Interp_Floor; void StartFloorSound (); diff --git a/src/p_user.cpp b/src/p_user.cpp index 9b65b559f8..bcf816ebd0 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -3157,7 +3157,7 @@ void P_UnPredictPlayer () APlayerPawn *act = player->mo; AActor *savedcamera = player->camera; - TObjPtr InvSel = act->InvSel; + TObjPtr InvSel = act->InvSel; int inventorytics = player->inventorytics; *player = PredictionPlayerBackup; diff --git a/src/po_man.h b/src/po_man.h index 34a735f058..53ebda61ee 100644 --- a/src/po_man.h +++ b/src/po_man.h @@ -22,7 +22,7 @@ protected: int m_PolyObj; double m_Speed; double m_Dist; - TObjPtr m_Interpolation; + TObjPtr 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 specialdata; // pointer to a thinker, if the poly is moving - TObjPtr interpolation; + TObjPtr specialdata; // pointer to a thinker, if the poly is moving + TObjPtr interpolation; FPolyObj(); DInterpolation *SetInterpolation(); diff --git a/src/portal.h b/src/portal.h index 0f2e470689..e2b3a9f7fe 100644 --- a/src/portal.h +++ b/src/portal.h @@ -227,7 +227,7 @@ struct FSectorPortal sector_t *mDestination; DVector2 mDisplacement; double mPlaneZ; - TObjPtr mSkybox; + TObjPtr mSkybox; bool MergeAllowed() const { diff --git a/src/r_data/r_interpolate.h b/src/r_data/r_interpolate.h index bcb584d022..cc0ed8bbce 100644 --- a/src/r_data/r_interpolate.h +++ b/src/r_data/r_interpolate.h @@ -15,8 +15,8 @@ class DInterpolation : public DObject DECLARE_ABSTRACT_CLASS(DInterpolation, DObject) HAS_OBJECT_POINTERS - TObjPtr Next; - TObjPtr Prev; + TObjPtr Next; + TObjPtr Prev; protected: int refcount; @@ -43,7 +43,7 @@ public: struct FInterpolator { - TObjPtr Head; + TObjPtr Head; bool didInterp; int count; diff --git a/src/r_data/r_translate.cpp b/src/r_data/r_translate.cpp index e8ffda7ef7..f8820b0df3 100644 --- a/src/r_data/r_translate.cpp +++ b/src/r_data/r_translate.cpp @@ -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; diff --git a/src/r_defs.h b/src/r_defs.h index 2c1a7cfcbe..99203c1482 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -975,7 +975,7 @@ public: PalEntry SpecialColors[5]; - TObjPtr SoundTarget; + TObjPtr SoundTarget; short special; short lightlevel; @@ -996,9 +996,9 @@ public: int terrainnum[2]; // thinker_t for reversable actions - TObjPtr floordata; // jff 2/22/98 make thinkers on - TObjPtr ceilingdata; // floors, ceilings, lighting, - TObjPtr lightingdata; // independent of one another + TObjPtr floordata; // jff 2/22/98 make thinkers on + TObjPtr ceilingdata; // floors, ceilings, lighting, + TObjPtr lightingdata; // independent of one another enum { @@ -1007,7 +1007,7 @@ public: CeilingScroll, FloorScroll }; - TObjPtr interpolations[4]; + TObjPtr 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 SecActTarget; + TObjPtr 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 interpolation; + TObjPtr interpolation; //int Light; }; diff --git a/src/r_utility.h b/src/r_utility.h index 71414df442..dfea0fe33c 100644 --- a/src/r_utility.h +++ b/src/r_utility.h @@ -108,7 +108,7 @@ extern void R_ClearPastViewer (AActor *actor); struct FCanvasTextureInfo { FCanvasTextureInfo *Next; - TObjPtr Viewpoint; + TObjPtr Viewpoint; FCanvasTexture *Texture; FTextureID PicNum; int FOV; diff --git a/src/s_sndseq.cpp b/src/s_sndseq.cpp index af3f3617b3..f8242717da 100644 --- a/src/s_sndseq.cpp +++ b/src/s_sndseq.cpp @@ -126,7 +126,7 @@ public: } private: DSeqActorNode() {} - TObjPtr m_Actor; + TObjPtr m_Actor; }; class DSeqPolyNode : public DSeqNode diff --git a/src/s_sndseq.h b/src/s_sndseq.h index e77df22719..c392f11783 100644 --- a/src/s_sndseq.h +++ b/src/s_sndseq.h @@ -55,8 +55,8 @@ protected: int m_ModeNum; TArray m_SequenceChoices; - TObjPtr m_ChildSeqNode; - TObjPtr m_ParentSeqNode; + TObjPtr m_ChildSeqNode; + TObjPtr m_ParentSeqNode; private: static DSeqNode *SequenceListHead;