aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2019-12-13 18:49:33 +0100
committerEugene Sandulenko2019-12-13 18:49:33 +0100
commitfc2acdd8bb0fb44a151aaf12bbc7441988f4ac35 (patch)
treeff23ca6efdb6534c23776c1fd5d4c1fa892ed4e7 /engines
parent51bfa160e98322b15e4d35c29633920ef95c40dd (diff)
downloadscummvm-rg350-fc2acdd8bb0fb44a151aaf12bbc7441988f4ac35.tar.gz
scummvm-rg350-fc2acdd8bb0fb44a151aaf12bbc7441988f4ac35.tar.bz2
scummvm-rg350-fc2acdd8bb0fb44a151aaf12bbc7441988f4ac35.zip
DIRECTOR: Properly detect current label
Diffstat (limited to 'engines')
-rw-r--r--engines/director/score.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index e55a12a62d..c6317b9fd5 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -1324,6 +1324,15 @@ void Score::update() {
if (_currentFrame >= _frames.size())
return;
+ Common::SortedArray<Label *>::iterator i;
+ if (_labels != NULL) {
+ for (i = _labels->begin(); i != _labels->end(); ++i) {
+ if ((*i)->number == _currentFrame) {
+ _currentLabel = (*i)->name;
+ }
+ }
+ }
+
debugC(1, kDebugImages, "****************************** Current frame: %d", _currentFrame);
_surface->clear();
@@ -1346,15 +1355,6 @@ void Score::update() {
_lingo->processEvent(kEventNone);
// TODO Director 6 - another order
- Common::SortedArray<Label *>::iterator i;
- if (_labels != NULL) {
- for (i = _labels->begin(); i != _labels->end(); ++i) {
- if ((*i)->number == _currentFrame) {
- _currentLabel = (*i)->name;
- }
- }
- }
-
byte tempo = _frames[_currentFrame]->_tempo;
if (tempo) {