src/core1/ml.c: more consistent function names

This commit is contained in:
mariob92
2024-10-17 16:45:16 +02:00
parent bc6680d618
commit e19c5f75d0
78 changed files with 216 additions and 248 deletions

View File

@@ -169,7 +169,7 @@ void BGS_func_80389850(Actor *this, s32 arg1) {
sp7C[2] = 0.0f;
sp7C[1] = sp94[1];
sp7C[0] = 0.0f;
if(ml_distance_vec3f(sp94, sp7C) <= 1000.0f){
if(ml_vec3f_distance(sp94, sp7C) <= 1000.0f){
break;
}
}
@@ -428,7 +428,7 @@ void chvilegame_player_consume_piece(Actor *this) {
if ((end != begin) && BGS_func_80389810(sp44)){
sp44[1] = 0.0f;
for(i_ptr = begin; i_ptr < end; i_ptr++){
if ((ml_distance_vec3f(i_ptr->position, sp44) < 65.25) && chyumblie_is_edible(i_ptr->marker)) {
if ((ml_vec3f_distance(i_ptr->position, sp44) < 65.25) && chyumblie_is_edible(i_ptr->marker)) {
is_correct_type = ((local->current_type != YUMBLIE) && (i_ptr->type != YUMBLIE)) || (((local->current_type == YUMBLIE) && i_ptr->type == YUMBLIE));
if (is_correct_type) {
local->player_score++;
@@ -466,7 +466,7 @@ bool chvilegame_cpu_consume_piece(ActorMarker *marker, f32 position[3]) {
begin = vector_getBegin(local->game_pieces);
end = vector_getEnd(local->game_pieces);
for(i_ptr = begin; i_ptr < end; i_ptr++){
if ((ml_distance_vec3f(i_ptr->position, position) < 50.0f) && func_8038B684(i_ptr->marker)) {
if ((ml_vec3f_distance(i_ptr->position, position) < 50.0f) && func_8038B684(i_ptr->marker)) {
local->vile_score++;
timedFunc_set_1(0.0f, (GenFunction_1)func_802FDCB8, ITEM_1B_VILE_VILE_SCORE);
timedFunc_set_1(0.5f, (GenFunction_1)func_802FDCB8, ITEM_1B_VILE_VILE_SCORE);
@@ -545,12 +545,12 @@ bool chvilegame_find_closest_piece(ActorMarker *marker, f32 position[0], f32 yaw
piece_direction[0] = i_ptr->position[0] - position[0];
piece_direction[1] = i_ptr->position[1] - position[1];
piece_direction[2] = i_ptr->position[2] - position[2];
distance = ml_distance_vec3f(i_ptr->position, position);
distance = ml_vec3f_distance(i_ptr->position, position);
angle_diff = func_80256AB4(target_direction[0], target_direction[2], piece_direction[0], piece_direction[2]);
if( (distance > 300.0f)
|| ((-0.8 < angle_diff) && (angle_diff < 0.8) && ((piece_direction[0]*target_direction[0] + piece_direction[1]*target_direction[1] + piece_direction[2]*target_direction[2]) >= 0.0f))
) {
if ((closest_piece == NULL) || (distance < ml_distance_vec3f(position, closest_piece->position))){
if ((closest_piece == NULL) || (distance < ml_vec3f_distance(position, closest_piece->position))){
closest_piece = i_ptr;
}
}