summaryrefslogtreecommitdiff
path: root/docs/battle_anim_commands.md
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2018-01-22 01:06:48 -0500
committerGitHub <noreply@github.com>2018-01-22 01:06:48 -0500
commitc60f1331fef22b886adf3472d2b4f348832cfaf7 (patch)
tree5a471fad61e406f5b3ca1aba67ced0186de01c52 /docs/battle_anim_commands.md
parentf27f79488a460f0a89670f3611e1e9e175baf5d6 (diff)
parent7fba864883732ccecb1221ae7ff97492d112362a (diff)
Merge pull request #456 from Rangi42/master
OAM data documentation; move more content into data/; move palettes into gfx/; more code+script constants; consistent map naming
Diffstat (limited to 'docs/battle_anim_commands.md')
-rw-r--r--docs/battle_anim_commands.md78
1 files changed, 53 insertions, 25 deletions
diff --git a/docs/battle_anim_commands.md b/docs/battle_anim_commands.md
index e7eb4a98f..bd40e8a6d 100644
--- a/docs/battle_anim_commands.md
+++ b/docs/battle_anim_commands.md
@@ -3,13 +3,14 @@
Defined in [macros/scripts/battle_anims.asm](/macros/scripts/battle_anims.asm) and [engine/battle_anims/anim_commands.asm:BattleAnimCommands](/engine/battle_anims/anim_commands.asm).
-## `$00`−`$CF`: `anim_wait` *length*
+## `$00`−`$CF`: <code>anim_wait <i>length</i></code>
- *length*: duration in frames
-## `$D0`: `anim_obj` *object*, *x*, *y*, *param*
-*Alternate*: `anim_obj` *object*, *x_tile*, *x*, *y_tile*, *y*, *param*
+## `$D0`: <code>anim_obj <i>object</i>, <i>x</i>, <i>y</i>, <i>param</i></code>
+
+***Alternate*: <code>anim_obj <i>object</i>, <i>x_tile</i>, <i>x</i>, <i>y_tile</i>, <i>y</i>, <i>param</i></code>**
Spawns an *object* at coordinate (*x*, *y*).
@@ -28,22 +29,26 @@ The y position also depends on the y offset defined by the object.
- *TODO: document each object*
-## `$D1`: `anim_1gfx` *gfx*
+## `$D1`: <code>anim_1gfx <i>gfx</i></code>
+
+
+## `$D2`: <code>anim_2gfx <i>gfx1</i>, <i>gfx2</i></code>
+
-## `$D2`: `anim_2gfx` *gfx1*, *gfx2*
+## `$D3`: <code>anim_3gfx <i>gfx1</i>, <i>gfx2</i>, <i>gfx3</i></code>
-## `$D3`: `anim_3gfx` *gfx1*, *gfx2*, *gfx3*
-## `$D4`: `anim_4gfx` *gfx1*, *gfx2*, *gfx3*, *gfx4*
+## `$D4`: <code>anim_4gfx <i>gfx1</i>, <i>gfx2</i>, <i>gfx3</i>, <i>gfx4</i></code>
-## `$D5`: `anim_5gfx` *gfx1*, *gfx2*, *gfx3*, *gfx4*, *gfx5*
+
+## `$D5`: <code>anim_5gfx <i>gfx1</i>, <i>gfx2</i>, <i>gfx3</i>, <i>gfx4</i>, <i>gfx5</i></code>
Loads 1-5 sets of graphics. Will overwrite any previously loaded sets.
- *gfx*: `ANIM_GFX` constants (see [constants/battle_anim_constants.asm](/constants/battle_anim_constants.asm))
-## `$D6`: `anim_incobj` *object_id*
+## `$D6`: <code>anim_incobj <i>object_id</i></code>
Increments an object's state.
@@ -51,7 +56,8 @@ Increments an object's state.
Objects are state machines. `anim_incobj` progresses the state of an object.
-## `$D7`: `anim_setobj` *object_id*, *state*
+
+## `$D7`: <code>anim_setobj <i>object_id</i>, <i>state</i></code>
Sets an object's state to a specific value.
@@ -60,7 +66,8 @@ Sets an object's state to a specific value.
Objects are state machines. `anim_setobj` changes the state of an object.
-## `$D8`: `anim_incbgeffect` *bg_effect*
+
+## `$D8`: <code>anim_incbgeffect <i>bg_effect</i></code>
Increments a bg effect's state.
@@ -73,6 +80,7 @@ Since there can't be two of the same bg effect, the effect type is used. This is
Temporarily creates sprites from the bottom row of the enemy frontpic, so that the player backpic can be moved around without corrupting the enemy frontpic.
+
## `$DA`: `anim_playerheadobj`
Temporarily creates sprites from the top row of the player backpic, so that the enemy frontpic can be moved around without corrupting the player backpic.
@@ -85,8 +93,10 @@ Sets `BattleAnimVar` to the result of [GetPokeBallWobble](/engine/battle_anims/g
## `$DC`: `anim_transform`
+
## `$DD`: `anim_raisesub`
+
## `$DE`: `anim_dropsub`
@@ -95,11 +105,12 @@ Sets `BattleAnimVar` to the result of [GetPokeBallWobble](/engine/battle_anims/g
Resets rOBP0 to the default (`q0123` or `%00011011`).
-## `$E0`: `anim_sound` *duration*, *tracks*, *sound_id*
+## `$E0`: <code>anim_sound <i>duration</i>, <i>tracks</i>, <i>sound_id</i></code>
Plays a sound.
-## `$E1`: `anim_cry` *pitch*
+
+## `$E1`: <code>anim_cry <i>pitch</i></code>
Plays the user's cry.
@@ -109,6 +120,7 @@ Plays the user's cry.
## `$E3`: `anim_oamon`
+
## `$E4`: `anim_oamoff`
@@ -127,6 +139,7 @@ Does nothing. Unused.
## `$E8`: `anim_updateactorpic`
+
## `$E9`: `anim_minimize`
@@ -134,40 +147,46 @@ Does nothing. Unused.
Does nothing. Unused.
+
## `$EB`: `anim_0xeb`
Does nothing. Unused.
+
## `$EC`: `anim_0xec`
Does nothing. Unused.
+
## `$ED`: `anim_0xed`
Does nothing. Unused.
-## `$EE`: `anim_if_param_and` *value*, *address*
+## `$EE`: <code>anim_if_param_and <i>value</i>, <i>address</i></code>
-## `$EF`: `anim_jumpuntil` *address*
+
+## `$EF`: <code>anim_jumpuntil <i>address</i></code>
Jumps to another script and decrements `param` until it reaches 0. Similar to `anim_loop`.
-## `$F0`: `anim_bgeffect` *bg_effect*, *unknown1*, *unknown2*, *unknown3*
+## `$F0`: <code>anim_bgeffect <i>bg_effect</i>, <i>unknown1</i>, <i>unknown2</i>, <i>unknown3</i></code>
- *bg_effect*: `ANIM_BG` constants (see [constants/battle_anim_constants.asm](/constants/battle_anim_constants.asm))
-## `$F1`: `anim_bgp` *colors*
+## `$F1`: <code>anim_bgp <i>colors</i></code>
Sets `rBGP` to *colors*.
-## `$F2`: `anim_obp0` *colors*
+
+## `$F2`: <code>anim_obp0 <i>colors</i></code>
Sets `rOBP0` to *colors*.
-## `$F3`: `anim_obp1` *colors*
+
+## `$F3`: <code>anim_obp1 <i>colors</i></code>
Sets `rOBP1` to *colors*.
@@ -179,45 +198,54 @@ Sets `rOBP1` to *colors*.
Does nothing. Unused.
+
## `$F6`: `anim_0xf6`
Does nothing. Unused.
+
## `$F7`: `anim_0xf7`
Does nothing. Unused.
-## `$F8`: `anim_if_param_equal` *value*, *address*
+## `$F8`: <code>anim_if_param_equal <i>value</i>, <i>address</i></code>
Jumps to another script if `wBattleAnimParam` (aka `wKickCounter` or `wPresentPower`) is equal to *value*.
-## `$F9`: `anim_setvar` *value*
+
+## `$F9`: <code>anim_setvar <i>value</i></code>
Sets `BattleAnimVar` to *value*.
+
## `$FA`: `anim_incvar`
Increments `BattleAnimVar` by 1.
-## `$FB`: `anim_if_var_equal` *value*, *address*
+
+## `$FB`: <code>anim_if_var_equal <i>value</i>, <i>address</i></code>
Jumps to another script if `BattleAnimVar` is equal to *value*.
-## `$FC`: `anim_jump` *address*
+
+## `$FC`: <code>anim_jump <i>address</i></code>
Jumps to another script.
-## `$FD`: `anim_loop` *count*, *address*
+
+## `$FD`: <code>anim_loop <i>count</i>, <i>address</i></code>
Jumps to another script up to *count* times. Then does nothing, allowing execution to continue.
-## `$FE`: `anim_call` *address*
+
+## `$FE`: <code>anim_call <i>address</i></code>
Calls a script.
There is no call stack. The return address is overwritten, so the maximum call depth is 1.
+
## `$FF`: `anim_ret`
Ends the script and returns to where it was called from. If there was no caller, the animation ends.