ACCESS: Implement a couple of script functions
This commit is contained in:
parent
a0beb08984
commit
9e84be664c
6 changed files with 23 additions and 5 deletions
|
@ -107,6 +107,7 @@ AccessEngine::AccessEngine(OSystem *syst, const AccessGameDescription *gameDesc)
|
||||||
_txtPages = 0;
|
_txtPages = 0;
|
||||||
_sndSubFile = 0;
|
_sndSubFile = 0;
|
||||||
_loadSaveSlot = -1;
|
_loadSaveSlot = -1;
|
||||||
|
_vidX = _vidY = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
AccessEngine::~AccessEngine() {
|
AccessEngine::~AccessEngine() {
|
||||||
|
@ -171,6 +172,7 @@ void AccessEngine::initialize() {
|
||||||
|
|
||||||
_buffer1.create(g_system->getWidth() + TILE_WIDTH, g_system->getHeight());
|
_buffer1.create(g_system->getWidth() + TILE_WIDTH, g_system->getHeight());
|
||||||
_buffer2.create(g_system->getWidth(), 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 requested, load a savegame instead of showing the intro
|
||||||
if (ConfMan.hasKey("save_slot")) {
|
if (ConfMan.hasKey("save_slot")) {
|
||||||
|
|
|
@ -156,6 +156,8 @@ public:
|
||||||
ASurface *_current;
|
ASurface *_current;
|
||||||
ASurface _buffer1;
|
ASurface _buffer1;
|
||||||
ASurface _buffer2;
|
ASurface _buffer2;
|
||||||
|
ASurface _vidBuf;
|
||||||
|
int _vidX, _vidY;
|
||||||
Common::Array<CharEntry *> _charTable;
|
Common::Array<CharEntry *> _charTable;
|
||||||
SpriteResource *_objectsTable[100];
|
SpriteResource *_objectsTable[100];
|
||||||
bool _establishTable[100];
|
bool _establishTable[100];
|
||||||
|
|
|
@ -123,7 +123,7 @@ void Scripts::executeCommand(int commandIndex) {
|
||||||
&Scripts::cmdSetTravel, &Scripts::cmdSetVideo, &Scripts::cmdPlayVideo,
|
&Scripts::cmdSetTravel, &Scripts::cmdSetVideo, &Scripts::cmdPlayVideo,
|
||||||
&Scripts::cmdPlotImage, &Scripts::cmdSetDisplay, &Scripts::cmdSetBuffer,
|
&Scripts::cmdPlotImage, &Scripts::cmdSetDisplay, &Scripts::cmdSetBuffer,
|
||||||
&Scripts::cmdSetScroll, &Scripts::cmdVideoEnded, &Scripts::cmdVideoEnded,
|
&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::cmdSpecial, &Scripts::cmdSpecial, &Scripts::cmdSpecial,
|
||||||
&Scripts::cmdSetCycle, &Scripts::cmdCycle, &Scripts::cmdCharSpeak,
|
&Scripts::cmdSetCycle, &Scripts::cmdCycle, &Scripts::cmdCharSpeak,
|
||||||
&Scripts::cmdTexSpeak, &Scripts::cmdTexChoice, &Scripts::cmdWait,
|
&Scripts::cmdTexSpeak, &Scripts::cmdTexChoice, &Scripts::cmdWait,
|
||||||
|
@ -497,8 +497,19 @@ void Scripts::cmdVideoEnded() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Scripts::CMDSETBUFVID() { error("TODO CMDSETBUFVID"); }
|
void Scripts::cmdSetBufVid() {
|
||||||
void Scripts::CMDPLAYBUFVID() { error("TODO CMDPLAYBUFVID"); }
|
_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() {
|
void Scripts::cmdRemoveLast() {
|
||||||
--_vm->_numAnimTimers;
|
--_vm->_numAnimTimers;
|
||||||
|
|
|
@ -98,7 +98,7 @@ protected:
|
||||||
void cmdSetBuffer();
|
void cmdSetBuffer();
|
||||||
void cmdSetScroll();
|
void cmdSetScroll();
|
||||||
void cmdVideoEnded();
|
void cmdVideoEnded();
|
||||||
void CMDSETBUFVID();
|
void cmdSetBufVid();
|
||||||
void CMDPLAYBUFVID();
|
void CMDPLAYBUFVID();
|
||||||
void cmdRemoveLast();
|
void cmdRemoveLast();
|
||||||
void cmdSpecial();
|
void cmdSpecial();
|
||||||
|
|
|
@ -140,5 +140,7 @@ void VideoPlayer::playVideo() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void VideoPlayer::copyVideo() {
|
||||||
|
warning("TODO: copyVideo");
|
||||||
|
}
|
||||||
} // End of namespace Access
|
} // End of namespace Access
|
||||||
|
|
|
@ -69,6 +69,7 @@ public:
|
||||||
*/
|
*/
|
||||||
void playVideo();
|
void playVideo();
|
||||||
|
|
||||||
|
void copyVideo();
|
||||||
/**
|
/**
|
||||||
* Frees the data for a previously loaded video
|
* Frees the data for a previously loaded video
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue