Skip to content

Commit

Permalink
FULLPIPE: Fix ModalMainMenu::updateSoundVolume()
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed May 29, 2014
1 parent aed5de6 commit b59026f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions engines/fullpipe/modal.cpp
Expand Up @@ -1086,17 +1086,17 @@ void ModalMainMenu::updateSoundVolume(Sound *snd) {
b = 800 - dx;
}

int32 pp = b * a; //(0x51EB851F * b * a) >> 32) >> 8; // TODO FIXME
int32 pp = b * a;

snd->setPanAndVolume(pan + (pp >> 31) + pp, par);
snd->setPanAndVolume(pan + pp / 800, par);

return;
}

int dx = _screct.left - ani->_ox;
if (dx <= 800) {
int32 s = 0x51EB851F * (800 - dx) * (g_fp->_sfxVolume - (-3500)); // TODO FIXME
int32 p = -3500 + (s >> 31) + (s >> 8);
int32 s = (800 - dx) * (g_fp->_sfxVolume - (-3500));
int32 p = -3500 + s / 800;

if (p > g_fp->_sfxVolume)
p = g_fp->_sfxVolume;
Expand Down

0 comments on commit b59026f

Please sign in to comment.