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.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/engines/prince/animation.cpp b/engines/prince/animation.cpp
index 8edf9d04ee..587316fc19 100644
--- a/engines/prince/animation.cpp
+++ b/engines/prince/animation.cpp
@@ -77,24 +77,33 @@ int16 Animation::getZoom(uint16 offset) const {
return READ_LE_UINT16(_data + offset);
}
+// AH_Loop
int16 Animation::getLoopCount() const {
return READ_LE_UINT16(_data + 2);
}
+// AH_Fazy
+uint Animation::getPhaseCount() const {
+ return READ_LE_UINT16(_data + 4);
+}
+
+// AH_Ramki
+uint Animation::getFrameCount() const {
+ return READ_LE_UINT16(_data + 6);
+}
+
+// AH_X
int16 Animation::getBaseX() const {
return READ_LE_UINT16(_data + 8);
}
+// AH_Y
int16 Animation::getBaseY() const {
return READ_LE_UINT16(_data + 10);
}
-uint Animation::getPhaseCount() const {
- return READ_LE_UINT16(_data + 4);
-}
-
-uint Animation::getFrameCount() const {
- return READ_LE_UINT16(_data + 6);
+byte *Animation::getPhaseEntry(uint phaseIndex) const {
+ return _data + READ_LE_UINT32(_data + 12) + phaseIndex * 8;
}
int16 Animation::getPhaseOffsetX(uint phaseIndex) const {
@@ -145,11 +154,6 @@ Graphics::Surface *Animation::getFrame(uint frameIndex) {
}
return surf;
}
-
-byte *Animation::getPhaseEntry(uint phaseIndex) const {
- return _data + READ_LE_UINT32(_data + 12) + phaseIndex * 8;
-}
-
}
/* vim: set tabstop=4 noexpandtab: */