Fix build on modern Unix and many cleanups #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The class2.dat file included in this repo uses the SIZE_OFFSET 11 setting.
Add a validity check for things like 0-length input files.
Add -v (verbose debugging) flag that prints each object as it parses it. This helps when an invalid file causes it to crash before dumping the final .rdl output.
Add -S (shorten objects) flag to override the class sizes with shorter ones. For example, table is 6 bytes, not 9, for some files.
Stop parsing more input contents vectors if we hit 0xAA bytes. Some files seem to have these as padding after valid data.
Don't dump the 'teleport_address' attribute. It can't be parsed by our downstream tools and it seems like none of them have any useful data here anyway -- all .reg files I saw had 20 values, all 32. We can add valid addresses in during later processing. Original behavior can be restored with the -DDUMP_TELEPORT_ADDRESSES #ifdef.
Compile fix and cleanups: