aboutsummaryrefslogtreecommitdiff
path: root/engines/lab
diff options
context:
space:
mode:
authorEugene Sandulenko2015-11-17 19:24:00 +0100
committerWillem Jan Palenstijn2015-12-23 21:33:41 +0100
commitd4e0c23ed311b3fc9b5ddfd2806a3c273f57c6d6 (patch)
treec71d7b3dbb32c27af9f1e51738aef34b3f56610d /engines/lab
parent3160bb0bc3fbb001a3f7c97ef865eb951c02209a (diff)
downloadscummvm-rg350-d4e0c23ed311b3fc9b5ddfd2806a3c273f57c6d6.tar.gz
scummvm-rg350-d4e0c23ed311b3fc9b5ddfd2806a3c273f57c6d6.tar.bz2
scummvm-rg350-d4e0c23ed311b3fc9b5ddfd2806a3c273f57c6d6.zip
LAB: Simplify code
Diffstat (limited to 'engines/lab')
-rw-r--r--engines/lab/undiff.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/engines/lab/undiff.cpp b/engines/lab/undiff.cpp
index d9d53a3031..f7610d99ce 100644
--- a/engines/lab/undiff.cpp
+++ b/engines/lab/undiff.cpp
@@ -29,6 +29,7 @@
*/
#include "lab/stddefines.h"
+#include "common/endian.h"
namespace Lab {
@@ -107,9 +108,9 @@ static void unDIFFByteWord(uint16 *Dest, uint16 *diff) {
if (skip == 255) {
if (copy == 0) {
- skip = swapUShort(*diff);
+ skip = READ_LE_UINT16(diff);
diff++;
- copy = swapUShort(*diff);
+ copy = READ_LE_UINT16(diff);
diff++;
} else if (copy == 255)
return;
@@ -118,19 +119,19 @@ static void unDIFFByteWord(uint16 *Dest, uint16 *diff) {
Dest += skip;
while (copy > 3) {
- *Dest = *diff; //swapUShort(*diff);
+ *Dest = READ_LE_UINT16(diff);
Dest++;
diff++;
- *Dest = *diff; //swapUShort(*diff);
+ *Dest = READ_LE_UINT16(diff);
Dest++;
diff++;
- *Dest = *diff; //swapUShort(*diff);
+ *Dest = READ_LE_UINT16(diff);
Dest++;
diff++;
- *Dest = *diff; //swapUShort(*diff);
+ *Dest = READ_LE_UINT16(diff);
Dest++;
diff++;
@@ -138,7 +139,7 @@ static void unDIFFByteWord(uint16 *Dest, uint16 *diff) {
}
while (copy) {
- *Dest = *diff; //swapUShort(*diff);
+ *Dest = READ_LE_UINT16(diff);
Dest++;
diff++;
copy--;