Moved settings related to the game itself into its own settings save file. Emscripten build also saves a separate system settings file in indexeddb. Added checks to prevent menu sounds from playing when the menu is not currently open, but adjusted in a different location in the game. Implemented different button icon sets and a setting to toggle between them. Removed the double button display (caused more confusion and took up more room). Fixed a bug with iterating through navigation groups when a button was removed/disabled from the list. Removed iconscaling dependency based on MenuIconButton sizes.

This commit is contained in:
2024-02-20 03:47:12 -06:00
parent 0d295021b6
commit 66b0648a59
45 changed files with 459 additions and 155 deletions
+2 -2
View File
@@ -88,7 +88,7 @@ void SoundEffect::PlaySFX(const std::string_view eventName,const vf2d&pos){
float pitch=util::random(pitchDiff)+sfx.minPitch;
if(pos==CENTERED){
Audio::Engine().Play(operator""_SFX(sfx.filename.c_str(),sfx.filename.length()),sfx.vol*Audio::GetSFXVolume(),0.0f,pitch);
Audio::Engine().Play(operator""_SFX(sfx.filename.c_str(),sfx.filename.length()),sfx.vol*Audio::GetSFXVolume()*Audio::GetMuteMult(),0.0f,pitch);
}else{
const float soundActivationRange="Audio.Environmental Audio Activation Range"_F;
@@ -97,7 +97,7 @@ void SoundEffect::PlaySFX(const std::string_view eventName,const vf2d&pos){
float distRatio=1-distanceFromPlayer/soundActivationRange; //0-1 where 1 is full volume.
float xDistRatio=(pos.x-game->GetPlayer()->GetX())/soundActivationRange; //0-1 where 1 is full volume.
float vol=distRatio*sfx.vol*Audio::GetSFXVolume();
float vol=distRatio*sfx.vol*Audio::GetSFXVolume()*Audio::GetMuteMult();
float pan=xDistRatio;
Audio::Engine().Play(operator""_SFX(sfx.filename.c_str(),sfx.filename.length()),vol,pan,pitch);
}