[Scummvm-git-logs] scummvm master -> f281985680f9c7c317670dbcf0a79a92100042c0
dreammaster
dreammaster at scummvm.org
Fri Dec 15 03:50:59 CET 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f281985680 XEEN: Renaming of cutscene subtitle code
Commit: f281985680f9c7c317670dbcf0a79a92100042c0
https://github.com/scummvm/scummvm/commit/f281985680f9c7c317670dbcf0a79a92100042c0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-12-14T21:50:47-05:00
Commit Message:
XEEN: Renaming of cutscene subtitle code
Changed paths:
engines/xeen/locations.cpp
engines/xeen/locations.h
diff --git a/engines/xeen/locations.cpp b/engines/xeen/locations.cpp
index 9e6bfc9..0804139 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 89be896..e23c340 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
More information about the Scummvm-git-logs
mailing list