-
Notifications
You must be signed in to change notification settings - Fork 893
Open
Labels
Description
We use the _RS constants rb/rw for defining struct offsets, like for base data struct members. However, some of these members overlap. Currently we manually reset the _RS value and continue:
DEF BASE_TYPES rw
rsset BASE_TYPES
DEF BASE_TYPE_1 rb
DEF BASE_TYPE_2 rbDEF MON_CAUGHTDATA rw
rsset MON_CAUGHTDATA
DEF MON_CAUGHTTIME rb
DEF MON_CAUGHTGENDER rb
rsset MON_CAUGHTDATA
DEF MON_CAUGHTLEVEL rb
DEF MON_CAUGHTLOCATION rbI think it would be cleaner to define RUNION macros (inspired by the WLA-DX assembler's and .UNION-inside-.ENUM feature): https://pastebin.com/7uakxqb6
runion
DEF BASE_TYPES rw
nextru
DEF BASE_TYPE_1 rb
DEF BASE_TYPE_2 rb
endrunionrunion
DEF MON_CAUGHTDATA rw
nextru
DEF MON_CAUGHTTIME rb
DEF MON_CAUGHTGENDER rb
nextru
DEF MON_CAUGHTLEVEL rb
DEF MON_CAUGHTLOCATION rb
endrunion