aboutsummaryrefslogtreecommitdiff
path: root/engines/prince/animation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/prince/animation.cpp')
-rw-r--r--engines/prince/animation.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/engines/prince/animation.cpp b/engines/prince/animation.cpp
index a4df4e30cc..adf96b5f00 100644
--- a/engines/prince/animation.cpp
+++ b/engines/prince/animation.cpp
@@ -57,6 +57,27 @@ void Animation::clear() {
}
}
+// AH_ID
+bool Animation::testId() const {
+ char id[2];
+ id[0] = (char)READ_LE_UINT16(_data);
+ id[1] = (char)READ_LE_UINT16(_data + 1);
+ if (id[0] == 'A' && id[1] == 'N') {
+ return true; // normal animation
+ }
+ return false;
+}
+
+// AH_ID - x diff
+int8 Animation::getIdXDiff() const {
+ return (int8)READ_LE_UINT16(_data);
+}
+
+// AH_ID - y diff
+int8 Animation::getIdYDiff() const {
+ return (int8)READ_LE_UINT16(_data + 1);
+}
+
// AH_Loop
int16 Animation::getLoopCount() const {
return READ_LE_UINT16(_data + 2);