From c5675927feefc60a286de1725515d1475a30ca2c Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 12 Dec 2017 12:18:11 -0500 Subject: Identify more sprite-related constants --- docs/map_scripts.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'docs') diff --git a/docs/map_scripts.md b/docs/map_scripts.md index edd3657ec..e259638dd 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,16 +11,18 @@ ## `.MapTriggers: db` *N* -### `maptrigger` *script* +- **`maptrigger` *script*** ## `.MapCallbacks: db` *N* -### `dbw` *type*, *script* +- **`dbw` *type*, *script*** ## Scripts +[Scripting commands](docs/scripting_commands.md) + ## Text @@ -39,19 +41,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 +71,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 +107,7 @@ - **`SPRITEMOVEDATA_LAPRAS`** -#### Person types: +Person types: - **`PERSONTYPE_SCRIPT`** -- cgit v1.2.3 From 5b13a7a13b9ebbb26a75b9ef19221e8e140c221b Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 12 Dec 2017 13:22:19 -0500 Subject: Identify more sprite-related constants Start more documentation --- docs/move_anim_commands.md | 99 ++++++++++++++++++++++++++++++++++++++++++++++ docs/movement_commands.md | 81 +++++++++++++++++++++++++++++++++++++ 2 files changed, 180 insertions(+) create mode 100644 docs/move_anim_commands.md create mode 100644 docs/movement_commands.md (limited to 'docs') 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` -- cgit v1.2.3 From 0b34c997d6b24ff3b229396c2b8351f08a132410 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 12 Dec 2017 13:51:07 -0500 Subject: Add basic documentation for text commands. --- docs/event_commands.md | 345 +++++++++++++++++++++++++++++++++++++++++++++ docs/map_scripts.md | 15 +- docs/scripting_commands.md | 345 --------------------------------------------- docs/text_commands.md | 131 +++++++++++++++++ 4 files changed, 484 insertions(+), 352 deletions(-) create mode 100644 docs/event_commands.md delete mode 100644 docs/scripting_commands.md create mode 100644 docs/text_commands.md (limited to 'docs') diff --git a/docs/event_commands.md b/docs/event_commands.md new file mode 100644 index 000000000..662159481 --- /dev/null +++ b/docs/event_commands.md @@ -0,0 +1,345 @@ +# Event Commands + +## `$00`: `scall` *script* + +## `$01`: `farscall` *script* + +## `$02`: `ptcall` *script* + +## `$03`: `jump` *script* + +## `$04`: `farjump` *script* + +## `$05`: `ptjump` *script* + +## `$06`: `if_equal` *byte*, *script* + +## `$07`: `if_not_equal` *byte*, *script* + +## `$08`: `iffalse` *script* + +## `$09`: `iftrue` *script* + +## `$0A`: `if_greater_than` *byte*, *script* + +## `$0B`: `if_less_than` *byte*, *script* + +## `$0C`: `jumpstd` *std_script* + +## `$0D`: `callstd` *std_script* + +## `$0E`: `callasm` *asm* + +## `$0F`: `special` *special_pointer* + +## `$10`: `ptcallasm` *asm* + +## `$11`: `checkmaptriggers` *map* + +## `$12`: `domaptrigger` *map*, *trigger_id* + +## `$13`: `checktriggers` + +## `$14`: `dotrigger` *trigger_id* + +## `$15`: `writebyte` *value* + +## `$16`: `addvar` *value* + +## `$17`: `random` *value* + +## `$18`: `checkver` + +## `$19`: `copybytetovar` *address* + +## `$1A`: `copyvartobyte` *address* + +## `$1B`: `loadvar` *address*, *value* + +## `$1C`: `checkcode` *variable* + +## `$1D`: `writevarcode` *variable* + +## `$1E`: `writecode` *variable*, *value* + +## `$1F`: `giveitem` *item_id*[, *quantity*=1] + +## `$20`: `takeitem` *item_id*[, *quantity*=1] + +## `$21`: `checkitem` *item_id* + +## `$22`: `givemoney` *account*, *value* + +## `$23`: `takemoney` *account*, *value* + +## `$24`: `checkmoney` *account*, *value* + +## `$25`: `givecoins` *value* + +## `$26`: `takecoins` *value* + +## `$27`: `checkcoins` *value* + +## `$28`: `addcellnum` *contact_id* + +## `$29`: `delcellnum` *contact_id* + +## `$2A`: `checkcellnum` *contact_id* + +## `$2B`: `checktime` *time* + +- **`checkmorn`:** `checktime MORN` +- **`checkday`:** `checktime DAY` +- **`checknite`:** `checktime NITE` + +## `$2C`: `checkpoke` *mon_id* + +## `$2D`: `givepoke` *mon_id*, *level*[, *item*=0[, *trainer*=0, *ot_name*, *nickname*]] + +## `$2E`: `giveegg` *mon_id*, *level* + +## `$2F`: `givepokeitem` *pointer* + +## `$30`: `checkpokeitem` *pointer* + +## `$31`: `checkevent` *event_flag* + +## `$32`: `clearevent` *event_flag* + +## `$33`: `setevent` *event_flag* + +## `$34`: `checkflag` *engine_flag* + +## `$35`: `clearflag` *engine_flag* + +## `$36`: `setflag` *engine_flag* + +## `$37`: `wildon` + +## `$38`: `wildoff` + +## `$39`: `xycompare` *pointer* + +## `$3A`: `warpmod` *warp_id*, *map* + +## `$3B`: `blackoutmod` *map* + +## `$3C`: `warp` *map*, *x*, *y* + +## `$3D`: `readmoney` *account*, *memory* + +## `$3E`: `readcoins` *memory* + +## `$3F`: `RAM2MEM` *memory* + +## `$40`: `pokenamemem` *mon_id*, *memory* + +## `$41`: `itemtotext` *item_id*, *memory* + +## `$42`: `mapnametotext` *memory* + +## `$43`: `trainertotext` *trainer_id*, *trainer_group*, *memory* + +## `$44`: `stringtotext` *text_pointer*, *memory* + +## `$45`: `itemnotify` + +## `$46`: `pocketisfull` + +## `$47`: `opentext` + +## `$48`: `refreshscreen` *dummy* + +## `$49`: `closetext` + +## `$4A`: `loadbytec2cf` *byte* + +## `$4B`: `farwritetext` *text_pointer* + +## `$4C`: `writetext` *text_pointer* + +## `$4D`: `repeattext` *byte1*, *byte2* + +## `$4E`: `yesorno` + +## `$4F`: `loadmenudata` *data_pointer* + +## `$50`: `closewindow` + +## `$51`: `jumptextfaceplayer` *text_pointer* + +## `$52`: `farjumptext` *text_pointer* + +## `$53`: `jumptext` *text_pointer* + +## `$54`: `waitbutton` + +## `$55`: `buttonsound` + +## `$56`: `pokepic` *mon_id* + +## `$57`: `closepokepic` + +## `$58`: `_2dmenu` + +## `$59`: `verticalmenu` + +## `$5A`: `loadpikachudata` + +## `$5B`: `randomwildmon` + +## `$5C`: `loadmemtrainer` + +## `$5D`: `loadwildmon` *mon_id*, *level* + +## `$5E`: `loadtrainer` *trainer_group*, *trainer_id* + +## `$5F`: `startbattle` + +## `$60`: `reloadmapafterbattle` + +## `$61`: `catchtutorial` *byte* + +## `$62`: `trainertext` *which_text* + +## `$63`: `trainerflagaction` *action* + +## `$64`: `winlosstext` *win_text_pointer*, *loss_text_pointer* + +## `$65`: `scripttalkafter` + +## `$66`: `end_if_just_battled` + +## `$67`: `check_just_battled` + +## `$68`: `setlasttalked` *person* + +## `$69`: `applymovement` *person*, *data_pointer* + +## `$6A`: `applymovement2` *data_pointer* + +## `$6B`: `faceplayer` + +## `$6C`: `faceperson` *person1*, *person2* + +## `$6D`: `variablesprite` *variable_sprite_id*, *sprite_id* + +## `$6E`: `disappear` *person* + +## `$6F`: `appear` *person* + +## `$70`: `follow` *person2*, *person1* + +## `$71`: `stopfollow` + +## `$72`: `moveperson` *person*, *x*, *y* + +## `$73`: `writepersonxy` *person* + +## `$74`: `loademote` *emote_id* + +## `$75`: `showemote` *emote_id*, *person*, *length* + +## `$76`: `spriteface` *person*, *facing* + +## `$77`: `follownotexact` *person2*, *person1* + +## `$78`: `earthquake` *param* + +## `$79`: `changemap` *bank*, *blockdata_pointer* + +## `$7A`: `changeblock` *x*, *y*, *block* + +## `$7B`: `reloadmap` + +## `$7C`: `reloadmappart` + +## `$7D`: `writecmdqueue` *queue_pointer* + +## `$7E`: `delcmdqueue` *byte* + +## `$7F`: `playmusic` *music_id* + +## `$80`: `encountermusic` + +## `$81`: `musicfadeout` *music_id*, *length* + +## `$82`: `playmapmusic` + +## `$83`: `dontrestartmapmusic` + +## `$84`: `cry` *mon_id* + +## `$85`: `playsound` *sfx_id* + +## `$86`: `waitsfx` + +## `$87`: `warpsound` + +## `$88`: `specialsound` + +## `$89`: `passtoengine` *data_pointer* + +## `$8A`: `newloadmap` *which_method* + +## `$8B`: `pause` *length* + +## `$8C`: `deactivatefacing` *length* + +## `$8D`: `priorityjump` *script* + +## `$8E`: `warpcheck` + +## `$8F`: `ptpriorityjump` *script* + +## `$90`: `return` + +## `$91`: `end` + +## `$92`: `reloadandreturn` *which_method* + +## `$93`: `end_all` + +## `$94`: `pokemart` *dialog_id*, *mart_id* + +## `$95`: `elevator` *floor_list* + +## `$96`: `trade` *trade_id* + +## `$97`: `askforphonenumber` *contact_id* + +## `$98`: `phonecall` *call_id* + +## `$99`: `hangup` + +## `$9A`: `describedecoration` *byte* + +## `$9B`: `fruittree` *tree_id* + +## `$9C`: `specialphonecall` *call_id* + +## `$9D`: `checkphonecall` + +## `$9E`: `verbosegiveitem` *item_id*[, *quantity*=1] + +## `$9F`: `verbosegiveitem2` *item_id*, *variable* + +## `$A0`: `swarm` *swarm_id*, *map* + +## `$A1`: `halloffame` + +## `$A2`: `credits` + +## `$A3`: `warpfacing` *facing*, *map*, *x*, *y* + +## `$A4`: `battletowertext` *memory* + +## `$A5`: `landmarktotext` *landmark_id*, *memory* + +## `$A6`: `trainerclassname` *trainer_group*, *memory* + +## `$A7`: `name` *type*, *id*, *memory* + +## `$A8`: `wait` *duration* + +## `$A9`: `check_save` diff --git a/docs/map_scripts.md b/docs/map_scripts.md index e259638dd..e7138c4c8 100644 --- a/docs/map_scripts.md +++ b/docs/map_scripts.md @@ -19,18 +19,19 @@ - **`dbw` *type*, *script*** -## Scripts +## Event scripts -[Scripting commands](docs/scripting_commands.md) +[Event commands](docs/event_commands.md) ## Text -- **`text`** -- **`line`** -- **`cont`** -- **`para`** -- **`done`** +[Text commands](docs/text_commands.md) + + +## Movement data + +[Movement commands](docs/movement_commands.md) ## `MapName_MapEventHeader:` diff --git a/docs/scripting_commands.md b/docs/scripting_commands.md deleted file mode 100644 index 32ba7d338..000000000 --- a/docs/scripting_commands.md +++ /dev/null @@ -1,345 +0,0 @@ -# Scripting Commands - -## `$00`: `scall` *script* - -## `$01`: `farscall` *script* - -## `$02`: `ptcall` *script* - -## `$03`: `jump` *script* - -## `$04`: `farjump` *script* - -## `$05`: `ptjump` *script* - -## `$06`: `if_equal` *byte*, *script* - -## `$07`: `if_not_equal` *byte*, *script* - -## `$08`: `iffalse` *script* - -## `$09`: `iftrue` *script* - -## `$0A`: `if_greater_than` *byte*, *script* - -## `$0B`: `if_less_than` *byte*, *script* - -## `$0C`: `jumpstd` *std_script* - -## `$0D`: `callstd` *std_script* - -## `$0E`: `callasm` *asm* - -## `$0F`: `special` *special_pointer* - -## `$10`: `ptcallasm` *asm* - -## `$11`: `checkmaptriggers` *map* - -## `$12`: `domaptrigger` *map*, *trigger_id* - -## `$13`: `checktriggers` - -## `$14`: `dotrigger` *trigger_id* - -## `$15`: `writebyte` *value* - -## `$16`: `addvar` *value* - -## `$17`: `random` *value* - -## `$18`: `checkver` - -## `$19`: `copybytetovar` *address* - -## `$1A`: `copyvartobyte` *address* - -## `$1B`: `loadvar` *address*, *value* - -## `$1C`: `checkcode` *variable* - -## `$1D`: `writevarcode` *variable* - -## `$1E`: `writecode` *variable*, *value* - -## `$1F`: `giveitem` *item_id*[, *quantity*=1] - -## `$20`: `takeitem` *item_id*[, *quantity*=1] - -## `$21`: `checkitem` *item_id* - -## `$22`: `givemoney` *account*, *value* - -## `$23`: `takemoney` *account*, *value* - -## `$24`: `checkmoney` *account*, *value* - -## `$25`: `givecoins` *value* - -## `$26`: `takecoins` *value* - -## `$27`: `checkcoins` *value* - -## `$28`: `addcellnum` *contact_id* - -## `$29`: `delcellnum` *contact_id* - -## `$2A`: `checkcellnum` *contact_id* - -## `$2B`: `checktime` *time* - -- **`checkmorn`:** `checktime MORN` -- **`checkday`:** `checktime DAY` -- **`checknite`:** `checktime NITE` - -## `$2C`: `checkpoke` *mon_id* - -## `$2D`: `givepoke` *mon_id*, *level*[, *item*=0[, *trainer*=0, *ot_name*, *nickname*]] - -## `$2E`: `giveegg` *mon_id*, *level* - -## `$2F`: `givepokeitem` *pointer* - -## `$30`: `checkpokeitem` *pointer* - -## `$31`: `checkevent` *event_flag* - -## `$32`: `clearevent` *event_flag* - -## `$33`: `setevent` *event_flag* - -## `$34`: `checkflag` *engine_flag* - -## `$35`: `clearflag` *engine_flag* - -## `$36`: `setflag` *engine_flag* - -## `$37`: `wildon` - -## `$38`: `wildoff` - -## `$39`: `xycompare` *pointer* - -## `$3A`: `warpmod` *warp_id*, *map* - -## `$3B`: `blackoutmod` *map* - -## `$3C`: `warp` *map*, *x*, *y* - -## `$3D`: `readmoney` *account*, *memory* - -## `$3E`: `readcoins` *memory* - -## `$3F`: `RAM2MEM` *memory* - -## `$40`: `pokenamemem` *mon_id*, *memory* - -## `$41`: `itemtotext` *item_id*, *memory* - -## `$42`: `mapnametotext` *memory* - -## `$43`: `trainertotext` *trainer_id*, *trainer_group*, *memory* - -## `$44`: `stringtotext` *text_pointer*, *memory* - -## `$45`: `itemnotify` - -## `$46`: `pocketisfull` - -## `$47`: `opentext` - -## `$48`: `refreshscreen` *dummy* - -## `$49`: `closetext` - -## `$4A`: `loadbytec2cf` *byte* - -## `$4B`: `farwritetext` *text_pointer* - -## `$4C`: `writetext` *text_pointer* - -## `$4D`: `repeattext` *byte1*, *byte2* - -## `$4E`: `yesorno` - -## `$4F`: `loadmenudata` *data_pointer* - -## `$50`: `closewindow` - -## `$51`: `jumptextfaceplayer` *text_pointer* - -## `$52`: `farjumptext` *text_pointer* - -## `$53`: `jumptext` *text_pointer* - -## `$54`: `waitbutton` - -## `$55`: `buttonsound` - -## `$56`: `pokepic` *mon_id* - -## `$57`: `closepokepic` - -## `$58`: `_2dmenu` - -## `$59`: `verticalmenu` - -## `$5A`: `loadpikachudata` - -## `$5B`: `randomwildmon` - -## `$5C`: `loadmemtrainer` - -## `$5D`: `loadwildmon` *mon_id*, *level* - -## `$5E`: `loadtrainer` *trainer_group*, *trainer_id* - -## `$5F`: `startbattle` - -## `$60`: `reloadmapafterbattle` - -## `$61`: `catchtutorial` *byte* - -## `$62`: `trainertext` *which_text* - -## `$63`: `trainerflagaction` *action* - -## `$64`: `winlosstext` *win_text_pointer*, *loss_text_pointer* - -## `$65`: `scripttalkafter` - -## `$66`: `end_if_just_battled` - -## `$67`: `check_just_battled` - -## `$68`: `setlasttalked` *person* - -## `$69`: `applymovement` *person*, *data_pointer* - -## `$6A`: `applymovement2` *data_pointer* - -## `$6B`: `faceplayer` - -## `$6C`: `faceperson` *person1*, *person2* - -## `$6D`: `variablesprite` *variable_sprite_id*, *sprite_id* - -## `$6E`: `disappear` *person* - -## `$6F`: `appear` *person* - -## `$70`: `follow` *person2*, *person1* - -## `$71`: `stopfollow` - -## `$72`: `moveperson` *person*, *x*, *y* - -## `$73`: `writepersonxy` *person* - -## `$74`: `loademote` *emote_id* - -## `$75`: `showemote` *emote_id*, *person*, *length* - -## `$76`: `spriteface` *person*, *facing* - -## `$77`: `follownotexact` *person2*, *person1* - -## `$78`: `earthquake` *param* - -## `$79`: `changemap` *bank*, *blockdata_pointer* - -## `$7A`: `changeblock` *x*, *y*, *block* - -## `$7B`: `reloadmap` - -## `$7C`: `reloadmappart` - -## `$7D`: `writecmdqueue` *queue_pointer* - -## `$7E`: `delcmdqueue` *byte* - -## `$7F`: `playmusic` *music_id* - -## `$80`: `encountermusic` - -## `$81`: `musicfadeout` *music_id*, *length* - -## `$82`: `playmapmusic` - -## `$83`: `dontrestartmapmusic` - -## `$84`: `cry` *mon_id* - -## `$85`: `playsound` *sfx_id* - -## `$86`: `waitsfx` - -## `$87`: `warpsound` - -## `$88`: `specialsound` - -## `$89`: `passtoengine` *data_pointer* - -## `$8A`: `newloadmap` *which_method* - -## `$8B`: `pause` *length* - -## `$8C`: `deactivatefacing` *length* - -## `$8D`: `priorityjump` *script* - -## `$8E`: `warpcheck` - -## `$8F`: `ptpriorityjump` *script* - -## `$90`: `return` - -## `$91`: `end` - -## `$92`: `reloadandreturn` *which_method* - -## `$93`: `end_all` - -## `$94`: `pokemart` *dialog_id*, *mart_id* - -## `$95`: `elevator` *floor_list* - -## `$96`: `trade` *trade_id* - -## `$97`: `askforphonenumber` *contact_id* - -## `$98`: `phonecall` *call_id* - -## `$99`: `hangup` - -## `$9A`: `describedecoration` *byte* - -## `$9B`: `fruittree` *tree_id* - -## `$9C`: `specialphonecall` *call_id* - -## `$9D`: `checkphonecall` - -## `$9E`: `verbosegiveitem` *item_id*[, *quantity*=1] - -## `$9F`: `verbosegiveitem2` *item_id*, *variable* - -## `$A0`: `swarm` *swarm_id*, *map* - -## `$A1`: `halloffame` - -## `$A2`: `credits` - -## `$A3`: `warpfacing` *facing*, *map*, *x*, *y* - -## `$A4`: `battletowertext` *memory* - -## `$A5`: `landmarktotext` *landmark_id*, *memory* - -## `$A6`: `trainerclassname` *trainer_group*, *memory* - -## `$A7`: `name` *type*, *id*, *memory* - -## `$A8`: `wait` *duration* - -## `$A9`: `check_save` diff --git a/docs/text_commands.md b/docs/text_commands.md new file mode 100644 index 000000000..3d502f399 --- /dev/null +++ b/docs/text_commands.md @@ -0,0 +1,131 @@ +# 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](https://en.wikipedia.org/wiki/Binary-coded_decimal) from an address, +typically RAM. + +## `$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. -- cgit v1.2.3 From 906d356e09fd8bf59d97d151aec0ffc3e25ca7f5 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 12 Dec 2017 13:51:58 -0500 Subject: Fix relative links --- docs/map_scripts.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/map_scripts.md b/docs/map_scripts.md index e7138c4c8..47c6f4f67 100644 --- a/docs/map_scripts.md +++ b/docs/map_scripts.md @@ -21,17 +21,17 @@ ## Event scripts -[Event commands](docs/event_commands.md) +[Event commands](event_commands.md) ## Text -[Text commands](docs/text_commands.md) +[Text commands](text_commands.md) ## Movement data -[Movement commands](docs/movement_commands.md) +[Movement commands](movement_commands.md) ## `MapName_MapEventHeader:` -- cgit v1.2.3 From 33eb3c6af263773674d18fcc18457a71ee976ffc Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 12 Dec 2017 13:56:17 -0500 Subject: Start documentation for map callbacks. --- docs/map_scripts.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'docs') diff --git a/docs/map_scripts.md b/docs/map_scripts.md index 47c6f4f67..7546a5ad7 100644 --- a/docs/map_scripts.md +++ b/docs/map_scripts.md @@ -18,6 +18,24 @@ - **`dbw` *type*, *script*** +Callback types: + +- **`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 -- cgit v1.2.3 From 8b501c19a6a70f8911159b510760eb3dbcb5a3a6 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 12 Dec 2017 13:57:14 -0500 Subject: Fix Markdown syntax --- docs/map_scripts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/map_scripts.md b/docs/map_scripts.md index 7546a5ad7..f26de1949 100644 --- a/docs/map_scripts.md +++ b/docs/map_scripts.md @@ -70,7 +70,7 @@ Callback types: ## `.Signposts: db` *N* -- `signpost` *y*, *x*, *type*, *script*** +- **`signpost` *y*, *x*, *type*, *script*** Signpost types: -- cgit v1.2.3 From f0ab09125493f91d66af836e0abb977459a0d801 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 12 Dec 2017 18:50:39 -0500 Subject: Add an FAQ, and ive a bit more detail in Windows install instructions --- docs/text_commands.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/text_commands.md b/docs/text_commands.md index 3d502f399..865ea69b5 100644 --- a/docs/text_commands.md +++ b/docs/text_commands.md @@ -38,8 +38,9 @@ Write text from a RAM address. ## `$02`: `text_bcd` *address*, *flags* -Write [BCD](https://en.wikipedia.org/wiki/Binary-coded_decimal) from an address, -typically RAM. +Write [BCD](bcd) from an address, typically RAM. + +[bcd]: https://en.wikipedia.org/wiki/Binary-coded_decimal ## `$03`: `text_move` *address* -- cgit v1.2.3