| 122 | } |
| 123 | |
| 124 | void CModSequenceEditor::EditSequence(CPoint point) |
| 125 | { |
| 126 | const int VALUES[] = {3, 2, 1, 0, 7, 6, 5, 4}; |
| 127 | |
| 128 | int index = std::clamp((point.x - 2) / (SIZE_X + 2), 0L, 31L); // // // |
| 129 | int value = VALUES[std::clamp((point.y - 3) / 7, 0L, 7L)]; |
| 130 | |
| 131 | CDC *pDC = GetDC(); |
| 132 | |
| 133 | if (pDC != NULL) { |
| 134 | int s = m_pInstrument->GetModulation(index); |
| 135 | FillItem(pDC, index, s, true); |
| 136 | if (m_pInstrument->GetModulation(index) != value) { // // // |
| 137 | m_pInstrument->SetModulation(index, value); |
| 138 | CFamiTrackerDoc::GetDoc()->ModifyIrreversible(); |
| 139 | } |
| 140 | FillItem(pDC, index, value, false); |
| 141 | ReleaseDC(pDC); |
| 142 | } |
| 143 | |
| 144 | // Notify parent that the sequence has changed |
| 145 | GetParent()->PostMessageW(WM_USER + 1); |
| 146 | } |
nothing calls this directly
no test coverage detected