Change volume value to be hex, fix volume offset by +1

This commit is contained in:
Wirlaburla 2023-07-16 16:04:37 -05:00
parent c34e862890
commit 15b34a4847

View File

@ -301,24 +301,8 @@ void renderRows(WINDOW* win, xmp_module_info *mi, xmp_frame_info *fi) {
if (detail >= 3) { if (detail >= 3) {
int vol; int vol;
if ((vol = event.vol) != 0) { if ((vol = event.vol) != 0) {
// I made this wall...
// Then I realized libxmp does not give this wall purpose...
/*
char v = '?';
if (vol <= 0x50) { v = 'v'; vol--; }
else if (vol >= 0x60 && vol <= 0x6F) { v = 'd'; vol - 0x50; }
else if (vol >= 0x70 && vol <= 0x7F) { v = 'c'; vol - 0x60; }
else if (vol >= 0x80 && vol <= 0x8F) { v = 'b'; vol - 0x70; }
else if (vol >= 0x90 && vol <= 0x9F) { v = 'a'; vol - 0x80; }
else if (vol >= 0xA0 && vol <= 0xAF) { v = 'u'; vol - 0x90; }
else if (vol >= 0xB0 && vol <= 0xBF) { v = 'h'; vol - 0xA0; }
else if (vol >= 0xC0 && vol <= 0xCF) { v = 'p'; vol - 0xB0; }
else if (vol >= 0xD0 && vol <= 0xDF) { v = 'l'; vol - 0xC0; }
else if (vol >= 0xE0 && vol <= 0xEF) { v = 'r'; vol - 0xD0; }
else if (vol >= 0xF0 && vol <= 0xFF) { v = 'g'; vol - 0xE0; }
*/
char v = 'v'; char v = 'v';
wprintw(win, " %c%02i", v, vol); wprintw(win, " %c%02X", v, vol-1);
} else { } else {
wprintw(win, " ..."); wprintw(win, " ...");
} }