aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorMatthew Hoops2012-07-22 23:17:36 -0400
committerMatthew Hoops2012-07-22 23:17:36 -0400
commitd4231fda1cb2399e123054ddaaeca2b4c2749966 (patch)
treea87675430acb1db2310c296e5548187d2534db08 /engines/sci/engine
parent0f0c6f935443212d76422959d040b87fc78d02c7 (diff)
downloadscummvm-rg350-d4231fda1cb2399e123054ddaaeca2b4c2749966.tar.gz
scummvm-rg350-d4231fda1cb2399e123054ddaaeca2b4c2749966.tar.bz2
scummvm-rg350-d4231fda1cb2399e123054ddaaeca2b4c2749966.zip
SCI: Rewrite RobotDecoder to use the AdvancedVideoDecoder API
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kvideo.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp
index 2c1532cc46..456f860493 100644
--- a/engines/sci/engine/kvideo.cpp
+++ b/engines/sci/engine/kvideo.cpp
@@ -254,6 +254,7 @@ reg_t kRobot(EngineState *s, int argc, reg_t *argv) {
int16 y = argv[5].toUint16();
warning("kRobot(init), id %d, obj %04x:%04x, flag %d, x=%d, y=%d", id, PRINT_REG(obj), flag, x, y);
g_sci->_robotDecoder->load(id);
+ g_sci->_robotDecoder->start();
g_sci->_robotDecoder->setPos(x, y);
}
break;
@@ -269,13 +270,13 @@ reg_t kRobot(EngineState *s, int argc, reg_t *argv) {
warning("kRobot(%d)", subop);
break;
case 8: // sync
- //if (false) { // debug: automatically skip all robot videos
- if ((uint32)g_sci->_robotDecoder->getCurFrame() != g_sci->_robotDecoder->getFrameCount() - 1) {
- writeSelector(s->_segMan, argv[1], SELECTOR(signal), NULL_REG);
- } else {
+ //if (true) { // debug: automatically skip all robot videos
+ if (g_sci->_robotDecoder->endOfVideo()) {
g_sci->_robotDecoder->close();
// Signal the engine scripts that the video is done
writeSelector(s->_segMan, argv[1], SELECTOR(signal), SIGNAL_REG);
+ } else {
+ writeSelector(s->_segMan, argv[1], SELECTOR(signal), NULL_REG);
}
break;
default: