Skip to content

Commit e02fe23

Browse files
committed
Implement GolDPExport::VTable0x30
1 parent 326e28b commit e02fe23

11 files changed

Lines changed: 501 additions & 9 deletions

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ add_library(goldp SHARED
101101
GolDP/src/zoweeblubberworth0xf0.cpp
102102
GolDP/src/silverdune0x30.cpp
103103
GolDP/src/smallcocoon0xc.cpp
104+
GolDP/src/floatyboat0x28.cpp
105+
GolDP/src/floatypontoon0x4c.cpp
106+
GolDP/src/floatybarge0x4c.cpp
104107
GolDP/src/slatepeak0x58.cpp
105108
GolDP/src/azureridge0x38.cpp
106109
util/decomp.cpp

GolDP/include/floatybarge0x4c.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include "floatypontoon0x4c.h"
2+
3+
4+
// VTABLE: GOLDP 0x10056760
5+
// SIZE: 0x4c
6+
class FloatyBarge0x4c : public FloatyPontoon0x4c {
7+
public:
8+
undefined4 VTable0x4c(
9+
LegoFloat p_arg1,
10+
LegoFloat p_arg2,
11+
LegoFloat p_arg3,
12+
LegoFloat p_arg4
13+
) override;
14+
15+
void FUN_10014ff0(undefined4 *p_arg1);
16+
};

GolDP/include/floatyboat0x28.h

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
#ifndef FLOATYBOAT0x28_H
2+
#define FLOATYBOAT0x28_H
3+
4+
#include "decomp.h"
5+
#include "types.h"
6+
7+
// FIXME: move to dedicated header once found to be useful
8+
struct FloatyVec0xc {
9+
LegoFloat m_x;
10+
LegoFloat m_y;
11+
LegoFloat m_z;
12+
13+
FloatyVec0xc operator+(const FloatyVec0xc& p_rhs) const
14+
{
15+
FloatyVec0xc result;
16+
result.m_x = this->m_x + p_rhs.m_x;
17+
result.m_y = this->m_y + p_rhs.m_y;
18+
result.m_z = this->m_z + p_rhs.m_z;
19+
return result;
20+
}
21+
FloatyVec0xc operator-(const FloatyVec0xc& p_rhs) const
22+
{
23+
FloatyVec0xc result;
24+
result.m_x = this->m_x - p_rhs.m_x;
25+
result.m_y = this->m_y - p_rhs.m_y;
26+
result.m_z = this->m_z - p_rhs.m_z;
27+
return result;
28+
}
29+
FloatyVec0xc operator*(LegoFloat p_f) const
30+
{
31+
FloatyVec0xc result;
32+
result.m_x = m_x * p_f;
33+
result.m_y = m_y * p_f;
34+
result.m_z = m_z * p_f;
35+
return result;
36+
}
37+
FloatyVec0xc& operator+=(const FloatyVec0xc& p_rhs)
38+
{
39+
m_x += p_rhs.m_x;
40+
m_y += p_rhs.m_y;
41+
m_z += p_rhs.m_z;
42+
return *this;
43+
}
44+
FloatyVec0xc& operator*=(LegoFloat p_f)
45+
{
46+
m_x *= p_f;
47+
m_y *= p_f;
48+
m_z *= p_f;
49+
return *this;
50+
}
51+
};
52+
53+
inline FloatyVec0xc operator*(LegoFloat p_f, const FloatyVec0xc& p_rhs)
54+
{
55+
FloatyVec0xc result;
56+
result.m_x = p_f * p_rhs.m_x;
57+
result.m_y = p_f * p_rhs.m_y;
58+
result.m_z = p_f * p_rhs.m_z;
59+
return result;
60+
}
61+
62+
// VTABLE: GOLDP 0x100572e4
63+
// SIZE: 0x28
64+
class FloatyBoat0x28 {
65+
public:
66+
FloatyBoat0x28();
67+
68+
virtual void VTable0x00();
69+
virtual void VTable0x04(FloatyVec0xc* p_v) const;
70+
virtual void VTable0x08(const FloatyVec0xc& p_v);
71+
virtual void VTable0x0c(LegoFloat p_v);
72+
virtual void VTable0x10(LegoS32);
73+
virtual void VTable0x14(FloatyVec0xc* p_arg1, undefined4*);
74+
virtual LegoS32 VTable0x18();
75+
virtual void VTable0x1c(undefined4*);
76+
virtual undefined4 VTable0x20();
77+
virtual void VTable0x24(undefined4*);
78+
virtual void VTable0x28();
79+
virtual void VTable0x2c(const FloatyVec0xc& p_add, FloatyVec0xc* p_dest) const;
80+
virtual void VTable0x30(const FloatyVec0xc& p_src, FloatyVec0xc* p_dest) const;
81+
virtual void VTable0x34(const FloatyVec0xc& p_src, FloatyVec0xc* p_dest);
82+
virtual void VTable0x38(const FloatyVec0xc& p_src, FloatyVec0xc* p_dest) const;
83+
virtual void VTable0x3c(undefined4*);
84+
virtual void VTable0x40(undefined4, undefined4);
85+
virtual void VTable0x44(undefined4*) const;
86+
virtual void VTable0x48(FloatyVec0xc* p_v1, FloatyVec0xc* p_v2) const;
87+
88+
void FUN_100286d0(FloatyVec0xc* p_v);
89+
LegoFloat FUN_10028710();
90+
91+
private:
92+
FloatyVec0xc m_v0; // 0x04
93+
FloatyVec0xc m_v1; // 0x10
94+
FloatyVec0xc m_v2; // 0x1c
95+
};
96+
97+
#endif // FLOATYBOAT0x28_H

GolDP/include/floatypontoon0x4c.h

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#ifndef FLOATYPONTOON0x4C_H
2+
#define FLOATYPONTOON0x4C_H
3+
4+
#include "compat.h"
5+
#include "floatyboat0x28.h"
6+
7+
// VTABLE: GOLDP 0x10057500
8+
// SIZE: 0x4c
9+
class FloatyPontoon0x4c : public FloatyBoat0x28 {
10+
public:
11+
FloatyPontoon0x4c();
12+
13+
void VTable0x08(const FloatyVec0xc& p_v) override; // vtable+0x08
14+
void VTable0x14(FloatyVec0xc* p_arg1, undefined4*) override; // vtable+0x14
15+
void VTable0x1c(undefined4*) override; // vtable+0x1c
16+
undefined4 VTable0x20() override; // vtable+0x20
17+
virtual undefined4 VTable0x4c(
18+
LegoFloat p_arg1,
19+
LegoFloat p_arg2,
20+
LegoFloat p_arg3,
21+
LegoFloat p_arg4
22+
); // vtable+0x4c
23+
virtual void VTable0x50(); // vtable+0x50
24+
25+
undefined4 FUN_10026fa0(LegoFloat p_arg1);
26+
void FUN_10029e90(undefined4* p_arg1, LegoS32 p_arg2, undefined4 p_arg3, undefined4 p_arg4, undefined4 p_arg5);
27+
undefined4 FUN_1002a020();
28+
29+
private:
30+
LegoFloat m_unk0x28; // 0x28
31+
LegoFloat m_unk0x2c; // 0x2c
32+
LegoFloat m_unk0x30; // 0x30
33+
LegoFloat m_unk0x34; // 0x34
34+
LegoFloat m_unk0x38; // 0x38
35+
LegoFloat m_unk0x3c; // 0x3c
36+
LegoFloat m_unk0x40; // 0x40
37+
LegoFloat m_unk0x44; // 0x44
38+
undefined2 m_unk0x48; // 0x48
39+
undefined2 m_unk0x4a; // 0x4a
40+
};
41+
42+
#endif // FLOATYPONTOON0x4C_H

GolDP/include/gol.h

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

44
#include "decomp.h"
5+
#include "floatyboat0x28.h"
56
#include "goldrawstate.h"
67
#include "types.h"
78
#include "zoweeblubberworth0xf0.h"
@@ -45,7 +46,7 @@ class GolExport {
4546
virtual undefined4 VTable0x24() = 0; // vtable+0x24
4647
virtual undefined4* VTable0x28() = 0; // vtable+0x28
4748
virtual undefined4* VTable0x2c() = 0; // vtable+0x2c
48-
virtual undefined4* VTable0x30() = 0; // vtable+0x30
49+
virtual FloatyBoat0x28* VTable0x30() = 0; // vtable+0x30
4950
virtual undefined4* VTable0x34() = 0; // vtable+0x34
5051
virtual undefined4* VTable0x38() = 0; // vtable+0x38
5152
virtual void VTable0x3c(undefined4*) = 0; // vtable+0x3c

GolDP/include/goldpexport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class GolDPExport : public GolExport {
2626
undefined4 VTable0x24() override; // vtable+0x24
2727
undefined4* VTable0x28() override; // vtable+0x28
2828
undefined4* VTable0x2c() override; // vtable+0x2c
29-
undefined4* VTable0x30() override; // vtable+0x30
29+
FloatyBoat0x28* VTable0x30() override; // vtable+0x30
3030
undefined4* VTable0x34() override; // vtable+0x34
3131
undefined4* VTable0x38() override; // vtable+0x38
3232
void VTable0x3c(undefined4*) override; // vtable+0x3c

GolDP/src/floatybarge0x4c.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include "floatybarge0x4c.h"
2+
3+
// FUNCTION: GOLDP 0x10014fd0
4+
undefined4 FloatyBarge0x4c::VTable0x4c(
5+
LegoFloat p_arg1,
6+
LegoFloat p_arg2,
7+
LegoFloat p_arg3,
8+
LegoFloat p_arg4
9+
)
10+
{
11+
return FloatyPontoon0x4c::VTable0x4c(p_arg1, p_arg2, p_arg3, p_arg4);
12+
}
13+
14+
// STUB: GOLDP 0x10014ff0
15+
void FloatyBarge0x4c::FUN_10014ff0(undefined4 *p_arg1)
16+
{
17+
// TODO
18+
STUB(0x10014ff0);
19+
}

0 commit comments

Comments
 (0)