aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authormd52011-03-03 19:49:09 +0200
committermd52011-03-03 19:49:09 +0200
commitea232049c95018053b5368975e7559575d024de4 (patch)
tree89ad9e8ae72c99de047c0a74366dded2c16c77b8 /engines
parent00b37f8552962c26412eda347024db80de3d99ac (diff)
downloadscummvm-rg350-ea232049c95018053b5368975e7559575d024de4.tar.gz
scummvm-rg350-ea232049c95018053b5368975e7559575d024de4.tar.bz2
scummvm-rg350-ea232049c95018053b5368975e7559575d024de4.zip
SCI: Fixed a silly bug in WRITE_SCI1ENDIAN_UINT16, and unified the way
that the utility READ_* and WRITE_* operations are made
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/util.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/engines/sci/util.cpp b/engines/sci/util.cpp
index 6bc08e6b63..8f6576cd38 100644
--- a/engines/sci/util.cpp
+++ b/engines/sci/util.cpp
@@ -33,36 +33,36 @@ namespace Sci {
uint16 READ_SCI1ENDIAN_UINT16(const void *ptr) {
if (g_sci->getPlatform() == Common::kPlatformAmiga && getSciVersion() >= SCI_VERSION_1_EGA_ONLY && getSciVersion() <= SCI_VERSION_1_LATE)
return READ_BE_UINT16(ptr);
-
- return READ_LE_UINT16(ptr);
+ else
+ return READ_LE_UINT16(ptr);
}
void WRITE_SCI1ENDIAN_UINT16(void *ptr, uint16 val) {
if (g_sci->getPlatform() == Common::kPlatformAmiga && getSciVersion() >= SCI_VERSION_1_EGA_ONLY && getSciVersion() <= SCI_VERSION_1_LATE)
WRITE_BE_UINT16(ptr, val);
-
- WRITE_LE_UINT16(ptr, val);
+ else
+ WRITE_LE_UINT16(ptr, val);
}
uint16 READ_SCI11ENDIAN_UINT16(const void *ptr) {
if (g_sci->getPlatform() == Common::kPlatformMacintosh && getSciVersion() >= SCI_VERSION_1_1)
return READ_BE_UINT16(ptr);
-
- return READ_LE_UINT16(ptr);
+ else
+ return READ_LE_UINT16(ptr);
}
uint16 READ_SCI32ENDIAN_UINT16(const void *ptr) {
if (g_sci->getPlatform() == Common::kPlatformMacintosh && getSciVersion() >= SCI_VERSION_2_1)
return READ_BE_UINT16(ptr);
-
- return READ_LE_UINT16(ptr);
+ else
+ return READ_LE_UINT16(ptr);
}
uint32 READ_SCI11ENDIAN_UINT32(const void *ptr) {
if (g_sci->getPlatform() == Common::kPlatformMacintosh && getSciVersion() >= SCI_VERSION_1_1)
return READ_BE_UINT32(ptr);
-
- return READ_LE_UINT32(ptr);
+ else
+ return READ_LE_UINT32(ptr);
}
void WRITE_SCI11ENDIAN_UINT16(void *ptr, uint16 val) {