86 lines
1.9 KiB
C++
86 lines
1.9 KiB
C++
#ifndef A523F6DB_0645_4DEB_8AEB_3792CB732B49
|
|
#define A523F6DB_0645_4DEB_8AEB_3792CB732B49
|
|
|
|
#if _WIN32
|
|
#include <Windows.h>
|
|
#else
|
|
#include "../win32_shim.h"
|
|
#endif
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
typedef uint8_t undefined;
|
|
typedef uint32_t undefined4;
|
|
typedef uint16_t undefined2;
|
|
typedef uint16_t word;
|
|
typedef uint32_t dword;
|
|
struct undefined3 {
|
|
uint8_t _0;
|
|
uint8_t _1;
|
|
uint8_t _2;
|
|
|
|
undefined3& operator=(const uint32_t& other) {
|
|
_0 = other & 0xff;
|
|
_1 = (other >> 8) & 0xff;
|
|
_2 = (other >> 16) & 0xff;
|
|
return *this;
|
|
}
|
|
};
|
|
typedef unsigned char byte;
|
|
typedef byte undefined1;
|
|
// typedef uint64_t uint;
|
|
typedef void *pointer;
|
|
typedef char *TerminatedCString;
|
|
typedef char *string;
|
|
|
|
enum R3ModuleId : uint8_t {
|
|
R3ModId_unk = 0x00,
|
|
R3ModId_not_initialized = 0xff,
|
|
};
|
|
|
|
typedef uint32_t cc_type_t;
|
|
|
|
|
|
template <typename T0, typename T1>
|
|
inline constexpr undefined3 CONCAT12(T0 a, T1 b) {
|
|
return undefined3(cc_type_t(a) << 16 | cc_type_t(b));
|
|
}
|
|
template <typename T0, typename T1>
|
|
inline constexpr cc_type_t CONCAT11(T0 a, T1 b) {
|
|
return cc_type_t(a) << 8 | cc_type_t(b);
|
|
}
|
|
template <typename T0, typename T1>
|
|
inline constexpr cc_type_t CONCAT21(T0 a, T1 b) {
|
|
return cc_type_t(a) << 8 | cc_type_t(b);
|
|
}
|
|
|
|
template <typename T0, typename T1>
|
|
inline constexpr cc_type_t CONCAT22(T0 a, T1 b) {
|
|
return cc_type_t(a) << 16 | cc_type_t(b);
|
|
}
|
|
|
|
template <typename T0, typename T1>
|
|
inline constexpr cc_type_t CONCAT23(T0 a, T1 b) {
|
|
return cc_type_t(a) << 24 | cc_type_t(b);
|
|
}
|
|
|
|
template <typename T0>
|
|
inline constexpr char SUB21(T0 a, size_t b) {
|
|
return cc_type_t(a) >> (b * 8);
|
|
}
|
|
|
|
template <typename T0>
|
|
inline constexpr char SUB41(T0 a, size_t b) {
|
|
return cc_type_t(a) >> (b * 8);
|
|
}
|
|
|
|
template <typename T0>
|
|
inline constexpr uint16_t SUB42(T0 a, size_t b) {
|
|
return cc_type_t(a) >> (b * 8);
|
|
}
|
|
|
|
// Can not export enums for some reason
|
|
|
|
#endif /* A523F6DB_0645_4DEB_8AEB_3792CB732B49 */
|