void wxGamePanel::UpdateTime() { // 경기 시간 갱신 wxString timeStr(wxT("00:00")); long remainTime = m_periLen - m_elapseTime.Time(); if (remainTime > 0) { timeStr = wxTimeSpan::Milliseconds(remainTime).Format(wxT("%M:%S")); } else { StartBuzzer(); StopTime(); } m_timeCtrl->SetValue(timeStr); // 공격 시간 갱신 wxString shotClockStr(wxT("00")); long remainShotClock = m_shotClock - m_attackTime.Time(); if (remainShotClock > 0) { shotClockStr = wxTimeSpan::Milliseconds(remainShotClock).Format(wxT("%S")); } else { if (m_playing) { StartBuzzer(); // 무한 재귀 호출을 막기 위해서, false를 인자로 전달한다. ResetShotClock(false); } } m_shotClockCtrl->SetValue(shotClockStr); }
PLUGIN_FUNCTION_ARG4(RingLine, unsigned,line, unsigned,nCadence, const unsigned *,pattern, unsigned,frequency) { if (m_hWnd == NULL) return PluginLID_DeviceNotOpen; if (line >= 1) return PluginLID_NoSuchLine; if (nCadence > 0) StartBuzzer(); else StopBuzzer(); }