From: <sag...@us...> - 2009-12-11 23:40:12
|
Revision: 440 http://modplug.svn.sourceforge.net/modplug/?rev=440&view=rev Author: saga-games Date: 2009-12-11 23:39:57 +0000 (Fri, 11 Dec 2009) Log Message: ----------- [Fix] XM Compatibility: A somewhat more compatible Rxy effect. Still needs more testing, as it's approximately the same algorithm as in Milky (which I know is not 100% correct). [Fix] Comments tab: The lower part of the tab was receiving update messages that were not even meaningful to this tab (f.e. speed changes), so it was updating quite often modules that have alternating speed... Only letting in important update messages now. [Fix] Wave Convert: The wave convert dialog had two default buttons, one of them (the "default default button") didn't make sense. Modified Paths: -------------- trunk/OpenMPT/mptrack/mptrack.rc trunk/OpenMPT/mptrack/view_com.cpp trunk/OpenMPT/soundlib/Snd_fx.cpp trunk/OpenMPT/soundlib/Sndfile.h Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2009-12-08 19:42:46 UTC (rev 439) +++ trunk/OpenMPT/mptrack/mptrack.rc 2009-12-11 23:39:57 UTC (rev 440) @@ -220,7 +220,7 @@ END IDD_WAVECONVERT DIALOGEX 0, 0, 262, 197 -STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Wave Convert" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN @@ -229,7 +229,7 @@ GROUPBOX "Render",IDC_STATIC,6,6,192,90 COMBOBOX IDC_COMBO1,18,18,54,82,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_COMBO2,78,18,73,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - DEFPUSHBUTTON "Change Player Options",IDC_PLAYEROPTIONS,18,36,81,14,BS_CENTER + PUSHBUTTON "Change Player Options",IDC_PLAYEROPTIONS,18,36,81,14,BS_CENTER CONTROL "Channel mode (one file per channel)",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,54,168,8 CONTROL "Normalize Output",IDC_CHECK5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,66,73,10 CONTROL "High quality resampling",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,102,66,84,10 Modified: trunk/OpenMPT/mptrack/view_com.cpp =================================================================== --- trunk/OpenMPT/mptrack/view_com.cpp 2009-12-08 19:42:46 UTC (rev 439) +++ trunk/OpenMPT/mptrack/view_com.cpp 2009-12-11 23:39:57 UTC (rev 440) @@ -180,7 +180,10 @@ m_ToolBar.UpdateStyle(); lHint &= ~HINT_MPTOPTIONS; } - lHint &= ~(HINT_SAMPLEDATA|HINT_PATTERNDATA|HINT_ENVELOPE); + lHint &= (HINT_MODTYPE + |HINT_SMPNAMES|HINT_SAMPLEINFO + |HINT_INSNAMES|HINT_INSTRUMENT + /*|HINT_PATNAMES|HINT_PATTERNROW*/); // pattern stuff currently unused if (!lHint) return; m_ItemList.SetRedraw(FALSE); // Add sample headers Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-12-08 19:42:46 UTC (rev 439) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-12-11 23:39:57 UTC (rev 440) @@ -3122,13 +3122,13 @@ } //end rewbs.volOffset: -void CSoundFile::RetrigNote(UINT nChn, UINT param, UINT offset) //rewbs.VolOffset: added offset param. -//------------------------------------------------------------- +void CSoundFile::RetrigNote(UINT nChn, int param, UINT offset) //rewbs.VolOffset: added offset param. +//------------------------------------------------------------ { // Retrig: bit 8 is set if it's the new XM retrig MODCHANNEL *pChn = &Chn[nChn]; - UINT nRetrigSpeed = param & 0x0F; - UINT nRetrigCount = pChn->nRetrigCount; + int nRetrigSpeed = param & 0x0F; + int nRetrigCount = pChn->nRetrigCount; bool bDoRetrig = false; if(IsCompatibleMode(TRK_IMPULSETRACKER)) @@ -3144,8 +3144,26 @@ bDoRetrig = true; } } - else + else if(IsCompatibleMode(TRK_FASTTRACKER2) && (param & 0x100)) { + // buggy-like-hell FT2 Rxy retrig! + + if(m_dwSongFlags & SONG_FIRSTTICK) + { + // FT2 bug: if a retrig (Rxy) occours together with a volume command, the first retrig interval is increased by one tick + if(pChn->nRowVolCmd == VOLCMD_VOLUME) nRetrigCount = -1; + if(pChn->nRowNote != NOTE_NONE && pChn->nRowNote <= GetModSpecifications().noteMax) nRetrigCount++; + } + if (nRetrigCount >= nRetrigSpeed) + { + if (!(m_dwSongFlags & SONG_FIRSTTICK) || (pChn->nRowNote == NOTE_NONE)) + { + bDoRetrig = true; + nRetrigCount = 0; + } + } + } else + { if (m_nType & (MOD_TYPE_S3M|MOD_TYPE_IT|MOD_TYPE_MPT)) { if (!nRetrigSpeed) nRetrigSpeed = 1; @@ -3153,9 +3171,10 @@ nRetrigCount++; } else { - UINT realspeed = nRetrigSpeed; + int realspeed = nRetrigSpeed; + // FT2 bug: if a retrig (Rxy) occours together with a volume command, the first retrig interval is increased by one tick if ((param & 0x100) && (pChn->nRowVolCmd == VOLCMD_VOLUME) && (pChn->nRowParam & 0xF0)) realspeed++; - if ((m_nTickCount) || (param & 0x100)) + if (!(m_dwSongFlags & SONG_FIRSTTICK) || (param & 0x100)) { if (!realspeed) realspeed = 1; if ((!(param & 0x100)) && (m_nMusicSpeed) && (!(m_nTickCount % realspeed))) bDoRetrig = true; @@ -3213,6 +3232,10 @@ SampleOffset(nChn, offset, false); } } + + // buggy-like-hell FT2 Rxy retrig! + if(IsCompatibleMode(TRK_FASTTRACKER2) && (param & 0x100)) nRetrigCount++; + if(!IsCompatibleMode(TRK_IMPULSETRACKER)) pChn->nRetrigCount = (BYTE)nRetrigCount; } Modified: trunk/OpenMPT/soundlib/Sndfile.h =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.h 2009-12-08 19:42:46 UTC (rev 439) +++ trunk/OpenMPT/soundlib/Sndfile.h 2009-12-11 23:39:57 UTC (rev 440) @@ -220,7 +220,7 @@ BYTE nOldCmdEx, nOldVolParam, nOldTempo; BYTE nOldOffset, nOldHiOffset; BYTE nCutOff, nResonance; - BYTE nRetrigCount, nRetrigParam; + int nRetrigCount, nRetrigParam; BYTE nTremorCount, nTremorParam; BYTE nPatternLoop, nPatternLoopCount; BYTE nRowNote, nRowInstr; @@ -846,7 +846,7 @@ void FineVolumeDown(MODCHANNEL *pChn, UINT param); void Tremolo(MODCHANNEL *pChn, UINT param); void Panbrello(MODCHANNEL *pChn, UINT param); - void RetrigNote(UINT nChn, UINT param, UINT offset=0); //rewbs.volOffset: added last param + void RetrigNote(UINT nChn, int param, UINT offset=0); //rewbs.volOffset: added last param void SampleOffset(UINT nChn, UINT param, bool bPorta); //rewbs.volOffset: moved offset code to own method void NoteCut(UINT nChn, UINT nTick); int PatternLoop(MODCHANNEL *, UINT param); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |