From: <sag...@us...> - 2010-07-16 21:43:21
|
Revision: 649 http://modplug.svn.sourceforge.net/modplug/?rev=649&view=rev Author: saga-games Date: 2010-07-16 21:43:14 +0000 (Fri, 16 Jul 2010) Log Message: ----------- [Ref] Some refactoring and additional documentation. Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_com.cpp trunk/OpenMPT/mptrack/MPTHacks.cpp trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Mainfrm.h Modified: trunk/OpenMPT/mptrack/Ctrl_com.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_com.cpp 2010-07-16 19:20:22 UTC (rev 648) +++ trunk/OpenMPT/mptrack/Ctrl_com.cpp 2010-07-16 21:43:14 UTC (rev 649) @@ -152,7 +152,7 @@ CHAR s[256], *oldcomments = NULL; if ((m_nLockCount) || (!m_pSndFile) - || (m_pSndFile->m_nType & (MOD_TYPE_MOD|MOD_TYPE_S3M))) return; + || !m_pSndFile->GetModSpecifications().hasComments) return; if ((!m_bInitialized) || (!m_EditComments.m_hWnd) || (!m_EditComments.GetModify())) return; if (m_pSndFile->m_lpszSongComments) { @@ -164,7 +164,7 @@ UINT n = m_EditComments.GetLineCount(); - LPSTR p = new char[n*LINE_LENGTH+1]; + LPSTR p = new char[n * LINE_LENGTH + 1]; p[0] = 0; if (!p) return; for (UINT i=0; i<n; i++) @@ -189,9 +189,9 @@ delete[] p; if (oldcomments) { - BOOL bSame = FALSE; + bool bSame = false; if ((m_pSndFile->m_lpszSongComments) - && (!strcmp(m_pSndFile->m_lpszSongComments, oldcomments))) bSame = TRUE; + && (!strcmp(m_pSndFile->m_lpszSongComments, oldcomments))) bSame = true; delete[] oldcomments; if (bSame) return; } else Modified: trunk/OpenMPT/mptrack/MPTHacks.cpp =================================================================== --- trunk/OpenMPT/mptrack/MPTHacks.cpp 2010-07-16 19:20:22 UTC (rev 648) +++ trunk/OpenMPT/mptrack/MPTHacks.cpp 2010-07-16 21:43:14 UTC (rev 649) @@ -90,7 +90,7 @@ { const CModSpecifications *originalSpecs = &m_SndFile.GetModSpecifications(); // retrieve original (not hacked) specs. - switch(m_SndFile.GetType()) + switch(m_SndFile.GetBestSaveFormat()) { case MOD_TYPE_MOD: originalSpecs = &ModSpecs::mod; Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2010-07-16 19:20:22 UTC (rev 648) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2010-07-16 21:43:14 UTC (rev 649) @@ -874,6 +874,7 @@ DeleteGDIObject(penEnvelope); DeleteGDIObject(penEnvelopeHighlight); DeleteGDIObject(m_hFixedFont); + DeleteGDIObject(m_hLargeFixedFont); DeleteGDIObject(penScratch); DeleteGDIObject(penGray00); DeleteGDIObject(penGray33); @@ -3082,8 +3083,6 @@ // retrieve / set default directory from given string and store it our setup variables -// TODO: Let some magic happen to convert between absolute and relative paths. m_csExecutableDirectoryPath might be helpful - void CMainFrame::SetDirectory(const LPCTSTR szFilenameFrom, Directory dir, TCHAR (&directories)[NUM_DIRS][_MAX_PATH], bool bStripFilename) //---------------------------------------------------------------------------------------------------------------------------------------- { Modified: trunk/OpenMPT/mptrack/Mainfrm.h =================================================================== --- trunk/OpenMPT/mptrack/Mainfrm.h 2010-07-16 19:20:22 UTC (rev 648) +++ trunk/OpenMPT/mptrack/Mainfrm.h 2010-07-16 21:43:14 UTC (rev 649) @@ -197,15 +197,15 @@ // Midi Setup -#define MIDISETUP_RECORDVELOCITY 0x01 -#define MIDISETUP_TRANSPOSEKEYBOARD 0x02 -#define MIDISETUP_MIDITOPLUG 0x04 -#define MIDISETUP_MIDIVOL_TO_NOTEVOL 0x08 -#define MIDISETUP_RECORDNOTEOFF 0x10 -#define MIDISETUP_RESPONDTOPLAYCONTROLMSGS 0x20 -#define MIDISETUP_AMPLIFYVELOCITY 0x40 -#define MIDISETUP_MIDIMACROCONTROL 0x80 -#define MIDISETUP_PLAYPATTERNONMIDIIN 0x100 +#define MIDISETUP_RECORDVELOCITY 0x01 // Record MIDI velocity +#define MIDISETUP_TRANSPOSEKEYBOARD 0x02 // Apply transpose value to MIDI Notes +#define MIDISETUP_MIDITOPLUG 0x04 // Pass MIDI messages to plugins +#define MIDISETUP_MIDIVOL_TO_NOTEVOL 0x08 // Combine MIDI volume to note velocity +#define MIDISETUP_RECORDNOTEOFF 0x10 // Record MIDI Note Off to pattern +#define MIDISETUP_RESPONDTOPLAYCONTROLMSGS 0x20 // Respond to Restart/Continue/Stop MIDI commands +#define MIDISETUP_AMPLIFYVELOCITY 0x40 // Amplify velocity of recorded notes +#define MIDISETUP_MIDIMACROCONTROL 0x80 // Record MIDI controller changes a MIDI macro changes in pattern +#define MIDISETUP_PLAYPATTERNONMIDIIN 0x100 // Play pattern if MIDI Note is received and playback is paused This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |