Replaced loadShort/saveShort functions with applicable endian macros

svn-id: r41097
This commit is contained in:
Paul Gilbert 2009-06-01 09:09:44 +00:00
parent 5bb449b2bf
commit 2abbcd54a4
4 changed files with 3 additions and 13 deletions

@ -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;

@ -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);

@ -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;
}

@ -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: {