Browse Source

Fix the horribly broken typedefs.

Gettin' upgraded from 32-bit, but will you still love me when I'm 64?
Darryl Pogue 13 years ago
parent
commit
e1d8e9cf38
  1. 76
      Sources/Plasma/CoreLib/hsTypes.h

76
Sources/Plasma/CoreLib/hsTypes.h

@ -46,8 +46,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
/************************** Other Includes *****************************/ /************************** Other Includes *****************************/
#include <stdlib.h> #include <cstdlib>
#include <stdio.h> #include <cstdio>
#if HS_CAN_USE_FLOAT #if HS_CAN_USE_FLOAT
#include <math.h> #include <math.h>
@ -64,16 +64,24 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
/************************** Basic Types *****************************/ /************************** Basic Types *****************************/
typedef unsigned char byte;
typedef unsigned short word;
typedef unsigned long dword;
#ifdef _MSC_VER #ifdef _MSC_VER
typedef unsigned __int64 qword; typedef signed __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef signed __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef signed __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
#else #else
typedef unsigned long long qword; #include <cstdint>
#endif #endif
typedef uint8_t byte;
typedef uint16_t word;
typedef uint32_t dword;
typedef uint64_t qword;
typedef size_t unsigned_ptr; typedef size_t unsigned_ptr;
typedef wchar_t wchar; typedef wchar_t wchar;
@ -84,51 +92,31 @@ typedef wchar_t wchar;
#define kPosInfinity32 (0x7fffffff) #define kPosInfinity32 (0x7fffffff)
#define kNegInfinity32 (0x80000000) #define kNegInfinity32 (0x80000000)
#if HS_BUILD_FOR_PS2 typedef int8_t Int8;
typedef int Int32; typedef int16_t Int16;
#else typedef int32_t Int32;
typedef long Int32; typedef int64_t Int64;
#endif
typedef short Int16; typedef uint8_t UInt8;
typedef signed char Int8; typedef uint16_t UInt16;
typedef uint32_t UInt32;
typedef uint64_t UInt64;
#if !(HS_BUILD_FOR_MAC) #ifndef Byte
typedef unsigned char UInt8; typedef uint8_t Byte;
typedef unsigned short UInt16;
#if HS_BUILD_FOR_PS2
typedef unsigned int UInt32;
#else
typedef unsigned long UInt32;
#endif #endif
#ifndef Byte #ifndef false
typedef UInt8 Byte;
#endif
#ifndef false
#define false 0 #define false 0
#endif #endif
#ifndef true #ifndef true
#define true 1 #define true 1
#endif
#ifndef Boolean
#if HS_BUILD_FOR_UNIX
typedef char Boolean;
#else
typedef UInt8 Boolean;
#endif
#endif
#endif #endif
#ifndef Boolean
#if HS_BUILD_FOR_WIN32 typedef uint8_t Boolean;
typedef __int64 Int64;
typedef unsigned __int64 UInt64;
#else
typedef long long Int64;
typedef unsigned long long UInt64;
#endif #endif
typedef Int32 hsFixed; typedef Int32 hsFixed;
typedef Int32 hsFract; typedef Int32 hsFract;

Loading…
Cancel
Save