sovereignx/asm/macros/movement.inc
psf fe16a2cdee
Port pokefirered's Vs. Seeker to pokeemerald (#3256)
* First version of Vs. Seeker

* Update movement.inc

98f7e9978d (r1306721924)

* Update field_effect_scripts.s

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306722004

* Update field_effect_scripts.s

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306722024

* Update item_use.h

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306722401

* Update movement_action_func_tables.h

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306722828

* Update event_object_movement.c

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306722887

* Update overworld.c

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306723396

* Update vs_seeker.h

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306724158

* Update vs_seeker.c

Addressed some cleanup comments from SBird

* Update UpdateRandomTrainerRematches
Fixed typo in ClearAllTrainerRematchStates
Fixed types in GetRematchableTrainerLocalId

* Updated UseVsSeekerEffect_2

* Updated UseVsSeekerEffect_3

* Updated UseVsSeekerEffect_4

* Fixed bug that allowed Vs Seeker to be used indoors in correct places
Moved VsSeeker function declarations into header

* Refactored FieldUseFunc_VsSeeker

* Added curly braces to else case in FieldUseFunc_VsSeeker

* renamed data[x] in Task_ResetObjectsRematchWantedState

* Refactored Task_ResetObjectsRematchWantedState

* Refactored VsSeekerResetObjectMovementAfterChargeComplete

* Refactored ResetMovementOfRematchableTrainers

* Refactored GatherNearbyTrainerInfo

* Refactored Task_VsSeeker_3

* CanUseVsSeeker

* Refactored GetVsSeekerResponseInArea

* GetCurVsSeekerResponse refactored

* Cleaned up GetTrainerFlagFromScript

* Gave sensible names to Task_VsSeeker

* Fixed two bugs where player would not have the right gfx state after using VsSeeker on a Bike or Underwater

* Renamed UseVsSeeker Functions

* Added I_VS_SEEKER_CHARGING to make Vs. Seeker broken until flag is assigned
Removed extra VsSeeker animation code

* Addressed PR feedback

* Fixed issue with building non-modern

* Refactored GetRunningBehaviorFromGraphicsId and renamed to GetResponseMovementTypeFromTrainerGraphicsId

* Addresses Lunos's PR feedback: https://github.com/rh-hideout/pokeemerald-expansion/pull/3256\#pullrequestreview-1623547850
Removed the check to see if a map was not indoors to improve readability
Made IsValidLocationForVsSeeker into a static function

* Added changes in response to Jasper's feedback
https://github.com/rh-hideout/pokeemerald-expansion/pull/3256\#pullrequestreview-1725276522

* Updated with Edu's discord feedback https://discord.com/channels/419213663107416084/1135040810082123907/1176872015085453392

* Removed ifdef tags around the repo unless needed
b5dc744ced
2023-11-26 18:58:43 +01:00

168 lines
13 KiB
SQL

.macro create_movement_action name:req, value:req
.macro \name
.byte \value
.endm
.endm
create_movement_action face_down, MOVEMENT_ACTION_FACE_DOWN
create_movement_action face_up, MOVEMENT_ACTION_FACE_UP
create_movement_action face_left, MOVEMENT_ACTION_FACE_LEFT
create_movement_action face_right, MOVEMENT_ACTION_FACE_RIGHT
create_movement_action walk_slow_down, MOVEMENT_ACTION_WALK_SLOW_DOWN
create_movement_action walk_slow_up, MOVEMENT_ACTION_WALK_SLOW_UP
create_movement_action walk_slow_left, MOVEMENT_ACTION_WALK_SLOW_LEFT
create_movement_action walk_slow_right, MOVEMENT_ACTION_WALK_SLOW_RIGHT
create_movement_action walk_down, MOVEMENT_ACTION_WALK_NORMAL_DOWN
create_movement_action walk_up, MOVEMENT_ACTION_WALK_NORMAL_UP
create_movement_action walk_left, MOVEMENT_ACTION_WALK_NORMAL_LEFT
create_movement_action walk_right, MOVEMENT_ACTION_WALK_NORMAL_RIGHT
create_movement_action jump_2_down, MOVEMENT_ACTION_JUMP_2_DOWN
create_movement_action jump_2_up, MOVEMENT_ACTION_JUMP_2_UP
create_movement_action jump_2_left, MOVEMENT_ACTION_JUMP_2_LEFT
create_movement_action jump_2_right, MOVEMENT_ACTION_JUMP_2_RIGHT
create_movement_action delay_1, MOVEMENT_ACTION_DELAY_1
create_movement_action delay_2, MOVEMENT_ACTION_DELAY_2
create_movement_action delay_4, MOVEMENT_ACTION_DELAY_4
create_movement_action delay_8, MOVEMENT_ACTION_DELAY_8
create_movement_action delay_16, MOVEMENT_ACTION_DELAY_16
create_movement_action walk_fast_down, MOVEMENT_ACTION_WALK_FAST_DOWN
create_movement_action walk_fast_up, MOVEMENT_ACTION_WALK_FAST_UP
create_movement_action walk_fast_left, MOVEMENT_ACTION_WALK_FAST_LEFT
create_movement_action walk_fast_right, MOVEMENT_ACTION_WALK_FAST_RIGHT
create_movement_action walk_in_place_slow_down, MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_DOWN
create_movement_action walk_in_place_slow_up, MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_UP
create_movement_action walk_in_place_slow_left, MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_LEFT
create_movement_action walk_in_place_slow_right, MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_RIGHT
create_movement_action walk_in_place_down, MOVEMENT_ACTION_WALK_IN_PLACE_NORMAL_DOWN
create_movement_action walk_in_place_up, MOVEMENT_ACTION_WALK_IN_PLACE_NORMAL_UP
create_movement_action walk_in_place_left, MOVEMENT_ACTION_WALK_IN_PLACE_NORMAL_LEFT
create_movement_action walk_in_place_right, MOVEMENT_ACTION_WALK_IN_PLACE_NORMAL_RIGHT
create_movement_action walk_in_place_fast_down, MOVEMENT_ACTION_WALK_IN_PLACE_FAST_DOWN
create_movement_action walk_in_place_fast_up, MOVEMENT_ACTION_WALK_IN_PLACE_FAST_UP
create_movement_action walk_in_place_fast_left, MOVEMENT_ACTION_WALK_IN_PLACE_FAST_LEFT
create_movement_action walk_in_place_fast_right, MOVEMENT_ACTION_WALK_IN_PLACE_FAST_RIGHT
create_movement_action walk_in_place_faster_down, MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_DOWN
create_movement_action walk_in_place_faster_up, MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_UP
create_movement_action walk_in_place_faster_left, MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_LEFT
create_movement_action walk_in_place_faster_right, MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_RIGHT
create_movement_action ride_water_current_down, MOVEMENT_ACTION_RIDE_WATER_CURRENT_DOWN
create_movement_action ride_water_current_up, MOVEMENT_ACTION_RIDE_WATER_CURRENT_UP
create_movement_action ride_water_current_left, MOVEMENT_ACTION_RIDE_WATER_CURRENT_LEFT
create_movement_action ride_water_current_right, MOVEMENT_ACTION_RIDE_WATER_CURRENT_RIGHT
create_movement_action walk_faster_down, MOVEMENT_ACTION_WALK_FASTER_DOWN
create_movement_action walk_faster_up, MOVEMENT_ACTION_WALK_FASTER_UP
create_movement_action walk_faster_left, MOVEMENT_ACTION_WALK_FASTER_LEFT
create_movement_action walk_faster_right, MOVEMENT_ACTION_WALK_FASTER_RIGHT
create_movement_action slide_down, MOVEMENT_ACTION_SLIDE_DOWN
create_movement_action slide_up, MOVEMENT_ACTION_SLIDE_UP
create_movement_action slide_left, MOVEMENT_ACTION_SLIDE_LEFT
create_movement_action slide_right, MOVEMENT_ACTION_SLIDE_RIGHT
create_movement_action player_run_down, MOVEMENT_ACTION_PLAYER_RUN_DOWN
create_movement_action player_run_up, MOVEMENT_ACTION_PLAYER_RUN_UP
create_movement_action player_run_left, MOVEMENT_ACTION_PLAYER_RUN_LEFT
create_movement_action player_run_right, MOVEMENT_ACTION_PLAYER_RUN_RIGHT
create_movement_action start_anim_in_direction, MOVEMENT_ACTION_START_ANIM_IN_DIRECTION
create_movement_action jump_special_down, MOVEMENT_ACTION_JUMP_SPECIAL_DOWN
create_movement_action jump_special_up, MOVEMENT_ACTION_JUMP_SPECIAL_UP
create_movement_action jump_special_left, MOVEMENT_ACTION_JUMP_SPECIAL_LEFT
create_movement_action jump_special_right, MOVEMENT_ACTION_JUMP_SPECIAL_RIGHT
create_movement_action face_player, MOVEMENT_ACTION_FACE_PLAYER
create_movement_action face_away_player, MOVEMENT_ACTION_FACE_AWAY_PLAYER
create_movement_action lock_facing_direction, MOVEMENT_ACTION_LOCK_FACING_DIRECTION
create_movement_action unlock_facing_direction, MOVEMENT_ACTION_UNLOCK_FACING_DIRECTION
create_movement_action jump_down, MOVEMENT_ACTION_JUMP_DOWN
create_movement_action jump_up, MOVEMENT_ACTION_JUMP_UP
create_movement_action jump_left, MOVEMENT_ACTION_JUMP_LEFT
create_movement_action jump_right, MOVEMENT_ACTION_JUMP_RIGHT
create_movement_action jump_in_place_down, MOVEMENT_ACTION_JUMP_IN_PLACE_DOWN
create_movement_action jump_in_place_up, MOVEMENT_ACTION_JUMP_IN_PLACE_UP
create_movement_action jump_in_place_left, MOVEMENT_ACTION_JUMP_IN_PLACE_LEFT
create_movement_action jump_in_place_right, MOVEMENT_ACTION_JUMP_IN_PLACE_RIGHT
create_movement_action jump_in_place_down_up, MOVEMENT_ACTION_JUMP_IN_PLACE_DOWN_UP
create_movement_action jump_in_place_up_down, MOVEMENT_ACTION_JUMP_IN_PLACE_UP_DOWN
create_movement_action jump_in_place_left_right, MOVEMENT_ACTION_JUMP_IN_PLACE_LEFT_RIGHT
create_movement_action jump_in_place_right_left, MOVEMENT_ACTION_JUMP_IN_PLACE_RIGHT_LEFT
create_movement_action face_original_direction, MOVEMENT_ACTION_FACE_ORIGINAL_DIRECTION
create_movement_action nurse_joy_bow, MOVEMENT_ACTION_NURSE_JOY_BOW_DOWN
create_movement_action enable_jump_landing_ground_effect, MOVEMENT_ACTION_ENABLE_JUMP_LANDING_GROUND_EFFECT
create_movement_action disable_jump_landing_ground_effect, MOVEMENT_ACTION_DISABLE_JUMP_LANDING_GROUND_EFFECT
create_movement_action disable_anim, MOVEMENT_ACTION_DISABLE_ANIMATION
create_movement_action restore_anim, MOVEMENT_ACTION_RESTORE_ANIMATION
create_movement_action set_invisible, MOVEMENT_ACTION_SET_INVISIBLE
create_movement_action set_visible, MOVEMENT_ACTION_SET_VISIBLE
create_movement_action emote_exclamation_mark, MOVEMENT_ACTION_EMOTE_EXCLAMATION_MARK
create_movement_action emote_question_mark, MOVEMENT_ACTION_EMOTE_QUESTION_MARK
create_movement_action emote_heart, MOVEMENT_ACTION_EMOTE_HEART
create_movement_action reveal_trainer, MOVEMENT_ACTION_REVEAL_TRAINER
create_movement_action rock_smash_break, MOVEMENT_ACTION_ROCK_SMASH_BREAK
create_movement_action cut_tree, MOVEMENT_ACTION_CUT_TREE
create_movement_action set_fixed_priority, MOVEMENT_ACTION_SET_FIXED_PRIORITY
create_movement_action clear_fixed_priority, MOVEMENT_ACTION_CLEAR_FIXED_PRIORITY
create_movement_action init_affine_anim, MOVEMENT_ACTION_INIT_AFFINE_ANIM
create_movement_action clear_affine_anim, MOVEMENT_ACTION_CLEAR_AFFINE_ANIM
create_movement_action hide_reflection, MOVEMENT_ACTION_HIDE_REFLECTION
create_movement_action show_reflection, MOVEMENT_ACTION_SHOW_REFLECTION
create_movement_action walk_down_start_affine, MOVEMENT_ACTION_WALK_DOWN_START_AFFINE
create_movement_action walk_down_affine, MOVEMENT_ACTION_WALK_DOWN_AFFINE
create_movement_action acro_wheelie_face_down, MOVEMENT_ACTION_ACRO_WHEELIE_FACE_DOWN
create_movement_action acro_wheelie_face_up, MOVEMENT_ACTION_ACRO_WHEELIE_FACE_UP
create_movement_action acro_wheelie_face_left, MOVEMENT_ACTION_ACRO_WHEELIE_FACE_LEFT
create_movement_action acro_wheelie_face_right, MOVEMENT_ACTION_ACRO_WHEELIE_FACE_RIGHT
create_movement_action acro_pop_wheelie_down, MOVEMENT_ACTION_ACRO_POP_WHEELIE_DOWN
create_movement_action acro_pop_wheelie_up, MOVEMENT_ACTION_ACRO_POP_WHEELIE_UP
create_movement_action acro_pop_wheelie_left, MOVEMENT_ACTION_ACRO_POP_WHEELIE_LEFT
create_movement_action acro_pop_wheelie_right, MOVEMENT_ACTION_ACRO_POP_WHEELIE_RIGHT
create_movement_action acro_end_wheelie_face_down, MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_DOWN
create_movement_action acro_end_wheelie_face_up, MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_UP
create_movement_action acro_end_wheelie_face_left, MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_LEFT
create_movement_action acro_end_wheelie_face_right, MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_RIGHT
create_movement_action acro_wheelie_hop_face_down, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_FACE_DOWN
create_movement_action acro_wheelie_hop_face_up, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_FACE_UP
create_movement_action acro_wheelie_hop_face_left, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_FACE_LEFT
create_movement_action acro_wheelie_hop_face_right, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_FACE_RIGHT
create_movement_action acro_wheelie_hop_down, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_DOWN
create_movement_action acro_wheelie_hop_up, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_UP
create_movement_action acro_wheelie_hop_left, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_LEFT
create_movement_action acro_wheelie_hop_right, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_RIGHT
create_movement_action acro_wheelie_jump_down, MOVEMENT_ACTION_ACRO_WHEELIE_JUMP_DOWN
create_movement_action acro_wheelie_jump_up, MOVEMENT_ACTION_ACRO_WHEELIE_JUMP_UP
create_movement_action acro_wheelie_jump_left, MOVEMENT_ACTION_ACRO_WHEELIE_JUMP_LEFT
create_movement_action acro_wheelie_jump_right, MOVEMENT_ACTION_ACRO_WHEELIE_JUMP_RIGHT
create_movement_action acro_wheelie_in_place_down, MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_DOWN
create_movement_action acro_wheelie_in_place_up, MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_UP
create_movement_action acro_wheelie_in_place_left, MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_LEFT
create_movement_action acro_wheelie_in_place_right, MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_RIGHT
create_movement_action acro_pop_wheelie_move_down, MOVEMENT_ACTION_ACRO_POP_WHEELIE_MOVE_DOWN
create_movement_action acro_pop_wheelie_move_up, MOVEMENT_ACTION_ACRO_POP_WHEELIE_MOVE_UP
create_movement_action acro_pop_wheelie_move_left, MOVEMENT_ACTION_ACRO_POP_WHEELIE_MOVE_LEFT
create_movement_action acro_pop_wheelie_move_right, MOVEMENT_ACTION_ACRO_POP_WHEELIE_MOVE_RIGHT
create_movement_action acro_wheelie_move_down, MOVEMENT_ACTION_ACRO_WHEELIE_MOVE_DOWN
create_movement_action acro_wheelie_move_up, MOVEMENT_ACTION_ACRO_WHEELIE_MOVE_UP
create_movement_action acro_wheelie_move_left, MOVEMENT_ACTION_ACRO_WHEELIE_MOVE_LEFT
create_movement_action acro_wheelie_move_right, MOVEMENT_ACTION_ACRO_WHEELIE_MOVE_RIGHT
create_movement_action acro_end_wheelie_move_down, MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_DOWN
create_movement_action acro_end_wheelie_move_up, MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_UP
create_movement_action acro_end_wheelie_move_left, MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_LEFT
create_movement_action acro_end_wheelie_move_right, MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_RIGHT
create_movement_action walk_diag_northwest, MOVEMENT_ACTION_WALK_NORMAL_DIAGONAL_UP_LEFT
create_movement_action walk_diag_northeast, MOVEMENT_ACTION_WALK_NORMAL_DIAGONAL_UP_RIGHT
create_movement_action walk_diag_southwest, MOVEMENT_ACTION_WALK_NORMAL_DIAGONAL_DOWN_LEFT
create_movement_action walk_diag_southeast, MOVEMENT_ACTION_WALK_NORMAL_DIAGONAL_DOWN_RIGHT
create_movement_action walk_slow_diag_northwest, MOVEMENT_ACTION_WALK_SLOW_DIAGONAL_UP_LEFT
create_movement_action walk_slow_diag_northeast, MOVEMENT_ACTION_WALK_SLOW_DIAGONAL_UP_RIGHT
create_movement_action walk_slow_diag_southwest, MOVEMENT_ACTION_WALK_SLOW_DIAGONAL_DOWN_LEFT
create_movement_action walk_slow_diag_southeast, MOVEMENT_ACTION_WALK_SLOW_DIAGONAL_DOWN_RIGHT
create_movement_action lock_anim, MOVEMENT_ACTION_LOCK_ANIM
create_movement_action unlock_anim, MOVEMENT_ACTION_UNLOCK_ANIM
create_movement_action walk_left_affine, MOVEMENT_ACTION_WALK_LEFT_AFFINE
create_movement_action walk_right_affine, MOVEMENT_ACTION_WALK_RIGHT_AFFINE
create_movement_action levitate, MOVEMENT_ACTION_LEVITATE
create_movement_action stop_levitate, MOVEMENT_ACTION_STOP_LEVITATE
create_movement_action destroy_extra_task, MOVEMENT_ACTION_STOP_LEVITATE_AT_TOP
create_movement_action figure_8, MOVEMENT_ACTION_FIGURE_8
create_movement_action fly_up, MOVEMENT_ACTION_FLY_UP
create_movement_action fly_down, MOVEMENT_ACTION_FLY_DOWN
create_movement_action emote_double_exclamation_mark, MOVEMENT_ACTION_EMOTE_DOUBLE_EXCL_MARK
create_movement_action emote_x, MOVEMENT_ACTION_EMOTE_X
create_movement_action step_end, MOVEMENT_ACTION_STEP_END