Add more files

This commit is contained in:
dbalatoni13 2025-04-05 14:17:27 +02:00
parent b942deb12b
commit 6a27eb7356
7 changed files with 117 additions and 32 deletions

View file

@ -40,12 +40,17 @@ set(DOLPHIN_FILES
set(GAME_FILES set(GAME_FILES
src/game/card.c src/game/card.c
src/game/ClusterExec.c
src/game/data.c
src/game/EnvelopeExec.c
src/game/fault.c src/game/fault.c
src/game/flag.c src/game/flag.c
src/game/font.c src/game/font.c
src/game/frand.c src/game/frand.c
src/game/hsfanim.c src/game/hsfanim.c
src/game/hsfdraw.c src/game/hsfdraw.c
src/game/hsfex.c
src/game/hsfload.c
src/game/hsfman.c src/game/hsfman.c
src/game/hsfmotion.c src/game/hsfmotion.c
src/game/gamework.c src/game/gamework.c
@ -53,12 +58,14 @@ set(GAME_FILES
src/game/malloc.c src/game/malloc.c
src/game/memory.c src/game/memory.c
src/game/init.c src/game/init.c
src/game/ShapeExec.c
src/game/sprman.c src/game/sprman.c
src/game/sprput.c src/game/sprput.c
src/game/pad.c src/game/pad.c
src/game/perf.c src/game/perf.c
src/game/printfunc.c src/game/printfunc.c
src/game/process.c src/game/process.c
src/game/wipe.c
) )
set(PORT_FILES set(PORT_FILES

View file

@ -1345,7 +1345,7 @@ void C_MTXMultVecSR(const Mtx mtx, const Vec* in, Vec* out) {
float x = in->x; float x = in->x;
float y = in->y; float y = in->y;
float z = in->z; float z = in->z;
out->x = mtx[0][0] * x + mtx[0][1] * y + mtx[0][2] * z; out->x = mtx[0][0] * x + mtx[0][1] * y + mtx[0][2] * z;
out->y = mtx[1][0] * x + mtx[1][1] * y + mtx[1][2] * z; out->y = mtx[1][0] * x + mtx[1][1] * y + mtx[1][2] * z;
out->z = mtx[2][0] * x + mtx[2][1] * y + mtx[2][2] * z; out->z = mtx[2][0] * x + mtx[2][1] * y + mtx[2][2] * z;

View file

@ -113,13 +113,13 @@ void main(void)
GWInit(); GWInit();
pfInit(); pfInit();
GlobalCounter = 0; GlobalCounter = 0;
// HuSprInit(); HuSprInit();
// Hu3DInit(); Hu3DInit();
// HuDataInit(); HuDataInit();
HuPerfInit(); HuPerfInit();
// HuPerfCreate("USR0", 0xFF, 0xFF, 0xFF, 0xFF); HuPerfCreate("USR0", 0xFF, 0xFF, 0xFF, 0xFF);
// HuPerfCreate("USR1", 0, 0xFF, 0xFF, 0xFF); HuPerfCreate("USR1", 0, 0xFF, 0xFF, 0xFF);
// WipeInit(RenderMode); WipeInit(RenderMode);
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
GWPlayerCfg[i].character = -1; GWPlayerCfg[i].character = -1;
@ -147,17 +147,17 @@ void main(void)
break; break;
} }
#endif #endif
/*retrace = VIGetRetraceCount(); retrace = VIGetRetraceCount();
if (HuSoftResetButtonCheck() != 0 || HuDvdErrWait != 0) { if (HuSoftResetButtonCheck() != 0 || HuDvdErrWait != 0) {
continue; continue;
}*/ }
HuPerfZero(); HuPerfZero();
HuPerfBegin(2); HuPerfBegin(2);
#ifdef TARGET_PC #ifdef TARGET_PC
aurora_begin_frame(); aurora_begin_frame();
#endif #endif
// HuSysBeforeRender(); HuSysBeforeRender();
GXSetGPMetric(GX_PERF0_CLIP_VTX, GX_PERF1_VERTICES); GXSetGPMetric(GX_PERF0_CLIP_VTX, GX_PERF1_VERTICES);
GXClearGPMetric(); GXClearGPMetric();
GXSetVCacheMetric(GX_VC_ALL); GXSetVCacheMetric(GX_VC_ALL);
@ -171,29 +171,29 @@ void main(void)
pfClsScr(); pfClsScr();
HuPrcCall(1); HuPrcCall(1);
/* MGSeqMain(); MGSeqMain();
HuPerfBegin(1); HuPerfBegin(1);
Hu3DExec(); Hu3DExec();
HuDvdErrorWatch(); HuDvdErrorWatch();
WipeExecAlways(); WipeExecAlways();
HuPerfEnd(0); HuPerfEnd(0);
pfDrawFonts(); pfDrawFonts();
HuPerfEnd(1);*/ HuPerfEnd(1);
#ifdef TARGET_PC #ifdef TARGET_PC
imgui_main(&auroraInfo); imgui_main(&auroraInfo);
aurora_end_frame(); aurora_end_frame();
#endif #endif
/*msmMusFdoutEnd(); msmMusFdoutEnd();
HuSysDoneRender(retrace); HuSysDoneRender(retrace);
GXReadGPMetric(&met0, &met1); GXReadGPMetric(&met0, &met1);
GXReadVCacheMetric(&vcheck, &vmiss, &vstall); GXReadVCacheMetric(&vcheck, &vmiss, &vstall);
GXReadPixMetric(&top_pixels_in, &top_pixels_out, &bot_pixels_in, &bot_pixels_out, &clr_pixels_in, &total_copy_clks); GXReadPixMetric(&top_pixels_in, &top_pixels_out, &bot_pixels_in, &bot_pixels_out, &clr_pixels_in, &total_copy_clks);
GXReadMemMetric(&cp_req, &tc_req, &cpu_rd_req, &cpu_wr_req, &dsp_req, &io_req, &vi_req, &pe_req, &rf_req, &fi_req); GXReadMemMetric(&cp_req, &tc_req, &cpu_rd_req, &cpu_wr_req, &dsp_req, &io_req, &vi_req, &pe_req, &rf_req, &fi_req);
HuPerfEnd(2); HuPerfEnd(2);
GlobalCounter++;*/ GlobalCounter++;
#ifdef TARGET_PC #ifdef TARGET_PC
frame_limiter(); frame_limiter();

View file

@ -176,13 +176,10 @@ void pfDrawFonts(void)
GXSetNumTevStages(1); GXSetNumTevStages(1);
GXSetNumTexGens(0); GXSetNumTexGens(0);
GXBegin(GX_QUADS, GX_VTXFMT0, 4); GXBegin(GX_QUADS, GX_VTXFMT0, 4);
#ifdef __MWERKS__
// TODO PC
GXPosition2s16(x, y); GXPosition2s16(x, y);
GXPosition2s16(x + w, y); GXPosition2s16(x + w, y);
GXPosition2s16(x + w, y + h); GXPosition2s16(x + w, y + h);
GXPosition2s16(x, y + h); GXPosition2s16(x, y + h);
#endif
GXEnd(); GXEnd();
GXClearVtxDesc(); GXClearVtxDesc();
GXSetVtxDesc(GX_VA_POS, GX_DIRECT); GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
@ -236,8 +233,6 @@ void pfDrawFonts(void)
default: default:
texcoord_x = (c % 16) / 16.0f; texcoord_x = (c % 16) / 16.0f;
texcoord_y = ((c / 16) / 16.0f) + (1 / 128.0f); texcoord_y = ((c / 16) / 16.0f) + (1 / 128.0f);
#ifdef __MWERKS__
// TODO PC
if (shadow_color < 0) { if (shadow_color < 0) {
GXBegin(GX_QUADS, GX_VTXFMT0, 4); GXBegin(GX_QUADS, GX_VTXFMT0, 4);
GXPosition3s16(x, y, 0); GXPosition3s16(x, y, 0);
@ -282,7 +277,6 @@ void pfDrawFonts(void)
GXTexCoord2f32(texcoord_x, texcoord_y + (1 / 16.0f)); GXTexCoord2f32(texcoord_x, texcoord_y + (1 / 16.0f));
GXEnd(); GXEnd();
} }
#endif
x += char_w; x += char_w;
if (x > HU_FB_WIDTH) { if (x > HU_FB_WIDTH) {
x = 0; x = 0;
@ -330,8 +324,6 @@ static void WireDraw(void)
MTXIdentity(modelview); MTXIdentity(modelview);
GXLoadPosMtxImm(modelview, GX_PNMTX0); GXLoadPosMtxImm(modelview, GX_PNMTX0);
GXBegin(GX_LINES, 0, 8); GXBegin(GX_LINES, 0, 8);
#ifdef __MWERKS__
// TODO PC
GXPosition2f32(SAFETY_W, SAFETY_H); GXPosition2f32(SAFETY_W, SAFETY_H);
GXColor3u8(255, 0, 0); GXColor3u8(255, 0, 0);
GXPosition2f32(SAFETY_W, HU_DISP_HEIGHT - SAFETY_H); GXPosition2f32(SAFETY_W, HU_DISP_HEIGHT - SAFETY_H);
@ -348,6 +340,5 @@ static void WireDraw(void)
GXColor3u8(255, 0, 0); GXColor3u8(255, 0, 0);
GXPosition2f32(SAFETY_W, HU_DISP_HEIGHT - SAFETY_H); GXPosition2f32(SAFETY_W, HU_DISP_HEIGHT - SAFETY_H);
GXColor3u8(255, 0, 0); GXColor3u8(255, 0, 0);
#endif
GXEnd(); GXEnd();
} }

View file

@ -111,9 +111,11 @@ void WipeExecAlways(void)
void WipeCreate(s16 mode, s16 type, s16 duration) void WipeCreate(s16 mode, s16 type, s16 duration)
{ {
WipeState *wipe; WipeState *wipe;
#ifdef __MWERKS__ // TODO PC
if(_CheckFlag(FLAG_ID_MAKE(1, 11)) && boardTutorialF) { if(_CheckFlag(FLAG_ID_MAKE(1, 11)) && boardTutorialF) {
return; return;
} }
#endif
wipe = &wipeData; wipe = &wipeData;
if(wipe->stat) { if(wipe->stat) {
return; return;

View file

@ -160,3 +160,8 @@ s32 DVDGetDriveStatus(void)
// puts("DVDGetDriveStatus is a stub"); // puts("DVDGetDriveStatus is a stub");
return 0; return 0;
} }
void HuDvdErrorWatch(void)
{
}

View file

@ -531,7 +531,7 @@ void GXSetGPMetric(GXPerf0 perf0, GXPerf1 perf1)
puts("GXSetGPMetric is a stub"); puts("GXSetGPMetric is a stub");
} }
void GXReadGPMetric(u32* cnt0, u32* cnt1) void GXReadGPMetric(u32 *cnt0, u32 *cnt1)
{ {
puts("GXReadGPMetric is a stub"); puts("GXReadGPMetric is a stub");
} }
@ -557,7 +557,7 @@ void GXClearVCacheMetric(void)
puts("GXClearVCacheMetric is a stub"); 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) 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"); puts("GXReadPixMetric is a stub");
} }
@ -572,7 +572,7 @@ void GXSetVCacheMetric(GXVCachePerf attr)
puts("GXSetVCacheMetric is a stub"); puts("GXSetVCacheMetric is a stub");
} }
void GXReadVCacheMetric(u32* check, u32* miss, u32* stall) void GXReadVCacheMetric(u32 *check, u32 *miss, u32 *stall)
{ {
puts("GXReadVCacheMetric is a stub"); puts("GXReadVCacheMetric is a stub");
} }
@ -600,6 +600,71 @@ void GXColor3u8(u8 r, u8 g, u8 b)
GXColor4u8(r, g, b, 255); GXColor4u8(r, g, b, 255);
} }
void GXNormal1x16(u16 index)
{
puts("GXNormal1x16 is a stub");
}
void GXColor1x16(u16 index)
{
puts("GXColor1x16 is a stub");
}
void GXTexCoord1x16(u16 index)
{
puts("GXTexCoord1x16 is a stub");
}
void GXUnknownu16(const u16 x)
{
puts("GXUnknownu16 is a stub");
}
void GXNormal3s16(s16 x, s16 y, s16 z)
{
puts("GXNormal3s16 is a stub");
}
void GXPosition2u16(const u16 x, const u16 y)
{
puts("GXPosition2u16 is a stub");
}
void GXPosition2f32(const f32 x, const f32 y)
{
puts("GXPosition2f32 is a stub");
}
void GXPosition2s16(const s16 x, const s16 y)
{
puts("GXPosition2s16 is a stub");
}
void GXColor1x8(u8 index) {
puts("GXColor1x8 is a stub");
}
void GXWaitDrawDone(void)
{
puts("GXWaitDrawDone is a stub");
}
void GXSetTevIndTile(GXTevStageID tev_stage, GXIndTexStageID ind_stage, u16 tilesize_s, u16 tilesize_t, u16 tilespacing_s, u16 tilespacing_t,
GXIndTexFormat format, GXIndTexMtxID matrix_sel, GXIndTexBiasSel bias_sel, GXIndTexAlphaSel alpha_sel)
{
puts("GXSetTevIndTile is a stub");
}
void GXSetTexCoordScaleManually(GXTexCoordID coord, u8 enable, u16 ss, u16 ts)
{
puts("GXSetTexCoordScaleManually is a stub");
}
void GXResetWriteGatherPipe(void)
{
puts("GXResetWriteGatherPipe is a stub");
}
// Hudson // Hudson
void HuDvdErrDispInit(GXRenderModeObj *rmode, void *xfb1, void *xfb2) { } void HuDvdErrDispInit(GXRenderModeObj *rmode, void *xfb1, void *xfb2) { }
@ -611,3 +676,18 @@ void msmSysRegularProc(void)
{ {
puts("msmSysRegularProc is a stub"); puts("msmSysRegularProc is a stub");
} }
void msmMusFdoutEnd(void)
{
puts("msmMusFdoutEnd is a stub");
}
s32 HuSoftResetButtonCheck(void)
{
puts("HuSoftResetButtonCheck is a stub");
}
void MGSeqMain(void)
{
puts("MGSeqMain is a stub");
}