2 * Copyright (C) 2003 Robert Kooima - 2006 Jean Privat
3 * Part of the Neverball Project http://icculus.org/neverball/
5 * NEVERBALL is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 2 of the License,
8 * or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
22 #include "st_shared.h"
24 void shared_leave(int id)
29 void shared_paint(int id, float st)
35 void shared_timer(int id, float dt)
40 /* Pulse, activate and return the active id (if changed)*/
42 int shared_point_basic(int id, int x, int y)
44 int jd = gui_point(id, x, y);
50 void shared_point(int id, int x, int y, int dx, int dy)
52 shared_point_basic(id, x, y);
55 int shared_stick_basic(int id, int a, int v)
56 /* Pulse, activate and return the active id (if changed)*/
59 if (config_tst_d(CONFIG_JOYSTICK_AXIS_X, a))
60 jd = gui_stick(id, v, 0);
61 else if (config_tst_d(CONFIG_JOYSTICK_AXIS_Y, a))
62 jd = gui_stick(id, 0, v);
68 void shared_stick(int id, int a, int v)
70 shared_stick_basic(id, a, v);
73 int shared_click(int b, int d)
76 return st_buttn(config_get_d(CONFIG_JOYSTICK_BUTTON_A), 1);