Verify the trade dialog pointer table length

This commit is contained in:
Rangi42
2025-03-15 00:49:14 -04:00
parent 1cc2216ef9
commit 94c36a4351
2 changed files with 4 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ DEF NUM_NPC_TRADES EQU const_value
const TRADE_DIALOG_WRONG
const TRADE_DIALOG_COMPLETE
const TRADE_DIALOG_AFTER
DEF NUM_TRADE_DIALOGS EQU const_value
; trade dialog sets
const_def
@@ -45,3 +46,4 @@ DEF NUM_NPC_TRADES EQU const_value
const TRADE_DIALOGSET_HAPPY
const TRADE_DIALOGSET_NEWBIE
const TRADE_DIALOGSET_GIRL
DEF NUM_TRADE_DIALOGSETS EQU const_value

View File

@@ -405,6 +405,7 @@ PrintTradeText:
TradeTexts:
; entries correspond to TRADE_DIALOG_* × TRADE_DIALOGSET_* constants
table_width 2
; TRADE_DIALOG_INTRO
dw NPCTradeIntroText1
dw NPCTradeIntroText2
@@ -430,6 +431,7 @@ TradeTexts:
dw NPCTradeAfterText2
dw NPCTradeAfterText4
dw NPCTradeAfterText3
assert_table_length NUM_TRADE_DIALOGS * NUM_TRADE_DIALOGSETS
NPCTradeCableText:
text_far _NPCTradeCableText