|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
|
#include <stdio.h> |
|
|
|
|
#include <string.h> |
|
|
|
|
#include <xmp.h> |
|
|
|
|
|
|
|
|
|
void info_mod(struct xmp_module_info *mi) |
|
|
|
|
@ -61,3 +62,50 @@ void info_frame(struct xmp_module_info *mi, int reset) |
|
|
|
|
|
|
|
|
|
fflush(stdout); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void info_instruments_compact(struct xmp_module_info *mi) |
|
|
|
|
{ |
|
|
|
|
int i, j; |
|
|
|
|
struct xmp_module *mod = mi->mod; |
|
|
|
|
|
|
|
|
|
printf("Instruments:\n"); |
|
|
|
|
printf(" Instrument name Size Loop End Vol Fine Pan\n"); |
|
|
|
|
for (i = 0; i < mod->ins; i++) { |
|
|
|
|
struct xmp_instrument *ins = &mod->xxi[i]; |
|
|
|
|
|
|
|
|
|
if (strlen(ins->name) == 0 && ins->nsm == 0) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
printf("%02x %-32.32s %02x ", i, ins->name, ins->nsm); |
|
|
|
|
|
|
|
|
|
for (j = 0; j < ins->nsm; j++) { |
|
|
|
|
struct xmp_subinstrument *sub = &ins->sub[j]; |
|
|
|
|
struct xmp_sample *smp = &mod->xxs[sub->sid]; |
|
|
|
|
|
|
|
|
|
if (j > 0) { |
|
|
|
|
if (smp->len == 0) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
printf("%38.38s", " "); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
printf("%05x%c%05x %05x%c V%02x %+04d P%02x\n", |
|
|
|
|
smp->len, |
|
|
|
|
smp->flg & XMP_SAMPLE_16BIT ? '+' : ' ', |
|
|
|
|
smp->lps, |
|
|
|
|
smp->lpe, |
|
|
|
|
smp->flg & XMP_SAMPLE_LOOP ? |
|
|
|
|
smp->flg & XMP_SAMPLE_LOOP_BIDIR ? |
|
|
|
|
'B' : 'L' : ' ', |
|
|
|
|
sub->vol, |
|
|
|
|
sub->fin, |
|
|
|
|
sub->pan); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (j == 0) { |
|
|
|
|
printf("----- ----- ----- --- ---- ---\n"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|