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:
parent
1122362632
commit
572f1f9aad
@ -191,8 +191,11 @@ string wheresounds = SOUNDDESTDIR;
|
|||||||
string wheresounds = HYPERPATH "sounds/";
|
string wheresounds = HYPERPATH "sounds/";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
hookset<bool(const string& s, int vol)> *hooks_sound;
|
||||||
|
|
||||||
void playSound(cell *c, const string& fname, int vol) {
|
void playSound(cell *c, const string& fname, int vol) {
|
||||||
if(effvolume == 0) return;
|
if(effvolume == 0) return;
|
||||||
|
if(callhandlers(false, hooks_sound, fname, vol)) return;
|
||||||
// printf("Play sound: %s\n", fname.c_str());
|
// printf("Play sound: %s\n", fname.c_str());
|
||||||
if(!chunks.count(fname)) {
|
if(!chunks.count(fname)) {
|
||||||
string s = wheresounds+fname+".ogg";
|
string s = wheresounds+fname+".ogg";
|
||||||
|
Loading…
Reference in New Issue
Block a user