Skip to content

Commit

Permalink
Change default Tracker ID. Fixes #3
Browse files Browse the repository at this point in the history
  • Loading branch information
chr15m committed Jun 14, 2024
1 parent 574e097 commit dfea1c6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion example.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ const it = itwriter({
}
]
},
]
],
// tracker ID: https://wiki.openmpt.org/Development:_Formats/IT#Tracker_IDs
"tracker_id": 0xD1CE,
});
console.log(it);
// in Node we can write to disk
Expand Down
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,17 @@ function itwriter(struct) {
offset += 2;

// Cwt/v - created with tracker
data.setUint16(offset, 0x2951);
// https://wiki.openmpt.org/Development:_Formats/IT#Tracker_IDs
// 0x1402 is Impulse Tracker
data.setUint16(offset, struct.tracker_id || 0xD1CE, true);
offset += 2;

// Cmwt - compatible with tracker with version greater than value
data.setUint16(offset, 0x1402);
data.setUint16(offset, 0x1402, true);
offset += 2;

// Flags (set to default from OpenMPT)
data.setUint16(offset, 0x4900);
data.setUint16(offset, 0x4900, true);
offset += 2;

// Special / message flag
Expand Down

0 comments on commit dfea1c6

Please sign in to comment.