From 2a8124ea002906acfecd7ab6530981950a4bb6de Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Thu, 11 Aug 2022 12:19:09 +0800 Subject: [PATCH] Use movement action constant values over enum --- asm/macros/movement.inc | 305 +++++++++++++++++++++++----------------- 1 file changed, 173 insertions(+), 132 deletions(-) diff --git a/asm/macros/movement.inc b/asm/macros/movement.inc index 7cbd1ffc4..b116c72b0 100644 --- a/asm/macros/movement.inc +++ b/asm/macros/movement.inc @@ -1,136 +1,177 @@ - .macro create_movement name - enum _\name + .macro create_movement_action name:req, value:req .macro \name - .byte _\name + .byte \value .endm .endm - enum_start 0 - create_movement face_down - create_movement face_up - create_movement face_left - create_movement face_right - create_movement face_down_fast - create_movement face_up_fast - create_movement face_left_fast - create_movement face_right_fast - create_movement walk_slower_down - create_movement walk_slower_up - create_movement walk_slower_left - create_movement walk_slower_right - create_movement walk_slow_down - create_movement walk_slow_up - create_movement walk_slow_left - create_movement walk_slow_right - create_movement walk_down - create_movement walk_up - create_movement walk_left - create_movement walk_right - create_movement jump_2_down - create_movement jump_2_up - create_movement jump_2_left - create_movement jump_2_right - create_movement delay_1 - create_movement delay_2 - create_movement delay_4 - create_movement delay_8 - create_movement delay_16 - create_movement walk_fast_down - create_movement walk_fast_up - create_movement walk_fast_left - create_movement walk_fast_right - create_movement walk_in_place_slow_down - create_movement walk_in_place_slow_up - create_movement walk_in_place_slow_left - create_movement walk_in_place_slow_right - create_movement walk_in_place_down - create_movement walk_in_place_up - create_movement walk_in_place_left - create_movement walk_in_place_right - create_movement walk_in_place_fast_down - create_movement walk_in_place_fast_up - create_movement walk_in_place_fast_left - create_movement walk_in_place_fast_right - create_movement walk_in_place_fastest_down - create_movement walk_in_place_fastest_up - create_movement walk_in_place_fastest_left - create_movement walk_in_place_fastest_right - create_movement ride_water_current_down - create_movement ride_water_current_up - create_movement ride_water_current_lefft - create_movement ride_water_current_right - create_movement walk_fastest_down - create_movement walk_fastest_up - create_movement walk_fastest_left - create_movement walk_fastest_right - create_movement slide_down - create_movement slide_up - create_movement slide_left - create_movement slide_right - create_movement player_run_down - create_movement player_run_up - create_movement player_run_left - create_movement player_run_right - create_movement player_run_down_slow - create_movement player_run_up_slow - create_movement player_run_left_slow - create_movement player_run_right_slow - create_movement step_45 - create_movement jump_down_run - create_movement jump_up_run - create_movement jump_left_run - create_movement jump_right_run - create_movement face_player - create_movement face_away_player - create_movement lock_facing_direction - create_movement unlock_facing_direction - create_movement jump_down - create_movement jump_up - create_movement jump_left - create_movement jump_right - create_movement jump_in_place_down - create_movement jump_in_place_up - create_movement jump_in_place_left - create_movement jump_in_place_right - create_movement jump_in_place_down_up - create_movement jump_in_place_up_down - create_movement jump_in_place_left_right - create_movement jump_in_place_right_left - create_movement face_original_direction - create_movement nurse_joy_bow - create_movement enable_jump_landing_ground_effect - create_movement disable_jump_landing_ground_effect - create_movement disable_anim - create_movement restore_anim - create_movement set_invisible - create_movement set_visible - create_movement emote_exclamation_mark - create_movement emote_question_mark - create_movement emote_x - create_movement emote_double_exclamation_mark - create_movement emote_smile - create_movement reveal_trainer - create_movement rock_smash_break - create_movement cut_tree - - enum_start 0x94 - create_movement spin_down - create_movement spin_up - create_movement spin_left - create_movement spin_right - - enum_start 0x9b - create_movement walk_slowest_down - create_movement walk_slowest_up - create_movement walk_slowest_left - create_movement walk_slowest_right - create_movement shake_head_or_walk_in_place - - enum_start 0xa6 - create_movement jump_special_with_effect_down - create_movement jump_special_with_effect_up - create_movement jump_special_with_effect_left - create_movement jump_special_with_effect_right - - enum_start 0xfe - create_movement step_end + 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 face_down_fast, MOVEMENT_ACTION_FACE_DOWN_FAST + create_movement_action face_up_fast, MOVEMENT_ACTION_FACE_UP_FAST + create_movement_action face_left_fast, MOVEMENT_ACTION_FACE_LEFT_FAST + create_movement_action face_right_fast, MOVEMENT_ACTION_FACE_RIGHT_FAST + create_movement_action walk_slower_down, MOVEMENT_ACTION_WALK_SLOWER_DOWN + create_movement_action walk_slower_up, MOVEMENT_ACTION_WALK_SLOWER_UP + create_movement_action walk_slower_left, MOVEMENT_ACTION_WALK_SLOWER_LEFT + create_movement_action walk_slower_right, MOVEMENT_ACTION_WALK_SLOWER_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_fastest_down, MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_DOWN + create_movement_action walk_in_place_fastest_up, MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_UP + create_movement_action walk_in_place_fastest_left, MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_LEFT + create_movement_action walk_in_place_fastest_right, MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_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_lefft, MOVEMENT_ACTION_RIDE_WATER_CURRENT_LEFT + create_movement_action ride_water_current_right, MOVEMENT_ACTION_RIDE_WATER_CURRENT_RIGHT + create_movement_action walk_fastest_down, MOVEMENT_ACTION_WALK_FASTEST_DOWN + create_movement_action walk_fastest_up, MOVEMENT_ACTION_WALK_FASTEST_UP + create_movement_action walk_fastest_left, MOVEMENT_ACTION_WALK_FASTEST_LEFT + create_movement_action walk_fastest_right, MOVEMENT_ACTION_WALK_FASTEST_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 player_run_down_slow, MOVEMENT_ACTION_PLAYER_RUN_DOWN_SLOW + create_movement_action player_run_up_slow, MOVEMENT_ACTION_PLAYER_RUN_UP_SLOW + create_movement_action player_run_left_slow, MOVEMENT_ACTION_PLAYER_RUN_LEFT_SLOW + create_movement_action player_run_right_slow, MOVEMENT_ACTION_PLAYER_RUN_RIGHT_SLOW + 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_x, MOVEMENT_ACTION_EMOTE_X + create_movement_action emote_double_exclamation_mark, MOVEMENT_ACTION_EMOTE_DOUBLE_EXCL_MARK + create_movement_action emote_smile, MOVEMENT_ACTION_EMOTE_SMILE + 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 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 spin_down, MOVEMENT_ACTION_SPIN_DOWN + create_movement_action spin_up, MOVEMENT_ACTION_SPIN_UP + create_movement_action spin_left, MOVEMENT_ACTION_SPIN_LEFT + create_movement_action spin_right, MOVEMENT_ACTION_SPIN_RIGHT + create_movement_action movement_action_x98, MOVEMENT_ACTION_0x98 + create_movement_action movement_action_x99, MOVEMENT_ACTION_0x99 + create_movement_action movement_action_x9a, MOVEMENT_ACTION_0x9A + create_movement_action walk_slowest_down, MOVEMENT_ACTION_WALK_SLOWEST_DOWN + create_movement_action walk_slowest_up, MOVEMENT_ACTION_WALK_SLOWEST_UP + create_movement_action walk_slowest_left, MOVEMENT_ACTION_WALK_SLOWEST_LEFT + create_movement_action walk_slowest_right, MOVEMENT_ACTION_WALK_SLOWEST_RIGHT + create_movement_action shake_head_or_walk_in_place, MOVEMENT_ACTION_SHAKE_HEAD_OR_WALK_IN_PLACE + create_movement_action movement_action_xa0, MOVEMENT_ACTION_0xA0 + create_movement_action movement_action_xa1, MOVEMENT_ACTION_0xA1 + create_movement_action movement_action_xa2, MOVEMENT_ACTION_0xA2 + create_movement_action movement_action_xa3, MOVEMENT_ACTION_0xA3 + create_movement_action fly_up, MOVEMENT_ACTION_FLY_UP + create_movement_action fly_down, MOVEMENT_ACTION_FLY_DOWN + create_movement_action jump_special_with_effect_down, MOVEMENT_ACTION_JUMP_SPECIAL_WITH_EFFECT_DOWN + create_movement_action jump_special_with_effect_up, MOVEMENT_ACTION_JUMP_SPECIAL_WITH_EFFECT_UP + create_movement_action jump_special_with_effect_left, MOVEMENT_ACTION_JUMP_SPECIAL_WITH_EFFECT_LEFT + create_movement_action jump_special_with_effect_right, MOVEMENT_ACTION_JUMP_SPECIAL_WITH_EFFECT_RIGHT + create_movement_action step_end, MOVEMENT_ACTION_STEP_END