Change volume value to be hex, fix volume offset by +1
This commit is contained in:
parent
c34e862890
commit
15b34a4847
20
src/main.cpp
20
src/main.cpp
|
@ -301,24 +301,8 @@ void renderRows(WINDOW* win, xmp_module_info *mi, xmp_frame_info *fi) {
|
|||
if (detail >= 3) {
|
||||
int vol;
|
||||
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';
|
||||
wprintw(win, " %c%02i", v, vol);
|
||||
wprintw(win, " %c%02X", v, vol-1);
|
||||
} else {
|
||||
wprintw(win, " ...");
|
||||
}
|
||||
|
@ -423,4 +407,4 @@ char getEffectType(int i) {
|
|||
case 180: return 'J';
|
||||
default: return 0x00;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user