From: <rel...@us...> - 2008-08-07 19:27:36
|
Revision: 217 http://modplug.svn.sourceforge.net/modplug/?rev=217&view=rev Author: relabsoluness Date: 2008-08-07 19:27:32 +0000 (Thu, 07 Aug 2008) Log Message: ----------- + Added letter 'b' to drawable letters in pattern view. / Tweaking of custom note printing in pattern view (still far from good). . nSpaceX/Y location in patternfont struct did not point to white location. / #-character used as X parameter indicator is redrawn to be the same as the sharp symbol in notenames. ? Small readability changes to mpt_midi.cpp Modified Paths: -------------- trunk/OpenMPT/mptrack/Draw_pat.cpp trunk/OpenMPT/mptrack/Mpt_midi.cpp trunk/OpenMPT/mptrack/res/view_pat.bmp Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/Draw_pat.cpp 2008-07-25 20:20:15 UTC (rev 216) +++ trunk/OpenMPT/mptrack/Draw_pat.cpp 2008-08-07 19:27:32 UTC (rev 217) @@ -55,7 +55,7 @@ { 92,13, // Column Width & Height 0,0, // Clear location - 32,207, // Space Location + 130,8, // Space Location. {20, 20, 24, 9, 15}, // Element Widths 20,13, // Numbers 0-F (hex) 30,13, // Numbers 10-19 (dec) @@ -78,7 +78,7 @@ { 70,11, // Column Width & Height 92,0, // Clear location - 32,207, // Space Location + 130,8, // Space Location. {16, 14, 18, 7, 11}, // Element Widths 108,13, // Numbers 0-F (hex) 120,13, // Numbers 10-19 (dec) @@ -294,13 +294,18 @@ break; //end rewbs.velocity case ' ': - srcx = pfnt->nClrX; - srcy = pfnt->nClrY; + srcx = pfnt->nSpaceX; + srcy = pfnt->nSpaceY; break; case '-': - srcx = pfnt->nNoteX + pfnt->nNoteWidth/2; - srcy = pfnt->nNoteY + COLUMN_HEIGHT; + srcx = pfnt->nAlphaAM_X; + srcy = pfnt->nAlphaAM_Y + 15 * COLUMN_HEIGHT; break; + case 'b': + srcx = pfnt->nAlphaAM_X; + srcy = pfnt->nAlphaAM_Y + 14 * COLUMN_HEIGHT; + break; + } m_Dib.TextBlt(x, y, sizex, COLUMN_HEIGHT, srcx+ofsx, srcy); } @@ -326,12 +331,24 @@ } else { if(pTuning) - { + { // Drawing custom note names string noteStr = pTuning->GetNoteName(note-NOTE_MIDDLEC); - noteStr.resize(3, ' '); - DrawLetter(x, y, noteStr[0]); - DrawLetter(x + pfnt->nNoteWidth/2, y, noteStr[1]); - DrawLetter(x + pfnt->nNoteWidth, y, noteStr[2]); + if(noteStr.size() < 3) + noteStr.resize(3, ' '); + + // Hack: Manual tweaking for default/small font displays. + if(pfnt == &gDefaultPatternFont) + { + DrawLetter(x, y, noteStr[0], 7, 0); + DrawLetter(x + 7, y, noteStr[1], 6, 0); + DrawLetter(x + 13, y, noteStr[2], 7, 1); + } + else + { + DrawLetter(x, y, noteStr[0], 5, 0); + DrawLetter(x + 5, y, noteStr[1], 5, 0); + DrawLetter(x + 10, y, noteStr[2], 6, 0); + } } else //Original { Modified: trunk/OpenMPT/mptrack/Mpt_midi.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mpt_midi.cpp 2008-07-25 20:20:15 UTC (rev 216) +++ trunk/OpenMPT/mptrack/Mpt_midi.cpp 2008-08-07 19:27:32 UTC (rev 217) @@ -40,18 +40,18 @@ void ApplyTransposeKeyboardSetting(CMainFrame& rMainFrm, DWORD& dwParam1) //------------------------------------------------------------------------ { - if ((CMainFrame::m_dwMidiSetup & MIDISETUP_TRANSPOSEKEYBOARD) - && ((dwParam1 & 0x0F) != 9)) + if ( (CMainFrame::m_dwMidiSetup & MIDISETUP_TRANSPOSEKEYBOARD) + && (GetFromMIDIMsg_Channel(dwParam1) != 9) ) { int nTranspose = rMainFrm.GetBaseOctave() - 4; if (nTranspose) { - int note = (dwParam1 >> 8) & 0xFF; + int note = GetFromMIDIMsg_DataByte1(dwParam1); if (note < 0x80) { note += nTranspose*12; if (note < 0) note = 0; - if (note > 119) note = 119; + if (note > NOTE_MAX - 1) note = NOTE_MAX - 1; // -> CODE#0011 // -> DESC="bug fix about transpose midi keyboard option" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |