From e65f19718ad6282d6ce226b58f65a5365d178e72 Mon Sep 17 00:00:00 2001 From: Eknous-P Date: Sat, 23 Mar 2024 23:24:59 +0400 Subject: [PATCH] order the text --- src/gui/guiConst.cpp | 3 +++ src/gui/guiConst.h | 3 ++- src/gui/sysMiscInfo.cpp | 6 ++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gui/guiConst.cpp b/src/gui/guiConst.cpp index a5afdef70..87e36bbb0 100644 --- a/src/gui/guiConst.cpp +++ b/src/gui/guiConst.cpp @@ -251,6 +251,9 @@ const char* chanNames[]={ "Channels" // in case this makes l10n easier }; +// because someone will complain about the ordering +unsigned char chanNamesHierarchy[]={0,5,1,2,3,6,9,10,8,4,7,11,12}; + const FurnaceGUIColors fxColors[256]={ GUI_COLOR_PATTERN_EFFECT_MISC, // 00 GUI_COLOR_PATTERN_EFFECT_PITCH, // 01 diff --git a/src/gui/guiConst.h b/src/gui/guiConst.h index c6f1e7d4a..9372fa01f 100644 --- a/src/gui/guiConst.h +++ b/src/gui/guiConst.h @@ -59,4 +59,5 @@ extern const int altValues[24]; extern const int vgmVersions[7]; extern const FurnaceGUIColors fxColors[256]; extern const char* fxColorsNames[10]; -extern const char* chanNames[]; \ No newline at end of file +extern const char* chanNames[]; +extern unsigned char chanNamesHierarchy[]; diff --git a/src/gui/sysMiscInfo.cpp b/src/gui/sysMiscInfo.cpp index b1f8d177d..e0481479e 100644 --- a/src/gui/sysMiscInfo.cpp +++ b/src/gui/sysMiscInfo.cpp @@ -312,6 +312,7 @@ void FurnaceGUI::drawSystemChannelInfoText(const DivSysDef* whichDef) { case DIV_INS_BEEPER: case DIV_INS_TED: case DIV_INS_VIC: + case DIV_INS_T6W28: if (whichDef->id==0xfd) { // dummy chanCount[11]++; break; @@ -320,7 +321,7 @@ void FurnaceGUI::drawSystemChannelInfoText(const DivSysDef* whichDef) { chanCount[1]++; break; } - if (whichDef->chanTypes[i]==DIV_CH_NOISE) { // sn noise + if (whichDef->chanTypes[i]==DIV_CH_NOISE) { // sn/t6w noise chanCount[2]++; } else { // DIV_CH_PULSE, any sqr chan chanCount[5]++; @@ -395,7 +396,8 @@ void FurnaceGUI::drawSystemChannelInfoText(const DivSysDef* whichDef) { } } - for (int i=0; i<12; i++) { + for (int j=0; j<12; j++) { + unsigned char i=chanNamesHierarchy[j]; if (chanCount[i]==0) continue; if (info.length()!=0) { info+=", ";