ref: dd8556eebe43410c62cc99813149be0b2ac30042
parent: 39c5060cbe8fcf7a5d48c62573ca22e81ab0d91d
author: Snesrev <snesrev@protonmail.com>
date: Fri Oct 7 23:36:13 EDT 2022
Rename a function
--- a/dungeon.c
+++ b/dungeon.c
@@ -8591,7 +8591,7 @@
link_actual_vel_x = 2;
}
}
- LinkHop_FindArbitraryLandingSpot();
+ Link_MovePosition();
Link_HandleMovingAnimation_StartWithDash();
if (!link_timer_push_get_tired && sign8(--countdown_timer_for_staircases)) {
countdown_timer_for_staircases = 0;
@@ -8630,7 +8630,7 @@
link_actual_vel_x = -4, link_actual_vel_y = 2;
if (some_animation_timer_steps == 2)
link_actual_vel_x = 0, link_actual_vel_y = 16;
- LinkHop_FindArbitraryLandingSpot();
+ Link_MovePosition();
Link_HandleMovingAnimation_StartWithDash();
if ((uint8)link_x_coord == (uint8)tiledetect_which_y_pos[1])
some_animation_timer_steps = 2;
--- a/player.c
+++ b/player.c
@@ -737,7 +737,7 @@
if ((link_direction & 0xc) == 0)
link_actual_vel_y = 0;
}
- LinkHop_FindArbitraryLandingSpot(); // not
+ Link_MovePosition(); // not
timer_running:
if (link_player_handler_state != 6) {
Link_HandleCardinalCollision(); // not
@@ -791,7 +791,7 @@
link_actual_vel_z_copy = link_actual_vel_z_copy_mirror;
link_z_coord = link_z_coord_mirror;
link_actual_vel_z -= 2;
- LinkHop_FindArbitraryLandingSpot();
+ Link_MovePosition();
if (sign8(link_actual_vel_z)) {
if (link_actual_vel_z < 0xa0)
link_actual_vel_z = 0xa0;
@@ -827,7 +827,7 @@
link_actual_vel_z_copy = link_actual_vel_z_copy_mirror;
BYTE(link_z_coord) = link_z_coord_mirror;
link_actual_vel_z -= 2;
- LinkHop_FindArbitraryLandingSpot();
+ Link_MovePosition();
if (sign8(link_actual_vel_z)) {
if (link_actual_vel_z < 0xa0)
link_actual_vel_z = 0xa0;
@@ -1014,7 +1014,7 @@
void LinkState_HoppingDiagonallyUpOW() { // 878dc6
draw_water_ripples_or_grass = 0;
Player_ChangeZ(2);
- LinkHop_FindArbitraryLandingSpot();
+ Link_MovePosition();
if (sign8(link_z_coord)) {
Link_SplashUponLanding();
if (link_player_handler_state != kPlayerState_Swimming && !link_is_in_deep_water)
@@ -2743,7 +2743,7 @@
BYTE(link_z_coord) = link_z_coord_mirror;
link_auxiliary_state = 2;
Player_ChangeZ(2);
- LinkHop_FindArbitraryLandingSpot();
+ Link_MovePosition();
link_actual_vel_z_mirror = link_actual_vel_z;
link_actual_vel_z_copy_mirror = link_actual_vel_z_copy;
BYTE(link_z_coord_mirror) = link_z_coord;
@@ -3151,7 +3151,7 @@
}
return;
loc_87AD49:
- LinkHop_FindArbitraryLandingSpot();
+ Link_MovePosition();
TileDetect_MainHandler(5);
if (player_is_indoors) {
uint8 x = tiledetect_vertical_ledge >> 4 | tiledetect_vertical_ledge | detection_of_ledge_tiles_horiz_uphoriz;
@@ -3733,7 +3733,7 @@
if (!(link_direction & 0xc))
link_actual_vel_y = 0;
out:
- LinkHop_FindArbitraryLandingSpot();
+ Link_MovePosition();
out2:
Link_HandleCardinalCollision();
HandleIndoorCameraAndDoors();
@@ -5702,10 +5702,10 @@
link_actual_vel_z = 0xff;
link_z_coord = 0xffff;
link_subpixel_z = 0;
- LinkHop_FindArbitraryLandingSpot();
+ Link_MovePosition();
}
-void LinkHop_FindArbitraryLandingSpot() { // 87e370
+void Link_MovePosition() { // 87e370
uint16 x = link_x_coord, y = link_y_coord;
link_y_coord_safe_return_lo = link_y_coord;
link_y_coord_safe_return_hi = link_y_coord >> 8;
--- a/player.h
+++ b/player.h
@@ -207,7 +207,7 @@
void Link_HandleRecoiling();
void Player_HandleIncapacitated_Inner2();
void Link_HandleVelocity();
-void LinkHop_FindArbitraryLandingSpot();
+void Link_MovePosition();
void Link_HandleVelocityAndSandDrag(uint16 x, uint16 y);
void HandleSwimStrokeAndSubpixels();
void Player_SomethingWithVelocity_TiredOrSwim(uint16 xvel, uint16 yvel);