From 1a2bc578418612d074bd275c34a57e61b3d016b2 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Thu, 11 Jan 2018 02:35:46 -0500 Subject: =?UTF-8?q?Event=20script=E2=80=93related=20constants=20go=20in=20?= =?UTF-8?q?constants/script=5Fconstants.asm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- constants/script_constants.asm | 131 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) (limited to 'constants/script_constants.asm') diff --git a/constants/script_constants.asm b/constants/script_constants.asm index 9f7dae6d2..e871ed301 100644 --- a/constants/script_constants.asm +++ b/constants/script_constants.asm @@ -2,6 +2,7 @@ PLAYER EQU 0 LAST_TALKED EQU -2 + ; GetVarAction arguments (see engine/variables.asm) const_def const VAR_STRINGBUFFER2 ; 00 @@ -38,6 +39,7 @@ RETVAR_STRBUF2 EQU (0 << 6) RETVAR_ADDR_DE EQU (1 << 6) RETVAR_EXECUTE EQU (2 << 6) + ; PlayerEventScriptPointers indexes (see engine/events.asm) const_value set -1 const PLAYEREVENT_MAPSCRIPT @@ -52,3 +54,132 @@ const_value set -1 const PLAYEREVENT_HATCH const PLAYEREVENT_JOYCHANGEFACING NUM_PLAYER_EVENTS EQU const_value + + +; TryBGEvent arguments (see engine/events.asm) + const_def + const BGEVENT_READ + const BGEVENT_UP + const BGEVENT_DOWN + const BGEVENT_RIGHT + const BGEVENT_LEFT + const BGEVENT_IFSET + const BGEVENT_IFNOTSET + const BGEVENT_ITEM + const BGEVENT_COPY + +; object_event types +; TryObjectEvent arguments (see engine/events.asm) + const_def + const OBJECTTYPE_SCRIPT + const OBJECTTYPE_ITEMBALL + const OBJECTTYPE_TRAINER + const OBJECTTYPE_3 + const OBJECTTYPE_4 + const OBJECTTYPE_5 + const OBJECTTYPE_6 + + +; Emotes indexes (see data/sprites/emotes.asm) + const_def + const EMOTE_SHOCK ; 0 + const EMOTE_QUESTION ; 1 + const EMOTE_HAPPY ; 2 + const EMOTE_SAD ; 3 + const EMOTE_HEART ; 4 + const EMOTE_BOLT ; 5 + const EMOTE_SLEEP ; 6 + const EMOTE_FISH ; 7 + const EMOTE_SHADOW ; 8 + const EMOTE_ROD ; 9 + const EMOTE_BOULDER_DUST ; 10 + const EMOTE_GRASS_RUSTLE ; 11 +EMOTE_MEM EQU -1 + + +; FruitTreeItems indexes (see data/items/fruit_trees.asm) +; used by fruittree command +const_value set 1 + const FRUITTREE_ROUTE_29 ; 01 + const FRUITTREE_ROUTE_30_1 ; 02 + const FRUITTREE_ROUTE_38 ; 03 + const FRUITTREE_ROUTE_46_1 ; 04 + const FRUITTREE_ROUTE_30_2 ; 05 + const FRUITTREE_ROUTE_33 ; 06 + const FRUITTREE_ROUTE_31 ; 07 + const FRUITTREE_ROUTE_43 ; 08 + const FRUITTREE_VIOLET_CITY ; 09 + const FRUITTREE_ROUTE_46_2 ; 0a + const FRUITTREE_ROUTE_35 ; 0b + const FRUITTREE_ROUTE_45 ; 0c + const FRUITTREE_ROUTE_36 ; 0d + const FRUITTREE_ROUTE_26 ; 0e + const FRUITTREE_ROUTE_39 ; 0f + const FRUITTREE_ROUTE_44 ; 10 + const FRUITTREE_ROUTE_37_1 ; 11 + const FRUITTREE_ROUTE_37_2 ; 12 + const FRUITTREE_ROUTE_37_3 ; 13 + const FRUITTREE_AZALEA_TOWN ; 14 + const FRUITTREE_ROUTE_42_1 ; 15 + const FRUITTREE_ROUTE_42_2 ; 16 + const FRUITTREE_ROUTE_42_3 ; 17 + const FRUITTREE_ROUTE_11 ; 18 + const FRUITTREE_ROUTE_2 ; 19 + const FRUITTREE_ROUTE_1 ; 1a + const FRUITTREE_ROUTE_8 ; 1b + const FRUITTREE_PEWTER_CITY_1 ; 1c + const FRUITTREE_PEWTER_CITY_2 ; 1d + const FRUITTREE_FUCHSIA_CITY ; 1e +NUM_FRUIT_TREES EQU const_value +- 1 + + +; ElevatorFloorNames indexes (see data/elevator_floors.asm) +; used by elevfloor macro + const_def + const FLOOR_B4F + const FLOOR_B3F + const FLOOR_B2F + const FLOOR_B1F + const FLOOR_1F + const FLOOR_2F + const FLOOR_3F + const FLOOR_4F + const FLOOR_5F + const FLOOR_6F + const FLOOR_7F + const FLOOR_8F + const FLOOR_9F + const FLOOR_10F + const FLOOR_11F + const FLOOR_ROOF + + +; command queue members +CMDQUEUE_TYPE EQU 0 +CMDQUEUE_ADDR EQU 1 +CMDQUEUE_03 EQU 3 +CMDQUEUE_04 EQU 4 +CMDQUEUE_05 EQU 5 +CMDQUEUE_ENTRY_SIZE EQU 6 +CMDQUEUE_CAPACITY EQU 4 + +; command queue types +CMDQUEUE_STONETABLE EQU 2 + + +; used by Special_UnownPuzzle +; LoadUnownPuzzlePiecesGFX.LZPointers indexes (see engine/unown_puzzle.asm) + const_def + const UNOWNPUZZLE_KABUTO ; 0 + const UNOWNPUZZLE_OMANYTE ; 1 + const UNOWNPUZZLE_AERODACTYL ; 2 + const UNOWNPUZZLE_HO_OH ; 3 +NUM_UNOWN_PUZZLES EQU const_value + +; used by Special_DisplayUnownWords +; UnownWalls and MenuDataHeaders_UnownWalls indexes (see data/unown_walls.asm) + const_def + const UNOWNWORDS_ESCAPE ; 0 + const UNOWNWORDS_LIGHT ; 1 + const UNOWNWORDS_WATER ; 2 + const UNOWNWORDS_HO_OH ; 3 -- cgit v1.2.3 From d83aefb30af180eae03bbd65878e8de45166f3d0 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Fri, 12 Jan 2018 01:40:20 -0500 Subject: Use more constants in scripts --- constants/script_constants.asm | 89 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 2 deletions(-) (limited to 'constants/script_constants.asm') diff --git a/constants/script_constants.asm b/constants/script_constants.asm index e871ed301..6fed31f0a 100644 --- a/constants/script_constants.asm +++ b/constants/script_constants.asm @@ -3,6 +3,40 @@ PLAYER EQU 0 LAST_TALKED EQU -2 +; memory constants + const_def + const MEM_BUFFER_0 ; use StringBuffer3 + const MEM_BUFFER_1 ; use StringBuffer4 + const MEM_BUFFER_2 ; use StringBuffer5 +NUM_MEM_BUFFERS EQU const_value + + +; checkmoney/takemoney accounts + const_def + const YOUR_MONEY ; 0 + const MOMS_MONEY ; 1 + +; checkmoney/checkcoins return values + const_def + const HAVE_MORE ; 0 + const HAVE_AMOUNT ; 1 + const HAVE_LESS ; 2 + +; checkpokeitem return values + const_def + const POKEMAIL_WRONG_MAIL ; 0 + const POKEMAIL_CORRECT ; 1 + const POKEMAIL_REFUSED ; 2 + const POKEMAIL_NO_MAIL ; 3 + const POKEMAIL_LAST_MON ; 4 + +; askforphonenumber return values + const_def + const PHONE_CONTACT_GOT ; 0 + const PHONE_CONTACTS_FULL ; 1 + const PHONE_CONTACT_REFUSED ; 2 + + ; GetVarAction arguments (see engine/variables.asm) const_def const VAR_STRINGBUFFER2 ; 00 @@ -80,6 +114,7 @@ NUM_PLAYER_EVENTS EQU const_value const OBJECTTYPE_6 +; showemote arguments ; Emotes indexes (see data/sprites/emotes.asm) const_def const EMOTE_SHOCK ; 0 @@ -97,8 +132,8 @@ NUM_PLAYER_EVENTS EQU const_value EMOTE_MEM EQU -1 +; fruittree arguments ; FruitTreeItems indexes (see data/items/fruit_trees.asm) -; used by fruittree command const_value set 1 const FRUITTREE_ROUTE_29 ; 01 const FRUITTREE_ROUTE_30_1 ; 02 @@ -133,8 +168,18 @@ const_value set 1 NUM_FRUIT_TREES EQU const_value +- 1 +; describedecoration arguments +; DescribeDecoration.JumpTable indexes (see engine/decorations.asm) + const_def + const DECODESC_POSTER ; 0 + const DECODESC_LEFT_DOLL ; 1 + const DECODESC_RIGHT_DOLL ; 2 + const DECODESC_BIG_DOLL ; 3 + const DECODESC_CONSOLE ; 4 + + +; elevfloor macro values ; ElevatorFloorNames indexes (see data/elevator_floors.asm) -; used by elevfloor macro const_def const FLOOR_B4F const FLOOR_B3F @@ -167,6 +212,40 @@ CMDQUEUE_CAPACITY EQU 4 CMDQUEUE_STONETABLE EQU 2 +; SpecialGameboyCheck return values + const_def + const GBCHECK_GB ; 0 + const GBCHECK_SGB ; 1 + const GBCHECK_CGB ; 2 + +; Special_CheckMagikarpLength return values + const_def + const MAGIKARPLENGTH_NOT_MAGIKARP ; 0 + const MAGIKARPLENGTH_REFUSED ; 1 + const MAGIKARPLENGTH_TOO_SHORT ; 2 + const MAGIKARPLENGTH_BEAT_RECORD ; 3 + +; SpecialReturnShuckle return values + const_def + const SHUCKIE_WRONG_MON ; 0 + const SHUCKIE_REFUSED ; 1 + const SHUCKIE_RETURNED ; 2 + const SHUCKIE_HAPPY ; 3 + const SHUCKIE_FAINTED ; 4 + +; CheckPartyFullAfterContest return values + const_def + const BUGCONTEST_CAUGHT_MON ; 0 + const BUGCONTEST_BOXED_MON ; 1 + const BUGCONTEST_NO_CATCH ; 2 + +; used by HealMachineAnim +; HealMachineAnim.Pointers indexes (see engine/events/heal_machine_anim.asm) + const_def + const HEALMACHINE_POKECENTER ; 0 + const HEALMACHINE_ELMS_LAB ; 1 + const HEALMACHINE_HALL_OF_FAME ; 2 + ; used by Special_UnownPuzzle ; LoadUnownPuzzlePiecesGFX.LZPointers indexes (see engine/unown_puzzle.asm) const_def @@ -183,3 +262,9 @@ NUM_UNOWN_PUZZLES EQU const_value const UNOWNWORDS_LIGHT ; 1 const UNOWNWORDS_WATER ; 2 const UNOWNWORDS_HO_OH ; 3 + +; used by Special_MoveTutor +const_value set 1 + const MOVETUTOR_FLAMETHROWER ; 1 + const MOVETUTOR_THUNDERBOLT ; 2 + const MOVETUTOR_ICE_BEAM ; 3 -- cgit v1.2.3 From 1f5cc28db7527a85aa983d4f3d1786cfff1dbc6b Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Fri, 12 Jan 2018 02:36:14 -0500 Subject: Comment on VAR_* constants --- constants/script_constants.asm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'constants/script_constants.asm') diff --git a/constants/script_constants.asm b/constants/script_constants.asm index 6fed31f0a..fcda68744 100644 --- a/constants/script_constants.asm +++ b/constants/script_constants.asm @@ -37,7 +37,8 @@ NUM_MEM_BUFFERS EQU const_value const PHONE_CONTACT_REFUSED ; 2 -; GetVarAction arguments (see engine/variables.asm) +; writecode/checkcode arguments +; _GetVarAction.VarActionTable indexes (see engine/variables.asm) const_def const VAR_STRINGBUFFER2 ; 00 const VAR_PARTYCOUNT ; 01 -- cgit v1.2.3 From eb3102200f66e3aa1688e4e52429fcac4b0272fa Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Sun, 14 Jan 2018 19:26:55 -0500 Subject: More Battle Tower map script constants, fewer raw hex values --- constants/script_constants.asm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'constants/script_constants.asm') diff --git a/constants/script_constants.asm b/constants/script_constants.asm index fcda68744..fd5affce6 100644 --- a/constants/script_constants.asm +++ b/constants/script_constants.asm @@ -240,14 +240,14 @@ CMDQUEUE_STONETABLE EQU 2 const BUGCONTEST_BOXED_MON ; 1 const BUGCONTEST_NO_CATCH ; 2 -; used by HealMachineAnim +; HealMachineAnim writebyte arguments ; HealMachineAnim.Pointers indexes (see engine/events/heal_machine_anim.asm) const_def const HEALMACHINE_POKECENTER ; 0 const HEALMACHINE_ELMS_LAB ; 1 const HEALMACHINE_HALL_OF_FAME ; 2 -; used by Special_UnownPuzzle +; Special_UnownPuzzle writebyte arguments ; LoadUnownPuzzlePiecesGFX.LZPointers indexes (see engine/unown_puzzle.asm) const_def const UNOWNPUZZLE_KABUTO ; 0 @@ -256,7 +256,7 @@ CMDQUEUE_STONETABLE EQU 2 const UNOWNPUZZLE_HO_OH ; 3 NUM_UNOWN_PUZZLES EQU const_value -; used by Special_DisplayUnownWords +; Special_DisplayUnownWords writebyte arguments ; UnownWalls and MenuDataHeaders_UnownWalls indexes (see data/unown_walls.asm) const_def const UNOWNWORDS_ESCAPE ; 0 @@ -264,7 +264,7 @@ NUM_UNOWN_PUZZLES EQU const_value const UNOWNWORDS_WATER ; 2 const UNOWNWORDS_HO_OH ; 3 -; used by Special_MoveTutor +; Special_MoveTutor writebyte arguments const_value set 1 const MOVETUTOR_FLAMETHROWER ; 1 const MOVETUTOR_THUNDERBOLT ; 2 -- cgit v1.2.3