mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-02 01:30:00 -04:00
BE swap shop params, fix shop cursor projection, handle divide by zero in d_vibration, stub startLevelSound audio func
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user