Skip to content

Commit 64d57a2

Browse files
committed
In Actor.h, stop including PieMenu and PathFinder
1 parent cc2deb9 commit 64d57a2

38 files changed

+350
-236
lines changed

Source/Activities/ActorEditor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,9 @@ void ActorEditor::Update()
264264
PieMenu *editedActorPieMenu = m_pEditedActor->GetPieMenu();
265265
editedActorPieMenu->SetEnabled(m_PlayerController[0].IsState(ControlState::PIE_MENU_ACTIVE) && m_EditorMode != EditorActivity::LOADDIALOG);
266266

267-
if (editedActorPieMenu->GetPieCommand() == PieSlice::SliceType::EditorLoad) {
267+
if (editedActorPieMenu->GetPieCommand() == PieSliceType::EditorLoad) {
268268
ReloadActorData();
269-
} else if (editedActorPieMenu->GetPieCommand() == PieSlice::SliceType::EditorPick) {
269+
} else if (editedActorPieMenu->GetPieCommand() == PieSliceType::EditorPick) {
270270
m_EditorMode = EditorActivity::LOADDIALOG;
271271
m_ModeChange = true;
272272
}

Source/Activities/AreaEditor.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ void AreaEditor::Update()
312312
m_NeedSave = m_pEditorGUI->EditMade() || m_NeedSave;
313313

314314
// Get any mode change commands that the user gave the Editor GUI
315-
if (m_pEditorGUI->GetActivatedPieSlice() == PieSlice::SliceType::EditorNew && m_EditorMode != NEWDIALOG)
315+
if (m_pEditorGUI->GetActivatedPieSlice() == PieSliceType::EditorNew && m_EditorMode != NEWDIALOG)
316316
{
317317
m_pEditorGUI->SetEditorGUIMode(AreaEditorGUI::INACTIVE);
318318
m_EditorMode = EditorActivity::NEWDIALOG;
@@ -321,20 +321,20 @@ void AreaEditor::Update()
321321
// Will turn on dirtyness immediately as New button is pressed below
322322
m_NeedSave = false;
323323
}
324-
else if (m_pEditorGUI->GetActivatedPieSlice() == PieSlice::SliceType::EditorLoad && m_EditorMode != LOADDIALOG)
324+
else if (m_pEditorGUI->GetActivatedPieSlice() == PieSliceType::EditorLoad && m_EditorMode != LOADDIALOG)
325325
{
326326
m_pEditorGUI->SetEditorGUIMode(AreaEditorGUI::INACTIVE);
327327
m_EditorMode = EditorActivity::LOADDIALOG;
328328
m_ModeChange = true;
329329
}
330-
else if (m_pEditorGUI->GetActivatedPieSlice() == PieSlice::SliceType::EditorSave && m_EditorMode != SAVEDIALOG)
330+
else if (m_pEditorGUI->GetActivatedPieSlice() == PieSliceType::EditorSave && m_EditorMode != SAVEDIALOG)
331331
{
332332
m_pEditorGUI->SetEditorGUIMode(AreaEditorGUI::INACTIVE);
333333
m_EditorMode = EditorActivity::SAVEDIALOG;
334334
m_ModeChange = true;
335335
}
336336
// Test the scene by starting a Skirmish Defense with it, after saving
337-
else if (m_pEditorGUI->GetActivatedPieSlice() == PieSlice::SliceType::EditorDone || m_EditorMode == TESTINGOBJECT)
337+
else if (m_pEditorGUI->GetActivatedPieSlice() == PieSliceType::EditorDone || m_EditorMode == TESTINGOBJECT)
338338
{
339339
m_pEditorGUI->SetEditorGUIMode(AreaEditorGUI::INACTIVE);
340340

Source/Activities/AssemblyEditor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,19 +288,19 @@ void AssemblyEditor::Update()
288288
m_NeedSave = m_pEditorGUI->EditMade() || m_NeedSave;
289289

290290
// Get any mode change commands that the user gave the Editor GUI
291-
if (m_pEditorGUI->GetActivatedPieSlice() == PieSlice::SliceType::EditorNew && m_EditorMode != NEWDIALOG)
291+
if (m_pEditorGUI->GetActivatedPieSlice() == PieSliceType::EditorNew && m_EditorMode != NEWDIALOG)
292292
{
293293
m_pEditorGUI->SetEditorGUIMode(AssemblyEditorGUI::INACTIVE);
294294
m_EditorMode = EditorActivity::NEWDIALOG;
295295
m_ModeChange = true;
296296
}
297-
else if (m_pEditorGUI->GetActivatedPieSlice() == PieSlice::SliceType::EditorLoad && m_EditorMode != LOADDIALOG)
297+
else if (m_pEditorGUI->GetActivatedPieSlice() == PieSliceType::EditorLoad && m_EditorMode != LOADDIALOG)
298298
{
299299
m_pEditorGUI->SetEditorGUIMode(AssemblyEditorGUI::INACTIVE);
300300
m_EditorMode = EditorActivity::LOADDIALOG;
301301
m_ModeChange = true;
302302
}
303-
else if (m_pEditorGUI->GetActivatedPieSlice() == PieSlice::SliceType::EditorSave && m_EditorMode != SAVEDIALOG)
303+
else if (m_pEditorGUI->GetActivatedPieSlice() == PieSliceType::EditorSave && m_EditorMode != SAVEDIALOG)
304304
{
305305
m_pEditorGUI->SetEditorGUIMode(AssemblyEditorGUI::INACTIVE);
306306
m_EditorMode = EditorActivity::SAVEDIALOG;

Source/Activities/BaseEditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ void BaseEditor::Update()
305305

306306
// Get any mode change commands that the user gave the Editor GUI
307307
// Done with editing for now; save and return to campaign screen
308-
if (m_pEditorGUI->GetActivatedPieSlice() == PieSlice::SliceType::EditorDone)
308+
if (m_pEditorGUI->GetActivatedPieSlice() == PieSliceType::EditorDone)
309309
{
310310
m_pEditorGUI->SetEditorGUIMode(SceneEditorGUI::INACTIVE);
311311

Source/Activities/EditorActivity.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ namespace RTE {
3838

3939
AbstractClassInfo(EditorActivity, Activity);
4040

41+
EditorActivity::EditorActivity() {
42+
Clear();
43+
}
44+
45+
EditorActivity::~EditorActivity() {
46+
Destroy(true);
47+
}
4148

4249
//////////////////////////////////////////////////////////////////////////////////////////
4350
// Method: Clear

Source/Activities/EditorActivity.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class EditorActivity : public Activity {
7373
// memory. Create() should be called before using the object.
7474
// Arguments: None.
7575

76-
EditorActivity() { Clear(); }
76+
EditorActivity();
7777

7878

7979
//////////////////////////////////////////////////////////////////////////////////////////
@@ -83,7 +83,7 @@ class EditorActivity : public Activity {
8383
// from system memory.
8484
// Arguments: None.
8585

86-
~EditorActivity() override { Destroy(true); }
86+
~EditorActivity() override;
8787

8888

8989
//////////////////////////////////////////////////////////////////////////////////////////

Source/Activities/GAScripted.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "Controller.h"
2828
#include "Scene.h"
2929
#include "Actor.h"
30+
#include "PieMenu.h"
3031

3132
#include "GUI.h"
3233
#include "GUIFont.h"

Source/Activities/GameActivity.cpp

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "HeldDevice.h"
3636
#include "Loadout.h"
3737
#include "SLTerrain.h"
38+
#include "PieMenu.h"
3839

3940
#include "GUI.h"
4041
#include "GUIFont.h"
@@ -50,6 +51,13 @@ namespace RTE {
5051

5152
AbstractClassInfo(GameActivity, Activity);
5253

54+
GameActivity::GameActivity() {
55+
Clear();
56+
}
57+
58+
GameActivity::~GameActivity() {
59+
Destroy(true);
60+
}
5361

5462
//////////////////////////////////////////////////////////////////////////////////////////
5563
// Method: Clear
@@ -1889,7 +1897,7 @@ void GameActivity::Update()
18891897
PieMenu *controlledActorPieMenu = m_ControlledActor[player]->GetPieMenu();
18901898
if (controlledActorPieMenu && m_ControlledActor[player]->GetController()->IsState(PIE_MENU_ACTIVE)) {
18911899
if (!m_BuyMenuEnabled && controlledActorPieMenu->IsEnabling()) {
1892-
controlledActorPieMenu->RemovePieSlicesByType(PieSlice::SliceType::BuyMenu);
1900+
controlledActorPieMenu->RemovePieSlicesByType(PieSliceType::BuyMenu);
18931901
}
18941902

18951903
if (controlledActorPieMenu->IsEnabled() && controlledActorPieMenu->HasSubPieMenuOpen() && m_InventoryMenuGUI[player]->GetMenuMode() == InventoryMenuGUI::MenuMode::Carousel) {
@@ -1902,21 +1910,21 @@ void GameActivity::Update()
19021910
m_InventoryMenuGUI[player]->SetEnabled(false);
19031911
}
19041912

1905-
if (PieSlice::SliceType command = controlledActorPieMenu->GetPieCommand(); command != PieSlice::SliceType::NoType) {
1913+
if (PieSliceType command = controlledActorPieMenu->GetPieCommand(); command != PieSliceType::NoType) {
19061914
// AI mode commands that need extra points set in special view modes here
19071915
//TODO I don't think these viewstates are actually used?!
1908-
if (command == PieSlice::SliceType::Sentry) {
1916+
if (command == PieSliceType::Sentry) {
19091917
m_ViewState[player] = ViewState::AISentryPoint;
1910-
} else if (command == PieSlice::SliceType::Patrol) {
1918+
} else if (command == PieSliceType::Patrol) {
19111919
m_ViewState[player] = ViewState::AIPatrolPoints;
1912-
} else if (command == PieSlice::SliceType::GoldDig) {
1920+
} else if (command == PieSliceType::GoldDig) {
19131921
m_ViewState[player] = ViewState::AIGoldDigPoint;
1914-
} else if (command == PieSlice::SliceType::GoTo) {
1922+
} else if (command == PieSliceType::GoTo) {
19151923
m_ViewState[player] = ViewState::AIGoToPoint;
19161924
m_ControlledActor[player]->ClearAIWaypoints();
19171925
m_ActorCursor[player] = m_ControlledActor[player]->GetPos();
19181926
m_ControlledActor[player]->GetController()->SetDisabled(true);
1919-
} else if (command == PieSlice::SliceType::FormSquad) {
1927+
} else if (command == PieSliceType::FormSquad) {
19201928
//Find out if we have any connected units, and disconnect them
19211929
bool isCommander = false;
19221930

@@ -1951,10 +1959,10 @@ void GameActivity::Update()
19511959
controlledActorPieMenu->SetEnabled(false);
19521960
}
19531961
}
1954-
} else if (command == PieSlice::SliceType::BuyMenu) {
1962+
} else if (command == PieSliceType::BuyMenu) {
19551963
m_pBuyGUI[player]->SetEnabled(true);
19561964
skipBuyUpdate = true;
1957-
} else if (command == PieSlice::SliceType::FullInventory) {
1965+
} else if (command == PieSliceType::FullInventory) {
19581966
controlledActorPieMenu->SetEnabled(false);
19591967
m_InventoryMenuGUI[player]->SetEnabled(false);
19601968
m_InventoryMenuGUI[player]->SetMenuMode(InventoryMenuGUI::MenuMode::Full);

Source/Activities/GameActivity.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class GameActivity : public Activity {
9494
// memory. Create() should be called before using the object.
9595
// Arguments: None.
9696

97-
GameActivity() { Clear(); }
97+
GameActivity();
9898

9999

100100
//////////////////////////////////////////////////////////////////////////////////////////
@@ -104,7 +104,7 @@ class GameActivity : public Activity {
104104
// from system memory.
105105
// Arguments: None.
106106

107-
~GameActivity() override { Destroy(true); }
107+
~GameActivity() override;
108108

109109

110110
//////////////////////////////////////////////////////////////////////////////////////////

Source/Activities/GibEditor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ void GibEditor::Update()
372372
m_NeedSave = m_NeedSave || m_pEditorGUI->EditMade();
373373

374374
// Get any mode change commands that the user gave the Editor GUI
375-
if (m_pEditorGUI->GetActivatedPieSlice() == PieSlice::SliceType::EditorNew && m_EditorMode != NEWDIALOG)
375+
if (m_pEditorGUI->GetActivatedPieSlice() == PieSliceType::EditorNew && m_EditorMode != NEWDIALOG)
376376
{
377377
m_pEditorGUI->SetEditorGUIMode(GibEditorGUI::INACTIVE);
378378
m_EditorMode = EditorActivity::NEWDIALOG;
@@ -386,14 +386,14 @@ void GibEditor::Update()
386386
m_EditorMode = EditorActivity::LOADDIALOG;
387387
m_ModeChange = true;
388388
}
389-
else if (m_pEditorGUI->GetActivatedPieSlice() == PieSlice::SliceType::EditorSave && m_EditorMode != SAVEDIALOG)
389+
else if (m_pEditorGUI->GetActivatedPieSlice() == PieSliceType::EditorSave && m_EditorMode != SAVEDIALOG)
390390
{
391391
m_pEditorGUI->SetEditorGUIMode(GibEditorGUI::INACTIVE);
392392
m_EditorMode = EditorActivity::SAVEDIALOG;
393393
m_ModeChange = true;
394394
}
395395
// Test the object by allowing the player to gib temporary test copy instances of the edited object
396-
else if (m_pEditorGUI->GetActivatedPieSlice() == PieSlice::SliceType::EditorDone)
396+
else if (m_pEditorGUI->GetActivatedPieSlice() == PieSliceType::EditorDone)
397397
{
398398
// Make the copy of the current edited object
399399
m_pTestingObject->DestroyScriptState();

0 commit comments

Comments
 (0)