diff options
author | Max <mparisi@stevens.edu> | 2020-11-06 12:36:14 -0500 |
---|---|---|
committer | Max <mparisi@stevens.edu> | 2020-11-06 12:36:14 -0500 |
commit | aef4ef49d3bca9b729c9228012419533adefef4c (patch) | |
tree | 1c110c89b3b4bbf4d1445b7548e6a6a72801d2bc /include | |
parent | 60cfed1d6cfa6e6d0270994e9b8b8fb97468a490 (diff) |
add GShierMemObject.h, and implement constructors for GSanimationObject and GSblendObject
Diffstat (limited to 'include')
-rw-r--r-- | include/GShierMemObject.h | 32 | ||||
-rw-r--r-- | include/code_801DD5C8.h | 7 |
2 files changed, 38 insertions, 1 deletions
diff --git a/include/GShierMemObject.h b/include/GShierMemObject.h new file mode 100644 index 0000000..60af7b7 --- /dev/null +++ b/include/GShierMemObject.h @@ -0,0 +1,32 @@ +#ifndef POKEREVO_GSHIERMEMOBJECT_H
+#define POKEREVO_GSHIERMEMOBJECT_H
+
+#include "code_801DAAE0.h"
+
+// TODO: determine file that defines this
+extern MEMHeapHandle lbl_8063E8F8;
+
+// Note: This is the root base class for various classes such as GScamera,
+// GSlight, GSmodel, etc. These classes are all new/deleted using an alternative set of
+// routines than the global new and delete, which we infer is defined inline here.
+
+// TODO: abstract class?
+
+class GShierMemObject
+{
+public:
+ void* operator new(size_t sz)
+ {
+ if (func_801DAB28())
+ return func_801DAC94(lbl_8063E8F8, sz);
+ else
+ return NULL;
+ }
+
+ void operator delete(void* ptr)
+ {
+ func_801DAD48(lbl_8063E8F8, ptr);
+ }
+};
+
+#endif //POKEREVO_GSHIERMEMOBJECT_H
diff --git a/include/code_801DD5C8.h b/include/code_801DD5C8.h index 2b0dc47..1b528ae 100644 --- a/include/code_801DD5C8.h +++ b/include/code_801DD5C8.h @@ -5,6 +5,8 @@ extern "C" {
#endif
+#include "GShierMemObject.h"
+
// TODO: identify data structures
// size == 0x10
@@ -25,13 +27,16 @@ struct gUnkClass8 gUnkClass8* next;
};
-struct gUnkClass7
+struct gUnkClass7 : public GShierMemObject
{
gUnkClass8* unk0; // linked list head
u16 unk4;
u16 unk6;
float unk8;
float unkC;
+
+ gUnkClass7() : unk0(NULL), unk4(0), unk6(0xC), unk8(1.0f), unkC(0.0f) { }
+
};
void func_801DD5C8(gUnkClass7* p1, float p2);
|