Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit a5a0930

Browse files
committed
Merge branch 'development'
2 parents 366ff28 + 290ddc3 commit a5a0930

File tree

2,906 files changed

+313950
-400766
lines changed

Some content is hidden

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

2,906 files changed

+313950
-400766
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ If applicable, add screenshots to help explain your problem.
2525

2626
**Additional context**
2727
Add any other context about the problem here.
28+
- LogConsole.txt
29+
- coredump
30+
- stacktrace
31+
- etc

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@
77
*.vs
88
*.APS
99

10+
compile_commands.json
11+
/.ccls-cache
12+
13+
/build
14+
1015
/_Bin
1116
/NATPunchServer/Server/NATCompleteServer/Debug
1217
/NATPunchServer/Server/NATCompleteServer/Release
1318
/Documentation/Doxygen/Output
14-
MemCleanupInfo.txt
19+
MemCleanupInfo.txt
20+
RTEA.vcxproj.user

Activities/ActorEditor.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ extern bool g_ResetActivity;
4949

5050
namespace RTE {
5151

52-
CONCRETECLASSINFO(ActorEditor, EditorActivity, 0)
52+
ConcreteClassInfo(ActorEditor, EditorActivity, 0)
5353

5454

5555
//////////////////////////////////////////////////////////////////////////////////////////
@@ -118,7 +118,6 @@ int ActorEditor::ReadProperty(std::string propName, Reader &reader)
118118
reader >> m_DeliveryDelay;
119119
else
120120
*/
121-
// See if the base class(es) can find a match instead
122121
return EditorActivity::ReadProperty(propName, reader);
123122

124123
return 0;
@@ -199,7 +198,7 @@ int ActorEditor::Start()
199198
//////////////////////////////////////////////////////////////////////////////////////////
200199
// Description: Pauses and unpauses the game.
201200

202-
void ActorEditor::Pause(bool pause)
201+
void ActorEditor::SetPaused(bool pause)
203202
{
204203
// Override the pause
205204
m_Paused = false;
@@ -217,7 +216,7 @@ void ActorEditor::End()
217216

218217

219218

220-
m_ActivityState = OVER;
219+
m_ActivityState = ActivityState::Over;
221220
}
222221

223222

@@ -271,7 +270,7 @@ void ActorEditor::Update()
271270

272271
// Set the screen occlusion situation
273272
if (!m_pPicker->IsVisible())
274-
g_SceneMan.SetScreenOcclusion(Vector(), ScreenOfPlayer(PLAYER_1));
273+
g_SceneMan.SetScreenOcclusion(Vector(), ScreenOfPlayer(Players::PlayerOne));
275274

276275
// Picking something to load into the editor
277276
if (m_EditorMode == EditorActivity::LOADDIALOG)
@@ -378,7 +377,7 @@ bool ActorEditor::LoadActor(const Entity *pActorToLoad)
378377
if (m_pEditedActor)
379378
{
380379
// Set up the editor for the new actor
381-
m_pEditedActor->SetControllerMode(Controller::CIM_PLAYER, UInputMan::PLAYER_ONE);
380+
m_pEditedActor->SetControllerMode(Controller::CIM_PLAYER, Players::PlayerOne);
382381
// Set up the pie menu with the actor's own slices
383382
m_pPieMenu->ResetSlices();
384383
// Add the reload data slice

Activities/ActorEditor.h

Lines changed: 16 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ class ActorEditor:
5353

5454

5555
// Concrete allocation and cloning definitions
56-
ENTITYALLOCATION(ActorEditor)
57-
56+
EntityAllocation(ActorEditor)
57+
SerializableOverrideMethods
58+
ClassInfoGetters
5859

5960
//////////////////////////////////////////////////////////////////////////////////////////
6061
// Constructor: ActorEditor
@@ -73,7 +74,7 @@ ENTITYALLOCATION(ActorEditor)
7374
// from system memory.
7475
// Arguments: None.
7576

76-
virtual ~ActorEditor() { Destroy(true); }
77+
~ActorEditor() override { Destroy(true); }
7778

7879

7980
//////////////////////////////////////////////////////////////////////////////////////////
@@ -84,7 +85,7 @@ ENTITYALLOCATION(ActorEditor)
8485
// Return value: An error return value signaling sucess or any particular failure.
8586
// Anything below 0 is an error signal.
8687

87-
virtual int Create();
88+
int Create() override;
8889

8990

9091
//////////////////////////////////////////////////////////////////////////////////////////
@@ -95,23 +96,7 @@ ENTITYALLOCATION(ActorEditor)
9596
// Return value: An error return value signaling sucess or any particular failure.
9697
// Anything below 0 is an error signal.
9798

98-
virtual int Create(const ActorEditor &reference);
99-
100-
101-
//////////////////////////////////////////////////////////////////////////////////////////
102-
// Virtual method: ReadProperty
103-
//////////////////////////////////////////////////////////////////////////////////////////
104-
// Description: Reads a property value from a Reader stream. If the name isn't
105-
// recognized by this class, then ReadProperty of the parent class
106-
// is called. If the property isn't recognized by any of the base classes,
107-
// false is returned, and the Reader's position is untouched.
108-
// Arguments: The name of the property to be read.
109-
// A Reader lined up to the value of the property to be read.
110-
// Return value: An error return value signaling whether the property was successfully
111-
// read or not. 0 means it was read successfully, and any nonzero indicates
112-
// that a property of that name could not be found in this or base classes.
113-
114-
virtual int ReadProperty(std::string propName, Reader &reader);
99+
int Create(const ActorEditor &reference);
115100

116101

117102
//////////////////////////////////////////////////////////////////////////////////////////
@@ -122,19 +107,7 @@ ENTITYALLOCATION(ActorEditor)
122107
// Arguments: None.
123108
// Return value: None.
124109

125-
virtual void Reset() { Clear(); EditorActivity::Reset(); }
126-
127-
128-
//////////////////////////////////////////////////////////////////////////////////////////
129-
// Virtual method: Save
130-
//////////////////////////////////////////////////////////////////////////////////////////
131-
// Description: Saves the complete state of this ActorEditor to an output stream for
132-
// later recreation with Create(Reader &reader);
133-
// Arguments: A Writer that the ActorEditor will save itself with.
134-
// Return value: An error return value signaling sucess or any particular failure.
135-
// Anything below 0 is an error signal.
136-
137-
virtual int Save(Writer &writer) const;
110+
void Reset() override { Clear(); EditorActivity::Reset(); }
138111

139112

140113
//////////////////////////////////////////////////////////////////////////////////////////
@@ -145,27 +118,7 @@ ENTITYALLOCATION(ActorEditor)
145118
// to destroy all inherited members also.
146119
// Return value: None.
147120

148-
virtual void Destroy(bool notInherited = false);
149-
150-
151-
//////////////////////////////////////////////////////////////////////////////////////////
152-
// Virtual method: GetClass
153-
//////////////////////////////////////////////////////////////////////////////////////////
154-
// Description: Gets the ClassInfo instance of this Entity.
155-
// Arguments: None.
156-
// Return value: A reference to the ClassInfo of this' class.
157-
158-
virtual const Entity::ClassInfo & GetClass() const { return m_sClass; }
159-
160-
161-
//////////////////////////////////////////////////////////////////////////////////////////
162-
// Virtual method: GetClassName
163-
//////////////////////////////////////////////////////////////////////////////////////////
164-
// Description: Gets the class name of this Entity.
165-
// Arguments: None.
166-
// Return value: A string with the friendly-formatted type name of this object.
167-
168-
virtual const std::string & GetClassName() const { return m_sClass.GetName(); }
121+
void Destroy(bool notInherited = false) override;
169122

170123

171124
//////////////////////////////////////////////////////////////////////////////////////////
@@ -196,7 +149,7 @@ ENTITYALLOCATION(ActorEditor)
196149
// Return value: An error return value signaling sucess or any particular failure.
197150
// Anything below 0 is an error signal.
198151

199-
virtual int Start();
152+
int Start() override;
200153

201154

202155
//////////////////////////////////////////////////////////////////////////////////////////
@@ -206,7 +159,7 @@ ENTITYALLOCATION(ActorEditor)
206159
// Arguments: Whether to pause the game or not.
207160
// Return value: None.
208161

209-
virtual void Pause(bool pause = true);
162+
void SetPaused(bool pause = true) override;
210163

211164

212165
//////////////////////////////////////////////////////////////////////////////////////////
@@ -216,7 +169,7 @@ ENTITYALLOCATION(ActorEditor)
216169
// Arguments: None.
217170
// Return value: None.
218171

219-
virtual void End();
172+
void End() override;
220173

221174

222175
//////////////////////////////////////////////////////////////////////////////////////////
@@ -227,7 +180,7 @@ ENTITYALLOCATION(ActorEditor)
227180
// Arguments: None.
228181
// Return value: None.
229182

230-
virtual void Update();
183+
void Update() override;
231184

232185

233186
//////////////////////////////////////////////////////////////////////////////////////////
@@ -239,19 +192,19 @@ ENTITYALLOCATION(ActorEditor)
239192
// Which screen's GUI to draw onto the bitmap.
240193
// Return value: None.
241194

242-
virtual void DrawGUI(BITMAP *pTargetBitmap, const Vector &targetPos = Vector(), int which = 0);
195+
void DrawGUI(BITMAP *pTargetBitmap, const Vector &targetPos = Vector(), int which = 0) override;
243196

244197

245198
//////////////////////////////////////////////////////////////////////////////////////////
246199
// Virtual method: Draw
247200
//////////////////////////////////////////////////////////////////////////////////////////
248201
// Description: Draws this ActivityMan's current graphical representation to a
249202
// BITMAP of choice. This includes all game-related graphics.
250-
// Arguments: A pointer to a BITMAP to draw on. OINT.
203+
// Arguments: A pointer to a BITMAP to draw on. OWNERSHIP IS NOT TRANSFERRED!
251204
// The absolute position of the target bitmap's upper left corner in the scene.
252205
// Return value: None.
253206

254-
virtual void Draw(BITMAP *pTargetBitmap, const Vector &targetPos = Vector());
207+
void Draw(BITMAP *pTargetBitmap, const Vector &targetPos = Vector()) override;
255208

256209

257210
//////////////////////////////////////////////////////////////////////////////////////////
@@ -264,7 +217,7 @@ ENTITYALLOCATION(ActorEditor)
264217
// Method: LoadActor
265218
//////////////////////////////////////////////////////////////////////////////////////////
266219
// Description: Reloads the Actor itself and sets up the pie menu to match its setup.
267-
// Arguments: An Entity Preset of the Actor to load into the editor. OINT
220+
// Arguments: An Entity Preset of the Actor to load into the editor. OWNERSHIP IS NOT TRANSFERRED!
268221
// Return value: Whether the Actor was loaded successfully from the PresetMan.
269222

270223
bool LoadActor(const Entity *pActorToLoad);

Activities/AreaEditor.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ extern bool g_ResetActivity;
4747

4848
namespace RTE {
4949

50-
CONCRETECLASSINFO(AreaEditor, EditorActivity, 0)
50+
ConcreteClassInfo(AreaEditor, EditorActivity, 0)
5151

5252

5353
//////////////////////////////////////////////////////////////////////////////////////////
@@ -114,7 +114,6 @@ int AreaEditor::ReadProperty(std::string propName, Reader &reader)
114114
reader >> m_DeliveryDelay;
115115
else
116116
*/
117-
// See if the base class(es) can find a match instead
118117
return EditorActivity::ReadProperty(propName, reader);
119118

120119
return 0;
@@ -215,7 +214,7 @@ int AreaEditor::Start()
215214
m_pSaveDialogBox = dynamic_cast<GUICollectionBox *>(m_pGUIController->GetControl("SaveDialogBox"));
216215

217216
// Set the background image of the parent collection box
218-
// ContentFile backgroundFile("Base.rte/GUIs/BuyMenuBackground.bmp");
217+
// ContentFile backgroundFile("Base.rte/GUIs/BuyMenuBackground.png");
219218
// m_pSaveDialogBox->SetDrawImage(new AllegroBitmap(backgroundFile.GetAsBitmap()));
220219
// m_pSaveDialogBox->SetDrawBackground(true);
221220
// m_pSaveDialogBox->SetDrawType(GUICollectionBox::Image);
@@ -257,7 +256,7 @@ int AreaEditor::Start()
257256
//////////////////////////////////////////////////////////////////////////////////////////
258257
// Description: Pauses and unpauses the game.
259258

260-
void AreaEditor::Pause(bool pause)
259+
void AreaEditor::SetPaused(bool pause)
261260
{
262261
// Override the pause
263262
m_Paused = false;
@@ -275,7 +274,7 @@ void AreaEditor::End()
275274

276275

277276

278-
m_ActivityState = OVER;
277+
m_ActivityState = ActivityState::Over;
279278
}
280279

281280

@@ -382,13 +381,11 @@ void AreaEditor::Update()
382381
Activity * pActivity = dynamic_cast<Activity *>(pActivityPreset->Clone());
383382
GameActivity *pTestGame = dynamic_cast<GameActivity *>(pActivity);
384383
RTEAssert(pTestGame, "Couldn't find the \"Skirmish Defense\" GAScripted Activity! Has it been defined?");
385-
pTestGame->SetPlayerCount(1);
386-
pTestGame->SetTeamCount(2);
387384
pTestGame->SetTeamOfPlayer(0, 0);
388385
pTestGame->SetCPUTeam(1);
389386
pTestGame->SetStartingGold(10000);
390387
pTestGame->SetFogOfWarEnabled(false);
391-
pTestGame->SetDifficulty(GameActivity::MEDIUMDIFFICULTY);
388+
pTestGame->SetDifficulty(DifficultySetting::MediumDifficulty);
392389
g_ActivityMan.SetStartActivity(pTestGame);
393390
g_ResetActivity = true;
394391
}

0 commit comments

Comments
 (0)