Skip to content

Fix build on modern Unix and many cleanups#7

Open
watchforsnakes wants to merge 3 commits intoMuseum-of-Art-and-Digital-Entertainment:masterfrom
watchforsnakes:master
Open

Fix build on modern Unix and many cleanups#7
watchforsnakes wants to merge 3 commits intoMuseum-of-Art-and-Digital-Entertainment:masterfrom
watchforsnakes:master

Conversation

@watchforsnakes
Copy link

@watchforsnakes watchforsnakes commented Feb 12, 2018

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:

  • Get rid of custom malloc() def
  • Initialize stdio vars in main(), not statically
  • Add braces to disambiguate nested ifs

Watch For Snakes added 3 commits February 11, 2018 21:23
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 cleanusp:
* Get rid of custom malloc() def
* Initialize stdio vars in main(), not statically
* Add braces to disambiguate nested ifs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant