- separated the channel number from the flags in the sound interface so that the 8 channel limit can be eliminated.

- added Marisa Kirisame's CHAN_OVERLAP flag.
- exported S_IsActorPlayingSomething to ZScript.

The sound API change required deprecating A_PlaySound and S_Sound. There are now new variants S_StartSound and A_StartSound which have two distinct parameters for channel and flags.
This commit is contained in:
Christoph Oelckers 2019-12-16 23:52:39 +01:00
commit e82565373f
43 changed files with 339 additions and 280 deletions

View file

@ -174,6 +174,29 @@ DEFINE_ACTION_FUNCTION_NATIVE(AActor, A_PlaySound, A_PlaySound)
return 0;
}
DEFINE_ACTION_FUNCTION_NATIVE(AActor, A_StartSound, A_StartSound)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_SOUND(soundid);
PARAM_INT(channel);
PARAM_INT(flags);
PARAM_FLOAT(volume);
PARAM_BOOL(looping);
PARAM_FLOAT(attenuation);
PARAM_BOOL(local);
PARAM_FLOAT(pitch);
A_StartSound(self, soundid, channel, flags, volume, looping, attenuation, local, pitch);
return 0;
}
DEFINE_ACTION_FUNCTION_NATIVE(AActor, IsActorPlayingSomething, S_IsActorPlayingSomething)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_INT(channel);
PARAM_SOUND(soundid);
ACTION_RETURN_BOOL(S_IsActorPlayingSomething(self, channel, soundid));
}
DEFINE_ACTION_FUNCTION_NATIVE(AActor, CheckKeys, P_CheckKeys)
{
PARAM_SELF_PROLOGUE(AActor);