static void stroke_timer(int id, float dt) { float g[3] = { 0.f, 0.f, 0.f }; //senquack - allowed more flexible aim-speed control #ifdef GCWZERO float rot_dir = stroke_rotate; float rot_speed = 0.0f; if (l_pressed && r_pressed) { rot_dir = 0.0f; // k = 0.0f; } else if (l_pressed) { rot_dir = -1.0f; rot_speed = 24.0f; } else if (r_pressed) { rot_dir = 1.0f; rot_speed = 24.0f; } else { if (fast_aim) { rot_speed = 24.0f; } else { rot_speed = 2.0f; } } game_set_rot(rot_dir * rot_speed); if (fast_aim) { game_set_mag(stroke_mag * 24.0f); } else { game_set_mag(stroke_mag * 6.0f); } #else float k; if (SDL_GetModState() & KMOD_SHIFT || (joystick && SDL_JoystickGetButton(joystick, config_get_d(CONFIG_JOYSTICK_BUTTON_X)))) { k = 0.25f; } else { k = 1.0f; } game_set_rot(stroke_rotate * k); game_set_mag(stroke_mag * k); #endif //GCWZERO game_update_view(dt); game_step(g, dt); }
static void stroke_point(int id, int x, int y, int dx, int dy) { #ifdef __MOBILE__ if (x<100*config_get_d(CONFIG_WIDTH)/1024 && y<400*config_get_d(CONFIG_HEIGHT)/600 && y>200*config_get_d(CONFIG_HEIGHT)/600) { stroke = 1; return; } if (skip_point) return; game_set_rot(-dx); game_set_mag(dy); #else game_set_rot(dx); game_set_mag(dy); #endif }
static void stroke_timer(int id, float dt) { float g[3] = { 0.f, 0.f, 0.f }; float k; if (SDL_GetModState() & KMOD_SHIFT || (joystick && SDL_JoystickGetButton(joystick, config_get_d(CONFIG_JOYSTICK_BUTTON_B)))) k = 0.25; else k = 1.0; game_set_rot(stroke_rotate * k); game_set_mag(stroke_mag * k); game_update_view(dt); game_step(g, dt); }
static void stroke_point(int id, int x, int y, int dx, int dy) { game_set_rot(dx); game_set_mag(dy); }