summaryrefslogtreecommitdiff
path: root/src/nw4r
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2025-05-27 22:26:16 +0200
committerrobojumper <robojumper@gmail.com>2025-05-27 22:26:16 +0200
commit5bbbf093479390ea98f8324ca849f186b0948c95 (patch)
treeb7735da9a5276e892c978d90e1e25f566bc950e9 /src/nw4r
parent6e38f7ad9076030730b1d311933501a72a1c88c5 (diff)
snd_SoundStartable OK
Diffstat (limited to 'src/nw4r')
-rw-r--r--src/nw4r/snd/snd_SoundStartable.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/nw4r/snd/snd_SoundStartable.cpp b/src/nw4r/snd/snd_SoundStartable.cpp
index 4488ef60..f098d1d8 100644
--- a/src/nw4r/snd/snd_SoundStartable.cpp
+++ b/src/nw4r/snd/snd_SoundStartable.cpp
@@ -31,6 +31,16 @@ SoundStartable::StartResult SoundStartable::detail_StartSound(
return START_SUCCESS;
}
+SoundStartable::StartResult SoundStartable::detail_StartSound(
+ SoundHandle *pHandle, const char *label, const StartInfo *pStartInfo)
+{
+ u32 soundId = detail_ConvertLabelStringToSoundId(label);
+ if (soundId == -1)
+ return START_ERR_INVALID_LABEL_STRING;
+
+ return detail_StartSound(pHandle, soundId, pStartInfo);
+}
+
SoundStartable::StartResult SoundStartable::detail_HoldSound(
SoundHandle *handle, u32 soundId, StartInfo const *startInfo)
{
@@ -49,4 +59,32 @@ SoundStartable::StartResult SoundStartable::detail_HoldSound(
return START_SUCCESS;
}
+SoundStartable::StartResult SoundStartable::detail_HoldSound(
+ SoundHandle *pHandle, const char *label, const StartInfo *pStartInfo)
+{
+ u32 soundId = detail_ConvertLabelStringToSoundId(label);
+ if (soundId == -1)
+ return START_ERR_INVALID_LABEL_STRING;
+
+ return detail_HoldSound(pHandle, soundId, pStartInfo);
+}
+
+SoundStartable::StartResult SoundStartable::detail_PrepareSound(
+ SoundHandle *pHandle, u32 id,
+ const StartInfo *pStartInfo)
+{
+ return detail_SetupSound(pHandle, id, false, pStartInfo);
+}
+
+SoundStartable::StartResult SoundStartable::detail_PrepareSound(
+ SoundHandle *pHandle, const char *label,
+ const StartInfo *pStartInfo)
+{
+ u32 soundId = detail_ConvertLabelStringToSoundId(label);
+ if (soundId == -1)
+ return START_ERR_INVALID_LABEL_STRING;
+
+ return detail_PrepareSound(pHandle, soundId, pStartInfo);
+}
+
}} // namespace nw4r::snd