summaryrefslogtreecommitdiff
path: root/asm/macros
diff options
context:
space:
mode:
Diffstat (limited to 'asm/macros')
-rw-r--r--asm/macros/event.inc23
-rw-r--r--asm/macros/map.inc4
-rw-r--r--asm/macros/movement.inc2
3 files changed, 24 insertions, 5 deletions
diff --git a/asm/macros/event.inc b/asm/macros/event.inc
index 7ce50a5e1..21e3e65c0 100644
--- a/asm/macros/event.inc
+++ b/asm/macros/event.inc
@@ -37,6 +37,13 @@
.4byte \destination
.endm
+ lt = 0
+ eq = 1
+ gt = 2
+ le = 3
+ ge = 4
+ ne = 5
+
@ If the result of the last comparison matches condition (see Comparison operators), calls destination.
.macro call_if condition, destination
.byte 0x07
@@ -1225,10 +1232,9 @@
.byte 0xb7
.endm
- .macro setvaddress long, word
+ .macro setvaddress long
.byte 0xb8
.4byte \long
- .2byte \word
.endm
.macro vgoto pointer
@@ -1406,7 +1412,7 @@
@ Supplementary
.macro goto_if_eq dest
- goto_if 1, \dest
+ goto_if eq, \dest
.endm
.macro switch var
@@ -1442,3 +1448,14 @@
setorcopyvar 0x8002, \fanfare
callstd 9
.endm
+
+ .macro famechecker person:req, index:req, function=SetFlavorTextFlagFromSpecialVars
+ setvar VAR_0x8004, \person
+ setvar VAR_0x8005, \index
+ special \function
+ .endm
+
+ .macro set_gym_trainers gym:req
+ setvar VAR_0x8008, \gym
+ call EventScript_1A6B18
+ .endm
diff --git a/asm/macros/map.inc b/asm/macros/map.inc
index 075993fd3..d903899fe 100644
--- a/asm/macros/map.inc
+++ b/asm/macros/map.inc
@@ -55,8 +55,8 @@
inc _num_signs
.endm
- .macro bg_hidden_item_event x, y, height, item, flag, unknown
- bg_event \x, \y, \height, 7, 0, \item, \flag, \unknown
+ .macro bg_hidden_item_event x, y, height, item, flag, quantity, underfoot
+ bg_event \x, \y, \height, 7, 0, \item, \flag, \quantity | (\underfoot << 7)
.endm
.macro map_events npcs, warps, traps, signs
diff --git a/asm/macros/movement.inc b/asm/macros/movement.inc
index f077a8f5a..8ad5a313e 100644
--- a/asm/macros/movement.inc
+++ b/asm/macros/movement.inc
@@ -110,6 +110,8 @@
create_movement step_65
create_movement step_66
create_movement step_67
+ create_movement step_68
+ create_movement step_69
enum_start 0x91
create_movement step_91