From: <sag...@us...> - 2010-04-20 20:26:58
|
Revision: 574 http://modplug.svn.sourceforge.net/modplug/?rev=574&view=rev Author: saga-games Date: 2010-04-20 20:26:52 +0000 (Tue, 20 Apr 2010) Log Message: ----------- [Fix] Instrument Editor: The panning spin button ranged from 0 to 256, however when saving to .IT, 256 was wrapping over to 0. Panning is now limited from 0 to 255. [Fix] Treeview: If a sequence had no name, its name was not formatted properly. [Imp] Note Properties: Show a nice description for the new :xy effect. [Imp] Mod Conversion: Convert the :xy effect to a simple note delay effect when converting to anything that's not MPTM. [Mod] Updated release notes document. Note: Does not include the new :xy effect yet. [Ref] Using (u)int8/16 types instead of "char" and "short" in the sample saving code now, to prevent possible sign errors with other compilers than MSVC. Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_ins.cpp trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/mptrack/View_tre.cpp trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html trunk/OpenMPT/soundlib/Load_it.cpp trunk/OpenMPT/soundlib/Load_s3m.cpp trunk/OpenMPT/soundlib/Sndfile.cpp trunk/OpenMPT/soundlib/Sndfile.h Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2010-04-20 19:38:59 UTC (rev 573) +++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2010-04-20 20:26:52 UTC (rev 574) @@ -856,7 +856,7 @@ // Global Volume m_SpinGlobalVol.SetRange(0, 64); // Panning - m_SpinPanning.SetRange(0, 256); + m_SpinPanning.SetRange(0, 255); // Midi Program m_SpinMidiPR.SetRange(0, 128); // rewbs.MidiBank Modified: trunk/OpenMPT/mptrack/Moddoc.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp 2010-04-20 19:38:59 UTC (rev 573) +++ trunk/OpenMPT/mptrack/Moddoc.cpp 2010-04-20 20:26:52 UTC (rev 574) @@ -2618,7 +2618,7 @@ if(ontime == 0) ontime = 1; if(offtime == 0) offtime = 1; } - wsprintf(pszName, "ontime %d, offtime %d", ontime, offtime); + wsprintf(s, "ontime %d, offtime %d", ontime, offtime); } else { @@ -2648,6 +2648,10 @@ break; //end rewbs.smoothVST + case CMD_DELAYCUT: + wsprintf(pszName, "Note delay: %d, cut after %d ticks", (param >> 4), (param & 0x0F)); + break; + default: if (gFXInfo[ndx].dwParamMask == 0xF0) { Modified: trunk/OpenMPT/mptrack/View_tre.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_tre.cpp 2010-04-20 19:38:59 UTC (rev 573) +++ trunk/OpenMPT/mptrack/View_tre.cpp 2010-04-20 20:26:52 UTC (rev 574) @@ -761,8 +761,11 @@ { // more than one sequence -> add folder CString sSeqName; - sSeqName.Format("%d: %s", nSeq, (LPCTSTR)pSndFile->Order.GetSequence(nSeq).m_sName); - if(sSeqName.IsEmpty()) sSeqName.Format("Sequence %d", nSeq); + if(pSndFile->Order.GetSequence(nSeq).m_sName.IsEmpty()) + sSeqName.Format("Sequence %d", nSeq); + else + sSeqName.Format("%d: %s", nSeq, (LPCTSTR)pSndFile->Order.GetSequence(nSeq).m_sName); + UINT state = (nSeq == pSndFile->Order.GetCurrentSequenceIndex()) ? TVIS_BOLD : 0; if(pInfo->tiSequences[nSeq] == NULL) Modified: trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html =================================================================== --- trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html 2010-04-20 19:38:59 UTC (rev 573) +++ trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html 2010-04-20 20:26:52 UTC (rev 574) @@ -90,6 +90,9 @@ <li>More <strong>customisable colours</strong>. Now, you can export your favourite colour scheme to a file and share it with your friends!</li> <li>Some <strong>new options</strong>, including the ability not to reset the channels when the module is looping and sample playback indicators in the treeview.</li> <li><strong>Program settings</strong> are now stored in the Application Data folder by default.</li> + <li>More <strong>intelligtent autosave</strong> behaviour, which does not autosave anymore if nothing has changed since the last autosave. + A friendly reminder: The autosave and backup options should always be enabled; You will be very glad about them once OpenMPT <i>really</i> crashes + or you accidentally overwrite a file.</strong> <li>New and <strong>updated keymaps</strong> with many new shortcuts!</li> <li><strong>Redesigned</strong> several dialogs.</li> </ul> @@ -109,6 +112,9 @@ The instrument column (XX) contains the VST number (can be obtained from the VST list or through the context menu). The volume column (YYY) stores the parameter that is going to be automatic, ranging from 0 to 999 (decimal). The effect column (ZZZ) stores the parameter value, also ranging from 0 to 999 (decimal).</li> + <li><strong>Note Fade</strong> is a new note type in IT / MPTM modules, based on an unfinished feature in Impulse Tracker. + As the name suggests, this note fades out the instrument depending on its fadeout value (without releasing any envelopes). + Therefore, it will not work in sample mode.</li> <li>In the <strong>orderlist</strong>, multiple orders can now be selected at once (default multiselect shortcut: Shift). Order selections can be quickly rendered to a wave file using the context menu.</li> <li>New <strong>paste modes</strong>: Overflow paste (which continues the paste in the next pattern if it reaches the bottom of the current pattern), @@ -143,8 +149,9 @@ <li>Enhanced <strong>VST compatibility</strong>.</li> </ul> + <h3>There's more...</h3> <p> - For a detailed description of what has changed, check <a href="history.txt">history.txt</a>. + For a detailed description of what has changed, check <a href="history.txt">history.txt</a>. </p> <h2>Known Issues</h2> @@ -164,8 +171,8 @@ <h2>Contact</h2> <p> - Helpful bug reports, new ideas and brave volunteers to test early development builds or contribute to the code are more than welcome! - You can meet us at the ModPlug Central forums: <a href="http://openmpt.com/forum/">http://openmpt.com/forum/</a>. + Helpful bug reports, new ideas and brave volunteers to test early development builds or contribute to the code are more than welcome! + You can meet us at the ModPlug Central forums: <a href="http://openmpt.com/forum/">http://openmpt.com/forum/</a>. </p> </body> Modified: trunk/OpenMPT/soundlib/Load_it.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_it.cpp 2010-04-20 19:38:59 UTC (rev 573) +++ trunk/OpenMPT/soundlib/Load_it.cpp 2010-04-20 20:26:52 UTC (rev 574) @@ -1494,7 +1494,7 @@ { m[ch].command = cmd; m[ch].param = param; - S3MConvert(&m[ch], TRUE); + S3MConvert(&m[ch], true); lastvalue[ch].command = m[ch].command; lastvalue[ch].param = m[ch].param; } @@ -2211,7 +2211,7 @@ if (vol != 0xFF) b |= 4; if (command) { - S3MSaveConvert(&command, ¶m, TRUE); + S3MSaveConvert(&command, ¶m, true); if (command) b |= 8; } // Packing information Modified: trunk/OpenMPT/soundlib/Load_s3m.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_s3m.cpp 2010-04-20 19:38:59 UTC (rev 573) +++ trunk/OpenMPT/soundlib/Load_s3m.cpp 2010-04-20 20:26:52 UTC (rev 574) @@ -75,7 +75,7 @@ S3I_TYPE_ADMEL = 2, }; -void CSoundFile::S3MConvert(MODCOMMAND *m, BOOL bIT) const +void CSoundFile::S3MConvert(MODCOMMAND *m, bool bIT) const //-------------------------------------------------------- { UINT command = m->command; @@ -119,8 +119,8 @@ } -void CSoundFile::S3MSaveConvert(UINT *pcmd, UINT *pprm, BOOL bIT, BOOL bCompatibilityExport) const -//--------------------------------------------------------------------------------------- +void CSoundFile::S3MSaveConvert(UINT *pcmd, UINT *pprm, bool bIT, bool bCompatibilityExport) const +//------------------------------------------------------------------------------------------------ { UINT command = *pcmd; UINT param = *pprm; @@ -198,13 +198,13 @@ break; // Chars under 0x40 don't save properly, so map : to ] and # to [. case CMD_DELAYCUT: - if(bCompatibilityExport) + if(bCompatibilityExport || !bIT) command = param = 0; else command = ']'; break; case CMD_XPARAM: - if(bCompatibilityExport) + if(bCompatibilityExport || !bIT) command = param = 0; else command = '['; @@ -457,7 +457,7 @@ if(j + nInd + 2 >= dwMemLength) break; m->command = src[j++]; m->param = src[j++]; - if (m->command) S3MConvert(m, FALSE); + if (m->command) S3MConvert(m, false); if(m->command == CMD_MIDI) { if(m->param > 0x0F) Modified: trunk/OpenMPT/soundlib/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2010-04-20 19:38:59 UTC (rev 573) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2010-04-20 20:26:52 UTC (rev 574) @@ -1829,7 +1829,7 @@ case RS_PCM16D: case RS_PCM16S: { - short int *p = (short int *)pSample; + uint16 *p = (uint16 *)pSample; int s_old = 0, s_ofs; len = nLen * 2; bufcount = 0; @@ -1845,11 +1845,11 @@ } if (nFlags == RS_PCM16D) { - *((short *)(&buffer[bufcount])) = (short)(s_new - s_old); + *((uint16 *)(&buffer[bufcount])) = (uint16)(s_new - s_old); s_old = s_new; } else { - *((short *)(&buffer[bufcount])) = (short)(s_new + s_ofs); + *((uint16 *)(&buffer[bufcount])) = (uint16)(s_new + s_ofs); } bufcount += 2; if (bufcount >= sizeof(buffer) - 1) @@ -1870,7 +1870,7 @@ int s_ofs = (nFlags == RS_STPCM8U) ? 0x80 : 0; for (UINT iCh=0; iCh<2; iCh++) { - signed char *p = pSample + iCh; + int8 *p = ((int8 *)pSample) + iCh; int s_old = 0; bufcount = 0; @@ -1880,11 +1880,11 @@ p += 2; if (nFlags == RS_STPCM8D) { - buffer[bufcount++] = (char)(s_new - s_old); + buffer[bufcount++] = (uint8)(s_new - s_old); s_old = s_new; } else { - buffer[bufcount++] = (char)(s_new + s_ofs); + buffer[bufcount++] = (uint8)(s_new + s_ofs); } if (bufcount >= sizeof(buffer)) { @@ -1906,7 +1906,7 @@ int s_ofs = (nFlags == RS_STPCM16U) ? 0x8000 : 0; for (UINT iCh=0; iCh<2; iCh++) { - signed short *p = ((signed short *)pSample) + iCh; + int16 *p = ((int16 *)pSample) + iCh; int s_old = 0; bufcount = 0; @@ -1916,11 +1916,11 @@ p += 2; if (nFlags == RS_STPCM16D) { - *((short *)(&buffer[bufcount])) = (short)(s_new - s_old); + *((uint16 *)(&buffer[bufcount])) = (uint16)(s_new - s_old); s_old = s_new; } else { - *((short *)(&buffer[bufcount])) = (short)(s_new + s_ofs); + *((uint16 *)(&buffer[bufcount])) = (uint16)(s_new + s_ofs); } bufcount += 2; if (bufcount >= sizeof(buffer)) @@ -1948,13 +1948,13 @@ len = nLen; bufcount = 0; { - signed char *p = pSample; + int8 *p = (int8 *)pSample; int sinc = (pSmp->uFlags & CHN_16BIT) ? 2 : 1; int s_old = 0, s_ofs = (nFlags == RS_PCM8U) ? 0x80 : 0; if (pSmp->uFlags & CHN_16BIT) p++; for (UINT j=0; j<len; j++) { - int s_new = (signed char)(*p); + int s_new = (int8)(*p); p += sinc; if (pSmp->uFlags & CHN_STEREO) { @@ -1963,11 +1963,11 @@ } if (nFlags == RS_PCM8D) { - buffer[bufcount++] = (char)(s_new - s_old); + buffer[bufcount++] = (uint8)(s_new - s_old); s_old = s_new; } else { - buffer[bufcount++] = (char)(s_new + s_ofs); + buffer[bufcount++] = (uint8)(s_new + s_ofs); } if (bufcount >= sizeof(buffer)) { @@ -3324,8 +3324,8 @@ } } // End if(m->command == CMD_PANNING8) - ///////////////////////////////////////////////////// - // Convert param control, extended envelope control + /////////////////////////////////////////////////////////////////////////////////////// + // MPTM to anything: Convert param control, extended envelope control, note delay+cut if(oldTypeIsMPT) { if(m->IsPcNote()) @@ -3342,6 +3342,12 @@ { m->param = 0x7C; } + + if(m->command == CMD_DELAYCUT) + { + m->command = CMD_S3MCMDEX; // when converting to MOD/XM, this will be converted to CMD_MODCMDEX later + m->param = 0xD0 | (m->param >> 4); // preserve delay nibble. + } } // End if(oldTypeIsMPT) ///////////////////////////////////////// @@ -3810,16 +3816,16 @@ case CMD_PANNINGSLIDE: return 112; case CMD_SMOOTHMIDI: return 104; case CMD_MIDI: return 96; - case CMD_MODCMDEX: return 88; - case CMD_S3MCMDEX: return 80; - case CMD_PANBRELLO: return 72; - case CMD_XFINEPORTAUPDOWN: return 64; - case CMD_VIBRATO: return 56; - case CMD_FINEVIBRATO: return 48; - case CMD_TREMOLO: return 40; - case CMD_KEYOFF: return 32; - case CMD_SETENVPOSITION: return 24; - case CMD_DELAYCUT: return 16; + case CMD_DELAYCUT: return 88; + case CMD_MODCMDEX: return 80; + case CMD_S3MCMDEX: return 72; + case CMD_PANBRELLO: return 64; + case CMD_XFINEPORTAUPDOWN: return 56; + case CMD_VIBRATO: return 48; + case CMD_FINEVIBRATO: return 40; + case CMD_TREMOLO: return 32; + case CMD_KEYOFF: return 24; + case CMD_SETENVPOSITION: return 16; case CMD_XPARAM: return 8; case CMD_NONE: default: return 0; Modified: trunk/OpenMPT/soundlib/Sndfile.h =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.h 2010-04-20 19:38:59 UTC (rev 573) +++ trunk/OpenMPT/soundlib/Sndfile.h 2010-04-20 20:26:52 UTC (rev 574) @@ -746,8 +746,8 @@ MODTYPE GetBestSaveFormat() const; MODTYPE GetSaveFormats() const; void ConvertModCommand(MODCOMMAND *) const; - void S3MConvert(MODCOMMAND *m, BOOL bIT) const; - void S3MSaveConvert(UINT *pcmd, UINT *pprm, BOOL bIT, BOOL bCompatibilityExport = false) const; + void S3MConvert(MODCOMMAND *m, bool bIT) const; + void S3MSaveConvert(UINT *pcmd, UINT *pprm, bool bIT, bool bCompatibilityExport = false) const; WORD ModSaveCommand(const MODCOMMAND *m, const bool bXM, const bool bCompatibilityExport = false) const; static void ConvertCommand(MODCOMMAND *m, MODTYPE nOldType, MODTYPE nNewType); // Convert a complete MODCOMMAND item from one format to another This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |