diff options
author | Strangerke | 2014-08-11 23:03:49 +0200 |
---|---|---|
committer | Strangerke | 2014-08-11 23:03:49 +0200 |
commit | 5344143027b87fa38203dbdd97f2f6fd68a566b2 (patch) | |
tree | 2b99a4f1b787a6f947bc4071affd6d6ef7bfad53 /engines | |
parent | a0b9afded37693673485549d41d3b3513bcb2dab (diff) | |
download | scummvm-rg350-5344143027b87fa38203dbdd97f2f6fd68a566b2.tar.gz scummvm-rg350-5344143027b87fa38203dbdd97f2f6fd68a566b2.tar.bz2 scummvm-rg350-5344143027b87fa38203dbdd97f2f6fd68a566b2.zip |
ACCESS: Implement cmdCheckFrame
Diffstat (limited to 'engines')
-rw-r--r-- | engines/access/scripts.cpp | 14 | ||||
-rw-r--r-- | engines/access/scripts.h | 2 |
2 files changed, 13 insertions, 3 deletions
diff --git a/engines/access/scripts.cpp b/engines/access/scripts.cpp index 8018f503a3..aa1bfcd71c 100644 --- a/engines/access/scripts.cpp +++ b/engines/access/scripts.cpp @@ -89,7 +89,7 @@ void Scripts::executeCommand(int commandIndex) { &Scripts::cmdSetFlag, &Scripts::cmdCheckFlag, &Scripts::cmdGoto, &Scripts::cmdSetInventory, &Scripts::cmdSetInventory, &Scripts::cmdCheckInventory, &Scripts::CMDSETTEX, &Scripts::CMDNEWROOM, &Scripts::CMDCONVERSE, - &Scripts::CMDCHECKFRAME, &Scripts::cmdCheckAnim, &Scripts::CMDSND, + &Scripts::cmdCheckFrame, &Scripts::cmdCheckAnim, &Scripts::CMDSND, &Scripts::cmdRetNeg, &Scripts::cmdRetPos, &Scripts::cmdCheckLoc, &Scripts::cmdSetAnim, &Scripts::CMDDISPINV, &Scripts::CMDSETTIMER, &Scripts::CMDSETTIMER, &Scripts::CMDCHECKTIMER, &Scripts::cmdSetTravel, @@ -222,7 +222,17 @@ void Scripts::cmdCheckInventory() { void Scripts::CMDSETTEX() { error("TODO"); } void Scripts::CMDNEWROOM() { error("TODO"); } void Scripts::CMDCONVERSE() { error("TODO"); } -void Scripts::CMDCHECKFRAME() { error("TODO"); } + +void Scripts::cmdCheckFrame() { + int id = _data->readUint16LE(); + Animation *anim = _vm->_animation->findAnimation(id); + + int frame = _data->readUint16LE(); + if (anim->_frameNumber == frame) + cmdGoto(); + else + _data->skip(2); +} void Scripts::cmdCheckAnim() { int id = _data->readUint16LE(); diff --git a/engines/access/scripts.h b/engines/access/scripts.h index c8f951deae..3832f0d0e1 100644 --- a/engines/access/scripts.h +++ b/engines/access/scripts.h @@ -66,7 +66,7 @@ protected: void CMDSETTEX(); void CMDNEWROOM(); void CMDCONVERSE(); - void CMDCHECKFRAME(); + void cmdCheckFrame(); void cmdCheckAnim(); void CMDSND(); void cmdRetNeg(); |