Skip to content

Commit 62ac139

Browse files
author
sourcehold
committed
refactor: make constructor and destructor public, remove struct resolver or singleton classes
1 parent 24618b4 commit 62ac139

59 files changed

Lines changed: 59 additions & 173 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/OpenSHC/AI/AICState.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ namespace AI {
5151
AICState(AICState const&);
5252
void operator=(AICState const&);
5353

54+
public:
5455
AICState();
5556
~AICState();
5657

57-
public:
5858
// Constructor
5959
AICState* Constructor_AICState();
6060

@@ -425,7 +425,5 @@ namespace AI {
425425

426426
#pragma pack(pop)
427427

428-
MACRO_STRUCT_RESOLVER(AICState, false, Address::SHC_3BB0A8C1_0x023FC8E8) pDAT_AICState;
429-
430428
} // namespace AI
431429
} // namespace OpenSHC

src/OpenSHC/AI/AIVState.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ namespace AI {
7777
AIVState(AIVState const&);
7878
void operator=(AIVState const&);
7979

80+
public:
8081
AIVState();
8182
~AIVState();
8283

83-
public:
8484
// Constructor
8585
AIVState* Constructor_AIVState();
8686

@@ -163,7 +163,5 @@ namespace AI {
163163

164164
#pragma pack(pop)
165165

166-
MACRO_STRUCT_RESOLVER(AIVState, false, Address::SHC_3BB0A8C1_0x01866AB0) pDAT_AIVState;
167-
168166
} // namespace AI
169167
} // namespace OpenSHC

src/OpenSHC/Audio/MissingResourceState.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ namespace Audio {
2626
MissingResourceState(MissingResourceState const&);
2727
void operator=(MissingResourceState const&);
2828

29+
public:
2930
MissingResourceState();
3031
~MissingResourceState();
3132

32-
public:
3333
void playResourceLackSFX(int resourceTextElement, ResourceLackSFXInt resourceType);
3434

3535
void renderResourceMissingText(int posX, int posY, dword textGroup, dword unusedUnk);
@@ -39,7 +39,5 @@ namespace Audio {
3939

4040
#pragma pack(pop)
4141

42-
MACRO_STRUCT_RESOLVER(MissingResourceState, false, Address::SHC_3BB0A8C1_0x00EE1098) pDAT_MissingResourceState;
43-
4442
} // namespace Audio
4543
} // namespace OpenSHC

src/OpenSHC/Audio/SFX/SFXState.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ namespace Audio {
4545
SFXState(SFXState const&);
4646
void operator=(SFXState const&);
4747

48+
public:
4849
SFXState();
4950
~SFXState();
5051

51-
public:
5252
// Constructor
5353
SFXState* Constructor_SFXState();
5454

@@ -103,8 +103,6 @@ namespace Audio {
103103

104104
#pragma pack(pop)
105105

106-
MACRO_STRUCT_RESOLVER(SFXState, false, Address::SHC_3BB0A8C1_0x00F22500) pDAT_SFXState;
107-
108106
} // namespace SFX
109107
} // namespace Audio
110108
} // namespace OpenSHC

src/OpenSHC/Audio/mss/SoundSystem.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ namespace Audio {
7272
SoundSystem(SoundSystem const&);
7373
void operator=(SoundSystem const&);
7474

75+
public:
7576
SoundSystem();
7677
~SoundSystem();
7778

78-
public:
7979
void meth_0x424700();
8080

8181
void stopMusicPlayback();
@@ -184,8 +184,6 @@ namespace Audio {
184184

185185
#pragma pack(pop)
186186

187-
MACRO_STRUCT_RESOLVER(SoundSystem, false, Address::SHC_3BB0A8C1_0x01127DD0) pDAT_SoundSystem;
188-
189187
} // namespace MSS
190188
} // namespace Audio
191189
} // namespace OpenSHC

src/OpenSHC/Game/GameCore.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,10 @@ namespace Game {
224224
GameCore(GameCore const&);
225225
void operator=(GameCore const&);
226226

227+
public:
227228
GameCore();
228229
~GameCore();
229230

230-
public:
231231
// Constructor
232232
GameCore* Constructor_GameCore();
233233

@@ -268,7 +268,5 @@ namespace Game {
268268

269269
#pragma pack(pop)
270270

271-
MACRO_STRUCT_RESOLVER(GameCore, false, Address::SHC_3BB0A8C1_0x01FE7D10) pDAT_GameCore;
272-
273271
} // namespace Game
274272
} // namespace OpenSHC

src/OpenSHC/Game/GameStateStructures.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ namespace Game {
4343
GameStateStructures(GameStateStructures const&);
4444
void operator=(GameStateStructures const&);
4545

46+
public:
4647
GameStateStructures();
4748
~GameStateStructures();
4849

49-
public:
5050
bool isSameTeam(int playerID1, int playerID2);
5151

5252
void clearMapAndTimeAndPlayerData();
@@ -251,7 +251,5 @@ namespace Game {
251251

252252
#pragma pack(pop)
253253

254-
MACRO_STRUCT_RESOLVER(GameStateStructures, false, Address::SHC_3BB0A8C1_0x0112B0B8) pDAT_GameStateStructures;
255-
256254
} // namespace Game
257255
} // namespace OpenSHC

src/OpenSHC/Game/ScenarioEvents/InGameEventUnionVersion.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ namespace Game {
3232
InGameEventUnionVersion(InGameEventUnionVersion const&);
3333
void operator=(InGameEventUnionVersion const&);
3434

35+
public:
3536
InGameEventUnionVersion();
3637
~InGameEventUnionVersion();
3738

38-
public:
3939
undefined4 resetEvent();
4040

4141
ScenarioEventCondition* initializeScenarioEvent();

src/OpenSHC/Game/Skirmish/SkirmishLobbySetupStructure.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ namespace Game {
4949
SkirmishLobbySetupStructure(SkirmishLobbySetupStructure const&);
5050
void operator=(SkirmishLobbySetupStructure const&);
5151

52+
public:
5253
SkirmishLobbySetupStructure();
5354
~SkirmishLobbySetupStructure();
5455

55-
public:
5656
void commitSkirmishSettings();
5757

5858
void restoreSkirmishLobbySetup();
@@ -62,9 +62,6 @@ namespace Game {
6262

6363
#pragma pack(pop)
6464

65-
MACRO_STRUCT_RESOLVER(SkirmishLobbySetupStructure, false, Address::SHC_3BB0A8C1_0x00DF4118)
66-
pDAT_SkirmishLobbySetupStructure;
67-
6865
} // namespace Skirmish
6966
} // namespace Game
7067
} // namespace OpenSHC

src/OpenSHC/IO/BitMapState.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ namespace IO {
4545
BitMapState(BitMapState const&);
4646
void operator=(BitMapState const&);
4747

48+
public:
4849
BitMapState();
4950
~BitMapState();
5051

51-
public:
5252
// Constructor
5353
BitMapState* Constructor_BitMapState();
5454

@@ -73,7 +73,5 @@ namespace IO {
7373

7474
#pragma pack(pop)
7575

76-
MACRO_STRUCT_RESOLVER(BitMapState, false, Address::SHC_3BB0A8C1_0x011BECB0) pDAT_BitMapState;
77-
7876
} // namespace IO
7977
} // namespace OpenSHC

0 commit comments

Comments
 (0)