aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/cutscenes.h
diff options
context:
space:
mode:
authorPaul Gilbert2018-03-10 20:12:25 -0500
committerPaul Gilbert2018-03-10 20:12:25 -0500
commit5b72fbdcbd7f2c2c8191d6c362e84ec53628516b (patch)
tree07e8fe3371a23c794ce7467b55f5c2cf1ec18376 /engines/xeen/cutscenes.h
parent32268c8caa578fb0847096336436b76f9889d2d8 (diff)
downloadscummvm-rg350-5b72fbdcbd7f2c2c8191d6c362e84ec53628516b.tar.gz
scummvm-rg350-5b72fbdcbd7f2c2c8191d6c362e84ec53628516b.tar.bz2
scummvm-rg350-5b72fbdcbd7f2c2c8191d6c362e84ec53628516b.zip
XEEN: Implementing subtitles display logic
Diffstat (limited to 'engines/xeen/cutscenes.h')
-rw-r--r--engines/xeen/cutscenes.h54
1 files changed, 8 insertions, 46 deletions
diff --git a/engines/xeen/cutscenes.h b/engines/xeen/cutscenes.h
index aa5501442d..b3bc778b73 100644
--- a/engines/xeen/cutscenes.h
+++ b/engines/xeen/cutscenes.h
@@ -28,62 +28,24 @@
namespace Xeen {
-#define WAIT(time) events.updateGameCounter(); \
- if (events.wait(time)) \
- return false
+#define WAIT(TIME) \
+ events.timeMark5(); \
+ do { \
+ events.updateGameCounter(); \
+ if (events.wait(1)) \
+ return false; \
+ } while (!g_vm->shouldExit() && events.timeElapsed5() < TIME)
class XeenEngine;
class Cutscenes {
protected:
XeenEngine *_vm;
- StringArray _subtitles;
- SpriteResource *_boxSprites;
- uint _timeElapsed;
- Common::String _subtitleLine;
- uint _subtitleLineNum, _subtitleSize;
protected:
- Cutscenes(XeenEngine *vm) : _vm(vm), _timeElapsed(0), _boxSprites(nullptr),
- _subtitleLineNum(0), _subtitleSize(0) {}
+ Cutscenes(XeenEngine *vm) : _vm(vm) {}
virtual ~Cutscenes() {}
/**
- * Resets the subtitles position
- */
- void resetSubtitles(uint lineNum, uint defaultSize = 1);
-
- /**
- * Free subtitles
- */
- void freeSubtitles();
-
- /**
- * Shows subtitles
- */
- void showSubtitles(uint windowIndex = 0);
-
- /**
- * Delays either the specified number of frames, or until
- * an entire subtitle line is shown if subtitles are on
- */
- bool subtitlesWait(uint minTime = 0);
-
- /**
- * Wait for the end of currently playing sound or subtitles line
- */
- bool waitForLineOrSound();
-
- /**
- * Records the current execution time
- */
- void recordTime();
-
- /**
- * Returns the number of ticks since the last recordTime
- */
- uint timeElapsed();
-
- /**
* Get a speaking frame from a range
*/
uint getSpeakingFrame(uint minFrame, uint maxFrame);