SDL/WASM Port

This commit is contained in:
TheBrokenRail
2023-08-05 01:58:24 -04:00
committed by iProgramInCpp
parent 0b16b2843a
commit 0fbe90752d
37 changed files with 1704 additions and 40 deletions

View File

@@ -63,8 +63,13 @@ void SoundEngine::play(const std::string& name)
SoundDesc sd;
if (m_repository.get(name, sd))
if (m_repository.get(name, sd)) {
#ifdef USE_SDL
m_soundSystem.play(sd, 0, 0, 0, 1, 1, true);
#else
m_soundSystem.playAt(sd, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f);
#endif
}
}
void SoundEngine::play(const std::string& name, float a, float b, float c, float d, float e)
@@ -74,6 +79,11 @@ void SoundEngine::play(const std::string& name, float a, float b, float c, float
SoundDesc sd;
if (m_repository.get(name, sd))
if (m_repository.get(name, sd)) {
#ifdef USE_SDL
m_soundSystem.play(sd, a, b, c, d, e, false);
#else
m_soundSystem.playAt(sd, a, b, c, d, e);
#endif
}
}