From: <sag...@us...> - 2014-03-01 00:21:25
|
Revision: 3801 http://sourceforge.net/p/modplug/code/3801 Author: saga-games Date: 2014-03-01 00:21:15 +0000 (Sat, 01 Mar 2014) Log Message: ----------- [Imp] Since the envelope display is no longer limited to 32768 ticks, we can now effectively remove this limit. Modified Paths: -------------- trunk/OpenMPT/mptrack/Modedit.cpp trunk/OpenMPT/mptrack/View_ins.cpp trunk/OpenMPT/soundlib/Snd_defs.h Modified: trunk/OpenMPT/mptrack/Modedit.cpp =================================================================== --- trunk/OpenMPT/mptrack/Modedit.cpp 2014-02-28 23:46:47 UTC (rev 3800) +++ trunk/OpenMPT/mptrack/Modedit.cpp 2014-03-01 00:21:15 UTC (rev 3801) @@ -1040,7 +1040,7 @@ while ((dwPos < dwMemSize) && ((p[dwPos] < '0') || (p[dwPos] > '9'))) dwPos++; if (dwPos >= dwMemSize) break; int n2 = atoi(p+dwPos); - if ((n1 < oldn) || (n1 > ENVELOPE_MAX_LENGTH)) n1 = oldn + 1; + if (n1 < oldn) n1 = oldn + 1; env.Ticks[i] = (WORD)n1; env.Values[i] = (BYTE)n2; oldn = n1; Modified: trunk/OpenMPT/mptrack/View_ins.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_ins.cpp 2014-02-28 23:46:47 UTC (rev 3800) +++ trunk/OpenMPT/mptrack/View_ins.cpp 2014-03-01 00:21:15 UTC (rev 3801) @@ -296,7 +296,7 @@ tickDiff = envelope->Ticks[nPoint]; int mintick = (nPoint) ? envelope->Ticks[nPoint - 1] : 0; int maxtick = envelope->Ticks[nPoint + 1]; - if(nPoint + 1 == (int)envelope->nNodes || moveTail) maxtick = ENVELOPE_MAX_LENGTH; + if(nPoint + 1 == (int)envelope->nNodes || moveTail) maxtick = Util::MaxValueOfType(maxtick); // Can't have multiple points on same tick if(nPoint > 0 && mintick < maxtick - 1) @@ -2492,11 +2492,6 @@ { return false; } - // Limit envelope length - if((envPoint == pEnv->nNodes - 1) && pEnv->Ticks[envPoint] + step > ENVELOPE_MAX_LENGTH) - { - return false; - } return true; } Modified: trunk/OpenMPT/soundlib/Snd_defs.h =================================================================== --- trunk/OpenMPT/soundlib/Snd_defs.h 2014-02-28 23:46:47 UTC (rev 3800) +++ trunk/OpenMPT/soundlib/Snd_defs.h 2014-03-01 00:21:15 UTC (rev 3801) @@ -195,7 +195,6 @@ #define ENVELOPE_MID 32 // Vertical middle line #define ENVELOPE_MAX 64 // Vertical max value of a point #define MAX_ENVPOINTS 240 // Maximum length of each instrument envelope -#define ENVELOPE_MAX_LENGTH 0x3FFF // Max envelope length in ticks. note: this value is only really required because too long envelopes won't be displayed properly in the instrument editor (win32 scrollbar issues) // Flags of 'dF..' datafield in extended instrument properties. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |