comparison test/nds-test/build/main.i @ 2683:e858ac8868b6 gsoc2008_nds

Ongoing video render work; initial work on NDS Timers.
author Darren Alton <dalton@stevens.edu>
date Fri, 08 Aug 2008 08:22:08 +0000
parents
children
comparison
equal deleted inserted replaced
2682:f7594fc66bda 2683:e858ac8868b6
1 # 1 "/home/lifning/hack/nds-test/source/main.c"
2 # 1 "/home/lifning/hack/nds-test/build//"
3 # 1 "<built-in>"
4 # 1 "<command-line>"
5 # 1 "/home/lifning/hack/nds-test/source/main.c"
6
7 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 1
8 # 77 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h"
9 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_main.h" 1
10 # 26 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_main.h"
11 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 1
12 # 32 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
13 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_config.h" 1
14 # 26 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_config.h"
15 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_platform.h" 1
16 # 27 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_config.h" 2
17
18
19
20 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_config_nintendods.h" 1
21 # 30 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_config_nintendods.h"
22 typedef signed char int8_t;
23 typedef unsigned char uint8_t;
24 typedef signed short int16_t;
25 typedef unsigned short uint16_t;
26 typedef signed int int32_t;
27 typedef unsigned int uint32_t;
28 typedef signed long long int64_t;
29 typedef unsigned long long uint64_t;
30
31
32
33
34
35
36 typedef unsigned int uintptr_t;
37 # 31 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_config.h" 2
38 # 33 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 2
39
40
41
42 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 1 3
43 # 20 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 3
44 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/_ansi.h" 1 3
45 # 15 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/_ansi.h" 3
46 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/newlib.h" 1 3
47 # 16 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/_ansi.h" 2 3
48 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/config.h" 1 3
49
50
51
52 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/ieeefp.h" 1 3
53 # 5 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/config.h" 2 3
54 # 17 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/_ansi.h" 2 3
55 # 21 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 2 3
56
57
58
59
60 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/_types.h" 1 3
61
62
63
64
65
66
67 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/_default_types.h" 1 3
68 # 26 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/_default_types.h" 3
69 typedef signed char __int8_t ;
70 typedef unsigned char __uint8_t ;
71 # 36 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/_default_types.h" 3
72 typedef signed short __int16_t;
73 typedef unsigned short __uint16_t;
74 # 46 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/_default_types.h" 3
75 typedef __int16_t __int_least16_t;
76 typedef __uint16_t __uint_least16_t;
77 # 58 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/_default_types.h" 3
78 typedef signed int __int32_t;
79 typedef unsigned int __uint32_t;
80 # 76 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/_default_types.h" 3
81 typedef __int32_t __int_least32_t;
82 typedef __uint32_t __uint_least32_t;
83 # 99 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/_default_types.h" 3
84 typedef signed long long __int64_t;
85 typedef unsigned long long __uint64_t;
86 # 8 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/_types.h" 2 3
87 # 26 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 2 3
88 # 61 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 3
89 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/_types.h" 1 3
90 # 13 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/_types.h" 3
91 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/lock.h" 1 3
92
93
94
95
96
97 typedef int _LOCK_T;
98 typedef int _LOCK_RECURSIVE_T;
99 # 14 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/_types.h" 2 3
100
101
102 typedef long _off_t;
103
104
105
106
107
108
109
110 typedef short __dev_t;
111
112
113
114
115 typedef unsigned short __uid_t;
116
117
118 typedef unsigned short __gid_t;
119
120
121
122 __extension__ typedef long long _off64_t;
123
124
125
126
127
128
129
130 typedef long _fpos_t;
131 # 56 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/_types.h" 3
132 typedef int _ssize_t;
133
134
135
136
137
138
139 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stddef.h" 1 3 4
140 # 355 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stddef.h" 3 4
141 typedef unsigned int wint_t;
142 # 64 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/_types.h" 2 3
143
144
145
146 typedef struct
147 {
148 int __count;
149 union
150 {
151 wint_t __wch;
152 unsigned char __wchb[4];
153 } __value;
154 } _mbstate_t;
155
156
157
158 typedef _LOCK_RECURSIVE_T _flock_t;
159
160
161
162
163 typedef void *_iconv_t;
164 # 62 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 2 3
165
166
167
168
169
170
171
172 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stddef.h" 1 3 4
173 # 152 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stddef.h" 3 4
174 typedef int ptrdiff_t;
175 # 214 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stddef.h" 3 4
176 typedef unsigned int size_t;
177 # 326 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stddef.h" 3 4
178 typedef unsigned int wchar_t;
179 # 70 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 2 3
180 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/types.h" 1 3
181 # 19 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/types.h" 3
182 typedef long int __off_t;
183 typedef int __pid_t;
184
185 __extension__ typedef long long int __loff_t;
186 # 71 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 2 3
187 # 92 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 3
188 typedef unsigned char u_char;
189 typedef unsigned short u_short;
190 typedef unsigned int u_int;
191 typedef unsigned long u_long;
192
193
194
195 typedef unsigned short ushort;
196 typedef unsigned int uint;
197
198
199
200 typedef unsigned long clock_t;
201
202
203
204
205 typedef long time_t;
206
207
208
209
210 struct timespec {
211 time_t tv_sec;
212 long tv_nsec;
213 };
214
215 struct itimerspec {
216 struct timespec it_interval;
217 struct timespec it_value;
218 };
219
220
221 typedef long daddr_t;
222 typedef char * caddr_t;
223
224
225
226
227
228
229 typedef unsigned int ino_t;
230 # 162 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 3
231 typedef _off_t off_t;
232 typedef __dev_t dev_t;
233 typedef __uid_t uid_t;
234 typedef __gid_t gid_t;
235
236
237 typedef int pid_t;
238
239 typedef long key_t;
240
241 typedef _ssize_t ssize_t;
242 # 186 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 3
243 typedef unsigned int mode_t __attribute__ ((__mode__ (__SI__)));
244
245
246
247
248 typedef unsigned short nlink_t;
249 # 213 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 3
250 typedef long fd_mask;
251
252
253
254
255
256
257
258 typedef struct _types_fd_set {
259 fd_mask fds_bits[(((64)+(((sizeof (fd_mask) * 8))-1))/((sizeof (fd_mask) * 8)))];
260 } _types_fd_set;
261 # 244 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 3
262 typedef unsigned long clockid_t;
263
264
265
266
267 typedef unsigned long timer_t;
268
269
270
271 typedef unsigned long useconds_t;
272 typedef long suseconds_t;
273
274 typedef __uint32_t fsblkcnt_t;
275 typedef __uint32_t fsfilcnt_t;
276
277 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/features.h" 1 3
278 # 260 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 2 3
279 # 37 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 2
280
281
282 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 1 3
283 # 29 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 3
284 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/_ansi.h" 1 3
285 # 30 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 2 3
286
287
288
289
290 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stddef.h" 1 3 4
291 # 35 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 2 3
292
293
294 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stdarg.h" 1 3 4
295 # 43 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stdarg.h" 3 4
296 typedef __builtin_va_list __gnuc_va_list;
297 # 38 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 2 3
298
299
300
301
302
303
304
305 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/reent.h" 1 3
306 # 21 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/reent.h" 3
307 typedef unsigned long __ULong;
308 # 37 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/reent.h" 3
309 struct _reent;
310
311
312
313
314
315
316 struct _Bigint
317 {
318 struct _Bigint *_next;
319 int _k, _maxwds, _sign, _wds;
320 __ULong _x[1];
321 };
322
323
324 struct __tm
325 {
326 int __tm_sec;
327 int __tm_min;
328 int __tm_hour;
329 int __tm_mday;
330 int __tm_mon;
331 int __tm_year;
332 int __tm_wday;
333 int __tm_yday;
334 int __tm_isdst;
335 };
336
337
338
339
340
341
342
343 struct _on_exit_args {
344 void * _fnargs[32];
345 void * _dso_handle[32];
346
347 __ULong _fntypes;
348
349
350 __ULong _is_cxa;
351 };
352 # 89 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/reent.h" 3
353 struct _atexit {
354 struct _atexit *_next;
355 int _ind;
356
357 void (*_fns[32])(void);
358 struct _on_exit_args _on_exit_args;
359 };
360 # 105 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/reent.h" 3
361 struct __sbuf {
362 unsigned char *_base;
363 int _size;
364 };
365 # 158 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/reent.h" 3
366 struct __sFILE {
367 unsigned char *_p;
368 int _r;
369 int _w;
370 short _flags;
371 short _file;
372 struct __sbuf _bf;
373 int _lbfsize;
374
375
376
377
378
379
380 void * _cookie;
381
382 int (*_read) (struct _reent *, void *, char *, int);
383
384 int (*_write) (struct _reent *, void *, const char *, int);
385
386 _fpos_t (*_seek) (struct _reent *, void *, _fpos_t, int);
387 int (*_close) (struct _reent *, void *);
388
389
390 struct __sbuf _ub;
391 unsigned char *_up;
392 int _ur;
393
394
395 unsigned char _ubuf[3];
396 unsigned char _nbuf[1];
397
398
399 struct __sbuf _lb;
400
401
402 int _blksize;
403 int _offset;
404
405
406 struct _reent *_data;
407
408
409
410 _flock_t _lock;
411
412 };
413 # 259 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/reent.h" 3
414 typedef struct __sFILE __FILE;
415
416
417
418 struct _glue
419 {
420 struct _glue *_next;
421 int _niobs;
422 __FILE *_iobs;
423 };
424 # 291 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/reent.h" 3
425 struct _rand48 {
426 unsigned short _seed[3];
427 unsigned short _mult[3];
428 unsigned short _add;
429
430
431
432
433 };
434 # 564 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/reent.h" 3
435 struct _reent
436 {
437 int _errno;
438
439
440
441
442 __FILE *_stdin, *_stdout, *_stderr;
443
444 int _inc;
445 char _emergency[25];
446
447 int _current_category;
448 const char *_current_locale;
449
450 int __sdidinit;
451
452 void (*__cleanup) (struct _reent *);
453
454
455 struct _Bigint *_result;
456 int _result_k;
457 struct _Bigint *_p5s;
458 struct _Bigint **_freelist;
459
460
461 int _cvtlen;
462 char *_cvtbuf;
463
464 union
465 {
466 struct
467 {
468 unsigned int _unused_rand;
469 char * _strtok_last;
470 char _asctime_buf[26];
471 struct __tm _localtime_buf;
472 int _gamma_signgam;
473 __extension__ unsigned long long _rand_next;
474 struct _rand48 _r48;
475 _mbstate_t _mblen_state;
476 _mbstate_t _mbtowc_state;
477 _mbstate_t _wctomb_state;
478 char _l64a_buf[8];
479 char _signal_buf[24];
480 int _getdate_err;
481 _mbstate_t _mbrlen_state;
482 _mbstate_t _mbrtowc_state;
483 _mbstate_t _mbsrtowcs_state;
484 _mbstate_t _wcrtomb_state;
485 _mbstate_t _wcsrtombs_state;
486 } _reent;
487
488
489
490 struct
491 {
492
493 unsigned char * _nextf[30];
494 unsigned int _nmalloc[30];
495 } _unused;
496 } _new;
497
498
499 struct _atexit *_atexit;
500 struct _atexit _atexit0;
501
502
503 void (**(_sig_func))(int);
504
505
506
507
508 struct _glue __sglue;
509 __FILE __sf[3];
510 };
511 # 796 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/reent.h" 3
512 extern struct _reent *_impure_ptr ;
513 extern struct _reent *const _global_impure_ptr ;
514
515 void _reclaim_reent (struct _reent *);
516 # 46 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 2 3
517
518
519
520
521 typedef __FILE FILE;
522 # 59 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 3
523 typedef _fpos_t fpos_t;
524
525
526
527
528
529 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/stdio.h" 1 3
530 # 66 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 2 3
531 # 170 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 3
532 FILE * tmpfile (void);
533 char * tmpnam (char *);
534 int fclose (FILE *);
535 int fflush (FILE *);
536 FILE * freopen (const char *, const char *, FILE *);
537 void setbuf (FILE *, char *);
538 int setvbuf (FILE *, char *, int, size_t);
539 int fprintf (FILE *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
540
541 int fscanf (FILE *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)));
542
543 int printf (const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
544
545 int scanf (const char *, ...) __attribute__ ((__format__ (__scanf__, 1, 2)));
546
547 int sscanf (const char *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)));
548
549 int vfprintf (FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
550
551 int vprintf (const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 1, 0)));
552
553 int vsprintf (char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
554
555 int fgetc (FILE *);
556 char * fgets (char *, int, FILE *);
557 int fputc (int, FILE *);
558 int fputs (const char *, FILE *);
559 int getc (FILE *);
560 int getchar (void);
561 char * gets (char *);
562 int putc (int, FILE *);
563 int putchar (int);
564 int puts (const char *);
565 int ungetc (int, FILE *);
566 size_t fread (void *, size_t _size, size_t _n, FILE *);
567 size_t fwrite (const void * , size_t _size, size_t _n, FILE *);
568
569
570
571 int fgetpos (FILE *, fpos_t *);
572
573 int fseek (FILE *, long, int);
574
575
576
577 int fsetpos (FILE *, const fpos_t *);
578
579 long ftell ( FILE *);
580 void rewind (FILE *);
581 void clearerr (FILE *);
582 int feof (FILE *);
583 int ferror (FILE *);
584 void perror (const char *);
585
586 FILE * fopen (const char *_name, const char *_type);
587 int sprintf (char *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
588
589 int remove (const char *);
590 int rename (const char *, const char *);
591
592
593
594
595
596
597 int fseeko (FILE *, off_t, int);
598 off_t ftello ( FILE *);
599
600
601 int asiprintf (char **, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
602
603 char * asniprintf (char *, size_t *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
604
605 char * asnprintf (char *, size_t *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
606
607 int asprintf (char **, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
608
609
610 int diprintf (int, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
611
612
613 int fcloseall (void);
614 int fiprintf (FILE *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
615
616 int fiscanf (FILE *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)));
617
618 int iprintf (const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
619
620 int iscanf (const char *, ...) __attribute__ ((__format__ (__scanf__, 1, 2)));
621
622 int siprintf (char *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
623
624 int siscanf (const char *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)));
625
626 int snprintf (char *, size_t, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
627
628 int sniprintf (char *, size_t, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
629
630 char * tempnam (const char *, const char *);
631 int vasiprintf (char **, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
632
633 char * vasniprintf (char *, size_t *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
634
635 char * vasnprintf (char *, size_t *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
636
637 int vasprintf (char **, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
638
639 int vdiprintf (int, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
640
641 int vfiprintf (FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
642
643 int vfiscanf (FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)));
644
645 int vfscanf (FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)));
646
647 int viprintf (const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 1, 0)));
648
649 int viscanf (const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 1, 0)));
650
651 int vscanf (const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 1, 0)));
652
653 int vsiprintf (char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
654
655 int vsiscanf (const char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)));
656
657 int vsniprintf (char *, size_t, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
658
659 int vsnprintf (char *, size_t, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
660
661 int vsscanf (const char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)));
662 # 310 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 3
663 FILE * fdopen (int, const char *);
664
665 int fileno (FILE *);
666 int getw (FILE *);
667 int pclose (FILE *);
668 FILE * popen (const char *, const char *);
669 int putw (int, FILE *);
670 void setbuffer (FILE *, char *, int);
671 int setlinebuf (FILE *);
672 int getc_unlocked (FILE *);
673 int getchar_unlocked (void);
674 void flockfile (FILE *);
675 int ftrylockfile (FILE *);
676 void funlockfile (FILE *);
677 int putc_unlocked (int, FILE *);
678 int putchar_unlocked (int);
679 # 335 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 3
680 int dprintf (int, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
681
682
683 FILE * fmemopen (void *, size_t, const char *);
684
685
686 FILE * open_memstream (char **, size_t *);
687
688 int vdprintf (int, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
689 # 352 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 3
690 int _asiprintf_r (struct _reent *, char **, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
691
692 char * _asniprintf_r (struct _reent *, char *, size_t *, const char *, ...) __attribute__ ((__format__ (__printf__, 4, 5)));
693
694 char * _asnprintf_r (struct _reent *, char *, size_t *, const char *, ...) __attribute__ ((__format__ (__printf__, 4, 5)));
695
696 int _asprintf_r (struct _reent *, char **, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
697
698 int _diprintf_r (struct _reent *, int, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
699
700 int _dprintf_r (struct _reent *, int, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
701
702 int _fclose_r (struct _reent *, FILE *);
703 int _fcloseall_r (struct _reent *);
704 FILE * _fdopen_r (struct _reent *, int, const char *);
705 int _fflush_r (struct _reent *, FILE *);
706 char * _fgets_r (struct _reent *, char *, int, FILE *);
707 int _fiprintf_r (struct _reent *, FILE *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
708
709 int _fiscanf_r (struct _reent *, FILE *, const char *, ...) __attribute__ ((__format__ (__scanf__, 3, 4)));
710
711 FILE * _fmemopen_r (struct _reent *, void *, size_t, const char *);
712 FILE * _fopen_r (struct _reent *, const char *, const char *);
713 int _fprintf_r (struct _reent *, FILE *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
714
715 int _fputc_r (struct _reent *, int, FILE *);
716 int _fputs_r (struct _reent *, const char *, FILE *);
717 size_t _fread_r (struct _reent *, void *, size_t _size, size_t _n, FILE *);
718 int _fscanf_r (struct _reent *, FILE *, const char *, ...) __attribute__ ((__format__ (__scanf__, 3, 4)));
719
720 int _fseek_r (struct _reent *, FILE *, long, int);
721 long _ftell_r (struct _reent *, FILE *);
722 size_t _fwrite_r (struct _reent *, const void * , size_t _size, size_t _n, FILE *);
723 int _getc_r (struct _reent *, FILE *);
724 int _getc_unlocked_r (struct _reent *, FILE *);
725 int _getchar_r (struct _reent *);
726 int _getchar_unlocked_r (struct _reent *);
727 char * _gets_r (struct _reent *, char *);
728 int _iprintf_r (struct _reent *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
729
730 int _iscanf_r (struct _reent *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)));
731
732 int _mkstemp_r (struct _reent *, char *);
733 char * _mktemp_r (struct _reent *, char *);
734 FILE * _open_memstream_r (struct _reent *, char **, size_t *);
735 void _perror_r (struct _reent *, const char *);
736 int _printf_r (struct _reent *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
737
738 int _putc_r (struct _reent *, int, FILE *);
739 int _putc_unlocked_r (struct _reent *, int, FILE *);
740 int _putchar_unlocked_r (struct _reent *, int);
741 int _putchar_r (struct _reent *, int);
742 int _puts_r (struct _reent *, const char *);
743 int _remove_r (struct _reent *, const char *);
744 int _rename_r (struct _reent *, const char *_old, const char *_new);
745
746 int _scanf_r (struct _reent *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)));
747
748 int _siprintf_r (struct _reent *, char *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
749
750 int _siscanf_r (struct _reent *, const char *, const char *, ...) __attribute__ ((__format__ (__scanf__, 3, 4)));
751
752 int _sniprintf_r (struct _reent *, char *, size_t, const char *, ...) __attribute__ ((__format__ (__printf__, 4, 5)));
753
754 int _snprintf_r (struct _reent *, char *, size_t, const char *, ...) __attribute__ ((__format__ (__printf__, 4, 5)));
755
756 int _sprintf_r (struct _reent *, char *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
757
758 int _sscanf_r (struct _reent *, const char *, const char *, ...) __attribute__ ((__format__ (__scanf__, 3, 4)));
759
760 char * _tempnam_r (struct _reent *, const char *, const char *);
761 FILE * _tmpfile_r (struct _reent *);
762 char * _tmpnam_r (struct _reent *, char *);
763 int _ungetc_r (struct _reent *, int, FILE *);
764 int _vasiprintf_r (struct _reent *, char **, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
765
766 char * _vasniprintf_r (struct _reent*, char *, size_t *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 4, 0)));
767
768 char * _vasnprintf_r (struct _reent*, char *, size_t *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 4, 0)));
769
770 int _vasprintf_r (struct _reent *, char **, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
771
772 int _vdiprintf_r (struct _reent *, int, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
773
774 int _vdprintf_r (struct _reent *, int, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
775
776 int _vfiprintf_r (struct _reent *, FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
777
778 int _vfiscanf_r (struct _reent *, FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 3, 0)));
779
780 int _vfprintf_r (struct _reent *, FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
781
782 int _vfscanf_r (struct _reent *, FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 3, 0)));
783
784 int _viprintf_r (struct _reent *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
785
786 int _viscanf_r (struct _reent *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)));
787
788 int _vprintf_r (struct _reent *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
789
790 int _vscanf_r (struct _reent *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)));
791
792 int _vsiprintf_r (struct _reent *, char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
793
794 int _vsiscanf_r (struct _reent *, const char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 3, 0)));
795
796 int _vsniprintf_r (struct _reent *, char *, size_t, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 4, 0)));
797
798 int _vsnprintf_r (struct _reent *, char *, size_t, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 4, 0)));
799
800 int _vsprintf_r (struct _reent *, char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
801
802 int _vsscanf_r (struct _reent *, const char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 3, 0)));
803
804
805 ssize_t __getdelim (char **, size_t *, int, FILE *);
806 ssize_t __getline (char **, size_t *, FILE *);
807 # 494 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 3
808 int __srget_r (struct _reent *, FILE *);
809 int __swbuf_r (struct _reent *, int, FILE *);
810 # 509 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 3
811 FILE *funopen (const void * __cookie, int (*__readfn)(void * __cookie, char *__buf, int __n), int (*__writefn)(void * __cookie, const char *__buf, int __n), fpos_t (*__seekfn)(void * __cookie, fpos_t __off, int __whence), int (*__closefn)(void * __cookie));
812 # 521 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 3
813 typedef ssize_t cookie_read_function_t(void *__cookie, char *__buf, size_t __n);
814 typedef ssize_t cookie_write_function_t(void *__cookie, const char *__buf,
815 size_t __n);
816
817
818
819
820 typedef int cookie_seek_function_t(void *__cookie, off_t *__off, int __whence);
821
822 typedef int cookie_close_function_t(void *__cookie);
823 typedef struct
824 {
825
826
827 cookie_read_function_t *read;
828 cookie_write_function_t *write;
829 cookie_seek_function_t *seek;
830 cookie_close_function_t *close;
831 } cookie_io_functions_t;
832 FILE *fopencookie (void *__cookie, const char *__mode, cookie_io_functions_t __functions);
833 # 669 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 3
834
835 # 40 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 2
836
837
838 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdlib.h" 1 3
839 # 14 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdlib.h" 3
840 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stddef.h" 1 3 4
841 # 15 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdlib.h" 2 3
842
843
844 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/stdlib.h" 1 3
845 # 18 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdlib.h" 2 3
846
847 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/alloca.h" 1 3
848 # 20 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdlib.h" 2 3
849
850
851
852
853
854
855
856
857 typedef struct
858 {
859 int quot;
860 int rem;
861 } div_t;
862
863 typedef struct
864 {
865 long quot;
866 long rem;
867 } ldiv_t;
868
869
870 typedef struct
871 {
872 long long int quot;
873 long long int rem;
874 } lldiv_t;
875 # 57 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdlib.h" 3
876 extern int __mb_cur_max;
877
878
879
880 void abort (void) __attribute__ ((noreturn));
881 int abs (int);
882 int atexit (void (*__func)(void));
883 double atof (const char *__nptr);
884
885 float atoff (const char *__nptr);
886
887 int atoi (const char *__nptr);
888 int _atoi_r (struct _reent *, const char *__nptr);
889 long atol (const char *__nptr);
890 long _atol_r (struct _reent *, const char *__nptr);
891 void * bsearch (const void * __key, const void * __base, size_t __nmemb, size_t __size, int (* _compar) (const void *, const void *));
892
893
894
895
896 void * calloc (size_t __nmemb, size_t __size);
897 div_t div (int __numer, int __denom);
898 void exit (int __status) __attribute__ ((noreturn));
899 void free (void *);
900 char * getenv (const char *__string);
901 char * _getenv_r (struct _reent *, const char *__string);
902 char * _findenv (const char *, int *);
903 char * _findenv_r (struct _reent *, const char *, int *);
904 long labs (long);
905 ldiv_t ldiv (long __numer, long __denom);
906 void * malloc (size_t __size);
907 int mblen (const char *, size_t);
908 int _mblen_r (struct _reent *, const char *, size_t, _mbstate_t *);
909 int mbtowc (wchar_t *, const char *, size_t);
910 int _mbtowc_r (struct _reent *, wchar_t *, const char *, size_t, _mbstate_t *);
911 int wctomb (char *, wchar_t);
912 int _wctomb_r (struct _reent *, char *, wchar_t, _mbstate_t *);
913 size_t mbstowcs (wchar_t *, const char *, size_t);
914 size_t _mbstowcs_r (struct _reent *, wchar_t *, const char *, size_t, _mbstate_t *);
915 size_t wcstombs (char *, const wchar_t *, size_t);
916 size_t _wcstombs_r (struct _reent *, char *, const wchar_t *, size_t, _mbstate_t *);
917
918
919 int mkstemp (char *);
920 char * mktemp (char *);
921
922
923 void qsort (void * __base, size_t __nmemb, size_t __size, int(*_compar)(const void *, const void *));
924 int rand (void);
925 void * realloc (void * __r, size_t __size);
926 void srand (unsigned __seed);
927 double strtod (const char *__n, char **__end_PTR);
928 double _strtod_r (struct _reent *,const char *__n, char **__end_PTR);
929 float strtof (const char *__n, char **__end_PTR);
930
931
932
933
934
935
936 long strtol (const char *__n, char **__end_PTR, int __base);
937 long _strtol_r (struct _reent *,const char *__n, char **__end_PTR, int __base);
938 unsigned long strtoul (const char *__n, char **__end_PTR, int __base);
939 unsigned long _strtoul_r (struct _reent *,const char *__n, char **__end_PTR, int __base);
940
941 int system (const char *__string);
942
943
944 long a64l (const char *__input);
945 char * l64a (long __input);
946 char * _l64a_r (struct _reent *,long __input);
947 int on_exit (void (*__func)(int, void *),void * __arg);
948 void _Exit (int __status) __attribute__ ((noreturn));
949 int putenv (char *__string);
950 int _putenv_r (struct _reent *, char *__string);
951 int setenv (const char *__string, const char *__value, int __overwrite);
952 int _setenv_r (struct _reent *, const char *__string, const char *__value, int __overwrite);
953
954 char * gcvt (double,int,char *);
955 char * gcvtf (float,int,char *);
956 char * fcvt (double,int,int *,int *);
957 char * fcvtf (float,int,int *,int *);
958 char * ecvt (double,int,int *,int *);
959 char * ecvtbuf (double, int, int*, int*, char *);
960 char * fcvtbuf (double, int, int*, int*, char *);
961 char * ecvtf (float,int,int *,int *);
962 char * dtoa (double, int, int, int *, int*, char**);
963 int rand_r (unsigned *__seed);
964
965 double drand48 (void);
966 double _drand48_r (struct _reent *);
967 double erand48 (unsigned short [3]);
968 double _erand48_r (struct _reent *, unsigned short [3]);
969 long jrand48 (unsigned short [3]);
970 long _jrand48_r (struct _reent *, unsigned short [3]);
971 void lcong48 (unsigned short [7]);
972 void _lcong48_r (struct _reent *, unsigned short [7]);
973 long lrand48 (void);
974 long _lrand48_r (struct _reent *);
975 long mrand48 (void);
976 long _mrand48_r (struct _reent *);
977 long nrand48 (unsigned short [3]);
978 long _nrand48_r (struct _reent *, unsigned short [3]);
979 unsigned short *
980 seed48 (unsigned short [3]);
981 unsigned short *
982 _seed48_r (struct _reent *, unsigned short [3]);
983 void srand48 (long);
984 void _srand48_r (struct _reent *, long);
985 long long atoll (const char *__nptr);
986 long long _atoll_r (struct _reent *, const char *__nptr);
987 long long llabs (long long);
988 lldiv_t lldiv (long long __numer, long long __denom);
989 long long strtoll (const char *__n, char **__end_PTR, int __base);
990 long long _strtoll_r (struct _reent *, const char *__n, char **__end_PTR, int __base);
991 unsigned long long strtoull (const char *__n, char **__end_PTR, int __base);
992 unsigned long long _strtoull_r (struct _reent *, const char *__n, char **__end_PTR, int __base);
993
994
995 void cfree (void *);
996 void unsetenv (const char *__string);
997 void _unsetenv_r (struct _reent *, const char *__string);
998
999
1000
1001
1002 char * _dtoa_r (struct _reent *, double, int, int, int *, int*, char**);
1003
1004 void * _malloc_r (struct _reent *, size_t);
1005 void * _calloc_r (struct _reent *, size_t, size_t);
1006 void _free_r (struct _reent *, void *);
1007 void * _realloc_r (struct _reent *, void *, size_t);
1008 void _mstats_r (struct _reent *, char *);
1009
1010 int _system_r (struct _reent *, const char *);
1011
1012 void __eprintf (const char *, const char *, unsigned int, const char *);
1013
1014
1015 # 43 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 2
1016 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stddef.h" 1 3 4
1017 # 44 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 2
1018 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stdarg.h" 1 3 4
1019 # 105 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stdarg.h" 3 4
1020 typedef __gnuc_va_list va_list;
1021 # 45 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 2
1022 # 62 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
1023 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/string.h" 1 3
1024 # 14 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/string.h" 3
1025 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stddef.h" 1 3 4
1026 # 15 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/string.h" 2 3
1027
1028
1029
1030
1031
1032
1033
1034 void * memchr (const void *, int, size_t);
1035 int memcmp (const void *, const void *, size_t);
1036 void * memcpy (void *, const void *, size_t);
1037 void * memmove (void *, const void *, size_t);
1038 void * memset (void *, int, size_t);
1039 char *strcat (char *, const char *);
1040 char *strchr (const char *, int);
1041 int strcmp (const char *, const char *);
1042 int strcoll (const char *, const char *);
1043 char *strcpy (char *, const char *);
1044 size_t strcspn (const char *, const char *);
1045 char *strerror (int);
1046 size_t strlen (const char *);
1047 char *strncat (char *, const char *, size_t);
1048 int strncmp (const char *, const char *, size_t);
1049 char *strncpy (char *, const char *, size_t);
1050 char *strpbrk (const char *, const char *);
1051 char *strrchr (const char *, int);
1052 size_t strspn (const char *, const char *);
1053 char *strstr (const char *, const char *);
1054
1055
1056 char *strtok (char *, const char *);
1057
1058
1059 size_t strxfrm (char *, const char *, size_t);
1060
1061
1062 char *strtok_r (char *, const char *, char **);
1063
1064 int bcmp (const void *, const void *, size_t);
1065 void bcopy (const void *, void *, size_t);
1066 void bzero (void *, size_t);
1067 int ffs (int);
1068 char *index (const char *, int);
1069 void * memccpy (void *, const void *, int, size_t);
1070 void * mempcpy (void *, const void *, size_t);
1071
1072
1073
1074 char *rindex (const char *, int);
1075 char *stpcpy (char *, const char *);
1076 char *stpncpy (char *, const char *, size_t);
1077 int strcasecmp (const char *, const char *);
1078 char *strcasestr (const char *, const char *);
1079 char *strdup (const char *);
1080 char *_strdup_r (struct _reent *, const char *);
1081 char *strndup (const char *, size_t);
1082 char *_strndup_r (struct _reent *, const char *, size_t);
1083 char *strerror_r (int, char *, size_t);
1084 size_t strlcat (char *, const char *, size_t);
1085 size_t strlcpy (char *, const char *, size_t);
1086 int strncasecmp (const char *, const char *, size_t);
1087 size_t strnlen (const char *, size_t);
1088 char *strsep (char **, const char *);
1089 char *strlwr (char *);
1090 char *strupr (char *);
1091 # 102 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/string.h" 3
1092 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/string.h" 1 3
1093 # 103 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/string.h" 2 3
1094
1095
1096 # 63 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 2
1097 # 73 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
1098 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/ctype.h" 1 3
1099
1100
1101
1102
1103
1104
1105
1106 int isalnum (int __c);
1107 int isalpha (int __c);
1108 int iscntrl (int __c);
1109 int isdigit (int __c);
1110 int isgraph (int __c);
1111 int islower (int __c);
1112 int isprint (int __c);
1113 int ispunct (int __c);
1114 int isspace (int __c);
1115 int isupper (int __c);
1116 int isxdigit (int __c);
1117 int tolower (int __c);
1118 int toupper (int __c);
1119
1120
1121 int isblank (int __c);
1122 int isascii (int __c);
1123 int toascii (int __c);
1124 int _tolower (int __c);
1125 int _toupper (int __c);
1126 # 39 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/ctype.h" 3
1127 extern const char *__ctype_ptr;
1128 extern const char _ctype_[];
1129 # 71 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/ctype.h" 3
1130
1131 # 74 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 2
1132 # 84 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
1133 typedef enum SDL_bool
1134 {
1135 SDL_FALSE = 0,
1136 SDL_TRUE = 1
1137 } SDL_bool;
1138
1139
1140
1141
1142
1143 typedef int8_t Sint8;
1144
1145
1146
1147
1148 typedef uint8_t Uint8;
1149
1150
1151
1152
1153 typedef int16_t Sint16;
1154
1155
1156
1157
1158 typedef uint16_t Uint16;
1159
1160
1161
1162
1163 typedef int32_t Sint32;
1164
1165
1166
1167
1168 typedef uint32_t Uint32;
1169
1170
1171
1172
1173
1174
1175
1176 typedef int64_t Sint64;
1177
1178
1179
1180
1181
1182 typedef uint64_t Uint64;
1183 # 144 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
1184 typedef int SDL_dummy_uint8[(sizeof(Uint8) == 1) * 2 - 1];
1185 typedef int SDL_dummy_sint8[(sizeof(Sint8) == 1) * 2 - 1];
1186 typedef int SDL_dummy_uint16[(sizeof(Uint16) == 2) * 2 - 1];
1187 typedef int SDL_dummy_sint16[(sizeof(Sint16) == 2) * 2 - 1];
1188 typedef int SDL_dummy_uint32[(sizeof(Uint32) == 4) * 2 - 1];
1189 typedef int SDL_dummy_sint32[(sizeof(Sint32) == 4) * 2 - 1];
1190 # 179 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
1191 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
1192 # 180 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 2
1193 # 399 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
1194 extern __attribute__ ((visibility("default"))) void * SDL_revcpy(void *dst, const void *src,
1195 size_t len);
1196 # 437 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
1197 extern __attribute__ ((visibility("default"))) size_t SDL_wcslen(const short * string);
1198
1199
1200
1201
1202
1203 extern __attribute__ ((visibility("default"))) size_t SDL_strlcpy(char *dst, const char *src,
1204 size_t maxlen);
1205
1206
1207
1208
1209
1210 extern __attribute__ ((visibility("default"))) size_t SDL_strlcat(char *dst, const char *src,
1211 size_t maxlen);
1212 # 463 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
1213 extern __attribute__ ((visibility("default"))) char * SDL_strrev(char *string);
1214
1215
1216
1217
1218
1219 extern __attribute__ ((visibility("default"))) char * SDL_strupr(char *string);
1220
1221
1222
1223
1224
1225 extern __attribute__ ((visibility("default"))) char * SDL_strlwr(char *string);
1226 # 510 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
1227 extern __attribute__ ((visibility("default"))) char * SDL_ltoa(long value, char *string, int radix);
1228 # 522 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
1229 extern __attribute__ ((visibility("default"))) char * SDL_ultoa(unsigned long value, char *string,
1230 int radix);
1231 # 536 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
1232 extern __attribute__ ((visibility("default"))) unsigned long SDL_strtoul(const char *string,
1233 char **endp, int base);
1234
1235
1236
1237
1238
1239
1240
1241 extern __attribute__ ((visibility("default"))) char * SDL_lltoa(Sint64 value, char *string,
1242 int radix);
1243
1244
1245
1246
1247
1248 extern __attribute__ ((visibility("default"))) char * SDL_ulltoa(Uint64 value, char *string,
1249 int radix);
1250
1251
1252
1253
1254
1255 extern __attribute__ ((visibility("default"))) Sint64 SDL_strtoll(const char *string, char **endp,
1256 int base);
1257
1258
1259
1260
1261
1262 extern __attribute__ ((visibility("default"))) Uint64 SDL_strtoull(const char *string, char **endp,
1263 int base);
1264 # 617 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
1265 extern __attribute__ ((visibility("default"))) int SDL_strncasecmp(const char *str1,
1266 const char *str2, size_t maxlen);
1267 # 653 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
1268 typedef struct _SDL_iconv_t *SDL_iconv_t;
1269 extern __attribute__ ((visibility("default"))) SDL_iconv_t SDL_iconv_open(const char *tocode,
1270 const char *fromcode);
1271 extern __attribute__ ((visibility("default"))) int SDL_iconv_close(SDL_iconv_t cd);
1272
1273 extern __attribute__ ((visibility("default"))) size_t SDL_iconv(SDL_iconv_t cd, const char **inbuf,
1274 size_t * inbytesleft, char **outbuf,
1275 size_t * outbytesleft);
1276
1277
1278
1279 extern __attribute__ ((visibility("default"))) char * SDL_iconv_string(const char *tocode,
1280 const char *fromcode,
1281 const char *inbuf,
1282 size_t inbytesleft);
1283 # 678 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
1284 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
1285 # 679 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 2
1286 # 27 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_main.h" 2
1287 # 78 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2
1288
1289 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h" 1
1290 # 33 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
1291 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_error.h" 1
1292 # 33 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_error.h"
1293 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
1294 # 34 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_error.h" 2
1295 # 42 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_error.h"
1296 extern __attribute__ ((visibility("default"))) void SDL_SetError(const char *fmt, ...);
1297 extern __attribute__ ((visibility("default"))) char * SDL_GetError(void);
1298 extern __attribute__ ((visibility("default"))) void SDL_ClearError(void);
1299
1300
1301
1302
1303 typedef enum
1304 {
1305 SDL_ENOMEM,
1306 SDL_EFREAD,
1307 SDL_EFWRITE,
1308 SDL_EFSEEK,
1309 SDL_UNSUPPORTED,
1310 SDL_LASTERROR
1311 } SDL_errorcode;
1312 extern __attribute__ ((visibility("default"))) void SDL_Error(SDL_errorcode code);
1313 # 67 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_error.h"
1314 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
1315 # 68 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_error.h" 2
1316 # 34 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h" 2
1317 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_endian.h" 1
1318 # 51 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_endian.h"
1319 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
1320 # 52 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_endian.h" 2
1321 # 96 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_endian.h"
1322 static __inline__ Uint16
1323 SDL_Swap16(Uint16 x)
1324 {
1325 return ((x << 8) | (x >> 8));
1326 }
1327 # 136 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_endian.h"
1328 static __inline__ Uint32
1329 SDL_Swap32(Uint32 x)
1330 {
1331 return ((x << 24) | ((x << 8) & 0x00FF0000) | ((x >> 8) & 0x0000FF00) |
1332 (x >> 24));
1333 }
1334 # 171 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_endian.h"
1335 static __inline__ Uint64
1336 SDL_Swap64(Uint64 x)
1337 {
1338 Uint32 hi, lo;
1339
1340
1341 lo = (Uint32) (x & 0xFFFFFFFF);
1342 x >>= 32;
1343 hi = (Uint32) (x & 0xFFFFFFFF);
1344 x = SDL_Swap32(lo);
1345 x <<= 32;
1346 x |= SDL_Swap32(hi);
1347 return (x);
1348 }
1349 # 195 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_endian.h"
1350 static __inline__ float
1351 SDL_SwapFloat(float x)
1352 {
1353 union
1354 {
1355 float f;
1356 Uint32 ui32;
1357 } swapper;
1358 swapper.f = x;
1359 swapper.ui32 = SDL_Swap32(swapper.ui32);
1360 return swapper.f;
1361 }
1362 # 236 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_endian.h"
1363 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
1364 # 237 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_endian.h" 2
1365 # 35 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h" 2
1366 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mutex.h" 1
1367 # 35 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mutex.h"
1368 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
1369 # 36 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mutex.h" 2
1370 # 57 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mutex.h"
1371 struct SDL_mutex;
1372 typedef struct SDL_mutex SDL_mutex;
1373
1374
1375 extern __attribute__ ((visibility("default"))) SDL_mutex * SDL_CreateMutex(void);
1376
1377
1378
1379 extern __attribute__ ((visibility("default"))) int SDL_mutexP(SDL_mutex * mutex);
1380
1381
1382
1383
1384
1385
1386 extern __attribute__ ((visibility("default"))) int SDL_mutexV(SDL_mutex * mutex);
1387
1388
1389 extern __attribute__ ((visibility("default"))) void SDL_DestroyMutex(SDL_mutex * mutex);
1390
1391
1392
1393
1394
1395
1396
1397 struct SDL_semaphore;
1398 typedef struct SDL_semaphore SDL_sem;
1399
1400
1401 extern __attribute__ ((visibility("default"))) SDL_sem * SDL_CreateSemaphore(Uint32 initial_value);
1402
1403
1404 extern __attribute__ ((visibility("default"))) void SDL_DestroySemaphore(SDL_sem * sem);
1405
1406
1407
1408
1409
1410 extern __attribute__ ((visibility("default"))) int SDL_SemWait(SDL_sem * sem);
1411
1412
1413
1414
1415 extern __attribute__ ((visibility("default"))) int SDL_SemTryWait(SDL_sem * sem);
1416
1417
1418
1419
1420
1421
1422
1423 extern __attribute__ ((visibility("default"))) int SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);
1424
1425
1426
1427
1428 extern __attribute__ ((visibility("default"))) int SDL_SemPost(SDL_sem * sem);
1429
1430
1431 extern __attribute__ ((visibility("default"))) Uint32 SDL_SemValue(SDL_sem * sem);
1432
1433
1434
1435
1436
1437
1438
1439 struct SDL_cond;
1440 typedef struct SDL_cond SDL_cond;
1441
1442
1443 extern __attribute__ ((visibility("default"))) SDL_cond * SDL_CreateCond(void);
1444
1445
1446 extern __attribute__ ((visibility("default"))) void SDL_DestroyCond(SDL_cond * cond);
1447
1448
1449
1450
1451 extern __attribute__ ((visibility("default"))) int SDL_CondSignal(SDL_cond * cond);
1452
1453
1454
1455
1456 extern __attribute__ ((visibility("default"))) int SDL_CondBroadcast(SDL_cond * cond);
1457
1458
1459
1460
1461
1462
1463 extern __attribute__ ((visibility("default"))) int SDL_CondWait(SDL_cond * cond, SDL_mutex * mut);
1464
1465
1466
1467
1468
1469
1470
1471 extern __attribute__ ((visibility("default"))) int SDL_CondWaitTimeout(SDL_cond * cond,
1472 SDL_mutex * mutex, Uint32 ms);
1473
1474
1475
1476
1477
1478
1479
1480 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
1481 # 167 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mutex.h" 2
1482 # 36 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h" 2
1483 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_thread.h" 1
1484 # 38 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_thread.h"
1485 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
1486 # 39 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_thread.h" 2
1487 # 47 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_thread.h"
1488 struct SDL_Thread;
1489 typedef struct SDL_Thread SDL_Thread;
1490 # 107 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_thread.h"
1491 extern __attribute__ ((visibility("default"))) SDL_Thread *
1492 SDL_CreateThread(int ( * fn) (void *), void *data);
1493
1494
1495
1496 extern __attribute__ ((visibility("default"))) Uint32 SDL_ThreadID(void);
1497
1498
1499
1500
1501 extern __attribute__ ((visibility("default"))) Uint32 SDL_GetThreadID(SDL_Thread * thread);
1502
1503
1504
1505
1506
1507 extern __attribute__ ((visibility("default"))) void SDL_WaitThread(SDL_Thread * thread, int *status);
1508
1509
1510 extern __attribute__ ((visibility("default"))) void SDL_KillThread(SDL_Thread * thread);
1511 # 135 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_thread.h"
1512 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
1513 # 136 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_thread.h" 2
1514 # 37 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h" 2
1515 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rwops.h" 1
1516 # 36 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rwops.h"
1517 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
1518 # 37 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rwops.h" 2
1519 # 46 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rwops.h"
1520 typedef struct SDL_RWops
1521 {
1522
1523
1524
1525
1526 long ( * seek) (struct SDL_RWops * context, long offset,
1527 int whence);
1528
1529
1530
1531
1532
1533 size_t( * read) (struct SDL_RWops * context, void *ptr,
1534 size_t size, size_t maxnum);
1535
1536
1537
1538
1539
1540 size_t( * write) (struct SDL_RWops * context, const void *ptr,
1541 size_t size, size_t num);
1542
1543
1544
1545
1546 int ( * close) (struct SDL_RWops * context);
1547
1548 Uint32 type;
1549 union
1550 {
1551 # 91 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rwops.h"
1552 struct
1553 {
1554 SDL_bool autoclose;
1555 FILE *fp;
1556 } stdio;
1557
1558 struct
1559 {
1560 Uint8 *base;
1561 Uint8 *here;
1562 Uint8 *stop;
1563 } mem;
1564 struct
1565 {
1566 void *data1;
1567 } unknown;
1568 } hidden;
1569
1570 } SDL_RWops;
1571
1572
1573
1574
1575 extern __attribute__ ((visibility("default"))) SDL_RWops * SDL_RWFromFile(const char *file,
1576 const char *mode);
1577
1578
1579 extern __attribute__ ((visibility("default"))) SDL_RWops * SDL_RWFromFP(FILE * fp,
1580 SDL_bool autoclose);
1581
1582
1583 extern __attribute__ ((visibility("default"))) SDL_RWops * SDL_RWFromMem(void *mem, int size);
1584 extern __attribute__ ((visibility("default"))) SDL_RWops * SDL_RWFromConstMem(const void *mem,
1585 int size);
1586
1587 extern __attribute__ ((visibility("default"))) SDL_RWops * SDL_AllocRW(void);
1588 extern __attribute__ ((visibility("default"))) void SDL_FreeRW(SDL_RWops * area);
1589 # 142 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rwops.h"
1590 extern __attribute__ ((visibility("default"))) Uint16 SDL_ReadLE16(SDL_RWops * src);
1591 extern __attribute__ ((visibility("default"))) Uint16 SDL_ReadBE16(SDL_RWops * src);
1592 extern __attribute__ ((visibility("default"))) Uint32 SDL_ReadLE32(SDL_RWops * src);
1593 extern __attribute__ ((visibility("default"))) Uint32 SDL_ReadBE32(SDL_RWops * src);
1594 extern __attribute__ ((visibility("default"))) Uint64 SDL_ReadLE64(SDL_RWops * src);
1595 extern __attribute__ ((visibility("default"))) Uint64 SDL_ReadBE64(SDL_RWops * src);
1596
1597
1598 extern __attribute__ ((visibility("default"))) int SDL_WriteLE16(SDL_RWops * dst, Uint16 value);
1599 extern __attribute__ ((visibility("default"))) int SDL_WriteBE16(SDL_RWops * dst, Uint16 value);
1600 extern __attribute__ ((visibility("default"))) int SDL_WriteLE32(SDL_RWops * dst, Uint32 value);
1601 extern __attribute__ ((visibility("default"))) int SDL_WriteBE32(SDL_RWops * dst, Uint32 value);
1602 extern __attribute__ ((visibility("default"))) int SDL_WriteLE64(SDL_RWops * dst, Uint64 value);
1603 extern __attribute__ ((visibility("default"))) int SDL_WriteBE64(SDL_RWops * dst, Uint64 value);
1604 # 164 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rwops.h"
1605 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
1606 # 165 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rwops.h" 2
1607 # 38 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h" 2
1608
1609 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
1610 # 40 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h" 2
1611
1612
1613
1614
1615
1616
1617
1618 typedef Uint16 SDL_AudioFormat;
1619
1620
1621 typedef struct SDL_AudioSpec
1622 {
1623 int freq;
1624 SDL_AudioFormat format;
1625 Uint8 channels;
1626 Uint8 silence;
1627 Uint16 samples;
1628 Uint16 padding;
1629 Uint32 size;
1630
1631
1632
1633
1634
1635
1636 void ( * callback) (void *userdata, Uint8 * stream, int len);
1637 void *userdata;
1638 } SDL_AudioSpec;
1639 # 134 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
1640 struct SDL_AudioCVT;
1641 typedef void ( * SDL_AudioFilter) (struct SDL_AudioCVT * cvt,
1642 SDL_AudioFormat format);
1643
1644 typedef struct SDL_AudioCVT
1645 {
1646 int needed;
1647 SDL_AudioFormat src_format;
1648 SDL_AudioFormat dst_format;
1649 double rate_incr;
1650 Uint8 *buf;
1651 int len;
1652 int len_cvt;
1653 int len_mult;
1654 double len_ratio;
1655 SDL_AudioFilter filters[10];
1656 int filter_index;
1657 } SDL_AudioCVT;
1658
1659
1660
1661
1662
1663
1664
1665 extern __attribute__ ((visibility("default"))) int SDL_GetNumAudioDrivers(void);
1666 extern __attribute__ ((visibility("default"))) const char * SDL_GetAudioDriver(int index);
1667
1668
1669
1670
1671
1672 extern __attribute__ ((visibility("default"))) int SDL_AudioInit(const char *driver_name);
1673 extern __attribute__ ((visibility("default"))) void SDL_AudioQuit(void);
1674
1675
1676
1677
1678 extern __attribute__ ((visibility("default"))) const char * SDL_GetCurrentAudioDriver(void);
1679 # 215 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
1680 extern __attribute__ ((visibility("default"))) int SDL_OpenAudio(const SDL_AudioSpec * desired,
1681 SDL_AudioSpec * obtained);
1682 # 226 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
1683 typedef Uint32 SDL_AudioDeviceID;
1684 # 239 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
1685 extern __attribute__ ((visibility("default"))) int SDL_GetNumAudioDevices(int iscapture);
1686 # 254 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
1687 extern __attribute__ ((visibility("default"))) const char * SDL_GetAudioDeviceName(int index,
1688 int iscapture);
1689 # 268 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
1690 extern __attribute__ ((visibility("default"))) SDL_AudioDeviceID SDL_OpenAudioDevice(const char
1691 *device,
1692 int iscapture,
1693 const
1694 SDL_AudioSpec *
1695 desired,
1696 SDL_AudioSpec *
1697 obtained);
1698
1699
1700
1701
1702
1703
1704 typedef enum
1705 {
1706 SDL_AUDIO_STOPPED = 0,
1707 SDL_AUDIO_PLAYING,
1708 SDL_AUDIO_PAUSED
1709 } SDL_audiostatus;
1710 extern __attribute__ ((visibility("default"))) SDL_audiostatus SDL_GetAudioStatus(void);
1711
1712 extern __attribute__ ((visibility("default"))) SDL_audiostatus
1713 SDL_GetAudioDeviceStatus(SDL_AudioDeviceID dev);
1714 # 300 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
1715 extern __attribute__ ((visibility("default"))) void SDL_PauseAudio(int pause_on);
1716 extern __attribute__ ((visibility("default"))) void SDL_PauseAudioDevice(SDL_AudioDeviceID dev,
1717 int pause_on);
1718 # 321 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
1719 extern __attribute__ ((visibility("default"))) SDL_AudioSpec * SDL_LoadWAV_RW(SDL_RWops * src,
1720 int freesrc,
1721 SDL_AudioSpec * spec,
1722 Uint8 ** audio_buf,
1723 Uint32 * audio_len);
1724 # 334 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
1725 extern __attribute__ ((visibility("default"))) void SDL_FreeWAV(Uint8 * audio_buf);
1726 # 344 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
1727 extern __attribute__ ((visibility("default"))) int SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
1728 SDL_AudioFormat src_format,
1729 Uint8 src_channels,
1730 int src_rate,
1731 SDL_AudioFormat dst_format,
1732 Uint8 dst_channels,
1733 int dst_rate);
1734 # 360 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
1735 extern __attribute__ ((visibility("default"))) int SDL_ConvertAudio(SDL_AudioCVT * cvt);
1736 # 370 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
1737 extern __attribute__ ((visibility("default"))) void SDL_MixAudio(Uint8 * dst, const Uint8 * src,
1738 Uint32 len, int volume);
1739
1740
1741
1742
1743
1744
1745 extern __attribute__ ((visibility("default"))) void SDL_MixAudioFormat(Uint8 * dst,
1746 const Uint8 * src,
1747 SDL_AudioFormat format,
1748 Uint32 len, int volume);
1749
1750
1751
1752
1753
1754
1755
1756 extern __attribute__ ((visibility("default"))) void SDL_LockAudio(void);
1757 extern __attribute__ ((visibility("default"))) void SDL_LockAudioDevice(SDL_AudioDeviceID dev);
1758 extern __attribute__ ((visibility("default"))) void SDL_UnlockAudio(void);
1759 extern __attribute__ ((visibility("default"))) void SDL_UnlockAudioDevice(SDL_AudioDeviceID dev);
1760
1761
1762
1763
1764 extern __attribute__ ((visibility("default"))) void SDL_CloseAudio(void);
1765 extern __attribute__ ((visibility("default"))) void SDL_CloseAudioDevice(SDL_AudioDeviceID dev);
1766
1767
1768
1769
1770 extern __attribute__ ((visibility("default"))) int SDL_AudioDeviceConnected(SDL_AudioDeviceID dev);
1771 # 412 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
1772 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
1773 # 413 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h" 2
1774 # 80 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2
1775 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cdrom.h" 1
1776 # 35 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cdrom.h"
1777 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
1778 # 36 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cdrom.h" 2
1779 # 56 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cdrom.h"
1780 typedef enum
1781 {
1782 CD_TRAYEMPTY,
1783 CD_STOPPED,
1784 CD_PLAYING,
1785 CD_PAUSED,
1786 CD_ERROR = -1
1787 } CDstatus;
1788
1789
1790
1791
1792 typedef struct SDL_CDtrack
1793 {
1794 Uint8 id;
1795 Uint8 type;
1796 Uint16 unused;
1797 Uint32 length;
1798 Uint32 offset;
1799 } SDL_CDtrack;
1800
1801
1802 typedef struct SDL_CD
1803 {
1804 int id;
1805 CDstatus status;
1806
1807
1808 int numtracks;
1809 int cur_track;
1810 int cur_frame;
1811 SDL_CDtrack track[99 + 1];
1812 } SDL_CD;
1813 # 107 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cdrom.h"
1814 extern __attribute__ ((visibility("default"))) int SDL_CDNumDrives(void);
1815
1816
1817
1818
1819
1820
1821
1822 extern __attribute__ ((visibility("default"))) const char * SDL_CDName(int drive);
1823
1824
1825
1826
1827
1828
1829
1830 extern __attribute__ ((visibility("default"))) SDL_CD * SDL_CDOpen(int drive);
1831
1832
1833
1834
1835
1836 extern __attribute__ ((visibility("default"))) CDstatus SDL_CDStatus(SDL_CD * cdrom);
1837 # 150 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cdrom.h"
1838 extern __attribute__ ((visibility("default"))) int SDL_CDPlayTracks(SDL_CD * cdrom,
1839 int start_track,
1840 int start_frame, int ntracks,
1841 int nframes);
1842
1843
1844
1845
1846 extern __attribute__ ((visibility("default"))) int SDL_CDPlay(SDL_CD * cdrom, int start, int length);
1847
1848
1849 extern __attribute__ ((visibility("default"))) int SDL_CDPause(SDL_CD * cdrom);
1850
1851
1852 extern __attribute__ ((visibility("default"))) int SDL_CDResume(SDL_CD * cdrom);
1853
1854
1855 extern __attribute__ ((visibility("default"))) int SDL_CDStop(SDL_CD * cdrom);
1856
1857
1858 extern __attribute__ ((visibility("default"))) int SDL_CDEject(SDL_CD * cdrom);
1859
1860
1861 extern __attribute__ ((visibility("default"))) void SDL_CDClose(SDL_CD * cdrom);
1862 # 182 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cdrom.h"
1863 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
1864 # 183 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cdrom.h" 2
1865 # 81 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2
1866 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cpuinfo.h" 1
1867 # 34 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cpuinfo.h"
1868 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
1869 # 35 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cpuinfo.h" 2
1870 # 44 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cpuinfo.h"
1871 extern __attribute__ ((visibility("default"))) SDL_bool SDL_HasRDTSC(void);
1872
1873
1874
1875 extern __attribute__ ((visibility("default"))) SDL_bool SDL_HasMMX(void);
1876
1877
1878
1879 extern __attribute__ ((visibility("default"))) SDL_bool SDL_HasMMXExt(void);
1880
1881
1882
1883 extern __attribute__ ((visibility("default"))) SDL_bool SDL_Has3DNow(void);
1884
1885
1886
1887 extern __attribute__ ((visibility("default"))) SDL_bool SDL_Has3DNowExt(void);
1888
1889
1890
1891 extern __attribute__ ((visibility("default"))) SDL_bool SDL_HasSSE(void);
1892
1893
1894
1895 extern __attribute__ ((visibility("default"))) SDL_bool SDL_HasSSE2(void);
1896
1897
1898
1899 extern __attribute__ ((visibility("default"))) SDL_bool SDL_HasAltiVec(void);
1900
1901
1902
1903
1904
1905
1906
1907 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
1908 # 81 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cpuinfo.h" 2
1909 # 82 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2
1910
1911
1912 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h" 1
1913 # 34 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h"
1914 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h" 1
1915 # 33 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
1916 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h" 1
1917 # 32 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
1918 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
1919 # 33 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h" 2
1920 # 44 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
1921 enum
1922 {
1923 SDL_PIXELTYPE_UNKNOWN,
1924 SDL_PIXELTYPE_INDEX1,
1925 SDL_PIXELTYPE_INDEX4,
1926 SDL_PIXELTYPE_INDEX8,
1927 SDL_PIXELTYPE_PACKED8,
1928 SDL_PIXELTYPE_PACKED16,
1929 SDL_PIXELTYPE_PACKED32,
1930 SDL_PIXELTYPE_ARRAYU8,
1931 SDL_PIXELTYPE_ARRAYU16,
1932 SDL_PIXELTYPE_ARRAYU32,
1933 SDL_PIXELTYPE_ARRAYF16,
1934 SDL_PIXELTYPE_ARRAYF32
1935 };
1936
1937 enum
1938 {
1939 SDL_BITMAPORDER_NONE,
1940 SDL_BITMAPORDER_4321,
1941 SDL_BITMAPORDER_1234
1942 };
1943 enum
1944 {
1945 SDL_PACKEDORDER_NONE,
1946 SDL_PACKEDORDER_XRGB,
1947 SDL_PACKEDORDER_RGBX,
1948 SDL_PACKEDORDER_ARGB,
1949 SDL_PACKEDORDER_RGBA,
1950 SDL_PACKEDORDER_XBGR,
1951 SDL_PACKEDORDER_BGRX,
1952 SDL_PACKEDORDER_ABGR,
1953 SDL_PACKEDORDER_BGRA
1954 };
1955 enum
1956 {
1957 SDL_ARRAYORDER_NONE,
1958 SDL_ARRAYORDER_RGB,
1959 SDL_ARRAYORDER_RGBA,
1960 SDL_ARRAYORDER_ARGB,
1961 SDL_ARRAYORDER_BGR,
1962 SDL_ARRAYORDER_BGRA,
1963 SDL_ARRAYORDER_ABGR
1964 };
1965
1966 enum
1967 {
1968 SDL_PACKEDLAYOUT_NONE,
1969 SDL_PACKEDLAYOUT_332,
1970 SDL_PACKEDLAYOUT_4444,
1971 SDL_PACKEDLAYOUT_1555,
1972 SDL_PACKEDLAYOUT_5551,
1973 SDL_PACKEDLAYOUT_565,
1974 SDL_PACKEDLAYOUT_8888,
1975 SDL_PACKEDLAYOUT_2101010,
1976 SDL_PACKEDLAYOUT_1010102
1977 };
1978 # 123 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
1979 enum
1980 {
1981 SDL_PIXELFORMAT_UNKNOWN,
1982 SDL_PIXELFORMAT_INDEX1LSB =
1983 ((1 << 31) | ((SDL_PIXELTYPE_INDEX1) << 24) | ((SDL_BITMAPORDER_1234) << 20) | ((0) << 16) | ((1) << 8) | ((0) << 0)),
1984
1985 SDL_PIXELFORMAT_INDEX1MSB =
1986 ((1 << 31) | ((SDL_PIXELTYPE_INDEX1) << 24) | ((SDL_BITMAPORDER_4321) << 20) | ((0) << 16) | ((1) << 8) | ((0) << 0)),
1987
1988 SDL_PIXELFORMAT_INDEX4LSB =
1989 ((1 << 31) | ((SDL_PIXELTYPE_INDEX4) << 24) | ((SDL_BITMAPORDER_1234) << 20) | ((0) << 16) | ((2) << 8) | ((0) << 0)),
1990
1991 SDL_PIXELFORMAT_INDEX4MSB =
1992 ((1 << 31) | ((SDL_PIXELTYPE_INDEX4) << 24) | ((SDL_BITMAPORDER_4321) << 20) | ((0) << 16) | ((2) << 8) | ((0) << 0)),
1993
1994 SDL_PIXELFORMAT_INDEX8 =
1995 ((1 << 31) | ((SDL_PIXELTYPE_INDEX8) << 24) | ((0) << 20) | ((0) << 16) | ((8) << 8) | ((1) << 0)),
1996 SDL_PIXELFORMAT_RGB332 =
1997 ((1 << 31) | ((SDL_PIXELTYPE_PACKED8) << 24) | ((SDL_PACKEDORDER_XRGB) << 20) | ((SDL_PACKEDLAYOUT_332) << 16) | ((8) << 8) | ((1) << 0)),
1998
1999 SDL_PIXELFORMAT_RGB444 =
2000 ((1 << 31) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_XRGB) << 20) | ((SDL_PACKEDLAYOUT_4444) << 16) | ((12) << 8) | ((2) << 0)),
2001
2002 SDL_PIXELFORMAT_RGB555 =
2003 ((1 << 31) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_XRGB) << 20) | ((SDL_PACKEDLAYOUT_1555) << 16) | ((15) << 8) | ((2) << 0)),
2004
2005 SDL_PIXELFORMAT_BGR555 =
2006 ((1 << 31) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_XBGR) << 20) | ((SDL_PACKEDLAYOUT_1555) << 16) | ((15) << 8) | ((2) << 0)),
2007
2008 SDL_PIXELFORMAT_ARGB4444 =
2009 ((1 << 31) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_ARGB) << 20) | ((SDL_PACKEDLAYOUT_4444) << 16) | ((16) << 8) | ((2) << 0)),
2010
2011 SDL_PIXELFORMAT_ARGB1555 =
2012 ((1 << 31) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_ARGB) << 20) | ((SDL_PACKEDLAYOUT_1555) << 16) | ((16) << 8) | ((2) << 0)),
2013
2014 SDL_PIXELFORMAT_ABGR1555 =
2015 ((1 << 31) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_ABGR) << 20) | ((SDL_PACKEDLAYOUT_1555) << 16) | ((16) << 8) | ((2) << 0)),
2016
2017 SDL_PIXELFORMAT_RGB565 =
2018 ((1 << 31) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_XRGB) << 20) | ((SDL_PACKEDLAYOUT_565) << 16) | ((16) << 8) | ((2) << 0)),
2019
2020 SDL_PIXELFORMAT_RGB24 =
2021 ((1 << 31) | ((SDL_PIXELTYPE_ARRAYU8) << 24) | ((SDL_ARRAYORDER_RGB) << 20) | ((0) << 16) | ((24) << 8) | ((3) << 0)),
2022
2023 SDL_PIXELFORMAT_BGR24 =
2024 ((1 << 31) | ((SDL_PIXELTYPE_ARRAYU8) << 24) | ((SDL_ARRAYORDER_BGR) << 20) | ((0) << 16) | ((24) << 8) | ((3) << 0)),
2025
2026 SDL_PIXELFORMAT_RGB888 =
2027 ((1 << 31) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_XRGB) << 20) | ((SDL_PACKEDLAYOUT_8888) << 16) | ((24) << 8) | ((4) << 0)),
2028
2029 SDL_PIXELFORMAT_BGR888 =
2030 ((1 << 31) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_XBGR) << 20) | ((SDL_PACKEDLAYOUT_8888) << 16) | ((24) << 8) | ((4) << 0)),
2031
2032 SDL_PIXELFORMAT_ARGB8888 =
2033 ((1 << 31) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_ARGB) << 20) | ((SDL_PACKEDLAYOUT_8888) << 16) | ((32) << 8) | ((4) << 0)),
2034
2035 SDL_PIXELFORMAT_RGBA8888 =
2036 ((1 << 31) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_RGBA) << 20) | ((SDL_PACKEDLAYOUT_8888) << 16) | ((32) << 8) | ((4) << 0)),
2037
2038 SDL_PIXELFORMAT_ABGR8888 =
2039 ((1 << 31) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_ABGR) << 20) | ((SDL_PACKEDLAYOUT_8888) << 16) | ((32) << 8) | ((4) << 0)),
2040
2041 SDL_PIXELFORMAT_BGRA8888 =
2042 ((1 << 31) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_BGRA) << 20) | ((SDL_PACKEDLAYOUT_8888) << 16) | ((32) << 8) | ((4) << 0)),
2043
2044 SDL_PIXELFORMAT_ARGB2101010 =
2045 ((1 << 31) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_ARGB) << 20) | ((SDL_PACKEDLAYOUT_2101010) << 16) | ((32) << 8) | ((4) << 0)),
2046
2047
2048 SDL_PIXELFORMAT_YV12 =
2049 (('Y') | (('V') << 8) | (('1') << 16) | (('2') << 24)),
2050 SDL_PIXELFORMAT_IYUV =
2051 (('I') | (('Y') << 8) | (('U') << 16) | (('V') << 24)),
2052 SDL_PIXELFORMAT_YUY2 =
2053 (('Y') | (('U') << 8) | (('Y') << 16) | (('2') << 24)),
2054 SDL_PIXELFORMAT_UYVY =
2055 (('U') | (('Y') << 8) | (('V') << 16) | (('Y') << 24)),
2056 SDL_PIXELFORMAT_YVYU =
2057 (('Y') | (('V') << 8) | (('Y') << 16) | (('U') << 24))
2058 };
2059
2060 typedef struct SDL_Color
2061 {
2062 Uint8 r;
2063 Uint8 g;
2064 Uint8 b;
2065 Uint8 unused;
2066 } SDL_Color;
2067
2068
2069 typedef struct SDL_Palette SDL_Palette;
2070 typedef int (*SDL_PaletteChangedFunc) (void *userdata, SDL_Palette * palette);
2071
2072 typedef struct SDL_PaletteWatch
2073 {
2074 SDL_PaletteChangedFunc callback;
2075 void *userdata;
2076 struct SDL_PaletteWatch *next;
2077 } SDL_PaletteWatch;
2078
2079 struct SDL_Palette
2080 {
2081 int ncolors;
2082 SDL_Color *colors;
2083
2084 int refcount;
2085 SDL_PaletteWatch *watch;
2086 };
2087
2088
2089 typedef struct SDL_PixelFormat
2090 {
2091 SDL_Palette *palette;
2092 Uint8 BitsPerPixel;
2093 Uint8 BytesPerPixel;
2094 Uint8 Rloss;
2095 Uint8 Gloss;
2096 Uint8 Bloss;
2097 Uint8 Aloss;
2098 Uint8 Rshift;
2099 Uint8 Gshift;
2100 Uint8 Bshift;
2101 Uint8 Ashift;
2102 Uint32 Rmask;
2103 Uint32 Gmask;
2104 Uint32 Bmask;
2105 Uint32 Amask;
2106 } SDL_PixelFormat;
2107 # 261 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
2108 extern __attribute__ ((visibility("default"))) SDL_bool SDL_PixelFormatEnumToMasks(Uint32 format,
2109 int *bpp,
2110 Uint32 * Rmask,
2111 Uint32 * Gmask,
2112 Uint32 * Bmask,
2113 Uint32 * Amask);
2114 # 277 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
2115 extern __attribute__ ((visibility("default"))) Uint32 SDL_MasksToPixelFormatEnum(int bpp,
2116 Uint32 Rmask,
2117 Uint32 Gmask,
2118 Uint32 Bmask,
2119 Uint32 Amask);
2120 # 294 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
2121 extern __attribute__ ((visibility("default"))) SDL_Palette * SDL_AllocPalette(int ncolors);
2122 # 303 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
2123 extern __attribute__ ((visibility("default"))) int SDL_AddPaletteWatch(SDL_Palette * palette,
2124 SDL_PaletteChangedFunc
2125 callback, void *userdata);
2126 # 314 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
2127 extern __attribute__ ((visibility("default"))) void SDL_DelPaletteWatch(SDL_Palette * palette,
2128 SDL_PaletteChangedFunc
2129 callback, void *userdata);
2130 # 330 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
2131 extern __attribute__ ((visibility("default"))) int SDL_SetPaletteColors(SDL_Palette * palette,
2132 const SDL_Color * colors,
2133 int firstcolor, int ncolors);
2134 # 341 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
2135 extern __attribute__ ((visibility("default"))) void SDL_FreePalette(SDL_Palette * palette);
2136 # 351 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
2137 extern __attribute__ ((visibility("default"))) Uint32 SDL_MapRGB(const SDL_PixelFormat * format,
2138 Uint8 r, Uint8 g, Uint8 b);
2139 # 362 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
2140 extern __attribute__ ((visibility("default"))) Uint32 SDL_MapRGBA(const SDL_PixelFormat * format,
2141 Uint8 r, Uint8 g, Uint8 b,
2142 Uint8 a);
2143 # 374 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
2144 extern __attribute__ ((visibility("default"))) void SDL_GetRGB(Uint32 pixel,
2145 const SDL_PixelFormat * format,
2146 Uint8 * r, Uint8 * g, Uint8 * b);
2147 # 386 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
2148 extern __attribute__ ((visibility("default"))) void SDL_GetRGBA(Uint32 pixel,
2149 const SDL_PixelFormat * format,
2150 Uint8 * r, Uint8 * g, Uint8 * b,
2151 Uint8 * a);
2152
2153
2154
2155
2156
2157
2158
2159 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
2160 # 398 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h" 2
2161 # 34 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h" 2
2162 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rect.h" 1
2163 # 37 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rect.h"
2164 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
2165 # 38 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rect.h" 2
2166 # 56 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rect.h"
2167 typedef struct SDL_Rect
2168 {
2169 int x, y;
2170 int w, h;
2171 } SDL_Rect;
2172 # 84 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rect.h"
2173 extern __attribute__ ((visibility("default"))) SDL_bool SDL_HasIntersection(const SDL_Rect * A,
2174 const SDL_Rect * B);
2175 # 94 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rect.h"
2176 extern __attribute__ ((visibility("default"))) SDL_bool SDL_IntersectRect(const SDL_Rect * A,
2177 const SDL_Rect * B,
2178 SDL_Rect * result);
2179
2180
2181
2182
2183
2184
2185 extern __attribute__ ((visibility("default"))) void SDL_UnionRect(const SDL_Rect * A,
2186 const SDL_Rect * B,
2187 SDL_Rect * result);
2188
2189
2190
2191
2192
2193
2194
2195 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
2196 # 114 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rect.h" 2
2197 # 35 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h" 2
2198 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h" 1
2199 # 37 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2200 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
2201 # 38 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h" 2
2202 # 61 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2203 typedef struct SDL_Surface
2204 {
2205 Uint32 flags;
2206 SDL_PixelFormat *format;
2207 int w, h;
2208 int pitch;
2209 void *pixels;
2210
2211
2212 void *userdata;
2213
2214
2215 int locked;
2216 void *lock_data;
2217
2218
2219 SDL_Rect clip_rect;
2220
2221
2222 struct SDL_BlitMap *map;
2223
2224
2225 unsigned int format_version;
2226
2227
2228 int refcount;
2229 } SDL_Surface;
2230
2231
2232
2233
2234
2235
2236 typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
2237 struct SDL_Surface * dst, SDL_Rect * dstrect);
2238 # 108 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2239 extern __attribute__ ((visibility("default"))) SDL_Surface * SDL_CreateRGBSurface
2240 (Uint32 flags, int width, int height, int depth,
2241 Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
2242 extern __attribute__ ((visibility("default"))) SDL_Surface * SDL_CreateRGBSurfaceFrom(void *pixels,
2243 int width,
2244 int height,
2245 int depth,
2246 int pitch,
2247 Uint32 Rmask,
2248 Uint32 Gmask,
2249 Uint32 Bmask,
2250 Uint32 Amask);
2251 extern __attribute__ ((visibility("default"))) void SDL_FreeSurface(SDL_Surface * surface);
2252 # 131 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2253 extern __attribute__ ((visibility("default"))) int SDL_SetSurfacePalette(SDL_Surface * surface,
2254 SDL_Palette * palette);
2255 # 150 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2256 extern __attribute__ ((visibility("default"))) int SDL_LockSurface(SDL_Surface * surface);
2257 extern __attribute__ ((visibility("default"))) void SDL_UnlockSurface(SDL_Surface * surface);
2258
2259
2260
2261
2262
2263
2264
2265 extern __attribute__ ((visibility("default"))) SDL_Surface * SDL_LoadBMP_RW(SDL_RWops * src,
2266 int freesrc);
2267 # 170 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2268 extern __attribute__ ((visibility("default"))) int SDL_SaveBMP_RW
2269 (SDL_Surface * surface, SDL_RWops * dst, int freedst);
2270 # 187 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2271 extern __attribute__ ((visibility("default"))) int SDL_SetSurfaceRLE(SDL_Surface * surface,
2272 int flag);
2273 # 201 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2274 extern __attribute__ ((visibility("default"))) int SDL_SetColorKey(SDL_Surface * surface,
2275 Uint32 flag, Uint32 key);
2276 # 218 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2277 extern __attribute__ ((visibility("default"))) int SDL_SetSurfaceColorMod(SDL_Surface * surface,
2278 Uint8 r, Uint8 g, Uint8 b);
2279 # 236 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2280 extern __attribute__ ((visibility("default"))) int SDL_GetSurfaceColorMod(SDL_Surface * surface,
2281 Uint8 * r, Uint8 * g,
2282 Uint8 * b);
2283 # 252 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2284 extern __attribute__ ((visibility("default"))) int SDL_SetSurfaceAlphaMod(SDL_Surface * surface,
2285 Uint8 alpha);
2286 # 267 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2287 extern __attribute__ ((visibility("default"))) int SDL_GetSurfaceAlphaMod(SDL_Surface * surface,
2288 Uint8 * alpha);
2289 # 282 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2290 extern __attribute__ ((visibility("default"))) int SDL_SetSurfaceBlendMode(SDL_Surface * surface,
2291 int blendMode);
2292 # 297 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2293 extern __attribute__ ((visibility("default"))) int SDL_GetSurfaceBlendMode(SDL_Surface * surface,
2294 int *blendMode);
2295 # 314 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2296 extern __attribute__ ((visibility("default"))) int SDL_SetSurfaceScaleMode(SDL_Surface * surface,
2297 int scaleMode);
2298 # 329 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2299 extern __attribute__ ((visibility("default"))) int SDL_GetSurfaceScaleMode(SDL_Surface * surface,
2300 int *scaleMode);
2301 # 344 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2302 extern __attribute__ ((visibility("default"))) SDL_bool SDL_SetClipRect(SDL_Surface * surface,
2303 const SDL_Rect * rect);
2304
2305
2306
2307
2308
2309
2310 extern __attribute__ ((visibility("default"))) void SDL_GetClipRect(SDL_Surface * surface,
2311 SDL_Rect * rect);
2312 # 367 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2313 extern __attribute__ ((visibility("default"))) SDL_Surface * SDL_ConvertSurface
2314 (SDL_Surface * src, SDL_PixelFormat * fmt, Uint32 flags);
2315 # 379 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2316 extern __attribute__ ((visibility("default"))) int SDL_FillRect
2317 (SDL_Surface * dst, SDL_Rect * dstrect, Uint32 color);
2318 # 456 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2319 extern __attribute__ ((visibility("default"))) int SDL_UpperBlit
2320 (SDL_Surface * src, SDL_Rect * srcrect,
2321 SDL_Surface * dst, SDL_Rect * dstrect);
2322
2323
2324
2325 extern __attribute__ ((visibility("default"))) int SDL_LowerBlit
2326 (SDL_Surface * src, SDL_Rect * srcrect,
2327 SDL_Surface * dst, SDL_Rect * dstrect);
2328 # 473 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
2329 extern __attribute__ ((visibility("default"))) int SDL_SoftStretch(SDL_Surface * src,
2330 SDL_Rect * srcrect,
2331 SDL_Surface * dst,
2332 SDL_Rect * dstrect);
2333
2334
2335
2336
2337
2338
2339
2340 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
2341 # 485 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h" 2
2342 # 36 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h" 2
2343
2344 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
2345 # 38 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h" 2
2346 # 57 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2347 typedef struct
2348 {
2349 Uint32 format;
2350 int w;
2351 int h;
2352 int refresh_rate;
2353 void *driverdata;
2354 } SDL_DisplayMode;
2355 # 94 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2356 typedef Uint32 SDL_WindowID;
2357 # 103 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2358 typedef enum
2359 {
2360 SDL_WINDOW_FULLSCREEN = 0x00000001,
2361 SDL_WINDOW_OPENGL = 0x00000002,
2362 SDL_WINDOW_SHOWN = 0x00000004,
2363 SDL_WINDOW_BORDERLESS = 0x00000008,
2364 SDL_WINDOW_RESIZABLE = 0x00000010,
2365 SDL_WINDOW_MINIMIZED = 0x00000020,
2366 SDL_WINDOW_MAXIMIZED = 0x00000040,
2367 SDL_WINDOW_INPUT_GRABBED = 0x00000100,
2368 SDL_WINDOW_INPUT_FOCUS = 0x00000200,
2369 SDL_WINDOW_MOUSE_FOCUS = 0x00000400
2370 } SDL_WindowFlags;
2371 # 133 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2372 typedef enum
2373 {
2374 SDL_WINDOWEVENT_NONE,
2375 SDL_WINDOWEVENT_SHOWN,
2376 SDL_WINDOWEVENT_HIDDEN,
2377 SDL_WINDOWEVENT_EXPOSED,
2378 SDL_WINDOWEVENT_MOVED,
2379 SDL_WINDOWEVENT_RESIZED,
2380 SDL_WINDOWEVENT_MINIMIZED,
2381 SDL_WINDOWEVENT_MAXIMIZED,
2382 SDL_WINDOWEVENT_RESTORED,
2383 SDL_WINDOWEVENT_ENTER,
2384 SDL_WINDOWEVENT_LEAVE,
2385 SDL_WINDOWEVENT_FOCUS_GAINED,
2386 SDL_WINDOWEVENT_FOCUS_LOST,
2387 SDL_WINDOWEVENT_CLOSE
2388 } SDL_WindowEventID;
2389
2390
2391
2392
2393
2394
2395 typedef enum
2396 {
2397 SDL_RENDERER_SINGLEBUFFER = 0x00000001,
2398 SDL_RENDERER_PRESENTCOPY = 0x00000002,
2399 SDL_RENDERER_PRESENTFLIP2 = 0x00000004,
2400 SDL_RENDERER_PRESENTFLIP3 = 0x00000008,
2401 SDL_RENDERER_PRESENTDISCARD = 0x00000010,
2402 SDL_RENDERER_PRESENTVSYNC = 0x00000020,
2403 SDL_RENDERER_ACCELERATED = 0x00000040
2404 } SDL_RendererFlags;
2405
2406
2407
2408
2409
2410
2411 typedef struct SDL_RendererInfo
2412 {
2413 const char *name;
2414 Uint32 flags;
2415 Uint32 mod_modes;
2416 Uint32 blend_modes;
2417 Uint32 scale_modes;
2418 Uint32 num_texture_formats;
2419 Uint32 texture_formats[20];
2420 int max_texture_width;
2421 int max_texture_height;
2422 } SDL_RendererInfo;
2423
2424
2425
2426
2427
2428
2429 typedef enum
2430 {
2431 SDL_TEXTUREACCESS_STATIC,
2432 SDL_TEXTUREACCESS_STREAMING
2433 } SDL_TextureAccess;
2434
2435
2436
2437
2438
2439
2440 typedef enum
2441 {
2442 SDL_TEXTUREMODULATE_NONE = 0x00000000,
2443 SDL_TEXTUREMODULATE_COLOR = 0x00000001,
2444 SDL_TEXTUREMODULATE_ALPHA = 0x00000002
2445 } SDL_TextureModulate;
2446
2447
2448
2449
2450
2451
2452 typedef enum
2453 {
2454 SDL_TEXTUREBLENDMODE_NONE = 0x00000000,
2455 SDL_TEXTUREBLENDMODE_MASK = 0x00000001,
2456 SDL_TEXTUREBLENDMODE_BLEND = 0x00000002,
2457 SDL_TEXTUREBLENDMODE_ADD = 0x00000004,
2458 SDL_TEXTUREBLENDMODE_MOD = 0x00000008
2459 } SDL_TextureBlendMode;
2460
2461
2462
2463
2464
2465
2466 typedef enum
2467 {
2468 SDL_TEXTURESCALEMODE_NONE = 0x00000000,
2469 SDL_TEXTURESCALEMODE_FAST = 0x00000001,
2470 SDL_TEXTURESCALEMODE_SLOW = 0x00000002,
2471 SDL_TEXTURESCALEMODE_BEST = 0x00000004
2472 } SDL_TextureScaleMode;
2473
2474
2475
2476
2477
2478
2479 typedef Uint32 SDL_TextureID;
2480
2481
2482
2483
2484
2485
2486 typedef void *SDL_GLContext;
2487
2488
2489
2490
2491
2492
2493 typedef enum
2494 {
2495 SDL_GL_RED_SIZE,
2496 SDL_GL_GREEN_SIZE,
2497 SDL_GL_BLUE_SIZE,
2498 SDL_GL_ALPHA_SIZE,
2499 SDL_GL_BUFFER_SIZE,
2500 SDL_GL_DOUBLEBUFFER,
2501 SDL_GL_DEPTH_SIZE,
2502 SDL_GL_STENCIL_SIZE,
2503 SDL_GL_ACCUM_RED_SIZE,
2504 SDL_GL_ACCUM_GREEN_SIZE,
2505 SDL_GL_ACCUM_BLUE_SIZE,
2506 SDL_GL_ACCUM_ALPHA_SIZE,
2507 SDL_GL_STEREO,
2508 SDL_GL_MULTISAMPLEBUFFERS,
2509 SDL_GL_MULTISAMPLESAMPLES,
2510 SDL_GL_ACCELERATED_VISUAL
2511 } SDL_GLattr;
2512 # 284 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2513 extern __attribute__ ((visibility("default"))) int SDL_GetNumVideoDrivers(void);
2514 # 296 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2515 extern __attribute__ ((visibility("default"))) const char * SDL_GetVideoDriver(int index);
2516 # 314 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2517 extern __attribute__ ((visibility("default"))) int SDL_VideoInit(const char *driver_name,
2518 Uint32 flags);
2519 # 326 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2520 extern __attribute__ ((visibility("default"))) void SDL_VideoQuit(void);
2521 # 339 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2522 extern __attribute__ ((visibility("default"))) const char * SDL_GetCurrentVideoDriver(void);
2523 # 348 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2524 extern __attribute__ ((visibility("default"))) int SDL_GetNumVideoDisplays(void);
2525 # 360 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2526 extern __attribute__ ((visibility("default"))) int SDL_SelectVideoDisplay(int index);
2527 # 372 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2528 extern __attribute__ ((visibility("default"))) int SDL_GetCurrentVideoDisplay(void);
2529 # 381 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2530 extern __attribute__ ((visibility("default"))) int SDL_GetNumDisplayModes(void);
2531 # 396 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2532 extern __attribute__ ((visibility("default"))) int SDL_GetDisplayMode(int index,
2533 SDL_DisplayMode * mode);
2534
2535
2536
2537
2538
2539
2540 extern __attribute__ ((visibility("default"))) int SDL_GetDesktopDisplayMode(SDL_DisplayMode * mode);
2541
2542
2543
2544
2545
2546
2547 extern __attribute__ ((visibility("default"))) int SDL_GetCurrentDisplayMode(SDL_DisplayMode * mode);
2548 # 428 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2549 extern __attribute__ ((visibility("default"))) SDL_DisplayMode * SDL_GetClosestDisplayMode(const
2550 SDL_DisplayMode
2551 * mode,
2552 SDL_DisplayMode
2553 * closest);
2554 # 446 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2555 extern __attribute__ ((visibility("default"))) int SDL_SetFullscreenDisplayMode(const SDL_DisplayMode
2556 * mode);
2557
2558
2559
2560
2561
2562
2563
2564 extern __attribute__ ((visibility("default"))) int SDL_GetFullscreenDisplayMode(SDL_DisplayMode *
2565 mode);
2566 # 465 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2567 extern __attribute__ ((visibility("default"))) int SDL_SetDisplayPalette(const SDL_Color * colors,
2568 int firstcolor,
2569 int ncolors);
2570 # 476 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2571 extern __attribute__ ((visibility("default"))) int SDL_GetDisplayPalette(SDL_Color * colors,
2572 int firstcolor,
2573 int ncolors);
2574 # 489 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2575 extern __attribute__ ((visibility("default"))) int SDL_SetGamma(float red, float green, float blue);
2576 # 510 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2577 extern __attribute__ ((visibility("default"))) int SDL_SetGammaRamp(const Uint16 * red,
2578 const Uint16 * green,
2579 const Uint16 * blue);
2580 # 527 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2581 extern __attribute__ ((visibility("default"))) int SDL_GetGammaRamp(Uint16 * red, Uint16 * green,
2582 Uint16 * blue);
2583 # 547 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2584 extern __attribute__ ((visibility("default"))) SDL_WindowID SDL_CreateWindow(const char *title,
2585 int x, int y, int w,
2586 int h, Uint32 flags);
2587 # 564 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2588 extern __attribute__ ((visibility("default"))) SDL_WindowID SDL_CreateWindowFrom(const void *data);
2589
2590
2591
2592
2593
2594
2595 extern __attribute__ ((visibility("default"))) Uint32 SDL_GetWindowFlags(SDL_WindowID windowID);
2596 # 580 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2597 extern __attribute__ ((visibility("default"))) void SDL_SetWindowTitle(SDL_WindowID windowID,
2598 const char *title);
2599 # 590 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2600 extern __attribute__ ((visibility("default"))) const char * SDL_GetWindowTitle(SDL_WindowID windowID);
2601 # 601 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2602 extern __attribute__ ((visibility("default"))) void SDL_SetWindowIcon(SDL_Surface * icon);
2603 # 610 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2604 extern __attribute__ ((visibility("default"))) void SDL_SetWindowData(SDL_WindowID windowID,
2605 void *userdata);
2606 # 620 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2607 extern __attribute__ ((visibility("default"))) void * SDL_GetWindowData(SDL_WindowID windowID);
2608 # 635 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2609 extern __attribute__ ((visibility("default"))) void SDL_SetWindowPosition(SDL_WindowID windowID,
2610 int x, int y);
2611 # 645 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2612 extern __attribute__ ((visibility("default"))) void SDL_GetWindowPosition(SDL_WindowID windowID,
2613 int *x, int *y);
2614 # 658 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2615 extern __attribute__ ((visibility("default"))) void SDL_SetWindowSize(SDL_WindowID windowID, int w,
2616 int h);
2617 # 668 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2618 extern __attribute__ ((visibility("default"))) void SDL_GetWindowSize(SDL_WindowID windowID, int *w,
2619 int *h);
2620 # 678 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2621 extern __attribute__ ((visibility("default"))) void SDL_ShowWindow(SDL_WindowID windowID);
2622 # 687 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2623 extern __attribute__ ((visibility("default"))) void SDL_HideWindow(SDL_WindowID windowID);
2624
2625
2626
2627
2628
2629
2630 extern __attribute__ ((visibility("default"))) void SDL_RaiseWindow(SDL_WindowID windowID);
2631 # 703 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2632 extern __attribute__ ((visibility("default"))) void SDL_MaximizeWindow(SDL_WindowID windowID);
2633 # 712 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2634 extern __attribute__ ((visibility("default"))) void SDL_MinimizeWindow(SDL_WindowID windowID);
2635 # 722 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2636 extern __attribute__ ((visibility("default"))) void SDL_RestoreWindow(SDL_WindowID windowID);
2637 # 733 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2638 extern __attribute__ ((visibility("default"))) int SDL_SetWindowFullscreen(SDL_WindowID windowID,
2639 int fullscreen);
2640 # 745 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2641 extern __attribute__ ((visibility("default"))) void SDL_SetWindowGrab(SDL_WindowID windowID,
2642 int mode);
2643 # 757 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2644 extern __attribute__ ((visibility("default"))) int SDL_GetWindowGrab(SDL_WindowID windowID);
2645 # 766 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2646 struct SDL_SysWMinfo;
2647 extern __attribute__ ((visibility("default"))) SDL_bool SDL_GetWindowWMInfo(SDL_WindowID windowID,
2648 struct SDL_SysWMinfo
2649 *info);
2650
2651
2652
2653
2654
2655
2656 extern __attribute__ ((visibility("default"))) void SDL_DestroyWindow(SDL_WindowID windowID);
2657 # 790 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2658 extern __attribute__ ((visibility("default"))) int SDL_GetNumRenderDrivers(void);
2659 # 804 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2660 extern __attribute__ ((visibility("default"))) int SDL_GetRenderDriverInfo(int index,
2661 SDL_RendererInfo * info);
2662 # 823 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2663 extern __attribute__ ((visibility("default"))) int SDL_CreateRenderer(SDL_WindowID windowID,
2664 int index, Uint32 flags);
2665 # 834 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2666 extern __attribute__ ((visibility("default"))) int SDL_SelectRenderer(SDL_WindowID windowID);
2667
2668
2669
2670
2671
2672
2673 extern __attribute__ ((visibility("default"))) int SDL_GetRendererInfo(SDL_RendererInfo * info);
2674 # 858 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2675 extern __attribute__ ((visibility("default"))) SDL_TextureID SDL_CreateTexture(Uint32 format,
2676 int access, int w,
2677 int h);
2678 # 877 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2679 extern __attribute__ ((visibility("default"))) SDL_TextureID SDL_CreateTextureFromSurface(Uint32
2680 format,
2681 SDL_Surface
2682 * surface);
2683 # 895 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2684 extern __attribute__ ((visibility("default"))) int SDL_QueryTexture(SDL_TextureID textureID,
2685 Uint32 * format, int *access,
2686 int *w, int *h);
2687 # 910 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2688 extern __attribute__ ((visibility("default"))) int SDL_QueryTexturePixels(SDL_TextureID textureID,
2689 void **pixels, int *pitch);
2690 # 925 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2691 extern __attribute__ ((visibility("default"))) int SDL_SetTexturePalette(SDL_TextureID textureID,
2692 const SDL_Color * colors,
2693 int firstcolor,
2694 int ncolors);
2695 # 942 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2696 extern __attribute__ ((visibility("default"))) int SDL_GetTexturePalette(SDL_TextureID textureID,
2697 SDL_Color * colors,
2698 int firstcolor,
2699 int ncolors);
2700 # 961 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2701 extern __attribute__ ((visibility("default"))) int SDL_SetTextureColorMod(SDL_TextureID textureID,
2702 Uint8 r, Uint8 g, Uint8 b);
2703 # 979 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2704 extern __attribute__ ((visibility("default"))) int SDL_GetTextureColorMod(SDL_TextureID textureID,
2705 Uint8 * r, Uint8 * g,
2706 Uint8 * b);
2707 # 995 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2708 extern __attribute__ ((visibility("default"))) int SDL_SetTextureAlphaMod(SDL_TextureID textureID,
2709 Uint8 alpha);
2710 # 1010 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2711 extern __attribute__ ((visibility("default"))) int SDL_GetTextureAlphaMod(SDL_TextureID textureID,
2712 Uint8 * alpha);
2713 # 1027 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2714 extern __attribute__ ((visibility("default"))) int SDL_SetTextureBlendMode(SDL_TextureID textureID,
2715 int blendMode);
2716 # 1042 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2717 extern __attribute__ ((visibility("default"))) int SDL_GetTextureBlendMode(SDL_TextureID textureID,
2718 int *blendMode);
2719 # 1059 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2720 extern __attribute__ ((visibility("default"))) int SDL_SetTextureScaleMode(SDL_TextureID textureID,
2721 int scaleMode);
2722 # 1074 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2723 extern __attribute__ ((visibility("default"))) int SDL_GetTextureScaleMode(SDL_TextureID textureID,
2724 int *scaleMode);
2725 # 1091 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2726 extern __attribute__ ((visibility("default"))) int SDL_UpdateTexture(SDL_TextureID textureID,
2727 const SDL_Rect * rect,
2728 const void *pixels, int pitch);
2729 # 1111 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2730 extern __attribute__ ((visibility("default"))) int SDL_LockTexture(SDL_TextureID textureID,
2731 const SDL_Rect * rect,
2732 int markDirty, void **pixels,
2733 int *pitch);
2734 # 1124 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2735 extern __attribute__ ((visibility("default"))) void SDL_UnlockTexture(SDL_TextureID textureID);
2736 # 1138 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2737 extern __attribute__ ((visibility("default"))) void SDL_DirtyTexture(SDL_TextureID textureID,
2738 int numrects,
2739 const SDL_Rect * rects);
2740 # 1155 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2741 extern __attribute__ ((visibility("default"))) int SDL_RenderFill(Uint8 r, Uint8 g, Uint8 b, Uint8 a,
2742 const SDL_Rect * rect);
2743 # 1169 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2744 extern __attribute__ ((visibility("default"))) int SDL_RenderCopy(SDL_TextureID textureID,
2745 const SDL_Rect * srcrect,
2746 const SDL_Rect * dstrect);
2747 # 1186 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2748 extern __attribute__ ((visibility("default"))) int SDL_RenderReadPixels(const SDL_Rect * rect,
2749 void *pixels, int pitch);
2750 # 1202 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2751 extern __attribute__ ((visibility("default"))) int SDL_RenderWritePixels(const SDL_Rect * rect,
2752 const void *pixels,
2753 int pitch);
2754
2755
2756
2757
2758
2759
2760 extern __attribute__ ((visibility("default"))) void SDL_RenderPresent(void);
2761 # 1221 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2762 extern __attribute__ ((visibility("default"))) void SDL_DestroyTexture(SDL_TextureID textureID);
2763 # 1231 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2764 extern __attribute__ ((visibility("default"))) void SDL_DestroyRenderer(SDL_WindowID windowID);
2765 # 1256 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2766 extern __attribute__ ((visibility("default"))) int SDL_GL_LoadLibrary(const char *path);
2767
2768
2769
2770
2771
2772
2773 extern __attribute__ ((visibility("default"))) void * SDL_GL_GetProcAddress(const char *proc);
2774
2775
2776
2777
2778
2779
2780 extern __attribute__ ((visibility("default"))) SDL_bool SDL_GL_ExtensionSupported(const char
2781 *extension);
2782
2783
2784
2785
2786
2787
2788 extern __attribute__ ((visibility("default"))) int SDL_GL_SetAttribute(SDL_GLattr attr, int value);
2789
2790
2791
2792
2793
2794
2795 extern __attribute__ ((visibility("default"))) int SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
2796 # 1294 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2797 extern __attribute__ ((visibility("default"))) SDL_GLContext SDL_GL_CreateContext(SDL_WindowID
2798 windowID);
2799 # 1304 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2800 extern __attribute__ ((visibility("default"))) int SDL_GL_MakeCurrent(SDL_WindowID windowID,
2801 SDL_GLContext context);
2802 # 1318 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2803 extern __attribute__ ((visibility("default"))) int SDL_GL_SetSwapInterval(int interval);
2804 # 1329 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2805 extern __attribute__ ((visibility("default"))) int SDL_GL_GetSwapInterval(void);
2806
2807
2808
2809
2810
2811
2812 extern __attribute__ ((visibility("default"))) void SDL_GL_SwapWindow(SDL_WindowID windowID);
2813 # 1345 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2814 extern __attribute__ ((visibility("default"))) void SDL_GL_DeleteContext(SDL_GLContext context);
2815 # 1354 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
2816 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
2817 # 1355 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h" 2
2818 # 35 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h" 2
2819 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h" 1
2820 # 34 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
2821 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keysym.h" 1
2822 # 31 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keysym.h"
2823 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_scancode.h" 1
2824 # 44 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_scancode.h"
2825 typedef enum
2826 {
2827 SDL_SCANCODE_UNKNOWN = 0,
2828
2829
2830
2831 SDL_SCANCODE_A = 4,
2832 SDL_SCANCODE_B = 5,
2833 SDL_SCANCODE_C = 6,
2834 SDL_SCANCODE_D = 7,
2835 SDL_SCANCODE_E = 8,
2836 SDL_SCANCODE_F = 9,
2837 SDL_SCANCODE_G = 10,
2838 SDL_SCANCODE_H = 11,
2839 SDL_SCANCODE_I = 12,
2840 SDL_SCANCODE_J = 13,
2841 SDL_SCANCODE_K = 14,
2842 SDL_SCANCODE_L = 15,
2843 SDL_SCANCODE_M = 16,
2844 SDL_SCANCODE_N = 17,
2845 SDL_SCANCODE_O = 18,
2846 SDL_SCANCODE_P = 19,
2847 SDL_SCANCODE_Q = 20,
2848 SDL_SCANCODE_R = 21,
2849 SDL_SCANCODE_S = 22,
2850 SDL_SCANCODE_T = 23,
2851 SDL_SCANCODE_U = 24,
2852 SDL_SCANCODE_V = 25,
2853 SDL_SCANCODE_W = 26,
2854 SDL_SCANCODE_X = 27,
2855 SDL_SCANCODE_Y = 28,
2856 SDL_SCANCODE_Z = 29,
2857
2858 SDL_SCANCODE_1 = 30,
2859 SDL_SCANCODE_2 = 31,
2860 SDL_SCANCODE_3 = 32,
2861 SDL_SCANCODE_4 = 33,
2862 SDL_SCANCODE_5 = 34,
2863 SDL_SCANCODE_6 = 35,
2864 SDL_SCANCODE_7 = 36,
2865 SDL_SCANCODE_8 = 37,
2866 SDL_SCANCODE_9 = 38,
2867 SDL_SCANCODE_0 = 39,
2868
2869 SDL_SCANCODE_RETURN = 40,
2870 SDL_SCANCODE_ESCAPE = 41,
2871 SDL_SCANCODE_BACKSPACE = 42,
2872 SDL_SCANCODE_TAB = 43,
2873 SDL_SCANCODE_SPACE = 44,
2874
2875 SDL_SCANCODE_MINUS = 45,
2876 SDL_SCANCODE_EQUALS = 46,
2877 SDL_SCANCODE_LEFTBRACKET = 47,
2878 SDL_SCANCODE_RIGHTBRACKET = 48,
2879 SDL_SCANCODE_BACKSLASH = 49,
2880 SDL_SCANCODE_NONUSHASH = 50,
2881 SDL_SCANCODE_SEMICOLON = 51,
2882 SDL_SCANCODE_APOSTROPHE = 52,
2883 SDL_SCANCODE_GRAVE = 53,
2884 SDL_SCANCODE_COMMA = 54,
2885 SDL_SCANCODE_PERIOD = 55,
2886 SDL_SCANCODE_SLASH = 56,
2887
2888 SDL_SCANCODE_CAPSLOCK = 57,
2889
2890 SDL_SCANCODE_F1 = 58,
2891 SDL_SCANCODE_F2 = 59,
2892 SDL_SCANCODE_F3 = 60,
2893 SDL_SCANCODE_F4 = 61,
2894 SDL_SCANCODE_F5 = 62,
2895 SDL_SCANCODE_F6 = 63,
2896 SDL_SCANCODE_F7 = 64,
2897 SDL_SCANCODE_F8 = 65,
2898 SDL_SCANCODE_F9 = 66,
2899 SDL_SCANCODE_F10 = 67,
2900 SDL_SCANCODE_F11 = 68,
2901 SDL_SCANCODE_F12 = 69,
2902
2903 SDL_SCANCODE_PRINTSCREEN = 70,
2904 SDL_SCANCODE_SCROLLLOCK = 71,
2905 SDL_SCANCODE_PAUSE = 72,
2906 SDL_SCANCODE_INSERT = 73,
2907 SDL_SCANCODE_HOME = 74,
2908 SDL_SCANCODE_PAGEUP = 75,
2909 SDL_SCANCODE_DELETE = 76,
2910 SDL_SCANCODE_END = 77,
2911 SDL_SCANCODE_PAGEDOWN = 78,
2912 SDL_SCANCODE_RIGHT = 79,
2913 SDL_SCANCODE_LEFT = 80,
2914 SDL_SCANCODE_DOWN = 81,
2915 SDL_SCANCODE_UP = 82,
2916
2917 SDL_SCANCODE_NUMLOCKCLEAR = 83,
2918 SDL_SCANCODE_KP_DIVIDE = 84,
2919 SDL_SCANCODE_KP_MULTIPLY = 85,
2920 SDL_SCANCODE_KP_MINUS = 86,
2921 SDL_SCANCODE_KP_PLUS = 87,
2922 SDL_SCANCODE_KP_ENTER = 88,
2923 SDL_SCANCODE_KP_1 = 89,
2924 SDL_SCANCODE_KP_2 = 90,
2925 SDL_SCANCODE_KP_3 = 91,
2926 SDL_SCANCODE_KP_4 = 92,
2927 SDL_SCANCODE_KP_5 = 93,
2928 SDL_SCANCODE_KP_6 = 94,
2929 SDL_SCANCODE_KP_7 = 95,
2930 SDL_SCANCODE_KP_8 = 96,
2931 SDL_SCANCODE_KP_9 = 97,
2932 SDL_SCANCODE_KP_0 = 98,
2933 SDL_SCANCODE_KP_PERIOD = 99,
2934
2935 SDL_SCANCODE_NONUSBACKSLASH = 100,
2936 SDL_SCANCODE_APPLICATION = 101,
2937 SDL_SCANCODE_POWER = 102,
2938 SDL_SCANCODE_KP_EQUALS = 103,
2939 SDL_SCANCODE_F13 = 104,
2940 SDL_SCANCODE_F14 = 105,
2941 SDL_SCANCODE_F15 = 106,
2942 SDL_SCANCODE_F16 = 107,
2943 SDL_SCANCODE_F17 = 108,
2944 SDL_SCANCODE_F18 = 109,
2945 SDL_SCANCODE_F19 = 110,
2946 SDL_SCANCODE_F20 = 111,
2947 SDL_SCANCODE_F21 = 112,
2948 SDL_SCANCODE_F22 = 113,
2949 SDL_SCANCODE_F23 = 114,
2950 SDL_SCANCODE_F24 = 115,
2951 SDL_SCANCODE_EXECUTE = 116,
2952 SDL_SCANCODE_HELP = 117,
2953 SDL_SCANCODE_MENU = 118,
2954 SDL_SCANCODE_SELECT = 119,
2955 SDL_SCANCODE_STOP = 120,
2956 SDL_SCANCODE_AGAIN = 121,
2957 SDL_SCANCODE_UNDO = 122,
2958 SDL_SCANCODE_CUT = 123,
2959 SDL_SCANCODE_COPY = 124,
2960 SDL_SCANCODE_PASTE = 125,
2961 SDL_SCANCODE_FIND = 126,
2962 SDL_SCANCODE_MUTE = 127,
2963 SDL_SCANCODE_VOLUMEUP = 128,
2964 SDL_SCANCODE_VOLUMEDOWN = 129,
2965
2966
2967
2968
2969 SDL_SCANCODE_KP_COMMA = 133,
2970 SDL_SCANCODE_KP_EQUALSAS400 = 134,
2971
2972 SDL_SCANCODE_INTERNATIONAL1 = 135,
2973 SDL_SCANCODE_INTERNATIONAL2 = 136,
2974 SDL_SCANCODE_INTERNATIONAL3 = 137,
2975 SDL_SCANCODE_INTERNATIONAL4 = 138,
2976 SDL_SCANCODE_INTERNATIONAL5 = 139,
2977 SDL_SCANCODE_INTERNATIONAL6 = 140,
2978 SDL_SCANCODE_INTERNATIONAL7 = 141,
2979 SDL_SCANCODE_INTERNATIONAL8 = 142,
2980 SDL_SCANCODE_INTERNATIONAL9 = 143,
2981 SDL_SCANCODE_LANG1 = 144,
2982 SDL_SCANCODE_LANG2 = 145,
2983 SDL_SCANCODE_LANG3 = 146,
2984 SDL_SCANCODE_LANG4 = 147,
2985 SDL_SCANCODE_LANG5 = 148,
2986 SDL_SCANCODE_LANG6 = 149,
2987 SDL_SCANCODE_LANG7 = 150,
2988 SDL_SCANCODE_LANG8 = 151,
2989 SDL_SCANCODE_LANG9 = 152,
2990
2991 SDL_SCANCODE_ALTERASE = 153,
2992 SDL_SCANCODE_SYSREQ = 154,
2993 SDL_SCANCODE_CANCEL = 155,
2994 SDL_SCANCODE_CLEAR = 156,
2995 SDL_SCANCODE_PRIOR = 157,
2996 SDL_SCANCODE_RETURN2 = 158,
2997 SDL_SCANCODE_SEPARATOR = 159,
2998 SDL_SCANCODE_OUT = 160,
2999 SDL_SCANCODE_OPER = 161,
3000 SDL_SCANCODE_CLEARAGAIN = 162,
3001 SDL_SCANCODE_CRSEL = 163,
3002 SDL_SCANCODE_EXSEL = 164,
3003
3004 SDL_SCANCODE_KP_00 = 176,
3005 SDL_SCANCODE_KP_000 = 177,
3006 SDL_SCANCODE_THOUSANDSSEPARATOR = 178,
3007 SDL_SCANCODE_DECIMALSEPARATOR = 179,
3008 SDL_SCANCODE_CURRENCYUNIT = 180,
3009 SDL_SCANCODE_CURRENCYSUBUNIT = 181,
3010 SDL_SCANCODE_KP_LEFTPAREN = 182,
3011 SDL_SCANCODE_KP_RIGHTPAREN = 183,
3012 SDL_SCANCODE_KP_LEFTBRACE = 184,
3013 SDL_SCANCODE_KP_RIGHTBRACE = 185,
3014 SDL_SCANCODE_KP_TAB = 186,
3015 SDL_SCANCODE_KP_BACKSPACE = 187,
3016 SDL_SCANCODE_KP_A = 188,
3017 SDL_SCANCODE_KP_B = 189,
3018 SDL_SCANCODE_KP_C = 190,
3019 SDL_SCANCODE_KP_D = 191,
3020 SDL_SCANCODE_KP_E = 192,
3021 SDL_SCANCODE_KP_F = 193,
3022 SDL_SCANCODE_KP_XOR = 194,
3023 SDL_SCANCODE_KP_POWER = 195,
3024 SDL_SCANCODE_KP_PERCENT = 196,
3025 SDL_SCANCODE_KP_LESS = 197,
3026 SDL_SCANCODE_KP_GREATER = 198,
3027 SDL_SCANCODE_KP_AMPERSAND = 199,
3028 SDL_SCANCODE_KP_DBLAMPERSAND = 200,
3029 SDL_SCANCODE_KP_VERTICALBAR = 201,
3030 SDL_SCANCODE_KP_DBLVERTICALBAR = 202,
3031 SDL_SCANCODE_KP_COLON = 203,
3032 SDL_SCANCODE_KP_HASH = 204,
3033 SDL_SCANCODE_KP_SPACE = 205,
3034 SDL_SCANCODE_KP_AT = 206,
3035 SDL_SCANCODE_KP_EXCLAM = 207,
3036 SDL_SCANCODE_KP_MEMSTORE = 208,
3037 SDL_SCANCODE_KP_MEMRECALL = 209,
3038 SDL_SCANCODE_KP_MEMCLEAR = 210,
3039 SDL_SCANCODE_KP_MEMADD = 211,
3040 SDL_SCANCODE_KP_MEMSUBTRACT = 212,
3041 SDL_SCANCODE_KP_MEMMULTIPLY = 213,
3042 SDL_SCANCODE_KP_MEMDIVIDE = 214,
3043 SDL_SCANCODE_KP_PLUSMINUS = 215,
3044 SDL_SCANCODE_KP_CLEAR = 216,
3045 SDL_SCANCODE_KP_CLEARENTRY = 217,
3046 SDL_SCANCODE_KP_BINARY = 218,
3047 SDL_SCANCODE_KP_OCTAL = 219,
3048 SDL_SCANCODE_KP_DECIMAL = 220,
3049 SDL_SCANCODE_KP_HEXADECIMAL = 221,
3050
3051 SDL_SCANCODE_LCTRL = 224,
3052 SDL_SCANCODE_LSHIFT = 225,
3053 SDL_SCANCODE_LALT = 226,
3054 SDL_SCANCODE_LGUI = 227,
3055 SDL_SCANCODE_RCTRL = 228,
3056 SDL_SCANCODE_RSHIFT = 229,
3057 SDL_SCANCODE_RALT = 230,
3058 SDL_SCANCODE_RGUI = 231,
3059
3060 SDL_SCANCODE_MODE = 257,
3061
3062
3063
3064 SDL_SCANCODE_AUDIONEXT = 258,
3065 SDL_SCANCODE_AUDIOPREV = 259,
3066 SDL_SCANCODE_AUDIOSTOP = 260,
3067 SDL_SCANCODE_AUDIOPLAY = 261,
3068 SDL_SCANCODE_AUDIOMUTE = 262,
3069 SDL_SCANCODE_MEDIASELECT = 263,
3070 SDL_SCANCODE_WWW = 264,
3071 SDL_SCANCODE_MAIL = 265,
3072 SDL_SCANCODE_CALCULATOR = 266,
3073 SDL_SCANCODE_COMPUTER = 267,
3074 SDL_SCANCODE_AC_SEARCH = 268,
3075 SDL_SCANCODE_AC_HOME = 269,
3076 SDL_SCANCODE_AC_BACK = 270,
3077 SDL_SCANCODE_AC_FORWARD = 271,
3078 SDL_SCANCODE_AC_STOP = 272,
3079 SDL_SCANCODE_AC_REFRESH = 273,
3080 SDL_SCANCODE_AC_BOOKMARKS = 274,
3081
3082
3083
3084 SDL_SCANCODE_BRIGHTNESSDOWN = 275,
3085 SDL_SCANCODE_BRIGHTNESSUP = 276,
3086 SDL_SCANCODE_DISPLAYSWITCH = 277,
3087 SDL_SCANCODE_KBDILLUMTOGGLE = 278,
3088 SDL_SCANCODE_KBDILLUMDOWN = 279,
3089 SDL_SCANCODE_KBDILLUMUP = 280,
3090 SDL_SCANCODE_EJECT = 281,
3091 SDL_SCANCODE_SLEEP = 282,
3092
3093
3094
3095 SDL_NUM_SCANCODES = 512
3096 } SDL_scancode;
3097 # 32 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keysym.h" 2
3098 # 43 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keysym.h"
3099 typedef Sint32 SDLKey;
3100
3101
3102
3103
3104 enum
3105 {
3106 SDLK_UNKNOWN = 0,
3107
3108 SDLK_RETURN = (SDL_SCANCODE_RETURN | (1<<30)),
3109 SDLK_ESCAPE = (SDL_SCANCODE_ESCAPE | (1<<30)),
3110 SDLK_BACKSPACE = (SDL_SCANCODE_BACKSPACE | (1<<30)),
3111 SDLK_TAB = (SDL_SCANCODE_TAB | (1<<30)),
3112 SDLK_SPACE = (SDL_SCANCODE_SPACE | (1<<30)),
3113
3114 SDLK_CAPSLOCK = (SDL_SCANCODE_CAPSLOCK | (1<<30)),
3115
3116 SDLK_F1 = (SDL_SCANCODE_F1 | (1<<30)),
3117 SDLK_F2 = (SDL_SCANCODE_F2 | (1<<30)),
3118 SDLK_F3 = (SDL_SCANCODE_F3 | (1<<30)),
3119 SDLK_F4 = (SDL_SCANCODE_F4 | (1<<30)),
3120 SDLK_F5 = (SDL_SCANCODE_F5 | (1<<30)),
3121 SDLK_F6 = (SDL_SCANCODE_F6 | (1<<30)),
3122 SDLK_F7 = (SDL_SCANCODE_F7 | (1<<30)),
3123 SDLK_F8 = (SDL_SCANCODE_F8 | (1<<30)),
3124 SDLK_F9 = (SDL_SCANCODE_F9 | (1<<30)),
3125 SDLK_F10 = (SDL_SCANCODE_F10 | (1<<30)),
3126 SDLK_F11 = (SDL_SCANCODE_F11 | (1<<30)),
3127 SDLK_F12 = (SDL_SCANCODE_F12 | (1<<30)),
3128
3129 SDLK_PRINTSCREEN = (SDL_SCANCODE_PRINTSCREEN | (1<<30)),
3130 SDLK_SCROLLLOCK = (SDL_SCANCODE_SCROLLLOCK | (1<<30)),
3131 SDLK_PAUSE = (SDL_SCANCODE_PAUSE | (1<<30)),
3132 SDLK_INSERT = (SDL_SCANCODE_INSERT | (1<<30)),
3133 SDLK_HOME = (SDL_SCANCODE_HOME | (1<<30)),
3134 SDLK_PAGEUP = (SDL_SCANCODE_PAGEUP | (1<<30)),
3135 SDLK_DELETE = (SDL_SCANCODE_DELETE | (1<<30)),
3136 SDLK_END = (SDL_SCANCODE_END | (1<<30)),
3137 SDLK_PAGEDOWN = (SDL_SCANCODE_PAGEDOWN | (1<<30)),
3138 SDLK_RIGHT = (SDL_SCANCODE_RIGHT | (1<<30)),
3139 SDLK_LEFT = (SDL_SCANCODE_LEFT | (1<<30)),
3140 SDLK_DOWN = (SDL_SCANCODE_DOWN | (1<<30)),
3141 SDLK_UP = (SDL_SCANCODE_UP | (1<<30)),
3142
3143 SDLK_NUMLOCKCLEAR = (SDL_SCANCODE_NUMLOCKCLEAR | (1<<30)),
3144 SDLK_KP_DIVIDE = (SDL_SCANCODE_KP_DIVIDE | (1<<30)),
3145 SDLK_KP_MULTIPLY = (SDL_SCANCODE_KP_MULTIPLY | (1<<30)),
3146 SDLK_KP_MINUS = (SDL_SCANCODE_KP_MINUS | (1<<30)),
3147 SDLK_KP_PLUS = (SDL_SCANCODE_KP_PLUS | (1<<30)),
3148 SDLK_KP_ENTER = (SDL_SCANCODE_KP_ENTER | (1<<30)),
3149 SDLK_KP_1 = (SDL_SCANCODE_KP_1 | (1<<30)),
3150 SDLK_KP_2 = (SDL_SCANCODE_KP_2 | (1<<30)),
3151 SDLK_KP_3 = (SDL_SCANCODE_KP_3 | (1<<30)),
3152 SDLK_KP_4 = (SDL_SCANCODE_KP_4 | (1<<30)),
3153 SDLK_KP_5 = (SDL_SCANCODE_KP_5 | (1<<30)),
3154 SDLK_KP_6 = (SDL_SCANCODE_KP_6 | (1<<30)),
3155 SDLK_KP_7 = (SDL_SCANCODE_KP_7 | (1<<30)),
3156 SDLK_KP_8 = (SDL_SCANCODE_KP_8 | (1<<30)),
3157 SDLK_KP_9 = (SDL_SCANCODE_KP_9 | (1<<30)),
3158 SDLK_KP_0 = (SDL_SCANCODE_KP_0 | (1<<30)),
3159 SDLK_KP_PERIOD = (SDL_SCANCODE_KP_PERIOD | (1<<30)),
3160
3161 SDLK_APPLICATION = (SDL_SCANCODE_APPLICATION | (1<<30)),
3162 SDLK_POWER = (SDL_SCANCODE_POWER | (1<<30)),
3163 SDLK_KP_EQUALS = (SDL_SCANCODE_KP_EQUALS | (1<<30)),
3164 SDLK_F13 = (SDL_SCANCODE_F13 | (1<<30)),
3165 SDLK_F14 = (SDL_SCANCODE_F14 | (1<<30)),
3166 SDLK_F15 = (SDL_SCANCODE_F15 | (1<<30)),
3167 SDLK_F16 = (SDL_SCANCODE_F16 | (1<<30)),
3168 SDLK_F17 = (SDL_SCANCODE_F17 | (1<<30)),
3169 SDLK_F18 = (SDL_SCANCODE_F18 | (1<<30)),
3170 SDLK_F19 = (SDL_SCANCODE_F19 | (1<<30)),
3171 SDLK_F20 = (SDL_SCANCODE_F20 | (1<<30)),
3172 SDLK_F21 = (SDL_SCANCODE_F21 | (1<<30)),
3173 SDLK_F22 = (SDL_SCANCODE_F22 | (1<<30)),
3174 SDLK_F23 = (SDL_SCANCODE_F23 | (1<<30)),
3175 SDLK_F24 = (SDL_SCANCODE_F24 | (1<<30)),
3176 SDLK_EXECUTE = (SDL_SCANCODE_EXECUTE | (1<<30)),
3177 SDLK_HELP = (SDL_SCANCODE_HELP | (1<<30)),
3178 SDLK_MENU = (SDL_SCANCODE_MENU | (1<<30)),
3179 SDLK_SELECT = (SDL_SCANCODE_SELECT | (1<<30)),
3180 SDLK_STOP = (SDL_SCANCODE_STOP | (1<<30)),
3181 SDLK_AGAIN = (SDL_SCANCODE_AGAIN | (1<<30)),
3182 SDLK_UNDO = (SDL_SCANCODE_UNDO | (1<<30)),
3183 SDLK_CUT = (SDL_SCANCODE_CUT | (1<<30)),
3184 SDLK_COPY = (SDL_SCANCODE_COPY | (1<<30)),
3185 SDLK_PASTE = (SDL_SCANCODE_PASTE | (1<<30)),
3186 SDLK_FIND = (SDL_SCANCODE_FIND | (1<<30)),
3187 SDLK_MUTE = (SDL_SCANCODE_MUTE | (1<<30)),
3188 SDLK_VOLUMEUP = (SDL_SCANCODE_VOLUMEUP | (1<<30)),
3189 SDLK_VOLUMEDOWN = (SDL_SCANCODE_VOLUMEDOWN | (1<<30)),
3190 SDLK_KP_COMMA = (SDL_SCANCODE_KP_COMMA | (1<<30)),
3191 SDLK_KP_EQUALSAS400 =
3192 (SDL_SCANCODE_KP_EQUALSAS400 | (1<<30)),
3193
3194 SDLK_ALTERASE = (SDL_SCANCODE_ALTERASE | (1<<30)),
3195 SDLK_SYSREQ = (SDL_SCANCODE_SYSREQ | (1<<30)),
3196 SDLK_CANCEL = (SDL_SCANCODE_CANCEL | (1<<30)),
3197 SDLK_CLEAR = (SDL_SCANCODE_CLEAR | (1<<30)),
3198 SDLK_PRIOR = (SDL_SCANCODE_PRIOR | (1<<30)),
3199 SDLK_RETURN2 = (SDL_SCANCODE_RETURN2 | (1<<30)),
3200 SDLK_SEPARATOR = (SDL_SCANCODE_SEPARATOR | (1<<30)),
3201 SDLK_OUT = (SDL_SCANCODE_OUT | (1<<30)),
3202 SDLK_OPER = (SDL_SCANCODE_OPER | (1<<30)),
3203 SDLK_CLEARAGAIN = (SDL_SCANCODE_CLEARAGAIN | (1<<30)),
3204 SDLK_CRSEL = (SDL_SCANCODE_CRSEL | (1<<30)),
3205 SDLK_EXSEL = (SDL_SCANCODE_EXSEL | (1<<30)),
3206
3207 SDLK_KP_00 = (SDL_SCANCODE_KP_00 | (1<<30)),
3208 SDLK_KP_000 = (SDL_SCANCODE_KP_000 | (1<<30)),
3209 SDLK_THOUSANDSSEPARATOR =
3210 (SDL_SCANCODE_THOUSANDSSEPARATOR | (1<<30)),
3211 SDLK_DECIMALSEPARATOR =
3212 (SDL_SCANCODE_DECIMALSEPARATOR | (1<<30)),
3213 SDLK_CURRENCYUNIT = (SDL_SCANCODE_CURRENCYUNIT | (1<<30)),
3214 SDLK_CURRENCYSUBUNIT =
3215 (SDL_SCANCODE_CURRENCYSUBUNIT | (1<<30)),
3216 SDLK_KP_LEFTPAREN = (SDL_SCANCODE_KP_LEFTPAREN | (1<<30)),
3217 SDLK_KP_RIGHTPAREN = (SDL_SCANCODE_KP_RIGHTPAREN | (1<<30)),
3218 SDLK_KP_LEFTBRACE = (SDL_SCANCODE_KP_LEFTBRACE | (1<<30)),
3219 SDLK_KP_RIGHTBRACE = (SDL_SCANCODE_KP_RIGHTBRACE | (1<<30)),
3220 SDLK_KP_TAB = (SDL_SCANCODE_KP_TAB | (1<<30)),
3221 SDLK_KP_BACKSPACE = (SDL_SCANCODE_KP_BACKSPACE | (1<<30)),
3222 SDLK_KP_A = (SDL_SCANCODE_KP_A | (1<<30)),
3223 SDLK_KP_B = (SDL_SCANCODE_KP_B | (1<<30)),
3224 SDLK_KP_C = (SDL_SCANCODE_KP_C | (1<<30)),
3225 SDLK_KP_D = (SDL_SCANCODE_KP_D | (1<<30)),
3226 SDLK_KP_E = (SDL_SCANCODE_KP_E | (1<<30)),
3227 SDLK_KP_F = (SDL_SCANCODE_KP_F | (1<<30)),
3228 SDLK_KP_XOR = (SDL_SCANCODE_KP_XOR | (1<<30)),
3229 SDLK_KP_POWER = (SDL_SCANCODE_KP_POWER | (1<<30)),
3230 SDLK_KP_PERCENT = (SDL_SCANCODE_KP_PERCENT | (1<<30)),
3231 SDLK_KP_LESS = (SDL_SCANCODE_KP_LESS | (1<<30)),
3232 SDLK_KP_GREATER = (SDL_SCANCODE_KP_GREATER | (1<<30)),
3233 SDLK_KP_AMPERSAND = (SDL_SCANCODE_KP_AMPERSAND | (1<<30)),
3234 SDLK_KP_DBLAMPERSAND =
3235 (SDL_SCANCODE_KP_DBLAMPERSAND | (1<<30)),
3236 SDLK_KP_VERTICALBAR =
3237 (SDL_SCANCODE_KP_VERTICALBAR | (1<<30)),
3238 SDLK_KP_DBLVERTICALBAR =
3239 (SDL_SCANCODE_KP_DBLVERTICALBAR | (1<<30)),
3240 SDLK_KP_COLON = (SDL_SCANCODE_KP_COLON | (1<<30)),
3241 SDLK_KP_HASH = (SDL_SCANCODE_KP_HASH | (1<<30)),
3242 SDLK_KP_SPACE = (SDL_SCANCODE_KP_SPACE | (1<<30)),
3243 SDLK_KP_AT = (SDL_SCANCODE_KP_AT | (1<<30)),
3244 SDLK_KP_EXCLAM = (SDL_SCANCODE_KP_EXCLAM | (1<<30)),
3245 SDLK_KP_MEMSTORE = (SDL_SCANCODE_KP_MEMSTORE | (1<<30)),
3246 SDLK_KP_MEMRECALL = (SDL_SCANCODE_KP_MEMRECALL | (1<<30)),
3247 SDLK_KP_MEMCLEAR = (SDL_SCANCODE_KP_MEMCLEAR | (1<<30)),
3248 SDLK_KP_MEMADD = (SDL_SCANCODE_KP_MEMADD | (1<<30)),
3249 SDLK_KP_MEMSUBTRACT =
3250 (SDL_SCANCODE_KP_MEMSUBTRACT | (1<<30)),
3251 SDLK_KP_MEMMULTIPLY =
3252 (SDL_SCANCODE_KP_MEMMULTIPLY | (1<<30)),
3253 SDLK_KP_MEMDIVIDE = (SDL_SCANCODE_KP_MEMDIVIDE | (1<<30)),
3254 SDLK_KP_PLUSMINUS = (SDL_SCANCODE_KP_PLUSMINUS | (1<<30)),
3255 SDLK_KP_CLEAR = (SDL_SCANCODE_KP_CLEAR | (1<<30)),
3256 SDLK_KP_CLEARENTRY = (SDL_SCANCODE_KP_CLEARENTRY | (1<<30)),
3257 SDLK_KP_BINARY = (SDL_SCANCODE_KP_BINARY | (1<<30)),
3258 SDLK_KP_OCTAL = (SDL_SCANCODE_KP_OCTAL | (1<<30)),
3259 SDLK_KP_DECIMAL = (SDL_SCANCODE_KP_DECIMAL | (1<<30)),
3260 SDLK_KP_HEXADECIMAL =
3261 (SDL_SCANCODE_KP_HEXADECIMAL | (1<<30)),
3262
3263 SDLK_LCTRL = (SDL_SCANCODE_LCTRL | (1<<30)),
3264 SDLK_LSHIFT = (SDL_SCANCODE_LSHIFT | (1<<30)),
3265 SDLK_LALT = (SDL_SCANCODE_LALT | (1<<30)),
3266 SDLK_LGUI = (SDL_SCANCODE_LGUI | (1<<30)),
3267 SDLK_RCTRL = (SDL_SCANCODE_RCTRL | (1<<30)),
3268 SDLK_RSHIFT = (SDL_SCANCODE_RSHIFT | (1<<30)),
3269 SDLK_RALT = (SDL_SCANCODE_RALT | (1<<30)),
3270 SDLK_RGUI = (SDL_SCANCODE_RGUI | (1<<30)),
3271
3272 SDLK_MODE = (SDL_SCANCODE_MODE | (1<<30)),
3273
3274 SDLK_AUDIONEXT = (SDL_SCANCODE_AUDIONEXT | (1<<30)),
3275 SDLK_AUDIOPREV = (SDL_SCANCODE_AUDIOPREV | (1<<30)),
3276 SDLK_AUDIOSTOP = (SDL_SCANCODE_AUDIOSTOP | (1<<30)),
3277 SDLK_AUDIOPLAY = (SDL_SCANCODE_AUDIOPLAY | (1<<30)),
3278 SDLK_AUDIOMUTE = (SDL_SCANCODE_AUDIOMUTE | (1<<30)),
3279 SDLK_MEDIASELECT = (SDL_SCANCODE_MEDIASELECT | (1<<30)),
3280 SDLK_WWW = (SDL_SCANCODE_WWW | (1<<30)),
3281 SDLK_MAIL = (SDL_SCANCODE_MAIL | (1<<30)),
3282 SDLK_CALCULATOR = (SDL_SCANCODE_CALCULATOR | (1<<30)),
3283 SDLK_COMPUTER = (SDL_SCANCODE_COMPUTER | (1<<30)),
3284 SDLK_AC_SEARCH = (SDL_SCANCODE_AC_SEARCH | (1<<30)),
3285 SDLK_AC_HOME = (SDL_SCANCODE_AC_HOME | (1<<30)),
3286 SDLK_AC_BACK = (SDL_SCANCODE_AC_BACK | (1<<30)),
3287 SDLK_AC_FORWARD = (SDL_SCANCODE_AC_FORWARD | (1<<30)),
3288 SDLK_AC_STOP = (SDL_SCANCODE_AC_STOP | (1<<30)),
3289 SDLK_AC_REFRESH = (SDL_SCANCODE_AC_REFRESH | (1<<30)),
3290 SDLK_AC_BOOKMARKS = (SDL_SCANCODE_AC_BOOKMARKS | (1<<30)),
3291
3292 SDLK_BRIGHTNESSDOWN =
3293 (SDL_SCANCODE_BRIGHTNESSDOWN | (1<<30)),
3294 SDLK_BRIGHTNESSUP = (SDL_SCANCODE_BRIGHTNESSUP | (1<<30)),
3295 SDLK_DISPLAYSWITCH = (SDL_SCANCODE_DISPLAYSWITCH | (1<<30)),
3296 SDLK_KBDILLUMTOGGLE =
3297 (SDL_SCANCODE_KBDILLUMTOGGLE | (1<<30)),
3298 SDLK_KBDILLUMDOWN = (SDL_SCANCODE_KBDILLUMDOWN | (1<<30)),
3299 SDLK_KBDILLUMUP = (SDL_SCANCODE_KBDILLUMUP | (1<<30)),
3300 SDLK_EJECT = (SDL_SCANCODE_EJECT | (1<<30)),
3301 SDLK_SLEEP = (SDL_SCANCODE_SLEEP | (1<<30)),
3302 };
3303
3304
3305
3306
3307
3308
3309 typedef enum
3310 {
3311 KMOD_NONE = 0x0000,
3312 KMOD_LSHIFT = 0x0001,
3313 KMOD_RSHIFT = 0x0002,
3314 KMOD_LCTRL = 0x0040,
3315 KMOD_RCTRL = 0x0080,
3316 KMOD_LALT = 0x0100,
3317 KMOD_RALT = 0x0200,
3318 KMOD_LGUI = 0x0400,
3319 KMOD_RGUI = 0x0800,
3320 KMOD_NUM = 0x1000,
3321 KMOD_CAPS = 0x2000,
3322 KMOD_MODE = 0x4000,
3323 KMOD_RESERVED = 0x8000
3324 } SDLMod;
3325 # 35 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h" 2
3326
3327 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
3328 # 37 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h" 2
3329 # 49 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
3330 typedef struct SDL_keysym
3331 {
3332 SDL_scancode scancode;
3333 SDLKey sym;
3334 Uint16 mod;
3335 Uint32 unicode;
3336 } SDL_keysym;
3337 # 66 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
3338 extern __attribute__ ((visibility("default"))) int SDL_GetNumKeyboards(void);
3339 # 79 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
3340 extern __attribute__ ((visibility("default"))) int SDL_SelectKeyboard(int index);
3341 # 94 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
3342 extern __attribute__ ((visibility("default"))) Uint8 * SDL_GetKeyboardState(int *numkeys);
3343
3344
3345
3346
3347
3348
3349 extern __attribute__ ((visibility("default"))) SDLMod SDL_GetModState(void);
3350 # 110 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
3351 extern __attribute__ ((visibility("default"))) void SDL_SetModState(SDLMod modstate);
3352 # 121 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
3353 extern __attribute__ ((visibility("default"))) SDLKey SDL_GetKeyFromScancode(SDL_scancode scancode);
3354 # 132 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
3355 extern __attribute__ ((visibility("default"))) SDL_scancode SDL_GetScancodeFromKey(SDLKey key);
3356 # 143 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
3357 extern __attribute__ ((visibility("default"))) const char * SDL_GetScancodeName(SDL_scancode
3358 scancode);
3359 # 155 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
3360 extern __attribute__ ((visibility("default"))) const char * SDL_GetKeyName(SDLKey key);
3361 # 164 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
3362 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
3363 # 165 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h" 2
3364 # 36 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h" 2
3365 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h" 1
3366 # 36 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
3367 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
3368 # 37 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h" 2
3369
3370
3371
3372
3373
3374
3375
3376 typedef struct SDL_Cursor SDL_Cursor;
3377 # 55 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
3378 extern __attribute__ ((visibility("default"))) int SDL_GetNumMice(void);
3379 # 68 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
3380 extern __attribute__ ((visibility("default"))) int SDL_SelectMouse(int index);
3381
3382
3383
3384
3385
3386
3387 extern __attribute__ ((visibility("default"))) SDL_WindowID SDL_GetMouseFocusWindow(void);
3388 # 95 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
3389 extern __attribute__ ((visibility("default"))) int SDL_SetRelativeMouseMode(SDL_bool enabled);
3390 # 104 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
3391 extern __attribute__ ((visibility("default"))) SDL_bool SDL_GetRelativeMouseMode(void);
3392 # 116 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
3393 extern __attribute__ ((visibility("default"))) Uint8 SDL_GetMouseState(int *x, int *y);
3394 # 127 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
3395 extern __attribute__ ((visibility("default"))) Uint8 SDL_GetRelativeMouseState(int *x, int *y);
3396 # 140 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
3397 extern __attribute__ ((visibility("default"))) void SDL_WarpMouseInWindow(SDL_WindowID windowID,
3398 int x, int y);
3399 # 160 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
3400 extern __attribute__ ((visibility("default"))) SDL_Cursor * SDL_CreateCursor(const Uint8 * data,
3401 const Uint8 * mask,
3402 int w, int h, int hot_x,
3403 int hot_y);
3404 # 172 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
3405 extern __attribute__ ((visibility("default"))) void SDL_SetCursor(SDL_Cursor * cursor);
3406
3407
3408
3409
3410
3411
3412 extern __attribute__ ((visibility("default"))) SDL_Cursor * SDL_GetCursor(void);
3413 # 188 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
3414 extern __attribute__ ((visibility("default"))) void SDL_FreeCursor(SDL_Cursor * cursor);
3415 # 199 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
3416 extern __attribute__ ((visibility("default"))) int SDL_ShowCursor(int toggle);
3417 # 225 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
3418 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
3419 # 226 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h" 2
3420 # 37 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h" 2
3421 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_joystick.h" 1
3422 # 35 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_joystick.h"
3423 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
3424 # 36 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_joystick.h" 2
3425 # 49 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_joystick.h"
3426 struct _SDL_Joystick;
3427 typedef struct _SDL_Joystick SDL_Joystick;
3428
3429
3430
3431
3432
3433
3434 extern __attribute__ ((visibility("default"))) int SDL_NumJoysticks(void);
3435
3436
3437
3438
3439
3440
3441 extern __attribute__ ((visibility("default"))) const char * SDL_JoystickName(int device_index);
3442 # 73 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_joystick.h"
3443 extern __attribute__ ((visibility("default"))) SDL_Joystick * SDL_JoystickOpen(int device_index);
3444
3445
3446
3447
3448 extern __attribute__ ((visibility("default"))) int SDL_JoystickOpened(int device_index);
3449
3450
3451
3452
3453 extern __attribute__ ((visibility("default"))) int SDL_JoystickIndex(SDL_Joystick * joystick);
3454
3455
3456
3457
3458 extern __attribute__ ((visibility("default"))) int SDL_JoystickNumAxes(SDL_Joystick * joystick);
3459
3460
3461
3462
3463
3464
3465 extern __attribute__ ((visibility("default"))) int SDL_JoystickNumBalls(SDL_Joystick * joystick);
3466
3467
3468
3469
3470 extern __attribute__ ((visibility("default"))) int SDL_JoystickNumHats(SDL_Joystick * joystick);
3471
3472
3473
3474
3475 extern __attribute__ ((visibility("default"))) int SDL_JoystickNumButtons(SDL_Joystick * joystick);
3476
3477
3478
3479
3480
3481
3482 extern __attribute__ ((visibility("default"))) void SDL_JoystickUpdate(void);
3483 # 121 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_joystick.h"
3484 extern __attribute__ ((visibility("default"))) int SDL_JoystickEventState(int state);
3485
3486
3487
3488
3489
3490
3491 extern __attribute__ ((visibility("default"))) Sint16 SDL_JoystickGetAxis(SDL_Joystick * joystick,
3492 int axis);
3493 # 147 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_joystick.h"
3494 extern __attribute__ ((visibility("default"))) Uint8 SDL_JoystickGetHat(SDL_Joystick * joystick,
3495 int hat);
3496
3497
3498
3499
3500
3501
3502 extern __attribute__ ((visibility("default"))) int SDL_JoystickGetBall(SDL_Joystick * joystick,
3503 int ball, int *dx, int *dy);
3504
3505
3506
3507
3508
3509 extern __attribute__ ((visibility("default"))) Uint8 SDL_JoystickGetButton(SDL_Joystick * joystick,
3510 int button);
3511
3512
3513
3514
3515 extern __attribute__ ((visibility("default"))) void SDL_JoystickClose(SDL_Joystick * joystick);
3516 # 177 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_joystick.h"
3517 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
3518 # 178 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_joystick.h" 2
3519 # 38 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h" 2
3520 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_quit.h" 1
3521 # 39 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h" 2
3522
3523 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
3524 # 41 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h" 2
3525 # 57 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h"
3526 typedef enum
3527 {
3528 SDL_NOEVENT = 0,
3529 SDL_WINDOWEVENT,
3530 SDL_KEYDOWN,
3531 SDL_KEYUP,
3532 SDL_TEXTINPUT,
3533 SDL_MOUSEMOTION,
3534 SDL_MOUSEBUTTONDOWN,
3535 SDL_MOUSEBUTTONUP,
3536 SDL_MOUSEWHEEL,
3537 SDL_JOYAXISMOTION,
3538 SDL_JOYBALLMOTION,
3539 SDL_JOYHATMOTION,
3540 SDL_JOYBUTTONDOWN,
3541 SDL_JOYBUTTONUP,
3542 SDL_QUIT,
3543 SDL_SYSWMEVENT,
3544 SDL_EVENT_RESERVED1,
3545 SDL_EVENT_RESERVED2,
3546 SDL_EVENT_RESERVED3,
3547
3548 SDL_USEREVENT = 24,
3549
3550
3551
3552 SDL_NUMEVENTS = 32
3553 } SDL_EventType;
3554
3555
3556
3557
3558
3559
3560
3561 typedef enum
3562 {
3563 SDL_WINDOWEVENTMASK = (1<<(SDL_WINDOWEVENT)),
3564 SDL_KEYDOWNMASK = (1<<(SDL_KEYDOWN)),
3565 SDL_KEYUPMASK = (1<<(SDL_KEYUP)),
3566 SDL_KEYEVENTMASK = (1<<(SDL_KEYDOWN)) | (1<<(SDL_KEYUP)),
3567 SDL_TEXTINPUTMASK = (1<<(SDL_TEXTINPUT)),
3568 SDL_MOUSEMOTIONMASK = (1<<(SDL_MOUSEMOTION)),
3569 SDL_MOUSEBUTTONDOWNMASK = (1<<(SDL_MOUSEBUTTONDOWN)),
3570 SDL_MOUSEBUTTONUPMASK = (1<<(SDL_MOUSEBUTTONUP)),
3571 SDL_MOUSEWHEELMASK = (1<<(SDL_MOUSEWHEEL)),
3572 SDL_MOUSEEVENTMASK = (1<<(SDL_MOUSEMOTION)) |
3573 (1<<(SDL_MOUSEBUTTONDOWN)) | (1<<(SDL_MOUSEBUTTONUP)),
3574 SDL_JOYAXISMOTIONMASK = (1<<(SDL_JOYAXISMOTION)),
3575 SDL_JOYBALLMOTIONMASK = (1<<(SDL_JOYBALLMOTION)),
3576 SDL_JOYHATMOTIONMASK = (1<<(SDL_JOYHATMOTION)),
3577 SDL_JOYBUTTONDOWNMASK = (1<<(SDL_JOYBUTTONDOWN)),
3578 SDL_JOYBUTTONUPMASK = (1<<(SDL_JOYBUTTONUP)),
3579 SDL_JOYEVENTMASK = (1<<(SDL_JOYAXISMOTION)) |
3580 (1<<(SDL_JOYBALLMOTION)) |
3581 (1<<(SDL_JOYHATMOTION)) |
3582 (1<<(SDL_JOYBUTTONDOWN)) | (1<<(SDL_JOYBUTTONUP)),
3583 SDL_QUITMASK = (1<<(SDL_QUIT)),
3584 SDL_SYSWMEVENTMASK = (1<<(SDL_SYSWMEVENT))
3585 } SDL_EventMask;
3586
3587
3588
3589
3590
3591
3592
3593 typedef struct SDL_WindowEvent
3594 {
3595 Uint8 type;
3596 Uint8 event;
3597 int data1;
3598 int data2;
3599 SDL_WindowID windowID;
3600 } SDL_WindowEvent;
3601
3602
3603
3604
3605
3606
3607 typedef struct SDL_KeyboardEvent
3608 {
3609 Uint8 type;
3610 Uint8 which;
3611 Uint8 state;
3612 SDL_keysym keysym;
3613 SDL_WindowID windowID;
3614 } SDL_KeyboardEvent;
3615
3616
3617
3618
3619
3620
3621
3622 typedef struct SDL_TextInputEvent
3623 {
3624 Uint8 type;
3625 Uint8 which;
3626 char text[(32)];
3627 SDL_WindowID windowID;
3628 } SDL_TextInputEvent;
3629
3630
3631
3632
3633
3634
3635 typedef struct SDL_MouseMotionEvent
3636 {
3637 Uint8 type;
3638 Uint8 which;
3639 Uint8 state;
3640 int x;
3641 int y;
3642 int xrel;
3643 int yrel;
3644 SDL_WindowID windowID;
3645 } SDL_MouseMotionEvent;
3646
3647
3648
3649
3650
3651
3652 typedef struct SDL_MouseButtonEvent
3653 {
3654 Uint8 type;
3655 Uint8 which;
3656 Uint8 button;
3657 Uint8 state;
3658 int x;
3659 int y;
3660 SDL_WindowID windowID;
3661 } SDL_MouseButtonEvent;
3662
3663
3664
3665
3666
3667
3668 typedef struct SDL_MouseWheelEvent
3669 {
3670 Uint8 type;
3671 Uint8 which;
3672 int x;
3673 int y;
3674 SDL_WindowID windowID;
3675 } SDL_MouseWheelEvent;
3676
3677
3678
3679
3680
3681
3682 typedef struct SDL_JoyAxisEvent
3683 {
3684 Uint8 type;
3685 Uint8 which;
3686 Uint8 axis;
3687 int value;
3688 } SDL_JoyAxisEvent;
3689
3690
3691
3692
3693
3694
3695 typedef struct SDL_JoyBallEvent
3696 {
3697 Uint8 type;
3698 Uint8 which;
3699 Uint8 ball;
3700 int xrel;
3701 int yrel;
3702 } SDL_JoyBallEvent;
3703
3704
3705
3706
3707
3708
3709 typedef struct SDL_JoyHatEvent
3710 {
3711 Uint8 type;
3712 Uint8 which;
3713 Uint8 hat;
3714 Uint8 value;
3715
3716
3717
3718
3719
3720 } SDL_JoyHatEvent;
3721
3722
3723
3724
3725
3726
3727 typedef struct SDL_JoyButtonEvent
3728 {
3729 Uint8 type;
3730 Uint8 which;
3731 Uint8 button;
3732 Uint8 state;
3733 } SDL_JoyButtonEvent;
3734
3735
3736
3737
3738
3739
3740 typedef struct SDL_QuitEvent
3741 {
3742 Uint8 type;
3743 } SDL_QuitEvent;
3744
3745
3746
3747
3748
3749
3750 typedef struct SDL_UserEvent
3751 {
3752 Uint8 type;
3753 int code;
3754 void *data1;
3755 void *data2;
3756 SDL_WindowID windowID;
3757 } SDL_UserEvent;
3758 # 297 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h"
3759 struct SDL_SysWMmsg;
3760 typedef struct SDL_SysWMmsg SDL_SysWMmsg;
3761 typedef struct SDL_SysWMEvent
3762 {
3763 Uint8 type;
3764 SDL_SysWMmsg *msg;
3765 } SDL_SysWMEvent;
3766
3767
3768 typedef struct SDL_ActiveEvent
3769 {
3770 Uint8 type;
3771 Uint8 gain;
3772 Uint8 state;
3773 } SDL_ActiveEvent;
3774 typedef struct SDL_ResizeEvent
3775 {
3776 Uint8 type;
3777 int w;
3778 int h;
3779 } SDL_ResizeEvent;
3780
3781
3782
3783
3784
3785
3786 typedef union SDL_Event
3787 {
3788 Uint8 type;
3789 SDL_WindowEvent window;
3790 SDL_KeyboardEvent key;
3791 SDL_TextInputEvent text;
3792 SDL_MouseMotionEvent motion;
3793 SDL_MouseButtonEvent button;
3794 SDL_MouseWheelEvent wheel;
3795 SDL_JoyAxisEvent jaxis;
3796 SDL_JoyBallEvent jball;
3797 SDL_JoyHatEvent jhat;
3798 SDL_JoyButtonEvent jbutton;
3799 SDL_QuitEvent quit;
3800 SDL_UserEvent user;
3801 SDL_SysWMEvent syswm;
3802
3803
3804 SDL_ActiveEvent active;
3805 SDL_ResizeEvent resize;
3806 } SDL_Event;
3807 # 353 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h"
3808 extern __attribute__ ((visibility("default"))) void SDL_PumpEvents(void);
3809 # 367 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h"
3810 typedef enum
3811 {
3812 SDL_ADDEVENT,
3813 SDL_PEEKEVENT,
3814 SDL_GETEVENT
3815 } SDL_eventaction;
3816
3817 extern __attribute__ ((visibility("default"))) int SDL_PeepEvents(SDL_Event * events, int numevents,
3818 SDL_eventaction action,
3819 Uint32 mask);
3820
3821
3822
3823 extern __attribute__ ((visibility("default"))) SDL_bool SDL_HasEvent(Uint32 mask);
3824
3825
3826
3827
3828
3829 extern __attribute__ ((visibility("default"))) int SDL_PollEvent(SDL_Event * event);
3830
3831
3832
3833
3834
3835 extern __attribute__ ((visibility("default"))) int SDL_WaitEvent(SDL_Event * event);
3836
3837
3838
3839
3840
3841 extern __attribute__ ((visibility("default"))) int SDL_PushEvent(SDL_Event * event);
3842
3843
3844
3845
3846
3847
3848
3849 typedef int ( * SDL_EventFilter) (void *userdata, SDL_Event * event);
3850 # 423 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h"
3851 extern __attribute__ ((visibility("default"))) void SDL_SetEventFilter(SDL_EventFilter filter,
3852 void *userdata);
3853
3854
3855
3856
3857
3858 extern __attribute__ ((visibility("default"))) SDL_bool SDL_GetEventFilter(SDL_EventFilter * filter,
3859 void **userdata);
3860
3861
3862
3863
3864
3865 extern __attribute__ ((visibility("default"))) void SDL_FilterEvents(SDL_EventFilter filter,
3866 void *userdata);
3867 # 452 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h"
3868 extern __attribute__ ((visibility("default"))) Uint8 SDL_EventState(Uint8 type, int state);
3869 # 461 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h"
3870 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
3871 # 462 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h" 2
3872 # 85 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2
3873 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_loadso.h" 1
3874 # 48 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_loadso.h"
3875 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
3876 # 49 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_loadso.h" 2
3877 # 60 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_loadso.h"
3878 extern __attribute__ ((visibility("default"))) void * SDL_LoadObject(const char *sofile);
3879
3880
3881
3882
3883
3884 extern __attribute__ ((visibility("default"))) void * SDL_LoadFunction(void *handle,
3885 const char *name);
3886
3887
3888 extern __attribute__ ((visibility("default"))) void SDL_UnloadObject(void *handle);
3889
3890
3891
3892
3893
3894
3895
3896 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
3897 # 79 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_loadso.h" 2
3898 # 86 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2
3899
3900
3901
3902 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_timer.h" 1
3903 # 35 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_timer.h"
3904 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
3905 # 36 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_timer.h" 2
3906 # 52 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_timer.h"
3907 extern __attribute__ ((visibility("default"))) Uint32 SDL_GetTicks(void);
3908
3909
3910 extern __attribute__ ((visibility("default"))) void SDL_Delay(Uint32 ms);
3911
3912
3913 typedef Uint32( * SDL_TimerCallback) (Uint32 interval);
3914 # 88 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_timer.h"
3915 extern __attribute__ ((visibility("default"))) int SDL_SetTimer(Uint32 interval,
3916 SDL_TimerCallback callback);
3917 # 101 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_timer.h"
3918 typedef Uint32( * SDL_NewTimerCallback) (Uint32 interval, void *param);
3919
3920
3921 typedef struct _SDL_TimerID *SDL_TimerID;
3922
3923
3924
3925
3926 extern __attribute__ ((visibility("default"))) SDL_TimerID SDL_AddTimer(Uint32 interval,
3927 SDL_NewTimerCallback
3928 callback, void *param);
3929
3930
3931
3932
3933 extern __attribute__ ((visibility("default"))) SDL_bool SDL_RemoveTimer(SDL_TimerID t);
3934
3935
3936
3937
3938
3939
3940
3941 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
3942 # 125 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_timer.h" 2
3943 # 90 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2
3944
3945 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_version.h" 1
3946 # 34 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_version.h"
3947 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
3948 # 35 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_version.h" 2
3949 # 55 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_version.h"
3950 typedef struct SDL_version
3951 {
3952 Uint8 major;
3953 Uint8 minor;
3954 Uint8 patch;
3955 } SDL_version;
3956 # 132 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_version.h"
3957 extern __attribute__ ((visibility("default"))) void SDL_GetVersion(SDL_version * ver);
3958
3959
3960
3961
3962
3963
3964
3965 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
3966 # 141 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_version.h" 2
3967 # 92 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2
3968 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_compat.h" 1
3969 # 31 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_compat.h"
3970 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
3971 # 32 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_compat.h" 2
3972 # 74 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_compat.h"
3973 typedef struct SDL_VideoInfo
3974 {
3975 Uint32 hw_available:1;
3976 Uint32 wm_available:1;
3977 Uint32 UnusedBits1:6;
3978 Uint32 UnusedBits2:1;
3979 Uint32 blit_hw:1;
3980 Uint32 blit_hw_CC:1;
3981 Uint32 blit_hw_A:1;
3982 Uint32 blit_sw:1;
3983 Uint32 blit_sw_CC:1;
3984 Uint32 blit_sw_A:1;
3985 Uint32 blit_fill:1;
3986 Uint32 UnusedBits3:16;
3987 Uint32 video_mem;
3988
3989 SDL_PixelFormat *vfmt;
3990 } SDL_VideoInfo;
3991 # 107 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_compat.h"
3992 typedef struct SDL_Overlay
3993 {
3994 Uint32 format;
3995 int w, h;
3996 int planes;
3997 Uint16 *pitches;
3998 Uint8 **pixels;
3999
4000
4001 struct private_yuvhwfuncs *hwfuncs;
4002 struct private_yuvhwdata *hwdata;
4003
4004
4005 Uint32 hw_overlay:1;
4006 Uint32 UnusedBits:31;
4007 } SDL_Overlay;
4008
4009 typedef enum
4010 {
4011 SDL_GRAB_QUERY = -1,
4012 SDL_GRAB_OFF = 0,
4013 SDL_GRAB_ON = 1
4014 } SDL_GrabMode;
4015
4016 struct SDL_SysWMinfo;
4017 # 211 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_compat.h"
4018 extern __attribute__ ((visibility("default"))) const SDL_version * SDL_Linked_Version(void);
4019 extern __attribute__ ((visibility("default"))) char * SDL_AudioDriverName(char *namebuf, int maxlen);
4020 extern __attribute__ ((visibility("default"))) char * SDL_VideoDriverName(char *namebuf, int maxlen);
4021 extern __attribute__ ((visibility("default"))) const SDL_VideoInfo * SDL_GetVideoInfo(void);
4022 extern __attribute__ ((visibility("default"))) int SDL_VideoModeOK(int width,
4023 int height,
4024 int bpp, Uint32 flags);
4025 extern __attribute__ ((visibility("default"))) SDL_Rect ** SDL_ListModes(SDL_PixelFormat * format,
4026 Uint32 flags);
4027 extern __attribute__ ((visibility("default"))) SDL_Surface * SDL_SetVideoMode(int width,
4028 int height,
4029 int bpp, Uint32 flags);
4030 extern __attribute__ ((visibility("default"))) SDL_Surface * SDL_GetVideoSurface(void);
4031 extern __attribute__ ((visibility("default"))) void SDL_UpdateRects(SDL_Surface * screen,
4032 int numrects, SDL_Rect * rects);
4033 extern __attribute__ ((visibility("default"))) void SDL_UpdateRect(SDL_Surface * screen,
4034 Sint32 x,
4035 Sint32 y, Uint32 w, Uint32 h);
4036 extern __attribute__ ((visibility("default"))) int SDL_Flip(SDL_Surface * screen);
4037 extern __attribute__ ((visibility("default"))) int SDL_SetAlpha(SDL_Surface * surface,
4038 Uint32 flag, Uint8 alpha);
4039 extern __attribute__ ((visibility("default"))) SDL_Surface * SDL_DisplayFormat(SDL_Surface * surface);
4040 extern __attribute__ ((visibility("default"))) SDL_Surface * SDL_DisplayFormatAlpha(SDL_Surface *
4041 surface);
4042 extern __attribute__ ((visibility("default"))) void SDL_WM_SetCaption(const char *title,
4043 const char *icon);
4044 extern __attribute__ ((visibility("default"))) void SDL_WM_GetCaption(const char **title,
4045 const char **icon);
4046 extern __attribute__ ((visibility("default"))) void SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask);
4047 extern __attribute__ ((visibility("default"))) int SDL_WM_IconifyWindow(void);
4048 extern __attribute__ ((visibility("default"))) int SDL_WM_ToggleFullScreen(SDL_Surface * surface);
4049 extern __attribute__ ((visibility("default"))) SDL_GrabMode SDL_WM_GrabInput(SDL_GrabMode mode);
4050 extern __attribute__ ((visibility("default"))) int SDL_SetPalette(SDL_Surface * surface,
4051 int flags,
4052 const SDL_Color * colors,
4053 int firstcolor, int ncolors);
4054 extern __attribute__ ((visibility("default"))) int SDL_SetColors(SDL_Surface * surface,
4055 const SDL_Color * colors,
4056 int firstcolor, int ncolors);
4057 extern __attribute__ ((visibility("default"))) int SDL_GetWMInfo(struct SDL_SysWMinfo *info);
4058 extern __attribute__ ((visibility("default"))) Uint8 SDL_GetAppState(void);
4059 extern __attribute__ ((visibility("default"))) void SDL_WarpMouse(Uint16 x, Uint16 y);
4060 extern __attribute__ ((visibility("default"))) SDL_Overlay * SDL_CreateYUVOverlay(int width,
4061 int height,
4062 Uint32 format,
4063 SDL_Surface *
4064 display);
4065 extern __attribute__ ((visibility("default"))) int SDL_LockYUVOverlay(SDL_Overlay * overlay);
4066 extern __attribute__ ((visibility("default"))) void SDL_UnlockYUVOverlay(SDL_Overlay * overlay);
4067 extern __attribute__ ((visibility("default"))) int SDL_DisplayYUVOverlay(SDL_Overlay * overlay,
4068 SDL_Rect * dstrect);
4069 extern __attribute__ ((visibility("default"))) void SDL_FreeYUVOverlay(SDL_Overlay * overlay);
4070 extern __attribute__ ((visibility("default"))) void SDL_GL_SwapBuffers(void);
4071 extern __attribute__ ((visibility("default"))) int SDL_EnableKeyRepeat(int delay, int interval);
4072 extern __attribute__ ((visibility("default"))) void SDL_GetKeyRepeat(int *delay, int *interval);
4073 extern __attribute__ ((visibility("default"))) int SDL_EnableUNICODE(int enable);
4074
4075
4076
4077
4078
4079
4080
4081 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
4082 # 275 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_compat.h" 2
4083 # 93 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2
4084
4085 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
4086 # 95 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2
4087 # 121 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h"
4088 extern __attribute__ ((visibility("default"))) int SDL_Init(Uint32 flags);
4089
4090
4091 extern __attribute__ ((visibility("default"))) int SDL_InitSubSystem(Uint32 flags);
4092
4093
4094 extern __attribute__ ((visibility("default"))) void SDL_QuitSubSystem(Uint32 flags);
4095
4096
4097
4098
4099
4100 extern __attribute__ ((visibility("default"))) Uint32 SDL_WasInit(Uint32 flags);
4101
4102
4103
4104
4105 extern __attribute__ ((visibility("default"))) void SDL_Quit(void);
4106
4107
4108
4109
4110
4111
4112
4113 # 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
4114 # 147 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2
4115 # 3 "/home/lifning/hack/nds-test/source/main.c" 2
4116 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 1
4117 # 44 "/home/lifning/hack/devkitPro/libnds/include/nds.h"
4118 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/jtypes.h" 1
4119 # 65 "/home/lifning/hack/devkitPro/libnds/include/nds/jtypes.h"
4120 # 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 1 3
4121 # 45 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 3
4122 typedef signed char int8_t ;
4123 typedef unsigned char uint8_t ;
4124
4125
4126
4127
4128 typedef signed char int_least8_t;
4129 typedef unsigned char uint_least8_t;
4130
4131
4132
4133
4134 typedef signed short int16_t;
4135 typedef unsigned short uint16_t;
4136 # 71 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 3
4137 typedef int16_t int_least16_t;
4138 typedef uint16_t uint_least16_t;
4139 # 83 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 3
4140 typedef signed int int32_t;
4141 typedef unsigned int uint32_t;
4142 # 101 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 3
4143 typedef int32_t int_least32_t;
4144 typedef uint32_t uint_least32_t;
4145 # 123 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 3
4146 typedef signed long long int64_t;
4147 typedef unsigned long long uint64_t;
4148 # 133 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 3
4149 typedef int64_t int_least64_t;
4150 typedef uint64_t uint_least64_t;
4151 # 163 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 3
4152 typedef signed int int_fast8_t;
4153 typedef unsigned int uint_fast8_t;
4154
4155
4156
4157
4158 typedef signed int int_fast16_t;
4159 typedef unsigned int uint_fast16_t;
4160
4161
4162
4163
4164 typedef signed int int_fast32_t;
4165 typedef unsigned int uint_fast32_t;
4166 # 217 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 3
4167 typedef int_least64_t int_fast64_t;
4168 typedef uint_least64_t uint_fast64_t;
4169
4170
4171
4172
4173
4174
4175
4176 typedef long long int intmax_t;
4177 # 235 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 3
4178 typedef long long unsigned int uintmax_t;
4179 # 247 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 3
4180 typedef signed int intptr_t;
4181 typedef unsigned int uintptr_t;
4182 # 66 "/home/lifning/hack/devkitPro/libnds/include/nds/jtypes.h" 2
4183
4184 typedef uint8_t uint8;
4185 typedef uint16_t uint16;
4186 typedef uint32_t uint32;
4187 typedef uint64_t uint64;
4188
4189 typedef int8_t int8;
4190 typedef int16_t int16;
4191 typedef int32_t int32;
4192 typedef int64_t int64;
4193
4194 typedef float float32;
4195 typedef double float64;
4196
4197 typedef volatile uint8_t vuint8;
4198 typedef volatile uint16_t vuint16;
4199 typedef volatile uint32_t vuint32;
4200 typedef volatile uint64_t vuint64;
4201
4202 typedef volatile int8_t vint8;
4203 typedef volatile int16_t vint16;
4204 typedef volatile int32_t vint32;
4205 typedef volatile int64_t vint64;
4206
4207 typedef volatile float32 vfloat32;
4208 typedef volatile float64 vfloat64;
4209
4210 typedef uint8_t byte;
4211
4212 typedef uint8_t u8;
4213 typedef uint16_t u16;
4214 typedef uint32_t u32;
4215 typedef uint64_t u64;
4216
4217 typedef int8_t s8;
4218 typedef int16_t s16;
4219 typedef int32_t s32;
4220 typedef int64_t s64;
4221
4222 typedef volatile u8 vu8;
4223 typedef volatile u16 vu16;
4224 typedef volatile u32 vu32;
4225 typedef volatile u64 vu64;
4226
4227 typedef volatile s8 vs8;
4228 typedef volatile s16 vs16;
4229 typedef volatile s32 vs32;
4230 typedef volatile s64 vs64;
4231
4232 typedef struct touchPosition {
4233 int16 x;
4234 int16 y;
4235 int16 px;
4236 int16 py;
4237 int16 z1;
4238 int16 z2;
4239 } touchPosition;
4240
4241
4242
4243
4244
4245
4246 typedef enum { false, true } bool;
4247
4248
4249
4250 typedef void ( * IntFn)(void);
4251 typedef void (* VoidFunctionPointer)(void);
4252 typedef void (* fp)(void);
4253 # 45 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
4254 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h" 1
4255 # 47 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
4256 typedef struct DecompressionStream {
4257 int (*getSize)(uint8 * source, uint16 * dest, uint32 r2);
4258 int (*getResult)(uint8 * source);
4259 uint8 (*readByte)(uint8 * source);
4260 } __attribute__ ((packed)) TDecompressionStream;
4261
4262
4263 typedef struct UnpackStruct {
4264 uint16 sourceSize;
4265 uint8 sourceWidth;
4266 uint8 destWidth;
4267 uint32 dataOffset;
4268 } __attribute__ ((packed)) TUnpackStruct, * PUnpackStruct;
4269
4270
4271
4272
4273
4274
4275 void swiSoftReset(void);
4276 # 84 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
4277 void swiDelay(uint32 duration);
4278 # 98 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
4279 void swiIntrWait(int waitForSet, uint32 flags);
4280 # 108 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
4281 void swiWaitForVBlank(void);
4282 # 135 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
4283 int swiDivide(int numerator, int divisor);
4284 int swiRemainder(int numerator, int divisor);
4285 void swiDivMod(int numerator, int divisor, int * result, int * remainder);
4286 # 168 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
4287 void swiCopy(const void * source, void * dest, int flags);
4288 void swiFastCopy(const void * source, void * dest, int flags);
4289
4290
4291
4292 int swiSqrt(int value);
4293 # 182 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
4294 uint16 swiCRC16(uint16 crc, void * data, uint32 size);
4295
4296
4297
4298
4299
4300
4301 int swiIsDebugger(void);
4302 # 207 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
4303 void swiUnpackBits(uint8 * source, uint32 * destination, PUnpackStruct params);
4304 # 220 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
4305 void swiDecompressLZSSWram(void * source, void * destination);
4306 int swiDecompressLZSSVram(void * source, void * destination, uint32 toGetSize, TDecompressionStream * stream);
4307
4308
4309
4310
4311 int swiDecompressHuffman(void * source, void * destination, uint32 toGetSize, TDecompressionStream * stream);
4312 # 260 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
4313 void swiDecompressRLEWram(void * source, void * destination);
4314 int swiDecompressRLEVram(void * source, void * destination, uint32 toGetSize, TDecompressionStream * stream);
4315 # 279 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
4316 void swiWaitForIRQ(void);
4317
4318 void swiSetHaltCR(uint32 data);
4319
4320
4321 extern void swiDecodeDelta8(void * source, void * destination);
4322 # 295 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
4323 void swiDecodeDelta16(void * source, void * destination);
4324 # 46 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
4325 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/card.h" 1
4326 # 32 "/home/lifning/hack/devkitPro/libnds/include/nds/card.h"
4327 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/jtypes.h" 1
4328 # 33 "/home/lifning/hack/devkitPro/libnds/include/nds/card.h" 2
4329 # 78 "/home/lifning/hack/devkitPro/libnds/include/nds/card.h"
4330 void cardWriteCommand(const uint8 * command);
4331
4332 void cardPolledTransfer(uint32 flags, uint32 * destination, uint32 length, const uint8 * command);
4333 void cardStartTransfer(const uint8 * command, uint32 * destination, int channel, uint32 flags);
4334 uint32 cardWriteAndRead(const uint8 * command, uint32 flags);
4335
4336
4337
4338 void cardRead00(uint32 address, uint32 * destination, uint32 length, uint32 flags);
4339 void cardReadHeader(uint8 * header);
4340 int cardReadID(uint32 flags);
4341
4342
4343 void cardReadEeprom(uint32 address, uint8 *data, uint32 length, uint32 addrtype);
4344
4345
4346 void cardWriteEeprom(uint32 address, uint8 *data, uint32 length, uint32 addrtype);
4347
4348
4349
4350 uint8 cardEepromReadID(uint8 i);
4351
4352
4353 uint8 cardEepromCommand(uint8 command, uint32 address);
4354 # 110 "/home/lifning/hack/devkitPro/libnds/include/nds/card.h"
4355 int cardEepromGetType(void);
4356
4357
4358 uint32 cardEepromGetSize();
4359
4360
4361 void cardEepromChipErase(void);
4362
4363
4364 void cardEepromSectorErase(uint32 address);
4365 # 47 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
4366 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/dma.h" 1
4367 # 93 "/home/lifning/hack/devkitPro/libnds/include/nds/dma.h"
4368 static inline void dmaCopyWords(uint8 channel, const void* src, void* dest, uint32 size) {
4369 (*(vuint32*)(0x040000B0+(channel*12))) = (uint32)src;
4370 (*(vuint32*)(0x040000B4+(channel*12))) = (uint32)dest;
4371 (*(vuint32*)(0x040000B8+(channel*12))) = ((1 << (31)) | (1 << (26)) | 0) | (size>>2);
4372 while((*(vuint32*)(0x040000B8+(channel*12))) & (1 << (31)));
4373 }
4374
4375 static inline void dmaCopyHalfWords(uint8 channel, const void* src, void* dest, uint32 size) {
4376 (*(vuint32*)(0x040000B0+(channel*12))) = (uint32)src;
4377 (*(vuint32*)(0x040000B4+(channel*12))) = (uint32)dest;
4378 (*(vuint32*)(0x040000B8+(channel*12))) = ((1 << (31)) | 0 | 0) | (size>>1);
4379 while((*(vuint32*)(0x040000B8+(channel*12))) & (1 << (31)));
4380 }
4381
4382 static inline void dmaCopy(const void * source, void * dest, uint32 size) {
4383 (*(vuint32*)(0x040000B0+(3*12))) = (uint32)source;
4384 (*(vuint32*)(0x040000B4+(3*12))) = (uint32)dest;
4385 (*(vuint32*)(0x040000B8+(3*12))) = ((1 << (31)) | 0 | 0) | (size>>1);
4386 while((*(vuint32*)(0x040000B8+(3*12))) & (1 << (31)));
4387 }
4388
4389 static inline void dmaCopyWordsAsynch(uint8 channel, const void* src, void* dest, uint32 size) {
4390 (*(vuint32*)(0x040000B0+(channel*12))) = (uint32)src;
4391 (*(vuint32*)(0x040000B4+(channel*12))) = (uint32)dest;
4392 (*(vuint32*)(0x040000B8+(channel*12))) = ((1 << (31)) | (1 << (26)) | 0) | (size>>2);
4393
4394 }
4395
4396 static inline void dmaCopyHalfWordsAsynch(uint8 channel, const void* src, void* dest, uint32 size) {
4397 (*(vuint32*)(0x040000B0+(channel*12))) = (uint32)src;
4398 (*(vuint32*)(0x040000B4+(channel*12))) = (uint32)dest;
4399 (*(vuint32*)(0x040000B8+(channel*12))) = ((1 << (31)) | 0 | 0) | (size>>1);
4400 }
4401
4402 static inline void dmaCopyAsynch(const void * source, void * dest, uint32 size) {
4403 (*(vuint32*)(0x040000B0+(3*12))) = (uint32)source;
4404 (*(vuint32*)(0x040000B4+(3*12))) = (uint32)dest;
4405 (*(vuint32*)(0x040000B8+(3*12))) = ((1 << (31)) | 0 | 0) | (size>>1);
4406 }
4407
4408 static inline void dmaFillWords( const void* src, void* dest, uint32 size) {
4409 (*(vuint32*)(0x040000B0+(3*12))) = (uint32)src;
4410 (*(vuint32*)(0x040000B4+(3*12))) = (uint32)dest;
4411 (*(vuint32*)(0x040000B8+(3*12))) = (1 << (24)) | ((1 << (31)) | (1 << (26)) | 0) | (size>>2);
4412 while((*(vuint32*)(0x040000B8+(3*12))) & (1 << (31)));
4413 }
4414
4415 static inline void dmaFillHalfWords( const void* src, void* dest, uint32 size) {
4416 (*(vuint32*)(0x040000B0+(3*12))) = (uint32)src;
4417 (*(vuint32*)(0x040000B4+(3*12))) = (uint32)dest;
4418 (*(vuint32*)(0x040000B8+(3*12))) = (1 << (24)) | ((1 << (31)) | 0 | 0) | (size>>1);
4419 while((*(vuint32*)(0x040000B8+(3*12))) & (1 << (31)));
4420 }
4421
4422 static inline int dmaBusy(uint8 channel) {
4423 return ((*(vuint32*)(0x040000B8+(channel*12))) & (1 << (31)))>>31;
4424 }
4425 # 48 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
4426 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/interrupts.h" 1
4427 # 47 "/home/lifning/hack/devkitPro/libnds/include/nds/interrupts.h"
4428 enum IRQ_MASKS {
4429 IRQ_VBLANK = (1 << (0)),
4430 IRQ_HBLANK = (1 << (1)),
4431 IRQ_VCOUNT = (1 << (2)),
4432 IRQ_TIMER0 = (1 << (3)),
4433 IRQ_TIMER1 = (1 << (4)),
4434 IRQ_TIMER2 = (1 << (5)),
4435 IRQ_TIMER3 = (1 << (6)),
4436 IRQ_NETWORK = (1 << (7)),
4437 IRQ_DMA0 = (1 << (8)),
4438 IRQ_DMA1 = (1 << (9)),
4439 IRQ_DMA2 = (1 << (10)),
4440 IRQ_DMA3 = (1 << (11)),
4441 IRQ_KEYS = (1 << (12)),
4442 IRQ_CART = (1 << (13)),
4443 IRQ_IPC_SYNC = (1 << (16)),
4444 IRQ_FIFO_EMPTY = (1 << (17)),
4445 IRQ_FIFO_NOT_EMPTY = (1 << (18)),
4446 IRQ_CARD = (1 << (19)),
4447 IRQ_CARD_LINE = (1 << (20)),
4448 IRQ_GEOMETRY_FIFO = (1 << (21)),
4449 IRQ_LID = (1 << (22)),
4450 IRQ_SPI = (1 << (23)),
4451 IRQ_WIFI = (1 << (24)),
4452 IRQ_ALL = (~0)
4453 };
4454
4455
4456
4457 typedef enum IRQ_MASKS IRQ_MASK;
4458 # 112 "/home/lifning/hack/devkitPro/libnds/include/nds/interrupts.h"
4459 enum IME_VALUE {
4460 IME_DISABLE = 0,
4461 IME_ENABLE = 1,
4462 };
4463
4464
4465
4466
4467
4468
4469
4470 extern VoidFunctionPointer __irq_vector[];
4471 extern vuint32 __irq_flags[];
4472
4473
4474
4475 struct IntTable{IntFn handler; u32 mask;};
4476 # 137 "/home/lifning/hack/devkitPro/libnds/include/nds/interrupts.h"
4477 void irqInit();
4478 # 152 "/home/lifning/hack/devkitPro/libnds/include/nds/interrupts.h"
4479 void irqSet(IRQ_MASK irq, VoidFunctionPointer handler);
4480
4481
4482
4483
4484 void irqClear(IRQ_MASK irq);
4485 # 167 "/home/lifning/hack/devkitPro/libnds/include/nds/interrupts.h"
4486 void irqInitHandler(VoidFunctionPointer handler);
4487
4488
4489
4490
4491
4492 void irqEnable(uint32 irq);
4493
4494
4495
4496
4497
4498 void irqDisable(uint32 irq);
4499 # 49 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
4500 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/ipc.h" 1
4501 # 36 "/home/lifning/hack/devkitPro/libnds/include/nds/ipc.h"
4502 typedef struct sTransferSoundData {
4503
4504 const void *data;
4505 u32 len;
4506 u32 rate;
4507 u8 vol;
4508 u8 pan;
4509 u8 format;
4510 u8 PADDING;
4511 } TransferSoundData, * pTransferSoundData;
4512
4513
4514
4515 typedef struct sTransferSound {
4516
4517 TransferSoundData data[16];
4518 u8 count;
4519 u8 PADDING[3];
4520 } TransferSound, * pTransferSound;
4521
4522
4523
4524 typedef struct sTransferRegion {
4525
4526 vint16 touchX, touchY;
4527 vint16 touchXpx, touchYpx;
4528 vint16 touchZ1, touchZ2;
4529 vuint16 tdiode1, tdiode2;
4530 vuint32 temperature;
4531
4532 uint16 buttons;
4533
4534 union {
4535 vuint8 curtime[8];
4536
4537 struct {
4538 vu8 command;
4539 vu8 year;
4540 vu8 month;
4541 vu8 day;
4542
4543 vu8 weekday;
4544 vu8 hours;
4545 vu8 minutes;
4546 vu8 seconds;
4547 } rtc;
4548 } time;
4549 vint32 unixTime;
4550
4551 uint16 battery;
4552 uint16 aux;
4553
4554
4555 pTransferSound soundData;
4556
4557 vuint32 mailAddr;
4558 vuint32 mailData;
4559 vuint8 mailRead;
4560 vuint8 mailBusy;
4561 vuint32 mailSize;
4562 } TransferRegion, * pTransferRegion;
4563
4564
4565 static inline
4566 TransferRegion volatile * getIPC();
4567
4568 static inline
4569 TransferRegion volatile * getIPC() {
4570 return (TransferRegion volatile *)(0x027FF000);
4571 }
4572 # 119 "/home/lifning/hack/devkitPro/libnds/include/nds/ipc.h"
4573 enum IPC_SYNC_BITS {
4574 IPC_SYNC_IRQ_ENABLE = (1 << (14)),
4575 IPC_SYNC_IRQ_REQUEST = (1 << (13))
4576 };
4577
4578
4579 static inline void IPC_SendSync(unsigned int sync) {
4580
4581 (*(vuint16*)0x04000180) = ((*(vuint16*)0x04000180) & 0xf0ff) | (((sync) & 0x0f) << 8) | IPC_SYNC_IRQ_REQUEST;
4582 }
4583
4584
4585 static inline int IPC_GetSync() {
4586
4587 return (*(vuint16*)0x04000180) & 0x0f;
4588 }
4589 # 143 "/home/lifning/hack/devkitPro/libnds/include/nds/ipc.h"
4590 enum IPC_CONTROL_BITS {
4591 IPC_FIFO_SEND_EMPTY = (1<<0),
4592 IPC_FIFO_SEND_FULL = (1<<1),
4593 IPC_FIFO_SEND_IRQ = (1<<2),
4594 IPC_FIFO_SEND_CLEAR = (1<<3),
4595 IPC_FIFO_RECV_EMPTY = (1<<8),
4596 IPC_FIFO_RECV_FULL = (1<<9),
4597 IPC_FIFO_RECV_IRQ = (1<<10),
4598 IPC_FIFO_ERROR = (1<<14),
4599 IPC_FIFO_ENABLE = (1<<15)
4600 };
4601 # 50 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
4602 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/memory.h" 1
4603 # 104 "/home/lifning/hack/devkitPro/libnds/include/nds/memory.h"
4604 typedef struct sGBAHeader {
4605 uint32 entryPoint;
4606 uint8 logo[156];
4607 char title[0xC];
4608 char gamecode[0x4];
4609 uint16 makercode;
4610 uint8 is96h;
4611 uint8 unitcode;
4612 uint8 devicecode;
4613 uint8 unused[7];
4614 uint8 version;
4615 uint8 complement;
4616 uint16 checksum;
4617 } __attribute__ ((__packed__)) tGBAHeader;
4618
4619
4620
4621
4622 typedef struct sNDSHeader {
4623 char gameTitle[12];
4624 char gameCode[4];
4625 char makercode[2];
4626 uint8 unitCode;
4627 uint8 deviceType;
4628 uint8 deviceSize;
4629 uint8 reserved1[9];
4630 uint8 romversion;
4631 uint8 flags;
4632
4633 uint32 arm9romSource;
4634 uint32 arm9executeAddress;
4635 uint32 arm9destination;
4636 uint32 arm9binarySize;
4637
4638 uint32 arm7romSource;
4639 uint32 arm7executeAddress;
4640 uint32 arm7destination;
4641 uint32 arm7binarySize;
4642
4643 uint32 filenameSource;
4644 uint32 filenameSize;
4645 uint32 fatSource;
4646 uint32 fatSize;
4647
4648 uint32 arm9overlaySource;
4649 uint32 arm9overlaySize;
4650 uint32 arm7overlaySource;
4651 uint32 arm7overlaySize;
4652
4653 uint32 cardControl13;
4654 uint32 cardControlBF;
4655 uint32 bannerOffset;
4656
4657 uint16 secureCRC16;
4658
4659 uint16 readTimeout;
4660
4661 uint32 unknownRAM1;
4662 uint32 unknownRAM2;
4663
4664 uint32 bfPrime1;
4665 uint32 bfPrime2;
4666 uint32 romSize;
4667
4668 uint32 headerSize;
4669 uint32 zeros88[14];
4670 uint8 gbaLogo[156];
4671 uint16 logoCRC16;
4672 uint16 headerCRC16;
4673
4674 uint32 debugRomSource;
4675 uint32 debugRomSize;
4676 uint32 debugRomDestination;
4677 uint32 offset_0x16C;
4678
4679 uint8 zero[0x90];
4680 } __attribute__ ((__packed__)) tNDSHeader;
4681
4682
4683
4684
4685 typedef struct sNDSBanner {
4686 uint16 version;
4687 uint16 crc;
4688 uint8 reserved[28];
4689 uint8 icon[512];
4690 uint16 palette[16];
4691 uint16 titles[6][128];
4692 } __attribute__ ((__packed__)) tNDSBanner;
4693 # 204 "/home/lifning/hack/devkitPro/libnds/include/nds/memory.h"
4694 static inline void sysSetCartOwner(bool arm9) {
4695 (*(vuint16*)0x04000204) = ((*(vuint16*)0x04000204) & ~(1 << (7))) | (arm9 ? 0 : (1 << (7)));
4696 }
4697
4698 static inline void sysSetCardOwner(bool arm9) {
4699 (*(vuint16*)0x04000204) = ((*(vuint16*)0x04000204) & ~(1 << (11))) | (arm9 ? 0 : (1 << (11)));
4700 }
4701
4702
4703 static inline void sysSetBusOwners(bool arm9rom, bool arm9card) {
4704 uint16 pattern = (*(vuint16*)0x04000204) & ~((1 << (11))|(1 << (7)));
4705 pattern = pattern | (arm9card ? 0: (1 << (11)) ) |
4706 (arm9rom ? 0: (1 << (7)) );
4707 (*(vuint16*)0x04000204) = pattern;
4708 }
4709 # 51 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
4710 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/system.h" 1
4711 # 62 "/home/lifning/hack/devkitPro/libnds/include/nds/system.h"
4712 static inline
4713 void SetYtrigger(int Yvalue) {
4714 (*(vu16*)0x04000004) = ((*(vu16*)0x04000004) & 0x007F ) | (Yvalue << 8) | (( Yvalue & 0x100 ) >> 2) ;
4715 }
4716 # 88 "/home/lifning/hack/devkitPro/libnds/include/nds/system.h"
4717 static inline
4718 void powerON(int on) { *(vu16*)0x4000304 |= on;}
4719
4720
4721
4722
4723
4724
4725
4726 static inline void powerSET(int on) { *(vu16*)0x4000304 = on;}
4727
4728
4729
4730
4731 static inline void powerOFF(int off) { *(vu16*)0x4000304 &= ~off;}
4732 # 137 "/home/lifning/hack/devkitPro/libnds/include/nds/system.h"
4733 static inline void lcdSwap(void) { *(vu16*)0x4000304 ^= (1 << (15)); }
4734
4735
4736 static inline void lcdMainOnTop(void) { *(vu16*)0x4000304 |= (1 << (15)); }
4737
4738
4739 static inline void lcdMainOnBottom(void) { *(vu16*)0x4000304 &= ~(1 << (15)); }
4740 # 173 "/home/lifning/hack/devkitPro/libnds/include/nds/system.h"
4741 typedef struct tPERSONAL_DATA {
4742 u8 RESERVED0[2];
4743
4744 u8 theme;
4745 u8 birthMonth;
4746 u8 birthDay;
4747
4748 u8 RESERVED1[1];
4749
4750 s16 name[10];
4751 u16 nameLen;
4752
4753 s16 message[26];
4754 u16 messageLen;
4755
4756 u8 alarmHour;
4757 u8 alarmMinute;
4758
4759
4760 u8 RESERVED2[4];
4761
4762
4763 u16 calX1;
4764 u16 calY1;
4765 u8 calX1px;
4766 u8 calY1px;
4767
4768 u16 calX2;
4769 u16 calY2;
4770 u8 calX2px;
4771 u8 calY2px;
4772
4773 struct __attribute__ ((packed)) {
4774 unsigned language : 3;
4775 unsigned gbaScreen : 1;
4776 unsigned defaultBrightness : 2;
4777 unsigned autoMode : 1;
4778 unsigned RESERVED1 : 2;
4779 unsigned settingsLost : 1;
4780 unsigned RESERVED2 : 6;
4781 } _user_data;
4782
4783 u16 RESERVED3;
4784 u32 rtcOffset;
4785 u32 RESERVED4;
4786 } __attribute__ ((packed)) PERSONAL_DATA ;
4787 # 238 "/home/lifning/hack/devkitPro/libnds/include/nds/system.h"
4788 struct __argv {
4789 int argvMagic;
4790 char *commandLine;
4791 int length;
4792 };
4793 # 52 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
4794 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/timers.h" 1
4795 # 53 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
4796
4797
4798
4799
4800
4801 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/background.h" 1
4802 # 59 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
4803 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/boxtest.h" 1
4804 # 35 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/boxtest.h"
4805 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/video.h" 1
4806 # 70 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/video.h"
4807 typedef enum {
4808 VRAM_A_LCD = 0,
4809 VRAM_A_MAIN_BG = 1,
4810 VRAM_A_MAIN_BG_0x06000000 = 1 | ((0)<<3),
4811 VRAM_A_MAIN_BG_0x06020000 = 1 | ((1)<<3),
4812 VRAM_A_MAIN_BG_0x06040000 = 1 | ((2)<<3),
4813 VRAM_A_MAIN_BG_0x06060000 = 1 | ((3)<<3),
4814 VRAM_A_MAIN_SPRITE = 2,
4815 VRAM_A_MAIN_SPRITE_0x06400000 = 2,
4816 VRAM_A_MAIN_SPRITE_0x06420000 = 2 | ((1)<<3),
4817 VRAM_A_TEXTURE = 3,
4818 VRAM_A_TEXTURE_SLOT0 = 3 | ((0)<<3),
4819 VRAM_A_TEXTURE_SLOT1 = 3 | ((1)<<3),
4820 VRAM_A_TEXTURE_SLOT2 = 3 | ((2)<<3),
4821 VRAM_A_TEXTURE_SLOT3 = 3 | ((3)<<3)
4822 } VRAM_A_TYPE;
4823
4824 typedef enum {
4825 VRAM_B_LCD = 0,
4826 VRAM_B_MAIN_BG = 1 | ((1)<<3),
4827 VRAM_B_MAIN_BG_0x06000000 = 1 | ((0)<<3),
4828 VRAM_B_MAIN_BG_0x06020000 = 1 | ((1)<<3),
4829 VRAM_B_MAIN_BG_0x06040000 = 1 | ((2)<<3),
4830 VRAM_B_MAIN_BG_0x06060000 = 1 | ((3)<<3),
4831 VRAM_B_MAIN_SPRITE = 2 | ((1)<<3),
4832 VRAM_B_MAIN_SPRITE_0x06400000 = 2,
4833 VRAM_B_MAIN_SPRITE_0x06420000 = 2 | ((1)<<3),
4834 VRAM_B_TEXTURE = 3 | ((1)<<3),
4835 VRAM_B_TEXTURE_SLOT0 = 3 | ((0)<<3),
4836 VRAM_B_TEXTURE_SLOT1 = 3 | ((1)<<3),
4837 VRAM_B_TEXTURE_SLOT2 = 3 | ((2)<<3),
4838 VRAM_B_TEXTURE_SLOT3 = 3 | ((3)<<3)
4839 } VRAM_B_TYPE;
4840
4841 typedef enum {
4842 VRAM_C_LCD = 0,
4843 VRAM_C_MAIN_BG = 1 | ((2)<<3),
4844 VRAM_C_MAIN_BG_0x06000000 = 1 | ((0)<<3),
4845 VRAM_C_MAIN_BG_0x06020000 = 1 | ((1)<<3),
4846 VRAM_C_MAIN_BG_0x06040000 = 1 | ((2)<<3),
4847 VRAM_C_MAIN_BG_0x06060000 = 1 | ((3)<<3),
4848 VRAM_C_ARM7 = 2,
4849 VRAM_C_ARM7_0x06000000 = 2,
4850 VRAM_C_ARM7_0x06020000 = 2 | ((1)<<3),
4851 VRAM_C_SUB_BG = 4,
4852 VRAM_C_SUB_BG_0x06200000 = 4 | ((0)<<3),
4853 VRAM_C_SUB_BG_0x06220000 = 4 | ((1)<<3),
4854 VRAM_C_SUB_BG_0x06240000 = 4 | ((2)<<3),
4855 VRAM_C_SUB_BG_0x06260000 = 4 | ((3)<<3),
4856 VRAM_C_TEXTURE = 3 | ((2)<<3),
4857 VRAM_C_TEXTURE_SLOT0 = 3 | ((0)<<3),
4858 VRAM_C_TEXTURE_SLOT1 = 3 | ((1)<<3),
4859 VRAM_C_TEXTURE_SLOT2 = 3 | ((2)<<3),
4860 VRAM_C_TEXTURE_SLOT3 = 3 | ((3)<<3)
4861 } VRAM_C_TYPE;
4862
4863 typedef enum {
4864 VRAM_D_LCD = 0,
4865 VRAM_D_MAIN_BG = 1 | ((3)<<3),
4866 VRAM_D_MAIN_BG_0x06000000 = 1 | ((0)<<3),
4867 VRAM_D_MAIN_BG_0x06020000 = 1 | ((1)<<3),
4868 VRAM_D_MAIN_BG_0x06040000 = 1 | ((2)<<3),
4869 VRAM_D_MAIN_BG_0x06060000 = 1 | ((3)<<3),
4870 VRAM_D_ARM7 = 2 | ((1)<<3),
4871 VRAM_D_ARM7_0x06000000 = 2,
4872 VRAM_D_ARM7_0x06020000 = 2 | ((1)<<3),
4873 VRAM_D_SUB_SPRITE = 4,
4874 VRAM_D_TEXTURE = 3 | ((3)<<3),
4875 VRAM_D_TEXTURE_SLOT0 = 3 | ((0)<<3),
4876 VRAM_D_TEXTURE_SLOT1 = 3 | ((1)<<3),
4877 VRAM_D_TEXTURE_SLOT2 = 3 | ((2)<<3),
4878 VRAM_D_TEXTURE_SLOT3 = 3 | ((3)<<3)
4879 } VRAM_D_TYPE;
4880
4881 typedef enum {
4882 VRAM_E_LCD = 0,
4883 VRAM_E_MAIN_BG = 1,
4884 VRAM_E_MAIN_SPRITE = 2,
4885 VRAM_E_TEX_PALETTE = 3,
4886 VRAM_E_BG_EXT_PALETTE = 4,
4887 VRAM_E_OBJ_EXT_PALETTE = 5,
4888 } VRAM_E_TYPE;
4889
4890 typedef enum {
4891 VRAM_F_LCD = 0,
4892 VRAM_F_MAIN_BG = 1,
4893 VRAM_F_MAIN_SPRITE = 2,
4894 VRAM_F_MAIN_SPRITE_0x06000000 = 2,
4895 VRAM_F_MAIN_SPRITE_0x06004000 = 2 | ((1)<<3),
4896 VRAM_F_MAIN_SPRITE_0x06010000 = 2 | ((2)<<3),
4897 VRAM_F_MAIN_SPRITE_0x06014000 = 2 | ((3)<<3),
4898 VRAM_F_TEX_PALETTE = 3,
4899 VRAM_F_BG_EXT_PALETTE = 4,
4900 VRAM_F_OBJ_EXT_PALETTE = 5,
4901 } VRAM_F_TYPE;
4902
4903 typedef enum {
4904 VRAM_G_LCD = 0,
4905 VRAM_G_MAIN_BG = 1,
4906 VRAM_G_MAIN_SPRITE = 2,
4907 VRAM_G_MAIN_SPRITE_0x06000000 = 2,
4908 VRAM_G_MAIN_SPRITE_0x06004000 = 2 | ((1)<<3),
4909 VRAM_G_MAIN_SPRITE_0x06010000 = 2 | ((2)<<3),
4910 VRAM_G_MAIN_SPRITE_0x06014000 = 2 | ((3)<<3),
4911 VRAM_G_TEX_PALETTE = 3,
4912 VRAM_G_BG_EXT_PALETTE = 4,
4913 VRAM_G_OBJ_EXT_PALETTE = 5,
4914 } VRAM_G_TYPE;
4915
4916 typedef enum {
4917 VRAM_H_LCD = 0,
4918 VRAM_H_SUB_BG = 1,
4919 VRAM_H_SUB_BG_EXT_PALETTE = 2,
4920 } VRAM_H_TYPE;
4921
4922 typedef enum {
4923 VRAM_I_LCD = 0,
4924 VRAM_I_SUB_BG = 1,
4925 VRAM_I_SUB_SPRITE = 2,
4926 VRAM_I_SUB_SPRITE_EXT_PALETTE = 3,
4927 }VRAM_I_TYPE;
4928
4929
4930 typedef u16 _palette[256];
4931 typedef _palette _ext_palette[16];
4932
4933
4934
4935
4936
4937
4938
4939 uint32 vramSetMainBanks(VRAM_A_TYPE a, VRAM_B_TYPE b, VRAM_C_TYPE c, VRAM_D_TYPE d);
4940 void vramRestoreMainBanks(uint32 vramTemp);
4941
4942 void vramSetBankA(VRAM_A_TYPE a);
4943 void vramSetBankB(VRAM_B_TYPE b);
4944 void vramSetBankC(VRAM_C_TYPE c);
4945 void vramSetBankD(VRAM_D_TYPE d);
4946 void vramSetBankE(VRAM_E_TYPE e);
4947 void vramSetBankF(VRAM_F_TYPE f);
4948 void vramSetBankG(VRAM_G_TYPE g);
4949 void vramSetBankH(VRAM_H_TYPE h);
4950 void vramSetBankI(VRAM_I_TYPE i);
4951 # 291 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/video.h"
4952 static inline
4953 void videoSetMode( uint32 mode) { (*(vuint32*)0x04000000) = mode; }
4954 static inline
4955 void videoSetModeSub( uint32 mode) { (*(vuint32*)0x04001000) = mode; }
4956 # 366 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/video.h"
4957 typedef struct {
4958 u16 x;
4959 u16 y;
4960 } bg_scroll;
4961
4962 typedef struct {
4963 u16 xdx;
4964 u16 xdy;
4965 u16 ydx;
4966 u16 ydy;
4967 u32 centerX;
4968 u32 centerY;
4969 } bg_rotation;
4970
4971 typedef struct {
4972 u16 control[4];
4973 bg_scroll scroll[4];
4974 bg_rotation bg2_rotation;
4975 bg_rotation bg3_rotation;
4976 } bg_attribute;
4977 # 36 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/boxtest.h" 2
4978 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h" 1
4979 # 54 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
4980 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/math.h" 1
4981 # 94 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/math.h"
4982 static inline int32 divf32(int32 num, int32 den)
4983 {
4984 (*(vuint16*)(0x04000280)) = 1;
4985
4986 while((*(vuint16*)(0x04000280)) & (1<<15));
4987
4988 (*(vint64*) (0x04000290)) = ((int64)num) << 12;
4989 (*(vint32*) (0x04000298)) = den;
4990
4991 while((*(vuint16*)(0x04000280)) & (1<<15));
4992
4993 return ((*(vint32*) (0x040002A0)));
4994 }
4995
4996
4997
4998
4999 static inline int32 mulf32(int32 a, int32 b)
5000 {
5001 long long result = (long long)a*(long long)b;
5002 return (int32)(result >> 12);
5003 }
5004
5005
5006
5007
5008 static inline int32 sqrtf32(int32 a)
5009 {
5010 (*(vuint16*)(0x040002B0)) = 1;
5011
5012 while((*(vuint16*)(0x040002B0)) & (1<<15));
5013
5014 (*(vint64*) (0x040002B8)) = ((int64)a) << 12;
5015
5016 while((*(vuint16*)(0x040002B0)) & (1<<15));
5017
5018 return (*(vint32*) (0x040002B4));
5019 }
5020
5021
5022
5023
5024
5025
5026 static inline int32 div32(int32 num, int32 den)
5027 {
5028 (*(vuint16*)(0x04000280)) = 0;
5029
5030 while((*(vuint16*)(0x04000280)) & (1<<15));
5031
5032 (*(vint32*) (0x04000290)) = num;
5033 (*(vint32*) (0x04000298)) = den;
5034
5035 while((*(vuint16*)(0x04000280)) & (1<<15));
5036
5037 return ((*(vint32*) (0x040002A0)));
5038 }
5039
5040
5041
5042
5043 static inline int32 mod32(int32 num, int32 den)
5044 {
5045 (*(vuint16*)(0x04000280)) = 0;
5046
5047 while((*(vuint16*)(0x04000280)) & (1<<15));
5048
5049 (*(vint32*) (0x04000290)) = num;
5050 (*(vint32*) (0x04000298)) = den;
5051
5052 while((*(vuint16*)(0x04000280)) & (1<<15));
5053
5054 return ((*(vint32*) (0x040002A8)));
5055 }
5056
5057
5058
5059
5060 static inline int32 div64(int64 num, int32 den)
5061 {
5062 (*(vuint16*)(0x04000280)) = 1;
5063
5064 while((*(vuint16*)(0x04000280)) & (1<<15));
5065
5066 (*(vint64*) (0x04000290)) = num;
5067 (*(vint32*) (0x04000298)) = den;
5068
5069 while((*(vuint16*)(0x04000280)) & (1<<15));
5070
5071 return ((*(vint32*) (0x040002A0)));
5072 }
5073
5074
5075
5076
5077 static inline int32 mod64(int64 num, int32 den)
5078 {
5079 (*(vuint16*)(0x04000280)) = 1;
5080
5081 while((*(vuint16*)(0x04000280)) & (1<<15));
5082
5083 (*(vint64*) (0x04000290)) = num;
5084 (*(vint32*) (0x04000298)) = den;
5085
5086 while((*(vuint16*)(0x04000280)) & (1<<15));
5087
5088 return ((*(vint32*) (0x040002A8)));
5089 }
5090
5091
5092
5093
5094 static inline int32 sqrt32(int a)
5095 {
5096 (*(vuint16*)(0x040002B0)) = 0;
5097
5098 while((*(vuint16*)(0x040002B0)) & (1<<15));
5099
5100 (*(vint32*) (0x040002B8)) = a;
5101
5102 while((*(vuint16*)(0x040002B0)) & (1<<15));
5103
5104 return (*(vint32*) (0x040002B4));
5105 }
5106
5107
5108
5109
5110
5111
5112
5113 static inline void crossf32(int32 *a, int32 *b, int32 *result)
5114 {
5115 result[0] = mulf32(a[1], b[2]) - mulf32(b[1], a[2]);
5116 result[1] = mulf32(a[2], b[0]) - mulf32(b[2], a[0]);
5117 result[2] = mulf32(a[0], b[1]) - mulf32(b[0], a[1]);
5118 }
5119
5120
5121
5122 static inline int32 dotf32(int32 *a, int32 *b)
5123 {
5124 return mulf32(a[0], b[0]) + mulf32(a[1], b[1]) + mulf32(a[2], b[2]);
5125 }
5126
5127
5128
5129
5130
5131 static inline void normalizef32(int32* a)
5132 {
5133
5134 int32 magnitude = sqrtf32( mulf32(a[0], a[0]) + mulf32(a[1], a[1]) + mulf32(a[2], a[2]) );
5135
5136 a[0] = divf32(a[0], magnitude);
5137 a[1] = divf32(a[1], magnitude);
5138 a[2] = divf32(a[2], magnitude);
5139 }
5140 # 55 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h" 2
5141 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/trig_lut.h" 1
5142 # 44 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/trig_lut.h"
5143 extern short COS_bin[];
5144 extern short SIN_bin[];
5145 extern short TAN_bin[];
5146 # 56 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h" 2
5147 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/cache.h" 1
5148 # 46 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/cache.h"
5149 void IC_InvalidateAll();
5150
5151
5152
5153
5154
5155
5156
5157 void IC_InvalidateRange(const void *base, u32 size);
5158
5159
5160
5161
5162
5163 void DC_FlushAll();
5164
5165
5166
5167
5168
5169
5170
5171 void DC_FlushRange(const void *base, u32 size);
5172
5173
5174
5175
5176
5177 void DC_InvalidateAll();
5178
5179
5180
5181
5182
5183
5184
5185 void DC_InvalidateRange(const void *base, u32 size);
5186 # 57 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h" 2
5187 # 77 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
5188 typedef uint16 fixed12d3;
5189 # 90 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
5190 typedef short int t16;
5191
5192
5193
5194
5195
5196
5197 typedef short int v16;
5198
5199
5200
5201
5202
5203
5204 typedef short int v10;
5205 # 113 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
5206 typedef unsigned short rgb;
5207
5208
5209 typedef struct {
5210 int32 m[9];
5211 } m3x3;
5212
5213
5214 typedef struct {
5215 int32 m[16];
5216 } m4x4;
5217
5218
5219 typedef struct {
5220 int32 m[12];
5221 } m4x3;
5222
5223
5224 typedef struct {
5225 int32 x, y, z;
5226 } GLvector;
5227 # 143 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
5228 typedef enum {
5229 GL_TRIANGLES = 0,
5230 GL_QUADS = 1,
5231 GL_TRIANGLE_STRIP = 2,
5232 GL_QUAD_STRIP = 3,
5233 GL_TRIANGLE = 0,
5234 GL_QUAD = 1
5235 } GL_GLBEGIN_ENUM;
5236
5237
5238
5239
5240 typedef enum {
5241 GL_PROJECTION = 0,
5242 GL_POSITION = 1,
5243 GL_MODELVIEW = 2,
5244 GL_TEXTURE = 3
5245 } GL_MATRIX_MODE_ENUM;
5246
5247
5248
5249
5250 typedef enum {
5251 GL_AMBIENT = 0x01,
5252 GL_DIFFUSE = 0x02,
5253 GL_AMBIENT_AND_DIFFUSE = 0x03,
5254 GL_SPECULAR = 0x04,
5255 GL_SHININESS = 0x08,
5256 GL_EMISSION = 0x10
5257 } GL_MATERIALS_ENUM;
5258
5259
5260
5261
5262 enum GL_POLY_FORMAT_ENUM {
5263 POLY_FORMAT_LIGHT0 = (1<<0),
5264 POLY_FORMAT_LIGHT1 = (1<<1),
5265 POLY_FORMAT_LIGHT2 = (1<<2),
5266 POLY_FORMAT_LIGHT3 = (1<<3),
5267 POLY_MODULATION = (0<<4),
5268 POLY_DECAL = (1<<4),
5269 POLY_TOON_HIGHLIGHT = (2<<4),
5270 POLY_SHADOW = (3<<4),
5271 POLY_CULL_FRONT = (1<<6),
5272 POLY_CULL_BACK = (2<<6),
5273 POLY_CULL_NONE = (3<<6),
5274 POLY_FOG = (1<<15)
5275 };
5276
5277
5278
5279 enum GL_TEXTURE_SIZE_ENUM {
5280 TEXTURE_SIZE_8 = 0,
5281 TEXTURE_SIZE_16 = 1,
5282 TEXTURE_SIZE_32 = 2,
5283 TEXTURE_SIZE_64 = 3,
5284 TEXTURE_SIZE_128 = 4,
5285 TEXTURE_SIZE_256 = 5,
5286 TEXTURE_SIZE_512 = 6,
5287 TEXTURE_SIZE_1024 = 7
5288 };
5289
5290
5291
5292
5293 enum GL_TEXTURE_PARAM_ENUM {
5294 GL_TEXTURE_WRAP_S = (1 << 16),
5295 GL_TEXTURE_WRAP_T = (1 << 17),
5296 GL_TEXTURE_FLIP_S = (1 << 18),
5297 GL_TEXTURE_FLIP_T = (1 << 19),
5298 GL_TEXTURE_COLOR0_TRANSPARENT = (1<<29),
5299 TEXGEN_OFF = (0<<30),
5300 TEXGEN_TEXCOORD = (1<<30),
5301 TEXGEN_NORMAL = (2<<30),
5302 TEXGEN_POSITION = (3<<30)
5303 };
5304
5305
5306
5307
5308 typedef enum {
5309 GL_RGB32_A3 = 1,
5310 GL_RGB4 = 2,
5311 GL_RGB16 = 3,
5312 GL_RGB256 = 4,
5313 GL_COMPRESSED = 5,
5314 GL_RGB8_A5 = 6,
5315 GL_RGBA = 7,
5316 GL_RGB = 8
5317 } GL_TEXTURE_TYPE_ENUM;
5318
5319
5320
5321
5322 enum DISP3DCNT_ENUM {
5323 GL_TEXTURE_2D = (1<<0),
5324 GL_TOON_HIGHLIGHT = (1<<1),
5325 GL_ALPHA_TEST = (1<<2),
5326 GL_BLEND = (1<<3),
5327 GL_ANTIALIAS = (1<<4),
5328 GL_OUTLINE = (1<<5),
5329 GL_FOG_ONLY_ALPHA = (1<<6),
5330 GL_FOG = (1<<7),
5331 GL_COLOR_UNDERFLOW = (1<<12),
5332 GL_POLY_OVERFLOW = (1<<13),
5333 GL_CLEAR_BMP = (1<<14)
5334 };
5335
5336
5337
5338
5339 typedef enum {
5340 GL_GET_VERTEX_RAM_COUNT,
5341 GL_GET_POLYGON_RAM_COUNT,
5342 GL_GET_MATRIX_VECTOR,
5343 GL_GET_MATRIX_POSITION,
5344 GL_GET_MATRIX_PROJECTION,
5345 GL_GET_MATRIX_CLIP,
5346 GL_GET_TEXTURE_WIDTH,
5347 GL_GET_TEXTURE_HEIGHT
5348 } GL_GET_ENUM;
5349
5350
5351
5352
5353
5354 enum GLFLUSH_ENUM {
5355 GL_TRANS_MANUALSORT = (1<<0),
5356 GL_WBUFFERING = (1<<1)
5357 };
5358 # 281 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
5359 typedef struct {
5360 GL_MATRIX_MODE_ENUM matrixMode;
5361
5362
5363 uint32 clearColor;
5364
5365
5366 uint32 textures[2048];
5367 uint32 activeTexture;
5368 uint32* nextBlock;
5369 uint32 nextPBlock;
5370 int nameCount;
5371
5372 } gl_hidden_globals;
5373
5374
5375 static gl_hidden_globals* glGlob = 0;
5376 # 344 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
5377 void glRotatef32i(int angle, int32 x, int32 y, int32 z);
5378 # 355 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
5379 int glTexImage2D(int target, int empty1, GL_TEXTURE_TYPE_ENUM type, int sizeX, int sizeY, int empty2, int param, const uint8* texture);
5380
5381
5382
5383
5384
5385 void glTexLoadPal(const u16* pal, u16 count, u32 addr );
5386
5387
5388
5389
5390
5391 int gluTexLoadPal(const u16* pal, u16 count, uint8 format);
5392
5393
5394
5395
5396
5397
5398
5399 void glTexParameter( uint8 sizeX, uint8 sizeY,
5400 const uint32* addr,
5401 GL_TEXTURE_TYPE_ENUM mode,
5402 uint32 param) ;
5403
5404
5405 u32 glGetTexParameter();
5406
5407
5408
5409 void* glGetTexturePointer( int name);
5410
5411
5412
5413
5414 void glBindTexture(int target, int name);
5415
5416
5417 void glColorTable(uint8 format, uint32 addr);
5418
5419
5420
5421
5422 int glGenTextures(int n, int *names);
5423
5424
5425 void glResetTextures(void);
5426
5427
5428
5429
5430
5431 void glTexCoord2f32(int32 u, int32 v);
5432
5433
5434
5435
5436 void glMaterialf(GL_MATERIALS_ENUM mode, rgb color);
5437
5438
5439 void glInit_C(void);
5440
5441
5442 gl_hidden_globals* glGetGlobals();
5443 # 462 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
5444 static inline uint32 POLY_ALPHA(int n) { return (uint32)((n) << 16); };
5445
5446
5447
5448 static inline uint32 POLY_ID(int n) { return (uint32)((n)<<24); };
5449
5450
5451
5452 static inline void glBegin(GL_GLBEGIN_ENUM mode) { (*(vuint32*) 0x04000500) = mode; }
5453
5454
5455 static inline void glEnd(void) { (*(vuint32*) 0x04000504) = 0; }
5456
5457
5458
5459
5460 static inline void glClearDepth(fixed12d3 depth) { (*(vuint16*) 0x04000354) = depth; }
5461
5462
5463
5464
5465
5466
5467 static inline void glColor3b(uint8 red, uint8 green, uint8 blue) { (*(vuint32*) 0x04000480) = (vuint32)((red>>3)|((green>>3)<<5)|((blue>>3)<<10)); }
5468
5469
5470
5471 static inline void glColor(rgb color) { (*(vuint32*) 0x04000480) = (vuint32)color; }
5472
5473
5474
5475
5476
5477 static inline void glVertex3v16(v16 x, v16 y, v16 z) {
5478 (*(vuint32*) 0x0400048C) = (y << 16) | (x & 0xFFFF);
5479 (*(vuint32*) 0x0400048C) = ((uint32)(uint16)z);
5480 }
5481
5482
5483
5484
5485
5486 static inline void glTexCoord2t16(t16 u, t16 v) { (*(vuint32*) 0x04000488) = ((u & 0xFFFF) | ((v) << 16)); }
5487
5488
5489
5490 static inline void glPushMatrix(void) { (*(vuint32*)0x04000444) = 0; }
5491
5492
5493
5494
5495 static inline void glPopMatrix(int32 num) { (*(vuint32*)0x04000448) = num; }
5496
5497
5498
5499
5500 static inline void glRestoreMatrix(int32 index) { (*(vuint32*)0x04000450) = index; }
5501
5502
5503
5504
5505 static inline void glStoreMatrix(int32 index) { (*(vuint32*)0x0400044C) = index; }
5506
5507
5508
5509
5510 static inline void glScalev(const GLvector* v) {
5511 (*(vint32*) 0x0400046C) = v->x;
5512 (*(vint32*) 0x0400046C) = v->y;
5513 (*(vint32*) 0x0400046C) = v->z;
5514 }
5515
5516
5517
5518
5519 static inline void glTranslatev(const GLvector* v) {
5520 (*(vint32*) 0x04000470) = v->x;
5521 (*(vint32*) 0x04000470) = v->y;
5522 (*(vint32*) 0x04000470) = v->z;
5523 }
5524
5525
5526
5527
5528
5529
5530 static inline void glTranslate3f32(int32 x, int32 y, int32 z) {
5531 (*(vint32*) 0x04000470) = x;
5532 (*(vint32*) 0x04000470) = y;
5533 (*(vint32*) 0x04000470) = z;
5534 }
5535
5536
5537
5538
5539 static inline void glScalef32(int32 factor) {
5540 (*(vint32*) 0x0400046C) = factor;
5541 (*(vint32*) 0x0400046C) = factor;
5542 (*(vint32*) 0x0400046C) = factor;
5543 }
5544 # 570 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
5545 static inline void glLight(int id, rgb color, v10 x, v10 y, v10 z) {
5546 id = (id & 3) << 30;
5547 (*(vuint32*) 0x040004C8) = id | ((z & 0x3FF) << 20) | ((y & 0x3FF) << 10) | (x & 0x3FF);
5548 (*(vuint32*) 0x040004CC) = id | color;
5549 }
5550
5551
5552
5553
5554
5555 static inline void glNormal(uint32 normal) { (*(vuint32*) 0x04000484) = normal; }
5556
5557
5558 static inline void glLoadIdentity(void) { (*(vuint32*)0x04000454) = 0; }
5559
5560
5561
5562
5563 static inline void glMatrixMode(GL_MATRIX_MODE_ENUM mode) { (*(vuint32*)0x04000440) = mode; }
5564
5565
5566
5567
5568
5569
5570
5571 static inline void glViewport(uint8 x1, uint8 y1, uint8 x2, uint8 y2) { (*(vuint32*) 0x04000580) = (x1) + (y1 << 8) + (x2 << 16) + (y2 << 24); }
5572
5573
5574
5575
5576 static inline void glFlush(uint32 mode) { (*(vuint32*) 0x04000540) = mode; }
5577
5578
5579 static inline void glMaterialShinyness(void) {
5580 uint32 shiny32[128/4];
5581 uint8 *shiny8 = (uint8*)shiny32;
5582
5583 int i;
5584
5585 for (i = 0; i < 128 * 2; i += 2)
5586 shiny8[i>>1] = i;
5587
5588 for (i = 0; i < 128 / 4; i++)
5589 (*(vuint32*) 0x040004D0) = shiny32[i];
5590 }
5591
5592
5593
5594
5595
5596
5597 static inline void glCallList(const u32* list) {
5598 u32 count = *list++;
5599
5600
5601 DC_FlushRange(list, count*4);
5602
5603
5604
5605 while(((*(vuint32*)(0x040000B8+(0*12))) & (1 << (31)))||((*(vuint32*)(0x040000B8+(1*12))) & (1 << (31)))||((*(vuint32*)(0x040000B8+(2*12))) & (1 << (31)))||((*(vuint32*)(0x040000B8+(3*12))) & (1 << (31))));
5606
5607
5608 (*(vuint32*)(0x040000B0+(0*12))) = (uint32)list;
5609 (*(vuint32*)(0x040000B4+(0*12))) = 0x4000400;
5610 (*(vuint32*)(0x040000B8+(0*12))) = ((1 << (31)) | (1 << (26)) | (1 << (22)) | (7<<27)) | count;
5611 while((*(vuint32*)(0x040000B8+(0*12))) & (1 << (31)));
5612 }
5613
5614
5615
5616
5617 static inline void glPolyFmt(uint32 params) { (*(vuint32*) 0x040004A4) = params; }
5618
5619
5620
5621 static inline void glEnable(int bits) { (*(vuint16*) 0x04000060) |= bits; }
5622
5623
5624
5625 static inline void glDisable(int bits) { (*(vuint16*) 0x04000060) &= ~bits; }
5626
5627
5628
5629 static inline void glLoadMatrix4x4(const m4x4 *m) {
5630 (*(vint32*) 0x04000458) = m->m[0];
5631 (*(vint32*) 0x04000458) = m->m[1];
5632 (*(vint32*) 0x04000458) = m->m[2];
5633 (*(vint32*) 0x04000458) = m->m[3];
5634
5635 (*(vint32*) 0x04000458) = m->m[4];
5636 (*(vint32*) 0x04000458) = m->m[5];
5637 (*(vint32*) 0x04000458) = m->m[6];
5638 (*(vint32*) 0x04000458) = m->m[7];
5639
5640 (*(vint32*) 0x04000458) = m->m[8];
5641 (*(vint32*) 0x04000458) = m->m[9];
5642 (*(vint32*) 0x04000458) = m->m[10];
5643 (*(vint32*) 0x04000458) = m->m[11];
5644
5645 (*(vint32*) 0x04000458) = m->m[12];
5646 (*(vint32*) 0x04000458) = m->m[13];
5647 (*(vint32*) 0x04000458) = m->m[14];
5648 (*(vint32*) 0x04000458) = m->m[15];
5649 }
5650
5651
5652
5653 static inline void glLoadMatrix4x3(const m4x3 * m) {
5654 (*(vint32*) 0x0400045C) = m->m[0];
5655 (*(vint32*) 0x0400045C) = m->m[1];
5656 (*(vint32*) 0x0400045C) = m->m[2];
5657 (*(vint32*) 0x0400045C) = m->m[3];
5658
5659 (*(vint32*) 0x0400045C) = m->m[4];
5660 (*(vint32*) 0x0400045C) = m->m[5];
5661 (*(vint32*) 0x0400045C) = m->m[6];
5662 (*(vint32*) 0x0400045C) = m->m[7];
5663
5664 (*(vint32*) 0x0400045C) = m->m[8];
5665 (*(vint32*) 0x0400045C) = m->m[9];
5666 (*(vint32*) 0x0400045C) = m->m[10];
5667 (*(vint32*) 0x0400045C) = m->m[11];
5668 }
5669
5670
5671
5672 static inline void glMultMatrix4x4(const m4x4 * m) {
5673 (*(vint32*) 0x04000460) = m->m[0];
5674 (*(vint32*) 0x04000460) = m->m[1];
5675 (*(vint32*) 0x04000460) = m->m[2];
5676 (*(vint32*) 0x04000460) = m->m[3];
5677
5678 (*(vint32*) 0x04000460) = m->m[4];
5679 (*(vint32*) 0x04000460) = m->m[5];
5680 (*(vint32*) 0x04000460) = m->m[6];
5681 (*(vint32*) 0x04000460) = m->m[7];
5682
5683 (*(vint32*) 0x04000460) = m->m[8];
5684 (*(vint32*) 0x04000460) = m->m[9];
5685 (*(vint32*) 0x04000460) = m->m[10];
5686 (*(vint32*) 0x04000460) = m->m[11];
5687
5688 (*(vint32*) 0x04000460) = m->m[12];
5689 (*(vint32*) 0x04000460) = m->m[13];
5690 (*(vint32*) 0x04000460) = m->m[14];
5691 (*(vint32*) 0x04000460) = m->m[15];
5692 }
5693
5694
5695
5696 static inline void glMultMatrix4x3(const m4x3 * m) {
5697 (*(vint32*) 0x04000464) = m->m[0];
5698 (*(vint32*) 0x04000464) = m->m[1];
5699 (*(vint32*) 0x04000464) = m->m[2];
5700 (*(vint32*) 0x04000464) = m->m[3];
5701
5702 (*(vint32*) 0x04000464) = m->m[4];
5703 (*(vint32*) 0x04000464) = m->m[5];
5704 (*(vint32*) 0x04000464) = m->m[6];
5705 (*(vint32*) 0x04000464) = m->m[7];
5706
5707 (*(vint32*) 0x04000464) = m->m[8];
5708 (*(vint32*) 0x04000464) = m->m[9];
5709 (*(vint32*) 0x04000464) = m->m[10];
5710 (*(vint32*) 0x04000464) = m->m[11];
5711
5712 }
5713
5714
5715
5716 static inline void glMultMatrix3x3(const m3x3 * m) {
5717 (*(vint32*) 0x04000468) = m->m[0];
5718 (*(vint32*) 0x04000468) = m->m[1];
5719 (*(vint32*) 0x04000468) = m->m[2];
5720
5721 (*(vint32*) 0x04000468) = m->m[3];
5722 (*(vint32*) 0x04000468) = m->m[4];
5723 (*(vint32*) 0x04000468) = m->m[5];
5724
5725 (*(vint32*) 0x04000468) = m->m[6];
5726 (*(vint32*) 0x04000468) = m->m[7];
5727 (*(vint32*) 0x04000468) = m->m[8];
5728 }
5729
5730
5731
5732 static inline void glRotateXi(int angle) {
5733 int32 sine = SIN_bin[angle & (0x1FF)];
5734 int32 cosine = COS_bin[angle & (0x1FF)];
5735
5736 (*(vint32*) 0x04000468) = ((1) << 12);
5737 (*(vint32*) 0x04000468) = 0;
5738 (*(vint32*) 0x04000468) = 0;
5739
5740 (*(vint32*) 0x04000468) = 0;
5741 (*(vint32*) 0x04000468) = cosine;
5742 (*(vint32*) 0x04000468) = sine;
5743
5744 (*(vint32*) 0x04000468) = 0;
5745 (*(vint32*) 0x04000468) = -sine;
5746 (*(vint32*) 0x04000468) = cosine;
5747 }
5748
5749
5750
5751 static inline void glRotateYi(int angle) {
5752 int32 sine = SIN_bin[angle & (0x1FF)];
5753 int32 cosine = COS_bin[angle & (0x1FF)];
5754
5755 (*(vint32*) 0x04000468) = cosine;
5756 (*(vint32*) 0x04000468) = 0;
5757 (*(vint32*) 0x04000468) = -sine;
5758
5759 (*(vint32*) 0x04000468) = 0;
5760 (*(vint32*) 0x04000468) = ((1) << 12);
5761 (*(vint32*) 0x04000468) = 0;
5762
5763 (*(vint32*) 0x04000468) = sine;
5764 (*(vint32*) 0x04000468) = 0;
5765 (*(vint32*) 0x04000468) = cosine;
5766 }
5767
5768
5769
5770 static inline void glRotateZi(int angle) {
5771 int32 sine = SIN_bin[angle & (0x1FF)];
5772 int32 cosine = COS_bin[angle & (0x1FF)];
5773
5774 (*(vint32*) 0x04000468) = cosine;
5775 (*(vint32*) 0x04000468) = sine;
5776 (*(vint32*) 0x04000468) = 0;
5777
5778 (*(vint32*) 0x04000468) = - sine;
5779 (*(vint32*) 0x04000468) = cosine;
5780 (*(vint32*) 0x04000468) = 0;
5781
5782 (*(vint32*) 0x04000468) = 0;
5783 (*(vint32*) 0x04000468) = 0;
5784 (*(vint32*) 0x04000468) = ((1) << 12);
5785 }
5786 # 820 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
5787 static inline void glOrthof32(int32 left, int32 right, int32 bottom, int32 top, int32 zNear, int32 zFar) {
5788 (*(vint32*) 0x04000460) = divf32(((2) << 12), right - left);
5789 (*(vint32*) 0x04000460) = 0;
5790 (*(vint32*) 0x04000460) = 0;
5791 (*(vint32*) 0x04000460) = 0;
5792
5793 (*(vint32*) 0x04000460) = 0;
5794 (*(vint32*) 0x04000460) = divf32(((2) << 12), top - bottom);
5795 (*(vint32*) 0x04000460) = 0;
5796 (*(vint32*) 0x04000460) = 0;
5797
5798 (*(vint32*) 0x04000460) = 0;
5799 (*(vint32*) 0x04000460) = 0;
5800 (*(vint32*) 0x04000460) = divf32(((-2) << 12), zFar - zNear);
5801 (*(vint32*) 0x04000460) = 0;
5802
5803 (*(vint32*) 0x04000460) = -divf32(right + left, right - left);
5804 (*(vint32*) 0x04000460) = -divf32(top + bottom, top - bottom);
5805 (*(vint32*) 0x04000460) = -divf32(zFar + zNear, zFar - zNear);
5806 (*(vint32*) 0x04000460) = ((int32)((1.0F) * (1 << 12)));
5807 }
5808 # 852 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
5809 static inline void gluLookAtf32(int32 eyex, int32 eyey, int32 eyez, int32 lookAtx, int32 lookAty, int32 lookAtz, int32 upx, int32 upy, int32 upz) {
5810 int32 side[3], forward[3], up[3], eye[3];
5811
5812 forward[0] = eyex - lookAtx;
5813 forward[1] = eyey - lookAty;
5814 forward[2] = eyez - lookAtz;
5815
5816 normalizef32(forward);
5817
5818 up[0] = upx;
5819 up[1] = upy;
5820 up[2] = upz;
5821 eye[0] = eyex;
5822 eye[1] = eyey;
5823 eye[2] = eyez;
5824
5825 crossf32(up, forward, side);
5826
5827 normalizef32(side);
5828
5829
5830 crossf32(forward, side, up);
5831
5832 glMatrixMode(GL_MODELVIEW);
5833
5834
5835
5836 (*(vint32*) 0x04000464) = side[0];
5837 (*(vint32*) 0x04000464) = up[0];
5838 (*(vint32*) 0x04000464) = forward[0];
5839
5840 (*(vint32*) 0x04000464) = side[1];
5841 (*(vint32*) 0x04000464) = up[1];
5842 (*(vint32*) 0x04000464) = forward[1];
5843
5844 (*(vint32*) 0x04000464) = side[2];
5845 (*(vint32*) 0x04000464) = up[2];
5846 (*(vint32*) 0x04000464) = forward[2];
5847
5848 (*(vint32*) 0x04000464) = -dotf32(eye,side);
5849 (*(vint32*) 0x04000464) = -dotf32(eye,up);
5850 (*(vint32*) 0x04000464) = -dotf32(eye,forward);
5851
5852 }
5853 # 905 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
5854 static inline void glFrustumf32(int32 left, int32 right, int32 bottom, int32 top, int32 near, int32 far) {
5855 # 928 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
5856 (*(vint32*) 0x04000460) = divf32(2*near, right - left);
5857 (*(vint32*) 0x04000460) = 0;
5858 (*(vint32*) 0x04000460) = 0;
5859 (*(vint32*) 0x04000460) = 0;
5860
5861 (*(vint32*) 0x04000460) = 0;
5862 (*(vint32*) 0x04000460) = divf32(2*near, top - bottom);
5863 (*(vint32*) 0x04000460) = 0;
5864 (*(vint32*) 0x04000460) = 0;
5865
5866 (*(vint32*) 0x04000460) = divf32(right + left, right - left);
5867 (*(vint32*) 0x04000460) = divf32(top + bottom, top - bottom);
5868 (*(vint32*) 0x04000460) = -divf32(far + near, far - near);
5869 (*(vint32*) 0x04000460) = ((int32)((-1.0F) * (1 << 12)));
5870
5871 (*(vint32*) 0x04000460) = 0;
5872 (*(vint32*) 0x04000460) = 0;
5873 (*(vint32*) 0x04000460) = -divf32(2 * mulf32(far, near), far - near);
5874 (*(vint32*) 0x04000460) = 0;
5875
5876 }
5877
5878
5879
5880
5881
5882
5883 static inline void gluPerspectivef32(int fovy, int32 aspect, int32 zNear, int32 zFar) {
5884 int32 xmin, xmax, ymin, ymax;
5885
5886 ymax = mulf32(zNear, TAN_bin[(fovy>>1) & (0x1FF)]);
5887 ymin = -ymax;
5888 xmin = mulf32(ymin, aspect);
5889 xmax = mulf32(ymax, aspect);
5890
5891 glFrustumf32(xmin, xmax, ymin, ymax, zNear, zFar);
5892 }
5893
5894
5895
5896
5897
5898
5899
5900 static inline void gluPickMatrix(int x, int y, int width, int height, const int viewport[4]) {
5901 (*(vint32*) 0x04000460) = ((viewport[2]) << 12) / width;
5902 (*(vint32*) 0x04000460) = 0;
5903 (*(vint32*) 0x04000460) = 0;
5904 (*(vint32*) 0x04000460) = 0;
5905 (*(vint32*) 0x04000460) = 0;
5906 (*(vint32*) 0x04000460) = ((viewport[3]) << 12) / height;
5907 (*(vint32*) 0x04000460) = 0;
5908 (*(vint32*) 0x04000460) = 0;
5909 (*(vint32*) 0x04000460) = 0;
5910 (*(vint32*) 0x04000460) = 0;
5911 (*(vint32*) 0x04000460) = ((1) << 12);
5912 (*(vint32*) 0x04000460) = 0;
5913 (*(vint32*) 0x04000460) = ((viewport[2] + ((viewport[0] - x)<<1)) << 12) / width;
5914 (*(vint32*) 0x04000460) = ((viewport[3] + ((viewport[1] - y)<<1)) << 12) / height;
5915 (*(vint32*) 0x04000460) = 0;
5916 (*(vint32*) 0x04000460) = ((1) << 12);
5917 }
5918
5919
5920 static inline void glResetMatrixStack(void) {
5921
5922 while((*(vuint32*) 0x04000600) & (1 << (14))){
5923 (*(vuint32*) 0x04000600) |= 1 << 15;
5924 }
5925
5926
5927 if(((*(vuint32*) 0x04000600)&(1<<13))!=0) {
5928 glMatrixMode(GL_PROJECTION);
5929 glPopMatrix(1);
5930 }
5931
5932
5933 glMatrixMode(GL_MODELVIEW);
5934 glPopMatrix(((*(vuint32*) 0x04000600) >> 8) & 0x1F);
5935
5936
5937 glMatrixMode(GL_MODELVIEW);
5938 glLoadIdentity();
5939 glMatrixMode(GL_PROJECTION);
5940 glLoadIdentity();
5941 glMatrixMode(GL_TEXTURE);
5942 glLoadIdentity();
5943 }
5944
5945
5946
5947
5948 static inline void glSetOutlineColor(int id, rgb color) { ((vuint16*) 0x04000330)[id] = color; }
5949
5950
5951
5952 static inline void glSetToonTable(const uint16 *table) {
5953 int i;
5954 for(i = 0; i < 32; i++ )
5955 ((vuint16*) 0x04000380)[i] = table[i];
5956 }
5957
5958
5959
5960
5961
5962 static inline void glSetToonTableRange(int start, int end, rgb color) {
5963 int i;
5964 for(i = start; i <= end; i++ )
5965 ((vuint16*) 0x04000380)[i] = color;
5966 }
5967
5968
5969
5970
5971
5972
5973 static inline void glGetFixed(const GL_GET_ENUM param, int32* f) {
5974 int i;
5975 switch (param) {
5976 case GL_GET_MATRIX_VECTOR:
5977 while(((*(vuint32*) 0x04000600) & (1 << (27))));
5978 for(i = 0; i < 9; i++) f[i] = ((vint32*) (0x04000680))[i];
5979 break;
5980 case GL_GET_MATRIX_CLIP:
5981 while(((*(vuint32*) 0x04000600) & (1 << (27))));
5982 for(i = 0; i < 16; i++) f[i] = ((vint32*) (0x04000640))[i];
5983 break;
5984 case GL_GET_MATRIX_PROJECTION:
5985 glMatrixMode(GL_POSITION);
5986 glPushMatrix();
5987 glLoadIdentity();
5988 while(((*(vuint32*) 0x04000600) & (1 << (27))));
5989 for(i = 0; i < 16; i++) f[i] = ((vint32*) (0x04000640))[i];
5990 glPopMatrix(1);
5991 break;
5992 case GL_GET_MATRIX_POSITION:
5993 glMatrixMode(GL_PROJECTION);
5994 glPushMatrix();
5995 glLoadIdentity();
5996 while(((*(vuint32*) 0x04000600) & (1 << (27))));
5997 for(i = 0; i < 16; i++) f[i] = ((vint32*) (0x04000640))[i];
5998 glPopMatrix(1);
5999 break;
6000 default:
6001 break;
6002 }
6003 }
6004
6005
6006
6007
6008 static inline void glAlphaFunc(int alphaThreshold) { (*(vuint16*) 0x04000340) = alphaThreshold; }
6009
6010
6011
6012
6013 static inline void glCutoffDepth(fixed12d3 wVal) { (*(uint16*)0x04000610) = wVal; }
6014
6015
6016 static inline void glInit() {
6017 glGlob = glGetGlobals();
6018 glInit_C();
6019 }
6020
6021
6022
6023
6024
6025
6026 static inline void glClearColor(uint8 red, uint8 green, uint8 blue, uint8 alpha) {
6027 (*(vuint32*) 0x04000350) = glGlob->clearColor = ( glGlob->clearColor & 0xFFE08000) | (0x7FFF & ((red)|((green)<<5)|((blue)<<10))) | ((alpha & 0x1F) << 16);
6028 }
6029
6030
6031
6032 static inline void glClearPolyID(uint8 ID) {
6033 (*(vuint32*) 0x04000350) = glGlob->clearColor = ( glGlob->clearColor & 0xC0FFFFFF) | (( ID & 0x3F ) << 24 );
6034 }
6035
6036
6037
6038
6039 static inline void glGetInt(GL_GET_ENUM param, int* i) {
6040 switch (param) {
6041 case GL_GET_POLYGON_RAM_COUNT:
6042 *i = (*(uint16*) 0x04000604);
6043 break;
6044 case GL_GET_VERTEX_RAM_COUNT:
6045 *i = (*(uint16*) 0x04000606);
6046 break;
6047 case GL_GET_TEXTURE_WIDTH:
6048 *i = 8 << (((glGlob->textures[glGlob->activeTexture]) >> 20) & 7);
6049 break;
6050 case GL_GET_TEXTURE_HEIGHT:
6051 *i = 8 << (((glGlob->textures[glGlob->activeTexture]) >> 23) & 7);
6052 break;
6053 default:
6054 break;
6055 }
6056 }
6057 # 1142 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
6058 static inline void glVertex3f(float x, float y, float z) {
6059 glVertex3v16(((v16)((x) * (1 << 12))), ((v16)((y) * (1 << 12))), ((v16)((z) * (1 << 12))));
6060 }
6061
6062
6063
6064
6065
6066
6067
6068 static inline void glRotatef32(float angle, int32 x, int32 y, int32 z) {
6069 glRotatef32i((int)(angle * (512) / 360.0), x, y, z);
6070 }
6071
6072
6073
6074
6075
6076
6077
6078 static inline void glRotatef(float angle, float x, float y, float z) {
6079 glRotatef32(angle, ((int32)((x) * (1 << 12))), ((int32)((y) * (1 << 12))), ((int32)((z) * (1 << 12))));
6080 }
6081
6082
6083
6084
6085
6086
6087 static inline void glColor3f(float r, float g, float b) {
6088 glColor3b((uint8)(r*255), (uint8)(g*255), (uint8)(b*255));
6089 }
6090
6091
6092
6093
6094
6095
6096
6097 static inline void glScalef(float x, float y, float z) {
6098 (*(vint32*) 0x0400046C) = ((int32)((x) * (1 << 12)));
6099 (*(vint32*) 0x0400046C) = ((int32)((y) * (1 << 12)));
6100 (*(vint32*) 0x0400046C) = ((int32)((z) * (1 << 12)));
6101 }
6102
6103
6104
6105
6106
6107
6108
6109 static inline void glTranslatef(float x, float y, float z) {
6110 (*(vint32*) 0x04000470) = ((int32)((x) * (1 << 12)));
6111 (*(vint32*) 0x04000470) = ((int32)((y) * (1 << 12)));
6112 (*(vint32*) 0x04000470) = ((int32)((z) * (1 << 12)));
6113 }
6114
6115
6116
6117
6118
6119
6120
6121 static inline void glNormal3f(float x, float y, float z) {
6122 glNormal((((((x>.998) ? 0x1FF : ((v10)((x)*(1<<9))))) & 0x3FF) | (((((y>.998) ? 0x1FF : ((v10)((y)*(1<<9))))) & 0x3FF) << 10) | ((((z>.998) ? 0x1FF : ((v10)((z)*(1<<9))))) << 20)));
6123 }
6124
6125
6126
6127
6128 static inline void glRotateX(float angle) {
6129 glRotateXi((int)(angle * (512) / 360.0));
6130 }
6131
6132
6133
6134
6135 static inline void glRotateY(float angle) {
6136 glRotateYi((int)(angle * (512) / 360.0));
6137 }
6138
6139
6140
6141
6142 static inline void glRotateZ(float angle) {
6143 glRotateZi((int)(angle * (512) / 360.0));
6144 }
6145 # 1238 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
6146 static inline void glOrtho(float left, float right, float bottom, float top, float zNear, float zFar) {
6147 glOrthof32(((int32)((left) * (1 << 12))), ((int32)((right) * (1 << 12))), ((int32)((bottom) * (1 << 12))), ((int32)((top) * (1 << 12))), ((int32)((zNear) * (1 << 12))), ((int32)((zFar) * (1 << 12))));
6148 }
6149 # 1253 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
6150 static inline void gluLookAt( float eyex, float eyey, float eyez,
6151 float lookAtx, float lookAty, float lookAtz,
6152 float upx, float upy, float upz) {
6153 gluLookAtf32(((int32)((eyex) * (1 << 12))), ((int32)((eyey) * (1 << 12))), ((int32)((eyez) * (1 << 12))),
6154 ((int32)((lookAtx) * (1 << 12))), ((int32)((lookAty) * (1 << 12))), ((int32)((lookAtz) * (1 << 12))),
6155 ((int32)((upx) * (1 << 12))), ((int32)((upy) * (1 << 12))), ((int32)((upz) * (1 << 12))));
6156 }
6157 # 1269 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
6158 static inline void glFrustum(float left, float right, float bottom, float top, float near, float far) {
6159 glFrustumf32(((int32)((left) * (1 << 12))), ((int32)((right) * (1 << 12))), ((int32)((bottom) * (1 << 12))), ((int32)((top) * (1 << 12))), ((int32)((near) * (1 << 12))), ((int32)((far) * (1 << 12))));
6160 }
6161
6162
6163
6164
6165
6166
6167
6168 static inline void gluPerspective(float fovy, float aspect, float zNear, float zFar) {
6169 gluPerspectivef32((int)(fovy * (512) / 360.0), ((int32)((aspect) * (1 << 12))), ((int32)((zNear) * (1 << 12))), ((int32)((zFar) * (1 << 12))));
6170 }
6171
6172
6173
6174
6175
6176
6177 static inline void glTexCoord2f(float s, float t) {
6178 int x = ((glGlob->textures[glGlob->activeTexture]) >> 20) & 7;
6179 int y = ((glGlob->textures[glGlob->activeTexture]) >> 23) & 7;
6180
6181 glTexCoord2t16(((t16)((s*(8 << x)) * (1 << 4))), ((t16)((t*(8<<y)) * (1 << 4))));
6182 }
6183 # 37 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/boxtest.h" 2
6184 # 57 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/boxtest.h"
6185 int BoxTest(v16 x, v16 y, v16 z, v16 width, v16 height, v16 depth);
6186 # 70 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/boxtest.h"
6187 int BoxTestf(float x, float y, float z, float width, float height, float depth);
6188 # 84 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/boxtest.h"
6189 void BoxTest_Asynch(v16 x, v16 y, v16 z, v16 height, v16 width, v16 depth);
6190 # 98 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/boxtest.h"
6191 void BoxTestf_Asynch(float x, float y, float z, float width, float height, float depth);
6192
6193
6194
6195
6196
6197
6198 int BoxTestResult(void);
6199 # 60 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
6200
6201 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/console.h" 1
6202 # 60 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/console.h"
6203 void consoleInit(u16* font, u16* charBase, u16 numCharacters, u8 charStart, u16* map, u8 pal, u8 bitDepth);
6204 # 70 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/console.h"
6205 void consoleInitDefault(u16* map, u16* charBase, u8 bitDepth);
6206
6207
6208
6209
6210
6211
6212
6213 void consoleDemoInit(void);
6214
6215
6216
6217 void consoleClear(void);
6218 # 62 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
6219 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/exceptions.h" 1
6220 # 54 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/exceptions.h"
6221 extern VoidFunctionPointer exceptionC[] ;
6222 extern unsigned long exceptionStack ;
6223 extern signed long exceptionRegisters[];
6224
6225 void enterException(void);
6226 void setExceptionHandler(VoidFunctionPointer handler);
6227 void defaultExceptionHandler();
6228
6229 u32 getCPSR();
6230 # 63 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
6231 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/image.h" 1
6232 # 51 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/image.h"
6233 typedef struct
6234 {
6235 unsigned char r,g,b;
6236 }__attribute__ ((packed)) RGB_24;
6237
6238
6239 typedef struct
6240 {
6241 short height,width;
6242 int bpp;
6243 unsigned short* palette;
6244
6245 union
6246 {
6247 unsigned char* data8;
6248 unsigned short* data16;
6249 unsigned int* data32;
6250 } image;
6251
6252 } sImage, *psImage;
6253
6254
6255
6256
6257
6258 void image24to16(sImage* img);
6259 void image8to16(sImage* img);
6260 void image8to16trans(sImage* img, u8 transperentColor);
6261 void imageDestroy(sImage* img);
6262 void imageTileData(sImage* img);
6263
6264
6265
6266
6267
6268
6269 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/pcx.h" 1
6270 # 41 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/pcx.h"
6271 typedef struct
6272 {
6273 char manufacturer;
6274 char version;
6275 char encoding;
6276 char bitsPerPixel;
6277 short int xmin,ymin;
6278 short int xmax,ymax;
6279 short int hres;
6280 short int vres;
6281 char palette16[48];
6282 char reserved;
6283 char colorPlanes;
6284 short int bytesPerLine;
6285 short int paletteYype;
6286 char filler[58];
6287 }__attribute__ ((packed)) PCXHeader, *pPCXHeader;
6288
6289
6290
6291
6292
6293 int loadPCX(unsigned char* pcx, sImage* image);
6294 # 88 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/image.h" 2
6295 # 64 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
6296 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/input.h" 1
6297 # 104 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/input.h"
6298 typedef enum KEYPAD_BITS {
6299 KEY_A = (1 << (0)),
6300 KEY_B = (1 << (1)),
6301 KEY_SELECT = (1 << (2)),
6302 KEY_START = (1 << (3)),
6303 KEY_RIGHT = (1 << (4)),
6304 KEY_LEFT = (1 << (5)),
6305 KEY_UP = (1 << (6)),
6306 KEY_DOWN = (1 << (7)),
6307 KEY_R = (1 << (8)),
6308 KEY_L = (1 << (9)),
6309 KEY_X = (1 << (10)),
6310 KEY_Y = (1 << (11)),
6311 KEY_TOUCH = (1 << (12)),
6312 KEY_LID = (1 << (13))
6313 } KEYPAD_BITS;
6314 # 128 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/input.h"
6315 void scanKeys();
6316
6317
6318 uint32 keysHeld(void);
6319
6320
6321 uint32 keysDown(void);
6322
6323
6324 uint32 keysDownRepeat(void);
6325
6326
6327
6328
6329
6330 void keysSetRepeat( u8 setDelay, u8 setRepeat );
6331
6332
6333 uint32 keysUp(void);
6334
6335
6336 touchPosition touchReadXY();
6337 # 65 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
6338
6339
6340 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/rumble.h" 1
6341 # 50 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/rumble.h"
6342 typedef enum {
6343 RUMBLE,
6344 WARIOWARE
6345 }RUMBLE_TYPE;
6346
6347
6348
6349
6350
6351 bool isRumbleInserted(void);
6352
6353
6354
6355
6356
6357 void setRumble(bool position);
6358 # 68 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
6359 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/sound.h" 1
6360 # 47 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/sound.h"
6361 void playSound( pTransferSoundData sound);
6362 void setGenericSound( u32 rate, u8 vol, u8 pan, u8 format);
6363 void playGenericSound(const void* data, u32 length);
6364 # 69 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
6365
6366
6367
6368 # 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/sprite.h" 1
6369 # 82 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/sprite.h"
6370 typedef enum
6371 {
6372 OBJMODE_NORMAL,
6373 OBJMODE_BLENDED,
6374 OBJMODE_WINDOWED,
6375 OBJMODE_BITMAP,
6376
6377 } tObjMode;
6378
6379
6380
6381
6382
6383 typedef enum {
6384 OBJSHAPE_SQUARE,
6385 OBJSHAPE_WIDE,
6386 OBJSHAPE_TALL,
6387 OBJSHAPE_FORBIDDEN,
6388 } tObjShape;
6389
6390
6391
6392
6393
6394 typedef enum {
6395 OBJSIZE_8,
6396 OBJSIZE_16,
6397 OBJSIZE_32,
6398 OBJSIZE_64,
6399 } tObjSize;
6400
6401
6402
6403
6404
6405 typedef enum {
6406 OBJCOLOR_16,
6407 OBJCOLOR_256,
6408 } tObjColMode;
6409
6410
6411
6412
6413
6414 typedef enum {
6415 OBJPRIORITY_0,
6416 OBJPRIORITY_1,
6417 OBJPRIORITY_2,
6418 OBJPRIORITY_3,
6419 } tObjPriority;
6420
6421
6422
6423 typedef union {
6424 struct {
6425
6426 struct {
6427 u16 posY :8;
6428 union {
6429 struct {
6430 u8 :1;
6431 bool isHidden :1;
6432 u8 :6;
6433 };
6434 struct {
6435 bool isRotoscale :1;
6436 bool rsDouble :1;
6437 tObjMode objMode :2;
6438 bool isMosaic :1;
6439 tObjColMode colMode :1;
6440 tObjShape objShape :2;
6441 };
6442 };
6443 };
6444
6445 union {
6446 struct {
6447 u16 posX :9;
6448 u8 :7;
6449 };
6450 struct {
6451 u8 :8;
6452 union {
6453 struct {
6454 u8 :4;
6455 bool hFlip :1;
6456 bool vFlip :1;
6457 u8 :2;
6458 };
6459 struct {
6460 u8 :1;
6461 u8 rsMatrixIdx :5;
6462 tObjSize objSize :2;
6463 };
6464 };
6465 };
6466 };
6467
6468 struct {
6469 u16 tileIdx :10;
6470 tObjPriority objPriority :2;
6471 u8 objPal :4;
6472 };
6473
6474 u16 attribute3;
6475 };
6476
6477 struct {
6478 uint16 attribute[3];
6479 uint16 filler;
6480 };
6481
6482 } SpriteEntry, * pSpriteEntry;
6483
6484
6485 typedef struct sSpriteRotation {
6486 uint16 filler1[3];
6487 int16 hdx;
6488
6489 uint16 filler2[3];
6490 int16 hdy;
6491
6492 uint16 filler3[3];
6493 int16 vdx;
6494
6495 uint16 filler4[3];
6496 int16 vdy;
6497 } SpriteRotation, * pSpriteRotation;
6498 # 218 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/sprite.h"
6499 typedef union {
6500 SpriteEntry spriteBuffer[128];
6501 SpriteRotation matrixBuffer[32];
6502 } tOAM;
6503 # 73 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
6504 # 4 "/home/lifning/hack/nds-test/source/main.c" 2
6505
6506 void delay(int s) {
6507 while(s-- > 0) {
6508 int i = 60;
6509 while(--i) swiWaitForVBlank();
6510 }
6511 }
6512
6513 int main(void) {
6514 SDL_Surface *screen;
6515 SDL_Joystick *stick;
6516 SDL_Event event;
6517 SDL_Rect rect = {8,8,240,176};
6518
6519 consoleDemoInit();
6520 if(SDL_Init(0x00000020|0x00000200) < 0) {
6521 puts("# error initializing SDL");
6522 puts(SDL_GetError());
6523 return 1;
6524 }
6525 puts("* initialized SDL\n"); delay(1);
6526
6527 screen = SDL_SetVideoMode(256, 192, 16, 0x00000000);
6528 if(!screen) {
6529 puts("# error setting video mode");
6530 puts(SDL_GetError());
6531 return 2;
6532 }
6533 puts("* set video mode\n"); delay(1);
6534
6535 stick = SDL_JoystickOpen(0);
6536 if(stick == ((void *)0)) {
6537 puts("# error opening joystick");
6538 puts(SDL_GetError());
6539 return 3;
6540 }
6541 puts("* opened joystick"); delay(1);
6542
6543 while(1)
6544 while(SDL_PollEvent(&event))
6545 switch(event.type) {
6546 case SDL_JOYBUTTONDOWN:
6547 switch(event.jbutton.which) {
6548 case 0:
6549 SDL_FillRect(screen, &rect, ((31)|((0)<<5)|((0)<<10))|0x8000);
6550 break;
6551 case 1:
6552 SDL_FillRect(screen, &rect, ((0)|((31)<<5)|((0)<<10))|0x8000);
6553 break;
6554 case 2:
6555 SDL_FillRect(screen, &rect, ((0)|((0)<<5)|((31)<<10))|0x8000);
6556 break;
6557 case 3:
6558 SDL_FillRect(screen, &rect, ((0)|((0)<<5)|((0)<<10))|0x8000);
6559 break;
6560 default: break;
6561 }
6562 SDL_Flip(screen);
6563 break;
6564 default: break;
6565 }
6566
6567 return 0;
6568 }