Skip to content

Commit 4ca3891

Browse files
committed
Implement FloatyBuoy0x58 and FloatyKajak0x64
1 parent 4e7bcfa commit 4ca3891

16 files changed

Lines changed: 382 additions & 40 deletions

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ add_library(goldp SHARED
215215
GolDP/src/gdbmodelindexarray0xc.cpp
216216
GolDP/src/greyfalconnode0x1c.cpp
217217
GolDP/src/boundingvolume0x64.cpp
218+
GolDP/src/floatybuoy0x58.cpp
219+
GolDP/src/floatykajak0x64.cpp
218220
util/decomp.cpp
219221
$<TARGET_OBJECTS:common_goldp>
220222
)

GolDP/include/floatybarge0x4c.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// SIZE 0x4c
55
class FloatyBarge0x4c : public FloatyPontoon0x4c {
66
public:
7-
undefined4 VTable0x4c(
7+
void VTable0x4c(
88
undefined4* p_position,
99
LegoFloat p_width,
1010
LegoFloat p_height,

GolDP/include/floatyboat0x28.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ class FloatyBoat0x28 {
2727
virtual void VTable0x30(const GolVec3& p_src, GolVec3* p_dest) const; // vtable+0x30
2828
virtual void VTable0x34(const GolVec3& p_src, GolVec3* p_dest); // vtable+0x34
2929
virtual void VTable0x38(const GolVec3& p_src, GolVec3* p_dest) const; // vtable+0x38
30-
virtual void VTable0x3c(undefined4*); // vtable+0x3c
31-
virtual void VTable0x40(undefined4, undefined4); // vtable+0x40
32-
virtual void VTable0x44(undefined4*) const; // vtable+0x44
30+
virtual void VTable0x3c(const GolMatrix34&); // vtable+0x3c
31+
virtual void VTable0x40(const GolVec3& p_v1, const GolVec3& p_v2); // vtable+0x40
32+
virtual void VTable0x44(GolMatrix3*) const; // vtable+0x44
3333
virtual void VTable0x48(GolVec3* p_v1, GolVec3* p_v2) const; // vtable+0x48
3434

3535
void FUN_100286d0(GolVec3* p_v);
3636
LegoFloat FUN_10028710();
3737

38-
private:
38+
protected:
3939
GolVec3 m_v0; // 0x04
4040
GolVec3 m_v1; // 0x10
4141
GolVec3 m_v2; // 0x1c

GolDP/include/floatybuoy0x58.h

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#ifndef FLOATYBUOY0X58_H
2+
#define FLOATYBUOY0X58_H
3+
4+
#include "compat.h"
5+
#include "floatyboat0x28.h"
6+
#include "golmath.h"
7+
8+
// VTABLE: GOLDP 0x100571d8
9+
// SIZE 0x58
10+
class FloatyBuoy0x58 : public FloatyBoat0x28 {
11+
public:
12+
FloatyBuoy0x58();
13+
14+
void VTable0x04(GolVec3* p_v) const override; // vtable+0x04
15+
void VTable0x08(const GolVec3& p_v) override; // vtable+0x08
16+
void VTable0x2c(const GolVec3& p_add, GolVec3* p_dest) const override; // vtable+0x2c
17+
void VTable0x30(const GolVec3& p_src, GolVec3* p_dest) const override; // vtable+0x30
18+
void VTable0x34(const GolVec3& p_src, GolVec3* p_dest) override; // vtable+0x34
19+
void VTable0x38(const GolVec3& p_src, GolVec3* p_dest) const override; // vtable+0x38
20+
void VTable0x3c(const GolMatrix34&) override; // vtable+0x3c
21+
void VTable0x40(const GolVec3& p_v1, const GolVec3& p_v2) override; // vtable+0x40
22+
void VTable0x44(GolMatrix3*) const override; // vtable+0x44
23+
void VTable0x48(GolVec3* p_dest1, GolVec3* p_dest2) const override; // vtable+0x48
24+
25+
void FUN_10026b10();
26+
void FUN_10026c50(GolMatrix4* p_dest);
27+
void FUN_10026f70(const GolVec3& p_v);
28+
void FUN_10026fa0(LegoFloat p_scalar);
29+
void FUN_10026fc0(GolMatrix4* p_dest, float p_scale) const;
30+
31+
protected:
32+
GolMatrix34 m_unk0x28;
33+
};
34+
35+
#endif // FLOATYBUOY0X58_H

GolDP/include/floatykajak0x64.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#ifndef FLOATYKAJAK0x64_H
2+
#define FLOATYKAJAK0x64_H
3+
#include "decomp.h"
4+
#include "floatybuoy0x58.h"
5+
6+
// VTABLE: GOLDP 0x10056bec
7+
// SIZE 0x64
8+
class FloatyKajak0x64 : public FloatyBuoy0x58 {
9+
public:
10+
FloatyKajak0x64();
11+
12+
void FUN_1001b760(undefined4 p_arg);
13+
14+
protected:
15+
undefined4 m_unk0x58;
16+
undefined4 m_unk0x5c;
17+
undefined4 m_unk0x60;
18+
};
19+
20+
#endif // FLOATYKAJAK0x64_H

GolDP/include/floatypontoon0x4c.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class FloatyPontoon0x4c : public FloatyBoat0x28 {
3030
void VTable0x14(GolVec3* p_arg1, undefined4*) override; // vtable+0x14
3131
void VTable0x1c(WhiteFalcon0x140*) override; // vtable+0x1c
3232
undefined4 VTable0x20() override; // vtable+0x20
33-
virtual undefined4 VTable0x4c(
33+
virtual void VTable0x4c(
3434
undefined4* p_position,
3535
LegoFloat p_width,
3636
LegoFloat p_height,
@@ -40,7 +40,7 @@ class FloatyPontoon0x4c : public FloatyBoat0x28 {
4040

4141
LegoBool32 FUN_10014e50(const GolVec3* p_arg1, const GolVec3* p_arg2, GolMatrix4* p_matrix);
4242
void FUN_10014ff0(BronzeFalcon0xc8770* p_renderer);
43-
undefined4 FUN_10026fa0(LegoFloat p_arg1);
43+
void FUN_10026fa0(LegoFloat p_arg1);
4444
void FUN_10029e90(
4545
Field0x2c* p_container,
4646
LegoS32 p_index,

GolDP/include/zoweeblubberworth0xf0.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class BoundingVolume0x64;
1414
class CmbModelPart0x34;
1515
class GolFileParser;
1616
class FloatyBoat0x28;
17+
class FloatyKajak0x64;
1718
class IGdbModel0x40;
1819
class MabMaterialAnimation0x14;
1920
class MagentaRibbon0x20;
@@ -208,7 +209,7 @@ class ZoweeBlubberworth0xf0 {
208209
undefined4 m_unk0x9c; // 0x9c
209210
undefined4 m_unk0xa0; // 0xa0
210211
LegoChar* m_unk0xa4; // 0xa4
211-
undefined4 m_unk0xa8; // 0xa8
212+
FloatyKajak0x64* m_unk0xa8; // 0xa8
212213
undefined4 m_unk0xac; // 0xac
213214
undefined4 m_unk0xb0; // 0xb0
214215
GolNameTable m_unk0xb4; // 0xb4

GolDP/src/floatybarge0x4c.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ LegoBool32 FloatyPontoon0x4c::FUN_10014e50(const GolVec3* p_arg1, const GolVec3*
2525
row2 = p_arg2;
2626
}
2727

28-
GolMath::NormalizeVector3(row0, row0);
28+
GolMath::NormalizeVector3(row0, &row0);
2929

3030
row1.m_x = row0.m_z * row2->m_y - row2->m_z * row0.m_y;
3131
row1.m_y = row2->m_z * row0.m_x - row0.m_z * row2->m_x;
@@ -57,14 +57,14 @@ LegoBool32 FloatyPontoon0x4c::FUN_10014e50(const GolVec3* p_arg1, const GolVec3*
5757
}
5858

5959
// FUNCTION: GOLDP 0x10014fd0
60-
undefined4 FloatyBarge0x4c::VTable0x4c(
60+
void FloatyBarge0x4c::VTable0x4c(
6161
undefined4* p_position,
6262
LegoFloat p_width,
6363
LegoFloat p_height,
6464
LegoFloat p_maxDistanceSquared
6565
)
6666
{
67-
return FloatyPontoon0x4c::VTable0x4c(p_position, p_width, p_height, p_maxDistanceSquared);
67+
FloatyPontoon0x4c::VTable0x4c(p_position, p_width, p_height, p_maxDistanceSquared);
6868
}
6969

7070
// STUB: GOLDP 0x10014ff0

GolDP/src/floatyboat0x28.cpp

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,18 @@ void FloatyBoat0x28::VTable0x48(GolVec3* p_v1, GolVec3* p_v2) const
165165
p_v2->m_z = 1.0f;
166166
}
167167

168-
// STUB: GOLDP 0x10028810
169-
void FloatyBoat0x28::VTable0x44(undefined4*) const
168+
// FUNCTION: GOLDP 0x10028810
169+
void FloatyBoat0x28::VTable0x44(GolMatrix3* p_dest) const
170170
{
171-
// TODO
172-
STUB(0x10028810);
171+
p_dest->m_m[0][0] = 1.0f;
172+
p_dest->m_m[0][1] = 0.0f;
173+
p_dest->m_m[0][2] = 0.0f;
174+
p_dest->m_m[1][0] = 0.0f;
175+
p_dest->m_m[1][1] = 1.0f;
176+
p_dest->m_m[1][2] = 0.0f;
177+
p_dest->m_m[2][0] = 0.0f;
178+
p_dest->m_m[2][1] = 0.0f;
179+
p_dest->m_m[2][2] = 1.0f;
173180
}
174181

175182
// FUNCTION: GOLDP 0x10029920 FOLDED
@@ -179,7 +186,7 @@ void FloatyBoat0x28::VTable0x28()
179186
}
180187

181188
// FUNCTION: GOLDP 0x1002c010 FOLDED
182-
void FloatyBoat0x28::VTable0x40(undefined4, undefined4)
189+
void FloatyBoat0x28::VTable0x40(const GolVec3& p_v1, const GolVec3& p_v2)
183190
{
184191
// empty
185192
}
@@ -197,7 +204,7 @@ void FloatyBoat0x28::VTable0x24(undefined4*)
197204
}
198205

199206
// FUNCTION: GOLDP 0x1002c020 FOLDED
200-
void FloatyBoat0x28::VTable0x3c(undefined4*)
207+
void FloatyBoat0x28::VTable0x3c(const GolMatrix34&)
201208
{
202209
// empty
203210
}

0 commit comments

Comments
 (0)