mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-02 00:42:24 +00:00
FULLPIPE: Implement ModalMainMenu::updateSliderPos()
This commit is contained in:
parent
4598b3b2d9
commit
e6c6eac9af
@ -161,6 +161,7 @@ public:
|
||||
void stopAllSoundStreams();
|
||||
void stopAllSoundInstances(int id);
|
||||
void updateSoundVolume();
|
||||
void setMusicVolume(int vol);
|
||||
|
||||
int _sfxVolume;
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -203,4 +203,8 @@ void FullpipeEngine::updateSoundVolume() {
|
||||
debug(3, "STUB FullpipeEngine::updateSoundVolume()");
|
||||
}
|
||||
|
||||
void FullpipeEngine::setMusicVolume(int vol) {
|
||||
debug(3, "STUB FullpipeEngine::setMusicVolume()");
|
||||
}
|
||||
|
||||
} // End of namespace Fullpipe
|
||||
|
Loading…
x
Reference in New Issue
Block a user