1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 14:37:16 +00:00

a hook for sound playing

This commit is contained in:
Zeno Rogue 2018-01-25 14:31:35 +01:00
parent 1122362632
commit 572f1f9aad

View File

@ -191,8 +191,11 @@ string wheresounds = SOUNDDESTDIR;
string wheresounds = HYPERPATH "sounds/";
#endif
hookset<bool(const string& s, int vol)> *hooks_sound;
void playSound(cell *c, const string& fname, int vol) {
if(effvolume == 0) return;
if(callhandlers(false, hooks_sound, fname, vol)) return;
// printf("Play sound: %s\n", fname.c_str());
if(!chunks.count(fname)) {
string s = wheresounds+fname+".ogg";