This commit is contained in:
2025-10-27 18:35:53 +01:00
parent b1dca32a5b
commit 3179a08dac
63 changed files with 686 additions and 693 deletions

View File

@@ -6,7 +6,7 @@ DeltaTimer::DeltaTimer() noexcept
time_scale_(1.0F) {
}
float DeltaTimer::tick() noexcept {
auto DeltaTimer::tick() noexcept -> float {
const Uint64 NOW = SDL_GetPerformanceCounter();
const Uint64 DIFF = (NOW > last_counter_) ? (NOW - last_counter_) : 0;
last_counter_ = NOW;
@@ -14,7 +14,7 @@ float DeltaTimer::tick() noexcept {
return static_cast<float>(SECONDS * static_cast<double>(time_scale_));
}
float DeltaTimer::peek() const noexcept {
auto DeltaTimer::peek() const noexcept -> float {
const Uint64 NOW = SDL_GetPerformanceCounter();
const Uint64 DIFF = (NOW > last_counter_) ? (NOW - last_counter_) : 0;
const double SECONDS = static_cast<double>(DIFF) / perf_freq_;
@@ -33,7 +33,6 @@ void DeltaTimer::setTimeScale(float scale) noexcept {
time_scale_ = std::max(scale, 0.0F);
}
float DeltaTimer::getTimeScale() const noexcept {
auto DeltaTimer::getTimeScale() const noexcept -> float {
return time_scale_;
}