gosu 1.0.0 → 1.1.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,338 +0,0 @@
1
- #include <Gosu/Version.hpp>
2
- #include <Gosu/Buttons.hpp>
3
- #include <Gosu/GraphicsBase.hpp>
4
-
5
- #ifdef __cplusplus
6
- extern "C" {
7
- #endif
8
-
9
- const char *Gosu_version()
10
- {
11
- return Gosu::VERSION.c_str();
12
- }
13
-
14
- const char *Gosu_licenses()
15
- {
16
- return Gosu::LICENSES.c_str();
17
- }
18
-
19
- unsigned Gosu_MAJOR_VERSION = GOSU_MAJOR_VERSION;
20
- unsigned Gosu_MINOR_VERSION = GOSU_MINOR_VERSION;
21
- unsigned Gosu_POINT_VERSION = GOSU_POINT_VERSION;
22
-
23
- // Alpha/Blend Modes
24
- unsigned Gosu_AM_DEFAULT = Gosu::AM_DEFAULT;
25
- unsigned Gosu_AM_INTERPOLATE = Gosu::AM_INTERPOLATE;
26
- unsigned Gosu_AM_ADD = Gosu::AM_ADD;
27
- unsigned Gosu_AM_MULTIPLY = Gosu::AM_MULTIPLY;
28
-
29
- // Font Flags
30
- unsigned Gosu_FF_BOLD = Gosu::FF_BOLD;
31
- unsigned Gosu_FF_ITALIC = Gosu::FF_ITALIC;
32
- unsigned Gosu_FF_UNDERLINE = Gosu::FF_UNDERLINE;
33
- unsigned Gosu_FF_COMBINATIONS = Gosu::FF_COMBINATIONS;
34
-
35
- // Alignment
36
- unsigned Gosu_AL_LEFT = Gosu::AL_LEFT;
37
- unsigned Gosu_AL_RIGHT = Gosu::AL_RIGHT;
38
- unsigned Gosu_AL_CENTER = Gosu::AL_CENTER;
39
- unsigned Gosu_AL_JUSTIFY = Gosu::AL_JUSTIFY;
40
-
41
- // Image Flags
42
- unsigned Gosu_IF_SMOOTH = Gosu::IF_SMOOTH;
43
- unsigned Gosu_IF_TILEABLE_LEFT = Gosu::IF_TILEABLE_LEFT;
44
- unsigned Gosu_IF_TILEABLE_TOP = Gosu::IF_TILEABLE_TOP;
45
- unsigned Gosu_IF_TILEABLE_RIGHT = Gosu::IF_TILEABLE_RIGHT;
46
- unsigned Gosu_IF_TILEABLE_BOTTOM = Gosu::IF_TILEABLE_BOTTOM;
47
- unsigned Gosu_IF_TILEABLE = Gosu::IF_TILEABLE;
48
- unsigned Gosu_IF_RETRO = Gosu::IF_RETRO;
49
-
50
- unsigned Gosu_KB_ESCAPE = Gosu::KB_ESCAPE;
51
- unsigned Gosu_KB_F1 = Gosu::KB_F1;
52
- unsigned Gosu_KB_F2 = Gosu::KB_F2;
53
- unsigned Gosu_KB_F3 = Gosu::KB_F3;
54
- unsigned Gosu_KB_F4 = Gosu::KB_F4;
55
- unsigned Gosu_KB_F5 = Gosu::KB_F5;
56
- unsigned Gosu_KB_F6 = Gosu::KB_F6;
57
- unsigned Gosu_KB_F7 = Gosu::KB_F7;
58
- unsigned Gosu_KB_F8 = Gosu::KB_F8;
59
- unsigned Gosu_KB_F9 = Gosu::KB_F9;
60
- unsigned Gosu_KB_F10 = Gosu::KB_F10;
61
- unsigned Gosu_KB_F11 = Gosu::KB_F11;
62
- unsigned Gosu_KB_F12 = Gosu::KB_F12;
63
- unsigned Gosu_KB_0 = Gosu::KB_0;
64
- unsigned Gosu_KB_1 = Gosu::KB_1;
65
- unsigned Gosu_KB_2 = Gosu::KB_2;
66
- unsigned Gosu_KB_3 = Gosu::KB_3;
67
- unsigned Gosu_KB_4 = Gosu::KB_4;
68
- unsigned Gosu_KB_5 = Gosu::KB_5;
69
- unsigned Gosu_KB_6 = Gosu::KB_6;
70
- unsigned Gosu_KB_7 = Gosu::KB_7;
71
- unsigned Gosu_KB_8 = Gosu::KB_8;
72
- unsigned Gosu_KB_9 = Gosu::KB_9;
73
- unsigned Gosu_KB_TAB = Gosu::KB_TAB;
74
- unsigned Gosu_KB_RETURN = Gosu::KB_RETURN;
75
- unsigned Gosu_KB_SPACE = Gosu::KB_SPACE;
76
- unsigned Gosu_KB_LEFT_SHIFT = Gosu::KB_LEFT_SHIFT;
77
- unsigned Gosu_KB_RIGHT_SHIFT = Gosu::KB_RIGHT_SHIFT;
78
- unsigned Gosu_KB_LEFT_CONTROL = Gosu::KB_LEFT_CONTROL;
79
- unsigned Gosu_KB_RIGHT_CONTROL = Gosu::KB_RIGHT_CONTROL;
80
- unsigned Gosu_KB_LEFT_ALT = Gosu::KB_LEFT_ALT;
81
- unsigned Gosu_KB_RIGHT_ALT = Gosu::KB_RIGHT_ALT;
82
- unsigned Gosu_KB_LEFT_META = Gosu::KB_LEFT_META;
83
- unsigned Gosu_KB_RIGHT_META = Gosu::KB_RIGHT_META;
84
- unsigned Gosu_KB_BACKSPACE = Gosu::KB_BACKSPACE;
85
- unsigned Gosu_KB_LEFT = Gosu::KB_LEFT;
86
- unsigned Gosu_KB_RIGHT = Gosu::KB_RIGHT;
87
- unsigned Gosu_KB_UP = Gosu::KB_UP;
88
- unsigned Gosu_KB_DOWN = Gosu::KB_DOWN;
89
- unsigned Gosu_KB_HOME = Gosu::KB_HOME;
90
- unsigned Gosu_KB_END = Gosu::KB_END;
91
- unsigned Gosu_KB_PRINT_SCREEN = Gosu::KB_PRINT_SCREEN;
92
- unsigned Gosu_KB_SCROLL_LOCK = Gosu::KB_SCROLL_LOCK;
93
- unsigned Gosu_KB_PAUSE = Gosu::KB_PAUSE;
94
- unsigned Gosu_KB_INSERT = Gosu::KB_INSERT;
95
- unsigned Gosu_KB_DELETE = Gosu::KB_DELETE;
96
- unsigned Gosu_KB_PAGE_UP = Gosu::KB_PAGE_UP;
97
- unsigned Gosu_KB_PAGE_DOWN = Gosu::KB_PAGE_DOWN;
98
- unsigned Gosu_KB_ENTER = Gosu::KB_ENTER;
99
- unsigned Gosu_KB_BACKTICK = Gosu::KB_BACKTICK;
100
- unsigned Gosu_KB_MINUS = Gosu::KB_MINUS;
101
- unsigned Gosu_KB_EQUALS = Gosu::KB_EQUALS;
102
- unsigned Gosu_KB_LEFT_BRACKET = Gosu::KB_LEFT_BRACKET;
103
- unsigned Gosu_KB_RIGHT_BRACKET = Gosu::KB_RIGHT_BRACKET;
104
- unsigned Gosu_KB_BACKSLASH = Gosu::KB_BACKSLASH;
105
- unsigned Gosu_KB_SEMICOLON = Gosu::KB_SEMICOLON;
106
- unsigned Gosu_KB_APOSTROPHE = Gosu::KB_APOSTROPHE;
107
- unsigned Gosu_KB_COMMA = Gosu::KB_COMMA;
108
- unsigned Gosu_KB_PERIOD = Gosu::KB_PERIOD;
109
- unsigned Gosu_KB_SLASH = Gosu::KB_SLASH;
110
- unsigned Gosu_KB_CAPS_LOCK = Gosu::KB_CAPS_LOCK;
111
- unsigned Gosu_KB_A = Gosu::KB_A;
112
- unsigned Gosu_KB_B = Gosu::KB_B;
113
- unsigned Gosu_KB_C = Gosu::KB_C;
114
- unsigned Gosu_KB_D = Gosu::KB_D;
115
- unsigned Gosu_KB_E = Gosu::KB_E;
116
- unsigned Gosu_KB_F = Gosu::KB_F;
117
- unsigned Gosu_KB_G = Gosu::KB_G;
118
- unsigned Gosu_KB_H = Gosu::KB_H;
119
- unsigned Gosu_KB_I = Gosu::KB_I;
120
- unsigned Gosu_KB_J = Gosu::KB_J;
121
- unsigned Gosu_KB_K = Gosu::KB_K;
122
- unsigned Gosu_KB_L = Gosu::KB_L;
123
- unsigned Gosu_KB_M = Gosu::KB_M;
124
- unsigned Gosu_KB_N = Gosu::KB_N;
125
- unsigned Gosu_KB_O = Gosu::KB_O;
126
- unsigned Gosu_KB_P = Gosu::KB_P;
127
- unsigned Gosu_KB_Q = Gosu::KB_Q;
128
- unsigned Gosu_KB_R = Gosu::KB_R;
129
- unsigned Gosu_KB_S = Gosu::KB_S;
130
- unsigned Gosu_KB_T = Gosu::KB_T;
131
- unsigned Gosu_KB_U = Gosu::KB_U;
132
- unsigned Gosu_KB_V = Gosu::KB_V;
133
- unsigned Gosu_KB_W = Gosu::KB_W;
134
- unsigned Gosu_KB_X = Gosu::KB_X;
135
- unsigned Gosu_KB_Y = Gosu::KB_Y;
136
- unsigned Gosu_KB_Z = Gosu::KB_Z;
137
- unsigned Gosu_KB_ISO = Gosu::KB_ISO;
138
- unsigned Gosu_KB_NUMPAD_0 = Gosu::KB_NUMPAD_0;
139
- unsigned Gosu_KB_NUMPAD_1 = Gosu::KB_NUMPAD_1;
140
- unsigned Gosu_KB_NUMPAD_2 = Gosu::KB_NUMPAD_2;
141
- unsigned Gosu_KB_NUMPAD_3 = Gosu::KB_NUMPAD_3;
142
- unsigned Gosu_KB_NUMPAD_4 = Gosu::KB_NUMPAD_4;
143
- unsigned Gosu_KB_NUMPAD_5 = Gosu::KB_NUMPAD_5;
144
- unsigned Gosu_KB_NUMPAD_6 = Gosu::KB_NUMPAD_6;
145
- unsigned Gosu_KB_NUMPAD_7 = Gosu::KB_NUMPAD_7;
146
- unsigned Gosu_KB_NUMPAD_8 = Gosu::KB_NUMPAD_8;
147
- unsigned Gosu_KB_NUMPAD_9 = Gosu::KB_NUMPAD_9;
148
- unsigned Gosu_KB_NUMPAD_DELETE = Gosu::KB_NUMPAD_DELETE;
149
- unsigned Gosu_KB_NUMPAD_PLUS = Gosu::KB_NUMPAD_PLUS;
150
- unsigned Gosu_KB_NUMPAD_MINUS = Gosu::KB_NUMPAD_MINUS;
151
- unsigned Gosu_KB_NUMPAD_MULTIPLY = Gosu::KB_NUMPAD_MULTIPLY;
152
- unsigned Gosu_KB_NUMPAD_DIVIDE = Gosu::KB_NUMPAD_DIVIDE;
153
-
154
- unsigned Gosu_MS_LEFT = Gosu::MS_LEFT;
155
- unsigned Gosu_MS_MIDDLE = Gosu::MS_MIDDLE;
156
- unsigned Gosu_MS_RIGHT = Gosu::MS_RIGHT;
157
- unsigned Gosu_MS_WHEEL_UP = Gosu::MS_WHEEL_UP;
158
- unsigned Gosu_MS_WHEEL_DOWN = Gosu::MS_WHEEL_DOWN;
159
- unsigned Gosu_MS_OTHER_0 = Gosu::MS_OTHER_0;
160
- unsigned Gosu_MS_OTHER_1 = Gosu::MS_OTHER_1;
161
- unsigned Gosu_MS_OTHER_2 = Gosu::MS_OTHER_2;
162
- unsigned Gosu_MS_OTHER_3 = Gosu::MS_OTHER_3;
163
- unsigned Gosu_MS_OTHER_4 = Gosu::MS_OTHER_4;
164
- unsigned Gosu_MS_OTHER_5 = Gosu::MS_OTHER_5;
165
- unsigned Gosu_MS_OTHER_6 = Gosu::MS_OTHER_6;
166
- unsigned Gosu_MS_OTHER_7 = Gosu::MS_OTHER_7;
167
-
168
- unsigned Gosu_GP_DPAD_LEFT = Gosu::GP_DPAD_LEFT;
169
- unsigned Gosu_GP_DPAD_RIGHT = Gosu::GP_DPAD_RIGHT;
170
- unsigned Gosu_GP_DPAD_UP = Gosu::GP_DPAD_UP;
171
- unsigned Gosu_GP_DPAD_DOWN = Gosu::GP_DPAD_DOWN;
172
- unsigned Gosu_GP_BUTTON_0 = Gosu::GP_BUTTON_0;
173
- unsigned Gosu_GP_BUTTON_1 = Gosu::GP_BUTTON_1;
174
- unsigned Gosu_GP_BUTTON_2 = Gosu::GP_BUTTON_2;
175
- unsigned Gosu_GP_BUTTON_3 = Gosu::GP_BUTTON_3;
176
- unsigned Gosu_GP_BUTTON_4 = Gosu::GP_BUTTON_4;
177
- unsigned Gosu_GP_BUTTON_5 = Gosu::GP_BUTTON_5;
178
- unsigned Gosu_GP_BUTTON_6 = Gosu::GP_BUTTON_6;
179
- unsigned Gosu_GP_BUTTON_7 = Gosu::GP_BUTTON_7;
180
- unsigned Gosu_GP_BUTTON_8 = Gosu::GP_BUTTON_8;
181
- unsigned Gosu_GP_BUTTON_9 = Gosu::GP_BUTTON_9;
182
- unsigned Gosu_GP_BUTTON_10 = Gosu::GP_BUTTON_10;
183
- unsigned Gosu_GP_BUTTON_11 = Gosu::GP_BUTTON_11;
184
- unsigned Gosu_GP_BUTTON_12 = Gosu::GP_BUTTON_12;
185
- unsigned Gosu_GP_BUTTON_13 = Gosu::GP_BUTTON_13;
186
- unsigned Gosu_GP_BUTTON_14 = Gosu::GP_BUTTON_14;
187
- unsigned Gosu_GP_BUTTON_15 = Gosu::GP_BUTTON_15;
188
-
189
- unsigned Gosu_GP_0_DPAD_LEFT = Gosu::GP_0_DPAD_LEFT;
190
- unsigned Gosu_GP_0_DPAD_RIGHT = Gosu::GP_0_DPAD_RIGHT;
191
- unsigned Gosu_GP_0_DPAD_UP = Gosu::GP_0_DPAD_UP;
192
- unsigned Gosu_GP_0_DPAD_DOWN = Gosu::GP_0_DPAD_DOWN;
193
- unsigned Gosu_GP_0_BUTTON_0 = Gosu::GP_0_BUTTON_0;
194
- unsigned Gosu_GP_0_BUTTON_1 = Gosu::GP_0_BUTTON_1;
195
- unsigned Gosu_GP_0_BUTTON_2 = Gosu::GP_0_BUTTON_2;
196
- unsigned Gosu_GP_0_BUTTON_3 = Gosu::GP_0_BUTTON_3;
197
- unsigned Gosu_GP_0_BUTTON_4 = Gosu::GP_0_BUTTON_4;
198
- unsigned Gosu_GP_0_BUTTON_5 = Gosu::GP_0_BUTTON_5;
199
- unsigned Gosu_GP_0_BUTTON_6 = Gosu::GP_0_BUTTON_6;
200
- unsigned Gosu_GP_0_BUTTON_7 = Gosu::GP_0_BUTTON_7;
201
- unsigned Gosu_GP_0_BUTTON_8 = Gosu::GP_0_BUTTON_8;
202
- unsigned Gosu_GP_0_BUTTON_9 = Gosu::GP_0_BUTTON_9;
203
- unsigned Gosu_GP_0_BUTTON_10 = Gosu::GP_0_BUTTON_10;
204
- unsigned Gosu_GP_0_BUTTON_11 = Gosu::GP_0_BUTTON_11;
205
- unsigned Gosu_GP_0_BUTTON_12 = Gosu::GP_0_BUTTON_12;
206
- unsigned Gosu_GP_0_BUTTON_13 = Gosu::GP_0_BUTTON_13;
207
- unsigned Gosu_GP_0_BUTTON_14 = Gosu::GP_0_BUTTON_14;
208
- unsigned Gosu_GP_0_BUTTON_15 = Gosu::GP_0_BUTTON_15;
209
-
210
- unsigned Gosu_GP_1_DPAD_LEFT = Gosu::GP_1_DPAD_LEFT;
211
- unsigned Gosu_GP_1_DPAD_RIGHT = Gosu::GP_1_DPAD_RIGHT;
212
- unsigned Gosu_GP_1_DPAD_UP = Gosu::GP_1_DPAD_UP;
213
- unsigned Gosu_GP_1_DPAD_DOWN = Gosu::GP_1_DPAD_DOWN;
214
- unsigned Gosu_GP_1_BUTTON_0 = Gosu::GP_1_BUTTON_0;
215
- unsigned Gosu_GP_1_BUTTON_1 = Gosu::GP_1_BUTTON_1;
216
- unsigned Gosu_GP_1_BUTTON_2 = Gosu::GP_1_BUTTON_2;
217
- unsigned Gosu_GP_1_BUTTON_3 = Gosu::GP_1_BUTTON_3;
218
- unsigned Gosu_GP_1_BUTTON_4 = Gosu::GP_1_BUTTON_4;
219
- unsigned Gosu_GP_1_BUTTON_5 = Gosu::GP_1_BUTTON_5;
220
- unsigned Gosu_GP_1_BUTTON_6 = Gosu::GP_1_BUTTON_6;
221
- unsigned Gosu_GP_1_BUTTON_7 = Gosu::GP_1_BUTTON_7;
222
- unsigned Gosu_GP_1_BUTTON_8 = Gosu::GP_1_BUTTON_8;
223
- unsigned Gosu_GP_1_BUTTON_9 = Gosu::GP_1_BUTTON_9;
224
- unsigned Gosu_GP_1_BUTTON_10 = Gosu::GP_1_BUTTON_10;
225
- unsigned Gosu_GP_1_BUTTON_11 = Gosu::GP_1_BUTTON_11;
226
- unsigned Gosu_GP_1_BUTTON_12 = Gosu::GP_1_BUTTON_12;
227
- unsigned Gosu_GP_1_BUTTON_13 = Gosu::GP_1_BUTTON_13;
228
- unsigned Gosu_GP_1_BUTTON_14 = Gosu::GP_1_BUTTON_14;
229
- unsigned Gosu_GP_1_BUTTON_15 = Gosu::GP_1_BUTTON_15;
230
-
231
- unsigned Gosu_GP_2_DPAD_LEFT = Gosu::GP_2_DPAD_LEFT;
232
- unsigned Gosu_GP_2_DPAD_RIGHT = Gosu::GP_2_DPAD_RIGHT;
233
- unsigned Gosu_GP_2_DPAD_UP = Gosu::GP_2_DPAD_UP;
234
- unsigned Gosu_GP_2_DPAD_DOWN = Gosu::GP_2_DPAD_DOWN;
235
- unsigned Gosu_GP_2_BUTTON_0 = Gosu::GP_2_BUTTON_0;
236
- unsigned Gosu_GP_2_BUTTON_1 = Gosu::GP_2_BUTTON_1;
237
- unsigned Gosu_GP_2_BUTTON_2 = Gosu::GP_2_BUTTON_2;
238
- unsigned Gosu_GP_2_BUTTON_3 = Gosu::GP_2_BUTTON_3;
239
- unsigned Gosu_GP_2_BUTTON_4 = Gosu::GP_2_BUTTON_4;
240
- unsigned Gosu_GP_2_BUTTON_5 = Gosu::GP_2_BUTTON_5;
241
- unsigned Gosu_GP_2_BUTTON_6 = Gosu::GP_2_BUTTON_6;
242
- unsigned Gosu_GP_2_BUTTON_7 = Gosu::GP_2_BUTTON_7;
243
- unsigned Gosu_GP_2_BUTTON_8 = Gosu::GP_2_BUTTON_8;
244
- unsigned Gosu_GP_2_BUTTON_9 = Gosu::GP_2_BUTTON_9;
245
- unsigned Gosu_GP_2_BUTTON_10 = Gosu::GP_2_BUTTON_10;
246
- unsigned Gosu_GP_2_BUTTON_11 = Gosu::GP_2_BUTTON_11;
247
- unsigned Gosu_GP_2_BUTTON_12 = Gosu::GP_2_BUTTON_12;
248
- unsigned Gosu_GP_2_BUTTON_13 = Gosu::GP_2_BUTTON_13;
249
- unsigned Gosu_GP_2_BUTTON_14 = Gosu::GP_2_BUTTON_14;
250
- unsigned Gosu_GP_2_BUTTON_15 = Gosu::GP_2_BUTTON_15;
251
-
252
- unsigned Gosu_GP_3_DPAD_LEFT = Gosu::GP_3_DPAD_LEFT;
253
- unsigned Gosu_GP_3_DPAD_RIGHT = Gosu::GP_3_DPAD_RIGHT;
254
- unsigned Gosu_GP_3_DPAD_UP = Gosu::GP_3_DPAD_UP;
255
- unsigned Gosu_GP_3_DPAD_DOWN = Gosu::GP_3_DPAD_DOWN;
256
- unsigned Gosu_GP_3_BUTTON_0 = Gosu::GP_3_BUTTON_0;
257
- unsigned Gosu_GP_3_BUTTON_1 = Gosu::GP_3_BUTTON_1;
258
- unsigned Gosu_GP_3_BUTTON_2 = Gosu::GP_3_BUTTON_2;
259
- unsigned Gosu_GP_3_BUTTON_3 = Gosu::GP_3_BUTTON_3;
260
- unsigned Gosu_GP_3_BUTTON_4 = Gosu::GP_3_BUTTON_4;
261
- unsigned Gosu_GP_3_BUTTON_5 = Gosu::GP_3_BUTTON_5;
262
- unsigned Gosu_GP_3_BUTTON_6 = Gosu::GP_3_BUTTON_6;
263
- unsigned Gosu_GP_3_BUTTON_7 = Gosu::GP_3_BUTTON_7;
264
- unsigned Gosu_GP_3_BUTTON_8 = Gosu::GP_3_BUTTON_8;
265
- unsigned Gosu_GP_3_BUTTON_9 = Gosu::GP_3_BUTTON_9;
266
- unsigned Gosu_GP_3_BUTTON_10 = Gosu::GP_3_BUTTON_10;
267
- unsigned Gosu_GP_3_BUTTON_11 = Gosu::GP_3_BUTTON_11;
268
- unsigned Gosu_GP_3_BUTTON_12 = Gosu::GP_3_BUTTON_12;
269
- unsigned Gosu_GP_3_BUTTON_13 = Gosu::GP_3_BUTTON_13;
270
- unsigned Gosu_GP_3_BUTTON_14 = Gosu::GP_3_BUTTON_14;
271
- unsigned Gosu_GP_3_BUTTON_15 = Gosu::GP_3_BUTTON_15;
272
-
273
- unsigned Gosu_GP_LEFT = Gosu::GP_LEFT;
274
- unsigned Gosu_GP_RIGHT = Gosu::GP_RIGHT;
275
- unsigned Gosu_GP_UP = Gosu::GP_UP;
276
- unsigned Gosu_GP_DOWN = Gosu::GP_DOWN;
277
-
278
- unsigned Gosu_GP_0_LEFT = Gosu::GP_0_LEFT;
279
- unsigned Gosu_GP_0_RIGHT = Gosu::GP_0_RIGHT;
280
- unsigned Gosu_GP_0_UP = Gosu::GP_0_UP;
281
- unsigned Gosu_GP_0_DOWN = Gosu::GP_0_DOWN;
282
-
283
- unsigned Gosu_GP_1_LEFT = Gosu::GP_1_LEFT;
284
- unsigned Gosu_GP_1_RIGHT = Gosu::GP_1_RIGHT;
285
- unsigned Gosu_GP_1_UP = Gosu::GP_1_UP;
286
- unsigned Gosu_GP_1_DOWN = Gosu::GP_1_DOWN;
287
-
288
- unsigned Gosu_GP_2_LEFT = Gosu::GP_2_LEFT;
289
- unsigned Gosu_GP_2_RIGHT = Gosu::GP_2_RIGHT;
290
- unsigned Gosu_GP_2_UP = Gosu::GP_2_UP;
291
- unsigned Gosu_GP_2_DOWN = Gosu::GP_2_DOWN;
292
-
293
- unsigned Gosu_GP_3_LEFT = Gosu::GP_3_LEFT;
294
- unsigned Gosu_GP_3_RIGHT = Gosu::GP_3_RIGHT;
295
- unsigned Gosu_GP_3_UP = Gosu::GP_3_UP;
296
- unsigned Gosu_GP_3_DOWN = Gosu::GP_3_DOWN;
297
-
298
- unsigned Gosu_GP_LEFT_STICK_X_AXIS = Gosu::GP_LEFT_STICK_X_AXIS;
299
- unsigned Gosu_GP_LEFT_STICK_Y_AXIS = Gosu::GP_LEFT_STICK_Y_AXIS;
300
- unsigned Gosu_GP_RIGHT_STICK_X_AXIS = Gosu::GP_RIGHT_STICK_X_AXIS;
301
- unsigned Gosu_GP_RIGHT_STICK_Y_AXIS = Gosu::GP_RIGHT_STICK_Y_AXIS;
302
- unsigned Gosu_GP_LEFT_TRIGGER_AXIS = Gosu::GP_LEFT_TRIGGER_AXIS;
303
- unsigned Gosu_GP_RIGHT_TRIGGER_AXIS = Gosu::GP_RIGHT_TRIGGER_AXIS;
304
-
305
- unsigned Gosu_GP_0_LEFT_STICK_X_AXIS = Gosu::GP_0_LEFT_STICK_X_AXIS;
306
- unsigned Gosu_GP_0_LEFT_STICK_Y_AXIS = Gosu::GP_0_LEFT_STICK_Y_AXIS;
307
- unsigned Gosu_GP_0_RIGHT_STICK_X_AXIS = Gosu::GP_0_RIGHT_STICK_X_AXIS;
308
- unsigned Gosu_GP_0_RIGHT_STICK_Y_AXIS = Gosu::GP_0_RIGHT_STICK_Y_AXIS;
309
- unsigned Gosu_GP_0_LEFT_TRIGGER_AXIS = Gosu::GP_0_LEFT_TRIGGER_AXIS;
310
- unsigned Gosu_GP_0_RIGHT_TRIGGER_AXIS = Gosu::GP_0_RIGHT_TRIGGER_AXIS;
311
-
312
- unsigned Gosu_GP_1_LEFT_STICK_X_AXIS = Gosu::GP_1_LEFT_STICK_X_AXIS;
313
- unsigned Gosu_GP_1_LEFT_STICK_Y_AXIS = Gosu::GP_1_LEFT_STICK_Y_AXIS;
314
- unsigned Gosu_GP_1_RIGHT_STICK_X_AXIS = Gosu::GP_1_RIGHT_STICK_X_AXIS;
315
- unsigned Gosu_GP_1_RIGHT_STICK_Y_AXIS = Gosu::GP_1_RIGHT_STICK_Y_AXIS;
316
- unsigned Gosu_GP_1_LEFT_TRIGGER_AXIS = Gosu::GP_1_LEFT_TRIGGER_AXIS;
317
- unsigned Gosu_GP_1_RIGHT_TRIGGER_AXIS = Gosu::GP_1_RIGHT_TRIGGER_AXIS;
318
-
319
- unsigned Gosu_GP_2_LEFT_STICK_X_AXIS = Gosu::GP_2_LEFT_STICK_X_AXIS;
320
- unsigned Gosu_GP_2_LEFT_STICK_Y_AXIS = Gosu::GP_2_LEFT_STICK_Y_AXIS;
321
- unsigned Gosu_GP_2_RIGHT_STICK_X_AXIS = Gosu::GP_2_RIGHT_STICK_X_AXIS;
322
- unsigned Gosu_GP_2_RIGHT_STICK_Y_AXIS = Gosu::GP_2_RIGHT_STICK_Y_AXIS;
323
- unsigned Gosu_GP_2_LEFT_TRIGGER_AXIS = Gosu::GP_2_LEFT_TRIGGER_AXIS;
324
- unsigned Gosu_GP_2_RIGHT_TRIGGER_AXIS = Gosu::GP_2_RIGHT_TRIGGER_AXIS;
325
-
326
- unsigned Gosu_GP_3_LEFT_STICK_X_AXIS = Gosu::GP_3_LEFT_STICK_X_AXIS;
327
- unsigned Gosu_GP_3_LEFT_STICK_Y_AXIS = Gosu::GP_3_LEFT_STICK_Y_AXIS;
328
- unsigned Gosu_GP_3_RIGHT_STICK_X_AXIS = Gosu::GP_3_RIGHT_STICK_X_AXIS;
329
- unsigned Gosu_GP_3_RIGHT_STICK_Y_AXIS = Gosu::GP_3_RIGHT_STICK_Y_AXIS;
330
- unsigned Gosu_GP_3_LEFT_TRIGGER_AXIS = Gosu::GP_3_LEFT_TRIGGER_AXIS;
331
- unsigned Gosu_GP_3_RIGHT_TRIGGER_AXIS = Gosu::GP_3_RIGHT_TRIGGER_AXIS;
332
-
333
- unsigned Gosu_NUM_GAMEPADS = Gosu::NUM_GAMEPADS;
334
- unsigned Gosu_NO_BUTTON = Gosu::NO_BUTTON;
335
-
336
- #ifdef __cplusplus
337
- }
338
- #endif
@@ -1,74 +0,0 @@
1
- #include <Gosu/Gosu.hpp>
2
-
3
- extern "C" {
4
- #include <Gosu/Image.h>
5
- #include <Gosu/Font.h>
6
-
7
- Gosu_Font *Gosu_Font_create(int height, const char *name, unsigned flags)
8
- {
9
- return reinterpret_cast<Gosu_Font *>(new Gosu::Font(height, name, flags));
10
- }
11
-
12
- const char *Gosu_Font_name(Gosu_Font *font)
13
- {
14
- return reinterpret_cast<Gosu::Font *>(font)->name().c_str();
15
- }
16
-
17
- int Gosu_Font_height(Gosu_Font *font)
18
- {
19
- return reinterpret_cast<Gosu::Font *>(font)->height();
20
- }
21
-
22
- unsigned Gosu_Font_flags(Gosu_Font *font)
23
- {
24
- return reinterpret_cast<Gosu::Font *>(font)->flags();
25
- }
26
-
27
- double Gosu_Font_text_width(Gosu_Font *font, const char *text)
28
- {
29
- return reinterpret_cast<Gosu::Font *>(font)->text_width(text);
30
- }
31
-
32
- double Gosu_Font_markup_width(Gosu_Font *font, const char *text)
33
- {
34
- return reinterpret_cast<Gosu::Font *>(font)->markup_width(text);
35
- }
36
-
37
- void Gosu_Font_draw_text(Gosu_Font *font, const char *text, double x, double y, double z,
38
- double scale_x, double scale_y, unsigned c, unsigned mode)
39
- {
40
- reinterpret_cast<Gosu::Font *>(font)->draw_text(text, x, y, z, scale_x, scale_y, c, (Gosu::AlphaMode)mode);
41
- }
42
-
43
- void Gosu_Font_draw_markup(Gosu_Font *font, const char *text, double x, double y, double z,
44
- double scale_x, double scale_y, unsigned c, unsigned mode)
45
- {
46
- reinterpret_cast<Gosu::Font *>(font)->draw_markup(text, x, y, z, scale_x, scale_y, c, (Gosu::AlphaMode)mode);
47
- }
48
-
49
- void Gosu_Font_draw_text_rel(Gosu_Font *font, const char *text, double x, double y, double z,
50
- double rel_x, double rel_y, double scale_x, double scale_y,
51
- unsigned c, unsigned mode)
52
- {
53
- reinterpret_cast<Gosu::Font *>(font)->draw_text_rel(text, x, y, z, rel_x, rel_y, scale_x, scale_y, c, (Gosu::AlphaMode)mode);
54
- }
55
-
56
- void Gosu_Font_draw_markup_rel(Gosu_Font *font, const char *text, double x, double y, double z,
57
- double rel_x, double rel_y, double scale_x, double scale_y,
58
- unsigned c, unsigned mode)
59
- {
60
- reinterpret_cast<Gosu::Font *>(font)->draw_markup_rel(text, x, y, z, rel_x, rel_y, scale_x, scale_y, c, (Gosu::AlphaMode)mode);
61
- }
62
-
63
- void Gosu_Font_set_image(Gosu_Font *font, const char *codepoint, unsigned font_flags, Gosu_Image *image)
64
- {
65
-
66
- const Gosu::Image *gosu_image = reinterpret_cast<Gosu::Image *>(image);
67
- reinterpret_cast<Gosu::Font *>(font)->set_image(codepoint, font_flags, *gosu_image);
68
- }
69
-
70
- void Gosu_Font_destroy(Gosu_Font *font)
71
- {
72
- delete (reinterpret_cast<Gosu::Font *>(font));
73
- }
74
- }
@@ -1,251 +0,0 @@
1
- #include <Gosu/Gosu.hpp>
2
-
3
- extern "C" {
4
- #include <Gosu/Gosu.h>
5
-
6
- void Gosu_gl_z(double z, void function(void *data), void *data)
7
- {
8
- std::function<void ()> callback;
9
- callback = [=]() { function(data); };
10
-
11
- Gosu::Graphics::gl(z, callback);
12
- }
13
-
14
- void Gosu_gl(void function(void *data), void *data)
15
- {
16
- std::function<void ()> callback;
17
- callback = [=]() { function(data); };
18
-
19
- Gosu::Graphics::gl(callback);
20
- }
21
-
22
- Gosu_Image *Gosu_render(int width, int height, void function(void *data), void *data, unsigned image_flags)
23
- {
24
- std::function<void ()> callback;
25
- callback = [=]() { function(data); };
26
-
27
- return reinterpret_cast<Gosu_Image *>(new Gosu::Image(Gosu::Graphics::render(width, height, callback, image_flags)));
28
- }
29
-
30
- Gosu_Image *Gosu_record(int width, int height, void function(void *data), void *data)
31
- {
32
- std::function<void ()> callback;
33
- callback = [=]() { function(data); };
34
- return reinterpret_cast<Gosu_Image *>(new Gosu::Image(Gosu::Graphics::record(width, height, callback)));
35
- }
36
-
37
- void Gosu_flush()
38
- {
39
- Gosu::Graphics::flush();
40
- }
41
-
42
- void Gosu_transform(double m0, double m1, double m2, double m3, double m4, double m5, double m6,
43
- double m7, double m8, double m9, double m10, double m11, double m12, double m13,
44
- double m14, double m15, void function(void *data), void *data)
45
- {
46
- Gosu::Transform transform = {
47
- m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15};
48
- std::function<void ()> callback;
49
- callback = [=]() { function(data); };
50
-
51
- Gosu::Graphics::transform(transform, callback);
52
- }
53
-
54
- void Gosu_translate(double x, double y, void function(void *data), void *data)
55
- {
56
- std::function<void ()> callback;
57
- callback = [=]() { function(data); };
58
-
59
- Gosu::Graphics::transform(Gosu::translate(x, y), callback);
60
- }
61
-
62
- void Gosu_scale(double scale_x, double scale_y, double around_x, double around_y, void function(void *data), void *data)
63
- {
64
- std::function<void ()> callback;
65
- callback = [=]() { function(data); };
66
-
67
- Gosu::Graphics::transform(Gosu::scale(scale_x, scale_y, around_x, around_y), callback);
68
- }
69
-
70
- void Gosu_rotate(double angle, double around_x, double around_y, void function(void *data), void *data)
71
- {
72
- std::function<void ()> callback;
73
- callback = [=]() { function(data); };
74
-
75
- Gosu::Graphics::transform(Gosu::rotate(angle, around_x, around_y), callback);
76
- }
77
-
78
- void Gosu_clip_to(double x, double y, double width, double height, void function(void *data), void *data)
79
- {
80
- std::function<void ()> callback;
81
- callback = [=]() { function(data); };
82
-
83
- Gosu::Graphics::clip_to(x, y, width, height, callback);
84
- }
85
-
86
- void Gosu_draw_line(double x1, double y1, unsigned c1,
87
- double x2, double y2, unsigned c2,
88
- double z, unsigned mode)
89
- {
90
- Gosu::Graphics::draw_line(x1, y1, c1, x2, y2, c2, z, (Gosu::AlphaMode)mode);
91
- }
92
-
93
- void Gosu_draw_triangle(double x1, double y1, unsigned c1,
94
- double x2, double y2, unsigned c2,
95
- double x3, double y3, unsigned c3,
96
- double z, unsigned mode)
97
- {
98
- Gosu::Graphics::draw_triangle(x1, y1, c1,
99
- x2, y2, c2,
100
- x3, y3, c3,
101
- z, (Gosu::AlphaMode)mode);
102
- }
103
-
104
- void Gosu_draw_rect(double x, double y, double width, double height, unsigned c, double z, unsigned mode)
105
- {
106
- Gosu::Graphics::draw_rect(x, y, width, height, c, z, (Gosu::AlphaMode)mode);
107
- }
108
-
109
- void Gosu_draw_quad(double x1, double y1, unsigned c1,
110
- double x2, double y2, unsigned c2,
111
- double x3, double y3, unsigned c3,
112
- double x4, double y4, unsigned c4,
113
- double z, unsigned mode)
114
- {
115
- Gosu::Graphics::draw_quad(x1, y1, c1,
116
- x2, y2, c2,
117
- x3, y3, c3,
118
- x4, y4, c4,
119
- z, (Gosu::AlphaMode)mode);
120
- }
121
-
122
- double Gosu_distance(double x1, double y1, double x2, double y2)
123
- {
124
- return Gosu::distance(x1, y1, x2, y2);
125
- }
126
-
127
- double Gosu_angle(double from_x, double from_y, double to_x, double to_y)
128
- {
129
- return Gosu::angle(from_x, from_y, to_x, to_y);
130
- }
131
-
132
- double Gosu_angle_diff(double from, double to)
133
- {
134
- return Gosu::angle_diff(from, to);
135
- }
136
-
137
- double Gosu_offset_x(double angle, double radius)
138
- {
139
- return Gosu::offset_x(angle, radius);
140
- }
141
-
142
- double Gosu_offset_y(double angle, double radius)
143
- {
144
- return Gosu::offset_y(angle, radius);
145
- }
146
-
147
- double Gosu_random(double min, double max)
148
- {
149
- return Gosu::random(min, max);
150
- }
151
-
152
- unsigned Gosu_available_width(Gosu_Window *window)
153
- {
154
- Gosu::Window *gosu_window = nullptr;
155
- if (window != nullptr) {
156
- gosu_window = reinterpret_cast<Gosu::Window *>(window);
157
- }
158
- return Gosu::available_width(gosu_window);
159
- }
160
-
161
- unsigned Gosu_available_height(Gosu_Window *window)
162
- {
163
- Gosu::Window *gosu_window = nullptr;
164
- if (window != nullptr) {
165
- gosu_window = reinterpret_cast<Gosu::Window *>(window);
166
- }
167
- return Gosu::available_height(gosu_window);
168
- }
169
-
170
- unsigned Gosu_screen_width(Gosu_Window *window)
171
- {
172
- Gosu::Window *gosu_window = nullptr;
173
- if (window != nullptr) {
174
- gosu_window = reinterpret_cast<Gosu::Window *>(window);
175
- }
176
- return Gosu::screen_width(gosu_window);
177
- }
178
-
179
- unsigned Gosu_screen_height(Gosu_Window *window)
180
- {
181
- Gosu::Window *gosu_window = nullptr;
182
- if (window != nullptr) {
183
- gosu_window = reinterpret_cast<Gosu::Window *>(window);
184
- }
185
- return Gosu::screen_height(gosu_window);
186
- }
187
-
188
- int Gosu_button_down(int btn)
189
- {
190
- return Gosu::Input::down((Gosu::Button)btn);
191
- }
192
-
193
- const char *Gosu_button_id_to_char(int id)
194
- {
195
- static thread_local std::string button;
196
- button = Gosu::Input::id_to_char((Gosu::Button)id);
197
-
198
- return button.c_str();
199
- }
200
-
201
- unsigned Gosu_button_char_to_id(const char *btn)
202
- {
203
- return Gosu::Input::char_to_id(btn);
204
- }
205
-
206
- const char *Gosu_button_name(int btn)
207
- {
208
- static thread_local std::string name;
209
- name = Gosu::Input::button_name((Gosu::Button)btn);
210
- return name.empty() ? nullptr : name.c_str();
211
- }
212
-
213
- const char *Gosu_gamepad_name(int id)
214
- {
215
- static thread_local std::string name;
216
- name = Gosu::Input::gamepad_name(id);
217
- return name.empty() ? nullptr : name.c_str();
218
- }
219
-
220
- double Gosu_axis(int btn)
221
- {
222
- return Gosu::Input::axis((Gosu::Button)btn);
223
- }
224
-
225
- int Gosu_fps()
226
- {
227
- return Gosu::fps();
228
- }
229
-
230
- const char *Gosu_language()
231
- {
232
- static thread_local std::string language;
233
- language = Gosu::language();
234
-
235
- return language.c_str();
236
- }
237
-
238
- long Gosu_milliseconds()
239
- {
240
- return Gosu::milliseconds();
241
- }
242
-
243
- const char *Gosu_default_font_name()
244
- {
245
- static thread_local std::string name;
246
- name = Gosu::default_font_name();
247
-
248
- return name.c_str();
249
- }
250
-
251
- }