summaryrefslogtreecommitdiffhomepage
path: root/Stars45
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-03-09 20:29:54 +0100
committerAki <please@ignore.pl>2022-03-09 22:56:52 +0100
commite0dd50e4314a36fd99da0a7342b5ad88f449d33e (patch)
tree543766d28e3125c95067bdcab268055018fa6178 /Stars45
parentaf4e8e1717405963ff89a114832d376f937786da (diff)
downloadstarshatter-e0dd50e4314a36fd99da0a7342b5ad88f449d33e.zip
starshatter-e0dd50e4314a36fd99da0a7342b5ad88f449d33e.tar.gz
starshatter-e0dd50e4314a36fd99da0a7342b5ad88f449d33e.tar.bz2
Changed to access Pause through Game rather than derived classes
Diffstat (limited to 'Stars45')
-rw-r--r--Stars45/GameScreen.cpp20
-rw-r--r--Stars45/NetGameServer.cpp7
-rw-r--r--Stars45/QuitView.cpp4
3 files changed, 15 insertions, 16 deletions
diff --git a/Stars45/GameScreen.cpp b/Stars45/GameScreen.cpp
index 60382b1..353db2d 100644
--- a/Stars45/GameScreen.cpp
+++ b/Stars45/GameScreen.cpp
@@ -817,7 +817,7 @@ GameScreen::ShowAudDlg()
if (auddlg) {
if (quit_view) {
quit_view->CloseMenu();
- Starshatter::GetInstance()->Pause(true);
+ Game::GetInstance()->Pause(true);
}
HideAll();
@@ -865,7 +865,7 @@ GameScreen::ShowVidDlg()
if (viddlg) {
if (quit_view) {
quit_view->CloseMenu();
- Starshatter::GetInstance()->Pause(true);
+ Game::GetInstance()->Pause(true);
}
HideAll();
@@ -913,7 +913,7 @@ GameScreen::ShowOptDlg()
if (optdlg) {
if (quit_view) {
quit_view->CloseMenu();
- Starshatter::GetInstance()->Pause(true);
+ Game::GetInstance()->Pause(true);
}
HideAll();
@@ -961,7 +961,7 @@ GameScreen::ShowModDlg()
if (moddlg) {
if (quit_view) {
quit_view->CloseMenu();
- Starshatter::GetInstance()->Pause(true);
+ Game::GetInstance()->Pause(true);
}
HideAll();
@@ -1009,7 +1009,7 @@ GameScreen::ShowModInfoDlg()
if (moddlg && modInfoDlg) {
if (quit_view) {
quit_view->CloseMenu();
- Starshatter::GetInstance()->Pause(true);
+ Game::GetInstance()->Pause(true);
}
HideAll();
@@ -1053,7 +1053,7 @@ GameScreen::ShowCtlDlg()
if (ctldlg) {
if (quit_view) {
quit_view->CloseMenu();
- Starshatter::GetInstance()->Pause(true);
+ Game::GetInstance()->Pause(true);
}
HideAll();
@@ -1101,7 +1101,7 @@ GameScreen::ShowKeyDlg()
if (keydlg) {
if (quit_view) {
quit_view->CloseMenu();
- Starshatter::GetInstance()->Pause(true);
+ Game::GetInstance()->Pause(true);
}
HideAll();
@@ -1137,7 +1137,7 @@ GameScreen::ShowJoyDlg()
if (joydlg) {
if (quit_view) {
quit_view->CloseMenu();
- Starshatter::GetInstance()->Pause(true);
+ Game::GetInstance()->Pause(true);
}
HideAll();
@@ -1224,7 +1224,7 @@ GameScreen::ApplyOptions()
Mouse::Show(false);
screen->AddWindow(gamewin);
- Starshatter::GetInstance()->Pause(false);
+ Game::GetInstance()->Pause(false);
}
void
@@ -1248,5 +1248,5 @@ GameScreen::CancelOptions()
Mouse::Show(false);
screen->AddWindow(gamewin);
- Starshatter::GetInstance()->Pause(false);
+ Game::GetInstance()->Pause(false);
}
diff --git a/Stars45/NetGameServer.cpp b/Stars45/NetGameServer.cpp
index fe53515..9170a46 100644
--- a/Stars45/NetGameServer.cpp
+++ b/Stars45/NetGameServer.cpp
@@ -19,7 +19,6 @@
#include "NetUser.h"
#include "NetMsg.h"
#include "NetData.h"
-#include "StarServer.h"
#include "Ship.h"
#include "ShipDesign.h"
#include "Shield.h"
@@ -345,9 +344,9 @@ NetGameServer::DoJoinRequest(NetMsg* msg)
}
if (unpause) {
- StarServer* s = StarServer::GetInstance();
- if (s)
- s->Pause(false);
+ auto game = Game::GetInstance();
+ if (game)
+ game->Pause(false);
}
}
}
diff --git a/Stars45/QuitView.cpp b/Stars45/QuitView.cpp
index bc0b348..eaebce5 100644
--- a/Stars45/QuitView.cpp
+++ b/Stars45/QuitView.cpp
@@ -282,7 +282,7 @@ QuitView::ShowMenu()
}
Button::PlaySound(Button::SND_CONFIRM);
- Starshatter::GetInstance()->Pause(true);
+ Game::GetInstance()->Pause(true);
if (mouse_con) {
mouse_active = mouse_con->Active();
@@ -295,7 +295,7 @@ void
QuitView::CloseMenu()
{
show_menu = false;
- Starshatter::GetInstance()->Pause(false);
+ Game::GetInstance()->Pause(false);
if (mouse_con)
mouse_con->SetActive(mouse_active);