diff options
| author | robojumper <robojumper@gmail.com> | 2025-06-15 18:16:26 +0200 |
|---|---|---|
| committer | robojumper <robojumper@gmail.com> | 2025-09-13 10:51:36 +0200 |
| commit | 6cb7f3bfdc8b4f69e2443fad99fb7d807cf9ea7c (patch) | |
| tree | 10871e545d45c2d2afe624d7c0d737bc5b0005c1 /include/d | |
| parent | 7d333a8d8e468dd891d380248af03387af672e17 (diff) | |
More sound effects and splits
Diffstat (limited to 'include/d')
| -rw-r--r-- | include/d/snd/d_snd_3d_manager.h | 9 | ||||
| -rw-r--r-- | include/d/snd/d_snd_small_effect_mgr.h | 24 |
2 files changed, 22 insertions, 11 deletions
diff --git a/include/d/snd/d_snd_3d_manager.h b/include/d/snd/d_snd_3d_manager.h index 2ac0b062..af45af62 100644 --- a/include/d/snd/d_snd_3d_manager.h +++ b/include/d/snd/d_snd_3d_manager.h @@ -4,7 +4,6 @@ #include "d/snd/d_snd_3d_engine.h" #include "d/snd/d_snd_util.h" #include "egg/gfx/eggCamera.h" -#include "m/m_vec.h" #include "nw4r/math/math_types.h" #include "nw4r/snd/snd_Sound3DListener.h" #include "nw4r/snd/snd_Sound3DManager.h" @@ -28,11 +27,11 @@ public: return mManager; } - const mVec3_c &getCameraTargetPos() const { + const nw4r::math::VEC3 &getCameraTargetPos() const { return mCameraTargetPosition; } - const mVec3_c &getNrmCameraDirection() const { + const nw4r::math::VEC3 &getNrmCameraDirection() const { return mCameraDirectionNormalized; } @@ -52,8 +51,8 @@ private: /* 0x018 */ nw4r::snd::Sound3DManager mManager; /* 0x044 */ nw4r::snd::Sound3DListener mListener; /* 0xB0 */ EGG::LookAtCamera mCamera; - /* 0x138 */ mVec3_c mCameraDirectionNormalized; - /* 0x144 */ mVec3_c mCameraTargetPosition; + /* 0x138 */ nw4r::math::VEC3 mCameraDirectionNormalized; + /* 0x144 */ nw4r::math::VEC3 mCameraTargetPosition; /* 0x150 */ f32 mCameraPosSqVelocity; /* 0x154 */ f32 mCameraAtSqVelocity; /* 0x158 */ f32 mCamDistance; diff --git a/include/d/snd/d_snd_small_effect_mgr.h b/include/d/snd/d_snd_small_effect_mgr.h index a03c2b0e..b77ec967 100644 --- a/include/d/snd/d_snd_small_effect_mgr.h +++ b/include/d/snd/d_snd_small_effect_mgr.h @@ -4,9 +4,9 @@ #include "d/snd/d_snd_source.h" #include "d/snd/d_snd_util.h" #include "d/snd/d_snd_wzsound.h" // IWYU pragma: export +#include "nw4r/math/math_types.h" #include "nw4r/snd/snd_SoundHandle.h" - SND_DISPOSER_FORWARD_DECL(dSndSmallEffectMgr_c); /** @@ -35,18 +35,29 @@ public: // used for clawshots cursor, pan depends on where on the screen // your cursor is when it activates bool playSoundWithPan(u32 soundId, f32 pan); - void holdSoundWithPitch(u32 soundId, f32 pitch); - bool playSkbSound(u32 soundId); + bool holdSound(u32 soundId); + bool holdSoundWithPitch(u32 soundId, f32 pitch); + + // These two do the exact same thing + bool playSoundAtPosition(u32 soundId, const nw4r::math::VEC3 *position); + bool playSoundAtPosition2(u32 soundId, const nw4r::math::VEC3 *position); + bool holdBowChargeSound(f32 remainingChargeAmount); + bool holdFinisherPromptSound(const nw4r::math::VEC3 *position); + + bool playDowsingPingSound(f32 volume, f32 pitch); + bool holdDowsingNearestSound(); + + bool playSkbSound(u32 soundId); bool playButtonPressSoundWhenAdvancingTextBoxes(f32); void resetButtonPressSound(); void setButtonPressSound(dSoundSource_c *source); - - void playSound(u32 soundId, nw4r::snd::SoundHandle *handle); bool playBattleHitSound(BattleHitSound_e type, dSoundSource_c *source); private: + bool playSoundInternal(u32 soundId, nw4r::snd::SoundHandle *handle); + bool playSoundInternalChecked(u32 soundId, nw4r::snd::SoundHandle *handle); bool playSoundInternal(u32 soundId); void stopSounds(u32 playerIdx, u32 soundId, s32 fadeFrames); void stopSounds(u32 soundId, s32 fadeFrames); @@ -59,11 +70,12 @@ private: * or stops a lower-priority sound if needed and possible. */ nw4r::snd::SoundHandle *getHoldSoundHandle(u32 soundId); + bool holdSound(u32 soundId, nw4r::snd::SoundHandle *handle); /* 0x10 */ s32 field_0x10; // used for most sounds /* 0x14 */ nw4r::snd::SoundHandle mNormalSound; - /* 0x18 */ nw4r::snd::SoundHandle mHandle3; + /* 0x18 */ nw4r::snd::SoundHandle mDowsingSoundHandle; /* 0x1C */ nw4r::snd::SoundHandle mHoldSoundHandles[NUM_HOLD_SOUNDS]; /* 0x28 */ u32 mDelayedSoundIds[NUM_DELAYED_SOUNDS]; |
