mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-18 07:32:28 +00:00
Update DUMB to revision ac46a8b6056cf12bff464407bc1582301051c1f1
- Fixed STM speed handling SVN r4112 (trunk)
This commit is contained in:
parent
ab644a7761
commit
7edd64243b
3 changed files with 36 additions and 14 deletions
|
@ -412,6 +412,8 @@ struct IT_PATTERN
|
|||
|
||||
#define IT_WAS_AN_OKT 2048
|
||||
|
||||
#define IT_WAS_AN_STM 4096
|
||||
|
||||
#define IT_ORDER_END 255
|
||||
#define IT_ORDER_SKIP 254
|
||||
|
||||
|
|
|
@ -2075,7 +2075,18 @@ Yxy This uses a table 4 times larger (hence 4 times slower) than
|
|||
/*if (entry->effectvalue == 255)
|
||||
if (sigrenderer->callbacks->xm_speed_zero && (*sigrenderer->callbacks->xm_speed_zero)(sigrenderer->callbacks->xm_speed_zero_data))
|
||||
return 1;*/
|
||||
sigrenderer->tick = sigrenderer->speed = entry->effectvalue;
|
||||
if (sigdata->flags & IT_WAS_AN_STM)
|
||||
{
|
||||
int n = entry->effectvalue;
|
||||
if (n >= 32)
|
||||
{
|
||||
sigrenderer->tick = sigrenderer->speed = n;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sigrenderer->tick = sigrenderer->speed = entry->effectvalue;
|
||||
}
|
||||
}
|
||||
else if ((sigdata->flags & (IT_WAS_AN_XM|IT_WAS_A_MOD)) == IT_WAS_AN_XM) {
|
||||
#ifdef BIT_ARRAY_BULLSHIT
|
||||
|
@ -4323,9 +4334,12 @@ static int process_tick(DUMB_IT_SIGRENDERER *sigrenderer)
|
|||
update_effects(sigrenderer);
|
||||
}
|
||||
} else {
|
||||
speed0:
|
||||
update_effects(sigrenderer);
|
||||
update_tick_counts(sigrenderer);
|
||||
if ( !(sigdata->flags & IT_WAS_AN_STM) || !(sigrenderer->tick & 15))
|
||||
{
|
||||
speed0:
|
||||
update_effects(sigrenderer);
|
||||
update_tick_counts(sigrenderer);
|
||||
}
|
||||
}
|
||||
|
||||
if (sigrenderer->globalvolume == 0) {
|
||||
|
@ -4348,7 +4362,12 @@ static int process_tick(DUMB_IT_SIGRENDERER *sigrenderer)
|
|||
process_all_playing(sigrenderer);
|
||||
|
||||
{
|
||||
LONG_LONG t = sigrenderer->sub_time_left + ((LONG_LONG)TICK_TIME_DIVIDEND << 16) / sigrenderer->tempo;
|
||||
LONG_LONG t = ((LONG_LONG)TICK_TIME_DIVIDEND << 16) / sigrenderer->tempo;
|
||||
if ( sigrenderer->sigdata->flags & IT_WAS_AN_STM )
|
||||
{
|
||||
t /= 16;
|
||||
}
|
||||
t += sigrenderer->sub_time_left;
|
||||
sigrenderer->time_left += (int)(t >> 16);
|
||||
sigrenderer->sub_time_left = (int)t & 65535;
|
||||
}
|
||||
|
|
|
@ -142,9 +142,9 @@ static int it_stm_read_pattern( IT_PATTERN *pattern, DUMBFILE *f, unsigned char
|
|||
entry->mask |= IT_ENTRY_VOLPAN;
|
||||
entry->mask |= IT_ENTRY_EFFECT;
|
||||
switch ( entry->effect ) {
|
||||
case IT_SET_SPEED:
|
||||
entry->effectvalue >>= 4;
|
||||
break;
|
||||
case IT_SET_SPEED:
|
||||
/* taken care of in the renderer */
|
||||
break;
|
||||
|
||||
case IT_BREAK_TO_ROW:
|
||||
entry->effectvalue -= (entry->effectvalue >> 4) * 6;
|
||||
|
@ -236,16 +236,17 @@ static DUMB_IT_SIGDATA *it_stm_load_sigdata(DUMBFILE *f, int * version)
|
|||
sigdata->n_samples = 31;
|
||||
sigdata->n_pchannels = 4;
|
||||
|
||||
sigdata->tempo = 125;
|
||||
sigdata->mixing_volume = 48;
|
||||
sigdata->tempo = 125;
|
||||
sigdata->mixing_volume = 48;
|
||||
sigdata->pan_separation = 128;
|
||||
|
||||
/** WARNING: which ones? */
|
||||
sigdata->flags = IT_OLD_EFFECTS | IT_COMPATIBLE_GXX | IT_WAS_AN_S3M | IT_STEREO;
|
||||
sigdata->flags = IT_OLD_EFFECTS | IT_COMPATIBLE_GXX | IT_WAS_AN_S3M | IT_WAS_AN_STM | IT_STEREO;
|
||||
|
||||
sigdata->speed = dumbfile_getc(f) >> 4;
|
||||
if ( sigdata->speed < 1 ) sigdata->speed = 1;
|
||||
sigdata->n_patterns = dumbfile_getc(f);
|
||||
n = dumbfile_getc(f);
|
||||
if ( n < 32 ) n = 32;
|
||||
sigdata->speed = n;
|
||||
sigdata->n_patterns = dumbfile_getc(f);
|
||||
sigdata->global_volume = dumbfile_getc(f) << 1;
|
||||
if ( sigdata->global_volume > 128 ) sigdata->global_volume = 128;
|
||||
|
||||
|
|
Loading…
Reference in a new issue