changeset 1221:e0aa979e7188

Change sizes of some JSSMOD structure members.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 06 Mar 2015 09:52:20 +0200
parents fc2ab4dcd046
children 823f8e06ff6a
files minijss/jssmod.h
diffstat 1 files changed, 18 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/minijss/jssmod.h	Fri Mar 06 09:50:11 2015 +0200
+++ b/minijss/jssmod.h	Fri Mar 06 09:52:20 2015 +0200
@@ -193,17 +193,19 @@
  */
 typedef struct __attribute__((__packed__))
 {
-    char  idMagic[2];     // "JM"
-    Uint8 idVersion;      // 0x10 for 1.0, etc.
-    Sint16
+    char  idMagic[2];       // "JM"
+    Uint8 idVersion;        // 0x10 for 1.0, etc.
+    Uint16
+        defFlags,           // Flags field: see jmdf* flags
+        intVersion,         // Internal version, format dependant
         norders,            // Number of orders in orderlist
         npatterns,          // Number of patterns
-        nchannels,          // Number of channels
         nextInstruments,    // Number of extended instruments
         ninstruments,       // Number of sample-instruments
-        defFlags,           // Flags field: see jmdf* flags
-        intVersion,         // Internal version, format dependant
-        defRestartPos,      // Default restart position in orderlist
+        defRestartPos;      // Default restart position in orderlist
+
+    Uint8
+        nchannels,          // Number of channels
         defSpeed,           // Default speed (ticks/row)
         defTempo,           // Default tempo (BPM)
         patMode;            // Pattern data format mode
@@ -246,14 +248,14 @@
 
 typedef struct __attribute__((__packed__))
 {
-    Sint16  nsamples;
-    Uint8 sNumForNotes[jsetNNotes];
+    Uint16  nsamples;
+    Uint8   vibratoType;
+    Uint16  vibratoSweep,
+            vibratoDepth,
+            vibratoRate,
+            fadeOut;
+    Uint16  sNumForNotes[jsetNNotes];
     JSSMODEnvelope volumeEnv, panningEnv;
-    Sint16  vibratoType,
-            vibratoSweep,
-            vibratoDepth,
-            vibratoRate;
-    Sint32  fadeOut;
 } JSSMODExtInstrument;
 
 
@@ -283,7 +285,8 @@
 
 typedef struct __attribute__((__packed__))
 {
-    Uint32 nrows, size;
+    Uint32 size;
+    Uint16 nrows;
 } JSSMODPattern;
 
 #endif