From db03f429fd1dd171e4b4c78b7db92717a04be8c4 Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 2 Oct 2021 15:08:30 +0200 Subject: Fixed 'not' keyword usage as identifier --- Stars45/Campaign.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Stars45/Campaign.cpp') diff --git a/Stars45/Campaign.cpp b/Stars45/Campaign.cpp index 499e36a..9a88e5d 100644 --- a/Stars45/Campaign.cpp +++ b/Stars45/Campaign.cpp @@ -848,7 +848,7 @@ Campaign::ParseAction(TermStruct* val, const char* filename) int act = 0; int stat = CombatAction::COMPLETE; - bool not = false; + bool _not = false; Combatant* c1 = 0; Combatant* c2 = 0; @@ -870,7 +870,7 @@ Campaign::ParseAction(TermStruct* val, const char* filename) stat = CombatAction::StatusFromName(txt); } else if (pdef2->name()->value() == "not") { - GetDefBool(not, pdef2, filename); + GetDefBool(_not, pdef2, filename); } else if (pdef2->name()->value() == "c1") { @@ -913,7 +913,7 @@ Campaign::ParseAction(TermStruct* val, const char* filename) } if (act) - action->AddRequirement(act, stat, not); + action->AddRequirement(act, stat, _not); else if (gtype) action->AddRequirement(c1, gtype, gid, comp, score, intel); -- cgit v1.1 From d2fc3ad2272f7cc850ef95fbe803c10e8746ad86 Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 2 Oct 2021 21:34:32 +0200 Subject: Switched to long doubles instead of doing manual FPU manipulation --- Stars45/Campaign.cpp | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'Stars45/Campaign.cpp') diff --git a/Stars45/Campaign.cpp b/Stars45/Campaign.cpp index 9a88e5d..1b23d14 100644 --- a/Stars45/Campaign.cpp +++ b/Stars45/Campaign.cpp @@ -1871,7 +1871,7 @@ Campaign::SetMissionId(int id) // +--------------------------------------------------------------------+ -double +long double Campaign::Stardate() { return StarSystem::Stardate(); @@ -2058,8 +2058,6 @@ Campaign::CheckPlayerGroup() // +--------------------------------------------------------------------+ -void FPU2Extended(); -void FPURestore(); void Campaign::StartMission() @@ -2070,14 +2068,12 @@ Campaign::StartMission() ::Print("\n\nCampaign Start Mission - %d. '%s'\n", m->Identity(), m->Name()); if (!scripted) { - FPU2Extended(); - - double gtime = (double) Game::GameTime() / 1000.0; - double base = startTime + m->Start() - 15 - gtime; + long double gtime = (long double) Game::GameTime() / 1000.0; + long double base = startTime + m->Start() - 15 - gtime; StarSystem::SetBaseTime(base); - double current_time = Stardate() - startTime; + long double current_time = Stardate() - startTime; char buffer[32]; FormatDayTime(buffer, current_time); @@ -2099,14 +2095,12 @@ Campaign::RollbackMission() if (m) { if (!scripted) { - FPU2Extended(); - - double gtime = (double) Game::GameTime() / 1000.0; - double base = startTime + m->Start() - 60 - gtime; + long double gtime = (long double) Game::GameTime() / 1000.0; + long double base = startTime + m->Start() - 60 - gtime; StarSystem::SetBaseTime(base); - double current_time = Stardate() - startTime; + long double current_time = Stardate() - startTime; ::Print(" mission start: %d\n", m->Start()); ::Print(" current time: %d\n", (int) current_time); } -- cgit v1.1