diff options
author | Paul Gilbert | 2009-05-17 10:01:21 +0000 |
---|---|---|
committer | Paul Gilbert | 2009-05-17 10:01:21 +0000 |
commit | 7d6287dee78ef357b846ef2e6d9c0b249a77c5d9 (patch) | |
tree | b248ac6b5a8bf4402c4ec2f5e2e2d03a045cee91 | |
parent | da9b2868e0225e4baba77c25d3cbc55cd2d4cdde (diff) | |
download | scummvm-rg350-7d6287dee78ef357b846ef2e6d9c0b249a77c5d9.tar.gz scummvm-rg350-7d6287dee78ef357b846ef2e6d9c0b249a77c5d9.tar.bz2 scummvm-rg350-7d6287dee78ef357b846ef2e6d9c0b249a77c5d9.zip |
Endian fix in script data access
svn-id: r40641
-rw-r--r-- | engines/cruise/cruise_main.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp index 97681d9cac..ee3d87b940 100644 --- a/engines/cruise/cruise_main.cpp +++ b/engines/cruise/cruise_main.cpp @@ -80,19 +80,11 @@ int getNumObjectsByClass(int scriptIdx, int param) { } void saveShort(void *ptr, short int var) { - *(int16 *) ptr = var; - - flipShort((int16 *) ptr); + WRITE_BE_UINT16(ptr, var); } int16 loadShort(void *ptr) { - short int temp; - - temp = *(int16 *) ptr; - - flipShort(&temp); - - return (temp); + return (int16)READ_BE_UINT16(ptr); } void resetFileEntryRange(int param1, int param2) { |