This adds initial support for writing new/modified maps, which are made up of layer groups (LGB) and terrain (TERA). Neither one is really tested yet, but I started checking some simple examples and it seems to work.
I guessed the name, it's more like a collection of layers. This actually fixes a
bunch of mistakes (on my part) as I copied the layout from Lumina, but added a
few changes to make it work with modern zones. There's a whole lot more work
here to do, but now it works to parse New & Old Gridania.
Now it reads much more of the index file format, and tries to handle
index1/index2 differences more opaquely. I'm not yet happy with the API, it
needs a bit more work.
Since this recently had a hand in patch regression, let's start adding
some basic tests for this function.
I realized the writing functions did not take into account the nul
terminator, which is not correct and has been fixed.