ref: d244b8790af5c8caee2eacff1cda8380390eba93
parent: d1fe0fdbd105df23a2f879b54385074a3891ce2d
author: Chris Moeller <[email protected]>
date: Fri Aug 23 12:46:43 EDT 2013
Fixed row played tracking and row timekeeping information for orders with skip commands
--- a/dumb/src/it/itrender.c
+++ b/dumb/src/it/itrender.c
@@ -4353,6 +4353,15 @@
{
sigrenderer->processorder = sigrenderer->restart_position - 1;
}
+
+#ifdef BIT_ARRAY_BULLSHIT
+ /* Fix play tracking and timekeeping for orders containing skip commands */
+ for (n = 0; n < 256; n++) {
+ bit_array_set(sigrenderer->played, sigrenderer->processorder * 256 + n);
+ timekeeping_array_push(sigrenderer->row_timekeeper, sigrenderer->processorder * 256 + n, sigrenderer->time_played);
+ timekeeping_array_bump(sigrenderer->row_timekeeper, sigrenderer->processorder * 256 + n);
+ }
+#endif
}
pattern = &sigdata->pattern[n];
@@ -5592,6 +5601,14 @@
sigrenderer->processorder = startorder - 1;
sigrenderer->tick = 1;
+#ifdef BIT_ARRAY_BULLSHIT
+ sigrenderer->played = bit_array_create(sigdata->n_orders * 256);
+
+ sigrenderer->looped = 0;
+ sigrenderer->time_played = 0;
+ sigrenderer->row_timekeeper = timekeeping_array_create(sigdata->n_orders * 256);
+#endif
+
{
int order;
for (order = 0; order < sigdata->n_orders; order++) {
@@ -5603,6 +5620,15 @@
if (n == IT_ORDER_END)
#endif
break;
+
+#ifdef BIT_ARRAY_BULLSHIT
+ /* Fix for played order detection for songs which have skips at the start of the orders list */
+ for (n = 0; n < 256; n++) {
+ bit_array_set(sigrenderer->played, order * 256 + n);
+ timekeeping_array_push(sigrenderer->row_timekeeper, order * 256 + n, 0);
+ timekeeping_array_bump(sigrenderer->row_timekeeper, order * 256 + n);
+ }
+#endif
}
/* If we get here, there were no valid orders in the song. */
_dumb_it_end_sigrenderer(sigrenderer);
@@ -5612,14 +5638,6 @@
sigrenderer->time_left = 0;
sigrenderer->sub_time_left = 0;
-
-#ifdef BIT_ARRAY_BULLSHIT
- sigrenderer->played = bit_array_create(sigdata->n_orders * 256);
-
- sigrenderer->looped = 0;
- sigrenderer->time_played = 0;
- sigrenderer->row_timekeeper = timekeeping_array_create(sigdata->n_orders * 256);
-#endif
sigrenderer->gvz_time = 0;
sigrenderer->gvz_sub_time = 0;