Fixup _0_0_ like access
This commit is contained in:
parent
88d10a9a2e
commit
a4b12ba2f4
|
@ -6,4 +6,30 @@
|
|||
#include "gh_structs.h"
|
||||
#include "gh_global.h"
|
||||
|
||||
template<size_t Offset, size_t Size>
|
||||
struct Field {
|
||||
};
|
||||
|
||||
template<size_t Size>
|
||||
struct _FieldBinderSizeTraits {
|
||||
using type = undefined;
|
||||
};
|
||||
template<>
|
||||
struct _FieldBinderSizeTraits<4> {
|
||||
using type = undefined4;
|
||||
};
|
||||
template<>
|
||||
struct _FieldBinderSizeTraits<2> {
|
||||
using type = undefined2;
|
||||
};
|
||||
template<>
|
||||
struct _FieldBinderSizeTraits<3> {
|
||||
using type = undefined3;
|
||||
};
|
||||
|
||||
template<size_t Offset, size_t Size>
|
||||
inline uint32_t& operator+(const char* str, Field<Offset, Size> offset) {
|
||||
return *(_FieldBinderSizeTraits<Size>*)(str + offset);
|
||||
}
|
||||
|
||||
#endif /* B8D59B54_1674_4C0F_AA2C_611385FF5D03 */
|
||||
|
|
|
@ -1,14 +1,26 @@
|
|||
#ifndef A523F6DB_0645_4DEB_8AEB_3792CB732B49
|
||||
#define A523F6DB_0645_4DEB_8AEB_3792CB732B49
|
||||
|
||||
#if _WIN32
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include "../win32_shim.h"
|
||||
#include <unistd.h>
|
||||
#include <sys/proc.h>
|
||||
#endif
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
// Fallback to int if type is not annotated
|
||||
// typedef int64_t undefined;
|
||||
typedef uint32_t undefined4;
|
||||
typedef uint16_t undefined2;
|
||||
struct undefined3 {
|
||||
uint8_t _0;
|
||||
uint8_t _1;
|
||||
uint8_t _2;
|
||||
};
|
||||
typedef unsigned char byte;
|
||||
typedef byte undefined1;
|
||||
// typedef uint64_t uint;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue