Revert "Fixed timekeeping"

This reverts commit 68f8a3aa8fb53b98625232d99cc5bd040e67dd96.

Conflicts:
	dumb/src/it/itrender.c
This commit is contained in:
Randy Heit 2015-12-15 14:16:34 -06:00
parent 06bb75576c
commit d3000fd838

View file

@ -4244,6 +4244,10 @@ static int process_tick(DUMB_IT_SIGRENDERER *sigrenderer)
*/ */
#endif #endif
bit_array_set(sigrenderer->played, sigrenderer->order * 256 + sigrenderer->row); bit_array_set(sigrenderer->played, sigrenderer->order * 256 + sigrenderer->row);
if (sigrenderer->looped == 0) {
timekeeping_array_push(sigrenderer->row_timekeeper, sigrenderer->order * 256 + sigrenderer->row, sigrenderer->time_played);
}
timekeeping_array_bump(sigrenderer->row_timekeeper, sigrenderer->order * 256 + sigrenderer->row);
{ {
int n; int n;
for (n = 0; n < DUMB_IT_N_CHANNELS; n++) for (n = 0; n < DUMB_IT_N_CHANNELS; n++)
@ -4413,13 +4417,6 @@ static int process_tick(DUMB_IT_SIGRENDERER *sigrenderer)
} }
} }
#ifdef BIT_ARRAY_BULLSHIT
if (sigrenderer->looped == 0) {
timekeeping_array_push(sigrenderer->row_timekeeper, sigrenderer->order * 256 + sigrenderer->row, sigrenderer->time_played);
}
timekeeping_array_bump(sigrenderer->row_timekeeper, sigrenderer->order * 256 + sigrenderer->row);
#endif
if (!(sigdata->flags & IT_WAS_A_669)) if (!(sigdata->flags & IT_WAS_A_669))
reset_effects(sigrenderer); reset_effects(sigrenderer);
@ -5510,7 +5507,7 @@ static int32 it_sigrenderer_get_samples(
int dt; int dt;
int32 todo; int32 todo;
int ret; int ret;
LONG_LONG t; LONG_LONG time_left, t;
if (sigrenderer->order < 0) return 0; // problematic if (sigrenderer->order < 0) return 0; // problematic
@ -5523,7 +5520,8 @@ static int32 it_sigrenderer_get_samples(
if (!samples) volume = 0; if (!samples) volume = 0;
for (;;) { for (;;) {
todo = (int32)((((LONG_LONG)sigrenderer->time_left << 16) | sigrenderer->sub_time_left) / dt); time_left = ((LONG_LONG)sigrenderer->time_left << 16) | sigrenderer->sub_time_left;
todo = (long)(time_left / dt);
if (todo >= size) if (todo >= size)
break; break;
@ -5538,7 +5536,7 @@ static int32 it_sigrenderer_get_samples(
sigrenderer->time_left += (int32)(t >> 16); sigrenderer->time_left += (int32)(t >> 16);
#ifdef BIT_ARRAY_BULLSHIT #ifdef BIT_ARRAY_BULLSHIT
sigrenderer->time_played += (LONG_LONG)todo * dt; sigrenderer->time_played += time_left;
#endif #endif
ret = process_tick(sigrenderer); ret = process_tick(sigrenderer);