Mercurial > mm7
diff mm7_5.cpp @ 328:8e23edf57e27
little fix
author | Ritor1 |
---|---|
date | Wed, 20 Feb 2013 17:37:33 +0600 |
parents | ce39b96acf5c |
children | 405d0c4dd1b3 ea55d6414029 |
line wrap: on
line diff
--- a/mm7_5.cpp Wed Feb 20 11:27:06 2013 +0600 +++ b/mm7_5.cpp Wed Feb 20 17:37:33 2013 +0600 @@ -931,9 +931,8 @@ GUIWindow::Create(v23, 0xD8u, 0, 0, (enum WindowType)90, v153, v167); //goto LABEL_143; if ( uMusicVolimeMultiplier ) - pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, - (signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0), 0); - pAudioPlayer->SetMusicVolume((signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0)); + pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f, 0); + pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f); continue; } if ( uMessageParam == 5 ) @@ -948,9 +947,8 @@ GUIWindow::Create(v23, 0xD8u, 0, 0, (enum WindowType)90, v153, v167); //goto LABEL_143; if ( uMusicVolimeMultiplier ) - pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, - (signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0), 0); - pAudioPlayer->SetMusicVolume((signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0)); + pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f, 0); + pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f); continue; } uMusicVolimeMultiplier = (pMouse->GetCursorPos(&v202)->x - 263) / 17; @@ -958,34 +956,21 @@ uMusicVolimeMultiplier = 9; //LABEL_143: if ( uMusicVolimeMultiplier ) - pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, - (signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0), 0); - pAudioPlayer->SetMusicVolume((signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0)); + pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, pSoundVolumeLevels[uMusicVolimeMultiplier] * 64.0f, 0); + pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[uMusicVolimeMultiplier] * 64.0f); continue; case UIMSG_ChangeSoundVolume: - if ( uMessageParam == 4 ) + if ( uMessageParam == 4 )//reduce sound level { --uSoundVolumeMultiplier; if ( (char)uSoundVolumeMultiplier < 1 ) uSoundVolumeMultiplier = 0; - v168 = v0; - v24 = 243; - v154 = (int)pBtn_SliderLeft; -//LABEL_150: - GUIWindow::Create(v24, 0xA2u, 0, 0, (enum WindowType)90, v154, v168); - //goto LABEL_157; - pAudioPlayer->SetMasterVolume((signed __int64)(pSoundVolumeLevels[(char)uSoundVolumeMultiplier] * 128.0)); - v165 = 0; - v151 = 0; - v144 = 0; - v139 = 0; - v135 = -1; - v132 = 0; - v130 = -1; - v127 = 218; - goto _play_sound_and_continue; - } - if ( uMessageParam == 5 ) + GUIWindow::Create(243, 162, 0, 0, (enum WindowType)90, (int)pBtn_SliderLeft, v0); + pAudioPlayer->SetMasterVolume(pSoundVolumeLevels[uSoundVolumeMultiplier] * 128.0f); + pAudioPlayer->PlaySound((SoundID)218, -1, 0, -1, 0, 0, 0, 0); + continue; + } + if ( uMessageParam == 5 )//Increase sound level { ++uSoundVolumeMultiplier; if ( (char)uSoundVolumeMultiplier > 8 ) @@ -996,7 +981,7 @@ //goto LABEL_150; GUIWindow::Create(v24, 0xA2u, 0, 0, (enum WindowType)90, v154, v168); //goto LABEL_157; - pAudioPlayer->SetMasterVolume((signed __int64)(pSoundVolumeLevels[(char)uSoundVolumeMultiplier] * 128.0)); + pAudioPlayer->SetMasterVolume(pSoundVolumeLevels[uSoundVolumeMultiplier] * 128.0f); v165 = 0; v151 = 0; v144 = 0; @@ -1011,7 +996,7 @@ if ( (char)uSoundVolumeMultiplier > 8 ) uSoundVolumeMultiplier = 9; //LABEL_157: - pAudioPlayer->SetMasterVolume((signed __int64)(pSoundVolumeLevels[(char)uSoundVolumeMultiplier] * 128.0)); + pAudioPlayer->SetMasterVolume(pSoundVolumeLevels[uSoundVolumeMultiplier] * 128.0f); v165 = 0; v151 = 0; v144 = 0; @@ -1048,7 +1033,7 @@ if ( !uVoicesVolumeMultiplier ) continue; v165 = 0; - v151 = (signed __int64)(pSoundVolumeLevels[(char)uVoicesVolumeMultiplier] * 128.0); + v151 = pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0f; v144 = 0; v139 = 0; v135 = -1; @@ -1071,7 +1056,7 @@ if ( !uVoicesVolumeMultiplier ) continue; v165 = 0; - v151 = (signed __int64)(pSoundVolumeLevels[(char)uVoicesVolumeMultiplier] * 128.0); + v151 = pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0f; v144 = 0; v139 = 0; v135 = -1; @@ -1087,7 +1072,7 @@ if ( !uVoicesVolumeMultiplier ) continue; v165 = 0; - v151 = (signed __int64)(pSoundVolumeLevels[(char)uVoicesVolumeMultiplier] * 128.0); + v151 = pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0f; v144 = 0; v139 = 0; v135 = -1;