- 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:
parent
1cb89c6b37
commit
b8f7e305db
37 changed files with 124 additions and 140 deletions
|
|
@ -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;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue