Worked around two issues in DUMB's XM reader; Fixes dark lighthouse.xm
parent
a567183510
commit
741271e153
|
@ -897,6 +897,16 @@ static DUMB_IT_SIGDATA *it_xm_load_sigdata(DUMBFILE *f, int * version)
|
||||||
if (sigdata->speed == 0) sigdata->speed = 6; // Should we? What about tempo?
|
if (sigdata->speed == 0) sigdata->speed = 6; // Should we? What about tempo?
|
||||||
sigdata->tempo = dumbfile_igetw(f);
|
sigdata->tempo = dumbfile_igetw(f);
|
||||||
|
|
||||||
|
// FT2 always clips restart position against the song length
|
||||||
|
if (sigdata->restart_position > sigdata->n_orders)
|
||||||
|
sigdata->restart_position = sigdata->n_orders;
|
||||||
|
// And FT2 starts playback on order 0, regardless of length,
|
||||||
|
// and only checks if the next order is greater than or equal
|
||||||
|
// to this, not the current pattern. Work around this with
|
||||||
|
// DUMB's playback core by overriding a zero length with one.
|
||||||
|
if (sigdata->n_orders == 0)
|
||||||
|
sigdata->n_orders = 1;
|
||||||
|
|
||||||
/* sanity checks */
|
/* sanity checks */
|
||||||
// XXX
|
// XXX
|
||||||
i = header_size - 4 - 2 * 8; /* Maximum number of orders expected */
|
i = header_size - 4 - 2 * 8; /* Maximum number of orders expected */
|
||||||
|
|
Loading…
Reference in New Issue