- 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

@ -153,10 +153,10 @@ void AddGenericVideo(DObject* runner, const FString& fn, int soundid, int fps)
int CutsceneDef::GetSound()
{
int id = -1;
FSoundID id = INVALID_SOUND;
if (soundName.IsNotEmpty()) id = soundEngine->FindSound(soundName);
if (id <= 0) id = soundEngine->FindSoundByResID(soundID);
return id;
if (id == INVALID_SOUND) id = soundEngine->FindSoundByResID(soundID);
return id.index();
}
void CutsceneDef::Create(DObject* runner)