diff options
author | ptitSeb | 2017-12-16 14:38:00 +0100 |
---|---|---|
committer | ptitSeb | 2017-12-16 14:38:00 +0100 |
commit | ddd76d59cc4958abb5c42090046bf6781cf75096 (patch) | |
tree | 796082296283a5aaec052469bc7d4360184c50ce /src/options.c | |
parent | 3638a171bda48dc9a8d264f68dd04a187a433aa6 (diff) | |
download | hydracastlelabyrinth-ddd76d59cc4958abb5c42090046bf6781cf75096.tar.gz hydracastlelabyrinth-ddd76d59cc4958abb5c42090046bf6781cf75096.tar.bz2 hydracastlelabyrinth-ddd76d59cc4958abb5c42090046bf6781cf75096.zip |
Added Music Volume option
Diffstat (limited to 'src/options.c')
-rw-r--r-- | src/options.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/options.c b/src/options.c index 4c31314..377bb48 100644 --- a/src/options.c +++ b/src/options.c @@ -146,6 +146,14 @@ int optionsStep() } } #endif + + #ifdef _SDL + // Music volume + if(optCursor == 2) { + music_volume = (music_volume+1)%5; + PHL_MusicVolume(0.25f * music_volume); + } + #endif //Back if (optCursor == lastOption) { @@ -252,6 +260,16 @@ void optionsDraw() ydraw += ystep; optioncount++; #endif + + #ifdef _SDL + // Music volume + PHL_DrawTextBold("MUSIC", xleft, ydraw, YELLOW); + char buff[50]; + sprintf(buff, "%d%", music_volume*25); + PHL_DrawTextBold(buff, xright, ydraw, YELLOW); + ydraw += ystep; + optioncount++; + #endif PHL_DrawTextBold("BACK", xleft, ydraw, YELLOW); |