diff options
author | yenatch <yenatch@gmail.com> | 2017-12-12 19:13:53 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-12 19:13:53 -0500 |
commit | 6cf7c0790f3424a4cb472b274a88d04d449d5231 (patch) | |
tree | 7d3c49aaaa6d50f6ea698e95e7204e6d0b76bcca /docs | |
parent | f6942b9a136b2ee3b25159ebc4d54509a42c5266 (diff) | |
parent | f0ab09125493f91d66af836e0abb977459a0d801 (diff) |
Merge pull request #414 from roukaour/master
Improve sprite constants and documentation
Diffstat (limited to 'docs')
-rw-r--r-- | docs/event_commands.md (renamed from docs/scripting_commands.md) | 2 | ||||
-rw-r--r-- | docs/map_scripts.md | 53 | ||||
-rw-r--r-- | docs/move_anim_commands.md | 99 | ||||
-rw-r--r-- | docs/movement_commands.md | 81 | ||||
-rw-r--r-- | docs/text_commands.md | 132 |
5 files changed, 350 insertions, 17 deletions
diff --git a/docs/scripting_commands.md b/docs/event_commands.md index 32ba7d338..662159481 100644 --- a/docs/scripting_commands.md +++ b/docs/event_commands.md @@ -1,4 +1,4 @@ -# Scripting Commands +# Event Commands ## `$00`: `scall` *script* diff --git a/docs/map_scripts.md b/docs/map_scripts.md index edd3657ec..f26de1949 100644 --- a/docs/map_scripts.md +++ b/docs/map_scripts.md @@ -3,7 +3,7 @@ ## `const_value set 2` -### `const` *`MAPNAME_PERSONNAME`* +- **`const` *`MAPNAME_PERSONNAME`*** ## `MapName_MapScriptHeader:` @@ -11,24 +11,45 @@ ## `.MapTriggers: db` *N* -### `maptrigger` *script* +- **`maptrigger` *script*** ## `.MapCallbacks: db` *N* -### `dbw` *type*, *script* +- **`dbw` *type*, *script*** +Callback types: -## Scripts +- **`MAPCALLBACK_NEWMAP`** + +- **`MAPCALLBACK_TILES`** + +- **`MAPCALLBACK_OBJECTS`** + +- **`MAPCALLBACK_SPRITES`** + +- **`MAPCALLBACK_CMDQUEUE`** + + **`dbw CMDQUEUE_STONETABLE,` *table_pointer*** + + **`stonetable` *warp_id*, *person*, *script*** + + **`db -1 ; end`** + + +## Event scripts + +[Event commands](event_commands.md) ## Text -- **`text`** -- **`line`** -- **`cont`** -- **`para`** -- **`done`** +[Text commands](text_commands.md) + + +## Movement data + +[Movement commands](movement_commands.md) ## `MapName_MapEventHeader:` @@ -39,19 +60,19 @@ ## `.Warps: db` *N* -### `warp_def` *y*, *x*, *warp_id*, *map* +- **`warp_def` *y*, *x*, *warp_id*, *map*** ## `.XYTriggers: db` *N* -### `xy_trigger` *id*, *y*, *x*, `$0`, *script*, `$0`, `$0` +- **`xy_trigger` *id*, *y*, *x*, `$0`, *script*, `$0`, `$0`** ## `.Signposts: db` *N* -### `signpost` *y*, *x*, *type*, *script* +- **`signpost` *y*, *x*, *type*, *script*** -#### Signpost types: +Signpost types: - **`SIGNPOST_READ`** @@ -69,9 +90,9 @@ ## `.PersonEvents: db` *N* -### `person_event` *sprite*, *y*, *x*, *movement*, *ry*, *rx*, *hour*, *daytime*, *palette*, *type*, *range*, *script*, *event_flag* +- **`person_event` *sprite*, *y*, *x*, *movement*, *ry*, *rx*, *hour*, *daytime*, *palette*, *type*, *range*, *script*, *event_flag*** -#### Movement types: +Movement types: - **`SPRITEMOVEDATA_ITEM_TREE`** @@ -105,7 +126,7 @@ - **`SPRITEMOVEDATA_LAPRAS`** -#### Person types: +Person types: - **`PERSONTYPE_SCRIPT`** diff --git a/docs/move_anim_commands.md b/docs/move_anim_commands.md new file mode 100644 index 000000000..5669187f7 --- /dev/null +++ b/docs/move_anim_commands.md @@ -0,0 +1,99 @@ +# Move Animation Commands + +## `$00`−`$EF`: `anim_wait` *length* + +## `$D0`: `anim_obj` *object*, *x*, *y*, *param* + +## `$D1`: `anim_1gfx` *gfx* + +## `$D2`: `anim_2gfx` *gfx1*, *gfx2* + +## `$D3`: `anim_3gfx` *gfx1*, *gfx2*, *gfx3* + +## `$D4`: `anim_4gfx` *gfx1*, *gfx2*, *gfx3*, *gfx4* + +## `$D5`: `anim_5gfx` *gfx1*, *gfx2*, *gfx3*, *gfx4*, *gfx5* + +## `$D6`: `anim_incobj` *id* + +## `$D7`: `anim_setobj` *id*, *object* + +## `$D8`: `anim_incbgeffect` *effect* + +## `$D9`: `anim_enemyfeetobj` + +## `$DA`: `anim_playerheadobj` + +## `$DB`: `anim_checkpokeball` + +## `$DC`: `anim_transform` + +## `$DD`: `anim_raisesub` + +## `$DE`: `anim_dropsub` + +## `$DF`: `anim_resetobp0` + +## `$E0`: `anim_sound` *duration*, *tracks*, *id* + +## `$E1`: `anim_cry` *pitch* + +## `$E2`: `anim_minimizeopp` + +## `$E3`: `anim_oamon` + +## `$E4`: `anim_oamoff` + +## `$E5`: `anim_clearobjs` + +## `$E6`: `anim_beatup` + +## `$E7`: `anim_0xe7` + +## `$E8`: `anim_updateactorpic` + +## `$E9`: `anim_minimize` + +## `$EA`: `anim_0xea` + +## `$EB`: `anim_0xeb` + +## `$EC`: `anim_0xec` + +## `$ED`: `anim_0xed` + +## `$EE`: `anim_if_param_and` *value*, *address* + +## `$EF`: `anim_jumpuntil` *address* + +## `$F0`: `anim_bgeffect` *effect*, *unknown1*, *unknown2*, *unknown3* + +## `$F1`: `anim_bgp` *colors* + +## `$F2`: `anim_obp0` *colors* + +## `$F3`: `anim_obp1` *colors* + +## `$F4`: `anim_clearsprites` + +## `$F5`: `anim_0xf5` + +## `$F6`: `anim_0xf6` + +## `$F7`: `anim_0xf7` + +## `$F8`: `anim_if_param_equal` *value*, *address* + +## `$F9`: `anim_setvar` *value* + +## `$FA`: `anim_incvar` + +## `$FB`: `anim_if_var_equal` *value*, *address* + +## `$FC`: `anim_jump` *address* + +## `$FD`: `anim_loop` *count*, *address* + +## `$FE`: `anim_call` *address* + +## `$FF`: `anim_ret` diff --git a/docs/movement_commands.md b/docs/movement_commands.md new file mode 100644 index 000000000..702bd1f6c --- /dev/null +++ b/docs/movement_commands.md @@ -0,0 +1,81 @@ +# Movement Commands + +## `$00`−`$03`: `turn_head` *direction* + +## `$04`−`$07`: `turn_step` *direction* + +## `$08`−`$0B`: `slow_step` *direction* + +## `$0C`−`$0F`: `step` *direction* + +## `$10`−`$13`: `big_step` *direction* + +## `$14`−`$17`: `slow_slide_step` *direction* + +## `$18`−`$1B`: `slide_step` *direction* + +## `$1C`−`$1F`: `fast_slide_step` *direction* + +## `$20`−`$23`: `turn_away` *direction* + +## `$24`−`$27`: `turn_in` *direction* + +## `$28`−`$2B`: `turn_waterfall` *direction* + +## `$2C`−`$2F`: `slow_jump_step` *direction* + +## `$30`−`$33`: `jump_step` *direction* + +## `$34`−`$37`: `fast_jump_step` *direction* + +## `$38`: `remove_sliding` + +## `$39`: `set_sliding` + +## `$3A`: `remove_fixed_facing` + +## `$3B`: `fix_facing` + +## `$3C`: `show_person` + +## `$3D`: `hide_person` + +## `$3E`−`$46`: `step_sleep` *length* + +## `$47`: `step_end` + +## `$48`: `step_48` *param* + +## `$49`: `remove_person` + +## `$4A`: `step_loop` + +## `$4B`: `step_4b` + +## `$4C`: `teleport_from` + +## `$4D`: `teleport_to` + +## `$4E`: `skyfall` + +## `$4F`: `step_dig` *length* + +## `$50`: `step_bump` + +## `$51`: `fish_got_bite` + +## `$52`: `fish_cast_rod` + +## `$53`: `hide_emote` + +## `$54`: `show_emote` + +## `$55`: `step_shake` *displacement* + +## `$56`: `tree_shake` + +## `$57`: `rock_smash` *length* + +## `$58`: `return_dig` *length* + +## `$59`: `skyfall_top` diff --git a/docs/text_commands.md b/docs/text_commands.md new file mode 100644 index 000000000..865ea69b5 --- /dev/null +++ b/docs/text_commands.md @@ -0,0 +1,132 @@ +# Text Commands + +## `$00`: `text` *text* + +Start writing text until `"@"`. + +## `$4E`: `next` *text* + +Move a line down. + +## `$4F`: `line` *text* + +Start writing at the bottom line. + +## `$50`: `page` *text* + +Start a new Pokédex page. + +## `$51`: `para` *text* + +Start a new paragraph. + +## `$55`: `cont` *text* + +Scroll to the next line. + +## `$57`: `done` + +End a text box. + +## `$58`: `prompt` + +Prompt the player to end a text box (initiating some other event). + +## `$01`: `text_from_ram` *address* + +Write text from a RAM address. + +## `$02`: `text_bcd` *address*, *flags* + +Write [BCD](bcd) from an address, typically RAM. + +[bcd]: https://en.wikipedia.org/wiki/Binary-coded_decimal + +## `$03`: `text_move` *address* + +Move to a new tile. + +## `$04`: `text_box` *address*, *height*, *width* + +Draw a box. + +## `$05`: `text_low` + +Write text at (1, 16). + +## `$06`: `text_waitbutton` + +Wait for button press; show arrow. + +## `$07`: `text_scroll` + +Pushes text up two lines and sets the `bc` cursor to the border tile below the +first character column of the text box. + +## `$08`: `start_asm` + +Start interpreting assembly code. + +## `$09`: `deciram` *address*, *bytes*, *digits* + +Read *bytes* bytes from *address* and print them as a *digits*-digit number. + +## `$0A`: `interpret_data` + +Exit. + +## `$0B`: `sound_dex_fanfare_50_79` + +Play `SFX_DEX_FANFARE_50_79`. + +## `$0C`: `limited_interpret_data` *number* + +Print *number* `"…"`s. + +## `$0D`: `link_wait_button` + +Wait for button press; show arrow. + +## `$0E`: `sound_dex_fanfare_20_49` + +Play `SFX_DEX_FANFARE_20_49`. + +## `$0F`: `sound_item` + +Play `SFX_ITEM`. + +## `$10`: `sound_caught_mon` + +Play `SFX_CAUGHT_MON`. + +## `$11`: `sound_dex_fanfare_80_109` + +Play `SFX_DEX_FANFARE_80_109`. + +## `$12`: `sound_fanfare` + +Play `SFX_FANFARE`. + +## `$13`: `sound_slot_machine_start` + +Play `SFX_SLOT_MACHINE_START`. + +## `$14`: `text_buffer` *id* + +Write text from one of the following addresses (listed in `StringBufferPointers`): + +0. `StringBuffer3` +1. `StringBuffer4` +2. `StringBuffer5` +3. `StringBuffer2` +4. `StringBuffer1` +5. `EnemyMonNick` +6. `BattleMonNick` + +## `$15`: `current_day` + +Print the weekday. + +## `$16`: `text_jump` *address* + +Write text from a different bank. |