aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2012-01-19 22:07:56 +1100
committerStrangerke2012-04-06 08:19:57 +0200
commitc2ce0cff4446435a013627e42d7ef16b16d6e81b (patch)
treef4ba4144716c800d71da9e556945fc2ad3f36bea
parent78a653b24583506c1229b080000643e70685b065 (diff)
downloadscummvm-rg350-c2ce0cff4446435a013627e42d7ef16b16d6e81b.tar.gz
scummvm-rg350-c2ce0cff4446435a013627e42d7ef16b16d6e81b.tar.bz2
scummvm-rg350-c2ce0cff4446435a013627e42d7ef16b16d6e81b.zip
MORTEVIELLE: Fix the calculation in the animof method
-rw-r--r--engines/mortevielle/level15.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/mortevielle/level15.cpp b/engines/mortevielle/level15.cpp
index 42e4393527..9243426c33 100644
--- a/engines/mortevielle/level15.cpp
+++ b/engines/mortevielle/level15.cpp
@@ -190,6 +190,9 @@ void adzon() {
f.close();
}
+/**
+ * Returns the offset within the compressed image data resource of the desired image
+ */
int animof(int ouf, int num) {
int nani, aux;
@@ -197,11 +200,8 @@ int animof(int ouf, int num) {
nani = mem[adani * 16 + 1];
aux = num;
if (ouf != 1) aux = aux + nani;
- animof_result = (nani << 2) + 2 + swap(READ_LE_UINT16(&mem[adani * 16 + (aux << 1)]));
- /*aux:= nani shl 2 + 2;
- if ouf=1 then aux:= aux+ swap(WRITE_LE_UINT16(&mem[adani: num shl 1])
- else aux:= aux+ swap(WRITE_LE_UINT16(&mem[adani: (nani+num) shl 1]);
- animof:=aux;*/
+ animof_result = (nani << 2) + 2 + READ_BE_UINT16(&mem[adani * 16 + (aux << 1)]);
+
return animof_result;
}