diff options
author | Max <mparisi@stevens.edu> | 2020-11-06 20:42:51 -0500 |
---|---|---|
committer | Max <mparisi@stevens.edu> | 2020-11-06 20:42:51 -0500 |
commit | 2f182e1a106325772fa3f93c01f0d153b839d5a6 (patch) | |
tree | 82d08fc669ff375d62183cc70ced3fb73b3dcbe0 | |
parent | 2b3b7eb1888430659fd6839e220542f19b22ae3c (diff) |
add headers for GSanimationObject and GSblendObject
-rw-r--r-- | include/GSanimationObject.h | 20 | ||||
-rw-r--r-- | include/GSblendObject.h | 19 | ||||
-rw-r--r-- | include/code_801DD5C8.h | 2 | ||||
-rw-r--r-- | src/code_801DD8C0.cpp | 39 |
4 files changed, 45 insertions, 35 deletions
diff --git a/include/GSanimationObject.h b/include/GSanimationObject.h new file mode 100644 index 0000000..206acf6 --- /dev/null +++ b/include/GSanimationObject.h @@ -0,0 +1,20 @@ +#ifndef POKEREVO_GSANIMATIONOBJECT_H
+#define POKEREVO_GSANIMATIONOBJECT_H
+
+#include "GShierMemObject.h"
+#include "code_801DD5C8.h"
+
+class GSanimationObject : public GShierMemObject
+{
+protected:
+ gUnkClass8* unk0;
+ gUnkClass7* unk4;
+public:
+ GSanimationObject(gUnkClass8* list);
+ ~GSanimationObject();
+ void func_801DD9C8(float p2);
+ gUnkClass8* func_801DDA94(u16 id);
+ void func_801DDABC(u16 id, u16 p3, float p4, float p5);
+};
+
+#endif //POKEREVO_GSANIMATIONOBJECT_H
diff --git a/include/GSblendObject.h b/include/GSblendObject.h new file mode 100644 index 0000000..8d8499f --- /dev/null +++ b/include/GSblendObject.h @@ -0,0 +1,19 @@ +#ifndef POKEREVO_GSBLENDOBJECT_H
+#define POKEREVO_GSBLENDOBJECT_H
+
+#include "GSanimationObject.h"
+#include "code_801DD5C8.h"
+
+class GSblendObject : public GSanimationObject
+{
+ gUnkClass7* unk8;
+ float unkC;
+public:
+ GSblendObject(gUnkClass8* list);
+ ~GSblendObject();
+ void func_801DDC84(float p2);
+ void func_801DDE4C(u16 id, u16 p3, float p4, float p5);
+ void func_801DDEA0(u16 id, u16 p3, float p4, float p5, float p6);
+};
+
+#endif //POKEREVO_GSBLENDOBJECT_H
diff --git a/include/code_801DD5C8.h b/include/code_801DD5C8.h index dbe31c3..f105258 100644 --- a/include/code_801DD5C8.h +++ b/include/code_801DD5C8.h @@ -7,7 +7,7 @@ extern "C" { #include "GShierMemObject.h"
-// TODO: identify data structures
+// TODO: identify these data structures
// size == 0x10
struct gUnkClass9
diff --git a/src/code_801DD8C0.cpp b/src/code_801DD8C0.cpp index 9a77009..dc82f62 100644 --- a/src/code_801DD8C0.cpp +++ b/src/code_801DD8C0.cpp @@ -1,39 +1,11 @@ #include "ctorStruct.h"
-#include <SDK/mem.h>
-#include "GShierMemObject.h"
-#include "code_801DD5C8.h"
+#include "GSanimationObject.h"
+#include "GSblendObject.h"
-// TODO: C++
+// GSanimationObject and GSblendObject implementations
static ctorStruct gUnk8063F350(1, 4, 0);
-extern "C" {
-
-class GSanimationObject : public GShierMemObject
-{
-protected:
- gUnkClass8* unk0;
- gUnkClass7* unk4;
-public:
- GSanimationObject(gUnkClass8* list);
- ~GSanimationObject();
- void func_801DD9C8(float p2);
- gUnkClass8* func_801DDA94(u16 id);
- void func_801DDABC(u16 id, u16 p3, float p4, float p5);
-};
-
-class GSblendObject : public GSanimationObject
-{
- gUnkClass7* unk8;
- float unkC;
-public:
- GSblendObject(gUnkClass8* list);
- ~GSblendObject();
- void func_801DDC84(float p2);
- void func_801DDE4C(u16 id, u16 p3, float p4, float p5);
- void func_801DDEA0(u16 id, u16 p3, float p4, float p5, float p6);
-};
-
GSanimationObject::GSanimationObject(gUnkClass8* list) : unk0(list), unk4(NULL)
{
if (list)
@@ -187,7 +159,7 @@ void GSanimationObject::func_801DDABC(u16 id, u16 p3, float p4, float p5) r4->unk0 = r3;
r4->unkC = p4;
r4->unk8 = p5;
- r4->unk4 = p3 & 0xFF;
+ r4->unk4 = (u16)(p3 & 0xFF);
r4->unk6 = 0x3;
}
}
@@ -422,7 +394,7 @@ void GSblendObject::func_801DDEA0(u16 id, u16 p3, float p4, float p5, float p6) r4->unk0 = r3;
r4->unkC = p4;
r4->unk8 = p5;
- r4->unk4 = p3 & 0xFF;
+ r4->unk4 = (u16)(p3 & 0xFF);
r4->unk6 = 3;
}
}
@@ -430,4 +402,3 @@ void GSblendObject::func_801DDEA0(u16 id, u16 p3, float p4, float p5, float p6) }
}
-} //extern "C"
|