mirror of
https://github.com/thunderbrewhq/binana.git
synced 2025-12-12 09:52:28 +00:00
feat(profile): added listings of virtual functions for CGxDevice, CGxDeviceD3d
This commit is contained in:
parent
a87e45138d
commit
26db0b63b8
15 changed files with 699 additions and 266 deletions
|
|
@ -23,11 +23,13 @@
|
|||
#include "gx/matrix_stack.h"
|
||||
#include "gx/buffer.h"
|
||||
#include "gx/texture.h"
|
||||
#include "gx/query.h"
|
||||
|
||||
DECLARE_STRUCT(CGxAppRenderState);
|
||||
DECLARE_STRUCT(CGxPushedRenderState);
|
||||
DECLARE_STRUCT(ShaderConstants);
|
||||
DECLARE_STRUCT(CGxDevice);
|
||||
DECLARE_STRUCT(CGxDevice__TextureTarget);
|
||||
DECLARE_STRUCT(CGxDevice__vtable);
|
||||
|
||||
typedef void (*DEVICERESTOREDCALLBACK)();
|
||||
|
|
@ -59,6 +61,12 @@ struct ShaderConstants {
|
|||
uint32_t unk2;
|
||||
};
|
||||
|
||||
struct CGxDevice__TextureTarget {
|
||||
CGxTex* m_texture;
|
||||
uint32_t m_plane;
|
||||
void* m_apiSpecific;
|
||||
};
|
||||
|
||||
// 84 functions
|
||||
struct CGxDevice__vtable {
|
||||
// void ITexMarkAsUpdated(CGxTex* texId);
|
||||
|
|
@ -84,7 +92,7 @@ struct CGxDevice__vtable {
|
|||
void* v_fn_7_NotifyOnStereoChanged;
|
||||
// void `scalar deleting destructor'(uint32_t __flags)
|
||||
void* v_fn_8_scalar_deleting_destructor;
|
||||
// int32_t DeviceCreate(const CGxFormat& format);
|
||||
// int32_t DeviceCreate(uintptr_t hwnd, const CGxFormat& format);
|
||||
void* v_fn_9_DeviceCreate;
|
||||
// int32_t DeviceCreate(long (*windowProc)(void*, uint32_t, uint32_t, int32_t), CGxFormat const& format);
|
||||
void* v_fn_10_DeviceCreate;
|
||||
|
|
@ -96,7 +104,7 @@ struct CGxDevice__vtable {
|
|||
void* v_fn_13_DeviceSetFormat;
|
||||
// void DeviceSetBaseMipLevel(uint32_t mipLevel);
|
||||
void* v_fn_14_DeviceSetBaseMipLevel;
|
||||
// void DeviceSetGamma(CGxGammaRamp const& ramp);
|
||||
// void DeviceSetGamma(const CGxGammaRamp& ramp);
|
||||
void* v_fn_15_DeviceSetGamma;
|
||||
// void DeviceSetGamma(float gamma);
|
||||
void* v_fn_16_DeviceSetGamma;
|
||||
|
|
@ -167,7 +175,7 @@ struct CGxDevice__vtable {
|
|||
void* v_fn_40_XformSetProjection;
|
||||
// void XformSetView(const C44Matrix& matrix);
|
||||
void* v_fn_41_XformSetView;
|
||||
// void Draw(CGxBatch*, int32_t);
|
||||
// void Draw(CGxBatch* batch, int32_t indexed);
|
||||
void* v_fn_42_Draw;
|
||||
// void PrimBegin(EGxPrim primType);
|
||||
void* v_fn_43_PrimBegin;
|
||||
|
|
@ -201,7 +209,7 @@ struct CGxDevice__vtable {
|
|||
void* v_fn_57_TexCreate;
|
||||
// void TexDestroy(CGxTex* texId);
|
||||
void* v_fn_58_TexDestroy;
|
||||
// int32_t TexCopy(CGxTex* a1, CGxTex* a2, const C2iVector& a3, const C2iVector& a4, const C2iVector& a5, uint32_t a6);
|
||||
// int32_t TexCopy(CGxTex* a1, CGxTex* a2, const C2iVector& a3, const C2iVector& a4, uint32_t a5, uint32_t a6);
|
||||
void* v_fn_59_TexCopy;
|
||||
// bool TexStretch(CGxTex* a1, CGxTex* a2, const CiRect* a3, const CiRect* a4, uint32_t a5, uint32_t a6);
|
||||
void* v_fn_60_TexStretch;
|
||||
|
|
@ -209,7 +217,7 @@ struct CGxDevice__vtable {
|
|||
void* v_fn_61_TexSetCacheSize;
|
||||
// void QueryCreate(CGxQuery*& query, EGxQueryType queryType);
|
||||
void* v_fn_62_QueryCreate;
|
||||
// bool QueryDestroy(CGxQuery* query);
|
||||
// bool QueryDestroy(CGxQuery*& query);
|
||||
void* v_fn_63_QueryDestroy;
|
||||
// bool QueryBegin(CGxQuery* query);
|
||||
void* v_fn_64_QueryBegin;
|
||||
|
|
@ -219,10 +227,10 @@ struct CGxDevice__vtable {
|
|||
void* v_fn_66_QueryGetParam;
|
||||
// bool QueryGetData(CGxQuery* query, uint32_t* data);
|
||||
void* v_fn_67_QueryGetData;
|
||||
// void ShaderCreate(CGxShader*[] shaders, EGxShTarget target, const char* a3, const char* a4, int32_t permutations);
|
||||
// void ShaderCreate(CGxShader*[] shaders[], EGxShTarget target, const char* a3, const char* a4, int32_t permutations);
|
||||
void* v_fn_68_ShaderCreate;
|
||||
// void ShaderRelease(CGxShader*& shader);
|
||||
void* v_fn_69_ShaderRelease;
|
||||
// void ShaderDestroy(CGxShader*& shader);
|
||||
void* v_fn_69_ShaderDestroy;
|
||||
// void ShaderConstantsSet(EGxShTarget target, uint32_t index, const float* constraints, uint32_t count);
|
||||
void* v_fn_70_ShaderConstantsSet;
|
||||
// void IShaderReload(CGxShader* shader, const char* a2, const char* a3);
|
||||
|
|
@ -237,7 +245,7 @@ struct CGxDevice__vtable {
|
|||
void* v_fn_75_CursorUnlock;
|
||||
// void StereoSetConvergence(float c);
|
||||
void* v_fn_76_StereoSetConvergence;
|
||||
// double StereoGetConvergence();
|
||||
// float StereoGetConvergence();
|
||||
void* v_fn_77_StereoGetConvergence;
|
||||
// void StereoSetSeparation(float s);
|
||||
void* v_fn_78_StereoSetSeparation;
|
||||
|
|
@ -261,7 +269,8 @@ struct CGxDevice {
|
|||
TSGrowableArray_uint32_t m_stackOffsets; // 0x18 (size: 0x14)
|
||||
TSGrowableArray_EGxRenderState m_dirtyStates; // 0x2C (size: 0x14)
|
||||
EGxPrim m_primType;
|
||||
uint32_t m_unk38[2]; // m_indexLocked-m_vertexLocked?
|
||||
int32_t m_indexLocked;
|
||||
int32_t m_vertexLocked;
|
||||
int32_t m_inBeginEnd;
|
||||
C3Vector m_primVertex;
|
||||
C2Vector m_primTexCoord[8];
|
||||
|
|
@ -329,7 +338,7 @@ struct CGxDevice {
|
|||
uint32_t unk28C8;
|
||||
uint32_t unk28CC;
|
||||
uint32_t unk28D0;
|
||||
uint32_t unk28D4;
|
||||
uint8_t unk28D4;
|
||||
uint32_t unk28D8;
|
||||
uint32_t unk28DC;
|
||||
uint32_t unk28E0;
|
||||
|
|
@ -337,13 +346,15 @@ struct CGxDevice {
|
|||
uint32_t unk28E8;
|
||||
TSFixedArray_CGxAppRenderState m_appRenderStates;
|
||||
TSFixedArray_CGxStateBom m_hwRenderStates;
|
||||
uint32_t unk2904[12]; // 0x2904 (size 0x30)
|
||||
uint32_t unk2904[3]; // 0x2904 (size 0xC)
|
||||
CGxDevice__TextureTarget m_textureTarget[2];
|
||||
TSExplicitList_CGxQuery m_queryList; // 0x2928
|
||||
int32_t m_scrShotClick; // 0x2934
|
||||
uint32_t m_scrShotWidth; // 0x2938
|
||||
uint32_t m_scrShotHeight; // 0x293C
|
||||
TSGrowableArray_CImVector m_scrShotPixels; // 0x2940
|
||||
int32_t m_cursorVisible;
|
||||
int32_t m_hardwareCursor; // 0x2954 (size 0x4)
|
||||
int32_t m_hwCursor; // 0x2954 (size 0x4)
|
||||
uint32_t m_cursorHotspotX;
|
||||
uint32_t m_cursorHotspotY;
|
||||
uint32_t m_cursor[1024]; // 0x2960 (size 0x4)
|
||||
|
|
|
|||
16
profile/3.3.5a-windows-386/include/gx/query.h
Normal file
16
profile/3.3.5a-windows-386/include/gx/query.h
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#ifndef GX_QUERY_H
|
||||
#define GX_QUERY_H
|
||||
|
||||
DECLARE_STRUCT(CGxQuery);
|
||||
|
||||
#include "storm/list.h"
|
||||
#include "gx/types.h"
|
||||
|
||||
STORM_TS_LIST(CGxQuery);
|
||||
struct CGxQuery {
|
||||
void* m_apiSpecific;
|
||||
EGxQueryType m_type;
|
||||
TSLink_CGxQuery m_link;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -9,16 +9,19 @@ DECLARE_ENUM(BlitAlpha);
|
|||
DECLARE_ENUM(BlitFormat);
|
||||
DECLARE_ENUM(EGxApi);
|
||||
DECLARE_ENUM(EGxBlend);
|
||||
DECLARE_ENUM(EGxBuffer);
|
||||
DECLARE_ENUM(EGxColorFormat);
|
||||
DECLARE_ENUM(EGxFontHJusts);
|
||||
DECLARE_ENUM(EGxFontVJusts);
|
||||
DECLARE_ENUM(EGxMasterEnables);
|
||||
DECLARE_ENUM(EGxOverride);
|
||||
DECLARE_ENUM(EGxPrim);
|
||||
DECLARE_ENUM(EGxPrimMask);
|
||||
DECLARE_ENUM(EGxRenderState);
|
||||
DECLARE_ENUM(EGxShPS);
|
||||
DECLARE_ENUM(EGxShTarget);
|
||||
DECLARE_ENUM(EGxShVS);
|
||||
DECLARE_ENUM(EGxQueryType);
|
||||
DECLARE_ENUM(EGxTexCommand);
|
||||
DECLARE_ENUM(EGxTexFilter);
|
||||
DECLARE_ENUM(EGxTexFormat);
|
||||
|
|
@ -86,6 +89,12 @@ enum EGxBlend {
|
|||
GxBlends_Last = 12
|
||||
};
|
||||
|
||||
enum EGxBuffer {
|
||||
GxBuffers_Color = 0,
|
||||
GxBuffers_Depth = 1,
|
||||
GxBuffers_Last = 2
|
||||
};
|
||||
|
||||
enum EGxColorFormat {
|
||||
GxCF_argb = 0,
|
||||
GxCF_rgba = 1,
|
||||
|
|
@ -119,6 +128,19 @@ enum EGxMasterEnables {
|
|||
GxMasterEnables_Last = 9
|
||||
};
|
||||
|
||||
enum EGxOverride {
|
||||
GxOverride_PixelShader = 0,
|
||||
GxOverride_Unk1 = 1,
|
||||
GxOverride_Unk2 = 2,
|
||||
GxOverride_Unk3 = 3,
|
||||
GxOverride_Unk4 = 4,
|
||||
GxOverride_Unk5 = 5,
|
||||
GxOverride_Unk6 = 6,
|
||||
GxOverride_Unk7 = 7,
|
||||
GxOverride_Unk8 = 8,
|
||||
GxOverrides_Last = 9
|
||||
};
|
||||
|
||||
enum EGxPrim {
|
||||
GxPrim_Points = 0,
|
||||
GxPrim_Lines = 1,
|
||||
|
|
@ -322,6 +344,7 @@ enum EGxTexWrapMode {
|
|||
|
||||
enum EGxQueryType {
|
||||
GxQueryType_Occlusion = 0,
|
||||
// TODO
|
||||
};
|
||||
|
||||
enum EGxXform {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue