mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-09 12:37:18 -04:00
Merge remote-tracking branch 'origin/main' into 26-02-27-pjb-dev-2
This commit is contained in:
@@ -454,7 +454,7 @@ f32 Z2SpotMic::calcMicVolume(f32 param_0, int camID, f32 param_2) {
|
||||
JUT_ASSERT(687, camID >= 0);
|
||||
JUT_ASSERT(688, camID < 1);
|
||||
|
||||
if (mMicOn == NULL) {
|
||||
if (mMicOn == false) {
|
||||
return param_2;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "Z2AudioLib/Z2FxLineMgr.h"
|
||||
#include "m_Do/m_Do_ext.h"
|
||||
#include <cstring>
|
||||
|
||||
Z2AudioArcLoader::Z2AudioArcLoader(JAUSection* section) : JAUAudioArcLoader(section) {}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "Z2AudioLib/Z2SoundHandles.h"
|
||||
|
||||
#if PLATFORM_WII || PLATFORM_SHIELD
|
||||
#include "Z2AudioLib/Z2AudioCS.h"
|
||||
#include "Z2AudioCS/Z2AudioCS.h"
|
||||
#endif
|
||||
|
||||
Z2AudioMgr* Z2AudioMgr::mAudioMgrPtr;
|
||||
|
||||
@@ -718,11 +718,11 @@ void Z2SoundObjBeeGroup::playBeeGroupSound(JAISoundID soundID, u8 param_1) {
|
||||
Z2SoundHandlePool* handle1 = startLevelSound((u32)soundID, 0, -1);
|
||||
Z2SoundHandlePool* handle2 = startLevelSound(sound_id2, 0, -1);
|
||||
|
||||
if (handle1 != NULL && *handle1 != NULL) {
|
||||
if (handle1 != NULL && *handle1 != false) {
|
||||
f32 volume = Z2Calc::linearTransform(param_1, 1.0f, 5.0f, 0.5f, 1.0f, false);
|
||||
(*handle1)->getAuxiliary().moveVolume(volume, 0);
|
||||
}
|
||||
if (handle2 != NULL && *handle2 != NULL) {
|
||||
if (handle2 != NULL && *handle2 != false) {
|
||||
f32 volume = Z2Calc::linearTransform(param_1, 1.0f, 20.0f, 0.1f, 1.0f, false);
|
||||
(*handle2)->getAuxiliary().moveVolume(volume, 0);
|
||||
}
|
||||
@@ -924,28 +924,28 @@ Z2SoundHandlePool* Z2CreatureOI::startCreatureSoundLevel(JAISoundID soundID, u32
|
||||
f32 pitch = Z2Calc::getParamByExp(mapinfo, 0.0f, 42.0f, 0.4f, 0.9f, 1.1f,
|
||||
Z2Calc::CURVE_POSITIVE);
|
||||
|
||||
if (handle1 != NULL && *handle1 != NULL) {
|
||||
if (handle1 != NULL && *handle1 != false) {
|
||||
(*handle1)->getAuxiliary().moveVolume(volume, 0);
|
||||
(*handle1)->getAuxiliary().movePitch(pitch, 0);
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (handle2 != NULL && *handle2 != NULL) {
|
||||
if (handle2 != NULL && *handle2 != false) {
|
||||
(*handle2)->getAuxiliary().moveVolume(volume, 0);
|
||||
(*handle2)->getAuxiliary().movePitch(pitch, 0);
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (handle3 != NULL && *handle3 != NULL) {
|
||||
if (handle3 != NULL && *handle3 != false) {
|
||||
(*handle3)->getAuxiliary().moveVolume(volume, 0);
|
||||
(*handle3)->getAuxiliary().movePitch(pitch, 0);
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (handle4 != NULL && *handle4 != NULL) {
|
||||
if (handle4 != NULL && *handle4 != false) {
|
||||
(*handle4)->getAuxiliary().moveVolume(volume, 0);
|
||||
(*handle4)->getAuxiliary().movePitch(pitch, 0);
|
||||
return handle4;
|
||||
@@ -979,7 +979,7 @@ Z2SoundHandlePool* Z2CreatureOI::startTentacleSoundLevel(JAISoundID soundID, u8
|
||||
}
|
||||
|
||||
static void Z2_E_sw_modPitch(Z2SoundHandlePool* handle, u32 mapinfo) {
|
||||
if (handle != NULL && *handle != NULL) {
|
||||
if (handle != NULL && *handle != false) {
|
||||
f32 pitch = 1.0f;
|
||||
switch (mapinfo) {
|
||||
case 1:
|
||||
@@ -994,7 +994,7 @@ static void Z2_E_sw_modPitch(Z2SoundHandlePool* handle, u32 mapinfo) {
|
||||
}
|
||||
|
||||
static void Z2_E_ms_modVol(Z2SoundHandlePool* handle, u32 mapinfo) {
|
||||
if (handle != NULL && *handle != NULL) {
|
||||
if (handle != NULL && *handle != false) {
|
||||
f32 var_f31 = 0.2f;
|
||||
if (mapinfo == 1) {
|
||||
(*handle)->getAuxiliary().moveVolume(var_f31, 0);
|
||||
@@ -1003,7 +1003,7 @@ static void Z2_E_ms_modVol(Z2SoundHandlePool* handle, u32 mapinfo) {
|
||||
}
|
||||
|
||||
static void Z2_E_mm_modPitch(Z2SoundHandlePool* handle, u32 mapinfo) {
|
||||
if (handle != NULL && *handle != NULL) {
|
||||
if (handle != NULL && *handle != false) {
|
||||
f32 var_f31 = 0.7f;
|
||||
if (mapinfo == 3) {
|
||||
(*handle)->getAuxiliary().movePitch(var_f31, 0);
|
||||
@@ -1012,7 +1012,7 @@ static void Z2_E_mm_modPitch(Z2SoundHandlePool* handle, u32 mapinfo) {
|
||||
}
|
||||
|
||||
static void Z2_B_zan_modPitch(Z2SoundHandlePool* handle, u32 mapinfo) {
|
||||
if (handle != NULL && *handle != NULL) {
|
||||
if (handle != NULL && *handle != false) {
|
||||
f32 pitch = 1.0f;
|
||||
f32 volume = 1.0f;
|
||||
if (mapinfo > 400) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "d/d_com_inf_game.h"
|
||||
|
||||
#if PLATFORM_WII || PLATFORM_SHIELD
|
||||
#include "Z2AudioLib/Z2AudioCS.h"
|
||||
#include "Z2AudioCS/Z2AudioCS.h"
|
||||
#endif
|
||||
|
||||
void Z2CreatureLink::setLinkGroupInfo(u8) {}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "Z2AudioLib/Z2SoundObjMgr.h"
|
||||
#include "Z2AudioLib/Z2StatusMgr.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include <cstring>
|
||||
|
||||
Z2SceneMgr::Z2SceneMgr() : JASGlobalInstance<Z2SceneMgr>(true) {
|
||||
sceneNum = -1;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "d/d_com_inf_game.h"
|
||||
|
||||
#if PLATFORM_WII || PLATFORM_SHIELD
|
||||
#include "Z2AudioLib/Z2AudioCS.h"
|
||||
#include "Z2AudioCS/Z2AudioCS.h"
|
||||
#endif
|
||||
|
||||
static void dummy() {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "Z2AudioLib/Z2Calc.h"
|
||||
#include "Z2AudioLib/Z2SceneMgr.h"
|
||||
#include "Z2AudioLib/Z2LinkMgr.h"
|
||||
#include <cstring>
|
||||
|
||||
Z2SoundObjMgr::Z2SoundObjMgr() : JASGlobalInstance<Z2SoundObjMgr>(true) {
|
||||
ghostEnemyState_ = 0;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#endif
|
||||
|
||||
#if PLATFORM_WII || PLATFORM_SHIELD
|
||||
#include "Z2AudioLib/Z2AudioCS.h"
|
||||
#include "Z2AudioCS/Z2AudioCS.h"
|
||||
#endif
|
||||
|
||||
Z2SoundObjBase::Z2SoundObjBase()
|
||||
@@ -164,7 +164,7 @@ Z2SoundHandlePool* Z2SoundObjBase::startLevelSound(JAISoundID soundID, u32 mapin
|
||||
if (handle != NULL) {
|
||||
soundStarter_->startSound(soundID, handle, pos_, mapinfo, fxMix,
|
||||
1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
if (handle != NULL && (*handle) != NULL) {
|
||||
if (handle != NULL && (*handle) != false) {
|
||||
(*handle)->setLifeTime(1, false);
|
||||
|
||||
#if PLATFORM_WII || PLATFORM_SHIELD
|
||||
@@ -210,7 +210,7 @@ Z2SoundHandlePool* Z2SoundObjBase::startCollisionSE(u32 hitID, u32 mapinfo, Z2So
|
||||
}
|
||||
|
||||
Z2SoundHandlePool* handle = Z2SoundObjBase::startSound(JAISoundID(hitID), mapinfo, -1);
|
||||
if (handle != NULL && (*handle) != NULL) {
|
||||
if (handle != NULL && (*handle) != false) {
|
||||
(*handle)->setUserData(mapinfo);
|
||||
if (30 <= mapinfo && mapinfo <= 52) {
|
||||
Z2Audible* audible = (Z2Audible*)(*handle)->getAudible();
|
||||
@@ -251,7 +251,7 @@ Z2SoundHandlePool* Z2DopplerSoundObjBase::startSound(JAISoundID soundID, u32 map
|
||||
pos_ = NULL;
|
||||
|
||||
Z2SoundHandlePool* handle = Z2SoundObjBase::startSound(soundID, mapinfo, reverb);
|
||||
if (pos != NULL && handle != NULL && (*handle) != NULL) {
|
||||
if (pos != NULL && handle != NULL && (*handle) != false) {
|
||||
if ((*handle)->acceptsNewAudible()) {
|
||||
(*handle)->newAudible(*pos, &field_0x20, 0, NULL);
|
||||
}
|
||||
@@ -266,7 +266,7 @@ Z2SoundHandlePool* Z2DopplerSoundObjBase::startLevelSound(JAISoundID soundID, u3
|
||||
pos_ = NULL;
|
||||
|
||||
Z2SoundHandlePool* handle = Z2SoundObjBase::startLevelSound(soundID, mapinfo, reverb);
|
||||
if (pos != NULL && handle != NULL && (*handle) != NULL) {
|
||||
if (pos != NULL && handle != NULL && (*handle) != false) {
|
||||
if ((*handle)->acceptsNewAudible()) {
|
||||
(*handle)->newAudible(*pos, &field_0x20, 0, NULL);
|
||||
}
|
||||
@@ -285,7 +285,7 @@ void Z2SoundObjSimple::init(Vec* posPtr, u8 handleNum) {
|
||||
Z2SoundHandlePool* Z2SoundObjSimple::startSound(JAISoundID soundID, u32 mapinfo, s8 reverb) {
|
||||
Z2SoundHandlePool* handle = Z2SoundObjBase::startSound(soundID, mapinfo, reverb);
|
||||
|
||||
if (soundID == Z2SE_AL_UKI_POKOPOKO && handle != NULL && (*handle) != NULL) {
|
||||
if (soundID == Z2SE_AL_UKI_POKOPOKO && handle != NULL && (*handle) != false) {
|
||||
f32 volume = Z2Calc::getParamByExp((f32)mapinfo, 0.0f, 127.0f, 0.2f, 0.4f, 1.0f, Z2Calc::CURVE_POSITIVE);
|
||||
f32 pitch = Z2Calc::getParamByExp((f32)mapinfo, 0.0f, 127.0f, 0.2f, 0.6f, 1.2f, Z2Calc::CURVE_POSITIVE);
|
||||
(*handle)->getAuxiliary().movePitch(pitch, 0);
|
||||
@@ -298,7 +298,7 @@ Z2SoundHandlePool* Z2SoundObjSimple::startSound(JAISoundID soundID, u32 mapinfo,
|
||||
Z2SoundHandlePool* Z2SoundObjSimple::startLevelSound(JAISoundID soundID, u32 mapinfo, s8 reverb) {
|
||||
Z2SoundHandlePool* handle = Z2SoundObjBase::startLevelSound(soundID, mapinfo, reverb);
|
||||
|
||||
if (handle != NULL && (*handle) != NULL) {
|
||||
if (handle != NULL && (*handle) != false) {
|
||||
f32 pitch = 1.0f;
|
||||
f32 volume = 1.0f;
|
||||
switch (soundID) {
|
||||
@@ -502,7 +502,7 @@ void Z2SoundObjAnime::startSoundInner(const JGeometry::TVec3<f32>& pos, f32 para
|
||||
u32 id = getSoundID(animationSound, pos, param_1);
|
||||
if (!Z2GetSeMgr()->isSoundCulling(id)) {
|
||||
JAISoundHandle* handle = getHandleUserData(user_data);
|
||||
if (handle != NULL && (*handle) != NULL && (*handle)->getAnimationState() != 1) {
|
||||
if (handle != NULL && (*handle) != false && (*handle)->getAnimationState() != 1) {
|
||||
handle = NULL;
|
||||
}
|
||||
|
||||
@@ -514,7 +514,7 @@ void Z2SoundObjAnime::startSoundInner(const JGeometry::TVec3<f32>& pos, f32 para
|
||||
bool result = soundStarter->startSound(id, handle, &pos, mapinfo, (f32)reverb / 127.0f,
|
||||
animationSound->field_0x0c, (f32)animationSound->field_0x14 / 127.0f,
|
||||
-1.0f, -1.0f, 0);
|
||||
if ((*handle) != NULL) {
|
||||
if ((*handle) != false) {
|
||||
(*handle)->setAnimationState(1);
|
||||
(*handle)->setUserData(user_data);
|
||||
if (animationSound->setsLifeTime()) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "Z2AudioLib/Z2Param.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include <cstring>
|
||||
|
||||
static const char* sSpotName[] = {
|
||||
"F_SP00",
|
||||
|
||||
Reference in New Issue
Block a user