thezerothcat / LaMulanaRandomizer

Randomizer for La-Mulana Remake
https://github.com/thezerothcat/LaMulanaRandomizer/wiki
BSD 2-Clause "Simplified" License
51 stars 17 forks source link

Add MSD package #110

Closed halgorithm closed 4 years ago

halgorithm commented 4 years ago

This PR adds a standalone msd package for interacting with .msd files. Documentation for the different methods and usage examples don't really exist yet but will likely be added some time in the future. In a nutshell:

  1. Parse a .msd file using MsdParse.parse(Path msdPath) to get a Stage tree of the data it contains.
  2. Edit your stage tree data. The Collision and Layer classes have a functional-ish TileMap API to simplify editing their data.
  3. Write your Stage back to a file using MsdSerialize.serialize(Stage stage).

The only thing that has been updated so far to use this package is RcdReader.getRcdScriptInfo() (replacing the partial parsing it was doing before) but it will be used for other things later on.