From ebd7e3feed369cc482ec7b5f537c4d363f81eb60 Mon Sep 17 00:00:00 2001 From: TakaRikka <38417346+TakaRikka@users.noreply.github.com> Date: Tue, 12 Nov 2024 02:41:55 -0800 Subject: d_error_msg mostly done, little Z2LinkMgr work (#2248) --- include/Z2AudioLib/Z2AudioMgr.h | 3 ++- include/Z2AudioLib/Z2Creature.h | 4 ++-- include/Z2AudioLib/Z2SoundHandles.h | 7 +++++++ 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'include/Z2AudioLib') diff --git a/include/Z2AudioLib/Z2AudioMgr.h b/include/Z2AudioLib/Z2AudioMgr.h index b118ef2e97..106b78aebb 100644 --- a/include/Z2AudioLib/Z2AudioMgr.h +++ b/include/Z2AudioLib/Z2AudioMgr.h @@ -29,8 +29,9 @@ public: void resetRecover(); bool hasReset() const; - static Z2AudioMgr* getInterface() { return mAudioMgrPtr; } + bool isResetting() { return mResettingFlag; } + static Z2AudioMgr* getInterface() { return mAudioMgrPtr; } static Z2AudioMgr* mAudioMgrPtr; /* 0x0514 */ virtual bool startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3 const*); diff --git a/include/Z2AudioLib/Z2Creature.h b/include/Z2AudioLib/Z2Creature.h index 8387da2bdd..54e26ddad0 100644 --- a/include/Z2AudioLib/Z2Creature.h +++ b/include/Z2AudioLib/Z2Creature.h @@ -64,8 +64,8 @@ public: void setRiding(bool); void setMagnetized(bool); void setWolfEyeOpen(bool); - void startLinkSound(JAISoundID, u32, s8); - void startLinkSoundLevel(JAISoundID, u32, s8); + Z2SoundHandlePool* startLinkSound(JAISoundID, u32, s8); + JAISoundHandle* startLinkSoundLevel(JAISoundID, u32, s8); void startLinkVoice(JAISoundID, s8); void startLinkVoiceLevel(JAISoundID, s8); void startLinkSwordSound(JAISoundID, u32, s8); diff --git a/include/Z2AudioLib/Z2SoundHandles.h b/include/Z2AudioLib/Z2SoundHandles.h index 352dbaa99d..117661fb79 100644 --- a/include/Z2AudioLib/Z2SoundHandles.h +++ b/include/Z2AudioLib/Z2SoundHandles.h @@ -30,6 +30,13 @@ public: void stopAllSounds(u32 fadeout); + void stopSound(JAISoundID soundID, u32 param_1) { + JAISoundHandle* phandle = getHandleSoundID(soundID); + if (phandle != NULL) { + (*phandle)->stop(param_1); + } + } + void setPos(const JGeometry::TVec3& pos); int getNumHandles() const { return getNumLinks(); } -- cgit v1.2.3