Debian Codegraph @

src/joystick.h

raw symbols SCIP
1 /*
2 * OpenTyrian: A modern cross-platform port of Tyrian
3 * Copyright (C) 2007-2009 The OpenTyrian Development Team
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19 #ifndef JOYSTICK_H
20 #define JOYSTICK_Hcxx . . $ `src/joystick.h:20:9`!
21
22 #include "opentyr.h"cxx . . $ `<file>/src/opentyr.h`/
23 #include "config_file.h"cxx . . $ `<file>/src/config_file.h`/
24
25 #include "SDL.h"
26
27 typedef enumcxx . . $ $anonymous_type_abd17893024d7112_0#
28 {
29 NONEcxx . . $ NONE.,
30 AXIScxx . . $ AXIS.,
31 BUTTONcxx . . $ BUTTON.,
32 HATcxx . . $ HAT.
33 }
34 Joystick_assignment_typescxx . . $ Joystick_assignment_types#;
35
36 typedef structcxx . . $ $anonymous_type_abd17893024d7112_1#
37 {
38 Joystick_assignment_typescxx . . $ Joystick_assignment_types# typecxx . . $ $anonymous_type_abd17893024d7112_1#type.;
39 int numcxx . . $ $anonymous_type_abd17893024d7112_1#num.;
40
41 // if hat
42 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! x_axiscxx . . $ $anonymous_type_abd17893024d7112_1#x_axis.; // else y_axis
43
44 // if hat or axis
45 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! negative_axiscxx . . $ $anonymous_type_abd17893024d7112_1#negative_axis.; // else positive
46 }
47 Joystick_assignmentcxx . . $ Joystick_assignment#;
48
49 typedef structcxx . . $ $anonymous_type_abd17893024d7112_2#
50 {
51 SDL_Joystickcxx . . $ SDL_Joystick# *handlecxx . . $ $anonymous_type_abd17893024d7112_2#handle.;
52
53 Joystick_assignmentcxx . . $ Joystick_assignment# assignmentcxx . . $ $anonymous_type_abd17893024d7112_2#assignment.[10][2]; // 0-3: directions, 4-9: actions
54
55 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! analogcxx . . $ $anonymous_type_abd17893024d7112_2#analog.;
56 int sensitivitycxx . . $ $anonymous_type_abd17893024d7112_2#sensitivity., thresholdcxx . . $ $anonymous_type_abd17893024d7112_2#threshold.;
57
58 signed int xcxx . . $ $anonymous_type_abd17893024d7112_2#x., ycxx . . $ $anonymous_type_abd17893024d7112_2#y.;
59 int analog_directioncxx . . $ $anonymous_type_abd17893024d7112_2#analog_direction.[4];
60 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! directioncxx . . $ $anonymous_type_abd17893024d7112_2#direction.[4], direction_pressedcxx . . $ $anonymous_type_abd17893024d7112_2#direction_pressed.[4]; // up, right, down, left (_pressed, for emulating key presses)
61
62 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! confirmcxx . . $ $anonymous_type_abd17893024d7112_2#confirm., cancelcxx . . $ $anonymous_type_abd17893024d7112_2#cancel.;
63 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! actioncxx . . $ $anonymous_type_abd17893024d7112_2#action.[6], action_pressedcxx . . $ $anonymous_type_abd17893024d7112_2#action_pressed.[6]; // fire, mode swap, left fire, right fire, menu, pause
64
65 Uint32cxx . . $ Uint32# joystick_delaycxx . . $ $anonymous_type_abd17893024d7112_2#joystick_delay.;
66 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! input_pressedcxx . . $ $anonymous_type_abd17893024d7112_2#input_pressed.;
67 }
68 Joystickcxx . . $ Joystick#;
69
70 extern int joystick_repeat_delaycxx . . $ joystick_repeat_delay.;
71 extern boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! joydowncxx . . $ joydown.;
72 extern boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! ignore_joystickcxx . . $ ignore_joystick.;
73 extern int joystickscxx . . $ joysticks.;
74 extern Joystickcxx . . $ Joystick# *joystickcxx . . $ joystick.;
75
76 int joystick_axis_reducecxx . . $ joystick_axis_reduce(9b79fb6aee4c0440).(int j, int value);
77 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! joystick_analog_anglecxx . . $ joystick_analog_angle(e7043f53b8864a02).(int j, float *angle);
78
79 void poll_joystickcxx . . $ poll_joystick(d4f767463ce0a6b3).(int j);
80 void poll_joystickscxx . . $ poll_joysticks(49f6e7a06ebc5aa8).(void);
81
82 void push_keycxx . . $ push_key(decbd40bd4dd73ad).(SDL_Scancodecxx . . $ SDL_Scancode# key);
83 void push_joysticks_as_keyboardcxx . . $ push_joysticks_as_keyboard(49f6e7a06ebc5aa8).(void);
84
85 void init_joystickscxx . . $ init_joysticks(49f6e7a06ebc5aa8).(void);
86 void deinit_joystickscxx . . $ deinit_joysticks(49f6e7a06ebc5aa8).(void);
87
88 void reset_joystick_assignmentscxx . . $ reset_joystick_assignments(d4f767463ce0a6b3).(int j);
89 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! load_joystick_assignmentscxx . . $ load_joystick_assignments(930ab16aa94885a3).(Configcxx . . $ Config#* config, int j);
90 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! save_joystick_assignmentscxx . . $ save_joystick_assignments(930ab16aa94885a3).(Configcxx . . $ Config#* config, int j);
91
92 void joystick_assignments_to_stringcxx . . $ joystick_assignments_to_string(20ca3e504103fe2).(char *buffer, size_t buffer_len, const Joystick_assignmentcxx . . $ Joystick_assignment# *assignments);
93
94 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! detect_joystick_assignmentcxx . . $ detect_joystick_assignment(8994ef2eb854becc).(int j, Joystick_assignmentcxx . . $ Joystick_assignment# *assignment);
95 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! joystick_assignment_cmpcxx . . $ joystick_assignment_cmp(168eefc3be700665).(const Joystick_assignmentcxx . . $ Joystick_assignment# *, const Joystick_assignmentcxx . . $ Joystick_assignment# *);
96
97 #endif /* JOYSTICK_H */