2023-06-27 22:04:07 -04:00
|
|
|
#ifndef MXTYPE_H
|
|
|
|
#define MXTYPE_H
|
|
|
|
|
|
|
|
typedef unsigned char MxU8;
|
2023-07-02 13:07:55 -04:00
|
|
|
typedef signed char MxS8;
|
2023-06-27 22:04:07 -04:00
|
|
|
typedef unsigned short MxU16;
|
2023-07-02 13:07:55 -04:00
|
|
|
typedef signed short MxS16;
|
2023-06-27 22:04:07 -04:00
|
|
|
typedef unsigned int MxU32;
|
2023-07-02 13:07:55 -04:00
|
|
|
typedef signed int MxS32;
|
|
|
|
typedef unsigned __int64 MxU64;
|
|
|
|
typedef signed __int64 MxS64;
|
|
|
|
typedef float MxFloat;
|
|
|
|
typedef double MxDouble;
|
2023-06-27 22:04:07 -04:00
|
|
|
|
2023-07-02 04:05:49 -04:00
|
|
|
// On MSVC, a long is 32-bit, but on GCC/Clang, it's 64-bit. LEGO Island obviously
|
|
|
|
// assumes the former in all cases, which could become an issue in the future.
|
|
|
|
// The "longs" can't all be changed to "ints" (which are 32-bit on both) because
|
|
|
|
// this will break DLL export compatibility. Therefore, we define MxLong/MxULong,
|
|
|
|
// which is guaranteed to be 32-bit, and guaranteed to be a "long" on MSVC.
|
|
|
|
#if defined(_MSC_VER)
|
|
|
|
typedef long MxLong;
|
|
|
|
typedef unsigned long MxULong;
|
|
|
|
#else
|
|
|
|
typedef int MxLong;
|
|
|
|
typedef unsigned int MxULong;
|
|
|
|
#endif
|
|
|
|
|
2023-08-03 14:19:05 -04:00
|
|
|
typedef MxS32 MxTime;
|
|
|
|
|
2023-07-02 04:05:49 -04:00
|
|
|
typedef MxLong MxResult;
|
2023-06-29 04:10:08 -04:00
|
|
|
const MxResult SUCCESS = 0;
|
2023-07-02 04:05:49 -04:00
|
|
|
const MxResult FAILURE = -1;
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2023-07-02 04:05:49 -04:00
|
|
|
typedef MxU8 MxBool;
|
2023-06-27 22:04:07 -04:00
|
|
|
|
|
|
|
#ifndef TRUE
|
|
|
|
#define TRUE 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef FALSE
|
|
|
|
#define FALSE 0
|
|
|
|
#endif
|
|
|
|
|
2023-06-29 04:10:08 -04:00
|
|
|
#endif // MXTYPE_H
|