diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-03-03 22:22:41 -0500 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-03-05 16:10:25 -0500 |
commit | 5454e1e0deefc6b4fc8c4de0e63314052fceebc0 (patch) | |
tree | 565805b252fa596aab3f80b3128ebc91b1fae540 /constants/npc_trade_constants.asm | |
parent | b423e94be700cc6434465cf1dcccf0b677489192 (diff) |
Verify data table sizes with table_width and assert_table_length macros
It also uncovered some off-by-one issues with defining some constants.
A few structs now use rsreset/_RS to define their offset constants.
Diffstat (limited to 'constants/npc_trade_constants.asm')
-rw-r--r-- | constants/npc_trade_constants.asm | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/constants/npc_trade_constants.asm b/constants/npc_trade_constants.asm index 6e1d45c9..51431e8c 100644 --- a/constants/npc_trade_constants.asm +++ b/constants/npc_trade_constants.asm @@ -1,14 +1,16 @@ ; npctrade struct members (see data/events/npc_trades.asm) -NPCTRADE_DIALOG EQU 0 ; db -NPCTRADE_GIVEMON EQU 1 ; db -NPCTRADE_GETMON EQU 2 ; db -NPCTRADE_NICK EQU 3 ; ds MON_NAME_LENGTH -NPCTRADE_DVS EQU 14 ; dw -NPCTRADE_ITEM EQU 16 ; db -NPCTRADE_OT_ID EQU 17 ; dw -NPCTRADE_OT_NAME EQU 19 ; ds NAME_LENGTH -NPCTRADE_GENDER EQU 30 ; db -NPCTRADE_PADDING EQU 31 ; db +rsreset +NPCTRADE_DIALOG rb +NPCTRADE_GIVEMON rb +NPCTRADE_GETMON rb +NPCTRADE_NICK rb MON_NAME_LENGTH +NPCTRADE_DVS rw +NPCTRADE_ITEM rb +NPCTRADE_OT_ID rw +NPCTRADE_OT_NAME rb NAME_LENGTH +NPCTRADE_GENDER rb +NPCTRADE_PADDING rb +NPCTRADE_STRUCT_LENGTH EQU _RS ; NPCTrades indexes (see data/events/npc_trades.asm) const_def |