aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise
diff options
context:
space:
mode:
authorPaul Gilbert2009-06-01 09:09:44 +0000
committerPaul Gilbert2009-06-01 09:09:44 +0000
commit2abbcd54a457dfabf17c6ef91a4b7f2faa3e81fd (patch)
tree88dd36a4ab08a2f6db15823d91d32eaf8b1098a3 /engines/cruise
parent5bb449b2bf443c30dd9fa312a426c81d40baf9dc (diff)
downloadscummvm-rg350-2abbcd54a457dfabf17c6ef91a4b7f2faa3e81fd.tar.gz
scummvm-rg350-2abbcd54a457dfabf17c6ef91a4b7f2faa3e81fd.tar.bz2
scummvm-rg350-2abbcd54a457dfabf17c6ef91a4b7f2faa3e81fd.zip
Replaced loadShort/saveShort functions with applicable endian macros
svn-id: r41097
Diffstat (limited to 'engines/cruise')
-rw-r--r--engines/cruise/cruise_main.cpp8
-rw-r--r--engines/cruise/cruise_main.h2
-rw-r--r--engines/cruise/function.cpp2
-rw-r--r--engines/cruise/script.cpp4
4 files changed, 3 insertions, 13 deletions
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index 03ee9a08c3..a5cec48e2d 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -79,14 +79,6 @@ int getNumObjectsByClass(int scriptIdx, int param) {
return (counter);
}
-void saveShort(void *ptr, short int var) {
- WRITE_BE_UINT16(ptr, var);
-}
-
-int16 loadShort(void *ptr) {
- return (int16)READ_BE_UINT16(ptr);
-}
-
void resetFileEntryRange(int param1, int param2) {
int i;
diff --git a/engines/cruise/cruise_main.h b/engines/cruise/cruise_main.h
index 479f6366be..1b300bd587 100644
--- a/engines/cruise/cruise_main.h
+++ b/engines/cruise/cruise_main.h
@@ -91,9 +91,7 @@ bool delphineUnpack(byte *dst, const byte *src, int len);
int findHighColor();
ovlData3Struct *getOvlData3Entry(int32 scriptNumber, int32 param);
ovlData3Struct *scriptFunc1Sub2(int32 scriptNumber, int32 param);
-int16 loadShort(void *ptr);
void resetFileEntry(int32 entryNumber);
-void saveShort(void *ptr, int16 var);
void *mallocAndZero(int32 size);
uint8 *mainProc14(uint16 overlay, uint16 idx);
void printInfoBlackBox(const char *string);
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp
index 0f601a582b..6c8608b4fd 100644
--- a/engines/cruise/function.cpp
+++ b/engines/cruise/function.cpp
@@ -112,7 +112,7 @@ int16 Op_Exec(void) {
ptr2 = ptr;
for (i = 0; i < numOfArgToPop; i++) {
- saveShort(ptr2, popTable[i]);
+ WRITE_BE_UINT16(ptr2, popTable[i]);
ptr2 += 2;
}
diff --git a/engines/cruise/script.cpp b/engines/cruise/script.cpp
index 29654e15e2..c08c9d267f 100644
--- a/engines/cruise/script.cpp
+++ b/engines/cruise/script.cpp
@@ -95,7 +95,7 @@ int32 opcodeType0(void) {
if (size == 1) {
address += index;
- pushVar(loadShort(address));
+ pushVar((int16)READ_BE_UINT16(address));
return (0);
} else if (size == 2) {
pushVar(*address);
@@ -186,7 +186,7 @@ int32 opcodeType1(void) {
switch (type2) {
case 1: {
- saveShort(ptr + var_A + offset * 2, var);
+ WRITE_BE_UINT16(ptr + var_A + offset * 2, var);
return 0;
}
case 2: {