Skip to content

Commit 21e9d62

Browse files
authored
MSP SoundFX
# Changes * Added initial sound FX * Sound FX have categories with their own volume sliders * Implemented a room-specific music (Frostfire Inn)
1 parent a81e51b commit 21e9d62

File tree

31 files changed

+71
-9
lines changed

31 files changed

+71
-9
lines changed

_datafiles/html/public/webclient.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
position: absolute;
102102
top: 60px; /* Just below the icon */
103103
right: 10px;
104-
width: 300px;
104+
width: 450px;
105105
padding: 10px;
106106
background-color: #2e2e2e;
107107
border: 1px solid #444;
@@ -121,7 +121,7 @@
121121
}
122122
.slider-container label {
123123
color: #ccc;
124-
width: 70px;
124+
width: 150px;
125125
}
126126
.slider-container input[type="range"] {
127127
flex: 1;
@@ -347,7 +347,7 @@ <h3>Volume Controls</h3>
347347
SoundPlayer.stop();
348348
}
349349
} else {
350-
SoundPlayer.play(baseMp3Url+fileName, true, (sliderValues["sounds"]/100));
350+
SoundPlayer.play(baseMp3Url+fileName, false, (sliderValues[obj.T.toLowerCase()+" sounds"]/100));
351351
}
352352
}
353353
return;
@@ -480,9 +480,11 @@ <h3>Volume Controls</h3>
480480
/////////////////////////////////////////////
481481

482482
// Our multiple volume controls:
483-
let sliderValues = {
484-
"music": 75, // default 75%
485-
"sounds": 75 // default 75%
483+
let sliderValues = { // default 75%
484+
"music": 75,
485+
"combat sounds": 75,
486+
"movement sounds": 75,
487+
"other sounds": 75
486488
};
487489

488490
// Returns an appropriate speaker icon based on value
@@ -534,7 +536,6 @@ <h3>Volume Controls</h3>
534536
iconSpan.textContent = getSpeakerIcon(val);
535537

536538
MusicPlayer.setGlobalVolume(sliderValues["music"]/100);
537-
SoundPlayer.setGlobalVolume(sliderValues["sounds"]/100);
538539
});
539540

540541
// Put them all together

_datafiles/html/static/public/audio/music/_TODO11.mp3 renamed to _datafiles/html/static/public/audio/music/frostfire-inn.mp3

File renamed without changes.
File renamed without changes.
Binary file not shown.
23.7 KB
Binary file not shown.
14.2 KB
Binary file not shown.
15.5 KB
Binary file not shown.
14.7 KB
Binary file not shown.
18.3 KB
Binary file not shown.
32.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)