Skip to content

Commit 819fe7a

Browse files
committed
More Gdb Model updates
1 parent f3724a5 commit 819fe7a

21 files changed

Lines changed: 534 additions & 102 deletions

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ set(GOLDP_INLINE_EXPANSION_SOURCES
124124
GolDP/src/amberhaze0x20.cpp
125125
GolDP/src/gdbvertexarray0xc.cpp
126126
GolDP/src/gdbcommonvertexarray0x1c.cpp
127+
GolDP/src/igdbmodelindexarray0x8.cpp
128+
GolDP/src/gdbmodelindexarray0xc.cpp
127129
)
128130

129131
add_library(common_goldp OBJECT ${COMMON_SOURCES})
@@ -203,6 +205,8 @@ add_library(goldp SHARED
203205
GolDP/src/gdbvertexarraytypethree0x20.cpp
204206
GolDP/src/gdbvertexarraymistery0x1c.cpp
205207
GolDP/src/gdbmodel0x48.cpp
208+
GolDP/src/igdbmodelindexarray0x8.cpp
209+
GolDP/src/gdbmodelindexarray0xc.cpp
206210
util/decomp.cpp
207211
$<TARGET_OBJECTS:common_goldp>
208212
)

GolDP/include/gdbvertexarray0xc.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ struct ColorRGBA;
1414
class GdbVertexArray0xc {
1515
public:
1616
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
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) const; // vtable+0x14
23+
virtual void VTable0x18(LegoU32 p_index, GolVec2* p_dest) const; // vtable+0x18
24+
virtual void VTable0x1c(LegoU32 p_index, GolVec3* p_dest) const; // vtable+0x1c
25+
virtual void VTable0x20(LegoU32 p_index, ColorRGBA* p_dest) const; // 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
3232

3333
// SYNTHETIC: GOLDP 0x1002be20
3434
// GdbVertexArray0xc::`scalar deleting destructor'

GolDP/include/gdbvertexarraymistery0x1c.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ class GdbVertexArrayMistery0x1c : public GdbCommonVertexArray0x1c {
1010
public:
1111
GdbVertexArrayMistery0x1c();
1212

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
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) const override; // vtable+0x18
16+
void VTable0x20(LegoU32 p_index, ColorRGBA* p_dest) const override; // vtable+0x20
17+
void VTable0x28(LegoU32 p_index, const GolVec2&) override; // vtable+0x28
1818

1919
// SYNTHETIC: GOLDP 0x10005fb0 FOLDED
2020
// GdbVertexArrayMistery0x1c::~GdbVertexArrayMistery0x1c

GolDP/include/gdbvertexarraytypeone0x1c.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ class GdbVertexArrayTypeOne0x1c : public GdbCommonVertexArray0x1c {
1313
public:
1414
GdbVertexArrayTypeOne0x1c();
1515

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
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) const override; // vtable+0x18
19+
void VTable0x20(LegoU32 p_index, ColorRGBA* p_dest) const 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
2222

2323
// SYNTHETIC: GOLDP 0x10005fb0 FOLDED
2424
// GdbVertexArrayTypeOne0x1c::~GdbVertexArrayTypeOne0x1c

GolDP/include/gdbvertexarraytypetwo0x20.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ class GdbVertexArrayTypeTwo0x20 : public GdbCommonVertexArray0x1c {
1010
public:
1111
GdbVertexArrayTypeTwo0x20();
1212

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
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) const override; // vtable+0x18
17+
void VTable0x1c(LegoU32 p_index, GolVec3* p_dest) const override; // vtable+0x1c
18+
void VTable0x20(LegoU32 p_index, ColorRGBA* p_dest) const 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
2222

2323
// SYNTHETIC: GOLDP 0x10005fb0 FOLDED
2424
// GdbVertexArrayTypeTwo0x20::~GdbVertexArrayTypeTwo0x20

GolDP/include/igdbmodel0x40.h

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33

44
#include "decomp.h"
55
#include "golmath.h"
6+
#include "goltxtparser.h"
67
#include "shadowwolf0xc.h"
78
#include "types.h"
89

910
class GolFileParser;
1011
struct GolVec3;
12+
class IGdbModelIndexArray0x8;
1113

1214
class GdbVertexArray0xc;
1315

@@ -18,20 +20,20 @@ class IGdbModel0x40 {
1820
IGdbModel0x40();
1921

2022
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 VTable0x04(GolFileParser& p_parser); // vtable+0x04
24+
virtual void VTable0x08(GolFileParser& p_parser); // vtable+0x08
2325
virtual void VTable0x0c(GolFileParser& p_parser) = 0; // vtable+0x0c
2426
virtual void VTable0x10(GolFileParser& p_parser) = 0; // vtable+0x10
2527
virtual void VTable0x14(GolFileParser& p_parser); // vtable+0x14
2628
virtual void VTable0x18(undefined4, undefined2, undefined4, undefined4, undefined4, undefined4) = 0; // vtable+0x18
2729
virtual void VTable0x1c(undefined4 p_arg1, const LegoChar* p_name, LegoBool32 p_binary); // vtable+0x1c
2830
virtual ~IGdbModel0x40(); // vtable+0x20
2931
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
32+
virtual void VTable0x28(GdbVertexArray0xc** p_dest) const; // vtable+0x28
33+
virtual void VTable0x2c(LegoU32, LegoBool32); // vtable+0x2c
34+
virtual void VTable0x30(IGdbModelIndexArray0x8**) const; // vtable+0x30
35+
virtual void VTable0x34(LegoU32); // vtable+0x34
36+
virtual void VTable0x38(GolVec3*, LegoFloat*, LegoFloat) const; // vtable+0x38
3537
virtual void VTable0x3c(undefined4); // vtable+0x3c
3638
virtual void VTable0x40(undefined4); // vtable+0x40
3739

@@ -40,14 +42,18 @@ class IGdbModel0x40 {
4042
// SYNTHETIC: GOLDP 0x10027070
4143
// IGdbModel0x40::`scalar deleting destructor'
4244

45+
// VTABLE: GOLDP 0x100570bc
46+
// SIZE 0x1fc
47+
class GdbTxtParser : public GolTxtParser {};
48+
4349
protected:
4450
ShadowWolf0xc m_unk0x04;
4551
GdbVertexArray0xc* m_unk0x10;
46-
undefined4 m_unk0x14;
47-
undefined4 m_unk0x18;
52+
GdbVertexArray0xc* m_unk0x14;
53+
IGdbModelIndexArray0x8* m_unk0x18;
4854
undefined4 m_unk0x1c;
4955
undefined4 m_unk0x20;
50-
undefined4 m_unk0x24;
56+
LegoU32* m_unk0x24;
5157
GolVec3 m_unk0x28;
5258
LegoFloat m_unk0x34;
5359
LegoFloat m_unk0x38;
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#ifndef IGDBMODELINDEXARRAY0X8_H
2+
#define IGDBMODELINDEXARRAY0X8_H
3+
4+
#include "decomp.h"
5+
6+
class GolFileParser;
7+
8+
// VTABLE: GOLDP 0x10056dfc
9+
// SIZE 0x8
10+
class IGdbModelIndexArray0x8 {
11+
public:
12+
IGdbModelIndexArray0x8();
13+
14+
virtual ~IGdbModelIndexArray0x8(); // vtable+0x00
15+
virtual void VTable0x04(GolFileParser& p_parser) = 0; // vtable+0x04
16+
virtual void VTable0x08(); // vtable+0x08
17+
18+
// SYNTHETIC: GOLDP 0x1001d7e0
19+
// IGdbModelIndexArray0x8::`scalar deleting destructor'
20+
21+
protected:
22+
undefined4 m_unk0x04; // 0x04
23+
};
24+
25+
#endif // IGDBMODELINDEXARRAY0X8_H

GolDP/include/shadowwolf0xc.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#define SHADOWWOLF0xC_H
33

44
#include "decomp.h"
5+
#include "types.h"
6+
7+
class GolFileParser;
58

69
class ShadowWolf0xc {
710
public:
@@ -10,7 +13,9 @@ class ShadowWolf0xc {
1013

1114
void FUN_10025df0(undefined4, undefined4);
1215
void FUN_10025e60(undefined4, undefined4, undefined4);
13-
void FUN_10025f90(undefined4, undefined4);
16+
void FUN_10025f90(undefined4, GolFileParser& p_parser);
17+
18+
undefined4 GetUnk0x00() const { return m_unk0x00; }
1419

1520
protected:
1621
undefined4 m_unk0x00; // 0x00

GolDP/src/floatypontoon0x4c.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,7 @@ void FloatyPontoon0x4c::FUN_10029fa0(const GolVec3& p_arg1, LegoBool32* p_result
8888
p_result[1] = FALSE;
8989
FUN_100286d0(&position);
9090

91-
LegoFloat x = p_arg1.m_x - position.m_x;
92-
LegoFloat y = p_arg1.m_y - position.m_y;
93-
LegoFloat z = p_arg1.m_z - position.m_z;
94-
LegoFloat distanceSquared = x * x + y * y + z * z;
91+
LegoFloat distanceSquared = position.DistanceSquaredTo(p_arg1);
9592

9693
if (distanceSquared != 0.0f && distanceSquared <= m_unk0x44) {
9794
p_result[0] = TRUE;

GolDP/src/gdbmodel0x48.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include "golerror.h"
99
#include "golfileparser.h"
1010

11+
DECOMP_SIZE_ASSERT(GdbModel0x48, 0x48)
12+
1113
// FUNCTION: GOLDP 0x10006840
1214
GdbModel0x48::GdbModel0x48()
1315
{

0 commit comments

Comments
 (0)