Removed PH_SCALE on Keyboard readings as caps movement not in sync to FrameTime; Removed scaled Joystick reading as it's not necessary anymore
This commit is contained in:
parent
4ee0b415ad
commit
e6b7867b27
|
@ -1,5 +1,9 @@
|
|||
D1X-Rebirth Changelog
|
||||
|
||||
20090209
|
||||
--------
|
||||
main/kconfig.c: Removed PH_SCALE on Keyboard readings as caps movement not in sync to FrameTime; Removed scaled Joystick reading as it's not necessary anymore
|
||||
|
||||
20090208
|
||||
--------
|
||||
main/multi.c: Fixed connect-state mess in order of kmatrix flow
|
||||
|
|
|
@ -1293,13 +1293,6 @@ void kconfig(int n, char * title)
|
|||
PlayerCfg.KeySettingsD1X[i] = kc_d1x[i].value;
|
||||
}
|
||||
|
||||
#define PH_SCALE 8
|
||||
#ifdef __LINUX__
|
||||
#define JOYSTICK_READ_TIME (F1_0/20) // Read joystick at 20 Hz.
|
||||
#else
|
||||
#define JOYSTICK_READ_TIME (F1_0/10) // Read joystick at 10 Hz.
|
||||
#endif
|
||||
fix LastReadTime = 0;
|
||||
fix joy_axis[JOY_MAX_AXES];
|
||||
|
||||
int d1x_joystick_ostate[20]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
||||
|
@ -1312,7 +1305,6 @@ void controls_read_all()
|
|||
int i;
|
||||
int slide_on, bank_on;
|
||||
static int dx, dy, dz;
|
||||
fix ctime;
|
||||
fix mouse_axis[3] = {0,0,0};
|
||||
int raw_joy_axis[JOY_MAX_AXES];
|
||||
int mouse_buttons;
|
||||
|
@ -1335,15 +1327,8 @@ void controls_read_all()
|
|||
slide_on = 0;
|
||||
bank_on = 0;
|
||||
|
||||
ctime = timer_get_fixed_seconds();
|
||||
|
||||
//--------- Read Joystick -----------
|
||||
if ( (LastReadTime + JOYSTICK_READ_TIME > ctime) ) {
|
||||
if ((ctime < 0) && (LastReadTime >= 0))
|
||||
LastReadTime = ctime;
|
||||
use_joystick=1;
|
||||
} else if ( CONTROL_USING_JOYSTICK ) {
|
||||
LastReadTime = ctime;
|
||||
if ( CONTROL_USING_JOYSTICK ) {
|
||||
channel_masks = joystick_read_raw_axis( JOY_ALL_AXIS, raw_joy_axis );
|
||||
|
||||
for (i=0; i<joy_num_axes; i++ ) {
|
||||
|
@ -1486,10 +1471,10 @@ void controls_read_all()
|
|||
k3 = speed_factor*key_down_time( kc_keyboard[3].value )/2;
|
||||
|
||||
// From keyboard...
|
||||
if ( kc_keyboard[0].value < 255 ) kp += k0/PH_SCALE;
|
||||
if ( kc_keyboard[1].value < 255 ) kp += k1/PH_SCALE;
|
||||
if ( kc_keyboard[2].value < 255 ) kp -= k2/PH_SCALE;
|
||||
if ( kc_keyboard[3].value < 255 ) kp -= k3/PH_SCALE;
|
||||
if ( kc_keyboard[0].value < 255 ) kp += k0;
|
||||
if ( kc_keyboard[1].value < 255 ) kp += k1;
|
||||
if ( kc_keyboard[2].value < 255 ) kp -= k2;
|
||||
if ( kc_keyboard[3].value < 255 ) kp -= k3;
|
||||
|
||||
if (kp == 0)
|
||||
Controls.pitch_time = 0;
|
||||
|
@ -1531,7 +1516,7 @@ void controls_read_all()
|
|||
k1 = speed_factor*key_down_time( kc_keyboard[1].value );
|
||||
k2 = speed_factor*key_down_time( kc_keyboard[2].value );
|
||||
k3 = speed_factor*key_down_time( kc_keyboard[3].value );
|
||||
|
||||
|
||||
// From keyboard...
|
||||
if ( kc_keyboard[0].value < 255 ) Controls.vertical_thrust_time += k0;
|
||||
if ( kc_keyboard[1].value < 255 ) Controls.vertical_thrust_time += k1;
|
||||
|
@ -1560,7 +1545,7 @@ void controls_read_all()
|
|||
if ( kc_keyboard[15].value < 255 ) Controls.vertical_thrust_time += speed_factor*key_down_time( kc_keyboard[15].value );
|
||||
if ( kc_keyboard[16].value < 255 ) Controls.vertical_thrust_time -= speed_factor*key_down_time( kc_keyboard[16].value );
|
||||
if ( kc_keyboard[17].value < 255 ) Controls.vertical_thrust_time -= speed_factor*key_down_time( kc_keyboard[17].value );
|
||||
|
||||
|
||||
// From joystick...
|
||||
if ((use_joystick)&&( kc_joystick[19].value < 255 )) {
|
||||
if ( !kc_joystick[20].value ) // If not inverted...
|
||||
|
@ -1622,10 +1607,10 @@ void controls_read_all()
|
|||
k7 = speed_factor*key_down_time( kc_keyboard[7].value );
|
||||
|
||||
// From keyboard...
|
||||
if ( kc_keyboard[4].value < 255 ) kh -= k4/PH_SCALE;
|
||||
if ( kc_keyboard[5].value < 255 ) kh -= k5/PH_SCALE;
|
||||
if ( kc_keyboard[6].value < 255 ) kh += k6/PH_SCALE;
|
||||
if ( kc_keyboard[7].value < 255 ) kh += k7/PH_SCALE;
|
||||
if ( kc_keyboard[4].value < 255 ) kh -= k4;
|
||||
if ( kc_keyboard[5].value < 255 ) kh -= k5;
|
||||
if ( kc_keyboard[6].value < 255 ) kh += k6;
|
||||
if ( kc_keyboard[7].value < 255 ) kh += k7;
|
||||
|
||||
if (kh == 0)
|
||||
Controls.heading_time = 0;
|
||||
|
|
Loading…
Reference in a new issue