Level traversal works better now, compass is accurate, and direction is maintained when you traverse.

This commit is contained in:
Zed A. Shaw 2025-02-26 10:39:30 -05:00
parent b75a2b8c31
commit 14c7f660de
11 changed files with 35 additions and 16 deletions

View file

@ -6,6 +6,7 @@
namespace sound {
static SoundManager SMGR;
static bool initialized = false;
static bool muted = false;
using namespace fmt;
using std::make_shared;
@ -38,6 +39,8 @@ namespace sound {
void play(const std::string name) {
dbc::check(initialized, "You need to call sound::init() first");
if(muted) return;
if(SMGR.sounds.contains(name)) {
// get the sound from the sound map
auto pair = SMGR.sounds.at(name);
@ -60,4 +63,8 @@ namespace sound {
name));
}
}
void mute(bool setting) {
muted = setting;
}
}