summaryrefslogtreecommitdiff
path: root/asm/macros
diff options
context:
space:
mode:
authorGriffinR <griffin.richards@comcast.net>2019-11-28 21:09:35 -0500
committerhuderlem <huderlem@gmail.com>2019-12-05 21:11:17 -0600
commitbe17c1602d31d6f7d6601f27f2808b79a5644f7f (patch)
treef28eaa75204a47eeff2773e2c75e070092f537f7 /asm/macros
parent809811e722eceee82408a0f3179fad752b01b4c1 (diff)
Set up remaining facility script doc, use Palace macros
Diffstat (limited to 'asm/macros')
-rw-r--r--asm/macros/battle_frontier/battle_arena.inc78
-rw-r--r--asm/macros/battle_frontier/battle_palace.inc58
-rw-r--r--asm/macros/battle_frontier/battle_tower.inc2
3 files changed, 97 insertions, 41 deletions
diff --git a/asm/macros/battle_frontier/battle_arena.inc b/asm/macros/battle_frontier/battle_arena.inc
index 1c32de981..5539ffc59 100644
--- a/asm/macros/battle_frontier/battle_arena.inc
+++ b/asm/macros/battle_frontier/battle_arena.inc
@@ -1,45 +1,45 @@
- @ Initialize the Battle Arena challenge
- .macro arena_init
- setvar VAR_0x8004, BATTLE_ARENA_FUNC_INIT
- special CallBattleArenaFunction
- .endm
+ @ Initialize the Battle Arena challenge
+ .macro arena_init
+ setvar VAR_0x8004, BATTLE_ARENA_FUNC_INIT
+ special CallBattleArenaFunction
+ .endm
- @ Unused. Get the value of some ARENA_DATA_*. See GetArenaData for the data types that can be retrieved
- .macro arena_get data:req
- setvar VAR_0x8004, BATTLE_ARENA_FUNC_GET_DATA
- setvar VAR_0x8005, \data
- special CallBattleArenaFunction
- .endm
+ @ Unused. Get the value of some ARENA_DATA_*. See GetArenaData for the data types that can be retrieved
+ .macro arena_get data:req
+ setvar VAR_0x8004, BATTLE_ARENA_FUNC_GET_DATA
+ setvar VAR_0x8005, \data
+ special CallBattleArenaFunction
+ .endm
- @ Set some ARENA_DATA_* to val. See SetArenaData for the data types that can be set
- .macro arena_set data:req, val:req
- setvar VAR_0x8004, BATTLE_ARENA_FUNC_SET_DATA
- setvar VAR_0x8005, \data
- setvar VAR_0x8006, \val
- special CallBattleArenaFunction
- .endm
+ @ Set some ARENA_DATA_* to val. See SetArenaData for the data types that can be set
+ .macro arena_set data:req, val:req
+ setvar VAR_0x8004, BATTLE_ARENA_FUNC_SET_DATA
+ setvar VAR_0x8005, \data
+ setvar VAR_0x8006, \val
+ special CallBattleArenaFunction
+ .endm
- @ Save the game and set the challenge status
- .macro arena_save challengeStatus:req
- setvar VAR_0x8004, BATTLE_ARENA_FUNC_SAVE
- setvar VAR_0x8005, \challengeStatus
- special CallBattleArenaFunction
- .endm
+ @ Save the game and set the challenge status
+ .macro arena_save challengeStatus:req
+ setvar VAR_0x8004, BATTLE_ARENA_FUNC_SAVE
+ setvar VAR_0x8005, \challengeStatus
+ special CallBattleArenaFunction
+ .endm
- @ Unused. Set the reward item to give from one of two lists of possible awards, depending on streak.
- .macro arena_setreward
- setvar VAR_0x8004, BATTLE_ARENA_FUNC_SET_REWARD
- special CallBattleArenaFunction
- .endm
+ @ Unused. Set the prize item to give from one of two lists of possible prizes, depending on streak.
+ .macro arena_setprize
+ setvar VAR_0x8004, BATTLE_ARENA_FUNC_SET_PRIZE
+ special CallBattleArenaFunction
+ .endm
- @ Unused. Give the set award item to the player. TRUE if room in Bag for award, FALSE otherwise
- .macro arena_givereward
- setvar VAR_0x8004, BATTLE_ARENA_FUNC_GIVE_REWARD
- special CallBattleArenaFunction
- .endm
+ @ Unused. Give the set prize item to the player. TRUE if room in Bag for prize, FALSE otherwise
+ .macro arena_giveprize
+ setvar VAR_0x8004, BATTLE_ARENA_FUNC_GIVE_PRIZE
+ special CallBattleArenaFunction
+ .endm
- @ Buffer the opponents name to STR_VAR_1
- .macro arena_gettrainername
- setvar VAR_0x8004, BATTLE_ARENA_FUNC_GET_TRAINER_NAME
- special CallBattleArenaFunction
- .endm
+ @ Buffer the opponents name to STR_VAR_1
+ .macro arena_gettrainername
+ setvar VAR_0x8004, BATTLE_ARENA_FUNC_GET_TRAINER_NAME
+ special CallBattleArenaFunction
+ .endm
diff --git a/asm/macros/battle_frontier/battle_palace.inc b/asm/macros/battle_frontier/battle_palace.inc
index 2b59fd734..c7fc6ded2 100644
--- a/asm/macros/battle_frontier/battle_palace.inc
+++ b/asm/macros/battle_frontier/battle_palace.inc
@@ -1,7 +1,63 @@
-@ To be populated with macros for CallBattlePalaceFunction
+ @ Initialize the Battle Palace challenge
+ .macro palace_init
+ setvar VAR_0x8004, BATTLE_PALACE_FUNC_INIT
+ special CallBattlePalaceFunction
+ .endm
+
+ @ Get the value of some PALACE_DATA_*. See GetPalaceData for the data types that can be retrieved
+ .macro palace_get data:req
+ setvar VAR_0x8004, BATTLE_PALACE_FUNC_GET_DATA
+ setvar VAR_0x8005, \data
+ special CallBattlePalaceFunction
+ .endm
+
+ @ Set some PALACE_DATA_* to val. See SetPalaceData for the data types that can be set
+ .macro palace_set data:req, val:req
+ setvar VAR_0x8004, BATTLE_PALACE_FUNC_SET_DATA
+ setvar VAR_0x8005, \data
+ setvar VAR_0x8006, \val
+ special CallBattlePalaceFunction
+ .endm
+
+ @ Get the id of the comment to be made while being led through the corridor
+ .macro palace_getcomment
+ setvar VAR_0x8004, BATTLE_PALACE_FUNC_GET_COMMENT_ID
+ special CallBattlePalaceFunction
+ .endm
+
+ @ Unused. Choose and set the opponent gfx id. The equivalent macro from Battle Tower is used instead
+ .macro palace_setopponent
+ setvar VAR_0x8004, BATTLE_PALACE_FUNC_SET_OPPONENT
+ special CallBattlePalaceFunction
+ .endm
@ Buffer the opponents intro speech to gStringVar4. Also used by Battle Arena and Factory
.macro palace_getopponentintro
setvar VAR_0x8004, BATTLE_PALACE_FUNC_GET_OPPONENT_INTRO
special CallBattlePalaceFunction
.endm
+
+ @ Increments the current win streak by 1
+ .macro palace_incrementstreak
+ setvar VAR_0x8004, BATTLE_PALACE_FUNC_INCREMENT_STREAK
+ special CallBattlePalaceFunction
+ .endm
+
+ @ Save the game and set the challenge status
+ .macro palace_save challengeStatus:req
+ setvar VAR_0x8004, BATTLE_PALACE_FUNC_SAVE
+ setvar VAR_0x8005, \challengeStatus
+ special CallBattlePalaceFunction
+ .endm
+
+ @ Unused. Set the prize item to give from one of two lists of possible prizes, depending on streak.
+ .macro palace_setprize
+ setvar VAR_0x8004, BATTLE_PALACE_FUNC_SET_PRIZE
+ special CallBattleArenaFunction
+ .endm
+
+ @ Unused. Give the set prize item to the player. TRUE if room in Bag for prize, FALSE otherwise
+ .macro palace_giveprize
+ setvar VAR_0x8004, BATTLE_PALACE_FUNC_GIVE_PRIZE
+ special CallBattleArenaFunction
+ .endm
diff --git a/asm/macros/battle_frontier/battle_tower.inc b/asm/macros/battle_frontier/battle_tower.inc
index e9f8c9293..3a42438bb 100644
--- a/asm/macros/battle_frontier/battle_tower.inc
+++ b/asm/macros/battle_frontier/battle_tower.inc
@@ -1,7 +1,7 @@
@ To be populated with macros for CallBattleTowerFunc
.macro battletower_getstreak
- setvar VAR_0x8004, BATTLE_TOWER_FUNC_1
+ setvar VAR_0x8004, BATTLE_TOWER_FUNC_GET_DATA
setvar VAR_0x8005, 1
special CallBattleTowerFunc
.endm