This commit is contained in:
2024-09-26 03:12:43 +08:00
parent 7fab525f42
commit 4b26993891
31 changed files with 1525 additions and 153 deletions

View File

@@ -87,6 +87,11 @@ inline constexpr cc_type_t CONCAT23(T0 a, T1 b) {
return cc_type_t(a) << 24 | cc_type_t(b);
}
template <typename T0, typename T1>
inline constexpr cc_type_t CONCAT31(T0 a, T1 b) {
return cc_type_t(a) << 8 | cc_type_t(b);
}
template <typename T0> inline constexpr char SUB21(T0 a, size_t b) {
return cc_type_t(a) >> (b * 8);
}
@@ -99,6 +104,8 @@ template <typename T0> inline constexpr uint16_t SUB42(T0 a, size_t b) {
return cc_type_t(a) >> (b * 8);
}
inline longlong r3_ftol(float a) { return (longlong)a; }
constexpr byte R3ModId_not_initialized = 0xff;
#include "stubexcept.h"

View File

@@ -12,6 +12,7 @@
#include <stdio.h>
#include <string.h>
typedef long long longlong;
typedef uint8_t undefined;
typedef uint32_t undefined4;
typedef uint16_t undefined2;
@@ -28,6 +29,9 @@ struct undefined3 {
_2 = (other >> 16) & 0xff;
return *this;
}
operator uint32_t() const {
return _0 | (_1 << 8) | (_2 << 16);
}
};
typedef unsigned char byte;
typedef byte undefined1;