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

Method OnTimer

Source/SampleEditorDlg.cpp:145–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145void CSampleEditorDlg::OnTimer(UINT_PTR nIDEvent)
146{
147 // Update play cursor
148
149 switch (nIDEvent) {
150 case TMR_PLAY_CURSOR: {
151 // Play cursor
152 stDPCMState state = m_pSoundGen->GetDPCMState();
153
154 // Pos is in bytes
155 int Pos = state.SamplePos /*<< 6*/;
156
157 if (m_pSoundGen->PreviewDone()) {
158 KillTimer(0);
159 Pos = -1;
160 }
161
162 m_pSampleEditorView->DrawPlayCursor(Pos);
163 }
164 case TMR_START_CURSOR: {
165 // Start cursor
166 if (m_pSoundGen->PreviewDone()) {
167 static bool bDraw = false;
168 if (!bDraw)
169 m_pSampleEditorView->DrawStartCursor();
170 else
171 m_pSampleEditorView->DrawPlayCursor(-1);
172 bDraw = !bDraw;
173 }
174 }
175 }
176
177 CDialog::OnTimer(nIDEvent);
178}
179
180void CSampleEditorDlg::OnBnClickedDelete()
181{

Callers

nothing calls this directly

Calls 4

GetDPCMStateMethod · 0.80
PreviewDoneMethod · 0.80
DrawPlayCursorMethod · 0.80
DrawStartCursorMethod · 0.80

Tested by

no test coverage detected