aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/modal.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2014-04-18 21:09:12 +0300
committerEugene Sandulenko2014-04-18 21:09:12 +0300
commite6c6eac9affaca53ac7f28d9a96d0a29d3826ed4 (patch)
tree937cd1afd7a0b006f6004f124ce60fda0d41f7bb /engines/fullpipe/modal.cpp
parent4598b3b2d92a75de5970d31692b0c0da14f0fb46 (diff)
downloadscummvm-rg350-e6c6eac9affaca53ac7f28d9a96d0a29d3826ed4.tar.gz
scummvm-rg350-e6c6eac9affaca53ac7f28d9a96d0a29d3826ed4.tar.bz2
scummvm-rg350-e6c6eac9affaca53ac7f28d9a96d0a29d3826ed4.zip
FULLPIPE: Implement ModalMainMenu::updateSliderPos()
Diffstat (limited to 'engines/fullpipe/modal.cpp')
-rw-r--r--engines/fullpipe/modal.cpp36
1 files changed, 35 insertions, 1 deletions
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 5cdc449d91..85cb06544d 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -1028,7 +1028,41 @@ void ModalMainMenu::updateVolume() {
}
void ModalMainMenu::updateSliderPos() {
- warning("STUB: ModalMainMenu::updateSliderPos()");
+ if (_lastArea->picIdL == PIC_MNU_SLIDER_L) {
+ int x = g_fp->_mouseScreenPos.x + _sliderOffset;
+
+ if (x >= 65) {
+ if (x > 238)
+ x = 238;
+ } else {
+ x = 65;
+ }
+
+ _lastArea->picObjD->setOXY(x, _lastArea->picObjD->_oy);
+ _lastArea->picObjL->setOXY(x, _lastArea->picObjD->_oy);
+
+ int vol = 1000 * (3 * x - 195);
+ g_fp->_sfxVolume = vol / 173 - 3000;
+
+ if (!(vol / 173))
+ g_fp->_sfxVolume = -10000;
+
+ g_fp->updateSoundVolume();
+ } else if (_lastArea->picIdL == PIC_MNU_MUSICSLIDER_L) {
+ int x = g_fp->_mouseScreenPos.x + _sliderOffset;
+
+ if (x >= 65) {
+ if (x > 238)
+ x = 238;
+ } else {
+ x = 65;
+ }
+
+ _lastArea->picObjD->setOXY(x, _lastArea->picObjD->_oy);
+ _lastArea->picObjL->setOXY(x, _lastArea->picObjD->_oy);
+
+ g_fp->setMusicVolume(255 * (x - 65) / 173);
+ }
}
int ModalMainMenu::checkHover(Common::Point &point) {