View Single Post
  #6   Spotlight this post!  
Unread 23-04-2008, 21:54
programMORT11
 
Posts: n/a
Re: Joystick Input Mapping

Why not use a proportional increment like

Code:
static char flag;
if(joy_flag == 0) {
old_joy = p1_y; flag =1;
} else {
if(old_joy < p1_y && (p1_y != 127))
new_joy+=5;
else if (old_joy < p1_y && (p1_y != 127))
new_joy -= 5;
else
new_joy = 0;
flag = 0;
} p1_y = old_joy + new_joy;

Last edited by programMORT11 : 23-04-2008 at 22:06.