summaryrefslogtreecommitdiff
path: root/asm/macros
diff options
context:
space:
mode:
Diffstat (limited to 'asm/macros')
-rw-r--r--asm/macros/event.inc50
-rw-r--r--asm/macros/map.inc10
2 files changed, 31 insertions, 29 deletions
diff --git a/asm/macros/event.inc b/asm/macros/event.inc
index 4625f8df6..84fdd592a 100644
--- a/asm/macros/event.inc
+++ b/asm/macros/event.inc
@@ -846,38 +846,40 @@
.endm
@ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made.
- @ Lists of options are predefined (sMultichoiceLists) and the one to be used is specified with list. If b is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button.
- .macro multichoice x:req, y:req, list:req, b:req
+ @ Lists of options are predefined (sMultichoiceLists) and the one to be used is specified with multichoiceId.
+ @ If ignoreBPress is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button.
+ .macro multichoice x:req, y:req, multichoiceId:req, ignoreBPress:req
.byte 0x6f
.byte \x
.byte \y
- .byte \list
- .byte \b
+ .byte \multichoiceId
+ .byte \ignoreBPress
.endm
@ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made.
- @ Lists of options are predefined (sMultichoiceLists) and the one to be used is specified with list. The default argument determines
- @ the initial position of the cursor when the box is first opened; it is zero-indexed, and if it is too large, it is treated as 0x00.
- @ If b is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button.
- .macro multichoicedefault x:req, y:req, list:req, default:req, b:req
+ @ Lists of options are predefined (sMultichoiceLists) and the one to be used is specified with multichoiceId.
+ @ The default argument determines the initial position of the cursor when the box is first opened; it is zero-indexed, and if it is too large, it is treated as 0x00.
+ @ If ignoreBPress is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button.
+ .macro multichoicedefault x:req, y:req, multichoiceId:req, default:req, ignoreBPress:req
.byte 0x70
.byte \x
.byte \y
- .byte \list
+ .byte \multichoiceId
.byte \default
- .byte \b
+ .byte \ignoreBPress
.endm
@ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made.
- @ Lists of options are predefined (sMultichoiceLists) and the one to be used is specified with list.
+ @ Lists of options are predefined (sMultichoiceLists) and the one to be used is specified with multichoiceId.
@ The per_row argument determines how many list items will be shown on a single row of the box.
- .macro multichoicegrid x:req, y:req, list:req, per_row:req, B:req
+ @ If ignoreBPress is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button.
+ .macro multichoicegrid x:req, y:req, multichoiceId:req, per_row:req, ignoreBPress:req
.byte 0x71
.byte \x
.byte \y
- .byte \list
+ .byte \multichoiceId
.byte \per_row
- .byte \B
+ .byte \ignoreBPress
.endm
@ Nopped in Emerald.
@@ -886,21 +888,21 @@
.endm
@ Nopped in Emerald, but still consumes parameters.
- .macro erasebox byte1:req, byte2:req, byte3:req, byte4:req
+ .macro erasebox left:req, top:req, right:req, bottom:req
.byte 0x73
- .byte \byte1
- .byte \byte2
- .byte \byte3
- .byte \byte4
+ .byte \left
+ .byte \top
+ .byte \right
+ .byte \bottom
.endm
@ Nopped in Emerald, but still consumes parameters.
- .macro drawboxtext byte1:req, byte2:req, byte3:req, byte4:req
+ .macro drawboxtext left:req, top:req, multichoiceId:req, ignoreBPress:req
.byte 0x74
- .byte \byte1
- .byte \byte2
- .byte \byte3
- .byte \byte4
+ .byte \left
+ .byte \top
+ .byte \multichoiceId
+ .byte \ignoreBPress
.endm
@ Displays a box containing the front sprite for the specified (species) Pokemon species.
diff --git a/asm/macros/map.inc b/asm/macros/map.inc
index b520eb216..74ed06917 100644
--- a/asm/macros/map.inc
+++ b/asm/macros/map.inc
@@ -51,25 +51,25 @@
inc _num_traps
.endm
- .macro bg_event x, y, elevation, kind, arg6, arg7, arg8
+ .macro bg_event x, y, elevation, kind, arg6, arg7
.2byte \x, \y
.byte \elevation, \kind
.2byte 0
- .if \kind < 5
+ .if \kind != BG_EVENT_HIDDEN_ITEM
.4byte \arg6
.else
.2byte \arg6
- .byte \arg7, \arg8
+ .2byte \arg7
.endif
inc _num_signs
.endm
.macro bg_hidden_item_event x, y, height, item, flag
- bg_event \x, \y, \height, 7, \item, ((\flag) - FLAG_HIDDEN_ITEMS_START), 0
+ bg_event \x, \y, \height, BG_EVENT_HIDDEN_ITEM, \item, ((\flag) - FLAG_HIDDEN_ITEMS_START)
.endm
.macro bg_secret_base_event x, y, height, secret_base_id
- bg_event \x, \y, \height, 8, \secret_base_id, 0, 0
+ bg_event \x, \y, \height, BG_EVENT_SECRET_BASE, \secret_base_id
.endm
.macro map_events npcs, warps, traps, signs