Skip to content

Commit 848f0d1

Browse files
committed
Merge branch 'main' into feature/savegameinfo
2 parents 30cc687 + fed3e8b commit 848f0d1

6 files changed

Lines changed: 43 additions & 36 deletions

File tree

Private

src/Main.Config.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,23 @@ void MainConfig::LoadFromINIFile()
3333
const char* pOptionsSection = "Options";
3434
if (pINI->GetSection(pOptionsSection))
3535
{
36-
this->MPDebug = pINI->ReadBool(pOptionsSection, "MPDEBUG", this->MPDebug);
37-
this->SingleProcAffinity = pINI->ReadBool(pOptionsSection, "SingleProcAffinity", this->SingleProcAffinity);
36+
this->AllowChat = pINI->ReadBool(pOptionsSection, "AllowChat", this->AllowChat);
37+
this->AllowTaunts = pINI->ReadBool(pOptionsSection, "AllowTaunts", this->AllowTaunts);
38+
this->DDrawHandlesClose = pINI->ReadBool(pOptionsSection, "DDrawHandlesClose", this->DDrawHandlesClose);
3839
this->DisableEdgeScrolling = pINI->ReadBool(pOptionsSection, "DisableEdgeScrolling", this->DisableEdgeScrolling);
40+
this->MPDebug = pINI->ReadBool(pOptionsSection, "MPDEBUG", this->MPDebug);
3941
this->QuickExit = pINI->ReadBool(pOptionsSection, "QuickExit", this->QuickExit);
42+
this->SingleProcAffinity = pINI->ReadBool(pOptionsSection, "SingleProcAffinity", this->SingleProcAffinity);
4043
this->SkipScoreScreen = pINI->ReadBool(pOptionsSection, "SkipScoreScreen", this->SkipScoreScreen);
41-
this->DDrawHandlesClose = pINI->ReadBool(pOptionsSection, "DDrawHandlesClose", this->DDrawHandlesClose);
4244
this->SpeedControl = pINI->ReadBool(pOptionsSection, "SpeedControl", this->SpeedControl);
43-
this->AllowTaunts = pINI->ReadBool(pOptionsSection, "AllowTaunts", this->AllowTaunts);
44-
this->AllowChat = pINI->ReadBool(pOptionsSection, "AllowChat", this->AllowChat);
4545
}
4646

4747
const char* pVideoSection = "Video";
4848
if (pINI->GetSection(pVideoSection))
4949
{
50-
this->WindowedMode = pINI->ReadBool(pVideoSection, "Video.Windowed", this->WindowedMode);
51-
this->NoWindowFrame = pINI->ReadBool(pVideoSection, "NoWindowFrame", this->NoWindowFrame);
5250
this->DDrawTargetFPS = pINI->ReadInteger(pVideoSection, "DDrawTargetFPS", this->DDrawTargetFPS);
51+
this->NoWindowFrame = pINI->ReadBool(pVideoSection, "NoWindowFrame", this->NoWindowFrame);
52+
this->WindowedMode = pINI->ReadBool(pVideoSection, "Video.Windowed", this->WindowedMode);
5353
}
5454
}
5555

src/Main.Config.h

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,46 +21,50 @@
2121
class MainConfig
2222
{
2323
public:
24-
bool MPDebug;
25-
bool DumpTypes;
26-
bool NoCD;
27-
int RA2ModeSaveID;
28-
29-
bool SingleProcAffinity;
24+
// Options
25+
bool AllowChat;
26+
bool AllowTaunts;
27+
bool DDrawHandlesClose;
3028
bool DisableEdgeScrolling;
29+
bool MPDebug;
3130
bool QuickExit;
31+
bool SingleProcAffinity;
3232
bool SkipScoreScreen;
33-
bool DDrawHandlesClose;
3433
bool SpeedControl;
3534

36-
bool WindowedMode;
35+
// Video
3736
bool NoWindowFrame;
38-
int DDrawTargetFPS;
39-
40-
bool AllowTaunts;
41-
bool AllowChat;
37+
bool WindowedMode;
38+
int DDrawTargetFPS;
4239

43-
void LoadFromINIFile();
44-
void ApplyStaticOptions();
40+
// Other
41+
bool DumpTypes;
42+
bool NoCD;
43+
int RA2ModeSaveID;
4544

4645
MainConfig()
47-
: MPDebug { false }
48-
, DumpTypes { false }
49-
, NoCD { false }
50-
, RA2ModeSaveID { 0 }
51-
52-
, SingleProcAffinity { true }
46+
// Options
47+
: AllowChat { true }
48+
, AllowTaunts { true }
49+
, DDrawHandlesClose { false }
5350
, DisableEdgeScrolling { false }
51+
, MPDebug { false }
5452
, QuickExit { false }
53+
, SingleProcAffinity { true }
5554
, SkipScoreScreen { false }
56-
, DDrawHandlesClose { false }
5755
, SpeedControl { false }
5856

59-
, WindowedMode { false }
60-
, NoWindowFrame { false }
57+
// Video
6158
, DDrawTargetFPS { -1 }
59+
, NoWindowFrame { false }
60+
, WindowedMode { false }
6261

63-
, AllowTaunts { true }
64-
, AllowChat { true }
62+
// Other
63+
, DumpTypes { false }
64+
, NoCD { false }
65+
, RA2ModeSaveID { 0 }
6566
{ }
67+
68+
void LoadFromINIFile();
69+
void ApplyStaticOptions();
6670
};

src/Utilities/Debug.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@
2626
#include <Utilities/Macro.h>
2727

2828
char Debug::StringBuffer[0x1000];
29+
char Debug::FinalStringBuffer[0x1000];
2930

3031
void Debug::Log(const char* pFormat, ...)
3132
{
3233
va_list args;
33-
Debug::LogGame("[Spawner] ");
34-
Debug::LogGame(pFormat, args);
34+
va_start(args, pFormat);
35+
vsprintf_s(FinalStringBuffer, pFormat, args);
36+
LogGame("%s %s", "[Phobos]", FinalStringBuffer);
3537
va_end(args);
3638
}
3739

src/Utilities/Debug.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class Debug
3030
};
3131

3232
static char StringBuffer[0x1000];
33+
static char FinalStringBuffer[0x1000];
3334

3435
static void Log(const char* pFormat, ...);
3536
static void LogGame(const char* pFormat, ...);

0 commit comments

Comments
 (0)