So I'm releasing the code because it is good code and if you understand c# it should help you understand the map structure better...
I may well rewrite this (only differently) but hopefully this will help people until I do that, or better yet a remnant project to be started to standardise H2 mod programming...
it covers lots of stuff...
there is 3 main classes:
Map Stream
Map Data
Plugin
Map Stream and Map Data both have sub classes the main map parts:
Header
Index
Strings
Sbsp
Tags
Map Stream as the name suggests is an halo 2 map oriented binary reader/writer
it has all the standard read/write functions plus read/write functions for bitmasks, unicode strings, null terminated strings, a read-then-goto-offset function for reflexives which returns the chunk count (doesn't go anywhere if the chunk count is 0)
there is also the beginnings of a completely proper chunk adder (adds chunks where they should be and recalculates any offsets that have changed for reflexives)
and of course a resign function
Map Data stores all important info about a map ie all the data in the header, index, sbsp, strings, and offsets etc for tags
the tags sub class has various functions for loading treenodes and string lists etc
and there is events to return progress and status
Plugin Reader does exactly what it says on the tin. it reads ent plugins from your chosen directory. however the way the data is returned could use some work....