aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/access/scripts.cpp14
-rw-r--r--engines/access/scripts.h2
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();