mirror of
https://github.com/thunderbrewhq/binana.git
synced 2025-12-12 17:52:29 +00:00
fix(include): Ghidra can't figure out how to use enum values as array size parameters, so just use hardcoded numbers instead
This commit is contained in:
parent
e7bb9a818a
commit
0683e31289
7 changed files with 57 additions and 13 deletions
|
|
@ -15,10 +15,14 @@ struct CGxCaps {
|
|||
EGxColorFormat m_colorFormat;
|
||||
uint32_t m_maxIndex;
|
||||
int32_t m_generateMipMaps;
|
||||
int32_t m_texFmt[GxTexFormats_Last];
|
||||
int32_t m_texTarget[GxTexTargets_Last];
|
||||
uint32_t m_texMaxSize[GxTexTargets_Last];
|
||||
int32_t m_shaderTargets[GxShTargets_Last];
|
||||
// int32_t m_texFmt[GxTexFormats_Last];
|
||||
int32_t m_texFmt[13];
|
||||
// int32_t m_texTarget[GxTexTargets_Last];
|
||||
int32_t m_texTarget[4];
|
||||
// uint32_t m_texMaxSize[GxTexTargets_Last];
|
||||
uint32_t m_texMaxSize[4];
|
||||
// int32_t m_shaderTargets[GxShTargets_Last];
|
||||
int32_t m_shaderTargets[6];
|
||||
int32_t m_texFilterTrilinear;
|
||||
int32_t m_texFilterAnisotropic;
|
||||
uint32_t m_maxTexAnisotropy;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@
|
|||
#include "gx/matrix_stack.h"
|
||||
#include "gx/buffer.h"
|
||||
|
||||
typedef struct CGxAppRenderState CGxAppRenderState;
|
||||
typedef struct CGxPushedRenderState CGxPushedRenderState;
|
||||
typedef struct ShaderConstants ShaderConstants;
|
||||
typedef struct CGxDevice CGxDevice;
|
||||
|
||||
struct CGxAppRenderState {
|
||||
|
|
@ -41,7 +44,7 @@ struct ShaderConstants {
|
|||
uint32_t unk2;
|
||||
};
|
||||
|
||||
// minimum size in binary: 3944 bytes
|
||||
// this class is at least 14688 bytes in size
|
||||
struct CGxDevice {
|
||||
// TODO: pointer to struct CGxDevice__vtable
|
||||
void* v_vtable;
|
||||
|
|
@ -53,7 +56,8 @@ struct CGxDevice {
|
|||
EGxApi m_api;
|
||||
CGxFormat m_format;
|
||||
CGxCaps m_caps;
|
||||
TSHashTable_CGxShader_HASHKEY_STRI m_shaderList[GxShTargets_Last];
|
||||
// TSHashTable_CGxShader_HASHKEY_STRI m_shaderList[GxShTargets_Last];
|
||||
TSHashTable_CGxShader_HASHKEY_STRI m_shaderList[6];
|
||||
int32_t (*m_windowProc)(void* window, uint32_t message, uintptr_t wparam, intptr_t lparam);
|
||||
int32_t m_context;
|
||||
int32_t intF5C;
|
||||
|
|
@ -63,16 +67,21 @@ struct CGxDevice {
|
|||
CBoundingBox m_viewport;
|
||||
C44Matrix m_projection;
|
||||
C44Matrix m_projNative;
|
||||
CGxMatrixStack m_xforms[GxXforms_Last];
|
||||
// CGxMatrixStack m_xforms[GxXforms_Last];
|
||||
CGxMatrixStack m_xforms[11];
|
||||
uint32_t m_appMasterEnables;
|
||||
uint32_t m_hwMasterEnables;
|
||||
TSList_CGxPool m_poolList;
|
||||
CGxBuf* m_bufLocked[GxPoolTargets_Last];
|
||||
// CGxBuf* m_bufLocked[GxPoolTargets_Last];
|
||||
CGxBuf* m_bufLocked[2];
|
||||
CGxPool* m_vertexPool;
|
||||
CGxPool* m_indexPool;
|
||||
CGxBuf* m_streamBufs[GxPoolTargets_Last];
|
||||
CGxVertexAttrib m_primVertexFormatAttrib[GxVertexBufferFormats_Last];
|
||||
CGxBuf* m_primVertexFormatBuf[GxVertexBufferFormats_Last];
|
||||
// CGxBuf* m_streamBufs[GxPoolTargets_Last];
|
||||
CGxBuf* m_streamBufs[2];
|
||||
// CGxVertexAttrib m_primVertexFormatAttrib[GxVertexBufferFormats_Last];
|
||||
CGxVertexAttrib m_primVertexFormatAttrib[14];
|
||||
// CGxBuf* m_primVertexFormatBuf[GxVertexBufferFormats_Last];
|
||||
CGxBuf* m_primVertexFormatBuf[14];
|
||||
uint32_t m_primVertexMask;
|
||||
uint32_t m_primVertexDirty;
|
||||
EGxVertexBufferFormat m_primVertexFormat;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#define GX_FORMAT_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "tempest/vector.h"
|
||||
|
||||
typedef enum CGxFormat__Format CGxFormat__Format;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,34 @@
|
|||
|
||||
#include "storm/array.h"
|
||||
|
||||
typedef enum BlitAlpha BlitAlpha;
|
||||
typedef enum BlitFormat BlitFormat;
|
||||
typedef enum EGxApi EGxApi;
|
||||
typedef enum EGxBlend EGxBlend;
|
||||
typedef enum EGxColorFormat EGxColorFormat;
|
||||
typedef enum EGxFontHJusts EGxFontHJusts;
|
||||
typedef enum EGxFontVJusts EGxFontVJusts;
|
||||
typedef enum EGxMasterEnables EGxMasterEnables;
|
||||
typedef enum EGxPrim EGxPrim;
|
||||
typedef enum EGxPrimMask EGxPrimMask;
|
||||
typedef enum EGxRenderState EGxRenderState;
|
||||
typedef enum EGxShPS EGxShPS;
|
||||
typedef enum EGxShTarget EGxShTarget;
|
||||
typedef enum EGxShVS EGxShVS;
|
||||
typedef enum EGxTexCommand EGxTexCommand;
|
||||
typedef enum EGxTexFilter EGxTexFilter;
|
||||
typedef enum EGxTexFormat EGxTexFormat;
|
||||
typedef enum EGxTexTarget EGxTexTarget;
|
||||
typedef enum EGxTexWrapMode EGxTexWrapMode;
|
||||
typedef enum EGxXform EGxXform;
|
||||
typedef enum EGxuDrawListCategory EGxuDrawListCategory;
|
||||
typedef enum EGxWM EGxWM;
|
||||
typedef enum COLOR_FILE_FORMAT COLOR_FILE_FORMAT;
|
||||
typedef enum PIXEL_FORMAT PIXEL_FORMAT;
|
||||
|
||||
typedef struct C4Pixel C4Pixel;
|
||||
typedef struct MipBits MipBits;
|
||||
|
||||
enum BlitAlpha {
|
||||
BlitAlpha_0 = 0,
|
||||
BlitAlpha_1 = 1,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ 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_fulllist; \
|
||||
uint32_t m_fullnessIndicator; \
|
||||
TSGrowableArray_TSList_##T m_slotlistarray; \
|
||||
uint32_t m_slotmask; \
|
||||
}; \
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ struct TSLink_##T { \
|
|||
// TSLinkedNode<T>
|
||||
#define STORM_TS_LIST(T) \
|
||||
STORM_TS_LINK(T) \
|
||||
typedef struct TSList_##T TSList_##T##; \
|
||||
typedef struct TSList_##T TSList_##T; \
|
||||
typedef struct TSLinkedNode_##T TSLinkedNode_##T; \
|
||||
struct TSList_##T { \
|
||||
ptrdiff_t m_linkoffset; \
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include <stdint.h>
|
||||
|
||||
typedef struct C2Vector C2Vector;
|
||||
typedef struct C2iVector C2iVector;
|
||||
typedef struct C3Vector C3Vector;
|
||||
typedef struct C4Vector C4Vector;
|
||||
typedef struct CImVector CImVector;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue