BE swap shop params, fix shop cursor projection, handle divide by zero in d_vibration, stub startLevelSound audio func

This commit is contained in:
CraftyBoss
2026-03-16 22:01:46 -07:00
parent a10f7b7806
commit e17c32f41e
4 changed files with 12 additions and 1 deletions
+2
View File
@@ -136,6 +136,8 @@ Z2SoundHandlePool* Z2SoundObjBase::startSound(JAISoundID soundID, u32 mapinfo, s
}
Z2SoundHandlePool* Z2SoundObjBase::startLevelSound(JAISoundID soundID, u32 mapinfo, s8 reverb) {
DUSK_AUDIO_SKIP(NULL);
if (!alive_) {
return NULL;
}
+1 -1
View File
@@ -2008,7 +2008,7 @@ int dMsgFlow_c::event015(mesg_flow_node_event* i_flowNode_p, fopAc_ac_c* i_speak
int dMsgFlow_c::event016(mesg_flow_node_event* i_flowNode_p, fopAc_ac_c* i_speaker_p) {
dShopSystem_c* shop = (dShopSystem_c*)i_speaker_p;
shop->setEventParam(*(u32*)i_flowNode_p->params);
shop->setEventParam(*(BE(u32)*)i_flowNode_p->params);
u8 prm[4];
getParam(prm, i_flowNode_p->params);
+4
View File
@@ -855,7 +855,11 @@ int dShopSystem_c::seq_wait(fopAc_ac_c* param_0, dMsgFlow_c* param_1) {
}
inline void pos3Dto2D(Vec* a, Vec* b) {
#if TARGET_PC
mDoLib_project(a, b, {0, 0, FB_WIDTH, FB_HEIGHT});
#else
mDoLib_project(a, b);
#endif
}
int dShopSystem_c::seq_start(fopAc_ac_c* actor, dMsgFlow_c* i_flow) {
+5
View File
@@ -25,7 +25,12 @@ u16* makedata(u16* data, u32 pattern, s32 length) {
}
s32 rollshift(u32 pattern, s32 length, s32 index) {
#if AVOID_UB
if (length == 0)
index = 0;
#else
index %= length;
#endif
return (pattern >> index) | (pattern << (length - index));
}