X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=ball%2Fst_shared.c;h=44695c1109c0d074e61ab7085ea6c91ba52822fa;hb=76d05f44396a09df4f90e3d22bffe75c9665619c;hp=a2844faf56f577e4e92e28ee2545bc446fa2e790;hpb=e577d408191d1b90d9a8a7766d644e3c1934b1d2;p=neverball diff --git a/ball/st_shared.c b/ball/st_shared.c index a2844fa..44695c1 100644 --- a/ball/st_shared.c +++ b/ball/st_shared.c @@ -26,24 +26,26 @@ void shared_leave(int id) gui_delete(id); } -void shared_paint(int id, float st) +void shared_paint(int id, float t) { - game_draw(0, st); + game_draw(0, t); gui_paint(id); } void shared_timer(int id, float dt) { gui_timer(id, dt); - audio_timer(dt); } int shared_point_basic(int id, int x, int y) -/* Pulse, activate and return the active id (if changed)*/ { + /* Pulse, activate and return the active id (if changed) */ + int jd = gui_point(id, x, y); + if (jd) gui_pulse(jd, 1.2f); + return jd; } @@ -53,15 +55,18 @@ void shared_point(int id, int x, int y, int dx, int dy) } int shared_stick_basic(int id, int a, int v) -/* Pulse, activate and return the active id (if changed)*/ { + /* Pulse, activate and return the active id (if changed) */ + int jd = 0; - if (config_tst_d(CONFIG_JOYSTICK_AXIS_X, a)) + + if (config_tst_d(CONFIG_JOYSTICK_AXIS_X, a)) jd = gui_stick(id, v, 0); else if (config_tst_d(CONFIG_JOYSTICK_AXIS_Y, a)) jd = gui_stick(id, 0, v); if (jd) gui_pulse(jd, 1.2f); + return jd; } @@ -70,11 +75,16 @@ void shared_stick(int id, int a, int v) shared_stick_basic(id, a, v); } +void shared_angle(int id, int x, int z) +{ + game_set_ang(x, z); +} + int shared_click(int b, int d) { if (b < 0 && d == 1) return st_buttn(config_get_d(CONFIG_JOYSTICK_BUTTON_A), 1); - else + else return 1; }