Compare commits

..

No commits in common. "b278e686dd9b4319beb9a908867ae6eaf83da6b8" and "05b44db876bd5be4f43da6bc9bd64edf00243c40" have entirely different histories.

View File

@ -38,7 +38,6 @@ bool loop;
bool ptnChans = true; bool ptnChans = true;
bool dynamicRoll = true; bool dynamicRoll = true;
bool ptnOrder = true; bool ptnOrder = true;
bool showEffects = true;
std::map<int, char> efxtable; std::map<int, char> efxtable;
std::map<int, bool> efxmemtable; std::map<int, bool> efxmemtable;
@ -49,13 +48,12 @@ int main(int argc, char *argv[]) {
printf("\n"); printf("\n");
printf("Help\n"); printf("Help\n");
printf("-h Show this message.\n"); printf("-h Show this message.\n");
printf("-d <num> Start on the specified panel.\n");
printf("-c <num> Force terminal color mode.\n"); printf("-c <num> Force terminal color mode.\n");
printf(" 0 Auto (default)\n"); printf(" 0 Auto (default)\n");
printf(" 1 Monochrome\n"); printf(" 1 Monochrome\n");
printf(" 2 8bit\n"); printf(" 2 8bit\n");
printf(" 3 Full\n"); printf(" 3 Full\n");
printf("-d <num> Start on the specified panel.\n");
printf("-o <num> Toggle player options\n");
printf("-s <num> Stereo Seperation\n"); printf("-s <num> Stereo Seperation\n");
exit(0); exit(0);
} else if (strcmp(argv[a], "-d") == 0) { } else if (strcmp(argv[a], "-d") == 0) {
@ -70,22 +68,6 @@ int main(int argc, char *argv[]) {
} else if (strcmp(argv[a], "-c") == 0) { } else if (strcmp(argv[a], "-c") == 0) {
colorMode = atoi(argv[a+1]); colorMode = atoi(argv[a+1]);
a++; a++;
} else if (strcmp(argv[a], "-o") == 0) {
switch (atoi(argv[a+1])) {
case 1:
ptnChans = !ptnChans;
break;
case 2:
dynamicRoll = !dynamicRoll;
break;
case 3:
ptnOrder = !ptnOrder;
break;
case 4:
showEffects = !showEffects;
break;
}
a++;
} else if (strcmp(argv[a], "-s") == 0) { } else if (strcmp(argv[a], "-s") == 0) {
int newmix = atoi(argv[a+1]); int newmix = atoi(argv[a+1]);
if (newmix > 100 || newmix < 0) if (newmix > 100 || newmix < 0)
@ -349,9 +331,6 @@ int main(int argc, char *argv[]) {
case '3': case '3':
ptnOrder = !ptnOrder; ptnOrder = !ptnOrder;
break; break;
case '4':
showEffects = !showEffects;
break;
} }
} }
break; break;
@ -493,7 +472,7 @@ void displayInfo(xmp_module_info *mi, xmp_frame_info *fi) {
} }
void displayPatterns(xmp_module_info *mi, xmp_frame_info *fi) { void displayPatterns(xmp_module_info *mi, xmp_frame_info *fi) {
int chnsize = showEffects?15:11; int chnsize = 15;
if (ptnOrder) { if (ptnOrder) {
for (int j = 0; j < mi->mod->len; j++) { for (int j = 0; j < mi->mod->len; j++) {
if (mi->mod->xxo[j] == 0xFF) continue; if (mi->mod->xxo[j] == 0xFF) continue;
@ -524,14 +503,12 @@ void displayPatterns(xmp_module_info *mi, xmp_frame_info *fi) {
if (voll >= 16) wattron(dis, vollo); if (voll >= 16) wattron(dis, vollo);
mvwaddch(dis, 0, (cxpos++)-hOffset, ' '); mvwaddch(dis, 0, (cxpos++)-hOffset, ' ');
wattroff(dis, vollo); wattroff(dis, vollo);
if (showEffects) { if (voll >= 8) wattron(dis, vollo);
if (voll >= 8) wattron(dis, vollo); mvwaddch(dis, 0, (cxpos++)-hOffset, ' ');
mvwaddch(dis, 0, (cxpos++)-hOffset, ' '); wattroff(dis, vollo);
wattroff(dis, vollo); if (voll > 0) wattron(dis, vollo);
if (voll > 0) wattron(dis, vollo); mvwaddch(dis, 0, (cxpos++)-hOffset, ' ');
mvwaddch(dis, 0, (cxpos++)-hOffset, ' '); wattroff(dis, vollo);
wattroff(dis, vollo);
}
wattron(dis, chnvw); wattron(dis, chnvw);
mvwaddch(dis, 0, (cxpos++)-hOffset, ' '); mvwaddch(dis, 0, (cxpos++)-hOffset, ' ');
@ -544,14 +521,12 @@ void displayPatterns(xmp_module_info *mi, xmp_frame_info *fi) {
wattroff(dis, chnvw); wattroff(dis, chnvw);
int volr = (cinfo.volume * cinfo.pan/256); int volr = (cinfo.volume * cinfo.pan/256);
if (showEffects) { if (volr > 0) wattron(dis, vollo);
if (volr > 0) wattron(dis, vollo); mvwaddch(dis, 0, (cxpos++)-hOffset, ' ');
mvwaddch(dis, 0, (cxpos++)-hOffset, ' '); wattroff(dis, vollo);
wattroff(dis, vollo); if (volr >= 8) wattron(dis, vollo);
if (volr >= 8) wattron(dis, vollo); mvwaddch(dis, 0, (cxpos++)-hOffset, ' ');
mvwaddch(dis, 0, (cxpos++)-hOffset, ' '); wattroff(dis, vollo);
wattroff(dis, vollo);
}
if (volr >= 16) wattron(dis, vollo); if (volr >= 16) wattron(dis, vollo);
mvwaddch(dis, 0, (cxpos++)-hOffset, ' '); mvwaddch(dis, 0, (cxpos++)-hOffset, ' ');
wattroff(dis, vollo); wattroff(dis, vollo);
@ -605,12 +580,10 @@ void displayPatterns(xmp_module_info *mi, xmp_frame_info *fi) {
snprintf(vol, 4, "v40"); snprintf(vol, 4, "v40");
else snprintf(vol, 4, "..."); else snprintf(vol, 4, "...");
if (showEffects) { char f1;
char f1; if ((efxmemtable[event.fxt] || event.fxp != 0) && (f1 = efxtable[event.fxt]) != NULL) snprintf(efx, 4, "%c%02X", f1, event.fxp);
if ((efxmemtable[event.fxt] || event.fxp != 0) && (f1 = efxtable[event.fxt]) != NULL) snprintf(efx, 4, "%c%02X", f1, event.fxp); else snprintf(efx, 4, "...");
else snprintf(efx, 4, "..."); sprintf(lnbuf, "|%s %s %s %s", note, ins, vol, efx);
sprintf(lnbuf, "|%s %s %s %s", note, ins, vol, efx);
} else sprintf(lnbuf, "|%s %s %s", note, ins, vol);
for (int z = 0; z < chnsize; z++) { for (int z = 0; z < chnsize; z++) {
if (((i*chnsize)+2+z)-hOffset < 2) continue; if (((i*chnsize)+2+z)-hOffset < 2) continue;
mvwaddch(dis, y, ((i*chnsize)+2+z)-hOffset, lnbuf[z]); mvwaddch(dis, y, ((i*chnsize)+2+z)-hOffset, lnbuf[z]);
@ -710,7 +683,6 @@ void displayPlayer() {
mvwaddstr(dis, 5-vOffset, 1, "1. Pattern Channels"); mvwaddstr(dis, 5-vOffset, 1, "1. Pattern Channels");
mvwaddstr(dis, 6-vOffset, 1, "2. Dynamic Note Roll"); mvwaddstr(dis, 6-vOffset, 1, "2. Dynamic Note Roll");
mvwaddstr(dis, 7-vOffset, 1, "3. Pattern Order"); mvwaddstr(dis, 7-vOffset, 1, "3. Pattern Order");
mvwaddstr(dis, 8-vOffset, 1, "4. Pattern Effects");
wattroff(dis, A_BOLD); wattroff(dis, A_BOLD);
mvwaddstr(dis, 1-vOffset, 20, loop?"[ #] YES":"[# ] NO"); mvwaddstr(dis, 1-vOffset, 20, loop?"[ #] YES":"[# ] NO");
@ -720,7 +692,6 @@ void displayPlayer() {
mvwaddstr(dis, 5-vOffset, 22, ptnChans?"[ #] YES":"[# ] NO"); mvwaddstr(dis, 5-vOffset, 22, ptnChans?"[ #] YES":"[# ] NO");
mvwaddstr(dis, 6-vOffset, 22, dynamicRoll?"[ #] YES":"[# ] NO"); mvwaddstr(dis, 6-vOffset, 22, dynamicRoll?"[ #] YES":"[# ] NO");
mvwaddstr(dis, 7-vOffset, 22, ptnOrder?"[ #] YES":"[# ] NO"); mvwaddstr(dis, 7-vOffset, 22, ptnOrder?"[ #] YES":"[# ] NO");
mvwaddstr(dis, 8-vOffset, 22, showEffects?"[ #] YES":"[# ] NO");
} }
void displayHelp() { void displayHelp() {