aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kernel.h1
-rw-r--r--engines/sci/engine/kernel_tables.h1
-rw-r--r--engines/sci/engine/kvideo.cpp5
-rw-r--r--engines/sci/graphics/video32.cpp9
-rw-r--r--engines/sci/graphics/video32.h5
5 files changed, 21 insertions, 0 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index c648cd0323..dd75f26320 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -477,6 +477,7 @@ reg_t kPlayVMDPlayUntilEvent(EngineState *s, int argc, reg_t *argv);
reg_t kPlayVMDShowCursor(EngineState *s, int argc, reg_t *argv);
reg_t kPlayVMDSetBlackoutArea(EngineState *s, int argc, reg_t *argv);
reg_t kPlayVMDRestrictPalette(EngineState *s, int argc, reg_t *argv);
+reg_t kPlayVMDSetPlane(EngineState *s, int argc, reg_t *argv);
reg_t kShowMovie32(EngineState *s, int argc, reg_t *argv);
reg_t kShowMovieWin(EngineState *s, int argc, reg_t *argv);
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index fd7415ba8f..716a8515a0 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -474,6 +474,7 @@ static const SciKernelMapSubEntry kPlayVMD_subops[] = {
{ SIG_SINCE_SCI21, 18, MAP_DUMMY(PlayVMDStopBlobs), "", NULL },
{ SIG_SINCE_SCI21, 21, MAP_CALL(PlayVMDSetBlackoutArea), "iiii", NULL },
{ SIG_SINCE_SCI21, 23, MAP_CALL(PlayVMDRestrictPalette), "ii", NULL },
+ { SIG_SCI3, 27, MAP_CALL(PlayVMDSetPlane), "i(i)", NULL },
{ SIG_SCI3, 28, MAP_EMPTY(PlayVMDSetPreload), "i", NULL },
SCI_SUBOPENTRY_TERMINATOR
};
diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp
index 6f93b041b5..9398e6d75e 100644
--- a/engines/sci/engine/kvideo.cpp
+++ b/engines/sci/engine/kvideo.cpp
@@ -471,6 +471,11 @@ reg_t kPlayVMDRestrictPalette(EngineState *s, int argc, reg_t *argv) {
return s->r_acc;
}
+reg_t kPlayVMDSetPlane(EngineState *s, int argc, reg_t *argv) {
+ g_sci->_video32->getVMDPlayer().setPlane(argv[0].toSint16(), argc > 1 ? argv[1] : NULL_REG);
+ return s->r_acc;
+}
+
reg_t kPlayDuck(EngineState *s, int argc, reg_t *argv) {
if (!s)
return make_reg(0, getSciVersion());
diff --git a/engines/sci/graphics/video32.cpp b/engines/sci/graphics/video32.cpp
index 1759e8e722..44bb00bf87 100644
--- a/engines/sci/graphics/video32.cpp
+++ b/engines/sci/graphics/video32.cpp
@@ -919,6 +919,15 @@ void VMDPlayer::fillPalette(Palette &palette) const {
}
}
+void VMDPlayer::setPlane(const int16 priority, const reg_t planeId) {
+ _priority = priority;
+ if (planeId != NULL_REG) {
+ _plane = g_sci->_gfxFrameout->getPlanes().findByObject(planeId);
+ assert(_plane != nullptr);
+ _planeIsOwned = false;
+ }
+}
+
#pragma mark -
#pragma mark VMDPlayer - Palette
diff --git a/engines/sci/graphics/video32.h b/engines/sci/graphics/video32.h
index 751604fd47..ae4767c183 100644
--- a/engines/sci/graphics/video32.h
+++ b/engines/sci/graphics/video32.h
@@ -363,6 +363,11 @@ public:
*/
void ignorePalettes() { _ignorePalettes = true; }
+ /**
+ * Sets the plane and plane priority used to render video.
+ */
+ void setPlane(const int16 priority, const reg_t planeId);
+
private:
/**
* The location of the VMD plane, in game script