Skip to content

Commit 85efd2b

Browse files
committed
Fix a few warnings flagged by a MinGW toolchain
1 parent e3e7466 commit 85efd2b

17 files changed

Lines changed: 143 additions & 153 deletions

GolDP/include/render/gold3drenderdevice.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class GolD3DRenderDevice : public GolRenderDevice {
7878
void VTable0x58(SlatePeak0x58*, undefined4) override; // vtable+0x58
7979
void VTable0x5c() override; // vtable+0x5c
8080
void VTable0x60() override; // vtable+0x60
81-
LegoS32 VTable0x64(
81+
void VTable0x64(
8282
GolString*,
8383
GolFontBase*,
8484
LegoS32,
@@ -98,7 +98,7 @@ class GolD3DRenderDevice : public GolRenderDevice {
9898
Rect*,
9999
undefined4
100100
) override; // vtable+0x68
101-
LegoS32 VTable0x6c(
101+
void VTable0x6c(
102102
GolString*,
103103
GolFontBase*,
104104
LegoS32,

GolDP/include/render/golrenderdevice.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class GolRenderDevice {
115115
virtual void VTable0x58(SlatePeak0x58* p_param1, undefined4 p_param2); // vtable+0x58
116116
virtual void VTable0x5c() = 0; // vtable+0x5c
117117
virtual void VTable0x60(); // vtable+0x60
118-
virtual LegoS32 VTable0x64(
118+
virtual void VTable0x64(
119119
GolString*,
120120
GolFontBase*,
121121
LegoS32,
@@ -135,7 +135,7 @@ class GolRenderDevice {
135135
Rect*,
136136
undefined4
137137
) = 0; // vtable+0x68
138-
virtual LegoS32 VTable0x6c(
138+
virtual void VTable0x6c(
139139
GolString*,
140140
GolFontBase*,
141141
LegoS32,

GolDP/src/render/gold3drenderdevice.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1641,7 +1641,7 @@ void GolD3DRenderDevice::VTable0x68(
16411641
}
16421642

16431643
// FUNCTION: GOLDP 0x10009b70
1644-
LegoS32 GolD3DRenderDevice::VTable0x64(
1644+
void GolD3DRenderDevice::VTable0x64(
16451645
GolString* p_unk0x04,
16461646
GolFontBase* p_font,
16471647
LegoS32 p_unk0x0c,
@@ -1652,11 +1652,11 @@ LegoS32 GolD3DRenderDevice::VTable0x64(
16521652
undefined4 p_unk0x20
16531653
)
16541654
{
1655-
return p_font->DrawString(p_unk0x04, this, p_unk0x0c, p_unk0x10, p_unk0x14, p_unk0x18, p_unk0x1c, p_unk0x20);
1655+
p_font->DrawString(p_unk0x04, this, p_unk0x0c, p_unk0x10, p_unk0x14, p_unk0x18, p_unk0x1c, p_unk0x20);
16561656
}
16571657

16581658
// FUNCTION: GOLDP 0x10009ba0
1659-
LegoS32 GolD3DRenderDevice::VTable0x6c(
1659+
void GolD3DRenderDevice::VTable0x6c(
16601660
GolString* p_unk0x04,
16611661
GolFontBase* p_font,
16621662
LegoS32 p_unk0x0c,
@@ -1667,7 +1667,7 @@ LegoS32 GolD3DRenderDevice::VTable0x6c(
16671667
undefined4 p_unk0x20
16681668
)
16691669
{
1670-
return p_font->DrawStringFitted(p_unk0x04, this, p_unk0x0c, p_unk0x10, p_unk0x14, p_unk0x18, p_unk0x1c, p_unk0x20);
1670+
p_font->DrawStringFitted(p_unk0x04, this, p_unk0x0c, p_unk0x10, p_unk0x14, p_unk0x18, p_unk0x1c, p_unk0x20);
16711671
}
16721672

16731673
// FUNCTION: GOLDP 0x10009bd0

LEGORacers/include/menu/runtime/cutscenedefinition.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class CutsceneDefinition : public GolNameTable {
132132

133133
LegoU32 Reset();
134134
LegoU32 FUN_00404a10(CutsceneDefinition* p_parent, GolFileParser* p_parser);
135-
LegoU32 FUN_00404c90();
135+
void FUN_00404c90();
136136
void FUN_00404e80();
137137
GolWorldEntity* GetEntity() const { return m_unk0x24; }
138138
void SetEntity(GolWorldEntity* p_entity) { m_unk0x24 = p_entity; }

LEGORacers/include/menu/widgets/menuwidget.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class MenuWidget {
7676
Rect* FUN_00472c80(Rect*, Rect*);
7777
Rect* MeasureText(GolFontBase*, GolString*, Rect*, Rect*, LegoS32);
7878
void DrawImage(Rect*, Rect*, UtopianPan0xa4*);
79-
undefined2 DrawString(Rect*, Rect*, GolFontBase*, GolString*, LegoS32, LegoS32);
79+
void DrawString(Rect*, Rect*, GolFontBase*, GolString*, LegoS32, LegoS32);
8080
Rect* TranslateRectByOffset(Rect*);
8181
LegoBool32 FUN_00473a20(Rect*, LegoS32, LegoS32);
8282
void ScreenToLocal(undefined4&, undefined4&);

LEGORacers/src/menu/runtime/cutscenedefinition.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ LegoU32 CutsceneDefinition::Frame::ModelEvent::FUN_00404a10(CutsceneDefinition*
161161
}
162162

163163
// FUNCTION: LEGORACERS 0x00404c90
164-
LegoU32 CutsceneDefinition::Frame::ModelEvent::FUN_00404c90()
164+
void CutsceneDefinition::Frame::ModelEvent::FUN_00404c90()
165165
{
166166
if (!m_unk0x24) {
167167
LegoChar message[64];
@@ -199,7 +199,7 @@ LegoU32 CutsceneDefinition::Frame::ModelEvent::FUN_00404c90()
199199
m_unk0x28->FUN_00406f20(m_unk0x2c.m_indexedRef.m_resourceIndex, m_unk0x2c.m_indexedRef.m_modelIndex);
200200
break;
201201
default:
202-
return m_modelRefType - 1;
202+
return;
203203
}
204204
}
205205

LEGORacers/src/menu/widgets/menuwidget.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ LegoBool32 MenuWidget::VTable0x08()
9292
// FUNCTION: LEGORACERS 0x004113b0 FOLDED
9393
undefined4 MenuWidget::VTable0x3c(undefined4)
9494
{
95-
return NULL;
95+
return 0;
9696
}
9797

9898
// FUNCTION: LEGORACERS 0x0044e7f0 FOLDED
@@ -286,7 +286,7 @@ void MenuWidget::DrawImage(Rect* p_destRect, Rect* p_sourceRect, UtopianPan0xa4*
286286
}
287287

288288
// FUNCTION: LEGORACERS 0x00472da0
289-
undefined2 MenuWidget::DrawString(
289+
void MenuWidget::DrawString(
290290
Rect* p_source,
291291
Rect* p_dest,
292292
GolFontBase* p_font,
@@ -299,7 +299,7 @@ undefined2 MenuWidget::DrawString(
299299
p_font->SetColor(color);
300300

301301
if (p_wrapWidth) {
302-
return p_font->FUN_00408fe0(
302+
p_font->FUN_00408fe0(
303303
p_string,
304304
m_renderer,
305305
p_source->m_left,
@@ -316,7 +316,7 @@ undefined2 MenuWidget::DrawString(
316316

317317
LegoS32 y = p_source->m_top;
318318
LegoS32 x = p_source->m_left;
319-
return m_renderer->VTable0x6c(
319+
m_renderer->VTable0x6c(
320320
p_string,
321321
p_font,
322322
x,

LEGORacers/src/menu/widgets/optionsrow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ DECOMP_SIZE_ASSERT(OptionsRow, 0x6ec)
99
// FUNCTION: LEGORACERS 0x004113b0 FOLDED
1010
undefined4 OptionsRowBase::VTable0x3c(undefined4)
1111
{
12-
return NULL;
12+
return 0;
1313
}
1414

1515
// FUNCTION: LEGORACERS 0x0046de60

LEGORacers/src/race/cobalttrail0x140.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ extern const LegoFloat g_unk0x004b02d8 = 0.0020833334f;
4444
extern const LegoFloat g_unk0x004b02e0;
4545

4646
// GLOBAL: LEGORACERS 0x004be8a8
47-
extern const LegoChar* g_unk0x004be8a8 = "font_ths";
47+
const LegoChar* g_unk0x004be8a8 = "font_ths";
4848

4949
// GLOBAL: LEGORACERS 0x004be8ac
50-
extern const LegoChar* g_unk0x004be8ac = "ignum";
50+
const LegoChar* g_unk0x004be8ac = "ignum";
5151

5252
static const LegoChar* g_unk0x004b0270[8] = {"1", "2", "3", "4", "5", "6", "7", "8"};
5353
static const LegoS16 g_unk0x004b0290[8] = {0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20};

LEGORacers/src/race/racesession.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ extern const LegoFloat g_mirroredRaceStateRouteScale = 0.05f;
5656
extern const LegoFloat g_unk0x004b08bc = 25.0f;
5757

5858
// GLOBAL: LEGORACERS 0x004bee30
59-
extern const LegoChar* g_sideWinderForceFeedName = "Microsoft SideWinder Force Feed";
59+
const LegoChar* g_sideWinderForceFeedName = "Microsoft SideWinder Force Feed";
6060

6161
// GLOBAL: LEGORACERS 0x004bee64
62-
extern const LegoFloat g_unk0x004bee64[4] = {0.5f, 0.01f, 0.49f, 0.49f};
62+
const LegoFloat g_unk0x004bee64[4] = {0.5f, 0.01f, 0.49f, 0.49f};
6363

6464
// GLOBAL: LEGORACERS 0x004bee74
6565
const LegoU16 g_unk0x004bee74[16] =

0 commit comments

Comments
 (0)