[Scummvm-cvs-logs] scummvm master -> ea232049c95018053b5368975e7559575d024de4
bluegr
md5 at scummvm.org
Thu Mar 3 18:50:36 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ea232049c9 SCI: Fixed a silly bug in WRITE_SCI1ENDIAN_UINT16, and unified the way
Commit: ea232049c95018053b5368975e7559575d024de4
https://github.com/scummvm/scummvm/commit/ea232049c95018053b5368975e7559575d024de4
Author: md5 (md5 at scummvm.org)
Date: 2011-03-03T09:49:09-08:00
Commit Message:
SCI: Fixed a silly bug in WRITE_SCI1ENDIAN_UINT16, and unified the way
that the utility READ_* and WRITE_* operations are made
Changed paths:
engines/sci/util.cpp
diff --git a/engines/sci/util.cpp b/engines/sci/util.cpp
index 6bc08e6..8f6576c 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) {
More information about the Scummvm-git-logs
mailing list