Gave throttle it's own sensitivity and deadzone settings; Added patch by Hans de Goede to let Slide-On and Bank-On settings use invert settings from Slide- and Bank-axes
This commit is contained in:
parent
d8263a85b6
commit
aafc5ec877
|
@ -4,6 +4,7 @@ D1X-Rebirth Changelog
|
||||||
--------
|
--------
|
||||||
main/fireball.c, main/lighting.c: Code consistency checks by _Tyr_; Fixed set but unused variables
|
main/fireball.c, main/lighting.c: Code consistency checks by _Tyr_; Fixed set but unused variables
|
||||||
d1x-rebirth.desktop, SConstruct, misc/physfsx.c: Patches by Hans de Goede: Made the .desktop file follow the official specifications; Added explicit link to libmath for newer versions of binutils; Fixed crash using PhysFS 1.x in PHYSFSX_addArchiveContent()
|
d1x-rebirth.desktop, SConstruct, misc/physfsx.c: Patches by Hans de Goede: Made the .desktop file follow the official specifications; Added explicit link to libmath for newer versions of binutils; Fixed crash using PhysFS 1.x in PHYSFSX_addArchiveContent()
|
||||||
|
main/kconfig.c, main/menu.c, main/playsave.c, main/playsave.h: Gave throttle it's own sensitivity and deadzone settings; Added patch by Hans de Goede to let Slide-On and Bank-On settings use invert settings from Slide- and Bank-axes
|
||||||
|
|
||||||
20110925
|
20110925
|
||||||
--------
|
--------
|
||||||
|
|
|
@ -1241,7 +1241,7 @@ void kconfig_read_controls(d_event *event, int automap_flag)
|
||||||
if (axis == kc_joystick[21].value) // Bank Deadzone
|
if (axis == kc_joystick[21].value) // Bank Deadzone
|
||||||
joy_null_value = PlayerCfg.JoystickDead[4]*8;
|
joy_null_value = PlayerCfg.JoystickDead[4]*8;
|
||||||
if (axis == kc_joystick[23].value) // Throttle - default deadzone
|
if (axis == kc_joystick[23].value) // Throttle - default deadzone
|
||||||
joy_null_value = 20;
|
joy_null_value = PlayerCfg.JoystickDead[5]*3;
|
||||||
|
|
||||||
if (Controls.raw_joy_axis[axis] > joy_null_value)
|
if (Controls.raw_joy_axis[axis] > joy_null_value)
|
||||||
Controls.raw_joy_axis[axis] = ((Controls.raw_joy_axis[axis]-joy_null_value)*128)/(128-joy_null_value);
|
Controls.raw_joy_axis[axis] = ((Controls.raw_joy_axis[axis]-joy_null_value)*128)/(128-joy_null_value);
|
||||||
|
@ -1332,12 +1332,12 @@ void kconfig_read_controls(d_event *event, int automap_flag)
|
||||||
if ( Controls.pitch_forward_state ) Controls.vertical_thrust_time += speed_factor*FrameTime;
|
if ( Controls.pitch_forward_state ) Controls.vertical_thrust_time += speed_factor*FrameTime;
|
||||||
if ( Controls.pitch_backward_state ) Controls.vertical_thrust_time -= speed_factor*FrameTime;
|
if ( Controls.pitch_backward_state ) Controls.vertical_thrust_time -= speed_factor*FrameTime;
|
||||||
// From joystick...
|
// From joystick...
|
||||||
if ( !kc_joystick[14].value ) // If not inverted...
|
if ( !kc_joystick[20].value /*!kc_joystick[14].value*/ ) // If not inverted... NOTE: Use Slide U/D invert setting
|
||||||
Controls.vertical_thrust_time += (Controls.joy_axis[kc_joystick[13].value]*PlayerCfg.JoystickSens[3])/8;
|
Controls.vertical_thrust_time += (Controls.joy_axis[kc_joystick[13].value]*PlayerCfg.JoystickSens[3])/8;
|
||||||
else
|
else
|
||||||
Controls.vertical_thrust_time -= (Controls.joy_axis[kc_joystick[13].value]*PlayerCfg.JoystickSens[3])/8;
|
Controls.vertical_thrust_time -= (Controls.joy_axis[kc_joystick[13].value]*PlayerCfg.JoystickSens[3])/8;
|
||||||
// From mouse...
|
// From mouse...
|
||||||
if ( !kc_mouse[14].value ) // If not inverted...
|
if ( !kc_mouse[20].value /*!kc_mouse[14].value*/ ) // If not inverted... NOTE: Use Slide U/D invert setting
|
||||||
Controls.vertical_thrust_time -= (Controls.mouse_axis[kc_mouse[13].value]*PlayerCfg.MouseSens[3])/8;
|
Controls.vertical_thrust_time -= (Controls.mouse_axis[kc_mouse[13].value]*PlayerCfg.MouseSens[3])/8;
|
||||||
else
|
else
|
||||||
Controls.vertical_thrust_time += (Controls.mouse_axis[kc_mouse[13].value]*PlayerCfg.MouseSens[3])/8;
|
Controls.vertical_thrust_time += (Controls.mouse_axis[kc_mouse[13].value]*PlayerCfg.MouseSens[3])/8;
|
||||||
|
@ -1392,12 +1392,12 @@ void kconfig_read_controls(d_event *event, int automap_flag)
|
||||||
if ( Controls.heading_right_state ) Controls.sideways_thrust_time += speed_factor*FrameTime;
|
if ( Controls.heading_right_state ) Controls.sideways_thrust_time += speed_factor*FrameTime;
|
||||||
if ( Controls.heading_left_state ) Controls.sideways_thrust_time -= speed_factor*FrameTime;
|
if ( Controls.heading_left_state ) Controls.sideways_thrust_time -= speed_factor*FrameTime;
|
||||||
// From joystick...
|
// From joystick...
|
||||||
if ( !kc_joystick[16].value ) // If not inverted...
|
if ( !kc_joystick[18].value /*!kc_joystick[16].value*/ ) // If not inverted... NOTE: Use Slide L/R invert setting
|
||||||
Controls.sideways_thrust_time += (Controls.joy_axis[kc_joystick[15].value]*PlayerCfg.JoystickSens[2])/8;
|
Controls.sideways_thrust_time += (Controls.joy_axis[kc_joystick[15].value]*PlayerCfg.JoystickSens[2])/8;
|
||||||
else
|
else
|
||||||
Controls.sideways_thrust_time -= (Controls.joy_axis[kc_joystick[15].value]*PlayerCfg.JoystickSens[2])/8;
|
Controls.sideways_thrust_time -= (Controls.joy_axis[kc_joystick[15].value]*PlayerCfg.JoystickSens[2])/8;
|
||||||
// From mouse...
|
// From mouse...
|
||||||
if ( !kc_mouse[16].value ) // If not inverted...
|
if ( !kc_mouse[18].value /*!kc_mouse[16].value*/ ) // If not inverted... NOTE: Use Slide L/R invert setting
|
||||||
Controls.sideways_thrust_time += (Controls.mouse_axis[kc_mouse[15].value]*PlayerCfg.MouseSens[2])/8;
|
Controls.sideways_thrust_time += (Controls.mouse_axis[kc_mouse[15].value]*PlayerCfg.MouseSens[2])/8;
|
||||||
else
|
else
|
||||||
Controls.sideways_thrust_time -= (Controls.mouse_axis[kc_mouse[15].value]*PlayerCfg.MouseSens[2])/8;
|
Controls.sideways_thrust_time -= (Controls.mouse_axis[kc_mouse[15].value]*PlayerCfg.MouseSens[2])/8;
|
||||||
|
@ -1423,12 +1423,12 @@ void kconfig_read_controls(d_event *event, int automap_flag)
|
||||||
if ( Controls.heading_left_state ) Controls.bank_time += speed_factor*FrameTime;
|
if ( Controls.heading_left_state ) Controls.bank_time += speed_factor*FrameTime;
|
||||||
if ( Controls.heading_right_state ) Controls.bank_time -= speed_factor*FrameTime;
|
if ( Controls.heading_right_state ) Controls.bank_time -= speed_factor*FrameTime;
|
||||||
// From joystick...
|
// From joystick...
|
||||||
if ( !kc_joystick[16].value ) // If not inverted...
|
if ( !kc_joystick[22].value /*!kc_joystick[16].value*/ ) // If not inverted... NOTE: Use Bank L/R invert setting
|
||||||
Controls.bank_time -= (Controls.joy_axis[kc_joystick[15].value]*PlayerCfg.JoystickSens[4])/8;
|
Controls.bank_time -= (Controls.joy_axis[kc_joystick[15].value]*PlayerCfg.JoystickSens[4])/8;
|
||||||
else
|
else
|
||||||
Controls.bank_time += (Controls.joy_axis[kc_joystick[15].value]*PlayerCfg.JoystickSens[4])/8;
|
Controls.bank_time += (Controls.joy_axis[kc_joystick[15].value]*PlayerCfg.JoystickSens[4])/8;
|
||||||
// From mouse...
|
// From mouse...
|
||||||
if ( !kc_mouse[16].value ) // If not inverted...
|
if ( !kc_mouse[22].value /*!kc_mouse[16].value*/ ) // If not inverted... NOTE: Use Bank L/R invert setting
|
||||||
Controls.bank_time += (Controls.mouse_axis[kc_mouse[15].value]*PlayerCfg.MouseSens[4])/8;
|
Controls.bank_time += (Controls.mouse_axis[kc_mouse[15].value]*PlayerCfg.MouseSens[4])/8;
|
||||||
else
|
else
|
||||||
Controls.bank_time -= (Controls.mouse_axis[kc_mouse[15].value]*PlayerCfg.MouseSens[4])/8;
|
Controls.bank_time -= (Controls.mouse_axis[kc_mouse[15].value]*PlayerCfg.MouseSens[4])/8;
|
||||||
|
@ -1439,14 +1439,14 @@ void kconfig_read_controls(d_event *event, int automap_flag)
|
||||||
if ( Controls.bank_right_state ) Controls.bank_time -= speed_factor*FrameTime;
|
if ( Controls.bank_right_state ) Controls.bank_time -= speed_factor*FrameTime;
|
||||||
// From joystick...
|
// From joystick...
|
||||||
if ( !kc_joystick[22].value ) // If not inverted...
|
if ( !kc_joystick[22].value ) // If not inverted...
|
||||||
Controls.bank_time -= Controls.joy_axis[kc_joystick[21].value];
|
Controls.bank_time -= (Controls.joy_axis[kc_joystick[21].value]*PlayerCfg.JoystickSens[4])/8;
|
||||||
else
|
else
|
||||||
Controls.bank_time += Controls.joy_axis[kc_joystick[21].value];
|
Controls.bank_time += (Controls.joy_axis[kc_joystick[21].value]*PlayerCfg.JoystickSens[4])/8;
|
||||||
// From mouse...
|
// From mouse...
|
||||||
if ( !kc_mouse[22].value ) // If not inverted...
|
if ( !kc_mouse[22].value ) // If not inverted...
|
||||||
Controls.bank_time += Controls.mouse_axis[kc_mouse[21].value];
|
Controls.bank_time += (Controls.mouse_axis[kc_mouse[21].value]*PlayerCfg.MouseSens[4])/8;
|
||||||
else
|
else
|
||||||
Controls.bank_time -= Controls.mouse_axis[kc_mouse[21].value];
|
Controls.bank_time -= (Controls.mouse_axis[kc_mouse[21].value]*PlayerCfg.MouseSens[4])/8;
|
||||||
|
|
||||||
//----------- Read forward_thrust_time -------------
|
//----------- Read forward_thrust_time -------------
|
||||||
// From keyboard/buttons...
|
// From keyboard/buttons...
|
||||||
|
@ -1454,14 +1454,14 @@ void kconfig_read_controls(d_event *event, int automap_flag)
|
||||||
if ( Controls.reverse_state ) Controls.forward_thrust_time -= speed_factor*FrameTime;
|
if ( Controls.reverse_state ) Controls.forward_thrust_time -= speed_factor*FrameTime;
|
||||||
// From joystick...
|
// From joystick...
|
||||||
if ( !kc_joystick[24].value ) // If not inverted...
|
if ( !kc_joystick[24].value ) // If not inverted...
|
||||||
Controls.forward_thrust_time -= Controls.joy_axis[kc_joystick[23].value];
|
Controls.forward_thrust_time -= (Controls.joy_axis[kc_joystick[23].value]*PlayerCfg.JoystickSens[5])/8;
|
||||||
else
|
else
|
||||||
Controls.forward_thrust_time += Controls.joy_axis[kc_joystick[23].value];
|
Controls.forward_thrust_time += (Controls.joy_axis[kc_joystick[23].value]*PlayerCfg.JoystickSens[5])/8;
|
||||||
// From mouse...
|
// From mouse...
|
||||||
if ( !kc_mouse[24].value ) // If not inverted...
|
if ( !kc_mouse[24].value ) // If not inverted...
|
||||||
Controls.forward_thrust_time -= Controls.mouse_axis[kc_mouse[23].value];
|
Controls.forward_thrust_time -= (Controls.mouse_axis[kc_mouse[23].value]*PlayerCfg.MouseSens[5])/8;
|
||||||
else
|
else
|
||||||
Controls.forward_thrust_time += Controls.mouse_axis[kc_mouse[23].value];
|
Controls.forward_thrust_time += (Controls.mouse_axis[kc_mouse[23].value]*PlayerCfg.MouseSens[5])/8;
|
||||||
|
|
||||||
//----------- Read cruise-control-type of throttle.
|
//----------- Read cruise-control-type of throttle.
|
||||||
if ( Controls.cruise_plus_state ) Cruise_speed += speed_factor*FrameTime*80;
|
if ( Controls.cruise_plus_state ) Cruise_speed += speed_factor*FrameTime*80;
|
||||||
|
|
|
@ -982,7 +982,7 @@ void change_res()
|
||||||
|
|
||||||
void input_config_sensitivity()
|
void input_config_sensitivity()
|
||||||
{
|
{
|
||||||
newmenu_item m[23];
|
newmenu_item m[26];
|
||||||
int i = 0, nitems = 0, joysens = 0, joydead = 0, mousesens = 0, mousefsdead;
|
int i = 0, nitems = 0, joysens = 0, joydead = 0, mousesens = 0, mousefsdead;
|
||||||
|
|
||||||
m[nitems].type = NM_TYPE_TEXT; m[nitems].text = "Joystick Sensitivity:"; nitems++;
|
m[nitems].type = NM_TYPE_TEXT; m[nitems].text = "Joystick Sensitivity:"; nitems++;
|
||||||
|
@ -992,6 +992,7 @@ void input_config_sensitivity()
|
||||||
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_SLIDE_LR; m[nitems].value = PlayerCfg.JoystickSens[2]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_SLIDE_LR; m[nitems].value = PlayerCfg.JoystickSens[2]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
||||||
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_SLIDE_UD; m[nitems].value = PlayerCfg.JoystickSens[3]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_SLIDE_UD; m[nitems].value = PlayerCfg.JoystickSens[3]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
||||||
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_BANK_LR; m[nitems].value = PlayerCfg.JoystickSens[4]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_BANK_LR; m[nitems].value = PlayerCfg.JoystickSens[4]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
||||||
|
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_THROTTLE; m[nitems].value = PlayerCfg.JoystickSens[5]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
||||||
m[nitems].type = NM_TYPE_TEXT; m[nitems].text = ""; nitems++;
|
m[nitems].type = NM_TYPE_TEXT; m[nitems].text = ""; nitems++;
|
||||||
m[nitems].type = NM_TYPE_TEXT; m[nitems].text = "Joystick Deadzone:"; nitems++;
|
m[nitems].type = NM_TYPE_TEXT; m[nitems].text = "Joystick Deadzone:"; nitems++;
|
||||||
joydead = nitems;
|
joydead = nitems;
|
||||||
|
@ -1000,6 +1001,7 @@ void input_config_sensitivity()
|
||||||
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_SLIDE_LR; m[nitems].value = PlayerCfg.JoystickDead[2]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_SLIDE_LR; m[nitems].value = PlayerCfg.JoystickDead[2]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
||||||
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_SLIDE_UD; m[nitems].value = PlayerCfg.JoystickDead[3]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_SLIDE_UD; m[nitems].value = PlayerCfg.JoystickDead[3]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
||||||
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_BANK_LR; m[nitems].value = PlayerCfg.JoystickDead[4]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_BANK_LR; m[nitems].value = PlayerCfg.JoystickDead[4]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
||||||
|
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_THROTTLE; m[nitems].value = PlayerCfg.JoystickDead[5]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
||||||
m[nitems].type = NM_TYPE_TEXT; m[nitems].text = ""; nitems++;
|
m[nitems].type = NM_TYPE_TEXT; m[nitems].text = ""; nitems++;
|
||||||
m[nitems].type = NM_TYPE_TEXT; m[nitems].text = "Mouse Sensitivity:"; nitems++;
|
m[nitems].type = NM_TYPE_TEXT; m[nitems].text = "Mouse Sensitivity:"; nitems++;
|
||||||
mousesens = nitems;
|
mousesens = nitems;
|
||||||
|
@ -1008,6 +1010,7 @@ void input_config_sensitivity()
|
||||||
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_SLIDE_LR; m[nitems].value = PlayerCfg.MouseSens[2]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_SLIDE_LR; m[nitems].value = PlayerCfg.MouseSens[2]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
||||||
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_SLIDE_UD; m[nitems].value = PlayerCfg.MouseSens[3]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_SLIDE_UD; m[nitems].value = PlayerCfg.MouseSens[3]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
||||||
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_BANK_LR; m[nitems].value = PlayerCfg.MouseSens[4]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_BANK_LR; m[nitems].value = PlayerCfg.MouseSens[4]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
||||||
|
m[nitems].type = NM_TYPE_SLIDER; m[nitems].text = TXT_THROTTLE; m[nitems].value = PlayerCfg.MouseSens[5]; m[nitems].min_value = 0; m[nitems].max_value = 16; nitems++;
|
||||||
m[nitems].type = NM_TYPE_TEXT; m[nitems].text = ""; nitems++;
|
m[nitems].type = NM_TYPE_TEXT; m[nitems].text = ""; nitems++;
|
||||||
m[nitems].type = NM_TYPE_TEXT; m[nitems].text = "Mouse FlightSim Deadzone:"; nitems++;
|
m[nitems].type = NM_TYPE_TEXT; m[nitems].text = "Mouse FlightSim Deadzone:"; nitems++;
|
||||||
mousefsdead = nitems;
|
mousefsdead = nitems;
|
||||||
|
@ -1015,7 +1018,7 @@ void input_config_sensitivity()
|
||||||
|
|
||||||
newmenu_do1(NULL, "SENSITIVITY & DEADZONE", nitems, m, NULL, NULL, 1);
|
newmenu_do1(NULL, "SENSITIVITY & DEADZONE", nitems, m, NULL, NULL, 1);
|
||||||
|
|
||||||
for (i = 0; i <= 4; i++)
|
for (i = 0; i <= 5; i++)
|
||||||
{
|
{
|
||||||
PlayerCfg.JoystickSens[i] = m[joysens+i].value;
|
PlayerCfg.JoystickSens[i] = m[joysens+i].value;
|
||||||
PlayerCfg.JoystickDead[i] = m[joydead+i].value;
|
PlayerCfg.JoystickDead[i] = m[joydead+i].value;
|
||||||
|
|
|
@ -77,10 +77,10 @@ int new_player_config()
|
||||||
PlayerCfg.NHighestLevels = 1;
|
PlayerCfg.NHighestLevels = 1;
|
||||||
PlayerCfg.HighestLevels[0].Shortname[0] = 0; //no name for mission 0
|
PlayerCfg.HighestLevels[0].Shortname[0] = 0; //no name for mission 0
|
||||||
PlayerCfg.HighestLevels[0].LevelNum = 1; //was highest level in old struct
|
PlayerCfg.HighestLevels[0].LevelNum = 1; //was highest level in old struct
|
||||||
PlayerCfg.JoystickSens[0] = PlayerCfg.JoystickSens[1] = PlayerCfg.JoystickSens[2] = PlayerCfg.JoystickSens[3] = PlayerCfg.JoystickSens[4] = 8;
|
PlayerCfg.JoystickSens[0] = PlayerCfg.JoystickSens[1] = PlayerCfg.JoystickSens[2] = PlayerCfg.JoystickSens[3] = PlayerCfg.JoystickSens[4] = PlayerCfg.JoystickSens[5] = 8;
|
||||||
PlayerCfg.JoystickDead[0] = PlayerCfg.JoystickDead[1] = PlayerCfg.JoystickDead[2] = PlayerCfg.JoystickDead[3] = PlayerCfg.JoystickDead[4] = 0;
|
PlayerCfg.JoystickDead[0] = PlayerCfg.JoystickDead[1] = PlayerCfg.JoystickDead[2] = PlayerCfg.JoystickDead[3] = PlayerCfg.JoystickDead[4] = PlayerCfg.JoystickDead[5] = 0;
|
||||||
PlayerCfg.MouseFlightSim = 0;
|
PlayerCfg.MouseFlightSim = 0;
|
||||||
PlayerCfg.MouseSens[0] = PlayerCfg.MouseSens[1] = PlayerCfg.MouseSens[2] = PlayerCfg.MouseSens[3] = PlayerCfg.MouseSens[4] = 8;
|
PlayerCfg.MouseSens[0] = PlayerCfg.MouseSens[1] = PlayerCfg.MouseSens[2] = PlayerCfg.MouseSens[3] = PlayerCfg.MouseSens[4] = PlayerCfg.MouseSens[5] = 8;
|
||||||
PlayerCfg.MouseFSDead = 0;
|
PlayerCfg.MouseFSDead = 0;
|
||||||
PlayerCfg.MouseFSIndicator = 1;
|
PlayerCfg.MouseFSIndicator = 1;
|
||||||
PlayerCfg.CockpitMode[0] = PlayerCfg.CockpitMode[1] = CM_FULL_COCKPIT;
|
PlayerCfg.CockpitMode[0] = PlayerCfg.CockpitMode[1] = CM_FULL_COCKPIT;
|
||||||
|
@ -172,6 +172,8 @@ int read_player_d1x(char *filename)
|
||||||
PlayerCfg.JoystickSens[3] = atoi(line);
|
PlayerCfg.JoystickSens[3] = atoi(line);
|
||||||
if(!strcmp(word,"SENSITIVITY4"))
|
if(!strcmp(word,"SENSITIVITY4"))
|
||||||
PlayerCfg.JoystickSens[4] = atoi(line);
|
PlayerCfg.JoystickSens[4] = atoi(line);
|
||||||
|
if(!strcmp(word,"SENSITIVITY5"))
|
||||||
|
PlayerCfg.JoystickSens[5] = atoi(line);
|
||||||
if(!strcmp(word,"DEADZONE0"))
|
if(!strcmp(word,"DEADZONE0"))
|
||||||
PlayerCfg.JoystickDead[0] = atoi(line);
|
PlayerCfg.JoystickDead[0] = atoi(line);
|
||||||
if(!strcmp(word,"DEADZONE1"))
|
if(!strcmp(word,"DEADZONE1"))
|
||||||
|
@ -182,6 +184,8 @@ int read_player_d1x(char *filename)
|
||||||
PlayerCfg.JoystickDead[3] = atoi(line);
|
PlayerCfg.JoystickDead[3] = atoi(line);
|
||||||
if(!strcmp(word,"DEADZONE4"))
|
if(!strcmp(word,"DEADZONE4"))
|
||||||
PlayerCfg.JoystickDead[4] = atoi(line);
|
PlayerCfg.JoystickDead[4] = atoi(line);
|
||||||
|
if(!strcmp(word,"DEADZONE5"))
|
||||||
|
PlayerCfg.JoystickDead[5] = atoi(line);
|
||||||
d_free(word);
|
d_free(word);
|
||||||
PHYSFSX_fgets(line,50,f);
|
PHYSFSX_fgets(line,50,f);
|
||||||
word=splitword(line,'=');
|
word=splitword(line,'=');
|
||||||
|
@ -209,6 +213,8 @@ int read_player_d1x(char *filename)
|
||||||
PlayerCfg.MouseSens[3] = atoi(line);
|
PlayerCfg.MouseSens[3] = atoi(line);
|
||||||
if(!strcmp(word,"SENSITIVITY4"))
|
if(!strcmp(word,"SENSITIVITY4"))
|
||||||
PlayerCfg.MouseSens[4] = atoi(line);
|
PlayerCfg.MouseSens[4] = atoi(line);
|
||||||
|
if(!strcmp(word,"SENSITIVITY5"))
|
||||||
|
PlayerCfg.MouseSens[5] = atoi(line);
|
||||||
if(!strcmp(word,"FSDEAD"))
|
if(!strcmp(word,"FSDEAD"))
|
||||||
PlayerCfg.MouseFSDead = atoi(line);
|
PlayerCfg.MouseFSDead = atoi(line);
|
||||||
if(!strcmp(word,"FSINDI"))
|
if(!strcmp(word,"FSINDI"))
|
||||||
|
@ -567,11 +573,13 @@ int write_player_d1x(char *filename)
|
||||||
PHYSFSX_printf(fout,"sensitivity2=%d\n",PlayerCfg.JoystickSens[2]);
|
PHYSFSX_printf(fout,"sensitivity2=%d\n",PlayerCfg.JoystickSens[2]);
|
||||||
PHYSFSX_printf(fout,"sensitivity3=%d\n",PlayerCfg.JoystickSens[3]);
|
PHYSFSX_printf(fout,"sensitivity3=%d\n",PlayerCfg.JoystickSens[3]);
|
||||||
PHYSFSX_printf(fout,"sensitivity4=%d\n",PlayerCfg.JoystickSens[4]);
|
PHYSFSX_printf(fout,"sensitivity4=%d\n",PlayerCfg.JoystickSens[4]);
|
||||||
|
PHYSFSX_printf(fout,"sensitivity5=%d\n",PlayerCfg.JoystickSens[5]);
|
||||||
PHYSFSX_printf(fout,"deadzone0=%d\n",PlayerCfg.JoystickDead[0]);
|
PHYSFSX_printf(fout,"deadzone0=%d\n",PlayerCfg.JoystickDead[0]);
|
||||||
PHYSFSX_printf(fout,"deadzone1=%d\n",PlayerCfg.JoystickDead[1]);
|
PHYSFSX_printf(fout,"deadzone1=%d\n",PlayerCfg.JoystickDead[1]);
|
||||||
PHYSFSX_printf(fout,"deadzone2=%d\n",PlayerCfg.JoystickDead[2]);
|
PHYSFSX_printf(fout,"deadzone2=%d\n",PlayerCfg.JoystickDead[2]);
|
||||||
PHYSFSX_printf(fout,"deadzone3=%d\n",PlayerCfg.JoystickDead[3]);
|
PHYSFSX_printf(fout,"deadzone3=%d\n",PlayerCfg.JoystickDead[3]);
|
||||||
PHYSFSX_printf(fout,"deadzone4=%d\n",PlayerCfg.JoystickDead[4]);
|
PHYSFSX_printf(fout,"deadzone4=%d\n",PlayerCfg.JoystickDead[4]);
|
||||||
|
PHYSFSX_printf(fout,"deadzone5=%d\n",PlayerCfg.JoystickDead[5]);
|
||||||
PHYSFSX_printf(fout,"[end]\n");
|
PHYSFSX_printf(fout,"[end]\n");
|
||||||
PHYSFSX_printf(fout,"[mouse]\n");
|
PHYSFSX_printf(fout,"[mouse]\n");
|
||||||
PHYSFSX_printf(fout,"flightsim=%d\n",PlayerCfg.MouseFlightSim);
|
PHYSFSX_printf(fout,"flightsim=%d\n",PlayerCfg.MouseFlightSim);
|
||||||
|
@ -580,6 +588,7 @@ int write_player_d1x(char *filename)
|
||||||
PHYSFSX_printf(fout,"sensitivity2=%d\n",PlayerCfg.MouseSens[2]);
|
PHYSFSX_printf(fout,"sensitivity2=%d\n",PlayerCfg.MouseSens[2]);
|
||||||
PHYSFSX_printf(fout,"sensitivity3=%d\n",PlayerCfg.MouseSens[3]);
|
PHYSFSX_printf(fout,"sensitivity3=%d\n",PlayerCfg.MouseSens[3]);
|
||||||
PHYSFSX_printf(fout,"sensitivity4=%d\n",PlayerCfg.MouseSens[4]);
|
PHYSFSX_printf(fout,"sensitivity4=%d\n",PlayerCfg.MouseSens[4]);
|
||||||
|
PHYSFSX_printf(fout,"sensitivity5=%d\n",PlayerCfg.MouseSens[5]);
|
||||||
PHYSFSX_printf(fout,"fsdead=%d\n",PlayerCfg.MouseFSDead);
|
PHYSFSX_printf(fout,"fsdead=%d\n",PlayerCfg.MouseFSDead);
|
||||||
PHYSFSX_printf(fout,"fsindi=%d\n",PlayerCfg.MouseFSIndicator);
|
PHYSFSX_printf(fout,"fsindi=%d\n",PlayerCfg.MouseFSIndicator);
|
||||||
PHYSFSX_printf(fout,"[end]\n");
|
PHYSFSX_printf(fout,"[end]\n");
|
||||||
|
|
|
@ -59,10 +59,10 @@ typedef struct player_config
|
||||||
int AutoLeveling;
|
int AutoLeveling;
|
||||||
short NHighestLevels;
|
short NHighestLevels;
|
||||||
hli HighestLevels[MAX_MISSIONS];
|
hli HighestLevels[MAX_MISSIONS];
|
||||||
int JoystickSens[5];
|
int JoystickSens[6];
|
||||||
int JoystickDead[5];
|
int JoystickDead[6];
|
||||||
ubyte MouseFlightSim;
|
ubyte MouseFlightSim;
|
||||||
int MouseSens[5];
|
int MouseSens[6];
|
||||||
int MouseFSDead;
|
int MouseFSDead;
|
||||||
int MouseFSIndicator;
|
int MouseFSIndicator;
|
||||||
int CockpitMode[2]; // 0 saves the "real" cockpit, 1 also saves letterbox and rear. Used to properly switch between modes and restore the real one.
|
int CockpitMode[2]; // 0 saves the "real" cockpit, 1 also saves letterbox and rear. Used to properly switch between modes and restore the real one.
|
||||||
|
|
Loading…
Reference in a new issue