changeset 1347:c9b5b4713b57

Cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 22 Aug 2017 21:36:10 +0300
parents 3f0fb57d58aa
children 6d67057ad2ca
files tools/xm2jss.c
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/tools/xm2jss.c	Tue Aug 22 21:35:44 2017 +0300
+++ b/tools/xm2jss.c	Tue Aug 22 21:36:10 2017 +0300
@@ -891,10 +891,9 @@
     for (int i = 0; i < jsetMaxInstruments; i++)
     if (usedExtInstruments[i] && m->extInstruments[i] != NULL)
     {
-        int note;
         JSSExtInstrument *e = m->extInstruments[i];
 
-        for (note = 0; note < jsetNNotes; note++)
+        for (int note = 0; note < jsetNNotes; note++)
         if (e->sNumForNotes[note] != jsetNotSet)
         {
             int q = e->sNumForNotes[note];
@@ -1013,7 +1012,7 @@
     if (usedExtInstruments[i])
     {
         JSSExtInstrument *eip;
-        int note;
+
         if (optStripExtInstr)
             continue;
 
@@ -1037,7 +1036,7 @@
         (r->nextInstruments)++;
 
         // Re-map sNumForNotes table for this ext.instrument
-        for (note = 0; note < jsetNNotes; note++)
+        for (int note = 0; note < jsetNNotes; note++)
         {
             int q = eip->sNumForNotes[note];
             if (q != jsetNotSet)
@@ -1127,11 +1126,12 @@
     // Remap orders list
     //
     dmMsg(1, "Remapping orders list.\n");
-    dmPrint(2, "  ");
     for (int i = 0; i < m->norders; i++)
     {
-        dmPrint(2, "%02x -> %02x : ", m->orderList[i], mapPatterns[m->orderList[i]]);
-        r->orderList[i] = mapPatterns[m->orderList[i]];
+        int map = mapPatterns[m->orderList[i]];
+        if (map != m->orderList[i])
+        dmPrint(2, "%02x -> %02x : ", m->orderList[i], map);
+        r->orderList[i] = map;
     }
     dmPrint(2, "\n");