aboutsummaryrefslogtreecommitdiff
path: root/engines/cryomni3d/versailles/engine.h
diff options
context:
space:
mode:
authorLe Philousophe2019-05-20 20:56:35 +0200
committerEugene Sandulenko2019-06-01 22:43:48 +0200
commit01f6e2db12aa980aa316b80bc0e4b29e58cf2b5e (patch)
treedf1db24186d6e4027c01cc4f3c954ac139155f66 /engines/cryomni3d/versailles/engine.h
parentedf2fdb12880b2b96beb3a753da4c1ad44b0bbf4 (diff)
downloadscummvm-rg350-01f6e2db12aa980aa316b80bc0e4b29e58cf2b5e.tar.gz
scummvm-rg350-01f6e2db12aa980aa316b80bc0e4b29e58cf2b5e.tar.bz2
scummvm-rg350-01f6e2db12aa980aa316b80bc0e4b29e58cf2b5e.zip
CRYOMNI3D: Implement countdown
Diffstat (limited to 'engines/cryomni3d/versailles/engine.h')
-rw-r--r--engines/cryomni3d/versailles/engine.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/engines/cryomni3d/versailles/engine.h b/engines/cryomni3d/versailles/engine.h
index e958e3ccb5..abfb1a4026 100644
--- a/engines/cryomni3d/versailles/engine.h
+++ b/engines/cryomni3d/versailles/engine.h
@@ -155,7 +155,7 @@ struct GameVariables {
kUsedVaubanBlueprint2, // OK // 40
kSeenMemorandum, // OK
kCollectScissors, // OK
- kSavedCountdown, // TODO: calculate it in real time
+ kSavedCountdown, // OK
kMax
};
};
@@ -309,7 +309,7 @@ private:
bool canVisit() const;
Common::String getSaveFileName(bool visit, unsigned int saveNum) const;
void getSavesList(bool visit, Common::Array<Common::String> &saveNames);
- void saveGame(bool visit, unsigned int saveNum, const Common::String &saveName) const;
+ void saveGame(bool visit, unsigned int saveNum, const Common::String &saveName);
bool loadGame(bool visit, unsigned int saveNum);
void animateCursor(const Object *object);
@@ -397,6 +397,20 @@ private:
static const MsgBoxParameters kFixedimageMsgBoxParameters;
static const FixedImageConfiguration kFixedImageConfiguration;
+ // Countdown
+ void initCountdown();
+ void syncCountdown();
+ inline bool countDown() { if (_countingDown) { return doCountDown(); } else { return false; } }
+ inline void drawCountdown(Graphics::ManagedSurface *surface = nullptr) { if (_countingDown) { doDrawCountdown(surface); } }
+ void drawCountdownVideo(unsigned int frameNum) { drawCountdown(); }
+
+ bool _countingDown;
+ unsigned int _countdownNextEvent;
+ char _countdownValue[6];
+ Graphics::ManagedSurface _countdownSurface;
+ bool doCountDown();
+ void doDrawCountdown(Graphics::ManagedSurface *surface);
+
// Objects
template<unsigned int ID>
void genericDisplayObject();