Skip to content

Commit 1d35bce

Browse files
committed
Implement some of class returned by GolDPExport::VTable0x0c
1 parent 25e9dc3 commit 1d35bce

20 files changed

Lines changed: 576 additions & 30 deletions

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ set(GOLDP_INLINE_EXPANSION_SOURCES
111111
GolDP/src/depthbuffer0x38.cpp
112112
GolDP/src/golfont0xa0.cpp
113113
GolDP/src/bronzedune0x4c.cpp
114+
GolDP/src/purpleribbon0x24.cpp
114115
)
115116

116117
add_library(common_goldp OBJECT ${COMMON_SOURCES})
@@ -154,11 +155,14 @@ add_library(goldp SHARED
154155
GolDP/src/amberlens0x344.cpp
155156
GolDP/src/falcontextureformat.cpp
156157
GolDP/src/jadeorbit0x220.cpp
158+
GolDP/src/ddrawutil.cpp
157159
GolDP/src/jadeorbitbase0x10.cpp
158160
GolDP/src/amberhaze0x1c.cpp
159161
GolDP/src/cinderbasin0x28.cpp
160162
GolDP/src/golfontbase0x40.cpp
161163
GolDP/src/magentaribbon0x20.cpp
164+
GolDP/src/purpleribbon0x24.cpp
165+
GolDP/src/purpledune0x7c.cpp
162166
GolDP/src/whitefalcon0x140.cpp
163167
GolDP/src/whitefalconnode0x18.cpp
164168
GolDP/src/bronzefalcon0xc8770.cpp

GolDP/include/bronzedune0x4c.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
class BronzeDune0x4c : public GoldDune0x38 {
1111
public:
1212
BronzeDune0x4c();
13-
~BronzeDune0x4c() override; // vtable+0x00
14-
IPalette0x4* GetPalette() override; // vtable+0x1c
15-
void VTable0x30(undefined4*, undefined4*) override; // vtable+0x30
13+
~BronzeDune0x4c() override; // vtable+0x00
14+
IPalette0x4* GetPalette() override; // vtable+0x1c
15+
void VTable0x30(WhiteFalcon0x140& p_renderer, undefined4*) override; // vtable+0x30
1616
void VTable0x34(
17-
undefined4,
17+
WhiteFalcon0x140& p_renderer,
1818
const FalconTextureFormat& p_textureFormat,
1919
LegoU32 p_width,
2020
LegoU32 p_height

GolDP/include/bronzedunebag0xc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ class BronzeDuneBag0xc : public IPalette0x4 {
2222
void FUN_1002a120(const FalconTextureFormat& p_textureFormat);
2323
void FUN_1002a1b0();
2424

25+
bool HasEntries() const { return m_entries != NULL; }
26+
2527
// SYNTHETIC: GOLDP 0x1002a0b0
2628
// BronzeDuneBag0xc::`scalar deleting destructor'
2729

GolDP/include/ddrawutil.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#ifndef DDRAWUTIL_H
2+
#define DDRAWUTIL_H
3+
4+
#include <ddraw.h>
5+
6+
extern HRESULT LockDirectDrawSurface(
7+
LPDIRECTDRAWSURFACE4 p_surface,
8+
LPRECT p_rect,
9+
DDSURFACEDESC2* p_desc,
10+
DWORD p_flags,
11+
HANDLE p_event
12+
);
13+
14+
#endif // DDRAWUTIL_H

GolDP/include/fluffygloomkins0x118.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
class AmberLensBase0x120;
99
class BoundingShape0x2c;
10+
class PurpleRibbon0x24;
1011

1112
// SIZE 0x118
1213
// VTABLE: GOLDP 0x1005690c
@@ -38,7 +39,7 @@ class FluffyGloomkins0x118 : public ZoweeBlubberworth0xf0 {
3839
private:
3940
void FUN_10017390();
4041

41-
undefined4* m_unk0xf0; // 0xf0
42+
PurpleRibbon0x24* m_unk0xf0; // 0xf0
4243
undefined4* m_unk0xf4; // 0xf4
4344
undefined4* m_unk0xf8; // 0xf8
4445
undefined4* m_unk0xfc; // 0xfc

GolDP/include/gol.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class GolHashTable;
2020
class GolFileSource;
2121
class AmberLens0x344;
2222
class GolFontTable;
23+
class MagentaRibbon0x20;
2324
class WhiteBaffoon0x50;
2425

2526
struct GolImport {
@@ -45,7 +46,7 @@ class GolExport {
4546
public:
4647
virtual GolDrawState* VTable0x04() = 0; // vtable+0x04
4748
virtual ZoweeBlubberworth0xf0* VTable0x08() = 0; // vtable+0x08
48-
virtual undefined4* VTable0x0c() = 0; // vtable+0x0c
49+
virtual MagentaRibbon0x20* VTable0x0c() = 0; // vtable+0x0c
4950
virtual undefined4* VTable0x10() = 0; // vtable+0x10
5051
virtual undefined4* VTable0x14() = 0; // vtable+0x14
5152
virtual undefined4* VTable0x18() = 0; // vtable+0x18

GolDP/include/golddune0x38.h

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,23 @@
33

44
#include "silverdune0x30.h"
55

6+
class WhiteFalcon0x140;
7+
68
// VTABLE: GOLDP 0x1005766c
79
// SIZE 0x38
810
class GoldDune0x38 : public SilverDune0x30 {
911
public:
12+
enum {
13+
c_unk0x36Bit5 = 0x20,
14+
c_unk0x36Bit7 = 0x80,
15+
c_unk0x36Bit10 = 0x400,
16+
c_unk0x36Bit11 = 0x800,
17+
};
1018
GoldDune0x38();
1119

12-
virtual void VTable0x30(undefined4*, undefined4*); // vtable+0x30
20+
virtual void VTable0x30(WhiteFalcon0x140& p_renderer, undefined4*); // vtable+0x30
1321
virtual void VTable0x34(
14-
undefined4,
22+
WhiteFalcon0x140& p_renderer,
1523
const FalconTextureFormat& p_textureFormat,
1624
LegoU32 p_width,
1725
LegoU32 p_height
@@ -25,9 +33,9 @@ class GoldDune0x38 : public SilverDune0x30 {
2533
// GoldDune0x38::`scalar deleting destructor'
2634

2735
protected:
28-
undefined m_unk0x30[0x34 - 0x30]; // 0x30
29-
undefined2 m_unk0x34; // 0x34
30-
LegoU16 m_unk0x36; // 0x36
36+
ColorRGBA m_unk0x30; // 0x30
37+
undefined2 m_unk0x34; // 0x34
38+
LegoU16 m_unk0x36; // 0x36
3139
};
3240

3341
#endif // GOLDDUNE0x38_H

GolDP/include/goldpexport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class GolDPExport : public GolExport {
1717

1818
GolDrawState* VTable0x04() override; // vtable+0x04
1919
ZoweeBlubberworth0xf0* VTable0x08() override; // vtable+0x08
20-
undefined4* VTable0x0c() override; // vtable+0x0c
20+
MagentaRibbon0x20* VTable0x0c() override; // vtable+0x0c
2121
undefined4* VTable0x10() override; // vtable+0x10
2222
undefined4* VTable0x14() override; // vtable+0x14
2323
undefined4* VTable0x18() override; // vtable+0x18

GolDP/include/magentaribbon0x20.h

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#include "golnametable.h"
55

66
class BronzeFalcon0xc8770;
7+
class FalconTextureFormat;
8+
class GoldDune0x38;
79

810
// VTABLE: GOLDP 0x100575ac
911
// SIZE 0x20
@@ -13,26 +15,32 @@ class MagentaRibbon0x20 : public GolNameTable {
1315
~MagentaRibbon0x20() override; // vtable+0x00
1416
void Clear() override; // vtable+0x08
1517

16-
virtual void VTable0x0c(); // vtable+0x0c
17-
virtual void VTable0x10(); // vtable+0x10
18-
virtual void VTable0x14() = 0; // vtable+0x14
19-
virtual void VTable0x18() = 0; // vtable+0x18
18+
virtual void VTable0x0c(); // vtable+0x0c
19+
virtual void VTable0x10(); // vtable+0x10
20+
virtual void VTable0x14() = 0; // vtable+0x14
21+
virtual void VTable0x18(
22+
LegoU32 p_index,
23+
const FalconTextureFormat& p_textureFormat,
24+
LegoU32 p_width,
25+
LegoU32 p_height
26+
) = 0; // vtable+0x18
2027
virtual void VTable0x1c(BronzeFalcon0xc8770* p_renderer, LegoU32 p_capacity); // vtable+0x1c
2128
virtual void VTable0x20(BronzeFalcon0xc8770* p_renderer, undefined4 p_unk0x08, LegoU32 p_capacity); // vtable+0x20
2229
virtual void VTable0x24(
2330
BronzeFalcon0xc8770* p_renderer,
2431
const LegoChar* p_fileName,
2532
LegoBool32 p_binary
2633
); // vtable+0x24
27-
virtual undefined4 VTable0x28(undefined4 p_index) = 0; // vtable+0x28
34+
virtual GoldDune0x38* VTable0x28(LegoU32 p_index) = 0; // vtable+0x28
2835

2936
// SYNTHETIC: GOLDP 0x1002b500
3037
// MagentaRibbon0x20::`scalar deleting destructor'
3138

3239
MagentaRibbon0x20* GetNext() const { return m_next; }
3340
void SetNext(MagentaRibbon0x20* p_next) { m_next = p_next; }
41+
LegoU32 GetItemCount() const { return m_numItems; }
3442

35-
private:
43+
protected:
3644
BronzeFalcon0xc8770* m_renderer; // 0x0c
3745
MagentaRibbon0x20* m_next; // 0x10
3846
undefined4 m_unk0x14; // 0x14

GolDP/include/purpledune0x7c.h

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#ifndef PURPLEDUNE0x7C_H
2+
#define PURPLEDUNE0x7C_H
3+
4+
#include "bronzedunebag0xc.h"
5+
#include "falcontextureformat.h"
6+
#include "golddune0x38.h"
7+
8+
#include <ddraw.h>
9+
10+
class IPalette0x4;
11+
12+
// VTABLE: GOLDP 0x1005681c
13+
// SIZE 0x7c
14+
class PurpleDune0x7c : public GoldDune0x38 {
15+
public:
16+
PurpleDune0x7c();
17+
~PurpleDune0x7c(); // vtable+0x00
18+
19+
void LockPixels(LegoU8** p_pixels, LegoU32* p_pitch, LegoU32 p_flags) override; // vtable+0x04
20+
void UnlockPixels() override; // vtable+0x08
21+
IPalette0x4* GetPalette() override; // vtable+0x1c
22+
void VTable0x30(WhiteFalcon0x140& p_renderer, undefined4*) override; // vtable+0x30
23+
void VTable0x34(
24+
WhiteFalcon0x140& p_renderer,
25+
const FalconTextureFormat& p_textureFormat,
26+
LegoU32 p_width,
27+
LegoU32 p_height
28+
) override; // vtable+0x34
29+
void VTable0x38() override; // vtable+0x38
30+
31+
void FUN_10015fb0();
32+
void FUN_10016100();
33+
void FUN_10016380();
34+
void FUN_10016440(BronzeFalcon0xc8770& p_renderer);
35+
void FUN_10016460(BronzeFalcon0xc8770& p_renderer);
36+
37+
// SYNTHETIC: GOLDP 0x10004aa0
38+
// PurpleDune0x7c::`vector deleting destructor'
39+
40+
private:
41+
// SIZE 0x18
42+
struct UnkField0x44 {
43+
// Unsure about size, might be a union
44+
LegoU8* m_pixels; // 0x00
45+
LegoU32 m_pitch; // 0x04
46+
undefined m_unk0x08[0x18 - 0x00]; // 0x08
47+
};
48+
49+
undefined4 m_unk0x38; // 0x38
50+
undefined4 m_unk0x3c; // 0x3c
51+
IPalette0x4* m_unk0x40; // 0x40
52+
UnkField0x44* m_unk0x44; // 0x44
53+
LPDIRECTDRAWSURFACE4 m_surface; // 0x48
54+
undefined4* m_unk0x4c; // 0x4c
55+
BronzeDuneBag0xc m_unk0x50; // 0x50
56+
FalconTextureFormat m_textureFormat2; // 0x5c
57+
undefined4 m_unk0x74; // 0x74
58+
undefined4 m_unk0x78; // 0x78
59+
};
60+
61+
#endif // PURPLEDUNE0x7C_H

0 commit comments

Comments
 (0)