From c6a361c127b7f4d9b81b5ad37c2ca6ed7de317ee Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Sat, 2 Jun 2012 22:31:15 +0000 Subject: REmoving STARSHATTER_DEMO ifdefs and setting version string to 5.1.66 --- Stars45/CmpSelectDlg.cpp | 15 --------------- Stars45/CmpnScreen.cpp | 9 --------- Stars45/Main.cpp | 6 +----- Stars45/ModConfig.cpp | 9 --------- Stars45/ModDlg.cpp | 6 ------ Stars45/NetAuth.cpp | 11 ----------- Stars45/StarServer.cpp | 24 ------------------------ Stars45/Starshatter.cpp | 2 -- 8 files changed, 1 insertion(+), 81 deletions(-) diff --git a/Stars45/CmpSelectDlg.cpp b/Stars45/CmpSelectDlg.cpp index 0608fe7..0dc07bc 100644 --- a/Stars45/CmpSelectDlg.cpp +++ b/Stars45/CmpSelectDlg.cpp @@ -248,14 +248,6 @@ CmpSelectDlg::ShowNewCampaigns() // if campaign is not available, show the grayed-out image -#ifdef STARSHATTER_DEMO_RELEASE - // DEMO VERSION (only one campaign): - if (c->GetCampaignId() > 2) { - images[n]->CopyBitmap(*c->GetImage(2)); - lst_campaigns->SetItemImage(n, images[n]); - } - -#else // FULL GAME CRITERIA (based on player record): if (c->GetCampaignId() > 2 && c->GetCampaignId() < 10 && !player->HasCompletedCampaign(c->GetCampaignId()-1)) { @@ -273,7 +265,6 @@ CmpSelectDlg::ShowNewCampaigns() } // NOTE: Campaigns 10, 20, and 30-99 are always enabled if they exist! -#endif } } } @@ -363,15 +354,9 @@ CmpSelectDlg::OnCampaignSelect(AWEvent* event) Campaign* c = list[i]; // is campaign available? - -#ifdef STARSHATTER_DEMO_RELEASE - // DEMO VERSION (only one campaign): - if (c->GetCampaignId() <= 2) -#else // FULL GAME CRITERIA (based on player record): if (c->GetCampaignId() <= 2 || player->HasCompletedCampaign(c->GetCampaignId()-1)) -#endif { if (lst_campaigns->IsSelected(i)) { diff --git a/Stars45/CmpnScreen.cpp b/Stars45/CmpnScreen.cpp index 6e20cd6..97a6930 100644 --- a/Stars45/CmpnScreen.cpp +++ b/Stars45/CmpnScreen.cpp @@ -290,15 +290,6 @@ CmpnScreen::ExecFrame() } } -#ifdef STARSHATTER_DEMO_RELEASE - if (!campaign->IsTraining()) { - Mouse::Show(false); - MusicDirector::SetMode(MusicDirector::MENU); - stars->SetGameMode(Starshatter::MENU_MODE); - return; - } -#endif - // continue on to the next available campaign: if (campaign->GetCampaignId() < Campaign::GetLastCampaignId()) { stars->StartOrResumeGame(); diff --git a/Stars45/Main.cpp b/Stars45/Main.cpp index e7fc64a..a762ddd 100644 --- a/Stars45/Main.cpp +++ b/Stars45/Main.cpp @@ -38,11 +38,7 @@ extern FILE* ErrLog; extern int VD3D_describe_things; int dump_missions = 0; -#ifdef STARSHATTER_DEMO_RELEASE -const char* versionInfo = "5.0 DEMO"; -#else -const char* versionInfo = "5.0.5"; -#endif +const char* versionInfo = "5.1.0"; static void PrintLogHeader() { diff --git a/Stars45/ModConfig.cpp b/Stars45/ModConfig.cpp index 5ee818e..6651fe4 100644 --- a/Stars45/ModConfig.cpp +++ b/Stars45/ModConfig.cpp @@ -226,9 +226,6 @@ ModConfig::Deploy() if (enabled.size() < 1) return; -#ifdef STARSHATTER_DEMO_RELEASE - Print("\nPACKAGED MODS ARE NOT SUPPORTED IN THIS DEMO\n"); -#else Print("\nDEPLOYING MODS\n--------------\n"); int i = 1; @@ -259,7 +256,6 @@ ModConfig::Deploy() Print("\n"); Game::UseLocale(0); -#endif } void @@ -288,10 +284,6 @@ ModConfig::Redeploy() void ModConfig::EnableMod(const char* name) { -#ifdef STARSHATTER_DEMO_RELEASE - DisableMod(name); -#else - if (!name || !*name) return; @@ -319,7 +311,6 @@ ModConfig::EnableMod(const char* name) } } } -#endif } void diff --git a/Stars45/ModDlg.cpp b/Stars45/ModDlg.cpp index 8cdec43..5aa54d9 100644 --- a/Stars45/ModDlg.cpp +++ b/Stars45/ModDlg.cpp @@ -234,15 +234,9 @@ ModDlg::OnSelectEnabled(AWEvent* event) void ModDlg::OnSelectDisabled(AWEvent* event) { -#ifdef STARSHATTER_DEMO_RELEASE - if (btn_enable) { - btn_enable->SetEnabled(false); - } -#else if (btn_enable && lst_disabled) { btn_enable->SetEnabled(lst_disabled->GetSelCount() == 1); } -#endif } void diff --git a/Stars45/NetAuth.cpp b/Stars45/NetAuth.cpp index 700a876..d9d5121 100644 --- a/Stars45/NetAuth.cpp +++ b/Stars45/NetAuth.cpp @@ -134,21 +134,10 @@ NetAuth::CreateAuthResponse(int level, const char* salt) ModConfig* config = ModConfig::GetInstance(); if (level == NET_AUTH_SECURE) { - -#ifdef STARSHATTER_DEMO_RELEASE - - response += "exe "; - response += Digest(salt, "StarDemo.exe"); // XXX should look up name of this exe - response += " "; - -#else - response += "exe "; response += Digest(salt, "stars.exe"); // XXX should look up name of this exe response += " "; -#endif - response += "dat "; response += Digest(salt, "shatter.dat"); response += " "; diff --git a/Stars45/StarServer.cpp b/Stars45/StarServer.cpp index daba657..0de6cd8 100644 --- a/Stars45/StarServer.cpp +++ b/Stars45/StarServer.cpp @@ -94,10 +94,8 @@ admin_server(0), lobby_server(0) exit(-1); } -#ifndef STARSHATTER_DEMO_RELEASE if (loader->FindFile("start.dat")) loader->EnableDatafile("start.dat"); -#endif // no images or sounds in server mode: loader->EnableMedia(false); @@ -492,26 +490,6 @@ DWORD WINAPI StarServerRestartProc(LPVOID link) Sleep(3000); -#ifdef STARSHATTER_DEMO_RELEASE - - if (stars) { - char cmdline[256]; - strcpy_s(cmdline, "StarDemo -server"); - - STARTUPINFO s; - ZeroMemory(&s, sizeof(s)); - s.cb = sizeof(s); - - PROCESS_INFORMATION pi; - ZeroMemory(&pi, sizeof(pi)); - - CreateProcess("StarDemo.exe", cmdline, 0, 0, 0, 0, 0, 0, &s, &pi); - stars->Exit(); - return 0; - } - -#else - if (stars) { char cmdline[256]; strcpy_s(cmdline, "stars -server"); @@ -530,8 +508,6 @@ DWORD WINAPI StarServerRestartProc(LPVOID link) return 0; } -#endif - return (DWORD) E_POINTER; } diff --git a/Stars45/Starshatter.cpp b/Stars45/Starshatter.cpp index fe31a21..13404bc 100644 --- a/Stars45/Starshatter.cpp +++ b/Stars45/Starshatter.cpp @@ -187,10 +187,8 @@ chat_mode(0), exit_time(1.2), cutscene(0) if (loader->FindFile("vox.dat")) loader->EnableDatafile("vox.dat"); -#ifndef STARSHATTER_DEMO_RELEASE if (loader->FindFile("start.dat")) loader->EnableDatafile("start.dat"); -#endif loadstat = loader->EnableDatafile("content.dat"); -- cgit v1.1