From: <sag...@us...> - 2009-07-20 21:33:21
|
Revision: 298 http://modplug.svn.sourceforge.net/modplug/?rev=298&view=rev Author: saga-games Date: 2009-07-20 21:33:11 +0000 (Mon, 20 Jul 2009) Log Message: ----------- [Fix] Pattern editor: Weird combination of context menu shortcut and "always center active row" being disabled (http://lpchip.com/modplug/viewtopic.php?t=3203) [Fix] Sample editor: Global volume is now also being adjusted for stereo and 16-Bit samples [Ref] Using constants instead of numbers in two places Modified Paths: -------------- trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/mptrack/view_com.cpp trunk/OpenMPT/soundlib/Snd_fx.cpp trunk/OpenMPT/soundlib/modsmp_ctrl.cpp Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2009-07-19 21:41:08 UTC (rev 297) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2009-07-20 21:33:11 UTC (rev 298) @@ -1220,12 +1220,12 @@ //------ Plugin Header Menu --------- : if ((m_dwStatus & PATSTATUS_PLUGNAMESINHEADERS) && - (pt.y > m_szHeader.cy-PLUGNAME_HEIGHT) && (pt.y <= m_szHeader.cy)) { + (pt.y > m_szHeader.cy-PLUGNAME_HEIGHT) && (pt.y < m_szHeader.cy)) { BuildPluginCtxMenu(hMenu, nChn, pSndFile); } //------ Channel Header Menu ---------- : - else if (pt.y <= m_szHeader.cy){ + else if (pt.y < m_szHeader.cy){ if (ih->ShiftPressed()) { //Don't bring up menu if shift is pressed, else we won't get button up msg. } else { @@ -1237,7 +1237,7 @@ } //------ Standard Menu ---------- : - else if ((pt.x >= m_szHeader.cx) && (pt.y > m_szHeader.cy)) { + else if ((pt.x >= m_szHeader.cx) && (pt.y >= m_szHeader.cy)) { /*if (BuildSoloMuteCtxMenu(hMenu, ih, nChn, pSndFile)) AppendMenu(hMenu, MF_SEPARATOR, 0, "");*/ if (BuildSelectionCtxMenu(hMenu, ih)) Modified: trunk/OpenMPT/mptrack/view_com.cpp =================================================================== --- trunk/OpenMPT/mptrack/view_com.cpp 2009-07-19 21:41:08 UTC (rev 297) +++ trunk/OpenMPT/mptrack/view_com.cpp 2009-07-20 21:33:11 UTC (rev 298) @@ -276,7 +276,7 @@ { wsprintf(s, "%d Hz", pSndFile->GetFreqFromPeriod( - pSndFile->GetPeriodFromNote(61, pins->nFineTune, pins->nC4Speed), + pSndFile->GetPeriodFromNote(NOTE_MIDDLEC, pins->nFineTune, pins->nC4Speed), pins->nC4Speed)); } break; Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-19 21:41:08 UTC (rev 297) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-20 21:33:11 UTC (rev 298) @@ -3450,7 +3450,7 @@ UINT CSoundFile::GetPeriodFromNote(UINT note, int nFineTune, UINT nC4Speed) const //------------------------------------------------------------------------------- { - if ((!note) || (note > 0xF0)) return 0; + if ((!note) || (note >= NOTE_MIN_SPECIAL)) return 0; if (m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT|MOD_TYPE_S3M|MOD_TYPE_STM|MOD_TYPE_MDL|MOD_TYPE_ULT|MOD_TYPE_WAV |MOD_TYPE_FAR|MOD_TYPE_DMF|MOD_TYPE_PTM|MOD_TYPE_AMS|MOD_TYPE_DBM|MOD_TYPE_AMF|MOD_TYPE_PSM)) { Modified: trunk/OpenMPT/soundlib/modsmp_ctrl.cpp =================================================================== --- trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2009-07-19 21:41:08 UTC (rev 297) +++ trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2009-07-20 21:33:11 UTC (rev 298) @@ -280,7 +280,7 @@ RemoveOffsetAndNormalize( reinterpret_cast<int8*>(pins->pSample) + iStart, iEnd - iStart, dOffset, dAmplify); // step 3: adjust global vol (if available) - if((modtype & (MOD_TYPE_IT | MOD_TYPE_MPT)) && (iStart == 0) && (iEnd == pins->nLength)) + if((modtype & (MOD_TYPE_IT | MOD_TYPE_MPT)) && (iStart == 0) && (iEnd == pins->nLength * pins->GetNumChannels())) pins->nGlobalVol = min((WORD)(pins->nGlobalVol / dAmplify), 64); AdjustEndOfSample(smp, pSndFile); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |