From 35cffea9874a8b135eddade958b62ee2ecf441c1 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 30 Mar 2019 12:37:18 +0100 Subject: Helpful macros for atk49 --- asm/macros/battle_script.inc | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'asm/macros') diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index ed32e4643..7a1af4c17 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -403,6 +403,38 @@ .byte \param0 .byte \param1 .endm + + @ Help macros for 5 uses of moveend command + + @ All cases + .macro moveendall + setbyte sMOVEEND_STATE, 0 + moveend 0, 0 + .endm + + @ Chosen case + .macro moveendcase case:req + setbyte sMOVEEND_STATE, \case + moveend 1, 0 + .endm + + @ All cases from (inclusive) + .macro moveendfrom from:req + setbyte sMOVEEND_STATE, \from + moveend 0, 0 + .endm + + @ All cases from 0 to (not inclusive) + .macro moveendto to:req + setbyte sMOVEEND_STATE, 0 + moveend 2, \to + .endm + + @ Cases from (inclusive) to (not inclusive) + .macro moveendfromto from:req, to:req + setbyte sMOVEEND_STATE, \from + moveend 2, \to + .endm .macro typecalc2 .byte 0x4a -- cgit v1.2.3 From 1aa95a1821cd4ebe552a39bbfed067a305071e31 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Tue, 2 Apr 2019 08:36:22 +0200 Subject: Document a bit of anims --- asm/macros/battle_anim_script.inc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'asm/macros') diff --git a/asm/macros/battle_anim_script.inc b/asm/macros/battle_anim_script.inc index 6ccd8d505..32d9de82c 100644 --- a/asm/macros/battle_anim_script.inc +++ b/asm/macros/battle_anim_script.inc @@ -153,19 +153,19 @@ .byte \param4 .endm - .macro loopsewithpan se:req, param1:req, param2:req, param3:req + .macro loopsewithpan se:req, pan:req, wait:req, times:req .byte 0x1c .2byte \se - .byte \param1 - .byte \param2 - .byte \param3 + .byte \pan + .byte \wait + .byte \times .endm - .macro waitplaysewithpan se:req, param1:req, param2:req + .macro waitplaysewithpan se:req, pan:req, wait:req .byte 0x1d .2byte \se - .byte \param1 - .byte \param2 + .byte \pan + .byte \wait .endm .macro setbldcnt param0:req -- cgit v1.2.3 From 4fadbaf16153c0160f6ad38dc0053e7ff6db7472 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 3 Apr 2019 09:55:17 -0400 Subject: Minor fixes gotoram --> returnram cmdCF/execram --> gotoram fix indentation in sym_ewram.txt fix mevent_client.h guard name --- asm/macros/event.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'asm/macros') diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 8b3466fe7..e00bdb600 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -77,7 +77,7 @@ .endm @ Executes a script stored in a default RAM location. - .macro gotoram + .macro returnram .byte 0x0c .endm @@ -1440,7 +1440,7 @@ .endm @ Depending on factors I haven't managed to understand yet, this command may cause script execution to jump to the offset specified by the pointer at 0x020375C0. - .macro execram + .macro gotoram .byte 0xcf .endm -- cgit v1.2.3 From 90e32f4ec57f6597dc02b11dcae54b14e9d4ceaa Mon Sep 17 00:00:00 2001 From: Fontbane Date: Wed, 3 Apr 2019 14:13:11 -0400 Subject: Document landmark setting and item balls --- asm/macros/battle_script.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'asm/macros') diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index 7a1af4c17..997af51cc 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -1124,7 +1124,7 @@ .byte 0xdd .endm - .macro asistattackselect param0:req + .macro assistattackselect param0:req .byte 0xde .4byte \param0 .endm -- cgit v1.2.3