From 1c8b05e7b059a98d4259f4129896d0cc1eaa3847 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sun, 24 Dec 2017 10:11:43 -0600 Subject: Name and use constants for special vars --- asm/macros/event.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'asm/macros') diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 738c2418e..5727c7383 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1366,11 +1366,11 @@ .endm .macro switch var - copyvar 0x8000, \var + copyvar SPECIALVAR_0, \var .endm .macro case condition, dest - compare_var_to_value 0x8000, \condition + compare_var_to_value SPECIALVAR_0, \condition goto_if_eq \dest .endm @@ -1386,12 +1386,12 @@ NO = 0 .macro giveitem_std item, amount=1, function=0 - setorcopyvar 0x8000, \item - setorcopyvar 0x8001, \amount + setorcopyvar SPECIALVAR_0, \item + setorcopyvar SPECIALVAR_1, \amount callstd \function .endm .macro givedecoration_std decoration - setorcopyvar 0x8000, \decoration + setorcopyvar SPECIALVAR_0, \decoration callstd 7 .endm -- cgit v1.2.3 From 2c4d972f7c5a79ca94dca599b6e7b9e2c769cf70 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sun, 24 Dec 2017 14:00:44 -0600 Subject: 'VAR_SPECIAL_X' instead of 'SPECIALVAR_X' --- asm/macros/event.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'asm/macros') diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 5727c7383..5176beff3 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1366,11 +1366,11 @@ .endm .macro switch var - copyvar SPECIALVAR_0, \var + copyvar VAR_SPECIAL_0, \var .endm .macro case condition, dest - compare_var_to_value SPECIALVAR_0, \condition + compare_var_to_value VAR_SPECIAL_0, \condition goto_if_eq \dest .endm @@ -1386,12 +1386,12 @@ NO = 0 .macro giveitem_std item, amount=1, function=0 - setorcopyvar SPECIALVAR_0, \item - setorcopyvar SPECIALVAR_1, \amount + setorcopyvar VAR_SPECIAL_0, \item + setorcopyvar VAR_SPECIAL_1, \amount callstd \function .endm .macro givedecoration_std decoration - setorcopyvar SPECIALVAR_0, \decoration + setorcopyvar VAR_SPECIAL_0, \decoration callstd 7 .endm -- cgit v1.2.3 From 6000e19e94c36b5d4b8c45b829b0506191282b44 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Mon, 25 Dec 2017 14:56:02 -0600 Subject: Add coord_weather_event macro, and define COORD_EVENT_WEATHER_* constants --- asm/macros/map.inc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'asm/macros') diff --git a/asm/macros/map.inc b/asm/macros/map.inc index 9c68e8414..a80a662b4 100644 --- a/asm/macros/map.inc +++ b/asm/macros/map.inc @@ -40,6 +40,10 @@ inc _num_traps .endm + .macro coord_weather_event x, y, height, weather + coord_event \x, \y, \height, 0, \weather, 0, 0, 0x0 + .endm + .macro bg_event x, y, byte, kind, word, arg6, arg7, arg8 .2byte \x, \y .byte \byte, \kind -- cgit v1.2.3 From 80cddf0cd4946d85e5e23ec90c530ca2ea54732d Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Tue, 26 Dec 2017 14:03:01 -0600 Subject: Add bg_hidden_item_event macro, and define hidden item flags --- asm/macros/map.inc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'asm/macros') diff --git a/asm/macros/map.inc b/asm/macros/map.inc index a80a662b4..6e4005f7d 100644 --- a/asm/macros/map.inc +++ b/asm/macros/map.inc @@ -57,6 +57,10 @@ inc _num_signs .endm + .macro bg_hidden_item_event x, y, height, item, flag + bg_event \x, \y, \height, 7, 0, \item, ((\flag) - FLAG_HIDDEN_ITEMS_START), 0 + .endm + .macro map_events npcs, warps, traps, signs .byte _num_npcs, _num_warps, _num_traps, _num_signs .4byte \npcs, \warps, \traps, \signs -- cgit v1.2.3 From 82230589d1170e14c48b6d8b5ccadd8ded5465ce Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Tue, 26 Dec 2017 16:08:02 -0600 Subject: Add bg_secret_base_event macro, and define secret base id constants --- asm/macros/map.inc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'asm/macros') diff --git a/asm/macros/map.inc b/asm/macros/map.inc index 6e4005f7d..db37d9346 100644 --- a/asm/macros/map.inc +++ b/asm/macros/map.inc @@ -61,6 +61,10 @@ bg_event \x, \y, \height, 7, 0, \item, ((\flag) - FLAG_HIDDEN_ITEMS_START), 0 .endm + .macro bg_secret_base_event x, y, height, secret_base_id + bg_event \x, \y, \height, 8, 0, \secret_base_id, 0, 0 + .endm + .macro map_events npcs, warps, traps, signs .byte _num_npcs, _num_warps, _num_traps, _num_signs .4byte \npcs, \warps, \traps, \signs -- cgit v1.2.3