summaryrefslogtreecommitdiffhomepage
path: root/StarsEx/DebriefDlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'StarsEx/DebriefDlg.cpp')
-rw-r--r--StarsEx/DebriefDlg.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/StarsEx/DebriefDlg.cpp b/StarsEx/DebriefDlg.cpp
index a0a2b30..f6abdd1 100644
--- a/StarsEx/DebriefDlg.cpp
+++ b/StarsEx/DebriefDlg.cpp
@@ -13,7 +13,6 @@
#include "DebriefDlg.h"
#include "PlanScreen.h"
-#include "Starshatter.h"
#include "Campaign.h"
#include "Element.h"
#include "Instruction.h"
@@ -38,7 +37,6 @@
#include "ListBox.h"
#include "Slider.h"
#include "ParseUtil.h"
-#include "Panic.h"
#include "Game.h"
// +--------------------------------------------------------------------+
@@ -355,20 +353,13 @@ DebriefDlg::OnClose(AWEvent* event)
}
else {
- Starshatter* stars = Starshatter::GetInstance();
-
- if (stars) {
+ if (auto game = Game::GetInstance()) {
Mouse::Show(false);
-
Campaign* campaign = Campaign::GetCampaign();
if (campaign && campaign->GetCampaignId() < Campaign::SINGLE_MISSIONS)
- stars->SetGameMode(Game::CMPN_MODE);
+ game->SetGameMode(Game::CMPN_MODE);
else
- stars->SetGameMode(Game::MENU_MODE);
- }
-
- else {
- Panic::Panic("DebriefDlg::OnClose() - Game instance not found");
+ game->SetGameMode(Game::MENU_MODE);
}
}
}