MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / OnPaint

Method OnPaint

Source/ModSequenceEditor.cpp:78–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void CModSequenceEditor::OnPaint()
79{
80 CPaintDC dc(this);
81
82 // Draw the sample
83 dc.FillSolidRect(0, 0, 32 * (SIZE_X + 2) + 4 /*388*/, 61, 0xA0A0A0);
84
85 for (int i = 0; i < 32; ++i) {
86 int x = 2 + i * (SIZE_X + 2);
87
88 int mod = m_pInstrument->GetModulation(i);
89
90 dc.FillSolidRect(x, 2 + 0, SIZE_X, 5, mod == 3 ? 0x00FF00 : 0xD0D0D0); // +4
91 dc.FillSolidRect(x, 2 + 7, SIZE_X, 5, mod == 2 ? 0x00FF00 : 0xD0D0D0); // +2
92 dc.FillSolidRect(x, 2 + 14, SIZE_X, 5, mod == 1 ? 0x00FF00 : 0xD0D0D0); // +1
93 dc.FillSolidRect(x, 2 + 21, SIZE_X, 5, mod == 0 ? 0x00FFFF : 0xD0D0D0); // 0
94 dc.FillSolidRect(x, 2 + 28, SIZE_X, 5, mod == 7 ? 0x00FF00 : 0xD0D0D0); // -1
95 dc.FillSolidRect(x, 2 + 35, SIZE_X, 5, mod == 6 ? 0x00FF00 : 0xD0D0D0); // -2
96 dc.FillSolidRect(x, 2 + 42, SIZE_X, 5, mod == 5 ? 0x00FF00 : 0xD0D0D0); // -4
97 dc.FillSolidRect(x, 2 + 52, SIZE_X, 5, mod == 4 ? 0xFF0000 : 0xD0D0D0); // reset
98 }
99
100}
101
102void CModSequenceEditor::SetInstrument(std::shared_ptr<CInstrumentFDS> pInst)
103{

Callers

nothing calls this directly

Calls 1

GetModulationMethod · 0.80

Tested by

no test coverage detected