Add more stubs

This commit is contained in:
dbalatoni13 2025-04-02 18:45:58 +02:00
parent 670a2c4c62
commit 69ff202bae
6 changed files with 220 additions and 137 deletions

View file

@ -1,20 +1,20 @@
#include "game/gamework_data.h"
#include "game/dvd.h"
#include "game/printfunc.h"
#include "game/object.h"
#include "game/wipe.h"
#include "game/init.h"
#include "game/process.h"
#include "game/pad.h"
#include "game/data.h"
#include "game/sprite.h"
#include "game/dvd.h"
#include "game/gamework.h"
#include "game/gamework_data.h"
#include "game/hsfformat.h"
#include "game/hsfman.h"
#include "game/init.h"
#include "game/minigame_seq.h"
#include "game/msm.h"
#include "game/object.h"
#include "game/pad.h"
#include "game/perf.h"
#include "game/gamework.h"
#include "game/printfunc.h"
#include "game/process.h"
#include "game/sprite.h"
#include "game/sreset.h"
#include "game/wipe.h"
#ifdef TARGET_PC
#include "port/imgui.h"
@ -53,29 +53,27 @@ void aurora_log_callback(AuroraLogLevel level, const char *message, unsigned int
{
const char *levelStr = "??";
FILE *out = stdout;
switch (level)
{
case LOG_DEBUG:
levelStr = "DEBUG";
break;
case LOG_INFO:
levelStr = "INFO";
break;
case LOG_WARNING:
levelStr = "WARNING";
break;
case LOG_ERROR:
levelStr = "ERROR";
out = stderr;
break;
case LOG_FATAL:
levelStr = "FATAL";
out = stderr;
break;
switch (level) {
case LOG_DEBUG:
levelStr = "DEBUG";
break;
case LOG_INFO:
levelStr = "INFO";
break;
case LOG_WARNING:
levelStr = "WARNING";
break;
case LOG_ERROR:
levelStr = "ERROR";
out = stderr;
break;
case LOG_FATAL:
levelStr = "FATAL";
out = stderr;
break;
}
fprintf(out, "[%s: %s]\n", levelStr, message);
if (level == LOG_FATAL)
{
if (level == LOG_FATAL) {
fflush(out);
abort();
}
@ -83,72 +81,69 @@ void aurora_log_callback(AuroraLogLevel level, const char *message, unsigned int
#endif
#ifdef TARGET_PC
int main(int argc, char* argv[])
int main(int argc, char *argv[])
#else
void main(void)
#endif
{
#ifdef TARGET_PC
const AuroraInfo auroraInfo = aurora_initialize(argc, argv,
&(AuroraConfig){
.appName = "Mario Party 4",
.logCallback = &aurora_log_callback,
});
&(AuroraConfig) {
.appName = "Mario Party 4",
.logCallback = &aurora_log_callback,
});
#endif
u32 met0;
u32 met1;
s16 i;
s32 retrace;
#if VERSION_PAL
#if VERSION_PAL
s16 temp = 0;
#endif
#endif
HuDvdErrWait = 0;
SystemInitF = 0;
#if VERSION_NTSC
#if VERSION_NTSC
HuSysInit(&GXNtsc480IntDf);
#else
#else
HuSysInit(&GXPal528IntDf);
#endif
/*HuPrcInit();
HuPadInit();
GWInit();
pfInit();
GlobalCounter = 0;
HuSprInit();
Hu3DInit();
HuDataInit();
HuPerfInit();
HuPerfCreate("USR0", 0xFF, 0xFF, 0xFF, 0xFF);
HuPerfCreate("USR1", 0, 0xFF, 0xFF, 0xFF);
WipeInit(RenderMode);
#endif
//HuPrcInit();
// HuPadInit();
// GWInit();
// pfInit();
// GlobalCounter = 0;
// HuSprInit();
// Hu3DInit();
// HuDataInit();
// HuPerfInit();
// HuPerfCreate("USR0", 0xFF, 0xFF, 0xFF, 0xFF);
// HuPerfCreate("USR1", 0, 0xFF, 0xFF, 0xFF);
// WipeInit(RenderMode);
for (i = 0; i < 4; i++) {
GWPlayerCfg[i].character = -1;
// GWPlayerCfg[i].character = -1;
}
omMasterInit(0, _ovltbl, OVL_COUNT, OVL_BOOT);
//omMasterInit(0, _ovltbl, OVL_COUNT, OVL_BOOT);
VIWaitForRetrace();
if (VIGetNextField() == 0) {
OSReport("VI_FIELD_BELOW\n");
VIWaitForRetrace();
}*/
}
while (1) {
#ifdef TARGET_PC
const AuroraEvent *event = aurora_update();
bool exiting = false;
while (event != NULL && event->type != AURORA_NONE)
{
if (event->type == AURORA_EXIT)
{
while (event != NULL && event->type != AURORA_NONE) {
if (event->type == AURORA_EXIT) {
exiting = true;
break;
}
++event;
}
if (exiting)
{
if (exiting) {
break;
}
#endif
@ -156,35 +151,35 @@ void main(void)
if (HuSoftResetButtonCheck() != 0 || HuDvdErrWait != 0) {
continue;
}*/
//HuPerfZero();
// HuPerfZero();
//HuPerfBegin(2);
// HuPerfBegin(2);
#ifdef TARGET_PC
aurora_begin_frame();
#endif
/* HuSysBeforeRender();
GXSetGPMetric(GX_PERF0_CLIP_VTX, GX_PERF1_VERTICES);
GXClearGPMetric();
GXSetVCacheMetric(GX_VC_ALL);
GXClearVCacheMetric();
GXClearPixMetric();
GXClearMemMetric();
/* HuSysBeforeRender();
GXSetGPMetric(GX_PERF0_CLIP_VTX, GX_PERF1_VERTICES);
GXClearGPMetric();
GXSetVCacheMetric(GX_VC_ALL);
GXClearVCacheMetric();
GXClearPixMetric();
GXClearMemMetric();
HuPerfBegin(0);
Hu3DPreProc();
HuPadRead();
pfClsScr();
HuPerfBegin(0);
Hu3DPreProc();
HuPadRead();
pfClsScr();
HuPrcCall(1);
MGSeqMain();
HuPerfBegin(1);
Hu3DExec();
HuDvdErrorWatch();
WipeExecAlways();
HuPerfEnd(0);
HuPrcCall(1);
MGSeqMain();
HuPerfBegin(1);
Hu3DExec();
HuDvdErrorWatch();
WipeExecAlways();
HuPerfEnd(0);
pfDrawFonts();
HuPerfEnd(1);*/
pfDrawFonts();
HuPerfEnd(1);*/
#ifdef TARGET_PC
imgui_main(&auroraInfo);
@ -210,16 +205,16 @@ void main(void)
#endif
}
//void HuSysVWaitSet(s16 vcount)
// void HuSysVWaitSet(s16 vcount)
//{
// minimumVcount = vcount;
// minimumVcountf = vcount;
//}
// minimumVcount = vcount;
// minimumVcountf = vcount;
// }
//
//s16 HuSysVWaitGet(s16 param)
// s16 HuSysVWaitGet(s16 param)
//{
// return (s16) minimumVcount;
//}
// return (s16) minimumVcount;
// }
s32 rnd_seed = 0x0000D9ED;