feat(binana): no special include directories now, you must pass GHIDRA or IDA as a definition into your preprocessor

This commit is contained in:
phaneron 2024-08-09 07:15:03 -04:00
parent de5bdadc78
commit 1042d9fa22
60 changed files with 3132 additions and 589 deletions

View file

@ -0,0 +1,39 @@
#ifndef COMMON_DATA_RECYCLER_H
#define COMMON_DATA_RECYCLER_H
#include "system/types.h"
DECLARE_STRUCT(CDataRecycler);
DECLARE_STRUCT(CDataRecycler__vtable);
DECLARE_STRUCT(CDataRecycler__NodeBlock);
DECLARE_STRUCT(CDataRecycler__Node);
struct CDataRecycler__vtable {
void *v_fn_00;
void *v_fn_01;
void *v_fn_02;
void *v_fn_03;
void *v_fn_04;
};
struct CDataRecycler__Node {
CDataRecycler__Node* m_next;
void* m_data;
uint32_t m_bytes;
};
struct CDataRecycler__NodeBlock {
CDataRecycler__NodeBlock* m_next;
CDataRecycler__Node m_nodes[1];
};
struct CDataRecycler {
CDataRecycler__vtable* v_vtable;
int32_t m_nodesRecyclable;
uint32_t m_nodesPerBlock;
CDataRecycler__NodeBlock* m_nodeBlockList;
CDataRecycler__Node* m_nodeFullList;
CDataRecycler__Node* m_nodeEmptyList;
};
#endif

View file

@ -0,0 +1,13 @@
#ifndef COMMON_HANDLE_H
#define COMMON_HANDLE_H
#include "system/types.h"
#if !defined(DECLARE_HANDLE)
#define DECLARE_HANDLE(name) \
typedef struct name##__ { \
int32_t unused; \
}* name
#endif
#endif

View file

@ -0,0 +1,43 @@
#ifndef COMMON_INSTANCE_H
#define COMMON_INSTANCE_H
#include "system/types.h"
#include "storm/list.h"
#include "storm/thread.h"
// TSList<T>
// TSLinkedNode<T>
// TInstanceId<T>
// TSingletonInstanceId<T>
#define COMMON_INSTANCE_ID(T) \
STORM_TS_LIST(T) \
typedef struct TInstanceId_##T TInstanceId_##T; \
typedef struct TSingletonInstanceId_##T TSingletonInstanceId_##T; \
struct TInstanceId_##T { \
TSLinkedNode_##T b_base; \
uint32_t m_id; \
}; \
struct TSingletonInstanceId_##T { \
TInstanceId_##T b_base; \
};
#define COMMON_INSTANCE_ID_TABLE(T) \
STORM_TS_LIST(T) \
typedef struct TInstanceIdTable_##T TInstanceIdTable_##T; \
struct TInstanceIdTable_##T { \
SCritSect m_idCritSect; \
uint32_t m_id; \
int32_t m_idWrapped; \
CSRWLock m_idLock[8]; \
TSList_##T m_idList[8]; \
};
// template <class T>
// class TExtraInstanceRecyclable
typedef struct TExtraInstanceRecyclable TExtraInstanceRecyclable;
struct TExtraInstanceRecyclable {
uint32_t m_recycleBytes;
};
#endif

View file

@ -1,7 +1,7 @@
#ifndef D3D9_CAPS_H
#define D3D9_CAPS_H
#include <stdint.h>
#include "system/types.h"
typedef enum D3DDEVTYPE D3DDEVTYPE;
typedef struct D3DVSHADERCAPS2_0 D3DVSHADERCAPS2_0;

View file

@ -1,7 +1,7 @@
#ifndef D3D9_DEVICE_H
#define D3D9_DEVICE_H
#include <stdint.h>
#include "system/types.h"
#include "d3d9/caps.h"

View file

@ -0,0 +1,66 @@
#ifndef EVENT_CONTEXT_H
#define EVENT_CONTEXT_H
#include "storm/thread.h"
#include "common/instance.h"
#include "storm/queue/timer_priority_uint32_t.h"
#include "event/message.h"
#include "event/handler.h"
#include "event/keydown.h"
#include "event/types.h"
#include "event/timer.h"
#include "event/id_table.h"
DECLARE_ENUM(SCHEDSTATE);
DECLARE_STRUCT(EvtContext);
DECLARE_STRUCT(EvtTimer);
DECLARE_HANDLE(HPROPCONTEXT);
// EvtContext::SCHEDSTATE
enum SCHEDSTATE {
SCHEDSTATE_ACTIVE = 0x0,
SCHEDSTATE_CLOSED = 0x1,
SCHEDSTATE_DESTROYED = 0x2,
_UNIQUE_SYMBOL_SCHEDSTATE_96 = 0xFFFFFFFF
};
COMMON_INSTANCE_ID(EvtContext);
// class EvtContext : public TSingletonInstanceId<EvtContext, offsetof(TInstanceId<EvtContext>, m_id)>
struct EvtContext {
TSingletonInstanceId_EvtContext b_base;
uint32_t unkA;
// Member variables
SCritSect m_critsect;
uint32_t m_currTime;
SCHEDSTATE m_schedState;
TSTimerPriority_uint32_t m_schedNextWakeTime;
uint32_t m_schedLastIdle;
uint32_t m_schedFlags;
uint32_t m_schedIdleTime;
uint32_t m_schedInitialIdleTime;
uint32_t m_schedWeight;
uint32_t m_schedSmoothWeight;
int32_t m_schedRebalance;
int32_t unkXX;
int32_t unkXY;
int32_t unkXZ;
int32_t unkYY;
int32_t unkYZ;
// TSExplicitList<EvtHandler, offsetof(EvtHandler, link)> m_queueHandlerList[EVENTIDS];
TSExplicitList_EvtHandler m_queueHandlerList[36];
// TSExplicitList<EvtMessage, offsetof(EvtMessage, link)> m_queueMessageList;
TSExplicitList_EvtMessage m_queueMessageList;
uint32_t m_queueSyncButtonState;
// TSExplicitList<EvtKeyDown, offsetof(EvtKeyDown, link)> m_queueSyncKeyDownList;
TSExplicitList_EvtKeyDown m_queueSyncKeyDownList;
EvtIdTable_pointer_to_EvtTimer m_timerIdTable;
EvtTimerQueue m_timerQueue;
HPROPCONTEXT m_propContext;
void* m_callContext;
uint32_t m_startWatchdog;
};
#endif

View file

@ -0,0 +1,20 @@
#ifndef EVENT_HANDLER_H
#define EVENT_HANDLER_H
#include "system/types.h"
#include "storm/list.h"
DECLARE_STRUCT(EvtHandler);
STORM_TS_LIST(EvtHandler);
struct EvtHandler {
TSLink_EvtHandler link;
int32_t (*func)(const void*, void*);
void* param;
float priority;
int32_t marker;
};
#endif

View file

@ -0,0 +1,15 @@
#ifndef EVENT_ID_TABLE_H
#define EVENT_ID_TABLE_H
#include "storm/array.h"
#include "storm/array/uint32_t.h"
#include "event/timer.h"
DECLARE_STRUCT(EvtIdTable_pointer_to_EvtTimer);
struct EvtIdTable_pointer_to_EvtTimer {
TSGrowableArray_pointer_to_EvtTimer m_allocArray;
TSGrowableArray_uint32_t m_freeArray;
};
#endif

View file

@ -0,0 +1,16 @@
#ifndef EVENT_KEY_DOWN_H
#define EVENT_KEY_DOWN_H
#include "storm/list.h"
#include "event/types.h"
typedef struct EvtKeyDown EvtKeyDown;
STORM_TS_LIST(EvtKeyDown);
struct EvtKeyDown {
TSLink_EvtKeyDown link;
KEY key;
};
#endif

View file

@ -0,0 +1,23 @@
#ifndef EVENT_MESSAGE_H
#define EVENT_MESSAGE_H
#include "system/types.h"
#include "common/instance.h"
#include "storm/list.h"
#include "event/types.h"
typedef struct EvtMessage EvtMessage;
STORM_TS_LIST(EvtMessage);
// class EvtMessage : public TExtraInstanceRecyclable<EvtMessage>
struct EvtMessage {
TExtraInstanceRecyclable b_base;
TSLink_EvtMessage link;
EVENTID id;
char data[4];
};
#endif

View file

@ -0,0 +1,32 @@
#ifndef EVENT_TIMER_H
#define EVENT_TIMER_H
#include "system/types.h"
#include "storm/queue/timer_priority_uint32_t.h"
DECLARE_STRUCT(EvtTimer);
DECLARE_STRUCT(EvtTimerQueue);
// class EvtTimer
struct EvtTimer {
// Member variables
uint32_t id;
TSTimerPriority_uint32_t targetTime;
float timeout;
int32_t (*handler)(const void*, void*);
void* param;
int32_t (*guidHandler)(const void*, uint64_t, void*);
uint64_t guidParam;
void* guidParam2;
};
STORM_TS_PRIORITY_QUEUE(EvtTimer);
STORM_TS_GROWABLE_ARRAY_POINTER_TO(EvtTimer);
// class EvtTimerQueue : public TSPriorityQueue<EvtTimer>
struct EvtTimerQueue {
TSPriorityQueue_EvtTimer b_base;
};
#endif

View file

@ -0,0 +1,277 @@
#ifndef EVENT_TYPES_H
#define EVENT_TYPES_H
#include "system/types.h"
DECLARE_ENUM(EVENTID);
DECLARE_ENUM(KEY);
DECLARE_ENUM(MOUSEBUTTON);
DECLARE_ENUM(MOUSEMODE);
DECLARE_ENUM(OSINPUT);
DECLARE_ENUM(OS_MOUSE_MODE);
DECLARE_STRUCT(OSEVENT);
DECLARE_STRUCT(EVENT_DATA_CHAR);
DECLARE_STRUCT(EVENT_DATA_FOCUS);
DECLARE_STRUCT(EVENT_DATA_IDLE);
DECLARE_STRUCT(EVENT_DATA_KEY);
DECLARE_STRUCT(EVENT_DATA_MOUSE);
DECLARE_STRUCT(EVENT_DATA_SIZE);
typedef void* HEVENTCONTEXT;
typedef int32_t (*EVENTHANDLERFUNC)(const void*, void*);
enum EVENTID {
EVENT_ID_0 = 0,
EVENT_ID_CHAR = 1,
EVENT_ID_FOCUS = 2,
EVENT_ID_3 = 3,
EVENT_ID_DESTROY = 4,
EVENT_ID_5 = 5,
EVENT_ID_IDLE = 6,
EVENT_ID_POLL = 7,
EVENT_ID_INITIALIZE = 8,
EVENT_ID_KEYDOWN = 9,
EVENT_ID_KEYUP = 10,
EVENT_ID_KEYDOWN_REPEATING = 11,
EVENT_ID_MOUSEDOWN = 12,
EVENT_ID_MOUSEMOVE = 13,
EVENT_ID_MOUSEMOVE_RELATIVE = 14,
EVENT_ID_MOUSEUP = 15,
EVENT_ID_MOUSEMODE_CHANGED = 16,
EVENT_ID_MOUSEWHEEL = 17,
EVENT_ID_18 = 18,
EVENT_ID_19 = 19,
EVENT_ID_20 = 20,
EVENT_ID_21 = 21,
EVENT_ID_22 = 22,
EVENT_ID_PAINT = 23,
EVENT_ID_NET_DATA = 24,
EVENT_ID_NET_CONNECT = 25,
EVENT_ID_NET_DISCONNECT = 26,
EVENT_ID_NET_CANTCONNECT = 27,
EVENT_ID_NET_DESTROY = 28,
EVENT_ID_NET_AUTH_CHALLENGE = 29,
EVENT_ID_30 = 30,
EVENT_ID_31 = 31,
EVENT_ID_32 = 32,
EVENT_ID_33 = 33,
EVENT_ID_IME = 34,
EVENT_ID_SIZE = 35,
EVENTIDS = 36
};
enum KEY {
KEY_NONE = 0xFFFFFFFF,
KEY_LSHIFT = 0x0,
KEY_RSHIFT = 0x1,
KEY_LCONTROL = 0x2,
KEY_RCONTROL = 0x3,
KEY_LALT = 0x4,
KEY_RALT = 0x5,
KEY_LASTMETAKEY = 0x5,
KEY_SPACE = 0x20,
KEY_0 = 0x30,
KEY_1 = 0x31,
KEY_2 = 0x32,
KEY_3 = 0x33,
KEY_4 = 0x34,
KEY_5 = 0x35,
KEY_6 = 0x36,
KEY_7 = 0x37,
KEY_8 = 0x38,
KEY_9 = 0x39,
KEY_A = 0x41,
KEY_B = 0x42,
KEY_C = 0x43,
KEY_D = 0x44,
KEY_E = 0x45,
KEY_F = 0x46,
KEY_G = 0x47,
KEY_H = 0x48,
KEY_I = 0x49,
KEY_J = 0x4A,
KEY_K = 0x4B,
KEY_L = 0x4C,
KEY_M = 0x4D,
KEY_N = 0x4E,
KEY_O = 0x4F,
KEY_P = 0x50,
KEY_Q = 0x51,
KEY_R = 0x52,
KEY_S = 0x53,
KEY_T = 0x54,
KEY_U = 0x55,
KEY_V = 0x56,
KEY_W = 0x57,
KEY_X = 0x58,
KEY_Y = 0x59,
KEY_Z = 0x5A,
KEY_TILDE = 0x60,
KEY_NUMPAD0 = 0x100,
KEY_NUMPAD1 = 0x101,
KEY_NUMPAD2 = 0x102,
KEY_NUMPAD3 = 0x103,
KEY_NUMPAD4 = 0x104,
KEY_NUMPAD5 = 0x105,
KEY_NUMPAD6 = 0x106,
KEY_NUMPAD7 = 0x107,
KEY_NUMPAD8 = 0x108,
KEY_NUMPAD9 = 0x109,
KEY_NUMPAD_PLUS = 0x10A,
KEY_NUMPAD_MINUS = 0x10B,
KEY_NUMPAD_MULTIPLY = 0x10C,
KEY_NUMPAD_DIVIDE = 0x10D,
KEY_NUMPAD_DECIMAL = 0x10E,
KEY_NUMPAD_EQUALS = 0x30C,
KEY_PLUS = 0x3D,
KEY_MINUS = 0x2D,
KEY_BRACKET_OPEN = 0x5B,
KEY_BRACKET_CLOSE = 0x5D,
KEY_SLASH = 0x2F,
KEY_BACKSLASH = 0x5C,
KEY_SEMICOLON = 0x3B,
KEY_APOSTROPHE = 0x27,
KEY_COMMA = 0x2C,
KEY_PERIOD = 0x2E,
KEY_ESCAPE = 0x200,
KEY_ENTER = 0x201,
KEY_BACKSPACE = 0x202,
KEY_TAB = 0x203,
KEY_LEFT = 0x204,
KEY_UP = 0x205,
KEY_RIGHT = 0x206,
KEY_DOWN = 0x207,
KEY_INSERT = 0x208,
KEY_DELETE = 0x209,
KEY_HOME = 0x20A,
KEY_END = 0x20B,
KEY_PAGEUP = 0x20C,
KEY_PAGEDOWN = 0x20D,
KEY_CAPSLOCK = 0x20E,
KEY_NUMLOCK = 0x20F,
KEY_SCROLLLOCK = 0x210,
KEY_PAUSE = 0x211,
KEY_PRINTSCREEN = 0x212,
KEY_F1 = 0x300,
KEY_F2 = 0x301,
KEY_F3 = 0x302,
KEY_F4 = 0x303,
KEY_F5 = 0x304,
KEY_F6 = 0x305,
KEY_F7 = 0x306,
KEY_F8 = 0x307,
KEY_F9 = 0x308,
KEY_F10 = 0x309,
KEY_F11 = 0x30A,
KEY_F12 = 0x30B,
KEY_F13 = 0x212,
KEY_F14 = 0x30D,
KEY_F15 = 0x30E,
KEY_F16 = 0x30F,
KEY_F17 = 0x310,
KEY_F18 = 0x311,
KEY_F19 = 0x312,
KEY_LAST = 0x313
};
enum MOUSEBUTTON {
MOUSE_BUTTON_NONE = 0x0,
MOUSE_BUTTON_LEFT = 0x1,
MOUSE_BUTTON_MIDDLE = 0x2,
MOUSE_BUTTON_RIGHT = 0x4,
MOUSE_BUTTON_XBUTTON1 = 0x8,
MOUSE_BUTTON_XBUTTON2 = 0x10,
MOUSE_BUTTON_XBUTTON3 = 0x20,
MOUSE_BUTTON_XBUTTON4 = 0x40,
MOUSE_BUTTON_XBUTTON5 = 0x80,
MOUSE_BUTTON_XBUTTON6 = 0x100,
MOUSE_BUTTON_XBUTTON7 = 0x200,
MOUSE_BUTTON_XBUTTON8 = 0x400,
MOUSE_BUTTON_XBUTTON9 = 0x800,
MOUSE_BUTTON_XBUTTON10 = 0x1000,
MOUSE_BUTTON_XBUTTON11 = 0x2000,
MOUSE_BUTTON_XBUTTON12 = 0x4000,
MOUSE_BUTTON_ALL = 0xFFFFFFFF
};
enum MOUSEMODE {
MOUSE_MODE_NORMAL = 0x0,
MOUSE_MODE_RELATIVE = 0x1,
MOUSE_MODES = 0x2
};
enum OSINPUT {
OS_INPUT_CAPTURE_CHANGED = 0,
OS_INPUT_CHAR = 1,
OS_INPUT_STRING = 2,
OS_INPUT_IME = 3,
OS_INPUT_SIZE = 4,
OS_INPUT_CLOSE = 5,
OS_INPUT_FOCUS = 6,
OS_INPUT_KEY_DOWN = 7,
OS_INPUT_KEY_UP = 8,
OS_INPUT_MOUSE_DOWN = 9,
OS_INPUT_MOUSE_MOVE = 10,
OS_INPUT_MOUSE_WHEEL = 11,
OS_INPUT_MOUSE_MOVE_RELATIVE = 12,
OS_INPUT_MOUSE_UP = 13,
OS_INPUT_14 = 14,
OS_INPUT_15 = 15,
OS_INPUT_16 = 16,
OS_INPUT_17 = 17,
OS_INPUT_18 = 18,
OS_INPUT_SHUTDOWN = 19
};
enum OS_MOUSE_MODE {
OS_MOUSE_MODE_NORMAL = 0,
OS_MOUSE_MODE_RELATIVE = 1,
OS_MOUSE_MODES = 2,
};
struct OSEVENT {
OSINPUT id;
int32_t param[4];
};
struct EVENT_DATA_CHAR {
int32_t ch;
uint32_t metaKeyState;
uint32_t repeat;
};
struct EVENT_DATA_FOCUS {
int32_t focus;
};
struct EVENT_DATA_IDLE {
float elapsedSec;
uint32_t time;
};
struct EVENT_DATA_KEY {
KEY key;
uint32_t metaKeyState;
uint32_t repeat;
uint32_t time;
};
struct EVENT_DATA_MOUSE {
MOUSEMODE mode;
MOUSEBUTTON button;
uint32_t buttonState;
uint32_t metaKeyState;
uint32_t flags;
float x;
float y;
int32_t wheelDistance;
uint32_t time;
};
struct EVENT_DATA_SIZE {
int32_t w;
int32_t h;
};
#endif

View file

@ -0,0 +1,35 @@
#ifndef FRAMESCRIPT_EVENT_OBJECT_H
#define FRAMESCRIPT_EVENT_OBJECT_H
#include "storm/hash.h"
#include "framescript/object.h"
#include "ui/simpleframe.h"
DECLARE_STRUCT(FrameScript_EventObject);
DECLARE_STRUCT(SIMPLEFRAMENODE);
DECLARE_STRUCT(EVENTLISTENERNODE);
STORM_TS_LIST(SIMPLEFRAMENODE);
STORM_TS_LIST(EVENTLISTENERNODE);
// struct SIMPLEFRAMENODE : TSLinkedNode<SIMPLEFRAMENODE>
struct SIMPLEFRAMENODE {
TSLinkedNode_SIMPLEFRAMENODE b_base;
CSimpleFrame* frame;
};
// struct EVENTLISTENERNODE : TSLinkedNode<EVENTLISTENERNODE> {
struct EVENTLISTENERNODE {
TSLinkedNode_EVENTLISTENERNODE b_base;
FrameScript_Object* listener;
};
STORM_TS_HASH(FrameScript_EventObject, HASHKEY_STRI)
struct FrameScript_EventObject {
TSHashObject_FrameScript_EventObject_HASHKEY_STRI b_base;
};
#endif

View file

@ -0,0 +1,15 @@
#ifndef FRAMESCRIPT_OBJECT_H
#define FRAMESCRIPT_OBJECT_H
#include "system/types.h"
DECLARE_STRUCT(FrameScript_Object);
struct FrameScript_Object {
void** v_vtable;
int32_t lua_registered;
int32_t lua_objectRef;
int32_t m_onEvent;
};
#endif

View file

@ -1,136 +1,136 @@
#ifndef GX_BUFFER_H
#define GX_BUFFER_H
#include <stdint.h>
#include "storm/list.h"
#include "tempest/vector.h"
typedef enum EGxPoolHintBits EGxPoolHintBits;
typedef enum EGxPoolTarget EGxPoolTarget;
typedef enum EGxPoolUsage EGxPoolUsage;
typedef enum EGxVertexAttrib EGxVertexAttrib;
typedef enum EGxVertexBufferFormat EGxVertexBufferFormat;
typedef struct ubyte4 ubyte4;
typedef struct CGxVertexAttrib CGxVertexAttrib;
typedef struct CGxVertexPBNT2 CGxVertexPBNT2;
typedef struct CGxVertexPCT CGxVertexPCT;
typedef struct CGxPool CGxPool;
typedef struct CGxBuf CGxBuf;
enum EGxPoolHintBits {
GxPoolHintBit_Unk0 = 0,
GxPoolHintBit_Unk1 = 1,
GxPoolHintBit_Unk2 = 2,
GxPoolHintBit_Unk3 = 3
};
enum EGxPoolTarget {
GxPoolTarget_Vertex = 0,
GxPoolTarget_Index = 1,
GxPoolTargets_Last = 2
};
enum EGxPoolUsage {
GxPoolUsage_Static = 0,
GxPoolUsage_Dynamic = 1,
GxPoolUsage_Stream = 2,
GxPoolUsages_Last = 3
};
enum EGxVertexAttrib {
GxVA_Position = 0,
GxVA_BlendWeight = 1,
GxVA_BlendIndices = 2,
GxVA_Normal = 3,
GxVA_Color0 = 4,
GxVA_Color1 = 5,
GxVA_TexCoord0 = 6,
GxVA_TexCoord1 = 7,
GxVA_TexCoord2 = 8,
GxVA_TexCoord3 = 9,
GxVA_TexCoord4 = 10,
GxVA_TexCoord5 = 11,
GxVA_TexCoord6 = 12,
GxVA_TexCoord7 = 13,
GxVAs_Last = 14
};
enum EGxVertexBufferFormat {
GxVBF_P = 0,
GxVBF_PN = 1,
GxVBF_PNC = 2,
GxVBF_PNT = 3,
GxVBF_PNCT = 4,
GxVBF_PNT2 = 5,
GxVBF_PNCT2 = 6,
GxVBF_PC = 7,
GxVBF_PCT = 8,
GxVBF_PCT2 = 9,
GxVBF_PT = 10,
GxVBF_PT2 = 11,
GxVBF_PBNT2 = 12,
GxVBF_PNC2T2 = 13,
GxVertexBufferFormats_Last = 14
};
struct ubyte4 {
union {
uint8_t b[4];
uint32_t u;
};
};
struct CGxVertexAttrib {
EGxVertexAttrib attrib;
uint32_t type;
uint32_t offset;
uint32_t bufSize;
};
struct CGxVertexPBNT2 {
C3Vector p;
ubyte4 bw;
ubyte4 bi;
C3Vector n;
C2Vector tc[2];
};
struct CGxVertexPCT {
C3Vector p;
CImVector c;
C2Vector tc[1];
};
STORM_TS_LIST(CGxBuf);
STORM_TS_LIST(CGxPool);
// class CGxPool : public TSLinkedNode<CGxPool>
struct CGxPool {
TSLinkedNode_CGxPool b_base;
EGxPoolTarget m_target;
EGxPoolUsage m_usage;
int32_t m_size;
void* m_apiSpecific;
void* m_mem;
int32_t unk1C; // TODO
TSList_CGxBuf m_bufList;
EGxPoolHintBits m_hint;
const char* m_name;
};
// class CGxBuf : public TSLinkedNode<CGxBuf>
struct CGxBuf {
TSLinkedNode_CGxBuf b_base;
CGxPool* m_pool;
uint32_t m_itemSize;
uint32_t m_itemCount;
uint32_t m_size;
uint32_t m_index;
uint8_t unk1C; // TODO
uint8_t unk1D; // TODO
uint8_t unk1E; // TODO
uint8_t unk1F; // TODO
};
#ifndef GX_BUFFER_H
#define GX_BUFFER_H
#include "system/types.h"
#include "storm/list.h"
#include "tempest/vector.h"
typedef enum EGxPoolHintBits EGxPoolHintBits;
typedef enum EGxPoolTarget EGxPoolTarget;
typedef enum EGxPoolUsage EGxPoolUsage;
typedef enum EGxVertexAttrib EGxVertexAttrib;
typedef enum EGxVertexBufferFormat EGxVertexBufferFormat;
typedef struct ubyte4 ubyte4;
typedef struct CGxVertexAttrib CGxVertexAttrib;
typedef struct CGxVertexPBNT2 CGxVertexPBNT2;
typedef struct CGxVertexPCT CGxVertexPCT;
typedef struct CGxPool CGxPool;
typedef struct CGxBuf CGxBuf;
enum EGxPoolHintBits {
GxPoolHintBit_Unk0 = 0,
GxPoolHintBit_Unk1 = 1,
GxPoolHintBit_Unk2 = 2,
GxPoolHintBit_Unk3 = 3
};
enum EGxPoolTarget {
GxPoolTarget_Vertex = 0,
GxPoolTarget_Index = 1,
GxPoolTargets_Last = 2
};
enum EGxPoolUsage {
GxPoolUsage_Static = 0,
GxPoolUsage_Dynamic = 1,
GxPoolUsage_Stream = 2,
GxPoolUsages_Last = 3
};
enum EGxVertexAttrib {
GxVA_Position = 0,
GxVA_BlendWeight = 1,
GxVA_BlendIndices = 2,
GxVA_Normal = 3,
GxVA_Color0 = 4,
GxVA_Color1 = 5,
GxVA_TexCoord0 = 6,
GxVA_TexCoord1 = 7,
GxVA_TexCoord2 = 8,
GxVA_TexCoord3 = 9,
GxVA_TexCoord4 = 10,
GxVA_TexCoord5 = 11,
GxVA_TexCoord6 = 12,
GxVA_TexCoord7 = 13,
GxVAs_Last = 14
};
enum EGxVertexBufferFormat {
GxVBF_P = 0,
GxVBF_PN = 1,
GxVBF_PNC = 2,
GxVBF_PNT = 3,
GxVBF_PNCT = 4,
GxVBF_PNT2 = 5,
GxVBF_PNCT2 = 6,
GxVBF_PC = 7,
GxVBF_PCT = 8,
GxVBF_PCT2 = 9,
GxVBF_PT = 10,
GxVBF_PT2 = 11,
GxVBF_PBNT2 = 12,
GxVBF_PNC2T2 = 13,
GxVertexBufferFormats_Last = 14
};
struct ubyte4 {
union {
uint8_t b[4];
uint32_t u;
};
};
struct CGxVertexAttrib {
EGxVertexAttrib attrib;
uint32_t type;
uint32_t offset;
uint32_t bufSize;
};
struct CGxVertexPBNT2 {
C3Vector p;
ubyte4 bw;
ubyte4 bi;
C3Vector n;
C2Vector tc[2];
};
struct CGxVertexPCT {
C3Vector p;
CImVector c;
C2Vector tc[1];
};
STORM_TS_LIST(CGxBuf);
STORM_TS_LIST(CGxPool);
// class CGxPool : public TSLinkedNode<CGxPool>
struct CGxPool {
TSLinkedNode_CGxPool b_base;
EGxPoolTarget m_target;
EGxPoolUsage m_usage;
int32_t m_size;
void* m_apiSpecific;
void* m_mem;
int32_t unk1C; // TODO
TSList_CGxBuf m_bufList;
EGxPoolHintBits m_hint;
const char* m_name;
};
// class CGxBuf : public TSLinkedNode<CGxBuf>
struct CGxBuf {
TSLinkedNode_CGxBuf b_base;
CGxPool* m_pool;
uint32_t m_itemSize;
uint32_t m_itemCount;
uint32_t m_size;
uint32_t m_index;
uint8_t unk1C; // TODO
uint8_t unk1D; // TODO
uint8_t unk1E; // TODO
uint8_t unk1F; // TODO
};
#endif

View file

@ -1,7 +1,7 @@
#ifndef GX_CAPS_H
#define GX_CAPS_H
#include <stdint.h>
#include "system/types.h"
#include "gx/types.h"

View file

@ -1,7 +1,7 @@
#ifndef GX_DEVICE_H
#define GX_DEVICE_H
#include <stdint.h>
#include "system/types.h"
#include "storm/array.h"
#include "storm/array/uint32_t.h"

View file

@ -1,8 +1,7 @@
#ifndef GX_FORMAT_H
#define GX_FORMAT_H
#include <stdint.h>
#include <stdbool.h>
#include "system/types.h"
#include "tempest/vector.h"

View file

@ -1,22 +1,22 @@
#ifndef GX_MATRIX_STACK_H
#define GX_MATRIX_STACK_H
#include <stdint.h>
#include "tempest/matrix.h"
typedef enum CGxMatrixStack__EMatrixFlags CGxMatrixStack__EMatrixFlags;
typedef struct CGxMatrixStack CGxMatrixStack;
enum CGxMatrixStack__EMatrixFlags {
F_Identity = 0x1
};
struct CGxMatrixStack {
uint32_t m_level;
int8_t m_dirty;
C44Matrix m_mtx[4];
uint32_t m_flags[4];
};
#ifndef GX_MATRIX_STACK_H
#define GX_MATRIX_STACK_H
#include "system/types.h"
#include "tempest/matrix.h"
typedef enum CGxMatrixStack__EMatrixFlags CGxMatrixStack__EMatrixFlags;
typedef struct CGxMatrixStack CGxMatrixStack;
enum CGxMatrixStack__EMatrixFlags {
F_Identity = 0x1
};
struct CGxMatrixStack {
uint32_t m_level;
int8_t m_dirty;
C44Matrix m_mtx[4];
uint32_t m_flags[4];
};
#endif

View file

@ -1,21 +1,21 @@
#ifndef GX_STATE_BOM_H
#define GX_STATE_BOM_H
#include <stdint.h>
#include "storm/array.h"
typedef struct CGxStateBom CGxStateBom;
struct CGxStateBom {
union {
int32_t i[3];
uint32_t u[3];
float f[3];
void* p;
} m_data;
int32_t filler;
};
STORM_TS_FIXED_ARRAY(CGxStateBom);
#ifndef GX_STATE_BOM_H
#define GX_STATE_BOM_H
#include "system/types.h"
#include "storm/array.h"
typedef struct CGxStateBom CGxStateBom;
struct CGxStateBom {
union {
int32_t i[3];
uint32_t u[3];
float f[3];
void* p;
} m_data;
int32_t filler;
};
STORM_TS_FIXED_ARRAY(CGxStateBom);
#endif

View file

@ -1,7 +1,7 @@
#ifndef GX_TYPES_H
#define GX_TYPES_H
#include <stdint.h>
#include "system/types.h"
#include "storm/array.h"

View file

@ -1,4 +1,38 @@
// Defines
#include "system/detect.h"
// Types
#include "common/handle.h"
#include "common/instance.h"
#include "common/datarecycler.h"
#include "d3d9/caps.h"
#include "d3d9/device.h"
#include "event/types.h"
#include "event/context.h"
#include "event/handler.h"
#include "event/id_table.h"
#include "event/keydown.h"
#include "event/message.h"
#include "event/timer.h"
#include "framescript/object.h"
#include "framescript/event_object.h"
#include "gx/buffer.h"
#include "gx/caps.h"
#include "gx/device.h"
#include "gx/format.h"
#include "gx/matrix_stack.h"
#include "gx/shader.h"
#include "gx/state_bom.h"
#include "gx/types.h"
#include "gx/batch.h"
#include "gx/d3d9.h"
#include "storm/array.h"
#include "storm/list.h"
#include "storm/hash.h"
@ -12,22 +46,17 @@
#include "tempest/sphere.h"
#include "tempest/vector.h"
#include "gx/buffer.h"
#include "gx/caps.h"
#include "gx/device.h"
#include "gx/format.h"
#include "gx/matrix_stack.h"
#include "gx/shader.h"
#include "gx/state_bom.h"
#include "gx/types.h"
#include "gx/batch.h"
#include "gx/d3d9.h"
#include "ui/simpleframe.h"
// include files that define the use of template classes for standard library types
// template classes for whoa types should be entered immediately after where the type is
#include "storm/array/pointer_to_void.h"
#include "storm/array/uint8_t.h"
#include "storm/array/uint32_t.h"
#include "storm/queue/timer_priority_uint32_t.h"
// template types that are defined in our headers, should be declared immediately after the base type
// and not used anywhere else

View file

@ -1,7 +1,7 @@
#ifndef STORM_ARRAY_H
#define STORM_ARRAY_H
#include <stdint.h>
#include "system/types.h"
#define STORM_TS_BASE_ARRAY(T) typedef struct TSBaseArray_##T TSBaseArray_##T; \
struct TSBaseArray_##T { \
@ -25,4 +25,28 @@ struct TSGrowableArray_##T { \
uint32_t m_chunk; \
};
// "pointer-to" types hack
#define STORM_TS_BASE_ARRAY_POINTER_TO(T) typedef struct TSBaseArray_pointer_to_##T TSBaseArray_pointer_to_##T; \
struct TSBaseArray_pointer_to_##T { \
uint32_t m_alloc; \
uint32_t m_count; \
T** m_data; \
};
#define STORM_TS_FIXED_ARRAY_POINTER_TO(T) typedef struct TSFixedArray_pointer_to_##T TSFixedArray_pointer_to_##T; \
struct TSFixedArray_pointer_to_##T { \
uint32_t m_alloc; \
uint32_t m_count; \
T** m_data; \
};
#define STORM_TS_GROWABLE_ARRAY_POINTER_TO(T) typedef struct TSGrowableArray_pointer_to_##T TSGrowableArray_pointer_to_##T; \
struct TSGrowableArray_pointer_to_##T { \
uint32_t m_alloc; \
uint32_t m_count; \
T** m_data; \
uint32_t m_chunk; \
};
#endif

View file

@ -0,0 +1,10 @@
#ifndef STORM_ARRAY_POINTER_TO_VOID_H
#define STORM_ARRAY_POINTER_TO_VOID_H
#include "system/types.h"
#include "storm/array.h"
STORM_TS_GROWABLE_ARRAY_POINTER_TO(void);
#endif

View file

@ -1,10 +1,10 @@
#ifndef STORM_ARRAY_UINT32_T_H
#define STORM_ARRAY_UINT32_T_H
#include <stdint.h>
#include "storm/array.h"
STORM_TS_GROWABLE_ARRAY(uint32_t);
#ifndef STORM_ARRAY_UINT32_T_H
#define STORM_ARRAY_UINT32_T_H
#include "system/types.h"
#include "storm/array.h"
STORM_TS_GROWABLE_ARRAY(uint32_t);
#endif

View file

@ -1,10 +1,10 @@
#ifndef STORM_ARRAY_UINT8_T_H
#define STORM_ARRAY_UINT8_T_H
#include <stdint.h>
#include "storm/array.h"
STORM_TS_GROWABLE_ARRAY(uint8_t);
#ifndef STORM_ARRAY_UINT8_T_H
#define STORM_ARRAY_UINT8_T_H
#include "system/types.h"
#include "storm/array.h"
STORM_TS_GROWABLE_ARRAY(uint8_t);
#endif

View file

@ -1,47 +1,48 @@
#ifndef STORM_HASH_H
#define STORM_HASH_H
#include <stdint.h>
#include "storm/array.h"
#include "storm/list.h"
#define STORM_TS_HASH(T, K) \
STORM_TS_LIST(T) \
STORM_TS_GROWABLE_ARRAY(TSList_##T) \
typedef struct TSHashTable_##T##_##K TSHashTable_##T##_##K; \
typedef struct TSHashObject_##T##_##K TSHashObject_##T##_##K; \
struct TSHashTable_##T##_##K { \
TSList_##T m_fulllist; \
uint32_t m_fullnessIndicator; \
TSGrowableArray_TSList_##T m_slotlistarray; \
uint32_t m_slotmask; \
}; \
struct TSHashObject_##T##_##K { \
uint32_t m_hashval; \
TSLink_##T m_linktoslot; \
TSLink_##T m_linktofull; \
K m_key; \
};
typedef struct HASHKEY_PTR HASHKEY_PTR;
typedef struct HASHKEY_STR HASHKEY_STR;
typedef struct HASHKEY_STRI HASHKEY_STRI;
typedef struct HASHKEY_NONE HASHKEY_NONE;
struct HASHKEY_PTR {
void* m_key;
};
struct HASHKEY_STR {
char* m_str;
};
struct HASHKEY_STRI {
char* m_str;
};
struct HASHKEY_NONE {
};
#ifndef STORM_HASH_H
#define STORM_HASH_H
#include "system/types.h"
#include "storm/array.h"
#include "storm/list.h"
#define STORM_TS_HASH(T, K) \
STORM_TS_LIST(T) \
STORM_TS_GROWABLE_ARRAY(TSList_##T) \
typedef struct TSHashTable_##T##_##K TSHashTable_##T##_##K; \
typedef struct TSHashObject_##T##_##K TSHashObject_##T##_##K; \
struct TSHashTable_##T##_##K { \
TSList_##T m_fulllist; \
uint32_t m_fullnessIndicator; \
TSGrowableArray_TSList_##T m_slotlistarray; \
uint32_t m_slotmask; \
}; \
struct TSHashObject_##T##_##K { \
uint32_t m_hashval; \
TSLink_##T m_linktoslot; \
TSLink_##T m_linktofull; \
K m_key; \
};
DECLARE_STRUCT(HASHKEY_PTR);
DECLARE_STRUCT(HASHKEY_STR);
DECLARE_STRUCT(HASHKEY_STRI);
DECLARE_STRUCT(HASHKEY_NONE);
struct HASHKEY_PTR {
void* m_key;
};
struct HASHKEY_STR {
char* m_str;
};
struct HASHKEY_STRI {
char* m_str;
};
struct HASHKEY_NONE {
int32_t m_unused;
};
#endif

View file

@ -1,31 +1,33 @@
#ifndef STORM_LIST_H
#define STORM_LIST_H
#include <stdint.h>
// to make an object self referential
// forward-declare 'struct Object_type' as 'Object_type'
// then define 'struct Object_type'
// TSLink<T>
#define STORM_TS_LINK(T) typedef struct TSLink_##T TSLink_##T; \
struct TSLink_##T { \
TSLink_##T* m_prevlink; \
T* m_next; \
};
// TSList<T>
// TSLinkedNode<T>
#define STORM_TS_LIST(T) \
STORM_TS_LINK(T) \
typedef struct TSList_##T TSList_##T; \
typedef struct TSLinkedNode_##T TSLinkedNode_##T; \
struct TSList_##T { \
ptrdiff_t m_linkoffset; \
TSLink_##T m_terminator; \
}; \
struct TSLinkedNode_##T { \
TSLink_##T m_link; \
};
#ifndef STORM_LIST_H
#define STORM_LIST_H
#include "system/types.h"
// to make an object self referential
// forward-declare 'struct Object_type' as 'Object_type'
// then define 'struct Object_type'
// TSLink<T>
#define STORM_TS_LINK(T) typedef struct TSLink_##T TSLink_##T; \
struct TSLink_##T { \
TSLink_##T* m_prevlink; \
T* m_next; \
};
// TSList<T>
// TSExplicitList<T>
// TSLinkedNode<T>
#define STORM_TS_LIST(T) \
STORM_TS_LINK(T) \
typedef struct TSList_##T TSList_##T; \
typedef struct TSList_##T TSExplicitList_##T; \
typedef struct TSLinkedNode_##T TSLinkedNode_##T; \
struct TSList_##T { \
ptrdiff_t m_linkoffset; \
TSLink_##T m_terminator; \
}; \
struct TSLinkedNode_##T { \
TSLink_##T m_link; \
};
#endif

View file

@ -0,0 +1,31 @@
#ifndef STORM_QUEUE_H
#define STORM_QUEUE_H
#include "system/types.h"
#include "storm/array/pointer_to_void.h"
DECLARE_STRUCT(CSBasePriorityQueue);
DECLARE_STRUCT(CSBasePriority);
struct CSBasePriorityQueue {
TSGrowableArray_pointer_to_void b_base;
uint32_t m_linkOffset;
};
struct CSBasePriority {
CSBasePriorityQueue* m_queue;
uint32_t m_index;
};
#define STORM_TS_TIMER_PRIORITY(T) \
typedef struct TSTimerPriority_##T TSTimerPriority_##T; \
struct TSTimerPriority_##T { \
CSBasePriority b_base; \
T m_val; \
};
#define STORM_TS_PRIORITY_QUEUE(T) \
typedef CSBasePriorityQueue TSPriorityQueue_##T;
#endif

View file

@ -0,0 +1,10 @@
#ifndef STORM_QUEUE_TIMER_PRIORITY_UINT32_T_H
#define STORM_QUEUE_TIMER_PRIORITY_UINT32_T_H
#include "system/types.h"
#include "storm/queue.h"
STORM_TS_TIMER_PRIORITY(uint32_t);
#endif

View file

@ -0,0 +1,17 @@
#ifndef STORM_THREAD_H
#define STORM_THREAD_H
#include "system/types.h"
DECLARE_STRUCT(SCritSect);
typedef struct CSRWLock CSRWLock;
struct SCritSect {
uint8_t m_critsect[24];
};
struct CSRWLock {
uint8_t m_opaqueData[12];
};
#endif

View file

@ -0,0 +1,23 @@
#ifndef SYSTEM_DETECT_H
#define SYSTEM_DETECT_H
#if !defined(IDA) && !defined(GHIDRA) && !defined(BINANA_GENERATOR)
#error "Preprocessor mode not detected! You must define either IDA or GHIDRA or BINANA_GENERATOR"
#endif
#if defined(IDA)
// why does this work?
#define DECLARE_ENUM(E) typedef enum E##__ E
#else
#define DECLARE_ENUM(E) typedef enum E E
#endif
#define DECLARE_STRUCT(T) typedef struct T T
#endif

View file

@ -0,0 +1,40 @@
#ifndef SYSTEM_TYPES_H
#define SYSTEM_TYPES_H
// stdint
#if defined(IDA) || defined(BINANA_GENERATOR)
typedef signed char int8_t;
typedef short int16_t;
typedef int int32_t;
typedef long long int64_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
typedef int32_t ptrdiff_t;
typedef uint32_t uintptr_t;
typedef int32_t intptr_t;
#else
#include <stdint.h>
#endif
// stdbool
#if defined(BINANA_GENERATOR)
typedef char bool;
#endif
#if defined(GHIDRA)
#include <stdbool.h>
#endif
#endif

View file

@ -1,21 +1,21 @@
#ifndef TEMPEST_BOX_H
#define TEMPEST_BOX_H
#include "tempest/vector.h"
#include "tempest/range.h"
typedef struct CAaBox CAaBox;
typedef struct CBoundingBox CBoundingBox;
struct CAaBox {
C3Vector b;
C3Vector t;
};
struct CBoundingBox {
CRange x;
CRange y;
CRange z;
};
#ifndef TEMPEST_BOX_H
#define TEMPEST_BOX_H
#include "tempest/vector.h"
#include "tempest/range.h"
DECLARE_STRUCT(CAaBox);
DECLARE_STRUCT(CBoundingBox);
struct CAaBox {
C3Vector b;
C3Vector t;
};
struct CBoundingBox {
CRange x;
CRange y;
CRange z;
};
#endif

View file

@ -1,55 +1,55 @@
#ifndef TEMPEST_MATRIX_H
#define TEMPEST_MATRIX_H
typedef struct C33Matrix C33Matrix;
typedef struct C34Matrix C34Matrix;
typedef struct C44Matrix C44Matrix;
struct C33Matrix {
float a0;
float a1;
float a2;
float b0;
float b1;
float b2;
float c0;
float c1;
float c2;
};
struct C34Matrix {
float a0;
float a1;
float a2;
float b0;
float b1;
float b2;
float c0;
float c1;
float c2;
float d0;
float d1;
float d2;
};
struct C44Matrix {
float a0;
float a1;
float a2;
float a3;
float b0;
float b1;
float b2;
float b3;
float c0;
float c1;
float c2;
float c3;
float d0;
float d1;
float d2;
float d3;
};
#ifndef TEMPEST_MATRIX_H
#define TEMPEST_MATRIX_H
DECLARE_STRUCT(C33Matrix);
DECLARE_STRUCT(C34Matrix);
DECLARE_STRUCT(C44Matrix);
struct C33Matrix {
float a0;
float a1;
float a2;
float b0;
float b1;
float b2;
float c0;
float c1;
float c2;
};
struct C34Matrix {
float a0;
float a1;
float a2;
float b0;
float b1;
float b2;
float c0;
float c1;
float c2;
float d0;
float d1;
float d2;
};
struct C44Matrix {
float a0;
float a1;
float a2;
float a3;
float b0;
float b1;
float b2;
float b3;
float c0;
float c1;
float c2;
float c3;
float d0;
float d1;
float d2;
float d3;
};
#endif

View file

@ -1,13 +1,13 @@
#ifndef TEMPEST_PLANE_H
#define TEMPEST_PLANE_H
#include "tempest/vector.h"
typedef struct C4Plane C4Plane;
struct C4Plane {
C3Vector n;
float d;
};
#ifndef TEMPEST_PLANE_H
#define TEMPEST_PLANE_H
#include "tempest/vector.h"
DECLARE_STRUCT(C4Plane);
struct C4Plane {
C3Vector n;
float d;
};
#endif

View file

@ -1,13 +1,13 @@
#ifndef TEMPEST_QUATERNION_H
#define TEMPEST_QUATERNION_H
typedef struct C4Quaternion C4Quaternion;
struct C4Quaternion {
float x;
float y;
float z;
float w;
};
#ifndef TEMPEST_QUATERNION_H
#define TEMPEST_QUATERNION_H
DECLARE_STRUCT(C4Quaternion);
struct C4Quaternion {
float x;
float y;
float z;
float w;
};
#endif

View file

@ -1,19 +1,19 @@
#ifndef TEMPEST_RANGE_H
#define TEMPEST_RANGE_H
#include <stdint.h>
typedef struct CRange CRange;
typedef struct CiRange CiRange;
struct CRange {
float l;
float h;
};
struct CiRange {
int32_t l;
int32_t h;
};
#ifndef TEMPEST_RANGE_H
#define TEMPEST_RANGE_H
#include "system/types.h"
DECLARE_STRUCT(CRange);
DECLARE_STRUCT(CiRange);
struct CRange {
float l;
float h;
};
struct CiRange {
int32_t l;
int32_t h;
};
#endif

View file

@ -1,23 +1,23 @@
#ifndef TEMPEST_RECT_H
#define TEMPEST_RECT_H
#include <stdint.h>
typedef struct CRect CRect;
typedef struct CiRect CiRect;
struct CRect {
float minY; // t
float minX; // l
float maxY; // b
float maxX; // r
};
struct CiRect {
int32_t minY;
int32_t minX;
int32_t maxY;
int32_t maxX;
};
#ifndef TEMPEST_RECT_H
#define TEMPEST_RECT_H
#include "system/types.h"
DECLARE_STRUCT(CRect);
DECLARE_STRUCT(CiRect);
struct CRect {
float minY; // t
float minX; // l
float maxY; // b
float maxX; // r
};
struct CiRect {
int32_t minY;
int32_t minX;
int32_t maxY;
int32_t maxX;
};
#endif

View file

@ -1,13 +1,13 @@
#ifndef TEMPEST_SPHERE_H
#define TEMPEST_SPHERE_H
#include "tempest/vector.h"
typedef struct CAaSphere CAaSphere;
struct CAaSphere {
C3Vector n;
float d;
};
#ifndef TEMPEST_SPHERE_H
#define TEMPEST_SPHERE_H
#include "tempest/vector.h"
DECLARE_STRUCT(CAaSphere);
struct CAaSphere {
C3Vector n;
float d;
};
#endif

View file

@ -1,43 +1,43 @@
#ifndef TEMPEST_VECTOR_H
#define TEMPEST_VECTOR_H
#include <stdint.h>
typedef struct C2Vector C2Vector;
typedef struct C2iVector C2iVector;
typedef struct C3Vector C3Vector;
typedef struct C4Vector C4Vector;
typedef struct CImVector CImVector;
struct C2Vector {
float x;
float y;
};
struct C2iVector {
int32_t x;
int32_t y;
};
struct C3Vector {
float x;
float y;
float z;
};
struct C4Vector {
float x;
float y;
float z;
float w;
};
struct CImVector {
uint8_t b;
uint8_t g;
uint8_t r;
uint8_t a;
};
#ifndef TEMPEST_VECTOR_H
#define TEMPEST_VECTOR_H
#include "system/types.h"
DECLARE_STRUCT(C2Vector);
DECLARE_STRUCT(C2iVector);
DECLARE_STRUCT(C3Vector);
DECLARE_STRUCT(C4Vector);
DECLARE_STRUCT(CImVector);
struct C2Vector {
float x;
float y;
};
struct C2iVector {
int32_t x;
int32_t y;
};
struct C3Vector {
float x;
float y;
float z;
};
struct C4Vector {
float x;
float y;
float z;
float w;
};
struct CImVector {
uint8_t b;
uint8_t g;
uint8_t r;
uint8_t a;
};
#endif

View file

@ -0,0 +1,9 @@
#ifndef UI_SIMPLE_FRAME_H
#define UI_SIMPLE_FRAME_H
DECLARE_STRUCT(CSimpleFrame);
struct CSimpleFrame {
};
#endif