diff options
author | Strangerke | 2014-11-23 22:21:48 +0100 |
---|---|---|
committer | Paul Gilbert | 2014-12-12 22:39:56 -0500 |
commit | 9e84be664cab90788aa67049732bc6be1e5b6209 (patch) | |
tree | 8073fa2cb2c12ac18a4c330473a57e022427646b | |
parent | a0beb08984b989d6dcb1c9dcbc8bb083e2534891 (diff) | |
download | scummvm-rg350-9e84be664cab90788aa67049732bc6be1e5b6209.tar.gz scummvm-rg350-9e84be664cab90788aa67049732bc6be1e5b6209.tar.bz2 scummvm-rg350-9e84be664cab90788aa67049732bc6be1e5b6209.zip |
ACCESS: Implement a couple of script functions
-rw-r--r-- | engines/access/access.cpp | 2 | ||||
-rw-r--r-- | engines/access/access.h | 2 | ||||
-rw-r--r-- | engines/access/scripts.cpp | 17 | ||||
-rw-r--r-- | engines/access/scripts.h | 2 | ||||
-rw-r--r-- | engines/access/video.cpp | 4 | ||||
-rw-r--r-- | engines/access/video.h | 1 |
6 files changed, 23 insertions, 5 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp index cb47598066..cdabb323e4 100644 --- a/engines/access/access.cpp +++ b/engines/access/access.cpp @@ -107,6 +107,7 @@ AccessEngine::AccessEngine(OSystem *syst, const AccessGameDescription *gameDesc) _txtPages = 0; _sndSubFile = 0; _loadSaveSlot = -1; + _vidX = _vidY = 0; } AccessEngine::~AccessEngine() { @@ -171,6 +172,7 @@ void AccessEngine::initialize() { _buffer1.create(g_system->getWidth() + TILE_WIDTH, g_system->getHeight()); _buffer2.create(g_system->getWidth(), g_system->getHeight()); + _vidBuf.create(160, 101); // If requested, load a savegame instead of showing the intro if (ConfMan.hasKey("save_slot")) { diff --git a/engines/access/access.h b/engines/access/access.h index 12e0e1bd5e..2cd35fbf1d 100644 --- a/engines/access/access.h +++ b/engines/access/access.h @@ -156,6 +156,8 @@ public: ASurface *_current; ASurface _buffer1; ASurface _buffer2; + ASurface _vidBuf; + int _vidX, _vidY; Common::Array<CharEntry *> _charTable; SpriteResource *_objectsTable[100]; bool _establishTable[100]; diff --git a/engines/access/scripts.cpp b/engines/access/scripts.cpp index 3f94ea2e55..442d91d255 100644 --- a/engines/access/scripts.cpp +++ b/engines/access/scripts.cpp @@ -123,7 +123,7 @@ void Scripts::executeCommand(int commandIndex) { &Scripts::cmdSetTravel, &Scripts::cmdSetVideo, &Scripts::cmdPlayVideo, &Scripts::cmdPlotImage, &Scripts::cmdSetDisplay, &Scripts::cmdSetBuffer, &Scripts::cmdSetScroll, &Scripts::cmdVideoEnded, &Scripts::cmdVideoEnded, - &Scripts::CMDSETBUFVID, &Scripts::CMDPLAYBUFVID, &Scripts::cmdRemoveLast, + &Scripts::cmdSetBufVid, &Scripts::CMDPLAYBUFVID, &Scripts::cmdRemoveLast, &Scripts::cmdSpecial, &Scripts::cmdSpecial, &Scripts::cmdSpecial, &Scripts::cmdSetCycle, &Scripts::cmdCycle, &Scripts::cmdCharSpeak, &Scripts::cmdTexSpeak, &Scripts::cmdTexChoice, &Scripts::cmdWait, @@ -497,8 +497,19 @@ void Scripts::cmdVideoEnded() { } } -void Scripts::CMDSETBUFVID() { error("TODO CMDSETBUFVID"); } -void Scripts::CMDPLAYBUFVID() { error("TODO CMDPLAYBUFVID"); } +void Scripts::cmdSetBufVid() { + _vm->_vidX = _data->readUint16LE(); + _vm->_vidY = _data->readUint16LE(); + int idx = _data->readUint16LE(); + int rate = _data->readUint16LE(); + + _vm->_video->setVideo(&_vm->_vidBuf, Common::Point(0, 0), FileIdent(_vm->_extraCells[idx]._vid._fileNum, _vm->_extraCells[idx]._vid._subfile), rate); +} + +void Scripts::CMDPLAYBUFVID() { + _vm->_video->playVideo(); + _vm->_video->copyVideo(); +} void Scripts::cmdRemoveLast() { --_vm->_numAnimTimers; diff --git a/engines/access/scripts.h b/engines/access/scripts.h index de27ae7205..aa9b266c0c 100644 --- a/engines/access/scripts.h +++ b/engines/access/scripts.h @@ -98,7 +98,7 @@ protected: void cmdSetBuffer(); void cmdSetScroll(); void cmdVideoEnded(); - void CMDSETBUFVID(); + void cmdSetBufVid(); void CMDPLAYBUFVID(); void cmdRemoveLast(); void cmdSpecial(); diff --git a/engines/access/video.cpp b/engines/access/video.cpp index b46bdf240f..539ad34b8c 100644 --- a/engines/access/video.cpp +++ b/engines/access/video.cpp @@ -140,5 +140,7 @@ void VideoPlayer::playVideo() { } } - +void VideoPlayer::copyVideo() { + warning("TODO: copyVideo"); +} } // End of namespace Access diff --git a/engines/access/video.h b/engines/access/video.h index b49c876a07..f4be76de31 100644 --- a/engines/access/video.h +++ b/engines/access/video.h @@ -69,6 +69,7 @@ public: */ void playVideo(); + void copyVideo(); /** * Frees the data for a previously loaded video */ |