summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/pso/TMainTask.h4
-rw-r--r--include/pso/TObject.h21
-rw-r--r--include/pso/macros.h8
3 files changed, 7 insertions, 26 deletions
diff --git a/include/pso/TMainTask.h b/include/pso/TMainTask.h
index b97192b..b73d69d 100644
--- a/include/pso/TMainTask.h
+++ b/include/pso/TMainTask.h
@@ -10,7 +10,7 @@
if (flags != old_flags) { \
TMainTask *child; \
u32 bit = 1; \
- FOREACH_NODE_NODECL_MULTI_ITER(TMainTask, main_task.down(), child, bit <<= 1) { \
+ FOREACH_NODE_NODECL_MULTI_ITER(TMainTask, main_task.m_down, child, bit <<= 1) { \
if (flags & bit) { \
child->one_prefix##_##suffix(); \
} else { \
@@ -34,7 +34,7 @@ TL_OBJECTS
TL_OBJECTS
#undef o
-class TMainTask : public TObject {
+class TMainTask : private TObject {
public:
u32 task_flags;
u32 mbr_0x20;
diff --git a/include/pso/TObject.h b/include/pso/TObject.h
index ef2cf66..1478871 100644
--- a/include/pso/TObject.h
+++ b/include/pso/TObject.h
@@ -110,9 +110,8 @@ private:
};
-protected:
+public:
const char *m_name;
-private:
union {
object_flags m_flags;
u16 m_flags_u16;
@@ -141,24 +140,6 @@ public:
void *operator new (size_t size) { return alloc(size); };
void operator delete(void *ptr) { free(ptr); };
- const char *name() { return m_name; };
- object_flags flags() { return m_flags; };
- u16 flags_u16() { return m_flags_u16; };
- u16 id() { return m_id; };
- TObject *prev() { return m_prev; };
- TObject *next() { return m_next; };
- TObject *up() { return m_up; };
- TObject *down() { return m_down; };
-
- void set_name(const char *name) { m_name = name; };
- void set_obj_flags(object_flags flags) { m_flags = flags; };
- void set_flags_u16(u16 flags) { m_flags_u16 = flags; };
- void set_id(u16 id) { m_id = id; };
- void set_prev(TObject *node) { m_prev = node; };
- void set_next(TObject *node) { m_next = node; };
- void set_up(TObject *node) { m_up = node; };
- void set_down(TObject *node) { m_down = node; };
-
void delete_children();
void queue_destruction_for_each_node();
void run_tasks();
diff --git a/include/pso/macros.h b/include/pso/macros.h
index 5901143..291a550 100644
--- a/include/pso/macros.h
+++ b/include/pso/macros.h
@@ -51,11 +51,11 @@
o(tl_fade, TL_FADE) \
o(tl_fadeafter, TL_FADEAFTER)
-#define FOREACH_NODE(type, first, varname) for (type *varname = (type *)(first); varname != NULL; varname = (type *)(varname->next()))
-#define FOREACH_NODE_NODECL(type, first, varname) for (varname = (type *)(first); varname != NULL; varname = (type *)(varname->next()))
+#define FOREACH_NODE(type, first, varname) for (type *varname = (type *)(first); varname != NULL; varname = (type *)(varname->m_next))
+#define FOREACH_NODE_NODECL(type, first, varname) for (varname = (type *)(first); varname != NULL; varname = (type *)(varname->m_next))
-#define FOREACH_NODE_MULTI_ITER(type, first, varname, ...) for (type *varname = (type *)(first); varname != NULL; varname = (type *)(varname->next()), __VA_ARGS__)
-#define FOREACH_NODE_NODECL_MULTI_ITER(type, first, varname, ...) for (varname = (type *)(first); varname != NULL; varname = (type *)(varname->next()), __VA_ARGS__)
+#define FOREACH_NODE_MULTI_ITER(type, first, varname, ...) for (type *varname = (type *)(first); varname != NULL; varname = (type *)(varname->m_next), __VA_ARGS__)
+#define FOREACH_NODE_NODECL_MULTI_ITER(type, first, varname, ...) for (varname = (type *)(first); varname != NULL; varname = (type *)(varname->m_next), __VA_ARGS__)
#define __packed__
#define WEAK_FUNC __declspec(weak)