Skip to content

Commit cba408b

Browse files
committed
Add enum for gol backend type
1 parent 8e44f45 commit cba408b

4 files changed

Lines changed: 17 additions & 12 deletions

File tree

LEGORacers/include/ironflame0x944.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// VTABLE: LEGORACERS 0x4af9f4
1414
// SIZE 0x944
1515
class IronFlame0x944 : public CrimsonForge0x800 {
16+
1617
public:
1718
IronFlame0x944();
1819
void VTable0x00() override; // vtable+0x00
@@ -29,11 +30,18 @@ class IronFlame0x944 : public CrimsonForge0x800 {
2930
void VTable0x30() override; // vtable+0x30
3031
void VTable0x34() override; // vtable+0x34
3132

33+
enum {
34+
c_golBackendDP = 0x0,
35+
c_golBackendSoft = 0x1,
36+
c_golBackendGlide = 0x2,
37+
c_golBackendD3D = 0x4,
38+
};
39+
3240
// SYNTHETIC: LEGORACERS 0x416560
3341
// IronFlame0x944::`scalar deleting destructor'
3442

35-
undefined4 GetUnk0x928() { return m_unk0x928; }
36-
void SetUnk0x928(undefined4 p_unk0x928) { m_unk0x928 = p_unk0x928; }
43+
LegoU32 GetGolBackendType() { return m_golBackendType; }
44+
void SetGolBackendType(LegoU32 p_golBackendType) { m_golBackendType = p_golBackendType; }
3745

3846
private:
3947
GolExport* m_golExport; // 0x800
@@ -42,7 +50,7 @@ class IronFlame0x944 : public CrimsonForge0x800 {
4250
HMODULE m_golLibrary; // 0x830
4351
OpalVault0xf0 m_unk0x834; // 0x834
4452
undefined4 m_unk0x924; // 0x924
45-
undefined4 m_unk0x928; // 0x928
53+
LegoU32 m_golBackendType; // 0x928
4654
undefined4 m_unk0x92c; // 0x92c
4755
undefined4 m_unk0x930; // 0x930
4856
undefined4 m_unk0x934; // 0x934

LEGORacers/include/neoncactus0x1d6c.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class NeonCactus0x1d6c : public CactusInterface0x4 {
2929
AmberWolf0x98 m_unk0x948; // 0x948
3030
CobaltMist0x30 m_unk0x9e0; // 0x9e0
3131
undefined m_unk0xa10[0xa14 - 0xa10]; // 0xa10
32-
undefined4 m_unk0xa14; // 0xa14
32+
LegoU32 m_golBackendType; // 0xa14
3333
undefined m_unk0xa18[0x1d6c - 0xa18]; // 0xa18
3434
};
3535

LEGORacers/src/ironflame0x944.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ IronFlame0x944::IronFlame0x944()
1515
m_golLibrary = NULL;
1616
m_golExport = NULL;
1717
m_unk0x924 = 0;
18-
m_unk0x928 = 0;
18+
m_golBackendType = c_golBackendDP;
1919
m_unk0x92c = 0;
2020
m_unk0x934 = 0;
2121
m_unk0x93c = 0;
@@ -55,22 +55,19 @@ void IronFlame0x944::VTable0x10()
5555
void IronFlame0x944::VTable0x14()
5656
{
5757
char buffer[100];
58-
// const char *dllname;
5958
GolImport gol_import;
6059

61-
if (m_unk0x928 & 0x2) {
60+
if (m_golBackendType & c_golBackendGlide) {
6261
m_golLibrary = LoadLibraryA("GolGlide.DLL");
6362
}
64-
else if (m_unk0x928 & 0x1) {
63+
else if (m_golBackendType & c_golBackendSoft) {
6564
m_golLibrary = LoadLibraryA("GolSoft.DLL");
6665
}
67-
else if (m_unk0x928 & 0x4) {
66+
else if (m_golBackendType & c_golBackendD3D) {
6867
m_golLibrary = LoadLibraryA("GolD3D.DLL");
69-
// dllname = "GolD3D.DLL";
7068
}
7169
else {
7270
m_golLibrary = LoadLibraryA("GolDP.DLL");
73-
// dllname = "GolDP.DLL";
7471
}
7572
if (m_golLibrary == NULL) {
7673
sprintf(buffer, "Unable to find a valid Gol DLL\nError Code = %d", GetLastError());

LEGORacers/src/neoncactus0x1d6c.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ LegoS32 NeonCactus0x1d6c::Init(LegoS32 p_argc, LegoChar** p_argv)
3131
}
3232

3333
m_unk0x04.GetUnk0x7dc().VTable0x08(100, 4096);
34-
m_unk0x04.SetUnk0x928(m_unk0xa14);
34+
m_unk0x04.SetGolBackendType(m_golBackendType);
3535
m_unk0x04.VTable0x0c("LEGO Racers", g_jamFile);
3636
return 1;
3737
}

0 commit comments

Comments
 (0)