Skip to content

Commit

Permalink
Lots of changes (#14)
Browse files Browse the repository at this point in the history
* fix string table not updating correctly

* cleanup sawyer stream stuff

* small optimisations

* some stream optimisations, file cleanup

* fix string table ui and parsing

* add viewing of other data files, and playing of music tracks

* improve music loading

* add scuffed audio rendering

* figured out the /2 is the bytes per sample

* clean up riff code

* add loading of misc tracks and sound effects file (css1)

* add exporting music (buggy with sound effects though)

* add sound ids to ui
  • Loading branch information
LeftofZen authored Jan 17, 2024
1 parent e877b5f commit e2b6e0f
Show file tree
Hide file tree
Showing 44 changed files with 1,281 additions and 683 deletions.
4 changes: 2 additions & 2 deletions OpenLocoTool/DatFileParsing/ObjectAnnotator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static IList<Annotation> Annotate(byte[] bytelist, out byte[] fullData)
fullData =
[
.. bytelist[..runningCount],
.. SawyerStreamReader.Decode(objectHeader.Encoding, bytelist.AsSpan()[runningCount..(int)(runningCount + objectHeader.DataLength)]),
.. SawyerStreamReader.Decode(objectHeader.Encoding, bytelist[runningCount..(int)(runningCount + objectHeader.DataLength)]),
];

var locoStruct = SawyerStreamReader.GetLocoStruct(s5Header.ObjectType, fullData.AsSpan()[runningCount..]);
Expand Down Expand Up @@ -137,7 +137,7 @@ public static IList<Annotation> AnnotateG1Data(byte[] fullData, int runningCount
return annotations;
}

public static int AnnotateStringTable(byte[] fullData, int runningCount, ILocoStruct locoStruct, IList<Annotation> annotations)
static int AnnotateStringTable(byte[] fullData, int runningCount, ILocoStruct locoStruct, IList<Annotation> annotations)
{
var root = new Annotation("String Table", runningCount, 1);
annotations.Add(root);
Expand Down
Loading

0 comments on commit e2b6e0f

Please sign in to comment.