From: <sag...@us...> - 2009-09-21 13:05:20
|
Revision: 373 http://modplug.svn.sourceforge.net/modplug/?rev=373&view=rev Author: saga-games Date: 2009-09-21 13:05:09 +0000 (Mon, 21 Sep 2009) Log Message: ----------- [Imp] Tuning dialog: Using the default tuning path as default path for Import/Export dialog [Imp] IT Loader: Removed unnecessary / wrong pre-amp limits Modified Paths: -------------- trunk/OpenMPT/mptrack/Mptrack.h trunk/OpenMPT/mptrack/TuningDialog.cpp trunk/OpenMPT/soundlib/Load_it.cpp trunk/OpenMPT/soundlib/Sndfile.cpp Modified: trunk/OpenMPT/mptrack/Mptrack.h =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.h 2009-09-20 13:44:24 UTC (rev 372) +++ trunk/OpenMPT/mptrack/Mptrack.h 2009-09-21 13:05:09 UTC (rev 373) @@ -187,6 +187,7 @@ BOOL IsDebug() const { return m_bDebugMode; } LPCSTR GetConfigFileName() const { return m_szConfigFileName; } LPCSTR GetPluginCacheFileName() const { return m_szPluginCacheFileName; } + LPCSTR GetTuningsPath() const { return m_szTuningsDirectory; } LPCSTR GetConfigPath() const { return m_szConfigDirectory; } void SetupPaths(); Modified: trunk/OpenMPT/mptrack/TuningDialog.cpp =================================================================== --- trunk/OpenMPT/mptrack/TuningDialog.cpp 2009-09-20 13:44:24 UTC (rev 372) +++ trunk/OpenMPT/mptrack/TuningDialog.cpp 2009-09-21 13:05:09 UTC (rev 373) @@ -629,6 +629,7 @@ NULL, OFN_HIDEREADONLY| OFN_ENABLESIZING | OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST | OFN_NOREADONLYRETURN, filter.c_str(), this); + dlg.m_ofn.lpstrInitialDir = theApp.GetTuningsPath(); bool failure = true; @@ -668,6 +669,7 @@ OFN_HIDEREADONLY | OFN_ENABLESIZING | OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST, filter.c_str(), this); + dlg.m_ofn.lpstrInitialDir = theApp.GetTuningsPath(); if (dlg.DoModal() != IDOK) return; Modified: trunk/OpenMPT/soundlib/Load_it.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_it.cpp 2009-09-20 13:44:24 UTC (rev 372) +++ trunk/OpenMPT/soundlib/Load_it.cpp 2009-09-21 13:05:09 UTC (rev 373) @@ -1871,12 +1871,10 @@ if (m_dwSongFlags & SONG_ITCOMPATMODE) header.flags |= 0x20; if (m_dwSongFlags & SONG_EXFILTERRANGE) header.flags |= 0x1000; header.globalvol = m_nDefaultGlobalVolume >> 1; - header.mv = m_nSamplePreAmp; - if (header.mv < 0x20) header.mv = 0x20; - if (header.mv > 0x7F) header.mv = 0x7F; + header.mv = CLAMP(m_nSamplePreAmp, 0, 128); header.speed = m_nDefaultSpeed; - header.tempo = min(m_nDefaultTempo,255); //Limit this one to 255, we save the real one as an extension below. - header.sep = 128; + header.tempo = min(m_nDefaultTempo, 255); //Limit this one to 255, we save the real one as an extension below. + header.sep = 128; // pan separation dwHdrPos = sizeof(header) + header.ordnum; // Channel Pan and Volume memset(header.chnpan, 0xFF, 64); @@ -2521,11 +2519,9 @@ if (m_dwSongFlags & SONG_EXFILTERRANGE) header.flags |= 0x1000; header.globalvol = m_nDefaultGlobalVolume >> 1; header.mv = CLAMP(m_nSamplePreAmp, 0, 128); - if (header.mv < 0x20) header.mv = 0x20; - if (header.mv > 0x7F) header.mv = 0x7F; header.speed = m_nDefaultSpeed; - header.tempo = min(m_nDefaultTempo,255); //Limit this one to 255, we save the real one as an extension below. - header.sep = 128; + header.tempo = min(m_nDefaultTempo, 255); //Limit this one to 255, we save the real one as an extension below. + header.sep = 128; // pan separation dwHdrPos = sizeof(header) + header.ordnum; // Channel Pan and Volume memset(header.chnpan, 0xFF, 64); Modified: trunk/OpenMPT/soundlib/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2009-09-20 13:44:24 UTC (rev 372) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2009-09-21 13:05:09 UTC (rev 373) @@ -2896,7 +2896,7 @@ } // Load local tunings. - s_pTuningsSharedLocal->SetSavefilePath(std::string(std::string(theApp.GetConfigPath()) + "tunings\\local_tunings" + CTuningCollection::s_FileExtension.c_str())); + s_pTuningsSharedLocal->SetSavefilePath(std::string(std::string(theApp.GetTuningsPath()) + "local_tunings" + CTuningCollection::s_FileExtension.c_str())); s_pTuningsSharedLocal->Deserialize(); // Enabling adding/removing of tunings for standard collection This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |