From 93e3ccf93f816abd3714b3f2bdcc9a55fdbac6cc Mon Sep 17 00:00:00 2001 From: tildearrow Date: Tue, 1 Apr 2025 17:26:39 -0500 Subject: [PATCH] prepare for command stream compression don't optimize waits (this will be the final pass) --- src/engine/cmdStreamOps.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/engine/cmdStreamOps.cpp b/src/engine/cmdStreamOps.cpp index 2a256eef7..0ad8dc327 100644 --- a/src/engine/cmdStreamOps.cpp +++ b/src/engine/cmdStreamOps.cpp @@ -20,6 +20,7 @@ #include "engine.h" #include "../ta-log.h" +/* #define WRITE_TICK(x) \ if (!wroteTick[x]) { \ wroteTick[x]=true; \ @@ -35,6 +36,7 @@ } \ lastTick[x]=tick; \ } +*/ void writePackedCommandValues(SafeWriter* w, const DivCommand& c) { switch (c.cmd) { @@ -274,7 +276,6 @@ SafeWriter* DivEngine::saveCommand() { memset(wroteTick,0,DIV_MAX_CHANS*sizeof(bool)); if (curDivider!=divider) { curDivider=divider; - WRITE_TICK(0); chanStream[0]->writeC(0xfb); chanStream[0]->writeI((int)(curDivider*65536)); } @@ -294,19 +295,18 @@ SafeWriter* DivEngine::saveCommand() { case DIV_CMD_PRE_NOTE: break; default: - WRITE_TICK(i.chan); cmdPopularity[i.cmd]++; writePackedCommandValues(chanStream[i.chan],i); break; } } cmdStream.clear(); + for (int i=0; iwriteC(0xfe); + } tick++; } memset(wroteTick,0,DIV_MAX_CHANS*sizeof(bool)); - for (int i=0; i