forked from emoose/MBINCompiler
-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Labels
featureAn improvement or feature that is marked for planning and implementation..An improvement or feature that is marked for planning and implementation..
Milestone
Description
A while ago I made some changes to simplify how strings are handled in the .cs files: 1425662
This had implications I didn't fully realise at the time, and since then there has been numerous issues around this change.
It has been suggested we revert back to the original mechanism.
I think this should be done, but with one caveat, we introduce the Alignment attribute for strings that need it so that we continue to not need to include explicit padding bytes.
Ie.
public NMSString0x20A field_name;will get mapped to
[NMS(Size = 0x20, Alignment = 0x8)]
public string field_name;And
public NMSString0x10 field_name;will get mapped to
[NMS(Size = 0x10, Alignment = 0x8)]
public string field_name;All others will be mapped like:
public NMSString0xXYZ field_name;to
[NMS(Size = 0xXYZ)]
public string field_name;This will have implications to anyone using the API as the method to get the value of the string will now no longer need the .Value() call on the field.
Metadata
Metadata
Assignees
Labels
featureAn improvement or feature that is marked for planning and implementation..An improvement or feature that is marked for planning and implementation..