From e454fdb3d5fcf7dcd1c426670564846e64c31f53 Mon Sep 17 00:00:00 2001 From: cam900 Date: Wed, 14 Dec 2022 14:16:01 +0900 Subject: [PATCH] Reduce debug duplication --- src/gui/debug.cpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/gui/debug.cpp b/src/gui/debug.cpp index 89596531..d02d7ab7 100644 --- a/src/gui/debug.cpp +++ b/src/gui/debug.cpp @@ -863,15 +863,10 @@ void putDispatchChan(void* data, int chanNum, int type) { case DIV_SYSTEM_ES5506: { DivPlatformES5506::Channel* ch=(DivPlatformES5506::Channel*)data; ImGui::Text("> ES5506"); - ImGui::Text("* freq: %.5x",ch->freq); - ImGui::Text(" - base: %d",ch->baseFreq); - ImGui::Text(" - next: %d",ch->nextFreq); - ImGui::Text(" - pitch: %d",ch->pitch); - ImGui::Text(" - pitch2: %d",ch->pitch2); - ImGui::Text("* note: %d",ch->note); - ImGui::Text(" - next: %d",ch->nextNote); - ImGui::Text(" - curr: %d",ch->currNote); - ImGui::Text("- ins: %d",ch->ins); + COMMON_CHAN_DEBUG; + ImGui::Text("- nextFreq: %d",ch->nextFreq); + ImGui::Text("- nextNote: %d",ch->nextNote); + ImGui::Text("- currNote: %d",ch->currNote); ImGui::Text("- wave: %d",ch->wave); ImGui::Text("- VolMacroMax: %d",ch->volMacroMax); ImGui::Text("- PanMacroMax: %d",ch->panMacroMax); @@ -916,18 +911,14 @@ void putDispatchChan(void* data, int chanNum, int type) { ImGui::Text(" - RVRamp: %d",ch->overwrite.envelope.rVRamp); ImGui::Text(" - K1Ramp: %d",ch->overwrite.envelope.k1Ramp); ImGui::Text(" - K2Ramp: %d",ch->overwrite.envelope.k2Ramp); - ImGui::Text("- vol: %.2x",ch->vol); ImGui::Text("- LVol: %.2x",ch->lVol); ImGui::Text("- RVol: %.2x",ch->rVol); - ImGui::Text("- outVol: %.2x",ch->outVol); ImGui::Text("- outLVol: %.2x",ch->outLVol); ImGui::Text("- outRVol: %.2x",ch->outRVol); ImGui::Text("- ResLVol: %.2x",ch->resLVol); ImGui::Text("- ResRVol: %.2x",ch->resRVol); ImGui::Text("- oscOut: %d",ch->oscOut); - ImGui::TextColored(ch->active?colorOn:colorOff,">> Active"); - ImGui::TextColored(ch->insChanged?colorOn:colorOff,">> InsChanged"); - ImGui::TextColored(ch->freqChanged?colorOn:colorOff,">> FreqChanged"); + COMMON_CHAN_DEBUG_BOOL; ImGui::TextColored(ch->volChanged.lVol?colorOn:colorOff,">> LVolChanged"); ImGui::TextColored(ch->volChanged.rVol?colorOn:colorOff,">> RVolChanged"); ImGui::TextColored(ch->filterChanged.mode?colorOn:colorOff,">> FilterModeChanged");