We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1fd034d commit 1cc2216Copy full SHA for 1cc2216
constants/mart_constants.asm
@@ -5,6 +5,7 @@
5
const MARTTYPE_BARGAIN
6
const MARTTYPE_PHARMACY
7
const MARTTYPE_ROOFTOP
8
+DEF NUM_MART_TYPES EQU const_value
9
10
; Marts indexes (see data/items/marts.asm)
11
const_def
engine/items/mart.asm
@@ -12,16 +12,19 @@ OpenMartDialog::
12
ld [wMartType], a
13
call LoadMartPointer
14
ld a, [wMartType]
15
- ld hl, .dialogs
+ ld hl, MartTypeDialogs
16
rst JumpTable
17
ret
18
19
-.dialogs
+MartTypeDialogs:
20
+; entries correspond to MARTTYPE_* constants
21
+ table_width 2
22
dw MartDialog
23
dw HerbShop
24
dw BargainShop
25
dw Pharmacist
26
dw RooftopSale
27
+ assert_table_length NUM_MART_TYPES
28
29
MartDialog:
30
ld a, MARTTYPE_STANDARD
0 commit comments