summaryrefslogtreecommitdiff
path: root/asm/macros
diff options
context:
space:
mode:
authorGriffinR <griffin.richards@comcast.net>2019-12-02 08:44:34 -0500
committerhuderlem <huderlem@gmail.com>2019-12-05 21:11:17 -0600
commit9fcfbdbef563063f96ff61a95eaf0b6556db56e2 (patch)
tree3c9d40b46a5bdead5eedd9dc90cdcf3b3fef6376 /asm/macros
parent41c1c9ca8a472573e5acaea26bf3682399f50e35 (diff)
Set up Battle Factory macros
Diffstat (limited to 'asm/macros')
-rw-r--r--asm/macros/battle_frontier/battle_factory.inc104
1 files changed, 103 insertions, 1 deletions
diff --git a/asm/macros/battle_frontier/battle_factory.inc b/asm/macros/battle_frontier/battle_factory.inc
index 9a8879df8..f5ef7bda9 100644
--- a/asm/macros/battle_frontier/battle_factory.inc
+++ b/asm/macros/battle_frontier/battle_factory.inc
@@ -1 +1,103 @@
-@ To be populated with macros for CallBattleFactoryFunction
+@ TODO: Add explanatory comments
+
+ @
+ .macro factory_init
+ setvar VAR_0x8004, BATTLE_FACTORY_FUNC_INIT
+ special CallBattleFactoryFunction
+ .endm
+
+ @
+ .macro factory_get data:req
+ setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GET_DATA
+ setvar VAR_0x8005, \data
+ special CallBattleFactoryFunction
+ .endm
+
+ @
+ .macro factory_set data:req, val=0xFFFF
+ setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_DATA
+ setvar VAR_0x8005, \data
+ .if \val == 0xFFFF
+ @ argument not provided
+ .elseif \val >= VARS_START
+ copyvar VAR_0x8006, \val
+ .else
+ setvar VAR_0x8006, \val
+ .endif
+ special CallBattleFactoryFunction
+ .endm
+
+ @
+ .macro factory_save challengeStatus:req
+ setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SAVE
+ setvar VAR_0x8005, \challengeStatus
+ special CallBattleFactoryFunction
+ .endm
+
+ @
+ .macro factory_rentmons
+ setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SELECT_RENT_MONS
+ special CallBattleFactoryFunction
+ .endm
+
+ @
+ .macro factory_swapmons
+ setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SWAP_RENT_MONS
+ special CallBattleFactoryFunction
+ .endm
+
+ @
+ .macro factory_setswapped
+ setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_SWAPPED
+ special CallBattleFactoryFunction
+ .endm
+
+ @
+ .macro factory_setopponentmons
+ setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_OPPONENT_MONS
+ special CallBattleFactoryFunction
+ .endm
+
+ @
+ .macro factory_setparties arg:req
+ setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_PARTIES
+ setvar VAR_0x8005, \arg
+ special CallBattleFactoryFunction
+ .endm
+
+ @
+ .macro factory_setopponentgfx
+ setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_OPPONENT_GFX
+ special CallBattleFactoryFunction
+ .endm
+
+ @
+ .macro factory_generateopponentmons
+ setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GENERATE_OPPONENT_MONS
+ special CallBattleFactoryFunction
+ .endm
+
+ @
+ .macro factory_generaterentalmons
+ setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GENERATE_RENTAL_MONS
+ special CallBattleFactoryFunction
+ .endm
+
+ @
+ .macro factory_getopponentmontype
+ setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GET_OPPONENT_MON_TYPE
+ special CallBattleFactoryFunction
+ .endm
+
+ @
+ .macro factory_getopponentstyle
+ setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GET_OPPONENT_STYLE
+ special CallBattleFactoryFunction
+ .endm
+
+ @
+ .macro factory_resethelditems
+ setvar VAR_0x8004, BATTLE_FACTORY_FUNC_RESET_HELD_ITEMS
+ special CallBattleFactoryFunction
+ .endm
+