diff options
author | Dmitry Iskrich | 2016-06-26 18:32:51 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | cc9d17c5eb9db7fc52d8407e401a14072ab9c5d7 (patch) | |
tree | 956c6e829b4fa8c8318477b2f862b28b001d7a94 /engines/director/score.cpp | |
parent | 9524980508c0702ae9eb114fcddc1f0be3edfc50 (diff) | |
download | scummvm-rg350-cc9d17c5eb9db7fc52d8407e401a14072ab9c5d7.tar.gz scummvm-rg350-cc9d17c5eb9db7fc52d8407e401a14072ab9c5d7.tar.bz2 scummvm-rg350-cc9d17c5eb9db7fc52d8407e401a14072ab9c5d7.zip |
DIRECTOR: Support goto command in Score
Diffstat (limited to 'engines/director/score.cpp')
-rw-r--r-- | engines/director/score.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/engines/director/score.cpp b/engines/director/score.cpp index 74285a6866..da220439ea 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -338,6 +338,19 @@ void Score::loadScriptText(Common::SeekableReadStream &stream) { _movieScriptCount++; } +void Score::setStartToLabel(Common::String label) { + Common::HashMap<uint16, Common::String>::iterator i; + + for (i = _labels.begin(); i != _labels.end(); ++i) { + if (i->_value == label) { + _currentFrame = i->_key; + return; + } + } + + warning("Label %s not found", label.c_str()); +} + void Score::dumpScript(uint16 id, ScriptType type, Common::String script) { Common::DumpFile out; Common::String typeName; @@ -556,7 +569,7 @@ void Score::startLoop() { _trailSurface->create(_movieRect.width(), _movieRect.height()); if (_stageColor == 0) - _trailSurface->clear(15); + _trailSurface->clear(_vm->getPaletteColorCount() - 1); else _trailSurface->clear(_stageColor); |