summaryrefslogtreecommitdiff
path: root/include/pso/TObject.h
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2023-02-12 11:38:48 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2023-02-12 11:38:48 -0400
commit0d06559bcc3d60595cedcab343408589dcdb9c94 (patch)
tree669642efeb2e86d84af98336db6079ce487d89a5 /include/pso/TObject.h
parent2fdd70e4eeb6b2ac82eb8be81fd23fa61bc2baeb (diff)
TObject: Make non-function members private, and add getters, and setters
Diffstat (limited to 'include/pso/TObject.h')
-rw-r--r--include/pso/TObject.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/include/pso/TObject.h b/include/pso/TObject.h
index 8d3e6e8..9af0251 100644
--- a/include/pso/TObject.h
+++ b/include/pso/TObject.h
@@ -44,7 +44,7 @@ static inline void operator&=(object_flags &a, object_flags b) { a = a & b; };
static inline void operator|=(object_flags &a, object_flags b) { a = a | b; };
class TObject {
-public:
+private:
const char *name;
union {
object_flags flags;
@@ -73,6 +73,24 @@ public:
void *operator new (size_t size) { return alloc(size); };
void operator delete(void *ptr) { free(ptr); };
+ const char *get_name() { return this->name; };
+ object_flags get_flags() { return this->flags; };
+ u16 get_flags_u16() { return this->flags_u16; };
+ u16 get_id() { return this->id; };
+ TObject *get_prev() { return this->prev; };
+ TObject *get_next() { return this->next; };
+ TObject *get_up() { return this->up; };
+ TObject *get_down() { return this->down; };
+
+ void set_name(const char *name) { this->name = name; };
+ void set_obj_flags(object_flags flags) { this->flags = flags; };
+ void set_flags_u16(u16 flags) { flags_u16 = flags; };
+ void set_id(u16 id) { this->id = id; };
+ void set_prev(TObject *node) { prev = node; };
+ void set_next(TObject *node) { next = node; };
+ void set_up(TObject *node) { up = node; };
+ void set_down(TObject *node) { down = node; };
+
void delete_children();
void queue_destruction_for_each_node();
void run_tasks();