Add command to toggle subsong explorer

Subsong explorer mode can be toggled using the 'z' command. A flag
will appear in the status line showing that explorer mode is enabled.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
master
Claudio Matsuoka 13 years ago
parent af1f1c2198
commit 61828e7b7a
  1. 1
      README
  2. 3
      src/commands.c
  3. 1
      src/common.h
  4. 9
      src/info.c
  5. 3
      src/main.c
  6. 4
      src/xmp.1

@ -36,6 +36,7 @@ The following single key commands can be used during the playback:
! => unmute all channels
? => display available commands
l => toggle loop mode
z => toggle subsong explorer mode
m => display module information
i => display combined instrument/sample list
I => display instrument list

@ -184,6 +184,9 @@ void read_command(xmp_context handle, struct xmp_module_info *mi, struct control
case 'l':
ctl->loop ^= 1;
break;
case 'z':
ctl->explore ^= 1;
break;
case ' ': /* paused module */
ctl->pause ^= 1;
break;

@ -41,6 +41,7 @@ struct control {
int pause; /* Replay paused */
int display; /* Info display flag */
int sequence; /* Current sequence */
int explore; /* Play all sequences */
};

@ -28,6 +28,7 @@ void info_help(void)
" ! Unmute all channels\n"
" ? Display available commands\n"
" l Toggle loop mode\n"
" z Toggle subsong explorer mode\n"
" m Display module information\n"
" i Display combined instrument/sample list\n"
" I Display instrument list\n"
@ -124,7 +125,9 @@ void info_frame(struct xmp_module_info *mi, struct xmp_frame_info *fi, struct co
time = fi->time / 100;
if (msg_timer > 0) {
report("\r%-61.61s %c ", msg_text, ctl->loop ? 'L' : ' ');
report("\r%-61.61s %c%c ", msg_text,
ctl->explore ? 'Z' : ' ',
ctl->loop ? 'L' : ' ');
msg_timer -= fi->frame_time;
if (msg_timer == 0)
msg_timer--;
@ -149,9 +152,9 @@ void info_frame(struct xmp_module_info *mi, struct xmp_frame_info *fi, struct co
}
report("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"
"%02X/%02X] Chn[%02X/%02X] %c ",
"%02X/%02X] Chn[%02X/%02X] %c%c ",
fi->row, fi->num_rows - 1, fi->virt_used, max_channels,
ctl->loop ? 'L' : ' ');
ctl->explore ? 'Z' : ' ', ctl->loop ? 'L' : ' ');
print_time:

@ -331,6 +331,7 @@ int main(int argc, char **argv)
skipprev = 0;
control.time = 0.0;
control.loop = opt.loop;
control.explore = opt.explore;
if (opt.sequence) {
if (opt.sequence < mi.num_sequences) {
@ -436,7 +437,7 @@ int main(int argc, char **argv)
opt.start = 0;
}
if (opt.explore && control.skip == 0) {
if (control.explore && control.skip == 0) {
control.sequence++;
if (control.sequence < mi.num_sequences) {
xmp_set_position(xc, mi.seq_data

@ -201,7 +201,9 @@ Unmute all channels\&.
.IP "\fB?\fP"
Display available commands\&.
.IP "\fBl\fP"
Toggle module looping\&.
Toggle module/sequence looping\&.
.IP "\fBz\fP"
Toggle subsong explorer mode\&.
.IP "\fBm\fP"
Display module information\&.
.IP "\fBi\fP"

Loading…
Cancel
Save