aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2015-02-24 13:09:52 +0200
committerEugene Sandulenko2015-12-15 00:05:02 +0100
commita83c50cf66e72d105ef64b29a10e3f9603e0141b (patch)
tree8c86213a4c6b3845c9babfeca0c97879cbc31ee3 /engines
parent465f5f0c09bbdafa98bf5e0d1743bb1944a53621 (diff)
downloadscummvm-rg350-a83c50cf66e72d105ef64b29a10e3f9603e0141b.tar.gz
scummvm-rg350-a83c50cf66e72d105ef64b29a10e3f9603e0141b.tar.bz2
scummvm-rg350-a83c50cf66e72d105ef64b29a10e3f9603e0141b.zip
LAB: Remove duplicate swap code and some unused defines
Diffstat (limited to 'engines')
-rw-r--r--engines/lab/map.cpp2
-rw-r--r--engines/lab/readdiff.cpp24
-rw-r--r--engines/lab/stddefines.h11
3 files changed, 13 insertions, 24 deletions
diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp
index f51bf86716..b6b4415b11 100644
--- a/engines/lab/map.cpp
+++ b/engines/lab/map.cpp
@@ -291,7 +291,7 @@ static bool loadMapData() {
for (counter = 1; counter <= MaxRooms; counter++) {
swapUShortPtr(&Maps[counter].x, 4);
- swapULongPtr(&Maps[counter].MapFlags, 1);
+ swapULong(&Maps[counter].MapFlags);
}
} else
return false;
diff --git a/engines/lab/readdiff.cpp b/engines/lab/readdiff.cpp
index 66bfa80274..5eb62878a9 100644
--- a/engines/lab/readdiff.cpp
+++ b/engines/lab/readdiff.cpp
@@ -205,9 +205,9 @@ void diffNextFrame() {
g_music->updateMusic();
readBlock(&header, 4L, difffile);
- swapULongPtr(&header, 1);
+ swapULong(&header);
readBlock(&size, 4L, difffile);
- swapULongPtr(&size, 1);
+ swapULong(&size);
processed += 8L;
@@ -379,7 +379,7 @@ void playDiff() {
temp[4] = '\0';
readBlock(&header, 4L, difffile);
- swapULongPtr(&header, 1);
+ swapULong(&header);
processed += 8L;
@@ -389,10 +389,10 @@ void playDiff() {
}
readBlock(&header, 4L, difffile);
- swapULongPtr(&header, 1);
+ swapULong(&header);
readBlock(&size, 4L, difffile);
- swapULongPtr(&size, 1);
+ swapULong(&size);
if (header == 0) {
// sizeof(headerdata) != 18, but the padding might be at the end
@@ -408,9 +408,9 @@ void playDiff() {
skip(difffile, size - 18);
swapUShortPtr(&headerdata.Version, 3);
- swapULongPtr(&headerdata.BufferSize, 1);
+ swapULong(&headerdata.BufferSize);
swapUShortPtr(&headerdata.Machine, 1);
- swapULongPtr(&headerdata.Flags, 1);
+ swapULong(&headerdata.Flags);
continuous = CONTINUOUS & headerdata.Flags;
diffwidth = headerdata.x;
@@ -517,7 +517,7 @@ void readSound() {
readBlock(temp_, 4L, difffile_);
temp_[4] = '\0';
readBlock(&header_, 4L, difffile_);
- swapULongPtr(&header_, 1);
+ swapULong(&header_);
processed += 8L;
@@ -525,10 +525,10 @@ void readSound() {
return;
readBlock(&header_, 4L, difffile_);
- swapULongPtr(&header_, 1);
+ swapULong(&header_);
readBlock(&size_, 4L, difffile_);
- swapULongPtr(&size_, 1);
+ swapULong(&size_);
if (header_ == 0)
skip(difffile_, size_);
@@ -538,10 +538,10 @@ void readSound() {
while (header_ != 65535) {
g_music->updateMusic();
readBlock(&header_, 4L, difffile_);
- swapULongPtr(&header_, 1);
+ swapULong(&header_);
readBlock(&size_, 4L, difffile_);
- swapULongPtr(&size_, 1);
+ swapULong(&size_);
if ((header_ == 30) || (header_ == 31)) {
if (mwaiteffect) {
diff --git a/engines/lab/stddefines.h b/engines/lab/stddefines.h
index 67bd39a47d..8c74d10a99 100644
--- a/engines/lab/stddefines.h
+++ b/engines/lab/stddefines.h
@@ -37,25 +37,14 @@
namespace Lab {
-#define IS_MACOSX 1
-
-#if defined(IS_MACOSX)
-#define getTime Lab_GetTime
-#define delay Lab_Delay
-#endif
-
#define swapUShort(value) (value)
#define swapUShortPtr(ptr,count) (ptr)
#define swapShort(value) (value)
#define swapShortPtr(ptr,count) (ptr)
#define swapUInt(value) (value)
-#define swapUIntPtr(ptr,count) (ptr)
#define swapInt(value) (value)
-#define swapIntPtr(ptr,count) (ptr)
#define swapULong(value) (value)
-#define swapULongPtr(ptr,count) (ptr)
#define swapLong(value) (value)
-#define swapLongPtr(ptr,count) (ptr)
} // End of namespace Lab