diff options
author | sluicebox | 2019-12-04 09:06:35 -0800 |
---|---|---|
committer | sluicebox | 2019-12-04 09:11:21 -0800 |
commit | 05b21ace680d65336219a74cd87696eb157f7e84 (patch) | |
tree | b9dfd3ee22c83ee9fd6211a058a05b5c4dd3dafc /engines/sci/engine | |
parent | da9c7d3d5bb5b64f026d20eabfa8f3cb4297867b (diff) | |
download | scummvm-rg350-05b21ace680d65336219a74cd87696eb157f7e84.tar.gz scummvm-rg350-05b21ace680d65336219a74cd87696eb157f7e84.tar.bz2 scummvm-rg350-05b21ace680d65336219a74cd87696eb157f7e84.zip |
SCI32: Implement VMD Censorship Blobs
Phantasmagoria 1's censorship mode is now supported
Trac #11229
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kernel.h | 4 | ||||
-rw-r--r-- | engines/sci/engine/kernel_tables.h | 9 | ||||
-rw-r--r-- | engines/sci/engine/kvideo.cpp | 26 |
3 files changed, 34 insertions, 5 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index f88afccfbe..cbbfaefc45 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -463,6 +463,10 @@ reg_t kPlayVMDIgnorePalettes(EngineState *s, int argc, reg_t *argv); reg_t kPlayVMDGetStatus(EngineState *s, int argc, reg_t *argv); reg_t kPlayVMDPlayUntilEvent(EngineState *s, int argc, reg_t *argv); reg_t kPlayVMDShowCursor(EngineState *s, int argc, reg_t *argv); +reg_t kPlayVMDStartBlob(EngineState *s, int argc, reg_t *argv); +reg_t kPlayVMDStopBlobs(EngineState *s, int argc, reg_t *argv); +reg_t kPlayVMDAddBlob(EngineState *s, int argc, reg_t *argv); +reg_t kPlayVMDDeleteBlob(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); diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 77b442eb39..3d8c256ff9 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -468,11 +468,10 @@ static const SciKernelMapSubEntry kPlayVMD_subops[] = { { SIG_SINCE_SCI21, 10, MAP_CALL(PlayVMDGetStatus), "", NULL }, { SIG_SINCE_SCI21, 14, MAP_CALL(PlayVMDPlayUntilEvent), "i(i)(i)", NULL }, { SIG_SINCE_SCI21, 16, MAP_CALL(PlayVMDShowCursor), "i", NULL }, - // TODO: implement blob subops to pixelate Phant1 videos when censored mode is enabled - { SIG_SINCE_SCI21, 17, MAP_EMPTY(PlayVMDStartBlob), "", NULL }, - { SIG_SINCE_SCI21, 18, MAP_EMPTY(PlayVMDStopBlobs), "", NULL }, - { SIG_SINCE_SCI21, 19, MAP_EMPTY(PlayVMDAddBlob), "iiiii", NULL }, - { SIG_SINCE_SCI21, 20, MAP_EMPTY(PlayVMDDeleteBlob), "i", NULL }, + { SIG_SINCE_SCI21, 17, MAP_CALL(PlayVMDStartBlob), "", NULL }, + { SIG_SINCE_SCI21, 18, MAP_CALL(PlayVMDStopBlobs), "", NULL }, + { SIG_SINCE_SCI21, 19, MAP_CALL(PlayVMDAddBlob), "iiiii", NULL }, + { SIG_SINCE_SCI21, 20, MAP_CALL(PlayVMDDeleteBlob), "i", 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 }, diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index 03ed698f17..72762a668e 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -435,6 +435,32 @@ reg_t kPlayVMDShowCursor(EngineState *s, int argc, reg_t *argv) { return s->r_acc; } +reg_t kPlayVMDStartBlob(EngineState *s, int argc, reg_t *argv) { + g_sci->_video32->getVMDPlayer().deleteBlobs(); + return NULL_REG; +} + +reg_t kPlayVMDStopBlobs(EngineState *s, int argc, reg_t *argv) { + g_sci->_video32->getVMDPlayer().deleteBlobs(); + return NULL_REG; +} + +reg_t kPlayVMDAddBlob(EngineState *s, int argc, reg_t *argv) { + int16 squareSize = argv[0].toSint16(); + int16 top = argv[1].toSint16(); + int16 left = argv[2].toSint16(); + int16 bottom = argv[3].toSint16(); + int16 right = argv[4].toSint16(); + int16 blobNumber = g_sci->_video32->getVMDPlayer().addBlob(squareSize, top, left, bottom, right); + return make_reg(0, blobNumber); +} + +reg_t kPlayVMDDeleteBlob(EngineState *s, int argc, reg_t *argv) { + int16 blobNumber = argv[0].toSint16(); + g_sci->_video32->getVMDPlayer().deleteBlob(blobNumber); + return SIGNAL_REG; +} + reg_t kPlayVMDSetBlackoutArea(EngineState *s, int argc, reg_t *argv) { const int16 scriptWidth = g_sci->_gfxFrameout->getScriptWidth(); const int16 scriptHeight = g_sci->_gfxFrameout->getScriptHeight(); |