diff options
Diffstat (limited to 'Stars45/LoadScreen.cpp')
-rw-r--r-- | Stars45/LoadScreen.cpp | 136 |
1 files changed, 68 insertions, 68 deletions
diff --git a/Stars45/LoadScreen.cpp b/Stars45/LoadScreen.cpp index 337a19d..6e436b6 100644 --- a/Stars45/LoadScreen.cpp +++ b/Stars45/LoadScreen.cpp @@ -1,10 +1,10 @@ /* Project Starshatter 4.5
- Destroyer Studios LLC
- Copyright © 1997-2004. All Rights Reserved.
+ Destroyer Studios LLC
+ Copyright © 1997-2004. All Rights Reserved.
- SUBSYSTEM: Stars
- FILE: LoadScreen.cpp
- AUTHOR: John DiCamillo
+ SUBSYSTEM: Stars
+ FILE: LoadScreen.cpp
+ AUTHOR: John DiCamillo
*/
@@ -31,12 +31,12 @@ // +--------------------------------------------------------------------+
LoadScreen::LoadScreen()
- : screen(0), load_dlg(0), cmp_load_dlg(0), isShown(false)
+: screen(0), load_dlg(0), cmp_load_dlg(0), isShown(false)
{ }
LoadScreen::~LoadScreen()
{
- TearDown();
+ TearDown();
}
// +--------------------------------------------------------------------+
@@ -44,25 +44,25 @@ LoadScreen::~LoadScreen() void
LoadScreen::Setup(Screen* s)
{
- if (!s)
- return;
+ if (!s)
+ return;
- screen = s;
+ screen = s;
- DataLoader* loader = DataLoader::GetLoader();
- loader->UseFileSystem(true);
+ DataLoader* loader = DataLoader::GetLoader();
+ loader->UseFileSystem(true);
- // create windows
- FormDef load_def("LoadDlg", 0);
- load_def.Load("LoadDlg");
- load_dlg = new(__FILE__,__LINE__) LoadDlg(screen, load_def);
+ // create windows
+ FormDef load_def("LoadDlg", 0);
+ load_def.Load("LoadDlg");
+ load_dlg = new(__FILE__,__LINE__) LoadDlg(screen, load_def);
- FormDef cmp_load_def("CmpLoadDlg", 0);
- cmp_load_def.Load("CmpLoadDlg");
- cmp_load_dlg = new(__FILE__,__LINE__) CmpLoadDlg(screen, cmp_load_def);
+ FormDef cmp_load_def("CmpLoadDlg", 0);
+ cmp_load_def.Load("CmpLoadDlg");
+ cmp_load_dlg = new(__FILE__,__LINE__) CmpLoadDlg(screen, cmp_load_def);
- loader->UseFileSystem(Starshatter::UseFileSystem());
- ShowLoadDlg();
+ loader->UseFileSystem(Starshatter::UseFileSystem());
+ ShowLoadDlg();
}
// +--------------------------------------------------------------------+
@@ -70,17 +70,17 @@ LoadScreen::Setup(Screen* s) void
LoadScreen::TearDown()
{
- if (screen) {
- if (load_dlg) screen->DelWindow(load_dlg);
- if (cmp_load_dlg) screen->DelWindow(cmp_load_dlg);
- }
+ if (screen) {
+ if (load_dlg) screen->DelWindow(load_dlg);
+ if (cmp_load_dlg) screen->DelWindow(cmp_load_dlg);
+ }
- delete load_dlg;
- delete cmp_load_dlg;
+ delete load_dlg;
+ delete cmp_load_dlg;
- load_dlg = 0;
- cmp_load_dlg = 0;
- screen = 0;
+ load_dlg = 0;
+ cmp_load_dlg = 0;
+ screen = 0;
}
// +--------------------------------------------------------------------+
@@ -88,13 +88,13 @@ LoadScreen::TearDown() void
LoadScreen::ExecFrame()
{
- Game::SetScreenColor(Color::Black);
+ Game::SetScreenColor(Color::Black);
- if (load_dlg && load_dlg->IsShown())
- load_dlg->ExecFrame();
+ if (load_dlg && load_dlg->IsShown())
+ load_dlg->ExecFrame();
- if (cmp_load_dlg && cmp_load_dlg->IsShown())
- cmp_load_dlg->ExecFrame();
+ if (cmp_load_dlg && cmp_load_dlg->IsShown())
+ cmp_load_dlg->ExecFrame();
}
// +--------------------------------------------------------------------+
@@ -102,25 +102,25 @@ LoadScreen::ExecFrame() bool
LoadScreen::CloseTopmost()
{
- return false;
+ return false;
}
void
LoadScreen::Show()
{
- if (!isShown) {
- ShowLoadDlg();
- isShown = true;
- }
+ if (!isShown) {
+ ShowLoadDlg();
+ isShown = true;
+ }
}
void
LoadScreen::Hide()
{
- if (isShown) {
- HideLoadDlg();
- isShown = false;
- }
+ if (isShown) {
+ HideLoadDlg();
+ isShown = false;
+ }
}
// +--------------------------------------------------------------------+
@@ -128,26 +128,26 @@ LoadScreen::Hide() void
LoadScreen::ShowLoadDlg()
{
- if (load_dlg) load_dlg->Hide();
- if (cmp_load_dlg) cmp_load_dlg->Hide();
-
- Starshatter* stars = Starshatter::GetInstance();
-
- // show campaign load dialog if available and loading campaign
- if (stars && cmp_load_dlg) {
- if (stars->GetGameMode() == Starshatter::CLOD_MODE ||
- stars->GetGameMode() == Starshatter::CMPN_MODE) {
- cmp_load_dlg->Show();
- Mouse::Show(false);
- return;
- }
- }
-
- // otherwise, show regular load dialog
- if (load_dlg) {
- load_dlg->Show();
- Mouse::Show(false);
- }
+ if (load_dlg) load_dlg->Hide();
+ if (cmp_load_dlg) cmp_load_dlg->Hide();
+
+ Starshatter* stars = Starshatter::GetInstance();
+
+ // show campaign load dialog if available and loading campaign
+ if (stars && cmp_load_dlg) {
+ if (stars->GetGameMode() == Starshatter::CLOD_MODE ||
+ stars->GetGameMode() == Starshatter::CMPN_MODE) {
+ cmp_load_dlg->Show();
+ Mouse::Show(false);
+ return;
+ }
+ }
+
+ // otherwise, show regular load dialog
+ if (load_dlg) {
+ load_dlg->Show();
+ Mouse::Show(false);
+ }
}
// +--------------------------------------------------------------------+
@@ -155,9 +155,9 @@ LoadScreen::ShowLoadDlg() void
LoadScreen::HideLoadDlg()
{
- if (load_dlg && load_dlg->IsShown())
- load_dlg->Hide();
+ if (load_dlg && load_dlg->IsShown())
+ load_dlg->Hide();
- if (cmp_load_dlg && cmp_load_dlg->IsShown())
- cmp_load_dlg->Hide();
+ if (cmp_load_dlg && cmp_load_dlg->IsShown())
+ cmp_load_dlg->Hide();
}
|