/// --------------------------------------------------------------------------- /// Plays a sound effect. /// --------------------------------------------------------------------------- s32 prSoundManager::SFXPlay(const char *name, f32 volume, bool loop) { s32 handle = -1; #ifdef SOUND_ALLOW PRASSERT(initialised && name && *name); PRASSERT(pLoadedWaves); if (numEffects > 0) { u32 hash = prStringHash(name); for (s32 index = 0 ; index < numEffects; index++) { if (hash == pLoadedWaves[index].hash) { handle = SFXPlay(index, volume, loop); break; } } } if (handle == -1) { prTrace(prLogLevel::LogWarning, "Failed to play effect '%s'\n", name); } #else PRUNUSED(loop); PRUNUSED(volume); PRUNUSED(name); #endif return handle; }
/// --------------------------------------------------------------------------- /// Constructor /// --------------------------------------------------------------------------- prEmitterDefinition::prEmitterDefinition(const char *name) : mHash (prStringHash(name)) , mName (name) { prTrace(LogError, "New 'prEmitterDefinition' %s - %08x\n", mName.c_str(), mHash); }