2018-05-05 00:19:04 -07:00
|
|
|
; MovementPointers indexes (see engine/overworld/movement.asm)
|
2020-07-08 12:30:23 -07:00
|
|
|
const_def 0, 4
|
2015-07-15 12:48:44 -07:00
|
|
|
|
2016-07-29 07:48:27 -07:00
|
|
|
; Directional movements
|
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_turn_head ; $00
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO turn_head
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_turn_head | \1
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_turn_step ; $04
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO turn_step
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_turn_step | \1
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_slow_step ; $08
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO slow_step
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_slow_step | \1
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_step ; $0c
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO step
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_step | \1
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_big_step ; $10
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO big_step
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_big_step | \1
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_slow_slide_step ; $14
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO slow_slide_step
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_slow_slide_step | \1
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_slide_step ; $18
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO slide_step
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_slide_step | \1
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_fast_slide_step ; $1c
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO fast_slide_step
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_fast_slide_step | \1
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_turn_away ; $20
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO turn_away
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_turn_away | \1
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_turn_in ; $24
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO turn_in
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_turn_in | \1
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_turn_waterfall ; $28
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO turn_waterfall
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_turn_waterfall | \1
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_slow_jump_step ; $2c
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO slow_jump_step
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_slow_jump_step | \1
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_jump_step ; $30
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO jump_step
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_jump_step | \1
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_fast_jump_step ; $34
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO fast_jump_step
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_fast_jump_step | \1
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2022-06-06 14:25:42 -07:00
|
|
|
DEF const_inc = 1
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2016-07-29 07:48:27 -07:00
|
|
|
; Control
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_remove_sliding ; $38
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO remove_sliding
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_remove_sliding
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2016-03-01 19:31:21 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_set_sliding ; $39
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO set_sliding
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_set_sliding
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-07-15 12:48:44 -07:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_remove_fixed_facing ; $3a
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO remove_fixed_facing
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_remove_fixed_facing
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_fix_facing ; $3b
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO fix_facing
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_fix_facing
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_show_object ; $3c
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO show_object
|
2017-12-24 10:46:34 -08:00
|
|
|
db movement_show_object
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-07-15 12:48:44 -07:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_hide_object ; $3d
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO hide_object
|
2017-12-24 10:46:34 -08:00
|
|
|
db movement_hide_object
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2016-05-14 10:46:14 -07:00
|
|
|
; Sleep
|
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_step_sleep ; $3e
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO step_sleep
|
|
|
|
if \1 <= 8
|
|
|
|
db movement_step_sleep + \1 - 1
|
|
|
|
else
|
|
|
|
db movement_step_sleep + 8, \1
|
|
|
|
endc
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2016-05-14 09:28:00 -07:00
|
|
|
|
2020-07-08 13:20:15 -07:00
|
|
|
const_skip 8 ; all step_sleep values
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_step_end ; $47
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO step_end
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_step_end
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_step_48 ; $48
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO step_48
|
2016-07-29 07:48:27 -07:00
|
|
|
db movement_step_48
|
2017-12-14 21:38:52 -08:00
|
|
|
db \1 ; ???
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-07-15 12:48:44 -07:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_remove_object ; $49
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO remove_object
|
2017-12-24 10:46:34 -08:00
|
|
|
db movement_remove_object
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_step_loop ; $4a
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO step_loop
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_step_loop
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-11-11 20:38:57 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_step_4b ; $4b
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO step_4b
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_step_4b
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-07-15 12:48:44 -07:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_teleport_from ; $4c
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO teleport_from
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_teleport_from
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_teleport_to ; $4d
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO teleport_to
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_teleport_to
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_skyfall ; $4e
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO skyfall
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_skyfall
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_step_dig ; $4f
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO step_dig
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_step_dig
|
|
|
|
db \1 ; length
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_step_bump ; $50
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO step_bump
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_step_bump
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-07-18 20:45:39 -07:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_fish_got_bite ; $51
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO fish_got_bite
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_fish_got_bite
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-07-18 20:45:39 -07:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_fish_cast_rod ; $52
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO fish_cast_rod
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_fish_cast_rod
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-07-15 12:48:44 -07:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_hide_emote ; $53
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO hide_emote
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_hide_emote
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_show_emote ; $54
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO show_emote
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_show_emote
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-01-20 00:01:23 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_step_shake ; $55
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO step_shake
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_step_shake
|
2015-01-20 00:01:23 -08:00
|
|
|
db \1 ; displacement
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-07-22 12:57:02 -07:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_tree_shake ; $56
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO tree_shake
|
2016-04-10 10:47:24 -07:00
|
|
|
db movement_tree_shake
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2016-04-10 10:47:24 -07:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_rock_smash ; $57
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO rock_smash
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_rock_smash
|
|
|
|
db \1 ; length
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-11-15 18:28:15 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_return_dig ; $58
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO return_dig
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_return_dig
|
|
|
|
db \1 ; length
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2015-12-15 07:55:56 -08:00
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
const movement_skyfall_top ; $59
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO skyfall_top
|
2017-12-14 21:38:52 -08:00
|
|
|
db movement_skyfall_top
|
2017-12-28 13:31:16 -08:00
|
|
|
ENDM
|
2021-03-11 13:28:52 -08:00
|
|
|
|
2022-06-06 14:25:42 -07:00
|
|
|
DEF NUM_MOVEMENT_CMDS EQU const_value
|