Skip to content

Commit 1a9c696

Browse files
committed
Start work on Gdb Model parsing
1 parent 828e841 commit 1a9c696

22 files changed

Lines changed: 1039 additions & 21 deletions

CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ set(GOLDP_INLINE_EXPANSION_SOURCES
122122
GolDP/src/bronzedune0x4c.cpp
123123
GolDP/src/purpleribbon0x24.cpp
124124
GolDP/src/amberhaze0x20.cpp
125+
GolDP/src/gdbvertexarray0xc.cpp
126+
GolDP/src/gdbcommonvertexarray0x1c.cpp
125127
)
126128

127129
add_library(common_goldp OBJECT ${COMMON_SOURCES})
@@ -192,6 +194,15 @@ add_library(goldp SHARED
192194
GolDP/src/softwarerenderer0x58.cpp
193195
GolDP/src/falcondunebag0x10.cpp
194196
GolDP/src/boundingshape0x2c.cpp
197+
GolDP/src/shadowwolf0xc.cpp
198+
GolDP/src/igdbmodel0x40.cpp
199+
GolDP/src/gdbvertexarray0xc.cpp
200+
GolDP/src/gdbcommonvertexarray0x1c.cpp
201+
GolDP/src/gdbvertexarraytypeone0x1c.cpp
202+
GolDP/src/gdbvertexarraytypetwo0x20.cpp
203+
GolDP/src/gdbvertexarraytypethree0x20.cpp
204+
GolDP/src/gdbvertexarraymistery0x1c.cpp
205+
GolDP/src/gdbmodel0x48.cpp
195206
util/decomp.cpp
196207
$<TARGET_OBJECTS:common_goldp>
197208
)

GolDP/include/fluffygloomkins0x118.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ class CmbModelPart0x34;
99
class AmberHaze0x20;
1010
class AmberLensBase0x120;
1111
class BoundingShape0x2c;
12+
class GdbModel0x48;
1213
class PurpleRibbon0x24;
14+
class ShadowWolf0xc;
1315

1416
// SIZE 0x118
1517
// VTABLE: GOLDP 0x1005690c
@@ -27,8 +29,8 @@ class FluffyGloomkins0x118 : public ZoweeBlubberworth0xf0 {
2729
MagentaRibbon0x20* VTable0x2c(LegoU32 p_index) override; // vtable+0x2c
2830
AmberHaze0x1c* VTable0x30(LegoU32 p_index) override; // vtable+0x30
2931
CmbModelPart0x34* VTable0x34(LegoU32 p_index) override; // vtable+0x34
30-
undefined4* VTable0x38(LegoU32 p_index) override; // vtable+0x38
31-
undefined4* VTable0x3c(LegoU32 p_index) override; // vtable+0x3c
32+
IGdbModel0x40* VTable0x38(LegoU32 p_index) override; // vtable+0x38
33+
ShadowWolf0xc* VTable0x3c(LegoU32 p_index) override; // vtable+0x3c
3234
undefined4* VTable0x40(LegoU32 p_index) override; // vtable+0x40
3335
BoundingShape0x2c* VTable0x44(LegoU32 p_index) override; // vtable+0x44
3436
undefined4* VTable0x48(LegoU32 p_index) override; // vtable+0x48
@@ -43,10 +45,10 @@ class FluffyGloomkins0x118 : public ZoweeBlubberworth0xf0 {
4345

4446
PurpleRibbon0x24* m_unk0xf0; // 0xf0
4547
AmberHaze0x20* m_unk0xf4; // 0xf4
46-
undefined4* m_unk0xf8; // 0xf8
48+
GdbModel0x48* m_unk0xf8; // 0xf8
4749
undefined4* m_unk0xfc; // 0xfc
4850
undefined4* m_unk0x100; // 0x100
49-
undefined4* m_unk0x104; // 0x104
51+
ShadowWolf0xc* m_unk0x104; // 0x104
5052
undefined4* m_unk0x108; // 0x108
5153
CmbModelPart0x34* m_unk0x10c; // 0x10c
5254
BoundingShape0x2c* m_unk0x110; // 0x110
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#ifndef GDBCOMMONVERTEXARRAY0x1C_H
2+
#define GDBCOMMONVERTEXARRAY0x1C_H
3+
4+
#include "compat.h"
5+
#include "gdbvertexarray0xc.h"
6+
7+
// VTABLE: GOLDP 0x100568d0
8+
// SIZE 0x1c
9+
class GdbCommonVertexArray0x1c : public GdbVertexArray0xc {
10+
public:
11+
GdbCommonVertexArray0x1c();
12+
~GdbCommonVertexArray0x1c() override; // vtable+0x00
13+
void VTable0x0c() override;
14+
void VTable0x34(undefined4) override;
15+
void VTable0x38() override;
16+
17+
// SYNTHETIC: GOLDP 0x10016f40
18+
// GdbCommonVertexArray0x1c::`scalar deleting destructor'
19+
20+
protected:
21+
GolVec2* m_unk0x0c; // 0x0c
22+
undefined4* m_unk0x10; // 0x10
23+
undefined4 m_unk0x14; // 0x14
24+
undefined4* m_unk0x18; // 0x18
25+
};
26+
27+
#endif // GDBCOMMONVERTEXARRAY0x1C_H

GolDP/include/gdbmodel0x48.h

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#ifndef GDBMODEL0x48_H
2+
#define GDBMODEL0x48_H
3+
4+
#include "compat.h"
5+
#include "decomp.h"
6+
#include "igdbmodel0x40.h"
7+
8+
class GdbVertexArray0xc;
9+
10+
// VTABLE: GOLDP 0x100563fc
11+
// SIZE 0x48
12+
class GdbModel0x48 : public IGdbModel0x40 {
13+
public:
14+
enum {
15+
e_vertexType1 = 1,
16+
e_vertexType2 = 2,
17+
e_vertexType3 = 3,
18+
};
19+
20+
GdbModel0x48();
21+
~GdbModel0x48() override; // vtable+0x20
22+
23+
void VTable0x0c(GolFileParser& p_parser) override; // vtable+0x0c
24+
void VTable0x10(undefined4*) override; // vtable+0x10
25+
void VTable0x14(undefined4*) override; // vtable+0x14
26+
void VTable0x18(undefined4, undefined2, undefined4, undefined4, undefined4, undefined4) override; // vtable+0x18
27+
void VTable0x1c(undefined4 p_arg1, const LegoChar* p_name, LegoBool32 p_binary) override; // vtable+0x1c
28+
void VTable0x24() override; // vtable+0x24
29+
30+
// SYNTHETIC: GOLDP 0x100178e0
31+
// GdbModel0x48::`vector deleting destructor'
32+
33+
private:
34+
GdbVertexArray0xc* m_unk0x40; // 0x44
35+
undefined m_unk0x44[0x48 - 0x44]; // 0x44
36+
};
37+
38+
#endif // GDBMODEL0x48_H

GolDP/include/gdbvertexarray0xc.h

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#ifndef GDBVERTEXARRAY0xC_H
2+
#define GDBVERTEXARRAY0xC_H
3+
4+
#include "decomp.h"
5+
#include "types.h"
6+
7+
class GolFileParser;
8+
struct GolVec2;
9+
struct GolVec3;
10+
struct ColorRGBA;
11+
12+
// VTABLE: GOLDP 0x100576a8
13+
// SIZE 0xc
14+
class GdbVertexArray0xc {
15+
public:
16+
GdbVertexArray0xc();
17+
virtual ~GdbVertexArray0xc(); // vtable+0x00
18+
virtual void VTable0x04(LegoU16 p_count); // vtable+0x04
19+
virtual void VTable0x08(GolFileParser& p_parser); // vtable+0x08
20+
virtual void VTable0x0c(); // vtable+0x0c
21+
virtual void VTable0x10(); // vtable+0x10
22+
virtual void VTable0x14(LegoU32 p_index, GolVec3* p_dest); // vtable+0x14
23+
virtual void VTable0x18(LegoU32 p_index, GolVec2* p_dest); // vtable+0x18
24+
virtual void VTable0x1c(LegoU32 p_index, GolVec3* p_dest); // vtable+0x1c
25+
virtual void VTable0x20(LegoU32 p_index, ColorRGBA* p_dest); // vtable+0x20
26+
virtual void VTable0x24(LegoU32 p_index, const GolVec3&); // vtable+0x24
27+
virtual void VTable0x28(LegoU32 p_index, const GolVec2&); // vtable+0x28
28+
virtual void VTable0x2c(LegoU32 p_index, const GolVec3&); // vtable+0x2c
29+
virtual void VTable0x30(LegoU32 p_index, const ColorRGBA&); // vtable+0x30
30+
virtual void VTable0x34(undefined4); // vtable+0x34
31+
virtual void VTable0x38(); // vtable+0x38
32+
33+
// SYNTHETIC: GOLDP 0x1002be20
34+
// GdbVertexArray0xc::`scalar deleting destructor'
35+
36+
protected:
37+
LegoU16 m_unk0x04; // 0x04
38+
undefined2 m_unk0x06; // 0x06
39+
GolVec3* m_unk0x08; // 0x08
40+
};
41+
//
42+
// // SIZE 0x1c
43+
// class GdbVertexArrayTypeOne0x1c : public GdbCommonVertexArray0x1c {
44+
// public:
45+
// GdbVertexArrayTypeOne0x1c();
46+
// };
47+
//
48+
// // SIZE 0x20
49+
// class GdbVertexArrayTypeTwo0x20 : public GdbCommonVertexArray0x1c{
50+
// public:
51+
// GdbVertexArrayTypeTwo0x20();
52+
// };
53+
//
54+
// // SIZE 0x20
55+
// class GdbVertexArrayTypeThree0x20 : public GdbVertexArrayTypeTwo0x20 {
56+
// public:
57+
// GdbVertexArrayTypeThree0x20();
58+
// };
59+
60+
#endif // GDBVERTEXARRAY0XC_H
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#ifndef GDBVERTEXARRAYMISTERY0x1C_H
2+
#define GDBVERTEXARRAYMISTERY0x1C_H
3+
4+
#include "compat.h"
5+
#include "gdbcommonvertexarray0x1c.h"
6+
7+
// VTABLE: GOLDP 0x100567b4
8+
// SIZE: 0x1c
9+
class GdbVertexArrayMistery0x1c : public GdbCommonVertexArray0x1c {
10+
public:
11+
GdbVertexArrayMistery0x1c();
12+
13+
void VTable0x04(LegoU16 p_count) override; // vtable+0x04
14+
void VTable0x08(GolFileParser& p_parser) override; // vtable+0x08
15+
void VTable0x18(LegoU32 p_index, GolVec2* p_dest) override; // vtable+0x18
16+
void VTable0x20(LegoU32 p_index, ColorRGBA* p_dest) override; // vtable+0x20
17+
void VTable0x28(LegoU32 p_index, const GolVec2&) override; // vtable+0x28
18+
19+
// SYNTHETIC: GOLDP 0x10016af0 FOLDED
20+
// GdbVertexArrayTypeTwo0x20::`scalar deleting destructor'
21+
};
22+
23+
#endif // GDBVERTEXARRAYMISTERY0x1C_H
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#ifndef GDBVERTEXARRAYTYPEONE0x1C_H
2+
#define GDBVERTEXARRAYTYPEONE0x1C_H
3+
4+
#include "compat.h"
5+
#include "gdbcommonvertexarray0x1c.h"
6+
7+
struct GolVec2;
8+
struct ColorRGBA;
9+
10+
// VTABLE: GOLDP 0x10056388
11+
// SIZE: 0x1c
12+
class GdbVertexArrayTypeOne0x1c : public GdbCommonVertexArray0x1c {
13+
public:
14+
GdbVertexArrayTypeOne0x1c();
15+
16+
void VTable0x04(LegoU16 p_count) override; // vtable+0x04
17+
void VTable0x08(GolFileParser& p_parser) override; // vtable+0x08
18+
void VTable0x18(LegoU32 p_index, GolVec2* p_dest) override; // vtable+0x18
19+
void VTable0x20(LegoU32 p_index, ColorRGBA* p_dest) override; // vtable+0x20
20+
void VTable0x28(LegoU32 p_index, const GolVec2& p_arg2) override; // vtable+0x28
21+
void VTable0x30(LegoU32 p_index, const ColorRGBA&) override; // vtable+0x30
22+
23+
// SYNTHETIC: GOLDP 0x10005fb0
24+
// GdbVertexArrayTypeOne0x1c::~GdbVertexArrayTypeOne0x1c
25+
26+
// SYNTHETIC: GOLDP 0x10016af0 FOLDED
27+
// GdbVertexArrayTypeOne0x1c::`scalar deleting destructor'
28+
};
29+
30+
#endif // GDBVERTEXARRAYTYPEONE0x1C_H
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#ifndef GDBVERTEXARRAYTYPETHREE0x20_H
2+
#define GDBVERTEXARRAYTYPETHREE0x20_H
3+
4+
#include "compat.h"
5+
#include "gdbvertexarraytypetwo0x20.h"
6+
7+
// VTABLE: GOLDP 0x10056858
8+
// SIZE: 0x20
9+
class GdbVertexArrayTypeThree0x20 : public GdbVertexArrayTypeTwo0x20 {
10+
public:
11+
GdbVertexArrayTypeThree0x20();
12+
~GdbVertexArrayTypeThree0x20() override; // vtable+0x00
13+
14+
void VTable0x04(LegoU16 p_count) override; // vtable+0x04
15+
void VTable0x08(GolFileParser& p_parser) override; // vtable+0x08
16+
void VTable0x10() override; // vtable+0x2c
17+
18+
// SYNTHETIC: GOLDP 0x10016af0 FOLDED
19+
// GdbVertexArrayTypeTwo0x20::`scalar deleting destructor'
20+
};
21+
22+
#endif // GDBVERTEXARRAYTYPETHREE0x20_H
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#ifndef GDBVERTEXARRAYTYPETWO0x20_H
2+
#define GDBVERTEXARRAYTYPETWO0x20_H
3+
4+
#include "compat.h"
5+
#include "gdbcommonvertexarray0x1c.h"
6+
7+
// VTABLE: GOLDP 0x10056894
8+
// SIZE: 0x20
9+
class GdbVertexArrayTypeTwo0x20 : public GdbCommonVertexArray0x1c {
10+
public:
11+
GdbVertexArrayTypeTwo0x20();
12+
13+
void VTable0x04(LegoU16 p_count) override; // vtable+0x04
14+
void VTable0x08(GolFileParser& p_parser) override; // vtable+0x08
15+
void VTable0x0c() override; // vtable+0x0c
16+
void VTable0x18(LegoU32 p_index, GolVec2* p_dest) override; // vtable+0x18
17+
void VTable0x1c(LegoU32 p_index, GolVec3* p_dest) override; // vtable+0x1c
18+
void VTable0x20(LegoU32 p_index, ColorRGBA* p_dest) override; // vtable+0x20
19+
void VTable0x28(LegoU32 p_index, const GolVec2&) override; // vtable+0x28
20+
void VTable0x2c(LegoU32 p_index, const GolVec3&) override; // vtable+0x2c
21+
void VTable0x30(LegoU32 p_index, const ColorRGBA&) override; // vtable+0x30
22+
23+
// SYNTHETIC: GOLDP 0x10016f60 FOLDED
24+
// GdbVertexArrayTypeTwo0x20::~GdbVertexArrayTypeTwo0x20
25+
26+
// SYNTHETIC: GOLDP 0x10016af0 FOLDED
27+
// GdbVertexArrayTypeTwo0x20::`scalar deleting destructor'
28+
29+
protected:
30+
GolVec3* m_unk0x1c; // 0x1c
31+
};
32+
33+
#endif // GDBVERTEXARRAYTYPETWO0x20_H

GolDP/include/igdbmodel0x40.h

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#ifndef IGDBMODEL0x40_H
2+
#define IGDBMODEL0x40_H
3+
4+
#include "decomp.h"
5+
#include "golmath.h"
6+
#include "shadowwolf0xc.h"
7+
#include "types.h"
8+
9+
class GolFileParser;
10+
struct GolVec3;
11+
12+
class GdbVertexArray0xc;
13+
14+
// VTABLE: GOLDP 0x10057224
15+
// SIZE 0x40
16+
class IGdbModel0x40 {
17+
public:
18+
IGdbModel0x40();
19+
20+
virtual void VTable0x00(GolFileParser& p_parser); // vtable+0x00
21+
virtual void VTable0x04(undefined4*); // vtable+0x04
22+
virtual void VTable0x08(undefined4*); // vtable+0x08
23+
virtual void VTable0x0c(GolFileParser& p_parser) = 0; // vtable+0x0c
24+
virtual void VTable0x10(undefined4*) = 0; // vtable+0x10
25+
virtual void VTable0x14(undefined4*); // vtable+0x14
26+
virtual void VTable0x18(undefined4, undefined2, undefined4, undefined4, undefined4, undefined4) = 0; // vtable+0x18
27+
virtual void VTable0x1c(undefined4 p_arg1, const LegoChar* p_name, LegoBool32 p_binary); // vtable+0x1c
28+
virtual ~IGdbModel0x40(); // vtable+0x20
29+
virtual void VTable0x24(); // vtable+0x24
30+
virtual void VTable0x28(undefined4*); // vtable+0x28
31+
virtual void VTable0x2c(undefined4, undefined4); // vtable+0x2c
32+
virtual void VTable0x30(undefined4*); // vtable+0x30
33+
virtual void VTable0x34(undefined4); // vtable+0x34
34+
virtual void VTable0x38(GolVec3*, LegoFloat*, LegoFloat); // vtable+0x38
35+
virtual void VTable0x3c(undefined4); // vtable+0x3c
36+
virtual void VTable0x40(undefined4); // vtable+0x40
37+
38+
void FUN_100272e0(undefined4, undefined4);
39+
40+
// SYNTHETIC: GOLDP 0x10027070
41+
// IGdbModel0x40::`scalar deleting destructor'
42+
43+
protected:
44+
ShadowWolf0xc m_unk0x04;
45+
GdbVertexArray0xc* m_unk0x10;
46+
undefined4 m_unk0x14;
47+
undefined4 m_unk0x18;
48+
undefined4 m_unk0x1c;
49+
undefined4 m_unk0x20;
50+
undefined4 m_unk0x24;
51+
GolVec3 m_unk0x28;
52+
LegoFloat m_unk0x34;
53+
LegoFloat m_unk0x38;
54+
LegoBool32 m_unk0x3c;
55+
};
56+
57+
#endif // IGDBMODEL0x40_H

0 commit comments

Comments
 (0)