diff options
Diffstat (limited to 'engines/lab/machine.cpp')
-rw-r--r-- | engines/lab/machine.cpp | 130 |
1 files changed, 0 insertions, 130 deletions
diff --git a/engines/lab/machine.cpp b/engines/lab/machine.cpp index c1bdd003b8..3806b5f6e1 100644 --- a/engines/lab/machine.cpp +++ b/engines/lab/machine.cpp @@ -218,134 +218,4 @@ char *translateFileName(const char *filename) { return NewFileName; } -#if defined(USE_SWAP) - -uint16 swapUShort(uint16 value) { - char *b = (char *)&value; - char t = b[0]; - b[0] = b[1]; - b[1] = t; - return value; -} -uint16 *wapUShortPtsr(uint16 *ptr, int count) { - while (count-- > 0) { - char *b = (char *)ptr++; - char t = b[0]; - b[0] = b[1]; - b[1] = t; - } - - return ptr; -} -int16 swapShort(int16 value) { - char *b = (char *)&value; - char t = b[0]; - b[0] = b[1]; - b[1] = t; - return value; -} -int16 *swapShortPtr(int16 *ptr, int count) { - while (count-- > 0) { - char *b = (char *)ptr++; - char t = b[0]; - b[0] = b[1]; - b[1] = t; - } - - return ptr; -} -unsigned int swapUInt(unsigned int value) { - char *b = (char *)&value; - char t = b[0]; - b[0] = b[3]; - b[3] = t; - t = b[1]; - b[1] = b[2]; - b[2] = t; - return value; -} -unsigned int *swapUIntPtr(unsigned int *ptr, int count) { - while (count-- > 0) { - char *b = (char *)ptr++; - char t = b[0]; - b[0] = b[3]; - b[3] = t; - t = b[1]; - b[1] = b[2]; - b[2] = t; - } - - return ptr; -} -int swapInt(int value) { - char *b = (char *)&value; - char t = b[0]; - b[0] = b[3]; - b[3] = t; - t = b[1]; - b[1] = b[2]; - b[2] = t; - return value; -} -int *swapIntPtr(int *ptr, int count) { - while (count-- > 0) { - char *b = (char *)ptr++; - char t = b[0]; - b[0] = b[3]; - b[3] = t; - t = b[1]; - b[1] = b[2]; - b[2] = t; - } - - return ptr; -} -uint32 swapULong(uint32 value) { - char *b = (char *)&value; - char t = b[0]; - b[0] = b[3]; - b[3] = t; - t = b[1]; - b[1] = b[2]; - b[2] = t; - return value; -} -uint32 *swapULongPtr(uint32 *ptr, int count) { - while (count-- > 0) { - char *b = (char *)ptr++; - char t = b[0]; - b[0] = b[3]; - b[3] = t; - t = b[1]; - b[1] = b[2]; - b[2] = t; - } - - return ptr; -} -int32 swapLong(int32 value) { - char *b = (char *)&value; - char t = b[0]; - b[0] = b[3]; - b[3] = t; - t = b[1]; - b[1] = b[2]; - b[2] = t; - return value; -} -int32 *swapLongPtr(int32 *ptr, int count) { - while (count-- > 0) { - char *b = (char *)ptr++; - char t = b[0]; - b[0] = b[3]; - b[3] = t; - t = b[1]; - b[1] = b[2]; - b[2] = t; - } - - return ptr; -} -#endif - } // End of namespace Lab |