|
From: <sag...@us...> - 2010-02-20 20:34:46
|
Revision: 502
http://modplug.svn.sourceforge.net/modplug/?rev=502&view=rev
Author: saga-games
Date: 2010-02-20 20:34:40 +0000 (Sat, 20 Feb 2010)
Log Message:
-----------
[Imp] Pattern Editor: The status bar shows plugin and parameter names for PC notes now as well.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Draw_pat.cpp
Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Draw_pat.cpp 2010-02-20 19:20:37 UTC (rev 501)
+++ trunk/OpenMPT/mptrack/Draw_pat.cpp 2010-02-20 20:34:40 UTC (rev 502)
@@ -1463,22 +1463,29 @@
{
MODCOMMAND *m = &pSndFile->Patterns[m_nPattern][m_nRow*pSndFile->m_nChannels+nChn];
- // Ignore update if using PC or PCs notes because instrument, volcol and effect values
- // have different meaning.
- if((m->note != NOTE_PC && m->note != NOTE_PCS) || GetColTypeFromCursor(m_dwCursor) == 0)
+ switch (GetColTypeFromCursor(m_dwCursor))
{
- switch (GetColTypeFromCursor(m_dwCursor))
+ case 0:
+ // display note
+ if(m->note >= NOTE_MIN_SPECIAL)
+ strcpy(s, szSpecialNoteShortDesc[m->note - NOTE_MIN_SPECIAL]);
+ break;
+ case 1:
+ // display instrument
+ if (m->instr)
{
- case 0:
- // display note
- if(m->note >= NOTE_MIN_SPECIAL)
- strcpy(s, szSpecialNoteShortDesc[m->note - NOTE_MIN_SPECIAL]);
- break;
- case 1:
- // display instrument
- if (m->instr)
+ CHAR sztmp[128] = "";
+ if(m->note == NOTE_PC || m->note == NOTE_PCS)
{
- CHAR sztmp[128] = "";
+ // display plugin name.
+ if(m->instr <= MAX_MIXPLUGINS)
+ {
+ strncpy(sztmp, pSndFile->m_MixPlugins[m->instr - 1].GetName(), sizeof(sztmp));
+ SetNullTerminator(sztmp);
+ }
+ } else
+ {
+ // "normal" instrument
if (pSndFile->m_nInstruments)
{
if ((m->instr <= pSndFile->m_nInstruments) && (pSndFile->Instruments[m->instr]))
@@ -1509,19 +1516,37 @@
sztmp[32] = 0;
}
}
- if (sztmp[0]) wsprintf(s, "%d: %s", m->instr, sztmp);
+
}
- break;
- case 2:
+ if (sztmp[0]) wsprintf(s, "%d: %s", m->instr, sztmp);
+ }
+ break;
+ case 2:
// display volume command
+ if(m->note == NOTE_PC || m->note == NOTE_PCS)
+ {
+ // display plugin param name.
+ if(m->instr > 0 && m->instr <= MAX_MIXPLUGINS)
+ {
+ CHAR sztmp[128] = "";
+ strncpy(sztmp, pSndFile->m_MixPlugins[m->instr - 1].GetParamName(m->GetValueVolCol()), sizeof(sztmp));
+ SetNullTerminator(sztmp);
+ if (sztmp[0]) wsprintf(s, "%d: %s", m->GetValueVolCol(), sztmp);
+ }
+ } else
+ {
+ // "normal" volume command
if (!pModDoc->GetVolCmdInfo(pModDoc->GetIndexFromVolCmd(m->volcmd), s)) s[0] = 0;
- break;
- case 3:
- case 4:
+ }
+ break;
+ case 3:
+ case 4:
// display effect command
+ if(m->note != NOTE_PC && m->note != NOTE_PCS)
+ {
if (!pModDoc->GetEffectName(s, m->command, m->param, false, nChn)) s[0] = 0;
- break;
}
+ break;
}
}
pMainFrm->SetInfoText(s);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|