aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen
diff options
context:
space:
mode:
authorPaul Gilbert2017-12-14 21:50:47 -0500
committerPaul Gilbert2017-12-14 21:50:47 -0500
commitf281985680f9c7c317670dbcf0a79a92100042c0 (patch)
tree547634c50996df502d576ef640613bfa5fdfd0bf /engines/xeen
parent86640604d7c4ac84131cb3ea0d9a23e5ad7200a0 (diff)
downloadscummvm-rg350-f281985680f9c7c317670dbcf0a79a92100042c0.tar.gz
scummvm-rg350-f281985680f9c7c317670dbcf0a79a92100042c0.tar.bz2
scummvm-rg350-f281985680f9c7c317670dbcf0a79a92100042c0.zip
XEEN: Renaming of cutscene subtitle code
Diffstat (limited to 'engines/xeen')
-rw-r--r--engines/xeen/locations.cpp27
-rw-r--r--engines/xeen/locations.h6
2 files changed, 19 insertions, 14 deletions
diff --git a/engines/xeen/locations.cpp b/engines/xeen/locations.cpp
index 9e6bfc9e5f..08041394d9 100644
--- a/engines/xeen/locations.cpp
+++ b/engines/xeen/locations.cpp
@@ -1108,17 +1108,22 @@ ArenaLocation::ArenaLocation() : BaseLocation(ARENA) {
/*------------------------------------------------------------------------*/
+const char *const CUTSCENE_SUBTITLE = "\xC""35\x3""c\xB""190\t000%s";
+
CutsceneLocation::CutsceneLocation(LocationAction action) : BaseLocation(action),
- _animCtr(0), _mazeFlag(false) {
+ _subtitleCtr(0), _mazeFlag(false) {
+ EventsManager &events = *g_vm->_events;
Party &party = *g_vm->_party;
_mazeId = party._mazeId;
_mazePos = party._mazePosition;
_mazeDir = party._mazeDirection;
+ loadStrings("special.bin");
_boxSprites.load("box.vga");
+ events.timeMark3();
}
-void CutsceneLocation::cutsceneAnimUpdate() {
+void CutsceneLocation::updateSubtitles() {
// TODO
}
@@ -1215,9 +1220,9 @@ int ReaperCutscene::show() {
sprites2.draw(0, frame, Common::Point(160, 0));
}
- cutsceneAnimUpdate();
+ updateSubtitles();
events.wait(2);
- } while (!g_vm->shouldQuit() && (sound.isPlaying() || _animCtr));
+ } while (!g_vm->shouldQuit() && (sound.isPlaying() || _subtitleCtr));
sprites2.draw(0, 0, Common::Point(0, 0));
if (_isDarkCc)
@@ -1486,9 +1491,9 @@ int GolemCutscene::show() {
g_vm->getRandomNumber(9) - 3));
}
- cutsceneAnimUpdate();
+ updateSubtitles();
events.wait(1);
- } while (!g_vm->shouldQuit() && (sound.isPlaying() || _animCtr));
+ } while (!g_vm->shouldQuit() && (sound.isPlaying() || _subtitleCtr));
sprites1.draw(0, 0, Common::Point(0, 0));
sprites1.draw(0, 1, Common::Point(160, 0));
@@ -1742,7 +1747,7 @@ int DwarfCutscene::show() {
if (_isDarkCc) {
sprites2.draw(0, 0);
sprites3.draw(0, 0);
- cutsceneAnimUpdate();
+ updateSubtitles();
events.timeMark5();
while (!g_vm->shouldQuit() && events.timeElapsed5() < 7)
@@ -1763,12 +1768,12 @@ int DwarfCutscene::show() {
do {
sprites2.draw(0, 0);
sprites3.draw(0, g_vm->getRandomNumber(_isDarkCc ? 8 : 9));
- cutsceneAnimUpdate();
+ updateSubtitles();
events.timeMark5();
while (!g_vm->shouldQuit() && events.timeElapsed5() < 2)
events.pollEventsAndWait();
- } while (!g_vm->shouldQuit() && (sound.isPlaying() || _animCtr));
+ } while (!g_vm->shouldQuit() && (sound.isPlaying() || _subtitleCtr));
while (!g_vm->shouldQuit() && events.timeElapsed() < 3)
events.pollEventsAndWait();
@@ -1935,10 +1940,10 @@ int SphinxCutscene::show() {
sprites1.draw(0, 0, Common::Point(0, 0));
sprites1.draw(0, 1, Common::Point(160, 0));
sprites1.draw(0, g_vm->getRandomNumber(2, 10));
- cutsceneAnimUpdate();
+ updateSubtitles();
events.wait(1);
- } while (!g_vm->shouldQuit() && (sound.isPlaying() || _animCtr));
+ } while (!g_vm->shouldQuit() && (sound.isPlaying() || _subtitleCtr));
sprites1.draw(0, 0, Common::Point(0, 0));
sprites1.draw(0, 1, Common::Point(160, 0));
diff --git a/engines/xeen/locations.h b/engines/xeen/locations.h
index 89be896d39..e23c3406fd 100644
--- a/engines/xeen/locations.h
+++ b/engines/xeen/locations.h
@@ -243,7 +243,7 @@ public:
class CutsceneLocation : public BaseLocation {
protected:
- int _animCtr;
+ int _subtitleCtr;
SpriteResource _boxSprites;
int _mazeId;
Direction _mazeDir;
@@ -251,9 +251,9 @@ protected:
bool _mazeFlag;
protected:
/**
- * Handles cutscene animation update
+ * Handles updating cutscene subtitles
*/
- void cutsceneAnimUpdate();
+ void updateSubtitles();
/**
* Sets the new location