Rename auto_aim to autoaim

This commit is contained in:
Ryan Dwyer 2024-08-19 20:29:14 +10:00
parent 8e9b5087fa
commit 35c82d68de
9 changed files with 53 additions and 53 deletions

View File

@ -44,22 +44,22 @@ void bmove_set_control_def(u32 controldef)
g_Vars.currentplayer->controldef = controldef;
}
void bmove_set_auto_move_centre_enabled(bool enabled)
void bmove_set_automovecentre_enabled(bool enabled)
{
g_Vars.currentplayer->automovecentreenabled = enabled;
}
bool bmove_is_auto_move_centre_enabled(void)
bool bmove_is_automovecentre_enabled(void)
{
return g_Vars.currentplayer->automovecentreenabled;
}
void bmove_set_auto_aim_y(bool enabled)
void bmove_set_autoaim_y(bool enabled)
{
g_Vars.currentplayer->autoyaimenabled = enabled;
}
bool bmove_is_auto_aim_y_enabled(void)
bool bmove_is_autoaim_y_enabled(void)
{
if (!g_Vars.normmplayerisrunning) {
return g_Vars.currentplayer->autoyaimenabled;
@ -69,10 +69,10 @@ bool bmove_is_auto_aim_y_enabled(void)
return false;
}
return options_get_auto_aim(g_Vars.currentplayerstats->mpindex);
return options_get_autoaim(g_Vars.currentplayerstats->mpindex);
}
bool bmove_is_auto_aim_y_enabled_for_current_weapon(void)
bool bmove_is_autoaim_y_enabled_for_current_weapon(void)
{
struct weaponfunc *func = current_player_get_weapon_function(0);
@ -86,7 +86,7 @@ bool bmove_is_auto_aim_y_enabled_for_current_weapon(void)
}
}
return bmove_is_auto_aim_y_enabled();
return bmove_is_autoaim_y_enabled();
}
bool bmove_is_in_sight_aim_mode(void)
@ -94,7 +94,7 @@ bool bmove_is_in_sight_aim_mode(void)
return g_Vars.currentplayer->insightaimmode;
}
void bmove_update_auto_aim_y_prop(struct prop *prop, f32 autoaimy)
void bmove_update_autoaim_y_prop(struct prop *prop, f32 autoaimy)
{
if (g_Vars.currentplayer->autoyaimtime60 >= 0) {
g_Vars.currentplayer->autoyaimtime60 -= g_Vars.lvupdate60;
@ -112,12 +112,12 @@ void bmove_update_auto_aim_y_prop(struct prop *prop, f32 autoaimy)
g_Vars.currentplayer->autoaimy = autoaimy;
}
void bmove_set_auto_aim_x(bool enabled)
void bmove_set_autoaim_x(bool enabled)
{
g_Vars.currentplayer->autoxaimenabled = enabled;
}
bool bmove_is_auto_aim_x_enabled(void)
bool bmove_is_autoaim_x_enabled(void)
{
if (!g_Vars.normmplayerisrunning) {
return g_Vars.currentplayer->autoxaimenabled;
@ -127,10 +127,10 @@ bool bmove_is_auto_aim_x_enabled(void)
return false;
}
return options_get_auto_aim(g_Vars.currentplayerstats->mpindex);
return options_get_autoaim(g_Vars.currentplayerstats->mpindex);
}
bool bmove_is_auto_aim_x_enabled_for_current_weapon(void)
bool bmove_is_autoaim_x_enabled_for_current_weapon(void)
{
struct weaponfunc *func = current_player_get_weapon_function(0);
@ -144,10 +144,10 @@ bool bmove_is_auto_aim_x_enabled_for_current_weapon(void)
}
}
return bmove_is_auto_aim_x_enabled();
return bmove_is_autoaim_x_enabled();
}
void bmove_update_auto_aim_x_prop(struct prop *prop, f32 autoaimx)
void bmove_update_autoaim_x_prop(struct prop *prop, f32 autoaimx)
{
if (g_Vars.currentplayer->autoxaimtime60 >= 0) {
g_Vars.currentplayer->autoxaimtime60 -= g_Vars.lvupdate60;
@ -1754,7 +1754,7 @@ void bmove_process_input(bool allowc1x, bool allowc1y, bool allowc1buttons, bool
if (
(
movedata.canautoaim
&& (bmove_is_auto_aim_x_enabled_for_current_weapon() || bmove_is_auto_aim_y_enabled_for_current_weapon())
&& (bmove_is_autoaim_x_enabled_for_current_weapon() || bmove_is_autoaim_y_enabled_for_current_weapon())
&& g_Vars.currentplayer->autoxaimprop
&& g_Vars.currentplayer->autoyaimprop
&& weapon_has_aim_flag(weaponnum, INVAIMFLAG_AUTOAIM)

View File

@ -57,7 +57,7 @@ void gamefile_apply_options(struct gamefile *file)
s32 player2 = (g_Vars.coopplayernum >= 0 || g_Vars.antiplayernum >= 0) ? 1 : 5;
options_set_forward_pitch(player1, pak_has_bitflag(GAMEFILEFLAG_P1_FORWARDPITCH, file->flags));
options_set_auto_aim(player1, pak_has_bitflag(GAMEFILEFLAG_P1_AUTOAIM, file->flags));
options_set_autoaim(player1, pak_has_bitflag(GAMEFILEFLAG_P1_AUTOAIM, file->flags));
options_set_aim_control(player1, pak_has_bitflag(GAMEFILEFLAG_P1_AIMCONTROL, file->flags));
options_set_sight_on_screen(player1, pak_has_bitflag(GAMEFILEFLAG_P1_SIGHTONSCREEN, file->flags));
options_set_look_ahead(player1, pak_has_bitflag(GAMEFILEFLAG_P1_LOOKAHEAD, file->flags));
@ -70,7 +70,7 @@ void gamefile_apply_options(struct gamefile *file)
options_set_paintball(player1, pak_has_bitflag(GAMEFILEFLAG_P1_PAINTBALL, file->flags));
options_set_forward_pitch(player2, pak_has_bitflag(GAMEFILEFLAG_P2_FORWARDPITCH, file->flags));
options_set_auto_aim(player2, pak_has_bitflag(GAMEFILEFLAG_P2_AUTOAIM, file->flags));
options_set_autoaim(player2, pak_has_bitflag(GAMEFILEFLAG_P2_AUTOAIM, file->flags));
options_set_aim_control(player2, pak_has_bitflag(GAMEFILEFLAG_P2_AIMCONTROL, file->flags));
options_set_sight_on_screen(player2, pak_has_bitflag(GAMEFILEFLAG_P2_SIGHTONSCREEN, file->flags));
options_set_look_ahead(player2, pak_has_bitflag(GAMEFILEFLAG_P2_LOOKAHEAD, file->flags));
@ -389,7 +389,7 @@ s32 gamefile_save(s32 device, s32 fileid, u16 deviceserial)
var80075bd0[0] = 1;
pak_set_bitflag(GAMEFILEFLAG_P1_FORWARDPITCH, g_GameFile.flags, options_get_forward_pitch(p1index));
pak_set_bitflag(GAMEFILEFLAG_P1_AUTOAIM, g_GameFile.flags, options_get_auto_aim(p1index));
pak_set_bitflag(GAMEFILEFLAG_P1_AUTOAIM, g_GameFile.flags, options_get_autoaim(p1index));
pak_set_bitflag(GAMEFILEFLAG_P1_AIMCONTROL, g_GameFile.flags, options_get_aim_control(p1index));
pak_set_bitflag(GAMEFILEFLAG_P1_SIGHTONSCREEN, g_GameFile.flags, options_get_sight_on_screen(p1index));
pak_set_bitflag(GAMEFILEFLAG_P1_LOOKAHEAD, g_GameFile.flags, options_get_look_ahead(p1index));
@ -402,7 +402,7 @@ s32 gamefile_save(s32 device, s32 fileid, u16 deviceserial)
pak_set_bitflag(GAMEFILEFLAG_P1_PAINTBALL, g_GameFile.flags, options_get_paintball(p1index));
pak_set_bitflag(GAMEFILEFLAG_P2_FORWARDPITCH, g_GameFile.flags, options_get_forward_pitch(p2index));
pak_set_bitflag(GAMEFILEFLAG_P2_AUTOAIM, g_GameFile.flags, options_get_auto_aim(p2index));
pak_set_bitflag(GAMEFILEFLAG_P2_AUTOAIM, g_GameFile.flags, options_get_autoaim(p2index));
pak_set_bitflag(GAMEFILEFLAG_P2_AIMCONTROL, g_GameFile.flags, options_get_aim_control(p2index));
pak_set_bitflag(GAMEFILEFLAG_P2_SIGHTONSCREEN, g_GameFile.flags, options_get_sight_on_screen(p2index));
pak_set_bitflag(GAMEFILEFLAG_P2_LOOKAHEAD, g_GameFile.flags, options_get_look_ahead(p2index));

View File

@ -611,7 +611,7 @@ MenuItemHandlerResult menuhandler_sight_on_screen(s32 operation, struct menuitem
return 0;
}
MenuItemHandlerResult menuhandler_auto_aim(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandler_autoaim(s32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@ -623,9 +623,9 @@ MenuItemHandlerResult menuhandler_auto_aim(s32 operation, struct menuitem *item,
switch (operation) {
case MENUOP_GET:
return options_get_auto_aim(mpchrnum);
return options_get_autoaim(mpchrnum);
case MENUOP_SET:
options_set_auto_aim(mpchrnum, data->checkbox.value);
options_set_autoaim(mpchrnum, data->checkbox.value);
g_Vars.modifiedfiles |= MODFILE_GAME;
}
@ -3099,7 +3099,7 @@ struct menuitem g_MissionControlOptionsMenuItems[] = {
0,
L_OPTIONS_198, // "Auto-Aim"
0x00000004,
menuhandler_auto_aim,
menuhandler_autoaim,
},
{
MENUITEMTYPE_DROPDOWN,
@ -3177,7 +3177,7 @@ struct menuitem g_CiControlOptionsMenuItems2[] = {
0,
L_MPWEAPONS_274, // ""
0x00000004,
menuhandler_auto_aim,
menuhandler_autoaim,
},
{
MENUITEMTYPE_DROPDOWN,
@ -3255,7 +3255,7 @@ struct menuitem g_CiControlOptionsMenuItems[] = {
0,
L_OPTIONS_198, // "Auto-Aim"
0x00000004,
menuhandler_auto_aim,
menuhandler_autoaim,
},
{
MENUITEMTYPE_DROPDOWN,
@ -3332,7 +3332,7 @@ struct menuitem g_CiControlPlayer2MenuItems[] = {
0,
L_OPTIONS_198, // "Auto-Aim"
0x00000005,
menuhandler_auto_aim,
menuhandler_autoaim,
},
{
MENUITEMTYPE_DROPDOWN,

View File

@ -49,7 +49,7 @@ s32 options_get_forward_pitch(s32 mpchrnum)
return (g_PlayerConfigsArray[mpchrnum].options & OPTION_FORWARDPITCH) != 0;
}
s32 options_get_auto_aim(s32 mpchrnum)
s32 options_get_autoaim(s32 mpchrnum)
{
return (g_PlayerConfigsArray[mpchrnum].options & OPTION_AUTOAIM) != 0;
}
@ -123,7 +123,7 @@ void options_set_forward_pitch(s32 mpchrnum, bool enable)
}
}
void options_set_auto_aim(s32 mpchrnum, bool enable)
void options_set_autoaim(s32 mpchrnum, bool enable)
{
if (enable) {
g_PlayerConfigsArray[mpchrnum].options |= OPTION_AUTOAIM;

View File

@ -3193,9 +3193,9 @@ void player_tick(bool arg0)
player_update_colour_screen_properties();
player_tick_chr_fade();
bmove_set_auto_aim_y(options_get_auto_aim(g_Vars.currentplayerstats->mpindex));
bmove_set_auto_aim_x(options_get_auto_aim(g_Vars.currentplayerstats->mpindex));
bmove_set_auto_move_centre_enabled(options_get_look_ahead(g_Vars.currentplayerstats->mpindex));
bmove_set_autoaim_y(options_get_autoaim(g_Vars.currentplayerstats->mpindex));
bmove_set_autoaim_x(options_get_autoaim(g_Vars.currentplayerstats->mpindex));
bmove_set_automovecentre_enabled(options_get_look_ahead(g_Vars.currentplayerstats->mpindex));
bgun_set_gun_ammo_visible(GUNAMMOREASON_OPTION, options_get_ammo_on_screen(g_Vars.currentplayerstats->mpindex));
bgun_set_sight_visible(GUNSIGHTREASON_1, true);

View File

@ -2441,7 +2441,7 @@ f32 prop_calculate_autoaim_score(struct prop *prop, struct coord *screenpos, f32
sp8c[0] = floorf(sp8c[0]);
sp84[0] = ceilf(sp84[0]);
if (bmove_is_auto_aim_x_enabled_for_current_weapon() || cangangsta) {
if (bmove_is_autoaim_x_enabled_for_current_weapon() || cangangsta) {
if (sp8c[0] <= right && left <= sp84[0]) {
sp48 = (sp84[0] - sp8c[0]) * 1.5f;
@ -2484,7 +2484,7 @@ f32 prop_calculate_autoaim_score(struct prop *prop, struct coord *screenpos, f32
aimpos[1] = value;
if (bmove_is_auto_aim_x_enabled_for_current_weapon() || cangangsta) {
if (bmove_is_autoaim_x_enabled_for_current_weapon() || cangangsta) {
f32 value = spa0[0];
if (value < left) {
@ -2682,8 +2682,8 @@ void autoaim_tick(void)
break;
}
}
} else if ((bmove_is_auto_aim_y_enabled_for_current_weapon()
|| bmove_is_auto_aim_x_enabled_for_current_weapon()
} else if ((bmove_is_autoaim_y_enabled_for_current_weapon()
|| bmove_is_autoaim_x_enabled_for_current_weapon()
|| cangangsta) && !ismelee) {
// Standard auto aim
f32 bestscore = -1;
@ -2731,12 +2731,12 @@ void autoaim_tick(void)
}
if (bestprop) {
if (bmove_is_auto_aim_y_enabled_for_current_weapon() || iscmpsec) {
bmove_update_auto_aim_y_prop(bestprop, (aimpos[1] - cam_get_screen_top()) / (cam_get_screen_height() * 0.5f) - 1);
if (bmove_is_autoaim_y_enabled_for_current_weapon() || iscmpsec) {
bmove_update_autoaim_y_prop(bestprop, (aimpos[1] - cam_get_screen_top()) / (cam_get_screen_height() * 0.5f) - 1);
}
if (bmove_is_auto_aim_x_enabled_for_current_weapon() || iscmpsec) {
bmove_update_auto_aim_x_prop(bestprop, (aimpos[0] - cam_get_screen_left()) / (cam_get_screen_width() * 0.5f) - 1);
if (bmove_is_autoaim_x_enabled_for_current_weapon() || iscmpsec) {
bmove_update_autoaim_x_prop(bestprop, (aimpos[0] - cam_get_screen_left()) / (cam_get_screen_width() * 0.5f) - 1);
}
if (cangangsta) {
@ -2755,8 +2755,8 @@ void autoaim_tick(void)
}
} else {
u32 stack;
bmove_update_auto_aim_y_prop(NULL, 0);
bmove_update_auto_aim_x_prop(NULL, 0);
bmove_update_autoaim_y_prop(NULL, 0);
bmove_update_autoaim_x_prop(NULL, 0);
g_Vars.currentplayer->gunctrl.gangsta = false;
}

View File

@ -5,16 +5,16 @@
#include "types.h"
void bmove_set_control_def(u32 controldef);
void bmove_set_auto_move_centre_enabled(bool enabled);
void bmove_set_auto_aim_y(bool enabled);
bool bmove_is_auto_aim_y_enabled(void);
bool bmove_is_auto_aim_y_enabled_for_current_weapon(void);
void bmove_set_automovecentre_enabled(bool enabled);
void bmove_set_autoaim_y(bool enabled);
bool bmove_is_autoaim_y_enabled(void);
bool bmove_is_autoaim_y_enabled_for_current_weapon(void);
bool bmove_is_in_sight_aim_mode(void);
void bmove_update_auto_aim_y_prop(struct prop *prop, f32 autoaimy);
void bmove_set_auto_aim_x(bool enabled);
bool bmove_is_auto_aim_x_enabled(void);
bool bmove_is_auto_aim_x_enabled_for_current_weapon(void);
void bmove_update_auto_aim_x_prop(struct prop *prop, f32 autoaimx);
void bmove_update_autoaim_y_prop(struct prop *prop, f32 autoaimy);
void bmove_set_autoaim_x(bool enabled);
bool bmove_is_autoaim_x_enabled(void);
bool bmove_is_autoaim_x_enabled_for_current_weapon(void);
void bmove_update_autoaim_x_prop(struct prop *prop, f32 autoaimx);
struct prop *bmove_get_hoverbike(void);
struct prop *bmove_get_grabbed_prop(void);
void bmove_grab_prop(struct prop *prop);

View File

@ -56,7 +56,7 @@ MenuItemHandlerResult menuhandler_always_show_target(s32 operation, struct menui
MenuItemHandlerResult menuhandler_ammo_on_screen(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandler_anti_player(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandler_anti_radar(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandler_auto_aim(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandler_autoaim(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandler_change_agent(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandler_coop_buddy(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandler_coop_friendly_fire(s32 operation, struct menuitem *item, union handlerdata *data);

View File

@ -9,7 +9,7 @@ void options_set_control_mode(s32 mpchrnum, s32 mode);
s32 options_get_contpad_num1(s32 mpchrnum);
s32 options_get_contpad_num2(s32 mpchrnum);
s32 options_get_forward_pitch(s32 mpchrnum);
s32 options_get_auto_aim(s32 mpchrnum);
s32 options_get_autoaim(s32 mpchrnum);
s32 options_get_look_ahead(s32 mpchrnum);
s32 options_get_aim_control(s32 mpchrnum);
s32 options_get_sight_on_screen(s32 mpchrnum);
@ -24,7 +24,7 @@ u8 options_get_cutscene_subtitles(void);
s32 options_get_head_roll(s32 mpchrnum);
void options_set_forward_pitch(s32 mpchrnum, bool enable);
void options_set_auto_aim(s32 mpchrnum, bool enable);
void options_set_autoaim(s32 mpchrnum, bool enable);
void options_set_look_ahead(s32 mpchrnum, bool enable);
void options_set_aim_control(s32 mpchrnum, s32 index);
void options_set_sight_on_screen(s32 mpchrnum, bool enable);