Skip to content

Commit d7ffde3

Browse files
authored
CrimsonSun0xa4 (isledecomp#255)
1 parent 4200fa3 commit d7ffde3

12 files changed

Lines changed: 690 additions & 51 deletions

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ add_executable(legoracers WIN32
280280
LEGORacers/src/menumanager.cpp
281281
LEGORacers/src/aquacoral0x37b8.cpp
282282
LEGORacers/src/stackoflegou16.cpp
283+
LEGORacers/src/crimsonsun0xa4entry.cpp
283284
LEGORacers/src/crimsonsun0xa4.cpp
284285
LEGORacers/src/cutscenevent0xe4.cpp
285286
LEGORacers/src/glassblock0x3368.cpp

LEGORacers/include/coppercrest0x40.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
class BronzeFalcon0xc8770;
1010
class GolExport;
1111
class GolCommonDrawState;
12+
class ImaginaryNotion0x290;
1213
class ImaginaryTool0x368;
1314
class InputManager;
1415
class MouseInputDevice;
@@ -99,7 +100,8 @@ class CopperCrest0x40 {
99100
LegoS32 FUN_00469040(InitStruct* p_initStruct);
100101
void FUN_00469550();
101102
void* GetUnk0x10() { return &m_unk0x10; }
102-
void SetUnk0x54(ImaginaryTool0x368* p_unk0x54) { m_unk0x54 = p_unk0x54; }
103+
ImaginaryNotion0x290* GetUnk0x54() { return m_unk0x54; }
104+
void SetUnk0x54(ImaginaryNotion0x290* p_unk0x54) { m_unk0x54 = p_unk0x54; }
103105
void SetCursorInside(LegoU8 p_cursorInside) { m_unk0x10.m_unk0x40 = p_cursorInside; }
104106
void SetCursorPosition(undefined4 p_x, undefined4 p_y)
105107
{
@@ -116,7 +118,7 @@ class CopperCrest0x40 {
116118
InputManager* m_inputManager; // 0x08
117119
OnyxCircularBuffer0x1c* m_inputBindingContainer; // 0x0c
118120
Helper0x44 m_unk0x10; // 0x10
119-
ImaginaryTool0x368* m_unk0x54; // 0x54
121+
ImaginaryNotion0x290* m_unk0x54; // 0x54
120122
LegoS32 m_unk0x58; // 0x58
121123
LegoS32 m_unk0x5c; // 0x5c
122124
};
Lines changed: 128 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,150 @@
11
#ifndef CRIMSONSUN0XA4_H
22
#define CRIMSONSUN0XA4_H
33

4+
#include "ceruleanqueen0x58.h"
45
#include "decomp.h"
6+
#include "imaginarydrillfieldat0x420.h"
7+
#include "imaginarynotion0x290.h"
8+
#include "menutoolcreateparams0x30.h"
9+
#include "obscuretome0x3dc.h"
510
#include "types.h"
611

12+
class CopperCrest0x40;
13+
class PorcelainVeil0x50;
14+
715
// SIZE 0xa4
816
class CrimsonSun0xa4 {
917
public:
18+
// VTABLE: LEGORACERS 0x004b2784
19+
// SIZE 0x84
20+
class FieldAt0x6c8 : public ImaginaryDrillFieldAt0x420 {
21+
public:
22+
FieldAt0x6c8();
23+
~FieldAt0x6c8() override; // vtable+0x04
24+
undefined4 VTable0x38(Rect*, Rect*) override; // vtable+0x38
25+
void VTable0x40(undefined4, undefined4) override; // vtable+0x40
26+
27+
// SYNTHETIC: LEGORACERS 0x0046f860
28+
// CrimsonSun0xa4::FieldAt0x6c8::`scalar deleting destructor'
29+
30+
void SetUnk0x78(ObscureIcon0x1a8* p_unk0x78) { m_unk0x78 = p_unk0x78; }
31+
void SetUnk0x7c(ObscureIcon0x1a8* p_unk0x7c) { m_unk0x7c = p_unk0x7c; }
32+
void SetUnk0x80(ObscureIcon0x1a8* p_unk0x80) { m_unk0x80 = p_unk0x80; }
33+
ObscureIcon0x1a8* GetUnk0x78() { return m_unk0x78; }
34+
ObscureIcon0x1a8* GetUnk0x7c() { return m_unk0x7c; }
35+
ObscureIcon0x1a8* GetUnk0x80() { return m_unk0x80; }
36+
37+
private:
38+
ObscureIcon0x1a8* m_unk0x78; // 0x78
39+
ObscureIcon0x1a8* m_unk0x7c; // 0x7c
40+
ObscureIcon0x1a8* m_unk0x80; // 0x80
41+
};
42+
43+
// VTABLE: LEGORACERS 0x004b20e0
44+
// SIZE 0x74c
45+
class Entry0x74c : public ImaginaryNotion0x290 {
46+
public:
47+
// SIZE 0x18
48+
class CreateParams0x18 {
49+
public:
50+
MenuToolCreateParams0x30* m_createParams; // 0x00
51+
CrimsonSun0xa4* m_owner; // 0x04
52+
ImaginaryNotion0x290* m_eventHandler; // 0x08
53+
undefined4 m_unk0x0c; // 0x0c
54+
undefined2 m_unk0x10; // 0x10
55+
undefined4 m_unk0x14; // 0x14
56+
};
57+
58+
Entry0x74c();
59+
~Entry0x74c() override; // vtable+0x68
60+
undefined4 VTable0x18(
61+
ObscureIcon0x1a8*,
62+
OnyxCircularBuffer0x1c::Item*,
63+
undefined4,
64+
undefined4
65+
) override; // vtable+0x18
66+
undefined4 VTable0x1c(
67+
ObscureIcon0x1a8*,
68+
OnyxCircularBuffer0x1c::Item*,
69+
undefined4,
70+
undefined4
71+
) override; // vtable+0x1c
72+
void VTable0x38(ObscureVantage0x58*) override; // vtable+0x38
73+
void VTable0x4c() override; // vtable+0x4c
74+
undefined4 VTable0x50() override; // vtable+0x50
75+
void Reset() override; // vtable+0x54
76+
CeruleanEmperor0x4c* GetMenuStyles() override; // vtable+0x5c
77+
CeruleanQueen0x58* GetMenuInputBindings() override; // vtable+0x64
78+
LegoBool32 VTable0x78(undefined4 p_elapsedMs) override; // vtable+0x78
79+
LegoBool32 VTable0x7c(Rect* p_arg1, Rect* p_arg2) override; // vtable+0x7c
80+
81+
// SYNTHETIC: LEGORACERS 0x00468bf0
82+
// CrimsonSun0xa4::Entry0x74c::`vector deleting destructor'
83+
84+
LegoBool32 FUN_00468300(CreateParams0x18* p_createParams);
85+
void FUN_00468590();
86+
void FUN_004687a0();
87+
undefined4 GetUnk0x2c0() const;
88+
void SetUnk0x740(ObscureIcon0x1a8* p_unk0x740) { m_unk0x6c8.SetUnk0x78(p_unk0x740); }
89+
void SetUnk0x744(ObscureIcon0x1a8* p_unk0x744) { m_unk0x6c8.SetUnk0x7c(p_unk0x744); }
90+
void SetUnk0x748(ObscureIcon0x1a8* p_unk0x748) { m_unk0x6c8.SetUnk0x80(p_unk0x748); }
91+
92+
private:
93+
void FUN_00468390();
94+
void FUN_00468430();
95+
void FUN_004684e0();
96+
void FUN_004686f0();
97+
void FUN_00468740();
98+
99+
CrimsonSun0xa4* m_unk0x290; // 0x290
100+
CeruleanEmperor0x4c* m_unk0x294; // 0x294
101+
ImaginaryNotion0x290* m_unk0x298; // 0x298
102+
LegoS32 m_unk0x29c; // 0x29c
103+
LegoS32 m_unk0x2a0; // 0x2a0
104+
LegoFloat m_unk0x2a4; // 0x2a4
105+
LegoFloat m_unk0x2a8; // 0x2a8
106+
undefined2 m_unk0x2ac; // 0x2ac
107+
undefined m_unk0x2ae[0x2b0 - 0x2ae]; // 0x2ae
108+
LegoU32 m_unk0x2b0; // 0x2b0
109+
LegoU32 m_unk0x2b4; // 0x2b4
110+
undefined4 m_unk0x2b8; // 0x2b8
111+
undefined4 m_unk0x2bc; // 0x2bc
112+
undefined4 m_unk0x2c0; // 0x2c0
113+
undefined4 m_unk0x2c4; // 0x2c4
114+
undefined4 m_unk0x2c8; // 0x2c8
115+
ObscureTome0x3dc m_unk0x2cc; // 0x2cc
116+
undefined m_unk0x6a8[0x6c8 - 0x6a8]; // 0x6a8
117+
FieldAt0x6c8 m_unk0x6c8; // 0x6c8
118+
};
119+
10120
CrimsonSun0xa4();
11121
~CrimsonSun0xa4();
12122

13123
LegoS32 Reset();
14124
LegoS32 FUN_00468ab0();
125+
Entry0x74c* FUN_00468c50(
126+
undefined4 p_unk0x04,
127+
undefined2 p_unk0x08,
128+
ImaginaryNotion0x290* p_unk0x0c,
129+
undefined4 p_unk0x10
130+
);
15131
void FUN_00468cf0();
16132
void FUN_00468da0(LegoU32 p_unk0x04);
17133
void FUN_00468e20();
18-
LegoBool FUN_00468af0(void* p_unk0x04, LegoS32 p_unk0x08, void* p_unk0x0c);
19-
undefined4 GetUnk0x9c() { return m_unk0x9c; }
134+
LegoBool32 FUN_00468af0(MenuToolCreateParams0x30* p_unk0x04, LegoS32 p_unk0x08, CopperCrest0x40* p_unk0x0c);
135+
LegoU32 GetUnk0x9c() const { return m_unk0x9c; }
20136

21137
private:
22-
undefined m_unk0x00[0x9c - 0x00]; // 0x00
23-
undefined4 m_unk0x9c; // 0x9c
24-
undefined m_unk0xa0[0xa4 - 0xa0]; // 0xa0
138+
void FUN_00468d20();
139+
140+
CeruleanQueen0x58 m_unk0x00; // 0x00
141+
MenuToolCreateParams0x30 m_unk0x5c; // 0x5c
142+
Entry0x74c* m_unk0x8c; // 0x8c
143+
CopperCrest0x40* m_unk0x90; // 0x90
144+
ImaginaryNotion0x290* m_unk0x94; // 0x94
145+
LegoS32 m_unk0x98; // 0x98
146+
LegoU32 m_unk0x9c; // 0x9c
147+
undefined4 m_unk0xa0; // 0xa0
25148
};
26149

27150
#endif // CRIMSONSUN0XA4_H

LEGORacers/include/imaginarydrillfieldat0x420.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
class ImaginaryDrillFieldAt0x420 : public ObscureAnthem0x58 {
1212
public:
1313
ImaginaryDrillFieldAt0x420();
14-
void Reset() override; // vtable+0x00
15-
~ImaginaryDrillFieldAt0x420() override; // vtable+0x04
16-
undefined4 VTable0x38(Rect*, Rect*) override; // vtable+0x38
14+
void Reset() override; // vtable+0x00
15+
~ImaginaryDrillFieldAt0x420() override; // vtable+0x04
16+
undefined4 VTable0x38(Rect*, Rect*) override; // vtable+0x38
17+
virtual void VTable0x40(undefined4, undefined4); // vtable+0x40
18+
virtual void VTable0x44(undefined4, undefined4); // vtable+0x44
1719

1820
// SYNTHETIC: LEGORACERS 0x0046f470
1921
// ImaginaryDrillFieldAt0x420::`scalar deleting destructor'

LEGORacers/include/imaginarynotion0x290.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ class ImaginaryNotion0x290 : public ImaginaryInterface {
104104
void FUN_0046c510(undefined4*, undefined4, undefined2);
105105
void FUN_0046c5b0(ObscureVantage0x58*, undefined2);
106106
undefined4 FUN_0046c610(undefined4*, undefined2, undefined2, undefined2, undefined4);
107-
undefined4 FUN_0046c6f0(ObscureVantage0x58*, ObscureVantage0x58*, undefined2);
108-
undefined4 FUN_0046c730(ObscureVantage0x58*, undefined2);
107+
undefined4 FUN_0046c6f0(ObscureIcon0x1a8*, ObscureIcon0x1a8*, undefined2);
108+
undefined4 FUN_0046c730(ObscureIcon0x1a8*, undefined2);
109109
void FUN_0046c760();
110110
ObscureIcon0x1a8* GetUnk0xd8() { return &m_unk0xd8; }
111111

LEGORacers/include/obscureicon0x1a8.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ class ObscureIcon0x1a8 : public ObscureVantage0x58 {
6767
virtual ObscureIcon0x1a8* VTable0x6c();
6868

6969
LegoBool32 FUN_00471e30(CreateParams0x84* p_createParams, const CreateState0x90* p_createState);
70+
void FUN_00471ec0(ObscureIcon0x1a8* p_parentIcon);
71+
void FUN_00471f00();
7072

7173
// SYNTHETIC: LEGORACERS 0x00471c80
7274
// ObscureIcon0x1a8::`scalar deleting destructor'
7375

7476
protected:
7577
void FUN_00471d90(CreateParams0x84* p_createParams, const CreateState0x90* p_createState);
76-
void FUN_00471ec0(ObscureIcon0x1a8* p_parentIcon);
77-
void FUN_00471f00();
7878
ObscureIcon0x1a8* FUN_00471f70();
7979
ObscureIcon0x1a8* FUN_00471f90();
8080
void FUN_00471fb0(undefined4 p_flags);

LEGORacers/include/obscurevantage0x58.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,14 @@ class ObscureVantage0x58 {
5555
ObscureVantage0x58* FindRoot();
5656
ObscureVantage0x58* FUN_00472e60();
5757
Rect* GetGlobalRect();
58+
Rect* GetRect() { return &m_unk0x34; }
5859
LegoBool32 ClipRect(Rect*, Rect*);
5960
Rect* FUN_00473160(Rect*);
6061
void FUN_004731b0(undefined4&, undefined4&);
62+
LegoU8 GetFlags() const { return m_flags; }
6163
LegoBool GetUnk0x54() const { return m_unk0x54; }
64+
void ClearFlags(LegoU8 p_flags) { m_flags &= ~p_flags; }
65+
void SetFlags(LegoU8 p_flags) { m_flags |= p_flags; }
6266

6367
// SYNTHETIC: LEGORACERS 0x004729d0
6468
// ObscureVantage0x58::`scalar deleting destructor'

LEGORacers/src/coppercrest0x40.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include "bronzefalcon0xc8770.h"
44
#include "golcommondrawstate.h"
55
#include "goldrawstate.h"
6+
#include "imaginarynotion0x290.h"
67
#include "imaginarytool0x368.h"
78
#include "input/inputmanager.h"
89
#include "input/mousedevice.h"

0 commit comments

Comments
 (0)