- migrate a large part of the sound code to FSoundIDs.

This has always been a wild mixture of IDs and ints.
This commit is contained in:
Christoph Oelckers 2022-11-24 15:22:07 +01:00
commit 160633a4a2
35 changed files with 224 additions and 205 deletions

View file

@ -531,7 +531,7 @@ static void ParseInsideDecoration (Baggage &bag, AActor *defaults,
else if (def == DEF_Pickup && sc.Compare ("PickupSound"))
{
sc.MustGetString ();
defaults->IntVar(NAME_PickupSound) = FSoundID(sc.String);
defaults->IntVar(NAME_PickupSound) = S_FindSound(sc.String).index();
}
else if (def == DEF_Pickup && sc.Compare ("PickupMessage"))
{

View file

@ -173,7 +173,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(AActor, A_SoundVolume, S_ChangeActorSoundVolume)
DEFINE_ACTION_FUNCTION_NATIVE(AActor, A_PlaySound, A_PlaySound)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_SOUND(soundid);
PARAM_INT(soundid);
PARAM_INT(channel);
PARAM_FLOAT(volume);
PARAM_BOOL(looping);
@ -187,7 +187,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(AActor, A_PlaySound, A_PlaySound)
DEFINE_ACTION_FUNCTION_NATIVE(AActor, A_StartSound, A_StartSound)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_SOUND(soundid);
PARAM_INT(soundid);
PARAM_INT(channel);
PARAM_INT(flags);
PARAM_FLOAT(volume);