Files
st/include/types.h
T
Yanis ed672be03f Decompile Title overlay (#20)
* Decompile Title overlay

* math structs as cpp when applicable

* fixes and improvements

* regressions fix 1

* regressions fix 2
2026-01-15 19:04:43 +01:00

56 lines
1.4 KiB
C++

#ifndef TYPES_H
#define TYPES_H
#include <stddef.h>
typedef unsigned long long u64;
typedef unsigned int u32;
typedef unsigned short u16;
typedef unsigned char u8;
typedef long long s64;
typedef int s32;
typedef short s16;
typedef char s8;
typedef float f32;
typedef double f64;
typedef s8 unk8;
typedef s16 unk16;
typedef s32 unk32;
#define CEIL_DIV(a, b) (((a) + (b) - 1) / (b))
#ifdef __cplusplus
#define DECL_PTMF(name, ...) \
template <typename T> struct name { \
typedef void (T::*PTMFCallback)(__VA_ARGS__); \
\
PTMFCallback callback; \
};
#define CALL_PTMF(type, data, ...) \
{ \
type &ptr = (data); \
(this->*ptr.callback)(__VA_ARGS__); \
}
#define STATIC_CALL_PTMF(type, data, thisx, ...) \
{ \
type &ptr = (data); \
((thisx)->*ptr.callback)(__VA_ARGS__); \
}
#define STATIC_PTMFCALLBACK(type, data, thisx, ...) \
{ \
type::PTMFCallback &ptr = (data); \
((thisx)->*ptr)(__VA_ARGS__); \
}
DECL_PTMF(PTMF);
typedef void (*UnkCallback)(u16 param1);
#endif
#endif