From cb9b14841b57b97fc3f79a43a70631425b8fbc6d Mon Sep 17 00:00:00 2001 From: dbalatoni13 <40299962+dbalatoni13@users.noreply.github.com> Date: Fri, 4 Apr 2025 17:50:48 +0200 Subject: [PATCH] Remove FaceDraw from the header and more stubs --- include/dolphin/mtx.h | 14 +++++++ include/game/hsfdraw.h | 1 - src/port/stubs.c | 95 ++++++++++++++++++++++++++++++++++++++---- 3 files changed, 100 insertions(+), 10 deletions(-) diff --git a/include/dolphin/mtx.h b/include/dolphin/mtx.h index 5382dbc5..2dd4c4d3 100644 --- a/include/dolphin/mtx.h +++ b/include/dolphin/mtx.h @@ -306,6 +306,20 @@ void PSMTXMultS16VecArray(const Mtx m, const S16Vec* srcBase, Vec* dstBase, u32 void PSMTXROMultS16VecArray(const ROMtx m, const S16Vec* srcBase, Vec* dstBase, u32 count); #endif +#ifdef MTX_USE_PS +#define MTXReorder PSMTXReorder +#define MTXROMultVecArray PSMTXROMultVecArray +#define MTXROSkin2VecArray PSMTXROSkin2VecArray +#define MTXROMultS16VecArray PSMTXROMultS16VecArray +#define MTXMultS16VecArray PSMTXMultS16VecArray +#else // MTX_USE_C +#define MTXReorder C_MTXReorder +#define MTXROMultVecArray C_MTXROMultVecArray +#define MTXROSkin2VecArray C_MTXROSkin2VecArray +#define MTXROMultS16VecArray C_MTXROMultS16VecArray +#define MTXMultS16VecArray C_MTXMultS16VecArray +#endif + void MTXInitStack(MtxStack* sPtr, u32 numMtx); MtxPtr MTXPush(MtxStack* sPtr, const Mtx m); MtxPtr MTXPushFwd(MtxStack* sPtr, const Mtx m); diff --git a/include/game/hsfdraw.h b/include/game/hsfdraw.h index d3b46df6..a99d0bb1 100755 --- a/include/game/hsfdraw.h +++ b/include/game/hsfdraw.h @@ -56,7 +56,6 @@ typedef struct hsf_draw_object { void Hu3DDrawPreInit(void); void Hu3DDraw(ModelData *arg0, Mtx arg1, Vec *arg2); s32 ObjCullCheck(HsfData *arg0, HsfObject *arg1, Mtx arg2); -void FaceDraw(HsfDrawObject *arg0, HsfFace *arg1); void Hu3DDrawPost(void); void MakeDisplayList(s16 arg0, u32 arg1); HsfConstData *ObjConstantMake(HsfObject *arg0, u32 arg1); diff --git a/src/port/stubs.c b/src/port/stubs.c index eb8dc7a0..a76721a5 100644 --- a/src/port/stubs.c +++ b/src/port/stubs.c @@ -1,3 +1,4 @@ +#include "dolphin/gx/GXVert.h" #include #include #include @@ -205,6 +206,11 @@ void DCStoreRange(void *addr, u32 nBytes) puts("DCStoreRange is a stub"); } +void DCStoreRangeNoSync(void *addr, u32 nBytes) +{ + puts("DCStoreRangeNoSync is a stub"); +} + void DEMOUpdateStats(unsigned char inc) { puts("DEMOUpdateStats is a stub"); @@ -406,11 +412,6 @@ void PPCHalt() puts("PPCHalt is a stub"); } -void PSMTXIdentity(Mtx m) -{ - puts("PSMTXIdentity is a stub"); -} - void SoundChoID(int a, int b) { puts("SoundChoID is a stub"); @@ -525,12 +526,88 @@ VIRetraceCallback VISetPostRetraceCallback(VIRetraceCallback callback) return callback; } -void msmSysRegularProc(void) +void GXSetGPMetric(GXPerf0 perf0, GXPerf1 perf1) { - puts("msmSysRegularProc is a stub"); + puts("GXSetGPMetric is a stub"); +} + +void GXReadGPMetric(u32* cnt0, u32* cnt1) +{ + puts("GXReadGPMetric is a stub"); +} + +void GXClearGPMetric(void) +{ + puts("GXClearGPMetric is a stub"); +} + +void GXReadMemMetric( + u32 *cp_req, u32 *tc_req, u32 *cpu_rd_req, u32 *cpu_wr_req, u32 *dsp_req, u32 *io_req, u32 *vi_req, u32 *pe_req, u32 *rf_req, u32 *fi_req) +{ + puts("GXReadMemMetric is a stub"); +} + +void GXClearMemMetric(void) +{ + puts("GXClearMemMetric is a stub"); +} + +void GXClearVCacheMetric(void) +{ + puts("GXClearVCacheMetric is a stub"); +} + +void GXReadPixMetric(u32* top_pixels_in, u32* top_pixels_out, u32* bot_pixels_in, u32* bot_pixels_out, u32* clr_pixels_in, u32* copy_clks) +{ + puts("GXReadPixMetric is a stub"); +} + +void GXClearPixMetric(void) +{ + puts("GXClearPixMetric is a stub"); +} + +void GXSetVCacheMetric(GXVCachePerf attr) +{ + puts("GXSetVCacheMetric is a stub"); +} + +void GXReadVCacheMetric(u32* check, u32* miss, u32* stall) +{ + puts("GXReadVCacheMetric is a stub"); +} + +void GXSetDrawSync(u16 token) +{ + puts("GXSetDrawSync is a stub"); +} + +GXDrawSyncCallback GXSetDrawSyncCallback(GXDrawSyncCallback cb) +{ + puts("GXSetDrawSyncCallback is a stub"); + // TODO + return cb; +} + +void PPCSync(void) +{ + puts("PPCSync is a stub"); +} + +void GXColor3u8(u8 r, u8 g, u8 b) +{ + // TODO + GXColor4u8(r, g, b, 255); } // Hudson void HuDvdErrDispInit(GXRenderModeObj *rmode, void *xfb1, void *xfb2) { } -void HuAudInit() { } -void HuARInit() { } + +void HuAudInit(void) { } + +void HuARInit(void) { } + +void msmSysRegularProc(void) +{ + puts("msmSysRegularProc is a stub"); +}