mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-11-07 01:03:00 +00:00
a hook for sound playing
This commit is contained in:
@@ -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";
|
||||||
|
|||||||
Reference in New Issue
Block a user