diff --git a/src/Z2AudioLib/Z2SoundObject.cpp b/src/Z2AudioLib/Z2SoundObject.cpp index 0978842251..93d40c95cf 100644 --- a/src/Z2AudioLib/Z2SoundObject.cpp +++ b/src/Z2AudioLib/Z2SoundObject.cpp @@ -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; } diff --git a/src/d/d_msg_flow.cpp b/src/d/d_msg_flow.cpp index 827c92bf6e..d487b8f7bd 100644 --- a/src/d/d_msg_flow.cpp +++ b/src/d/d_msg_flow.cpp @@ -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); diff --git a/src/d/d_shop_system.cpp b/src/d/d_shop_system.cpp index 779fe75d4d..364c3be7ea 100644 --- a/src/d/d_shop_system.cpp +++ b/src/d/d_shop_system.cpp @@ -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) { diff --git a/src/d/d_vibration.cpp b/src/d/d_vibration.cpp index d3bd59c5cf..70a1a04779 100644 --- a/src/d/d_vibration.cpp +++ b/src/d/d_vibration.cpp @@ -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)); }