name audio.c, board/audio.c, board/basic_space, match files (#571)

* name audio.c and board/audio.c

* fix audio, complete board/basic_space, battle

* revert changes that broke build

* completely finish New and NewMore.cp, for some reason NewMore fails checksum

* finally match NewMore.cp
This commit is contained in:
CreateSource 2025-03-15 08:36:13 -04:00 committed by GitHub
parent 4ee46b3396
commit eb11f9c23f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 42 additions and 22 deletions

View file

@ -669,16 +669,12 @@ config.libs = [
Object(MatchingFor("GMPE01_00", "GMPE01_01"), "Runtime.PPCEABI.H/__va_arg.c"),
Object(MatchingFor("GMPE01_00", "GMPE01_01"), "Runtime.PPCEABI.H/global_destructor_chain.c"),
Object(MatchingFor("GMPE01_00", "GMPE01_01"), "Runtime.PPCEABI.H/__mem.c"),
Object(NonMatching, "Runtime.PPCEABI.H/New.cp"),
Object(NonMatching, "Runtime.PPCEABI.H/NewMore.cp"),
Object(MatchingFor("GMPE01_00", "GMPE01_01"), "Runtime.PPCEABI.H/New.cp", extra_cflags=["-Cpp_exceptions on"]),
Object(MatchingFor("GMPE01_00", "GMPE01_01"), "Runtime.PPCEABI.H/NewMore.cp", extra_cflags=["-Cpp_exceptions on", "-RTTI on"]),
Object(NonMatching, "Runtime.PPCEABI.H/NMWException.cpp"),
Object(MatchingFor("GMPE01_00", "GMPE01_01"), "Runtime.PPCEABI.H/runtime.c"),
Object(MatchingFor("GMPE01_00", "GMPE01_01"), "Runtime.PPCEABI.H/__init_cpp_exceptions.cpp"),
Object(
NonMatching,
"Runtime.PPCEABI.H/Gecko_ExceptionPPC.cpp",
extra_cflags=["-Cpp_exceptions on"]
),
Object(NonMatching, "Runtime.PPCEABI.H/Gecko_ExceptionPPC.cpp", extra_cflags=["-Cpp_exceptions on"]),
Object(MatchingFor("GMPE01_00", "GMPE01_01"), "Runtime.PPCEABI.H/GCN_mem_alloc.c"),
],
},

View file

@ -0,0 +1 @@
void operator delete(void* arg0);

View file

@ -53,7 +53,7 @@ void HuAudSStreamAllFadeOut(s32 speed);
void HuAudSStreamAllStop(void);
s32 HuAudSStreamStatGet(s32 seNo);
void HuAudDllSndGrpSet(u16 ovl);
void HuAudSndGrpSetSet(s16 data_size);
void HuAudSndGrpSetSet(s16 dataSize);
void HuAudSndGrpSet(s16 grpId);
void HuAudSndCommonGrpSet(s16 grpId, s32 groupCheck);
void HuAudAUXSet(s32 auxA, s32 auxB);

View file

@ -0,0 +1,8 @@
#include "PowerPC_EABI_Support/Msl/MSL_C/MSL_Common/alloc.h"
#include "PowerPC_EABI_Support/Runtime/New.h"
void operator delete(void* arg0) throw() {
if (arg0 != 0) {
free(arg0);
}
}

View file

@ -0,0 +1,15 @@
#include "PowerPC_EABI_Support/Runtime/New.h"
namespace std {
class exception {
public:
virtual ~exception();
virtual const char *what() const;
};
}
const char *std::exception::what() const {
return "exception";
};
std::exception::~exception() {};

View file

@ -475,13 +475,13 @@ void HuAudDllSndGrpSet(u16 ovl) {
}
}
void HuAudSndGrpSetSet(s16 data_size) {
void HuAudSndGrpSetSet(s16 dataSize) {
void *buf;
OSTick osTick;
s32 numPlay;
s32 err;
if (sndGroupBak != data_size) {
if (sndGroupBak != dataSize) {
msmMusStopAll(1, 0);
msmSeStopAll(1, 0);
osTick = OSGetTick();
@ -492,11 +492,11 @@ void HuAudSndGrpSetSet(s16 data_size) {
numPlay = msmSeGetNumPlay(1);
OSReport("Timed Out! Mus %d:SE %d\n", msmMusGetNumPlay(1), numPlay);
}
OSReport("GroupSet %d\n", data_size);
sndGroupBak = data_size;
OSReport("GroupSet %d\n", dataSize);
sndGroupBak = dataSize;
err = msmSysDelGroupAll();
buf = HuMemDirectMalloc(HEAP_DATA, msmSysGetSampSize(1));
err = msmSysLoadGroupSet(data_size, buf);
err = msmSysLoadGroupSet(dataSize, buf);\
OSReport("***********GroupSet Error %d\n", err);
HuMemDirectFree(buf);
}

View file

@ -374,7 +374,7 @@ static void CoinChgSeparate(omObjData *object, coinChg *coin_chg) {
}
static void CoinChgShow(omObjData* object, coinChg* coin_chg) {
Vec sp8;
Vec pos;
f32 angle;
f32 y_pos;
@ -385,14 +385,14 @@ static void CoinChgShow(omObjData* object, coinChg* coin_chg) {
} else {
y_pos = (50.0f * angle) + object->trans.y;
}
BoardModelPosGet(coin_chg->coin_model, &sp8);
BoardModelPosSet(coin_chg->coin_model, sp8.x, y_pos, sp8.z);
BoardModelPosGet(coin_chg->sign_model, &sp8);
BoardModelPosSet(coin_chg->sign_model, sp8.x, y_pos, sp8.z);
BoardModelPosGet(coin_chg->ones_model, &sp8);
BoardModelPosSet(coin_chg->ones_model, sp8.x, y_pos, sp8.z);
BoardModelPosGet(coin_chg->tens_model, &sp8);
BoardModelPosSet(coin_chg->tens_model, sp8.x, y_pos, sp8.z);
BoardModelPosGet(coin_chg->coin_model, &pos);
BoardModelPosSet(coin_chg->coin_model, pos.x, y_pos, pos.z);
BoardModelPosGet(coin_chg->sign_model, &pos);
BoardModelPosSet(coin_chg->sign_model, pos.x, y_pos, pos.z);
BoardModelPosGet(coin_chg->ones_model, &pos);
BoardModelPosSet(coin_chg->ones_model, pos.x, y_pos, pos.z);
BoardModelPosGet(coin_chg->tens_model, &pos);
BoardModelPosSet(coin_chg->tens_model, pos.x, y_pos, pos.z);
if (coin_chg->angle < 90) {
coin_chg->angle += 6;
return;