ACCESS: Implement 3 more opcodes

This commit is contained in:
Strangerke 2014-08-10 17:49:44 +02:00
parent cce0c2ff97
commit 00f7a3404d
4 changed files with 29 additions and 8 deletions

View File

@ -44,6 +44,7 @@ AccessEngine::AccessEngine(OSystem *syst, const AccessGameDescription *gameDesc)
_sound = nullptr;
_destIn = nullptr;
_current = nullptr;
clearCellTable();
_pCount = 0;
_selectCommand = 0;

View File

@ -115,6 +115,7 @@ public:
SoundManager *_sound;
ASurface *_destIn;
ASurface *_current;
ASurface _buffer1;
ASurface _buffer2;
byte *_objectsTable[100];

View File

@ -90,11 +90,11 @@ void Scripts::executeCommand(int commandIndex) {
&Scripts::cmdSetInventory, &Scripts::cmdSetInventory, &Scripts::cmdCheckInventory,
&Scripts::CMDSETTEX, &Scripts::CMDNEWROOM, &Scripts::CMDCONVERSE,
&Scripts::CMDCHECKFRAME, &Scripts::cmdCheckAnim, &Scripts::CMDSND,
&Scripts::CMDRETNEG, &Scripts::cmdRetPos, &Scripts::cmdCheckLoc,
&Scripts::cmdRetNeg, &Scripts::cmdRetPos, &Scripts::cmdCheckLoc,
&Scripts::cmdSetAnim, &Scripts::CMDDISPINV, &Scripts::CMDSETTIMER,
&Scripts::CMDSETTIMER, &Scripts::CMDCHECKTIMER, &Scripts::CMDSETTRAVEL,
&Scripts::CMDSETTRAVEL, &Scripts::CMDSETVID, &Scripts::CMDPLAYVID,
&Scripts::CMDPLOTIMAGE, &Scripts::CMDSETDISPLAY, &Scripts::CMDSETBUFFER,
&Scripts::cmdPlotImage, &Scripts::cmdSetDisplay, &Scripts::CMDSETBUFFER,
&Scripts::CMDSETSCROLL, &Scripts::CMDSAVERECT, &Scripts::CMDSAVERECT,
&Scripts::CMDSETBUFVID, &Scripts::CMDPLAYBUFVID, &Scripts::cmeRemoveLast,
&Scripts::CMDSPECIAL, &Scripts::CMDSPECIAL, &Scripts::CMDSPECIAL,
@ -233,7 +233,11 @@ void Scripts::cmdCheckAnim() {
}
void Scripts::CMDSND() { }
void Scripts::CMDRETNEG() { }
void Scripts::cmdRetNeg() {
_endFlag = true;
_returnCode = -1;
}
void Scripts::cmdCheckLoc() {
int minX = _data->readUint16LE();
@ -262,8 +266,23 @@ void Scripts::CMDCHECKTIMER() { }
void Scripts::CMDSETTRAVEL() { }
void Scripts::CMDSETVID() { }
void Scripts::CMDPLAYVID() { }
void Scripts::CMDPLOTIMAGE() { }
void Scripts::CMDSETDISPLAY() { }
void Scripts::cmdPlotImage() {
_vm->_destIn = _vm->_current;
int destX = _data->readUint16LE();
int destY = _data->readUint16LE();
int objId = _data->readUint16LE();
int imgId = _data->readUint16LE();
_vm->_screen->plotImage(_vm->_objectsTable[objId], imgId, Common::Point(destX, destY));
}
void Scripts::cmdSetDisplay() {
_vm->_screen->setDisplayScan();
_vm->_current = _vm->_screen;
}
void Scripts::CMDSETBUFFER() { }
void Scripts::CMDSETSCROLL() { }
void Scripts::CMDSAVERECT() { }

View File

@ -69,7 +69,7 @@ protected:
void CMDCHECKFRAME();
void cmdCheckAnim();
void CMDSND();
void CMDRETNEG();
void cmdRetNeg();
void cmdCheckLoc();
void cmdSetAnim();
void CMDDISPINV();
@ -78,8 +78,8 @@ protected:
void CMDSETTRAVEL();
void CMDSETVID();
void CMDPLAYVID();
void CMDPLOTIMAGE();
void CMDSETDISPLAY();
void cmdPlotImage();
void cmdSetDisplay();
void CMDSETBUFFER();
void CMDSETSCROLL();
void CMDSAVERECT();