22#ifndef COLONY_INTRO_TIMING_H
23#define COLONY_INTRO_TIMING_H
25#include "common/scummsys.h"
33 : _nextStepTime(startTime), _stepDuration(stepDuration) {
34 assert(stepDuration > 0);
37 uint32 stepsDue(uint32 now)
const {
38 const int32 elapsed = now - _nextStepTime;
39 return elapsed >= 0 ? 1 + uint32(elapsed) / _stepDuration : 0;
42 uint32 timeToNextStep(uint32 now)
const {
43 const int32 remaining = _nextStepTime - now;
44 return remaining > 0 ? uint32(remaining) : 0;
48 _nextStepTime += _stepDuration;
53 const uint32 _stepDuration;
Definition: intro_timing.h:30