MBINCompiler icon indicating copy to clipboard operation
MBINCompiler copied to clipboard

Padding byte values should match vanilla data

Open GaticusHax opened this issue 6 years ago • 2 comments
trafficstars

When padding bytes are required in the NMS structs, the value of these bytes is normally 0x00 but NMS tends to also use 0xFE for padding byte values in some cases. Technically, the value of padding bytes is undefined, so different values is not a problem for execution but libMBIN does not faithfully reproduce these padding byte values. Instead it always fills padding with 0x00. This leads to many irrelevant differences when comparing files, polluting the results and making it hard to find real changes.

libMBIN should use an appropriate padding byte value to eliminate these differences. An NMS attribute could be defined (may already exist) to specify what value should be used for padding in different circumstances, either per struct and/or per member.

GaticusHax avatar Oct 13 '19 18:10 GaticusHax

I think I have already got some code which implements this?

monkeyman192 avatar Oct 14 '19 11:10 monkeyman192

I think the issue may be just with TkAnimMetada and TkGeometryData, due to the custom serialization, that does not implement the padding mechanism.

GaticusHax avatar Oct 15 '19 02:10 GaticusHax