diff options
author | Aki <please@ignore.pl> | 2021-10-02 21:34:32 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2021-10-02 21:34:32 +0200 |
commit | d2fc3ad2272f7cc850ef95fbe803c10e8746ad86 (patch) | |
tree | 988f56af14d52ff2452ea7bb2da06a11736afa39 /Stars45/Campaign.cpp | |
parent | 03bdf9c0fe25d3d9e765c13a2d18048088c3a3a0 (diff) | |
download | starshatter-d2fc3ad2272f7cc850ef95fbe803c10e8746ad86.zip starshatter-d2fc3ad2272f7cc850ef95fbe803c10e8746ad86.tar.gz starshatter-d2fc3ad2272f7cc850ef95fbe803c10e8746ad86.tar.bz2 |
Switched to long doubles instead of doing manual FPU manipulation
Diffstat (limited to 'Stars45/Campaign.cpp')
-rw-r--r-- | Stars45/Campaign.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
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); } |