Importing SDLPerl 2.2
[sdlgit/SDL_perl.git] / src / SDL_perl.c
1 /*
2  * This file was generated automatically by xsubpp version 1.9508 from the
3  * contents of SDL_perl.xs. Do not edit this file, edit SDL_perl.xs instead.
4  *
5  *      ANY CHANGES MADE HERE WILL BE LOST!
6  *
7  */
8
9 #line 1 "SDL_perl.xs"
10 //
11 // SDL.xs
12 //
13 // Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
14 //
15 // ------------------------------------------------------------------------------
16 //
17 // This library is free software; you can redistribute it and/or
18 // modify it under the terms of the GNU Lesser General Public
19 // License as published by the Free Software Foundation; either
20 // version 2.1 of the License, or (at your option) any later version.
21 // 
22 // This library is distributed in the hope that it will be useful,
23 // but WITHOUT ANY WARRANTY; without even the implied warranty of
24 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
25 // Lesser General Public License for more details.
26 // 
27 // You should have received a copy of the GNU Lesser General Public
28 // License along with this library; if not, write to the Free Software
29 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
30 //
31 // ------------------------------------------------------------------------------
32 //
33 // Please feel free to send questions, suggestions or improvements to:
34 //
35 //      David J. Goehrig
36 //      dgoehrig@cpan.org
37 //
38
39 #include "EXTERN.h"
40 #include "perl.h"
41 #include "XSUB.h"
42
43 #ifndef aTHX_
44 #define aTHX_
45 #endif
46
47 #include <SDL.h>
48
49 #ifdef HAVE_GL
50 #include <gl.h>
51 #endif
52
53 #ifdef HAVE_GLU
54 #include <glu.h>
55 #endif
56
57 #ifdef HAVE_SDL_IMAGE
58 #include <SDL_image.h>
59 #endif 
60
61 #ifdef HAVE_SDL_MIXER
62 #include <SDL_mixer.h>
63 void (*mix_music_finished_cv)();
64 #endif
65
66 #ifdef HAVE_SDL_SOUND
67 #include <SDL_sound.h>
68 #endif
69
70 #ifdef HAVE_SDL_NET
71 #include <SDL_net.h>
72 #endif
73
74 #ifdef HAVE_SDL_TTF
75 #include <SDL_ttf.h>
76 #define TEXT_SOLID      1
77 #define TEXT_SHADED     2
78 #define TEXT_BLENDED    4
79 #define UTF8_SOLID      8
80 #define UTF8_SHADED     16      
81 #define UTF8_BLENDED    32
82 #define UNICODE_SOLID   64
83 #define UNICODE_SHADED  128
84 #define UNICODE_BLENDED 256
85 #endif
86
87 #ifdef HAVE_SMPEG
88 #include <smpeg/smpeg.h>
89 #ifdef HAVE_SDL_MIXER
90 static int sdl_perl_use_smpeg_audio = 0;
91 #endif
92 #endif
93
94 #ifdef HAVE_SDL_GFX
95 #include <SDL_rotozoom.h>
96 #include <SDL_gfxPrimitives.h>
97 #include <SDL_framerate.h>
98 #include <SDL_imageFilter.h>
99 #endif
100
101 #ifdef HAVE_SDL_SVG
102 #include <SDL_svg.h>
103 #endif
104
105 #ifdef USE_THREADS
106 #define HAVE_TLS_CONTEXT
107 #endif
108
109 #include "defines.h"
110
111 Uint32 
112 sdl_perl_timer_callback ( Uint32 interval, void* param )
113 {
114         Uint32 retval;
115         int back;
116         SV* cmd;
117         ENTER_TLS_CONTEXT
118         dSP;
119
120         cmd = (SV*)param;
121
122         ENTER;
123         SAVETMPS;
124         PUSHMARK(SP);
125         XPUSHs(sv_2mortal(newSViv(interval)));
126         PUTBACK;
127
128         if (0 != (back = call_sv(cmd,G_SCALAR))) {
129                 SPAGAIN;
130                 if (back != 1 ) Perl_croak (aTHX_ "Timer Callback failed!");
131                 retval = POPi;  
132         } else {
133                 Perl_croak(aTHX_ "Timer Callback failed!");
134         }
135
136         FREETMPS;
137         LEAVE;
138
139         LEAVE_TLS_CONTEXT
140         
141         return retval;
142 }
143
144 void
145 sdl_perl_audio_callback ( void* data, Uint8 *stream, int len )
146 {
147         SV *cmd;
148         ENTER_TLS_CONTEXT
149         dSP;
150
151         cmd = (SV*)data;
152
153         ENTER;
154         SAVETMPS;
155         PUSHMARK(SP);
156         XPUSHs(sv_2mortal(newSViv(PTR2IV(stream))));
157         XPUSHs(sv_2mortal(newSViv(len)));
158         PUTBACK;
159
160         call_sv(cmd,G_VOID|G_DISCARD);
161         
162         PUTBACK;
163         FREETMPS;
164         LEAVE;
165
166         LEAVE_TLS_CONTEXT       
167 }
168
169 #ifdef HAVE_SDL_MIXER
170
171 void
172 sdl_perl_music_callback ( void ) 
173 {
174         SV *cmd;
175         ENTER_TLS_CONTEXT
176         dSP;
177
178         cmd = (SV*)Mix_GetMusicHookData();
179
180         ENTER;
181         SAVETMPS;
182         PUSHMARK(SP);
183         PUTBACK;
184         
185         call_sv(cmd,G_VOID|G_DISCARD);
186
187         PUTBACK;
188         FREETMPS;
189         LEAVE;
190
191         LEAVE_TLS_CONTEXT
192 }
193
194 void
195 sdl_perl_music_finished_callback ( void )
196 {
197         SV *cmd;
198         ENTER_TLS_CONTEXT
199         dSP;
200
201         cmd = (SV*)mix_music_finished_cv;
202         if ( cmd == NULL ) return;
203
204         ENTER;
205         SAVETMPS;
206         PUSHMARK(SP);
207         PUTBACK;
208         
209         call_sv(cmd,G_VOID|G_DISCARD);
210         
211         PUTBACK;
212         FREETMPS;
213         LEAVE;
214
215         LEAVE_TLS_CONTEXT
216 }
217
218 #endif
219
220 #define INIT_NS_APPLICATION
221 #define QUIT_NS_APPLICATION
222
223
224 void
225 sdl_perl_atexit (void)
226 {
227         QUIT_NS_APPLICATION     
228         SDL_Quit();
229 }
230
231 void boot_SDL();
232 void boot_SDL__OpenGL();
233
234 XS(boot_SDL_perl)
235 {
236         GET_TLS_CONTEXT
237         boot_SDL();
238 }
239
240 #line 241 "SDL_perl.c"
241 XS(XS_SDL_GetError); /* prototype to pass -Wmissing-prototypes */
242 XS(XS_SDL_GetError)
243 {
244     dXSARGS;
245     if (items != 0)
246         Perl_croak(aTHX_ "Usage: SDL::GetError()");
247     {
248         char *  RETVAL;
249         dXSTARG;
250 #line 237 "SDL_perl.xs"
251                 RETVAL = SDL_GetError();
252 #line 253 "SDL_perl.c"
253         sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
254     }
255     XSRETURN(1);
256 }
257
258 XS(XS_SDL_Init); /* prototype to pass -Wmissing-prototypes */
259 XS(XS_SDL_Init)
260 {
261     dXSARGS;
262     if (items != 1)
263         Perl_croak(aTHX_ "Usage: SDL::Init(flags)");
264     {
265         Uint32  flags = (Uint32)SvUV(ST(0));
266         int     RETVAL;
267         dXSTARG;
268 #line 245 "SDL_perl.xs"
269                 INIT_NS_APPLICATION
270                 RETVAL = SDL_Init(flags);
271 #ifdef HAVE_TLS_CONTEXT
272                 Perl_call_atexit(PERL_GET_CONTEXT, (void*)sdl_perl_atexit,0);
273 #else
274                 atexit(sdl_perl_atexit);
275 #endif
276 #line 277 "SDL_perl.c"
277         XSprePUSH; PUSHi((IV)RETVAL);
278     }
279     XSRETURN(1);
280 }
281
282 XS(XS_SDL_InitSubSystem); /* prototype to pass -Wmissing-prototypes */
283 XS(XS_SDL_InitSubSystem)
284 {
285     dXSARGS;
286     if (items != 1)
287         Perl_croak(aTHX_ "Usage: SDL::InitSubSystem(flags)");
288     {
289         Uint32  flags = (Uint32)SvUV(ST(0));
290         int     RETVAL;
291         dXSTARG;
292 #line 259 "SDL_perl.xs"
293                 RETVAL = SDL_InitSubSystem(flags);
294 #line 295 "SDL_perl.c"
295         XSprePUSH; PUSHi((IV)RETVAL);
296     }
297     XSRETURN(1);
298 }
299
300 XS(XS_SDL_QuitSubSystem); /* prototype to pass -Wmissing-prototypes */
301 XS(XS_SDL_QuitSubSystem)
302 {
303     dXSARGS;
304     if (items != 1)
305         Perl_croak(aTHX_ "Usage: SDL::QuitSubSystem(flags)");
306     {
307         Uint32  flags = (Uint32)SvUV(ST(0));
308 #line 267 "SDL_perl.xs"
309                 SDL_QuitSubSystem(flags);
310 #line 311 "SDL_perl.c"
311     }
312     XSRETURN_EMPTY;
313 }
314
315 XS(XS_SDL_Quit); /* prototype to pass -Wmissing-prototypes */
316 XS(XS_SDL_Quit)
317 {
318     dXSARGS;
319     if (items != 0)
320         Perl_croak(aTHX_ "Usage: SDL::Quit()");
321     {
322 #line 272 "SDL_perl.xs"
323                 QUIT_NS_APPLICATION
324                 SDL_Quit();
325 #line 326 "SDL_perl.c"
326     }
327     XSRETURN_EMPTY;
328 }
329
330 XS(XS_SDL_WasInit); /* prototype to pass -Wmissing-prototypes */
331 XS(XS_SDL_WasInit)
332 {
333     dXSARGS;
334     if (items != 1)
335         Perl_croak(aTHX_ "Usage: SDL::WasInit(flags)");
336     {
337         Uint32  flags = (Uint32)SvUV(ST(0));
338         int     RETVAL;
339         dXSTARG;
340 #line 279 "SDL_perl.xs"
341                 RETVAL = SDL_WasInit(flags);
342 #line 343 "SDL_perl.c"
343         XSprePUSH; PUSHi((IV)RETVAL);
344     }
345     XSRETURN(1);
346 }
347
348 XS(XS_SDL_Delay); /* prototype to pass -Wmissing-prototypes */
349 XS(XS_SDL_Delay)
350 {
351     dXSARGS;
352     if (items != 1)
353         Perl_croak(aTHX_ "Usage: SDL::Delay(ms)");
354     {
355         int     ms = (int)SvIV(ST(0));
356 #line 287 "SDL_perl.xs"
357                 SDL_Delay(ms);
358 #line 359 "SDL_perl.c"
359     }
360     XSRETURN_EMPTY;
361 }
362
363 XS(XS_SDL_GetTicks); /* prototype to pass -Wmissing-prototypes */
364 XS(XS_SDL_GetTicks)
365 {
366     dXSARGS;
367     if (items != 0)
368         Perl_croak(aTHX_ "Usage: SDL::GetTicks()");
369     {
370         Uint32  RETVAL;
371         dXSTARG;
372 #line 292 "SDL_perl.xs"
373                 RETVAL = SDL_GetTicks();
374 #line 375 "SDL_perl.c"
375         XSprePUSH; PUSHu((UV)RETVAL);
376     }
377     XSRETURN(1);
378 }
379
380 XS(XS_SDL_SetTimer); /* prototype to pass -Wmissing-prototypes */
381 XS(XS_SDL_SetTimer)
382 {
383     dXSARGS;
384     if (items != 2)
385         Perl_croak(aTHX_ "Usage: SDL::SetTimer(interval, callback)");
386     {
387         Uint32  interval = (Uint32)SvUV(ST(0));
388         SDL_TimerCallback       callback = INT2PTR(SDL_TimerCallback,SvIV(ST(1)));
389         int     RETVAL;
390         dXSTARG;
391 #line 301 "SDL_perl.xs"
392                 RETVAL = SDL_SetTimer(interval,callback);
393 #line 394 "SDL_perl.c"
394         XSprePUSH; PUSHi((IV)RETVAL);
395     }
396     XSRETURN(1);
397 }
398
399 XS(XS_SDL_AddTimer); /* prototype to pass -Wmissing-prototypes */
400 XS(XS_SDL_AddTimer)
401 {
402     dXSARGS;
403     if (items != 3)
404         Perl_croak(aTHX_ "Usage: SDL::AddTimer(interval, callback, param)");
405     {
406         Uint32  interval = (Uint32)SvUV(ST(0));
407         SDL_NewTimerCallback    callback = INT2PTR(SDL_NewTimerCallback,SvIV(ST(1)));
408         void *  param = INT2PTR(void *,SvIV(ST(2)));
409         SDL_TimerID     RETVAL;
410         dXSTARG;
411 #line 311 "SDL_perl.xs"
412                 RETVAL = SDL_AddTimer(interval,callback,param);
413 #line 414 "SDL_perl.c"
414         XSprePUSH; PUSHi(PTR2IV(RETVAL));
415     }
416     XSRETURN(1);
417 }
418
419 XS(XS_SDL_PerlTimerCallback); /* prototype to pass -Wmissing-prototypes */
420 XS(XS_SDL_PerlTimerCallback)
421 {
422     dXSARGS;
423     if (items != 0)
424         Perl_croak(aTHX_ "Usage: SDL::PerlTimerCallback()");
425     {
426         SDL_NewTimerCallback    RETVAL;
427         dXSTARG;
428 #line 318 "SDL_perl.xs"
429                 RETVAL = sdl_perl_timer_callback;
430 #line 431 "SDL_perl.c"
431         XSprePUSH; PUSHi(PTR2IV(RETVAL));
432     }
433     XSRETURN(1);
434 }
435
436 XS(XS_SDL_NewTimer); /* prototype to pass -Wmissing-prototypes */
437 XS(XS_SDL_NewTimer)
438 {
439     dXSARGS;
440     if (items != 2)
441         Perl_croak(aTHX_ "Usage: SDL::NewTimer(interval, cmd)");
442     {
443         Uint32  interval = (Uint32)SvUV(ST(0));
444         void *  cmd = INT2PTR(void *,SvIV(ST(1)));
445         SDL_TimerID     RETVAL;
446         dXSTARG;
447 #line 327 "SDL_perl.xs"
448                 RETVAL = SDL_AddTimer(interval,sdl_perl_timer_callback,cmd);
449 #line 450 "SDL_perl.c"
450         XSprePUSH; PUSHi(PTR2IV(RETVAL));
451     }
452     XSRETURN(1);
453 }
454
455 XS(XS_SDL_RemoveTimer); /* prototype to pass -Wmissing-prototypes */
456 XS(XS_SDL_RemoveTimer)
457 {
458     dXSARGS;
459     if (items != 1)
460         Perl_croak(aTHX_ "Usage: SDL::RemoveTimer(id)");
461     {
462         SDL_TimerID     id = INT2PTR(SDL_TimerID,SvIV(ST(0)));
463         Uint32  RETVAL;
464         dXSTARG;
465 #line 335 "SDL_perl.xs"
466                 RETVAL = SDL_RemoveTimer(id);
467 #line 468 "SDL_perl.c"
468         XSprePUSH; PUSHu((UV)RETVAL);
469     }
470     XSRETURN(1);
471 }
472
473 XS(XS_SDL_RWFromFile); /* prototype to pass -Wmissing-prototypes */
474 XS(XS_SDL_RWFromFile)
475 {
476     dXSARGS;
477     if (items != 2)
478         Perl_croak(aTHX_ "Usage: SDL::RWFromFile(file, mode)");
479     {
480         char*   file = (char *)SvPV_nolen(ST(0));
481         char *  mode = (char *)SvPV_nolen(ST(1));
482         SDL_RWops *     RETVAL;
483         dXSTARG;
484 #line 344 "SDL_perl.xs"
485                 RETVAL = SDL_RWFromFile(file,mode);
486 #line 487 "SDL_perl.c"
487         XSprePUSH; PUSHi(PTR2IV(RETVAL));
488     }
489     XSRETURN(1);
490 }
491
492 XS(XS_SDL_RWFromFP); /* prototype to pass -Wmissing-prototypes */
493 XS(XS_SDL_RWFromFP)
494 {
495     dXSARGS;
496     if (items != 2)
497         Perl_croak(aTHX_ "Usage: SDL::RWFromFP(fp, autoclose)");
498     {
499         FILE*   fp = PerlIO_findFILE(IoIFP(sv_2io(ST(0))));
500         int     autoclose = (int)SvIV(ST(1));
501         SDL_RWops *     RETVAL;
502         dXSTARG;
503 #line 353 "SDL_perl.xs"
504                 RETVAL = SDL_RWFromFP(fp,autoclose);
505 #line 506 "SDL_perl.c"
506         XSprePUSH; PUSHi(PTR2IV(RETVAL));
507     }
508     XSRETURN(1);
509 }
510
511 XS(XS_SDL_RWFromMem); /* prototype to pass -Wmissing-prototypes */
512 XS(XS_SDL_RWFromMem)
513 {
514     dXSARGS;
515     if (items != 2)
516         Perl_croak(aTHX_ "Usage: SDL::RWFromMem(mem, size)");
517     {
518         char*   mem = (char *)SvPV_nolen(ST(0));
519         int     size = (int)SvIV(ST(1));
520         SDL_RWops *     RETVAL;
521         dXSTARG;
522 #line 362 "SDL_perl.xs"
523                 RETVAL = SDL_RWFromMem((void*)mem,size);
524 #line 525 "SDL_perl.c"
525         XSprePUSH; PUSHi(PTR2IV(RETVAL));
526     }
527     XSRETURN(1);
528 }
529
530 XS(XS_SDL_RWFromConstMem); /* prototype to pass -Wmissing-prototypes */
531 XS(XS_SDL_RWFromConstMem)
532 {
533     dXSARGS;
534     if (items != 2)
535         Perl_croak(aTHX_ "Usage: SDL::RWFromConstMem(mem, size)");
536     {
537         const char*     mem = (const char *)SvPV_nolen(ST(0));
538         int     size = (int)SvIV(ST(1));
539         SDL_RWops *     RETVAL;
540         dXSTARG;
541 #line 371 "SDL_perl.xs"
542                 RETVAL = SDL_RWFromConstMem((const void*)mem,size);
543 #line 544 "SDL_perl.c"
544         XSprePUSH; PUSHi(PTR2IV(RETVAL));
545     }
546     XSRETURN(1);
547 }
548
549 XS(XS_SDL_AllocRW); /* prototype to pass -Wmissing-prototypes */
550 XS(XS_SDL_AllocRW)
551 {
552     dXSARGS;
553     if (items != 0)
554         Perl_croak(aTHX_ "Usage: SDL::AllocRW()");
555     {
556         SDL_RWops *     RETVAL;
557         dXSTARG;
558 #line 378 "SDL_perl.xs"
559                 RETVAL = SDL_AllocRW();
560 #line 561 "SDL_perl.c"
561         XSprePUSH; PUSHi(PTR2IV(RETVAL));
562     }
563     XSRETURN(1);
564 }
565
566 XS(XS_SDL_FreeRW); /* prototype to pass -Wmissing-prototypes */
567 XS(XS_SDL_FreeRW)
568 {
569     dXSARGS;
570     if (items != 1)
571         Perl_croak(aTHX_ "Usage: SDL::FreeRW(rw)");
572     {
573         SDL_RWops*      rw = INT2PTR(SDL_RWops *,SvIV(ST(0)));
574 #line 386 "SDL_perl.xs"
575                 SDL_FreeRW(rw);
576 #line 577 "SDL_perl.c"
577     }
578     XSRETURN_EMPTY;
579 }
580
581 XS(XS_SDL_RWseek); /* prototype to pass -Wmissing-prototypes */
582 XS(XS_SDL_RWseek)
583 {
584     dXSARGS;
585     if (items != 3)
586         Perl_croak(aTHX_ "Usage: SDL::RWseek(rw, off, whence)");
587     {
588         SDL_RWops*      rw = INT2PTR(SDL_RWops *,SvIV(ST(0)));
589         int     off = (int)SvIV(ST(1));
590         int     whence = (int)SvIV(ST(2));
591         int     RETVAL;
592         dXSTARG;
593 #line 394 "SDL_perl.xs"
594                 RETVAL = SDL_RWseek(rw,off,whence);
595 #line 596 "SDL_perl.c"
596         XSprePUSH; PUSHi((IV)RETVAL);
597     }
598     XSRETURN(1);
599 }
600
601 XS(XS_SDL_RWtell); /* prototype to pass -Wmissing-prototypes */
602 XS(XS_SDL_RWtell)
603 {
604     dXSARGS;
605     if (items != 1)
606         Perl_croak(aTHX_ "Usage: SDL::RWtell(rw)");
607     {
608         SDL_RWops*      rw = INT2PTR(SDL_RWops *,SvIV(ST(0)));
609         int     RETVAL;
610         dXSTARG;
611 #line 402 "SDL_perl.xs"
612                 RETVAL = SDL_RWtell(rw);
613 #line 614 "SDL_perl.c"
614         XSprePUSH; PUSHi((IV)RETVAL);
615     }
616     XSRETURN(1);
617 }
618
619 XS(XS_SDL_RWread); /* prototype to pass -Wmissing-prototypes */
620 XS(XS_SDL_RWread)
621 {
622     dXSARGS;
623     if (items != 4)
624         Perl_croak(aTHX_ "Usage: SDL::RWread(rw, mem, size, n)");
625     {
626         SDL_RWops*      rw = INT2PTR(SDL_RWops *,SvIV(ST(0)));
627         char*   mem = (char *)SvPV_nolen(ST(1));
628         int     size = (int)SvIV(ST(2));
629         int     n = (int)SvIV(ST(3));
630         int     RETVAL;
631         dXSTARG;
632 #line 413 "SDL_perl.xs"
633                 RETVAL = SDL_RWread(rw,mem,size,n);
634 #line 635 "SDL_perl.c"
635         XSprePUSH; PUSHi((IV)RETVAL);
636     }
637     XSRETURN(1);
638 }
639
640 XS(XS_SDL_RWwrite); /* prototype to pass -Wmissing-prototypes */
641 XS(XS_SDL_RWwrite)
642 {
643     dXSARGS;
644     if (items != 4)
645         Perl_croak(aTHX_ "Usage: SDL::RWwrite(rw, mem, size, n)");
646     {
647         SDL_RWops*      rw = INT2PTR(SDL_RWops *,SvIV(ST(0)));
648         char*   mem = (char *)SvPV_nolen(ST(1));
649         int     size = (int)SvIV(ST(2));
650         int     n = (int)SvIV(ST(3));
651         int     RETVAL;
652         dXSTARG;
653 #line 424 "SDL_perl.xs"
654                 RETVAL = SDL_RWwrite(rw,mem,size,n);
655 #line 656 "SDL_perl.c"
656         XSprePUSH; PUSHi((IV)RETVAL);
657     }
658     XSRETURN(1);
659 }
660
661 XS(XS_SDL_RWclose); /* prototype to pass -Wmissing-prototypes */
662 XS(XS_SDL_RWclose)
663 {
664     dXSARGS;
665     if (items != 1)
666         Perl_croak(aTHX_ "Usage: SDL::RWclose(rw)");
667     {
668         SDL_RWops*      rw = INT2PTR(SDL_RWops *,SvIV(ST(0)));
669         int     RETVAL;
670         dXSTARG;
671 #line 432 "SDL_perl.xs"
672                 RETVAL = SDL_RWclose(rw);
673 #line 674 "SDL_perl.c"
674         XSprePUSH; PUSHi((IV)RETVAL);
675     }
676     XSRETURN(1);
677 }
678
679 XS(XS_SDL_CDNumDrives); /* prototype to pass -Wmissing-prototypes */
680 XS(XS_SDL_CDNumDrives)
681 {
682     dXSARGS;
683     if (items != 0)
684         Perl_croak(aTHX_ "Usage: SDL::CDNumDrives()");
685     {
686         int     RETVAL;
687         dXSTARG;
688 #line 439 "SDL_perl.xs"
689                 RETVAL = SDL_CDNumDrives();
690 #line 691 "SDL_perl.c"
691         XSprePUSH; PUSHi((IV)RETVAL);
692     }
693     XSRETURN(1);
694 }
695
696 XS(XS_SDL_CDName); /* prototype to pass -Wmissing-prototypes */
697 XS(XS_SDL_CDName)
698 {
699     dXSARGS;
700     if (items != 1)
701         Perl_croak(aTHX_ "Usage: SDL::CDName(drive)");
702     {
703         int     drive = (int)SvIV(ST(0));
704         char *  RETVAL;
705         dXSTARG;
706 #line 447 "SDL_perl.xs"
707                 RETVAL = strdup(SDL_CDName(drive));
708 #line 709 "SDL_perl.c"
709         sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
710     }
711     XSRETURN(1);
712 }
713
714 XS(XS_SDL_CDOpen); /* prototype to pass -Wmissing-prototypes */
715 XS(XS_SDL_CDOpen)
716 {
717     dXSARGS;
718     if (items != 1)
719         Perl_croak(aTHX_ "Usage: SDL::CDOpen(drive)");
720     {
721         int     drive = (int)SvIV(ST(0));
722         SDL_CD *        RETVAL;
723         dXSTARG;
724 #line 455 "SDL_perl.xs"
725                 RETVAL = SDL_CDOpen(drive);
726 #line 727 "SDL_perl.c"
727         XSprePUSH; PUSHi(PTR2IV(RETVAL));
728     }
729     XSRETURN(1);
730 }
731
732 XS(XS_SDL_CDTrackId); /* prototype to pass -Wmissing-prototypes */
733 XS(XS_SDL_CDTrackId)
734 {
735     dXSARGS;
736     if (items != 1)
737         Perl_croak(aTHX_ "Usage: SDL::CDTrackId(track)");
738     {
739         SDL_CDtrack *   track = INT2PTR(SDL_CDtrack *,SvIV(ST(0)));
740         Uint8   RETVAL;
741         dXSTARG;
742 #line 463 "SDL_perl.xs"
743                 RETVAL = track->id;
744 #line 745 "SDL_perl.c"
745         XSprePUSH; PUSHu((UV)RETVAL);
746     }
747     XSRETURN(1);
748 }
749
750 XS(XS_SDL_CDTrackType); /* prototype to pass -Wmissing-prototypes */
751 XS(XS_SDL_CDTrackType)
752 {
753     dXSARGS;
754     if (items != 1)
755         Perl_croak(aTHX_ "Usage: SDL::CDTrackType(track)");
756     {
757         SDL_CDtrack *   track = INT2PTR(SDL_CDtrack *,SvIV(ST(0)));
758         Uint8   RETVAL;
759         dXSTARG;
760 #line 471 "SDL_perl.xs"
761                 RETVAL = track->type;
762 #line 763 "SDL_perl.c"
763         XSprePUSH; PUSHu((UV)RETVAL);
764     }
765     XSRETURN(1);
766 }
767
768 XS(XS_SDL_CDTrackLength); /* prototype to pass -Wmissing-prototypes */
769 XS(XS_SDL_CDTrackLength)
770 {
771     dXSARGS;
772     if (items != 1)
773         Perl_croak(aTHX_ "Usage: SDL::CDTrackLength(track)");
774     {
775         SDL_CDtrack *   track = INT2PTR(SDL_CDtrack *,SvIV(ST(0)));
776         Uint16  RETVAL;
777         dXSTARG;
778 #line 479 "SDL_perl.xs"
779                 RETVAL = track->length;
780 #line 781 "SDL_perl.c"
781         XSprePUSH; PUSHu((UV)RETVAL);
782     }
783     XSRETURN(1);
784 }
785
786 XS(XS_SDL_CDTrackOffset); /* prototype to pass -Wmissing-prototypes */
787 XS(XS_SDL_CDTrackOffset)
788 {
789     dXSARGS;
790     if (items != 1)
791         Perl_croak(aTHX_ "Usage: SDL::CDTrackOffset(track)");
792     {
793         SDL_CDtrack *   track = INT2PTR(SDL_CDtrack *,SvIV(ST(0)));
794         Uint32  RETVAL;
795         dXSTARG;
796 #line 487 "SDL_perl.xs"
797                 RETVAL = track->offset;
798 #line 799 "SDL_perl.c"
799         XSprePUSH; PUSHu((UV)RETVAL);
800     }
801     XSRETURN(1);
802 }
803
804 XS(XS_SDL_CDStatus); /* prototype to pass -Wmissing-prototypes */
805 XS(XS_SDL_CDStatus)
806 {
807     dXSARGS;
808     if (items != 1)
809         Perl_croak(aTHX_ "Usage: SDL::CDStatus(cd)");
810     {
811         SDL_CD *        cd = INT2PTR(SDL_CD *,SvIV(ST(0)));
812         Uint32  RETVAL;
813         dXSTARG;
814 #line 495 "SDL_perl.xs"
815                 RETVAL = SDL_CDStatus(cd);
816 #line 817 "SDL_perl.c"
817         XSprePUSH; PUSHu((UV)RETVAL);
818     }
819     XSRETURN(1);
820 }
821
822 XS(XS_SDL_CDPlayTracks); /* prototype to pass -Wmissing-prototypes */
823 XS(XS_SDL_CDPlayTracks)
824 {
825     dXSARGS;
826     if (items != 5)
827         Perl_croak(aTHX_ "Usage: SDL::CDPlayTracks(cd, start_track, ntracks, start_frame, nframes)");
828     {
829         SDL_CD *        cd = INT2PTR(SDL_CD *,SvIV(ST(0)));
830         int     start_track = (int)SvIV(ST(1));
831         int     ntracks = (int)SvIV(ST(2));
832         int     start_frame = (int)SvIV(ST(3));
833         int     nframes = (int)SvIV(ST(4));
834         int     RETVAL;
835         dXSTARG;
836 #line 507 "SDL_perl.xs"
837                 RETVAL = SDL_CDPlayTracks(cd,start_track,start_frame,ntracks,nframes);
838 #line 839 "SDL_perl.c"
839         XSprePUSH; PUSHi((IV)RETVAL);
840     }
841     XSRETURN(1);
842 }
843
844 XS(XS_SDL_CDPlay); /* prototype to pass -Wmissing-prototypes */
845 XS(XS_SDL_CDPlay)
846 {
847     dXSARGS;
848     if (items != 3)
849         Perl_croak(aTHX_ "Usage: SDL::CDPlay(cd, start, length)");
850     {
851         SDL_CD *        cd = INT2PTR(SDL_CD *,SvIV(ST(0)));
852         int     start = (int)SvIV(ST(1));
853         int     length = (int)SvIV(ST(2));
854         int     RETVAL;
855         dXSTARG;
856 #line 517 "SDL_perl.xs"
857                 RETVAL = SDL_CDPlay(cd,start,length);
858 #line 859 "SDL_perl.c"
859         XSprePUSH; PUSHi((IV)RETVAL);
860     }
861     XSRETURN(1);
862 }
863
864 XS(XS_SDL_CDPause); /* prototype to pass -Wmissing-prototypes */
865 XS(XS_SDL_CDPause)
866 {
867     dXSARGS;
868     if (items != 1)
869         Perl_croak(aTHX_ "Usage: SDL::CDPause(cd)");
870     {
871         SDL_CD *        cd = INT2PTR(SDL_CD *,SvIV(ST(0)));
872         int     RETVAL;
873         dXSTARG;
874 #line 525 "SDL_perl.xs"
875                 RETVAL = SDL_CDPause(cd);
876 #line 877 "SDL_perl.c"
877         XSprePUSH; PUSHi((IV)RETVAL);
878     }
879     XSRETURN(1);
880 }
881
882 XS(XS_SDL_CDResume); /* prototype to pass -Wmissing-prototypes */
883 XS(XS_SDL_CDResume)
884 {
885     dXSARGS;
886     if (items != 1)
887         Perl_croak(aTHX_ "Usage: SDL::CDResume(cd)");
888     {
889         SDL_CD *        cd = INT2PTR(SDL_CD *,SvIV(ST(0)));
890         int     RETVAL;
891         dXSTARG;
892 #line 533 "SDL_perl.xs"
893                 RETVAL = SDL_CDResume(cd);
894 #line 895 "SDL_perl.c"
895         XSprePUSH; PUSHi((IV)RETVAL);
896     }
897     XSRETURN(1);
898 }
899
900 XS(XS_SDL_CDStop); /* prototype to pass -Wmissing-prototypes */
901 XS(XS_SDL_CDStop)
902 {
903     dXSARGS;
904     if (items != 1)
905         Perl_croak(aTHX_ "Usage: SDL::CDStop(cd)");
906     {
907         SDL_CD *        cd = INT2PTR(SDL_CD *,SvIV(ST(0)));
908         int     RETVAL;
909         dXSTARG;
910 #line 541 "SDL_perl.xs"
911                 RETVAL = SDL_CDStop(cd);
912 #line 913 "SDL_perl.c"
913         XSprePUSH; PUSHi((IV)RETVAL);
914     }
915     XSRETURN(1);
916 }
917
918 XS(XS_SDL_CDEject); /* prototype to pass -Wmissing-prototypes */
919 XS(XS_SDL_CDEject)
920 {
921     dXSARGS;
922     if (items != 1)
923         Perl_croak(aTHX_ "Usage: SDL::CDEject(cd)");
924     {
925         SDL_CD *        cd = INT2PTR(SDL_CD *,SvIV(ST(0)));
926         int     RETVAL;
927         dXSTARG;
928 #line 549 "SDL_perl.xs"
929                 RETVAL = SDL_CDEject(cd);
930 #line 931 "SDL_perl.c"
931         XSprePUSH; PUSHi((IV)RETVAL);
932     }
933     XSRETURN(1);
934 }
935
936 XS(XS_SDL_CDClose); /* prototype to pass -Wmissing-prototypes */
937 XS(XS_SDL_CDClose)
938 {
939     dXSARGS;
940     if (items != 1)
941         Perl_croak(aTHX_ "Usage: SDL::CDClose(cd)");
942     {
943         SDL_CD *        cd = INT2PTR(SDL_CD *,SvIV(ST(0)));
944 #line 557 "SDL_perl.xs"
945                 SDL_CDClose(cd);
946 #line 947 "SDL_perl.c"
947     }
948     XSRETURN_EMPTY;
949 }
950
951 XS(XS_SDL_CDId); /* prototype to pass -Wmissing-prototypes */
952 XS(XS_SDL_CDId)
953 {
954     dXSARGS;
955     if (items != 1)
956         Perl_croak(aTHX_ "Usage: SDL::CDId(cd)");
957     {
958         SDL_CD *        cd = INT2PTR(SDL_CD *,SvIV(ST(0)));
959         int     RETVAL;
960         dXSTARG;
961 #line 563 "SDL_perl.xs"
962                 RETVAL = cd->id;
963 #line 964 "SDL_perl.c"
964         XSprePUSH; PUSHi((IV)RETVAL);
965     }
966     XSRETURN(1);
967 }
968
969 XS(XS_SDL_CDNumTracks); /* prototype to pass -Wmissing-prototypes */
970 XS(XS_SDL_CDNumTracks)
971 {
972     dXSARGS;
973     if (items != 1)
974         Perl_croak(aTHX_ "Usage: SDL::CDNumTracks(cd)");
975     {
976         SDL_CD *        cd = INT2PTR(SDL_CD *,SvIV(ST(0)));
977         int     RETVAL;
978         dXSTARG;
979 #line 571 "SDL_perl.xs"
980                 RETVAL = cd->numtracks;
981 #line 982 "SDL_perl.c"
982         XSprePUSH; PUSHi((IV)RETVAL);
983     }
984     XSRETURN(1);
985 }
986
987 XS(XS_SDL_CDCurTrack); /* prototype to pass -Wmissing-prototypes */
988 XS(XS_SDL_CDCurTrack)
989 {
990     dXSARGS;
991     if (items != 1)
992         Perl_croak(aTHX_ "Usage: SDL::CDCurTrack(cd)");
993     {
994         SDL_CD *        cd = INT2PTR(SDL_CD *,SvIV(ST(0)));
995         int     RETVAL;
996         dXSTARG;
997 #line 579 "SDL_perl.xs"
998                 RETVAL = cd->cur_track;
999 #line 1000 "SDL_perl.c"
1000         XSprePUSH; PUSHi((IV)RETVAL);
1001     }
1002     XSRETURN(1);
1003 }
1004
1005 XS(XS_SDL_CDCurFrame); /* prototype to pass -Wmissing-prototypes */
1006 XS(XS_SDL_CDCurFrame)
1007 {
1008     dXSARGS;
1009     if (items != 1)
1010         Perl_croak(aTHX_ "Usage: SDL::CDCurFrame(cd)");
1011     {
1012         SDL_CD *        cd = INT2PTR(SDL_CD *,SvIV(ST(0)));
1013         int     RETVAL;
1014         dXSTARG;
1015 #line 587 "SDL_perl.xs"
1016                 RETVAL = cd->cur_frame;
1017 #line 1018 "SDL_perl.c"
1018         XSprePUSH; PUSHi((IV)RETVAL);
1019     }
1020     XSRETURN(1);
1021 }
1022
1023 XS(XS_SDL_CDTrack); /* prototype to pass -Wmissing-prototypes */
1024 XS(XS_SDL_CDTrack)
1025 {
1026     dXSARGS;
1027     if (items != 2)
1028         Perl_croak(aTHX_ "Usage: SDL::CDTrack(cd, number)");
1029     {
1030         SDL_CD *        cd = INT2PTR(SDL_CD *,SvIV(ST(0)));
1031         int     number = (int)SvIV(ST(1));
1032         SDL_CDtrack *   RETVAL;
1033         dXSTARG;
1034 #line 596 "SDL_perl.xs"
1035                 RETVAL = (SDL_CDtrack *)(cd->track + number);
1036 #line 1037 "SDL_perl.c"
1037         XSprePUSH; PUSHi(PTR2IV(RETVAL));
1038     }
1039     XSRETURN(1);
1040 }
1041
1042 XS(XS_SDL_PumpEvents); /* prototype to pass -Wmissing-prototypes */
1043 XS(XS_SDL_PumpEvents)
1044 {
1045     dXSARGS;
1046     if (items != 0)
1047         Perl_croak(aTHX_ "Usage: SDL::PumpEvents()");
1048     {
1049 #line 603 "SDL_perl.xs"
1050                 SDL_PumpEvents();
1051 #line 1052 "SDL_perl.c"
1052     }
1053     XSRETURN_EMPTY;
1054 }
1055
1056 XS(XS_SDL_PushEvent); /* prototype to pass -Wmissing-prototypes */
1057 XS(XS_SDL_PushEvent)
1058 {
1059     dXSARGS;
1060     if (items != 1)
1061         Perl_croak(aTHX_ "Usage: SDL::PushEvent(e)");
1062     {
1063         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1064         int     RETVAL;
1065         dXSTARG;
1066 #line 609 "SDL_perl.xs"
1067                 RETVAL = SDL_PushEvent( e );
1068 #line 1069 "SDL_perl.c"
1069         XSprePUSH; PUSHi((IV)RETVAL);
1070     }
1071     XSRETURN(1);
1072 }
1073
1074 XS(XS_SDL_NewEvent); /* prototype to pass -Wmissing-prototypes */
1075 XS(XS_SDL_NewEvent)
1076 {
1077     dXSARGS;
1078     if (items != 0)
1079         Perl_croak(aTHX_ "Usage: SDL::NewEvent()");
1080     {
1081         SDL_Event *     RETVAL;
1082         dXSTARG;
1083 #line 616 "SDL_perl.xs"
1084                 RETVAL = (SDL_Event *) safemalloc (sizeof(SDL_Event));
1085 #line 1086 "SDL_perl.c"
1086         XSprePUSH; PUSHi(PTR2IV(RETVAL));
1087     }
1088     XSRETURN(1);
1089 }
1090
1091 XS(XS_SDL_FreeEvent); /* prototype to pass -Wmissing-prototypes */
1092 XS(XS_SDL_FreeEvent)
1093 {
1094     dXSARGS;
1095     if (items != 1)
1096         Perl_croak(aTHX_ "Usage: SDL::FreeEvent(e)");
1097     {
1098         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1099 #line 624 "SDL_perl.xs"
1100                 safefree(e);
1101 #line 1102 "SDL_perl.c"
1102     }
1103     XSRETURN_EMPTY;
1104 }
1105
1106 XS(XS_SDL_PollEvent); /* prototype to pass -Wmissing-prototypes */
1107 XS(XS_SDL_PollEvent)
1108 {
1109     dXSARGS;
1110     if (items != 1)
1111         Perl_croak(aTHX_ "Usage: SDL::PollEvent(e)");
1112     {
1113         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1114         int     RETVAL;
1115         dXSTARG;
1116 #line 630 "SDL_perl.xs"
1117                 RETVAL = SDL_PollEvent(e);
1118 #line 1119 "SDL_perl.c"
1119         XSprePUSH; PUSHi((IV)RETVAL);
1120     }
1121     XSRETURN(1);
1122 }
1123
1124 XS(XS_SDL_WaitEvent); /* prototype to pass -Wmissing-prototypes */
1125 XS(XS_SDL_WaitEvent)
1126 {
1127     dXSARGS;
1128     if (items != 1)
1129         Perl_croak(aTHX_ "Usage: SDL::WaitEvent(e)");
1130     {
1131         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1132         int     RETVAL;
1133         dXSTARG;
1134 #line 638 "SDL_perl.xs"
1135                 RETVAL = SDL_WaitEvent(e);
1136 #line 1137 "SDL_perl.c"
1137         XSprePUSH; PUSHi((IV)RETVAL);
1138     }
1139     XSRETURN(1);
1140 }
1141
1142 XS(XS_SDL_EventState); /* prototype to pass -Wmissing-prototypes */
1143 XS(XS_SDL_EventState)
1144 {
1145     dXSARGS;
1146     if (items != 2)
1147         Perl_croak(aTHX_ "Usage: SDL::EventState(type, state)");
1148     {
1149         Uint8   type = (unsigned char)SvUV(ST(0));
1150         int     state = (int)SvIV(ST(1));
1151         Uint8   RETVAL;
1152         dXSTARG;
1153 #line 647 "SDL_perl.xs"
1154                 RETVAL = SDL_EventState(type,state);
1155 #line 1156 "SDL_perl.c"
1156         XSprePUSH; PUSHu((UV)RETVAL);
1157     }
1158     XSRETURN(1);
1159 }
1160
1161 XS(XS_SDL_EventType); /* prototype to pass -Wmissing-prototypes */
1162 XS(XS_SDL_EventType)
1163 {
1164     dXSARGS;
1165     if (items != 1)
1166         Perl_croak(aTHX_ "Usage: SDL::EventType(e)");
1167     {
1168         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1169         Uint8   RETVAL;
1170         dXSTARG;
1171 #line 655 "SDL_perl.xs"
1172                 RETVAL = e->type;
1173 #line 1174 "SDL_perl.c"
1174         XSprePUSH; PUSHu((UV)RETVAL);
1175     }
1176     XSRETURN(1);
1177 }
1178
1179 XS(XS_SDL_SetEventType); /* prototype to pass -Wmissing-prototypes */
1180 XS(XS_SDL_SetEventType)
1181 {
1182     dXSARGS;
1183     if (items != 2)
1184         Perl_croak(aTHX_ "Usage: SDL::SetEventType(e, type)");
1185     {
1186         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1187         Uint8   type = (unsigned char)SvUV(ST(1));
1188         Uint8   RETVAL;
1189         dXSTARG;
1190 #line 664 "SDL_perl.xs"
1191                 RETVAL = e->type;
1192                 e->type = type;
1193 #line 1194 "SDL_perl.c"
1194         XSprePUSH; PUSHu((UV)RETVAL);
1195     }
1196     XSRETURN(1);
1197 }
1198
1199 XS(XS_SDL_ActiveEventGain); /* prototype to pass -Wmissing-prototypes */
1200 XS(XS_SDL_ActiveEventGain)
1201 {
1202     dXSARGS;
1203     if (items != 1)
1204         Perl_croak(aTHX_ "Usage: SDL::ActiveEventGain(e)");
1205     {
1206         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1207         Uint8   RETVAL;
1208         dXSTARG;
1209 #line 673 "SDL_perl.xs"
1210                 RETVAL = e->active.gain;
1211 #line 1212 "SDL_perl.c"
1212         XSprePUSH; PUSHu((UV)RETVAL);
1213     }
1214     XSRETURN(1);
1215 }
1216
1217 XS(XS_SDL_ActiveEventState); /* prototype to pass -Wmissing-prototypes */
1218 XS(XS_SDL_ActiveEventState)
1219 {
1220     dXSARGS;
1221     if (items != 1)
1222         Perl_croak(aTHX_ "Usage: SDL::ActiveEventState(e)");
1223     {
1224         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1225         Uint8   RETVAL;
1226         dXSTARG;
1227 #line 681 "SDL_perl.xs"
1228                 RETVAL = e->active.state;
1229 #line 1230 "SDL_perl.c"
1230         XSprePUSH; PUSHu((UV)RETVAL);
1231     }
1232     XSRETURN(1);
1233 }
1234
1235 XS(XS_SDL_KeyEventState); /* prototype to pass -Wmissing-prototypes */
1236 XS(XS_SDL_KeyEventState)
1237 {
1238     dXSARGS;
1239     if (items != 1)
1240         Perl_croak(aTHX_ "Usage: SDL::KeyEventState(e)");
1241     {
1242         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1243         Uint8   RETVAL;
1244         dXSTARG;
1245 #line 689 "SDL_perl.xs"
1246                 RETVAL = e->key.state;
1247 #line 1248 "SDL_perl.c"
1248         XSprePUSH; PUSHu((UV)RETVAL);
1249     }
1250     XSRETURN(1);
1251 }
1252
1253 XS(XS_SDL_KeyEventSym); /* prototype to pass -Wmissing-prototypes */
1254 XS(XS_SDL_KeyEventSym)
1255 {
1256     dXSARGS;
1257     if (items != 1)
1258         Perl_croak(aTHX_ "Usage: SDL::KeyEventSym(e)");
1259     {
1260         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1261         int     RETVAL;
1262         dXSTARG;
1263 #line 697 "SDL_perl.xs"
1264                 RETVAL = e->key.keysym.sym;
1265 #line 1266 "SDL_perl.c"
1266         XSprePUSH; PUSHi((IV)RETVAL);
1267     }
1268     XSRETURN(1);
1269 }
1270
1271 XS(XS_SDL_KeyEventMod); /* prototype to pass -Wmissing-prototypes */
1272 XS(XS_SDL_KeyEventMod)
1273 {
1274     dXSARGS;
1275     if (items != 1)
1276         Perl_croak(aTHX_ "Usage: SDL::KeyEventMod(e)");
1277     {
1278         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1279         int     RETVAL;
1280         dXSTARG;
1281 #line 705 "SDL_perl.xs"
1282                 RETVAL = e->key.keysym.mod;
1283 #line 1284 "SDL_perl.c"
1284         XSprePUSH; PUSHi((IV)RETVAL);
1285     }
1286     XSRETURN(1);
1287 }
1288
1289 XS(XS_SDL_KeyEventUnicode); /* prototype to pass -Wmissing-prototypes */
1290 XS(XS_SDL_KeyEventUnicode)
1291 {
1292     dXSARGS;
1293     if (items != 1)
1294         Perl_croak(aTHX_ "Usage: SDL::KeyEventUnicode(e)");
1295     {
1296         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1297         Uint16  RETVAL;
1298         dXSTARG;
1299 #line 713 "SDL_perl.xs"
1300                 RETVAL = e->key.keysym.unicode;
1301 #line 1302 "SDL_perl.c"
1302         XSprePUSH; PUSHu((UV)RETVAL);
1303     }
1304     XSRETURN(1);
1305 }
1306
1307 XS(XS_SDL_KeyEventScanCode); /* prototype to pass -Wmissing-prototypes */
1308 XS(XS_SDL_KeyEventScanCode)
1309 {
1310     dXSARGS;
1311     if (items != 1)
1312         Perl_croak(aTHX_ "Usage: SDL::KeyEventScanCode(e)");
1313     {
1314         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1315         Uint8   RETVAL;
1316         dXSTARG;
1317 #line 721 "SDL_perl.xs"
1318                 RETVAL = e->key.keysym.scancode;
1319 #line 1320 "SDL_perl.c"
1320         XSprePUSH; PUSHu((UV)RETVAL);
1321     }
1322     XSRETURN(1);
1323 }
1324
1325 XS(XS_SDL_MouseMotionState); /* prototype to pass -Wmissing-prototypes */
1326 XS(XS_SDL_MouseMotionState)
1327 {
1328     dXSARGS;
1329     if (items != 1)
1330         Perl_croak(aTHX_ "Usage: SDL::MouseMotionState(e)");
1331     {
1332         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1333         Uint8   RETVAL;
1334         dXSTARG;
1335 #line 729 "SDL_perl.xs"
1336                 RETVAL = e->motion.state;
1337 #line 1338 "SDL_perl.c"
1338         XSprePUSH; PUSHu((UV)RETVAL);
1339     }
1340     XSRETURN(1);
1341 }
1342
1343 XS(XS_SDL_MouseMotionX); /* prototype to pass -Wmissing-prototypes */
1344 XS(XS_SDL_MouseMotionX)
1345 {
1346     dXSARGS;
1347     if (items != 1)
1348         Perl_croak(aTHX_ "Usage: SDL::MouseMotionX(e)");
1349     {
1350         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1351         Uint16  RETVAL;
1352         dXSTARG;
1353 #line 737 "SDL_perl.xs"
1354                 RETVAL = e->motion.x;
1355 #line 1356 "SDL_perl.c"
1356         XSprePUSH; PUSHu((UV)RETVAL);
1357     }
1358     XSRETURN(1);
1359 }
1360
1361 XS(XS_SDL_MouseMotionY); /* prototype to pass -Wmissing-prototypes */
1362 XS(XS_SDL_MouseMotionY)
1363 {
1364     dXSARGS;
1365     if (items != 1)
1366         Perl_croak(aTHX_ "Usage: SDL::MouseMotionY(e)");
1367     {
1368         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1369         Uint16  RETVAL;
1370         dXSTARG;
1371 #line 745 "SDL_perl.xs"
1372                 RETVAL = e->motion.y;
1373 #line 1374 "SDL_perl.c"
1374         XSprePUSH; PUSHu((UV)RETVAL);
1375     }
1376     XSRETURN(1);
1377 }
1378
1379 XS(XS_SDL_MouseMotionXrel); /* prototype to pass -Wmissing-prototypes */
1380 XS(XS_SDL_MouseMotionXrel)
1381 {
1382     dXSARGS;
1383     if (items != 1)
1384         Perl_croak(aTHX_ "Usage: SDL::MouseMotionXrel(e)");
1385     {
1386         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1387         Sint16  RETVAL;
1388         dXSTARG;
1389 #line 753 "SDL_perl.xs"
1390                 RETVAL = e->motion.xrel;
1391 #line 1392 "SDL_perl.c"
1392         XSprePUSH; PUSHi((IV)RETVAL);
1393     }
1394     XSRETURN(1);
1395 }
1396
1397 XS(XS_SDL_MouseMotionYrel); /* prototype to pass -Wmissing-prototypes */
1398 XS(XS_SDL_MouseMotionYrel)
1399 {
1400     dXSARGS;
1401     if (items != 1)
1402         Perl_croak(aTHX_ "Usage: SDL::MouseMotionYrel(e)");
1403     {
1404         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1405         Sint16  RETVAL;
1406         dXSTARG;
1407 #line 761 "SDL_perl.xs"
1408                 RETVAL = e->motion.yrel;
1409 #line 1410 "SDL_perl.c"
1410         XSprePUSH; PUSHi((IV)RETVAL);
1411     }
1412     XSRETURN(1);
1413 }
1414
1415 XS(XS_SDL_MouseButtonState); /* prototype to pass -Wmissing-prototypes */
1416 XS(XS_SDL_MouseButtonState)
1417 {
1418     dXSARGS;
1419     if (items != 1)
1420         Perl_croak(aTHX_ "Usage: SDL::MouseButtonState(e)");
1421     {
1422         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1423         Uint8   RETVAL;
1424         dXSTARG;
1425 #line 769 "SDL_perl.xs"
1426                 RETVAL = e->button.state;
1427 #line 1428 "SDL_perl.c"
1428         XSprePUSH; PUSHu((UV)RETVAL);
1429     }
1430     XSRETURN(1);
1431 }
1432
1433 XS(XS_SDL_MouseButton); /* prototype to pass -Wmissing-prototypes */
1434 XS(XS_SDL_MouseButton)
1435 {
1436     dXSARGS;
1437     if (items != 1)
1438         Perl_croak(aTHX_ "Usage: SDL::MouseButton(e)");
1439     {
1440         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1441         Uint8   RETVAL;
1442         dXSTARG;
1443 #line 777 "SDL_perl.xs"
1444                 RETVAL = e->button.button;
1445 #line 1446 "SDL_perl.c"
1446         XSprePUSH; PUSHu((UV)RETVAL);
1447     }
1448     XSRETURN(1);
1449 }
1450
1451 XS(XS_SDL_MouseButtonX); /* prototype to pass -Wmissing-prototypes */
1452 XS(XS_SDL_MouseButtonX)
1453 {
1454     dXSARGS;
1455     if (items != 1)
1456         Perl_croak(aTHX_ "Usage: SDL::MouseButtonX(e)");
1457     {
1458         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1459         Uint16  RETVAL;
1460         dXSTARG;
1461 #line 785 "SDL_perl.xs"
1462                 RETVAL = e->button.x;
1463 #line 1464 "SDL_perl.c"
1464         XSprePUSH; PUSHu((UV)RETVAL);
1465     }
1466     XSRETURN(1);
1467 }
1468
1469 XS(XS_SDL_MouseButtonY); /* prototype to pass -Wmissing-prototypes */
1470 XS(XS_SDL_MouseButtonY)
1471 {
1472     dXSARGS;
1473     if (items != 1)
1474         Perl_croak(aTHX_ "Usage: SDL::MouseButtonY(e)");
1475     {
1476         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1477         Uint16  RETVAL;
1478         dXSTARG;
1479 #line 793 "SDL_perl.xs"
1480                 RETVAL = e->button.y;
1481 #line 1482 "SDL_perl.c"
1482         XSprePUSH; PUSHu((UV)RETVAL);
1483     }
1484     XSRETURN(1);
1485 }
1486
1487 XS(XS_SDL_SysWMEventMsg); /* prototype to pass -Wmissing-prototypes */
1488 XS(XS_SDL_SysWMEventMsg)
1489 {
1490     dXSARGS;
1491     if (items != 1)
1492         Perl_croak(aTHX_ "Usage: SDL::SysWMEventMsg(e)");
1493     {
1494         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
1495         SDL_SysWMmsg *  RETVAL;
1496         dXSTARG;
1497 #line 801 "SDL_perl.xs"
1498                 RETVAL = e->syswm.msg;
1499 #line 1500 "SDL_perl.c"
1500         XSprePUSH; PUSHi(PTR2IV(RETVAL));
1501     }
1502     XSRETURN(1);
1503 }
1504
1505 XS(XS_SDL_EnableUnicode); /* prototype to pass -Wmissing-prototypes */
1506 XS(XS_SDL_EnableUnicode)
1507 {
1508     dXSARGS;
1509     if (items != 1)
1510         Perl_croak(aTHX_ "Usage: SDL::EnableUnicode(enable)");
1511     {
1512         int     enable = (int)SvIV(ST(0));
1513         int     RETVAL;
1514         dXSTARG;
1515 #line 809 "SDL_perl.xs"
1516                 RETVAL = SDL_EnableUNICODE(enable);
1517 #line 1518 "SDL_perl.c"
1518         XSprePUSH; PUSHi((IV)RETVAL);
1519     }
1520     XSRETURN(1);
1521 }
1522
1523 XS(XS_SDL_EnableKeyRepeat); /* prototype to pass -Wmissing-prototypes */
1524 XS(XS_SDL_EnableKeyRepeat)
1525 {
1526     dXSARGS;
1527     if (items != 2)
1528         Perl_croak(aTHX_ "Usage: SDL::EnableKeyRepeat(delay, interval)");
1529     {
1530         int     delay = (int)SvIV(ST(0));
1531         int     interval = (int)SvIV(ST(1));
1532 #line 818 "SDL_perl.xs"
1533                 SDL_EnableKeyRepeat(delay,interval);
1534 #line 1535 "SDL_perl.c"
1535     }
1536     XSRETURN_EMPTY;
1537 }
1538
1539 XS(XS_SDL_GetModState); /* prototype to pass -Wmissing-prototypes */
1540 XS(XS_SDL_GetModState)
1541 {
1542     dXSARGS;
1543     if (items != 0)
1544         Perl_croak(aTHX_ "Usage: SDL::GetModState()");
1545     {
1546         Uint32  RETVAL;
1547         dXSTARG;
1548 #line 823 "SDL_perl.xs"
1549                 RETVAL = SDL_GetModState();
1550 #line 1551 "SDL_perl.c"
1551         XSprePUSH; PUSHu((UV)RETVAL);
1552     }
1553     XSRETURN(1);
1554 }
1555
1556 XS(XS_SDL_SetModState); /* prototype to pass -Wmissing-prototypes */
1557 XS(XS_SDL_SetModState)
1558 {
1559     dXSARGS;
1560     if (items != 1)
1561         Perl_croak(aTHX_ "Usage: SDL::SetModState(state)");
1562     {
1563         Uint32  state = (Uint32)SvUV(ST(0));
1564 #line 831 "SDL_perl.xs"
1565                 SDL_SetModState(state);
1566 #line 1567 "SDL_perl.c"
1567     }
1568     XSRETURN_EMPTY;
1569 }
1570
1571 XS(XS_SDL_GetKeyName); /* prototype to pass -Wmissing-prototypes */
1572 XS(XS_SDL_GetKeyName)
1573 {
1574     dXSARGS;
1575     if (items != 1)
1576         Perl_croak(aTHX_ "Usage: SDL::GetKeyName(sym)");
1577     {
1578         int     sym = (int)SvIV(ST(0));
1579         char *  RETVAL;
1580         dXSTARG;
1581 #line 837 "SDL_perl.xs"
1582                 RETVAL = SDL_GetKeyName(sym);
1583 #line 1584 "SDL_perl.c"
1584         sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
1585     }
1586     XSRETURN(1);
1587 }
1588
1589 XS(XS_SDL_CreateRGBSurface); /* prototype to pass -Wmissing-prototypes */
1590 XS(XS_SDL_CreateRGBSurface)
1591 {
1592     dXSARGS;
1593     if (items != 8)
1594         Perl_croak(aTHX_ "Usage: SDL::CreateRGBSurface(flags, width, height, depth, Rmask, Gmask, Bmask, Amask)");
1595     {
1596         Uint32  flags = (Uint32)SvUV(ST(0));
1597         int     width = (int)SvIV(ST(1));
1598         int     height = (int)SvIV(ST(2));
1599         int     depth = (int)SvIV(ST(3));
1600         Uint32  Rmask = (Uint32)SvUV(ST(4));
1601         Uint32  Gmask = (Uint32)SvUV(ST(5));
1602         Uint32  Bmask = (Uint32)SvUV(ST(6));
1603         Uint32  Amask = (Uint32)SvUV(ST(7));
1604         SDL_Surface *   RETVAL;
1605         dXSTARG;
1606 #line 852 "SDL_perl.xs"
1607                 RETVAL = SDL_CreateRGBSurface ( flags, width, height,
1608                                 depth, Rmask, Gmask, Bmask, Amask );
1609 #line 1610 "SDL_perl.c"
1610         XSprePUSH; PUSHi(PTR2IV(RETVAL));
1611     }
1612     XSRETURN(1);
1613 }
1614
1615 XS(XS_SDL_CreateRGBSurfaceFrom); /* prototype to pass -Wmissing-prototypes */
1616 XS(XS_SDL_CreateRGBSurfaceFrom)
1617 {
1618     dXSARGS;
1619     if (items != 9)
1620         Perl_croak(aTHX_ "Usage: SDL::CreateRGBSurfaceFrom(pixels, width, height, depth, pitch, Rmask, Gmask, Bmask, Amask)");
1621     {
1622         char *  pixels = (char *)SvPV_nolen(ST(0));
1623         int     width = (int)SvIV(ST(1));
1624         int     height = (int)SvIV(ST(2));
1625         int     depth = (int)SvIV(ST(3));
1626         int     pitch = (int)SvIV(ST(4));
1627         Uint32  Rmask = (Uint32)SvUV(ST(5));
1628         Uint32  Gmask = (Uint32)SvUV(ST(6));
1629         Uint32  Bmask = (Uint32)SvUV(ST(7));
1630         Uint32  Amask = (Uint32)SvUV(ST(8));
1631         SDL_Surface *   RETVAL;
1632         dXSTARG;
1633 #line 870 "SDL_perl.xs"
1634                 Uint8* pixeldata;
1635                 Uint32 len = pitch * height;
1636                 New(0,pixeldata,len,Uint8);
1637                 Copy(pixels,pixeldata,len,Uint8);
1638                 RETVAL = SDL_CreateRGBSurfaceFrom ( pixeldata, width, height,
1639                                 depth, pitch, Rmask, Gmask, Bmask, Amask );
1640 #line 1641 "SDL_perl.c"
1641         XSprePUSH; PUSHi(PTR2IV(RETVAL));
1642     }
1643     XSRETURN(1);
1644 }
1645
1646 #ifdef HAVE_SDL_IMAGE
1647 #define XSubPPtmpAAAA 1
1648
1649 XS(XS_SDL_IMGLoad); /* prototype to pass -Wmissing-prototypes */
1650 XS(XS_SDL_IMGLoad)
1651 {
1652     dXSARGS;
1653     if (items != 1)
1654         Perl_croak(aTHX_ "Usage: SDL::IMGLoad(fname)");
1655     {
1656         char *  fname = (char *)SvPV_nolen(ST(0));
1657         SDL_Surface *   RETVAL;
1658         dXSTARG;
1659 #line 885 "SDL_perl.xs"
1660                 RETVAL = IMG_Load(fname);
1661 #line 1662 "SDL_perl.c"
1662         XSprePUSH; PUSHi(PTR2IV(RETVAL));
1663     }
1664     XSRETURN(1);
1665 }
1666
1667 #endif
1668 XS(XS_SDL_SurfaceCopy); /* prototype to pass -Wmissing-prototypes */
1669 XS(XS_SDL_SurfaceCopy)
1670 {
1671     dXSARGS;
1672     if (items != 1)
1673         Perl_croak(aTHX_ "Usage: SDL::SurfaceCopy(surface)");
1674     {
1675         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
1676         SDL_Surface *   RETVAL;
1677         dXSTARG;
1678 #line 895 "SDL_perl.xs"
1679                 Uint8* pixels;
1680                 Uint32 size = surface->pitch * surface->h;
1681                 New(0,pixels,size,Uint8);
1682                 Copy(surface->pixels,pixels,size,Uint8);
1683                 RETVAL = SDL_CreateRGBSurfaceFrom(pixels,surface->w,surface->h,
1684                         surface->format->BitsPerPixel, surface->pitch,
1685                         surface->format->Rmask, surface->format->Gmask,
1686                         surface->format->Bmask, surface->format->Amask);
1687 #line 1688 "SDL_perl.c"
1688         XSprePUSH; PUSHi(PTR2IV(RETVAL));
1689     }
1690     XSRETURN(1);
1691 }
1692
1693 XS(XS_SDL_FreeSurface); /* prototype to pass -Wmissing-prototypes */
1694 XS(XS_SDL_FreeSurface)
1695 {
1696     dXSARGS;
1697     if (items != 1)
1698         Perl_croak(aTHX_ "Usage: SDL::FreeSurface(surface)");
1699     {
1700         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
1701 #line 910 "SDL_perl.xs"
1702                 if (surface) {
1703                         Uint8* pixels = surface->pixels;
1704                         Uint32 flags = surface->flags;
1705                         SDL_FreeSurface(surface);
1706                         if (flags & SDL_PREALLOC)
1707                                 Safefree(pixels);
1708                 }
1709 #line 1710 "SDL_perl.c"
1710     }
1711     XSRETURN_EMPTY;
1712 }
1713
1714 XS(XS_SDL_SurfaceFlags); /* prototype to pass -Wmissing-prototypes */
1715 XS(XS_SDL_SurfaceFlags)
1716 {
1717     dXSARGS;
1718     if (items != 1)
1719         Perl_croak(aTHX_ "Usage: SDL::SurfaceFlags(surface)");
1720     {
1721         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
1722         Uint32  RETVAL;
1723         dXSTARG;
1724 #line 922 "SDL_perl.xs"
1725                 RETVAL = surface->flags;
1726 #line 1727 "SDL_perl.c"
1727         XSprePUSH; PUSHu((UV)RETVAL);
1728     }
1729     XSRETURN(1);
1730 }
1731
1732 XS(XS_SDL_SurfacePalette); /* prototype to pass -Wmissing-prototypes */
1733 XS(XS_SDL_SurfacePalette)
1734 {
1735     dXSARGS;
1736     if (items != 1)
1737         Perl_croak(aTHX_ "Usage: SDL::SurfacePalette(surface)");
1738     {
1739         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
1740         SDL_Palette *   RETVAL;
1741         dXSTARG;
1742 #line 930 "SDL_perl.xs"
1743                 RETVAL = surface->format->palette;
1744 #line 1745 "SDL_perl.c"
1745         XSprePUSH; PUSHi(PTR2IV(RETVAL));
1746     }
1747     XSRETURN(1);
1748 }
1749
1750 XS(XS_SDL_SurfaceBitsPerPixel); /* prototype to pass -Wmissing-prototypes */
1751 XS(XS_SDL_SurfaceBitsPerPixel)
1752 {
1753     dXSARGS;
1754     if (items != 1)
1755         Perl_croak(aTHX_ "Usage: SDL::SurfaceBitsPerPixel(surface)");
1756     {
1757         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
1758         Uint8   RETVAL;
1759         dXSTARG;
1760 #line 938 "SDL_perl.xs"
1761                 RETVAL = surface->format->BitsPerPixel;
1762 #line 1763 "SDL_perl.c"
1763         XSprePUSH; PUSHu((UV)RETVAL);
1764     }
1765     XSRETURN(1);
1766 }
1767
1768 XS(XS_SDL_SurfaceBytesPerPixel); /* prototype to pass -Wmissing-prototypes */
1769 XS(XS_SDL_SurfaceBytesPerPixel)
1770 {
1771     dXSARGS;
1772     if (items != 1)
1773         Perl_croak(aTHX_ "Usage: SDL::SurfaceBytesPerPixel(surface)");
1774     {
1775         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
1776         Uint8   RETVAL;
1777         dXSTARG;
1778 #line 946 "SDL_perl.xs"
1779                 RETVAL = surface->format->BytesPerPixel;
1780 #line 1781 "SDL_perl.c"
1781         XSprePUSH; PUSHu((UV)RETVAL);
1782     }
1783     XSRETURN(1);
1784 }
1785
1786 XS(XS_SDL_SurfaceRshift); /* prototype to pass -Wmissing-prototypes */
1787 XS(XS_SDL_SurfaceRshift)
1788 {
1789     dXSARGS;
1790     if (items != 1)
1791         Perl_croak(aTHX_ "Usage: SDL::SurfaceRshift(surface)");
1792     {
1793         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
1794         Uint8   RETVAL;
1795         dXSTARG;
1796 #line 954 "SDL_perl.xs"
1797                 RETVAL = surface->format->Rshift;
1798 #line 1799 "SDL_perl.c"
1799         XSprePUSH; PUSHu((UV)RETVAL);
1800     }
1801     XSRETURN(1);
1802 }
1803
1804 XS(XS_SDL_SurfaceGshift); /* prototype to pass -Wmissing-prototypes */
1805 XS(XS_SDL_SurfaceGshift)
1806 {
1807     dXSARGS;
1808     if (items != 1)
1809         Perl_croak(aTHX_ "Usage: SDL::SurfaceGshift(surface)");
1810     {
1811         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
1812         Uint8   RETVAL;
1813         dXSTARG;
1814 #line 962 "SDL_perl.xs"
1815                 RETVAL = surface->format->Gshift;
1816 #line 1817 "SDL_perl.c"
1817         XSprePUSH; PUSHu((UV)RETVAL);
1818     }
1819     XSRETURN(1);
1820 }
1821
1822 XS(XS_SDL_SurfaceBshift); /* prototype to pass -Wmissing-prototypes */
1823 XS(XS_SDL_SurfaceBshift)
1824 {
1825     dXSARGS;
1826     if (items != 1)
1827         Perl_croak(aTHX_ "Usage: SDL::SurfaceBshift(surface)");
1828     {
1829         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
1830         Uint8   RETVAL;
1831         dXSTARG;
1832 #line 970 "SDL_perl.xs"
1833                 RETVAL = surface->format->Bshift;
1834 #line 1835 "SDL_perl.c"
1835         XSprePUSH; PUSHu((UV)RETVAL);
1836     }
1837     XSRETURN(1);
1838 }
1839
1840 XS(XS_SDL_SurfaceAshift); /* prototype to pass -Wmissing-prototypes */
1841 XS(XS_SDL_SurfaceAshift)
1842 {
1843     dXSARGS;
1844     if (items != 1)
1845         Perl_croak(aTHX_ "Usage: SDL::SurfaceAshift(surface)");
1846     {
1847         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
1848         Uint8   RETVAL;
1849         dXSTARG;
1850 #line 978 "SDL_perl.xs"
1851                 RETVAL = surface->format->Ashift;
1852 #line 1853 "SDL_perl.c"
1853         XSprePUSH; PUSHu((UV)RETVAL);
1854     }
1855     XSRETURN(1);
1856 }
1857
1858 XS(XS_SDL_SurfaceRmask); /* prototype to pass -Wmissing-prototypes */
1859 XS(XS_SDL_SurfaceRmask)
1860 {
1861     dXSARGS;
1862     if (items != 1)
1863         Perl_croak(aTHX_ "Usage: SDL::SurfaceRmask(surface)");
1864     {
1865         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
1866         Uint32  RETVAL;
1867         dXSTARG;
1868 #line 986 "SDL_perl.xs"
1869                 RETVAL = surface->format->Rmask;
1870 #line 1871 "SDL_perl.c"
1871         XSprePUSH; PUSHu((UV)RETVAL);
1872     }
1873     XSRETURN(1);
1874 }
1875
1876 XS(XS_SDL_SurfaceGmask); /* prototype to pass -Wmissing-prototypes */
1877 XS(XS_SDL_SurfaceGmask)
1878 {
1879     dXSARGS;
1880     if (items != 1)
1881         Perl_croak(aTHX_ "Usage: SDL::SurfaceGmask(surface)");
1882     {
1883         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
1884         Uint32  RETVAL;
1885         dXSTARG;
1886 #line 994 "SDL_perl.xs"
1887                 RETVAL = surface->format->Gmask;
1888 #line 1889 "SDL_perl.c"
1889         XSprePUSH; PUSHu((UV)RETVAL);
1890     }
1891     XSRETURN(1);
1892 }
1893
1894 XS(XS_SDL_SurfaceBmask); /* prototype to pass -Wmissing-prototypes */
1895 XS(XS_SDL_SurfaceBmask)
1896 {
1897     dXSARGS;
1898     if (items != 1)
1899         Perl_croak(aTHX_ "Usage: SDL::SurfaceBmask(surface)");
1900     {
1901         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
1902         Uint32  RETVAL;
1903         dXSTARG;
1904 #line 1002 "SDL_perl.xs"
1905                 RETVAL = surface->format->Bmask;
1906 #line 1907 "SDL_perl.c"
1907         XSprePUSH; PUSHu((UV)RETVAL);
1908     }
1909     XSRETURN(1);
1910 }
1911
1912 XS(XS_SDL_SurfaceAmask); /* prototype to pass -Wmissing-prototypes */
1913 XS(XS_SDL_SurfaceAmask)
1914 {
1915     dXSARGS;
1916     if (items != 1)
1917         Perl_croak(aTHX_ "Usage: SDL::SurfaceAmask(surface)");
1918     {
1919         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
1920         Uint32  RETVAL;
1921         dXSTARG;
1922 #line 1010 "SDL_perl.xs"
1923                 RETVAL = surface->format->Amask;
1924 #line 1925 "SDL_perl.c"
1925         XSprePUSH; PUSHu((UV)RETVAL);
1926     }
1927     XSRETURN(1);
1928 }
1929
1930 XS(XS_SDL_SurfaceColorKey); /* prototype to pass -Wmissing-prototypes */
1931 XS(XS_SDL_SurfaceColorKey)
1932 {
1933     dXSARGS;
1934     if (items != 1)
1935         Perl_croak(aTHX_ "Usage: SDL::SurfaceColorKey(surface)");
1936     {
1937         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
1938         Uint32  RETVAL;
1939         dXSTARG;
1940 #line 1018 "SDL_perl.xs"
1941                 RETVAL = surface->format->colorkey;
1942 #line 1943 "SDL_perl.c"
1943         XSprePUSH; PUSHu((UV)RETVAL);
1944     }
1945     XSRETURN(1);
1946 }
1947
1948 XS(XS_SDL_SurfaceAlpha); /* prototype to pass -Wmissing-prototypes */
1949 XS(XS_SDL_SurfaceAlpha)
1950 {
1951     dXSARGS;
1952     if (items != 1)
1953         Perl_croak(aTHX_ "Usage: SDL::SurfaceAlpha(surface)");
1954     {
1955         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
1956         Uint32  RETVAL;
1957         dXSTARG;
1958 #line 1026 "SDL_perl.xs"
1959                 RETVAL = surface->format->alpha;
1960 #line 1961 "SDL_perl.c"
1961         XSprePUSH; PUSHu((UV)RETVAL);
1962     }
1963     XSRETURN(1);
1964 }
1965
1966 XS(XS_SDL_SurfaceW); /* prototype to pass -Wmissing-prototypes */
1967 XS(XS_SDL_SurfaceW)
1968 {
1969     dXSARGS;
1970     if (items != 1)
1971         Perl_croak(aTHX_ "Usage: SDL::SurfaceW(surface)");
1972     {
1973         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
1974         int     RETVAL;
1975         dXSTARG;
1976 #line 1034 "SDL_perl.xs"
1977                 RETVAL = surface->w;
1978 #line 1979 "SDL_perl.c"
1979         XSprePUSH; PUSHi((IV)RETVAL);
1980     }
1981     XSRETURN(1);
1982 }
1983
1984 XS(XS_SDL_SurfaceH); /* prototype to pass -Wmissing-prototypes */
1985 XS(XS_SDL_SurfaceH)
1986 {
1987     dXSARGS;
1988     if (items != 1)
1989         Perl_croak(aTHX_ "Usage: SDL::SurfaceH(surface)");
1990     {
1991         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
1992         int     RETVAL;
1993         dXSTARG;
1994 #line 1042 "SDL_perl.xs"
1995                 RETVAL = surface->h;
1996 #line 1997 "SDL_perl.c"
1997         XSprePUSH; PUSHi((IV)RETVAL);
1998     }
1999     XSRETURN(1);
2000 }
2001
2002 XS(XS_SDL_SurfacePitch); /* prototype to pass -Wmissing-prototypes */
2003 XS(XS_SDL_SurfacePitch)
2004 {
2005     dXSARGS;
2006     if (items != 1)
2007         Perl_croak(aTHX_ "Usage: SDL::SurfacePitch(surface)");
2008     {
2009         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2010         Uint16  RETVAL;
2011         dXSTARG;
2012 #line 1050 "SDL_perl.xs"
2013                 RETVAL = surface->pitch;
2014 #line 2015 "SDL_perl.c"
2015         XSprePUSH; PUSHu((UV)RETVAL);
2016     }
2017     XSRETURN(1);
2018 }
2019
2020 XS(XS_SDL_SurfacePixels); /* prototype to pass -Wmissing-prototypes */
2021 XS(XS_SDL_SurfacePixels)
2022 {
2023     dXSARGS;
2024     if (items != 1)
2025         Perl_croak(aTHX_ "Usage: SDL::SurfacePixels(surface)");
2026     {
2027         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2028         SV *    RETVAL;
2029 #line 1058 "SDL_perl.xs"
2030                 RETVAL = newSVpvn(surface->pixels,surface->pitch*surface->h);
2031 #line 2032 "SDL_perl.c"
2032         ST(0) = RETVAL;
2033         sv_2mortal(ST(0));
2034     }
2035     XSRETURN(1);
2036 }
2037
2038 XS(XS_SDL_SurfacePixel); /* prototype to pass -Wmissing-prototypes */
2039 XS(XS_SDL_SurfacePixel)
2040 {
2041     dXSARGS;
2042     if (items < 3)
2043         Perl_croak(aTHX_ "Usage: SDL::SurfacePixel(surface, x, y, ...)");
2044     {
2045         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2046         Sint32  x = (Sint32)SvIV(ST(1));
2047         Sint32  y = (Sint32)SvIV(ST(2));
2048         SDL_Color *     RETVAL;
2049         dXSTARG;
2050 #line 1068 "SDL_perl.xs"
2051                 SDL_Color* color;
2052                 int pix,index;
2053                 Uint8 r,g,b,a;
2054                 int bpp = surface->format->BytesPerPixel;
2055                 Uint8* p = (Uint8*)surface->pixels + bpp*x + surface->pitch*y;
2056                 if ( items < 3 || items > 4 ) 
2057                         Perl_croak(aTHX_ "usage: SDL::SurfacePixel(surface,x,y,[color])");
2058                 if ( items == 4) {
2059                         color = (SDL_Color*)SvIV(ST(3));
2060                         pix = SDL_MapRGB(surface->format,color->r,color->g,color->b);
2061                         switch(bpp) {
2062                                 case 1:
2063                                         *(Uint8*)p = pix;
2064                                         break;
2065                                 case 2:
2066                                         *(Uint16*)p = pix;
2067                                         break;
2068                                 case 3:
2069                                         if (SDL_BYTEORDER == SDL_BIG_ENDIAN) {
2070                                                 p[0] = (pix >> 16) & 0xff;
2071                                                 p[1] = (pix >> 8) & 0xff;
2072                                                 p[2] = pix & 0xff;
2073                                         } else {
2074                                                 p[0] = pix & 0xff;
2075                                                 p[1] = (pix >> 8) & 0xff;
2076                                                 p[2] = (pix >> 16) & 0xff;
2077                                         }
2078                                         break;
2079                                 case 4:
2080                                         *(Uint32*)p = pix;
2081                                         break;
2082                         }
2083                 }
2084                 RETVAL = (SDL_Color *) safemalloc(sizeof(SDL_Color));
2085                 switch(bpp) {
2086                         case 1:
2087                                 index = *(Uint8*)p;
2088                                 memcpy(RETVAL,&surface->format->palette[index],sizeof(SDL_Color));
2089                                 break;
2090                         case 2:
2091                                 pix = *(Uint16*)p;
2092                                 SDL_GetRGB(pix,surface->format,&r,&g,&b);
2093                                 RETVAL->r = r;
2094                                 RETVAL->g = g;
2095                                 RETVAL->b = b;
2096                                 break;
2097                         case 3:
2098                         case 4:
2099                                 pix = *(Uint32*)p;
2100                                 SDL_GetRGB(pix,surface->format,&r,&g,&b);
2101                                 RETVAL->r = r;
2102                                 RETVAL->g = g;
2103                                 RETVAL->b = b;
2104                                 break;
2105                 }
2106 #line 2107 "SDL_perl.c"
2107         XSprePUSH; PUSHi(PTR2IV(RETVAL));
2108     }
2109     XSRETURN(1);
2110 }
2111
2112 XS(XS_SDL_MUSTLOCK); /* prototype to pass -Wmissing-prototypes */
2113 XS(XS_SDL_MUSTLOCK)
2114 {
2115     dXSARGS;
2116     if (items != 1)
2117         Perl_croak(aTHX_ "Usage: SDL::MUSTLOCK(surface)");
2118     {
2119         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2120         int     RETVAL;
2121         dXSTARG;
2122 #line 1130 "SDL_perl.xs"
2123                 RETVAL = SDL_MUSTLOCK(surface);
2124 #line 2125 "SDL_perl.c"
2125         XSprePUSH; PUSHi((IV)RETVAL);
2126     }
2127     XSRETURN(1);
2128 }
2129
2130 XS(XS_SDL_SurfaceLock); /* prototype to pass -Wmissing-prototypes */
2131 XS(XS_SDL_SurfaceLock)
2132 {
2133     dXSARGS;
2134     if (items != 1)
2135         Perl_croak(aTHX_ "Usage: SDL::SurfaceLock(surface)");
2136     {
2137         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2138         int     RETVAL;
2139         dXSTARG;
2140 #line 1138 "SDL_perl.xs"
2141                 RETVAL = SDL_LockSurface(surface);
2142 #line 2143 "SDL_perl.c"
2143         XSprePUSH; PUSHi((IV)RETVAL);
2144     }
2145     XSRETURN(1);
2146 }
2147
2148 XS(XS_SDL_SurfaceUnlock); /* prototype to pass -Wmissing-prototypes */
2149 XS(XS_SDL_SurfaceUnlock)
2150 {
2151     dXSARGS;
2152     if (items != 1)
2153         Perl_croak(aTHX_ "Usage: SDL::SurfaceUnlock(surface)");
2154     {
2155         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2156 #line 1146 "SDL_perl.xs"
2157                 SDL_UnlockSurface(surface);
2158 #line 2159 "SDL_perl.c"
2159     }
2160     XSRETURN_EMPTY;
2161 }
2162
2163 XS(XS_SDL_GetVideoSurface); /* prototype to pass -Wmissing-prototypes */
2164 XS(XS_SDL_GetVideoSurface)
2165 {
2166     dXSARGS;
2167     if (items != 0)
2168         Perl_croak(aTHX_ "Usage: SDL::GetVideoSurface()");
2169     {
2170         SDL_Surface *   RETVAL;
2171         dXSTARG;
2172 #line 1151 "SDL_perl.xs"
2173                 RETVAL = SDL_GetVideoSurface();
2174 #line 2175 "SDL_perl.c"
2175         XSprePUSH; PUSHi(PTR2IV(RETVAL));
2176     }
2177     XSRETURN(1);
2178 }
2179
2180 XS(XS_SDL_VideoInfo); /* prototype to pass -Wmissing-prototypes */
2181 XS(XS_SDL_VideoInfo)
2182 {
2183     dXSARGS;
2184     if (items != 0)
2185         Perl_croak(aTHX_ "Usage: SDL::VideoInfo()");
2186     {
2187         HV *    RETVAL;
2188 #line 1159 "SDL_perl.xs"
2189                 HV *hv;
2190                 SDL_VideoInfo *info;
2191                 info = (SDL_VideoInfo *) safemalloc ( sizeof(SDL_VideoInfo));
2192                 memcpy(info,SDL_GetVideoInfo(),sizeof(SDL_VideoInfo));
2193                 hv = newHV();
2194                 hv_store(hv,"hw_available",strlen("hw_available"),
2195                         newSViv(info->hw_available),0);
2196                 hv_store(hv,"wm_available",strlen("wm_available"),
2197                         newSViv(info->wm_available),0);
2198                 hv_store(hv,"blit_hw",strlen("blit_hw"),
2199                         newSViv(info->blit_hw),0);
2200                 hv_store(hv,"blit_hw_CC",strlen("blit_hw_CC"),
2201                         newSViv(info->blit_hw_CC),0);
2202                 hv_store(hv,"blit_hw_A",strlen("blit_hw_A"),
2203                         newSViv(info->blit_hw_A),0);
2204                 hv_store(hv,"blit_sw",strlen("blit_sw"),
2205                         newSViv(info->blit_sw),0);
2206                 hv_store(hv,"blit_sw_CC",strlen("blit_sw_CC"),
2207                         newSViv(info->blit_sw_CC),0);
2208                 hv_store(hv,"blit_sw_A",strlen("blit_sw_A"),
2209                         newSViv(info->blit_sw_A),0);
2210                 hv_store(hv,"blit_fill",strlen("blit_fill"),
2211                         newSViv(info->blit_fill),0);
2212                 hv_store(hv,"video_mem",strlen("video_mem"),
2213                         newSViv(info->video_mem),0);
2214                 RETVAL = hv;
2215 #line 2216 "SDL_perl.c"
2216         ST(0) = newRV((SV*)RETVAL);
2217         sv_2mortal(ST(0));
2218     }
2219     XSRETURN(1);
2220 }
2221
2222 XS(XS_SDL_NewRect); /* prototype to pass -Wmissing-prototypes */
2223 XS(XS_SDL_NewRect)
2224 {
2225     dXSARGS;
2226     if (items != 4)
2227         Perl_croak(aTHX_ "Usage: SDL::NewRect(x, y, w, h)");
2228     {
2229         Sint16  x = (Sint16)SvIV(ST(0));
2230         Sint16  y = (Sint16)SvIV(ST(1));
2231         Uint16  w = (Uint16)SvUV(ST(2));
2232         Uint16  h = (Uint16)SvUV(ST(3));
2233         SDL_Rect *      RETVAL;
2234         dXSTARG;
2235 #line 1195 "SDL_perl.xs"
2236                 RETVAL = (SDL_Rect *) safemalloc (sizeof(SDL_Rect));
2237                 RETVAL->x = x;
2238                 RETVAL->y = y;
2239                 RETVAL->w = w;
2240                 RETVAL->h = h;
2241 #line 2242 "SDL_perl.c"
2242         XSprePUSH; PUSHi(PTR2IV(RETVAL));
2243     }
2244     XSRETURN(1);
2245 }
2246
2247 XS(XS_SDL_FreeRect); /* prototype to pass -Wmissing-prototypes */
2248 XS(XS_SDL_FreeRect)
2249 {
2250     dXSARGS;
2251     if (items != 1)
2252         Perl_croak(aTHX_ "Usage: SDL::FreeRect(rect)");
2253     {
2254         SDL_Rect *      rect = INT2PTR(SDL_Rect *,SvIV(ST(0)));
2255 #line 1207 "SDL_perl.xs"
2256                 safefree(rect);
2257 #line 2258 "SDL_perl.c"
2258     }
2259     XSRETURN_EMPTY;
2260 }
2261
2262 XS(XS_SDL_RectX); /* prototype to pass -Wmissing-prototypes */
2263 XS(XS_SDL_RectX)
2264 {
2265     dXSARGS;
2266     if (items < 1)
2267         Perl_croak(aTHX_ "Usage: SDL::RectX(rect, ...)");
2268     {
2269         SDL_Rect *      rect = INT2PTR(SDL_Rect *,SvIV(ST(0)));
2270         Sint16  RETVAL;
2271         dXSTARG;
2272 #line 1213 "SDL_perl.xs"
2273                 if (items > 1 ) rect->x = SvIV(ST(1)); 
2274                 RETVAL = rect->x;
2275 #line 2276 "SDL_perl.c"
2276         XSprePUSH; PUSHi((IV)RETVAL);
2277     }
2278     XSRETURN(1);
2279 }
2280
2281 XS(XS_SDL_RectY); /* prototype to pass -Wmissing-prototypes */
2282 XS(XS_SDL_RectY)
2283 {
2284     dXSARGS;
2285     if (items < 1)
2286         Perl_croak(aTHX_ "Usage: SDL::RectY(rect, ...)");
2287     {
2288         SDL_Rect *      rect = INT2PTR(SDL_Rect *,SvIV(ST(0)));
2289         Sint16  RETVAL;
2290         dXSTARG;
2291 #line 1222 "SDL_perl.xs"
2292                 if (items > 1 ) rect->y = SvIV(ST(1)); 
2293                 RETVAL = rect->y;
2294 #line 2295 "SDL_perl.c"
2295         XSprePUSH; PUSHi((IV)RETVAL);
2296     }
2297     XSRETURN(1);
2298 }
2299
2300 XS(XS_SDL_RectW); /* prototype to pass -Wmissing-prototypes */
2301 XS(XS_SDL_RectW)
2302 {
2303     dXSARGS;
2304     if (items < 1)
2305         Perl_croak(aTHX_ "Usage: SDL::RectW(rect, ...)");
2306     {
2307         SDL_Rect *      rect = INT2PTR(SDL_Rect *,SvIV(ST(0)));
2308         Uint16  RETVAL;
2309         dXSTARG;
2310 #line 1231 "SDL_perl.xs"
2311                 if (items > 1 ) rect->w = SvIV(ST(1)); 
2312                 RETVAL = rect->w;
2313 #line 2314 "SDL_perl.c"
2314         XSprePUSH; PUSHu((UV)RETVAL);
2315     }
2316     XSRETURN(1);
2317 }
2318
2319 XS(XS_SDL_RectH); /* prototype to pass -Wmissing-prototypes */
2320 XS(XS_SDL_RectH)
2321 {
2322     dXSARGS;
2323     if (items < 1)
2324         Perl_croak(aTHX_ "Usage: SDL::RectH(rect, ...)");
2325     {
2326         SDL_Rect *      rect = INT2PTR(SDL_Rect *,SvIV(ST(0)));
2327         Uint16  RETVAL;
2328         dXSTARG;
2329 #line 1240 "SDL_perl.xs"
2330                 if (items > 1 ) rect->h = SvIV(ST(1)); 
2331                 RETVAL = rect->h;
2332 #line 2333 "SDL_perl.c"
2333         XSprePUSH; PUSHu((UV)RETVAL);
2334     }
2335     XSRETURN(1);
2336 }
2337
2338 XS(XS_SDL_ListModes); /* prototype to pass -Wmissing-prototypes */
2339 XS(XS_SDL_ListModes)
2340 {
2341     dXSARGS;
2342     if (items != 2)
2343         Perl_croak(aTHX_ "Usage: SDL::ListModes(format, flags)");
2344     {
2345         Uint32  flags = (Uint32)SvUV(ST(1));
2346         SDL_PixelFormat *       format = INT2PTR(SDL_PixelFormat *,SvIV(ST(0)));
2347         AV *    RETVAL;
2348 #line 1250 "SDL_perl.xs"
2349                 SDL_Rect **mode;
2350                 RETVAL = newAV();
2351                 mode = SDL_ListModes(format,flags);
2352                 if (mode == (SDL_Rect**)-1 ) {
2353                         av_push(RETVAL,newSVpv("all",0));
2354                 } else if (! mode ) {
2355                         av_push(RETVAL,newSVpv("none",0));
2356                 } else {
2357                         for (;*mode;mode++) {
2358                                 av_push(RETVAL,newSViv(PTR2IV(*mode)));
2359                         }
2360                 }
2361 #line 2362 "SDL_perl.c"
2362         ST(0) = newRV((SV*)RETVAL);
2363         sv_2mortal(ST(0));
2364     }
2365     XSRETURN(1);
2366 }
2367
2368 XS(XS_SDL_NewColor); /* prototype to pass -Wmissing-prototypes */
2369 XS(XS_SDL_NewColor)
2370 {
2371     dXSARGS;
2372     if (items != 3)
2373         Perl_croak(aTHX_ "Usage: SDL::NewColor(r, g, b)");
2374     {
2375         Uint8   r = (unsigned char)SvUV(ST(0));
2376         Uint8   g = (unsigned char)SvUV(ST(1));
2377         Uint8   b = (unsigned char)SvUV(ST(2));
2378         SDL_Color *     RETVAL;
2379         dXSTARG;
2380 #line 1272 "SDL_perl.xs"
2381                 RETVAL = (SDL_Color *) safemalloc(sizeof(SDL_Color));
2382                 RETVAL->r = r;
2383                 RETVAL->g = g;
2384                 RETVAL->b = b;
2385 #line 2386 "SDL_perl.c"
2386         XSprePUSH; PUSHi(PTR2IV(RETVAL));
2387     }
2388     XSRETURN(1);
2389 }
2390
2391 XS(XS_SDL_ColorR); /* prototype to pass -Wmissing-prototypes */
2392 XS(XS_SDL_ColorR)
2393 {
2394     dXSARGS;
2395     if (items < 1)
2396         Perl_croak(aTHX_ "Usage: SDL::ColorR(color, ...)");
2397     {
2398         SDL_Color *     color = INT2PTR(SDL_Color *,SvIV(ST(0)));
2399         Uint8   RETVAL;
2400         dXSTARG;
2401 #line 1283 "SDL_perl.xs"
2402                 if (items > 1 ) color->r = SvIV(ST(1)); 
2403                 RETVAL = color->r;
2404 #line 2405 "SDL_perl.c"
2405         XSprePUSH; PUSHu((UV)RETVAL);
2406     }
2407     XSRETURN(1);
2408 }
2409
2410 XS(XS_SDL_ColorG); /* prototype to pass -Wmissing-prototypes */
2411 XS(XS_SDL_ColorG)
2412 {
2413     dXSARGS;
2414     if (items < 1)
2415         Perl_croak(aTHX_ "Usage: SDL::ColorG(color, ...)");
2416     {
2417         SDL_Color *     color = INT2PTR(SDL_Color *,SvIV(ST(0)));
2418         Uint8   RETVAL;
2419         dXSTARG;
2420 #line 1292 "SDL_perl.xs"
2421                 if (items > 1 ) color->g = SvIV(ST(1)); 
2422                 RETVAL = color->g;
2423 #line 2424 "SDL_perl.c"
2424         XSprePUSH; PUSHu((UV)RETVAL);
2425     }
2426     XSRETURN(1);
2427 }
2428
2429 XS(XS_SDL_ColorB); /* prototype to pass -Wmissing-prototypes */
2430 XS(XS_SDL_ColorB)
2431 {
2432     dXSARGS;
2433     if (items < 1)
2434         Perl_croak(aTHX_ "Usage: SDL::ColorB(color, ...)");
2435     {
2436         SDL_Color *     color = INT2PTR(SDL_Color *,SvIV(ST(0)));
2437         Uint8   RETVAL;
2438         dXSTARG;
2439 #line 1301 "SDL_perl.xs"
2440                 if (items > 1 ) color->b = SvIV(ST(1)); 
2441                 RETVAL = color->b;
2442 #line 2443 "SDL_perl.c"
2443         XSprePUSH; PUSHu((UV)RETVAL);
2444     }
2445     XSRETURN(1);
2446 }
2447
2448 XS(XS_SDL_FreeColor); /* prototype to pass -Wmissing-prototypes */
2449 XS(XS_SDL_FreeColor)
2450 {
2451     dXSARGS;
2452     if (items != 1)
2453         Perl_croak(aTHX_ "Usage: SDL::FreeColor(color)");
2454     {
2455         SDL_Color *     color = INT2PTR(SDL_Color *,SvIV(ST(0)));
2456 #line 1310 "SDL_perl.xs"
2457                 return; safefree(color);
2458 #line 2459 "SDL_perl.c"
2459     }
2460     XSRETURN_EMPTY;
2461 }
2462
2463 XS(XS_SDL_NewPalette); /* prototype to pass -Wmissing-prototypes */
2464 XS(XS_SDL_NewPalette)
2465 {
2466     dXSARGS;
2467     if (items != 1)
2468         Perl_croak(aTHX_ "Usage: SDL::NewPalette(number)");
2469     {
2470         int     number = (int)SvIV(ST(0));
2471         SDL_Palette *   RETVAL;
2472         dXSTARG;
2473 #line 1316 "SDL_perl.xs"
2474                 RETVAL = (SDL_Palette *)safemalloc(sizeof(SDL_Palette));
2475                 RETVAL->colors = (SDL_Color *)safemalloc(number * 
2476                                                 sizeof(SDL_Color));
2477                 RETVAL->ncolors = number;
2478 #line 2479 "SDL_perl.c"
2479         XSprePUSH; PUSHi(PTR2IV(RETVAL));
2480     }
2481     XSRETURN(1);
2482 }
2483
2484 XS(XS_SDL_PaletteNColors); /* prototype to pass -Wmissing-prototypes */
2485 XS(XS_SDL_PaletteNColors)
2486 {
2487     dXSARGS;
2488     if (items < 1)
2489         Perl_croak(aTHX_ "Usage: SDL::PaletteNColors(palette, ...)");
2490     {
2491         SDL_Palette *   palette = INT2PTR(SDL_Palette *,SvIV(ST(0)));
2492         int     RETVAL;
2493         dXSTARG;
2494 #line 1327 "SDL_perl.xs"
2495                 if ( items > 1 ) palette->ncolors = SvIV(ST(1));
2496                 RETVAL = palette->ncolors;
2497 #line 2498 "SDL_perl.c"
2498         XSprePUSH; PUSHi((IV)RETVAL);
2499     }
2500     XSRETURN(1);
2501 }
2502
2503 XS(XS_SDL_PaletteColors); /* prototype to pass -Wmissing-prototypes */
2504 XS(XS_SDL_PaletteColors)
2505 {
2506     dXSARGS;
2507     if (items < 2)
2508         Perl_croak(aTHX_ "Usage: SDL::PaletteColors(palette, index, ...)");
2509     {
2510         SDL_Palette *   palette = INT2PTR(SDL_Palette *,SvIV(ST(0)));
2511         int     index = (int)SvIV(ST(1));
2512         SDL_Color *     RETVAL;
2513         dXSTARG;
2514 #line 1337 "SDL_perl.xs"
2515                 if ( items > 2 ) {
2516                         palette->colors[index].r = SvUV(ST(2)); 
2517                         palette->colors[index].g = SvUV(ST(3)); 
2518                         palette->colors[index].b = SvUV(ST(4)); 
2519                 }
2520                 RETVAL = (SDL_Color *)(palette->colors + index);
2521 #line 2522 "SDL_perl.c"
2522         XSprePUSH; PUSHi(PTR2IV(RETVAL));
2523     }
2524     XSRETURN(1);
2525 }
2526
2527 XS(XS_SDL_VideoModeOK); /* prototype to pass -Wmissing-prototypes */
2528 XS(XS_SDL_VideoModeOK)
2529 {
2530     dXSARGS;
2531     if (items != 4)
2532         Perl_croak(aTHX_ "Usage: SDL::VideoModeOK(width, height, bpp, flags)");
2533     {
2534         int     width = (int)SvIV(ST(0));
2535         int     height = (int)SvIV(ST(1));
2536         int     bpp = (int)SvIV(ST(2));
2537         Uint32  flags = (Uint32)SvUV(ST(3));
2538         int     RETVAL;
2539         dXSTARG;
2540 #line 1353 "SDL_perl.xs"
2541                 RETVAL = SDL_VideoModeOK(width,height,bpp,flags);
2542 #line 2543 "SDL_perl.c"
2543         XSprePUSH; PUSHi((IV)RETVAL);
2544     }
2545     XSRETURN(1);
2546 }
2547
2548 XS(XS_SDL_SetVideoMode); /* prototype to pass -Wmissing-prototypes */
2549 XS(XS_SDL_SetVideoMode)
2550 {
2551     dXSARGS;
2552     if (items != 4)
2553         Perl_croak(aTHX_ "Usage: SDL::SetVideoMode(width, height, bpp, flags)");
2554     {
2555         int     width = (int)SvIV(ST(0));
2556         int     height = (int)SvIV(ST(1));
2557         int     bpp = (int)SvIV(ST(2));
2558         Uint32  flags = (Uint32)SvUV(ST(3));
2559         SDL_Surface *   RETVAL;
2560         dXSTARG;
2561 #line 1364 "SDL_perl.xs"
2562                 RETVAL = SDL_SetVideoMode(width,height,bpp,flags);
2563 #line 2564 "SDL_perl.c"
2564         XSprePUSH; PUSHi(PTR2IV(RETVAL));
2565     }
2566     XSRETURN(1);
2567 }
2568
2569 XS(XS_SDL_UpdateRect); /* prototype to pass -Wmissing-prototypes */
2570 XS(XS_SDL_UpdateRect)
2571 {
2572     dXSARGS;
2573     if (items != 5)
2574         Perl_croak(aTHX_ "Usage: SDL::UpdateRect(surface, x, y, w, h)");
2575     {
2576         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2577         int     x = (int)SvIV(ST(1));
2578         int     y = (int)SvIV(ST(2));
2579         int     w = (int)SvIV(ST(3));
2580         int     h = (int)SvIV(ST(4));
2581 #line 1376 "SDL_perl.xs"
2582                 SDL_UpdateRect(surface,x,y,w,h);
2583 #line 2584 "SDL_perl.c"
2584     }
2585     XSRETURN_EMPTY;
2586 }
2587
2588 XS(XS_SDL_UpdateRects); /* prototype to pass -Wmissing-prototypes */
2589 XS(XS_SDL_UpdateRects)
2590 {
2591     dXSARGS;
2592     if (items < 1)
2593         Perl_croak(aTHX_ "Usage: SDL::UpdateRects(surface, ...)");
2594     {
2595         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2596 #line 1382 "SDL_perl.xs"
2597                 SDL_Rect *rects, *temp;
2598                 int num_rects,i;
2599                 if ( items < 2 ) return;
2600                 num_rects = items - 1;  
2601                 rects = (SDL_Rect *)safemalloc(sizeof(SDL_Rect)*items);
2602                 for(i=0;i<num_rects;i++) {
2603                         temp = (SDL_Rect *)SvIV(ST(i+1));
2604                         rects[i].x = temp->x;
2605                         rects[i].y = temp->y;
2606                         rects[i].w = temp->w;
2607                         rects[i].h = temp->h;
2608                 } 
2609                 SDL_UpdateRects(surface,num_rects,rects);
2610                 safefree(rects);
2611 #line 2612 "SDL_perl.c"
2612     }
2613     XSRETURN_EMPTY;
2614 }
2615
2616 XS(XS_SDL_Flip); /* prototype to pass -Wmissing-prototypes */
2617 XS(XS_SDL_Flip)
2618 {
2619     dXSARGS;
2620     if (items != 1)
2621         Perl_croak(aTHX_ "Usage: SDL::Flip(surface)");
2622     {
2623         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2624         int     RETVAL;
2625         dXSTARG;
2626 #line 1401 "SDL_perl.xs"
2627                 RETVAL = SDL_Flip(surface);
2628 #line 2629 "SDL_perl.c"
2629         XSprePUSH; PUSHi((IV)RETVAL);
2630     }
2631     XSRETURN(1);
2632 }
2633
2634 XS(XS_SDL_SetColors); /* prototype to pass -Wmissing-prototypes */
2635 XS(XS_SDL_SetColors)
2636 {
2637     dXSARGS;
2638     if (items < 2)
2639         Perl_croak(aTHX_ "Usage: SDL::SetColors(surface, start, ...)");
2640     {
2641         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2642         int     start = (int)SvIV(ST(1));
2643         int     RETVAL;
2644         dXSTARG;
2645 #line 1410 "SDL_perl.xs"
2646                 SDL_Color *colors,*temp;
2647                 int i, length;
2648                 if ( items < 3 ) { RETVAL = 0;  goto all_done; }
2649                 length = items - 2;
2650                 colors = (SDL_Color *)safemalloc(sizeof(SDL_Color)*(length+1));
2651                 for ( i = 0; i < length ; i++ ) {
2652                         temp = (SDL_Color *)SvIV(ST(i+2));
2653                         colors[i].r = temp->r;
2654                         colors[i].g = temp->g;
2655                         colors[i].b = temp->b;
2656                 }
2657                 RETVAL = SDL_SetColors(surface, colors, start, length );
2658                 safefree(colors);
2659 all_done:
2660 #line 2661 "SDL_perl.c"
2661         XSprePUSH; PUSHi((IV)RETVAL);
2662     }
2663     XSRETURN(1);
2664 }
2665
2666 XS(XS_SDL_MapRGB); /* prototype to pass -Wmissing-prototypes */
2667 XS(XS_SDL_MapRGB)
2668 {
2669     dXSARGS;
2670     if (items != 4)
2671         Perl_croak(aTHX_ "Usage: SDL::MapRGB(surface, r, g, b)");
2672     {
2673         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2674         Uint8   r = (unsigned char)SvUV(ST(1));
2675         Uint8   g = (unsigned char)SvUV(ST(2));
2676         Uint8   b = (unsigned char)SvUV(ST(3));
2677         Uint32  RETVAL;
2678         dXSTARG;
2679 #line 1434 "SDL_perl.xs"
2680                 RETVAL = SDL_MapRGB(surface->format,r,g,b);
2681 #line 2682 "SDL_perl.c"
2682         XSprePUSH; PUSHu((UV)RETVAL);
2683     }
2684     XSRETURN(1);
2685 }
2686
2687 XS(XS_SDL_MapRGBA); /* prototype to pass -Wmissing-prototypes */
2688 XS(XS_SDL_MapRGBA)
2689 {
2690     dXSARGS;
2691     if (items != 5)
2692         Perl_croak(aTHX_ "Usage: SDL::MapRGBA(surface, r, g, b, a)");
2693     {
2694         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2695         Uint8   r = (unsigned char)SvUV(ST(1));
2696         Uint8   g = (unsigned char)SvUV(ST(2));
2697         Uint8   b = (unsigned char)SvUV(ST(3));
2698         Uint8   a = (unsigned char)SvUV(ST(4));
2699         Uint32  RETVAL;
2700         dXSTARG;
2701 #line 1446 "SDL_perl.xs"
2702                 RETVAL = SDL_MapRGBA(surface->format,r,g,b,a);
2703 #line 2704 "SDL_perl.c"
2704         XSprePUSH; PUSHu((UV)RETVAL);
2705     }
2706     XSRETURN(1);
2707 }
2708
2709 XS(XS_SDL_GetRGB); /* prototype to pass -Wmissing-prototypes */
2710 XS(XS_SDL_GetRGB)
2711 {
2712     dXSARGS;
2713     if (items != 2)
2714         Perl_croak(aTHX_ "Usage: SDL::GetRGB(surface, pixel)");
2715     {
2716         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2717         Uint32  pixel = (Uint32)SvUV(ST(1));
2718         AV *    RETVAL;
2719 #line 1455 "SDL_perl.xs"
2720                 Uint8 r,g,b;
2721                 SDL_GetRGB(pixel,surface->format,&r,&g,&b);
2722                 RETVAL = newAV();
2723                 av_push(RETVAL,newSViv(r));
2724                 av_push(RETVAL,newSViv(g));
2725                 av_push(RETVAL,newSViv(b));
2726 #line 2727 "SDL_perl.c"
2727         ST(0) = newRV((SV*)RETVAL);
2728         sv_2mortal(ST(0));
2729     }
2730     XSRETURN(1);
2731 }
2732
2733 XS(XS_SDL_GetRGBA); /* prototype to pass -Wmissing-prototypes */
2734 XS(XS_SDL_GetRGBA)
2735 {
2736     dXSARGS;
2737     if (items != 2)
2738         Perl_croak(aTHX_ "Usage: SDL::GetRGBA(surface, pixel)");
2739     {
2740         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2741         Uint32  pixel = (Uint32)SvUV(ST(1));
2742         AV *    RETVAL;
2743 #line 1469 "SDL_perl.xs"
2744                 Uint8 r,g,b,a;
2745                 SDL_GetRGBA(pixel,surface->format,&r,&g,&b,&a);
2746                 RETVAL = newAV();
2747                 av_push(RETVAL,newSViv(r));
2748                 av_push(RETVAL,newSViv(g));
2749                 av_push(RETVAL,newSViv(b));
2750                 av_push(RETVAL,newSViv(a));
2751 #line 2752 "SDL_perl.c"
2752         ST(0) = newRV((SV*)RETVAL);
2753         sv_2mortal(ST(0));
2754     }
2755     XSRETURN(1);
2756 }
2757
2758 XS(XS_SDL_SaveBMP); /* prototype to pass -Wmissing-prototypes */
2759 XS(XS_SDL_SaveBMP)
2760 {
2761     dXSARGS;
2762     if (items != 2)
2763         Perl_croak(aTHX_ "Usage: SDL::SaveBMP(surface, filename)");
2764     {
2765         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2766         char *  filename = (char *)SvPV_nolen(ST(1));
2767         int     RETVAL;
2768         dXSTARG;
2769 #line 1484 "SDL_perl.xs"
2770                 RETVAL = SDL_SaveBMP(surface,filename);
2771 #line 2772 "SDL_perl.c"
2772         XSprePUSH; PUSHi((IV)RETVAL);
2773     }
2774     XSRETURN(1);
2775 }
2776
2777 XS(XS_SDL_SetColorKey); /* prototype to pass -Wmissing-prototypes */
2778 XS(XS_SDL_SetColorKey)
2779 {
2780     dXSARGS;
2781     if (items != 3)
2782         Perl_croak(aTHX_ "Usage: SDL::SetColorKey(surface, flag, key)");
2783     {
2784         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2785         Uint32  flag = (Uint32)SvUV(ST(1));
2786         SDL_Color *     key = INT2PTR(SDL_Color *,SvIV(ST(2)));
2787         int     RETVAL;
2788         dXSTARG;
2789 #line 1494 "SDL_perl.xs"
2790                 Uint32 pixel = SDL_MapRGB(surface->format,key->r,key->g,key->b);
2791                 RETVAL = SDL_SetColorKey(surface,flag,pixel);
2792 #line 2793 "SDL_perl.c"
2793         XSprePUSH; PUSHi((IV)RETVAL);
2794     }
2795     XSRETURN(1);
2796 }
2797
2798 XS(XS_SDL_SetAlpha); /* prototype to pass -Wmissing-prototypes */
2799 XS(XS_SDL_SetAlpha)
2800 {
2801     dXSARGS;
2802     if (items != 3)
2803         Perl_croak(aTHX_ "Usage: SDL::SetAlpha(surface, flag, alpha)");
2804     {
2805         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2806         Uint32  flag = (Uint32)SvUV(ST(1));
2807         Uint8   alpha = (unsigned char)SvUV(ST(2));
2808         int     RETVAL;
2809         dXSTARG;
2810 #line 1505 "SDL_perl.xs"
2811                 RETVAL = SDL_SetAlpha(surface,flag,alpha);
2812 #line 2813 "SDL_perl.c"
2813         XSprePUSH; PUSHi((IV)RETVAL);
2814     }
2815     XSRETURN(1);
2816 }
2817
2818 XS(XS_SDL_DisplayFormat); /* prototype to pass -Wmissing-prototypes */
2819 XS(XS_SDL_DisplayFormat)
2820 {
2821     dXSARGS;
2822     if (items != 1)
2823         Perl_croak(aTHX_ "Usage: SDL::DisplayFormat(surface)");
2824     {
2825         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2826         SDL_Surface *   RETVAL;
2827         dXSTARG;
2828 #line 1513 "SDL_perl.xs"
2829                 RETVAL = SDL_DisplayFormat(surface);
2830 #line 2831 "SDL_perl.c"
2831         XSprePUSH; PUSHi(PTR2IV(RETVAL));
2832     }
2833     XSRETURN(1);
2834 }
2835
2836 XS(XS_SDL_DisplayFormatAlpha); /* prototype to pass -Wmissing-prototypes */
2837 XS(XS_SDL_DisplayFormatAlpha)
2838 {
2839     dXSARGS;
2840     if (items != 1)
2841         Perl_croak(aTHX_ "Usage: SDL::DisplayFormatAlpha(surface)");
2842     {
2843         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2844         SDL_Surface *   RETVAL;
2845         dXSTARG;
2846 #line 1521 "SDL_perl.xs"
2847                 RETVAL = SDL_DisplayFormatAlpha(surface);
2848 #line 2849 "SDL_perl.c"
2849         XSprePUSH; PUSHi(PTR2IV(RETVAL));
2850     }
2851     XSRETURN(1);
2852 }
2853
2854 XS(XS_SDL_ConvertRGB); /* prototype to pass -Wmissing-prototypes */
2855 XS(XS_SDL_ConvertRGB)
2856 {
2857     dXSARGS;
2858     if (items != 1)
2859         Perl_croak(aTHX_ "Usage: SDL::ConvertRGB(surface)");
2860     {
2861         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2862         SDL_Surface *   RETVAL;
2863         dXSTARG;
2864 #line 1529 "SDL_perl.xs"
2865                 SDL_PixelFormat fmt;
2866                 fmt.palette = NULL;
2867                 fmt.BitsPerPixel = 24;
2868                 fmt.BytesPerPixel = 3;
2869                 fmt.Rmask = 0x000000ff;
2870                 fmt.Gmask = 0x0000ff00;
2871                 fmt.Bmask = 0x00ff0000;
2872                 fmt.Amask = 0x00000000;
2873                 fmt.Rloss = 0;
2874                 fmt.Gloss = 0;
2875                 fmt.Bloss = 0;
2876                 fmt.Aloss = 0;
2877                 fmt.Rshift = 0;
2878                 fmt.Gshift = 8;
2879                 fmt.Bshift = 16;
2880                 fmt.Ashift = 24;
2881                 fmt.colorkey = 0;
2882                 fmt.alpha = 0;
2883                 RETVAL = SDL_ConvertSurface(surface,&fmt,surface->flags);
2884 #line 2885 "SDL_perl.c"
2885         XSprePUSH; PUSHi(PTR2IV(RETVAL));
2886     }
2887     XSRETURN(1);
2888 }
2889
2890 XS(XS_SDL_ConvertRGBA); /* prototype to pass -Wmissing-prototypes */
2891 XS(XS_SDL_ConvertRGBA)
2892 {
2893     dXSARGS;
2894     if (items != 1)
2895         Perl_croak(aTHX_ "Usage: SDL::ConvertRGBA(surface)");
2896     {
2897         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2898         SDL_Surface *   RETVAL;
2899         dXSTARG;
2900 #line 1555 "SDL_perl.xs"
2901                 SDL_PixelFormat fmt;
2902                 fmt.palette = NULL;
2903                 fmt.BitsPerPixel = 32;
2904                 fmt.BytesPerPixel = 4;
2905                 fmt.Rmask = 0x000000ff;
2906                 fmt.Gmask = 0x0000ff00;
2907                 fmt.Bmask = 0x00ff0000;
2908                 fmt.Amask = 0xff000000;
2909                 fmt.Rloss = 0;
2910                 fmt.Gloss = 0;
2911                 fmt.Bloss = 0;
2912                 fmt.Aloss = 0;
2913                 fmt.Rshift = 0;
2914                 fmt.Gshift = 8;
2915                 fmt.Bshift = 16;
2916                 fmt.Ashift = 24;
2917                 fmt.colorkey = 0;
2918                 fmt.alpha = 0;
2919                 RETVAL = SDL_ConvertSurface(surface,&fmt,surface->flags);
2920 #line 2921 "SDL_perl.c"
2921         XSprePUSH; PUSHi(PTR2IV(RETVAL));
2922     }
2923     XSRETURN(1);
2924 }
2925
2926 XS(XS_SDL_BlitSurface); /* prototype to pass -Wmissing-prototypes */
2927 XS(XS_SDL_BlitSurface)
2928 {
2929     dXSARGS;
2930     if (items != 4)
2931         Perl_croak(aTHX_ "Usage: SDL::BlitSurface(src, src_rect, dest, dest_rect)");
2932     {
2933         SDL_Surface *   src = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2934         SDL_Rect *      src_rect = INT2PTR(SDL_Rect *,SvIV(ST(1)));
2935         SDL_Surface *   dest = INT2PTR(SDL_Surface *,SvIV(ST(2)));
2936         SDL_Rect *      dest_rect = INT2PTR(SDL_Rect *,SvIV(ST(3)));
2937         int     RETVAL;
2938         dXSTARG;
2939 #line 1584 "SDL_perl.xs"
2940                 RETVAL = SDL_BlitSurface(src,src_rect,dest,dest_rect);
2941 #line 2942 "SDL_perl.c"
2942         XSprePUSH; PUSHi((IV)RETVAL);
2943     }
2944     XSRETURN(1);
2945 }
2946
2947 XS(XS_SDL_FillRect); /* prototype to pass -Wmissing-prototypes */
2948 XS(XS_SDL_FillRect)
2949 {
2950     dXSARGS;
2951     if (items != 3)
2952         Perl_croak(aTHX_ "Usage: SDL::FillRect(dest, dest_rect, color)");
2953     {
2954         SDL_Surface *   dest = INT2PTR(SDL_Surface *,SvIV(ST(0)));
2955         SDL_Rect *      dest_rect = INT2PTR(SDL_Rect *,SvIV(ST(1)));
2956         SDL_Color *     color = INT2PTR(SDL_Color *,SvIV(ST(2)));
2957         int     RETVAL;
2958         dXSTARG;
2959 #line 1594 "SDL_perl.xs"
2960                 Uint32 pixel = SDL_MapRGB(dest->format,color->r,color->g,color->b);
2961                 RETVAL = SDL_FillRect(dest,dest_rect,pixel);
2962 #line 2963 "SDL_perl.c"
2963         XSprePUSH; PUSHi((IV)RETVAL);
2964     }
2965     XSRETURN(1);
2966 }
2967
2968 XS(XS_SDL_GetAppState); /* prototype to pass -Wmissing-prototypes */
2969 XS(XS_SDL_GetAppState)
2970 {
2971     dXSARGS;
2972     if (items != 0)
2973         Perl_croak(aTHX_ "Usage: SDL::GetAppState()");
2974     {
2975         Uint8   RETVAL;
2976         dXSTARG;
2977 #line 1602 "SDL_perl.xs"
2978                 RETVAL = SDL_GetAppState();
2979 #line 2980 "SDL_perl.c"
2980         XSprePUSH; PUSHu((UV)RETVAL);
2981     }
2982     XSRETURN(1);
2983 }
2984
2985 XS(XS_SDL_WMSetCaption); /* prototype to pass -Wmissing-prototypes */
2986 XS(XS_SDL_WMSetCaption)
2987 {
2988     dXSARGS;
2989     if (items != 2)
2990         Perl_croak(aTHX_ "Usage: SDL::WMSetCaption(title, icon)");
2991     {
2992         char *  title = (char *)SvPV_nolen(ST(0));
2993         char *  icon = (char *)SvPV_nolen(ST(1));
2994 #line 1612 "SDL_perl.xs"
2995                 SDL_WM_SetCaption(title,icon);
2996 #line 2997 "SDL_perl.c"
2997     }
2998     XSRETURN_EMPTY;
2999 }
3000
3001 XS(XS_SDL_WMGetCaption); /* prototype to pass -Wmissing-prototypes */
3002 XS(XS_SDL_WMGetCaption)
3003 {
3004     dXSARGS;
3005     if (items != 0)
3006         Perl_croak(aTHX_ "Usage: SDL::WMGetCaption()");
3007     {
3008         AV *    RETVAL;
3009 #line 1617 "SDL_perl.xs"
3010                 char *title,*icon;
3011                 SDL_WM_GetCaption(&title,&icon);
3012                 RETVAL = newAV();
3013                 av_push(RETVAL,newSVpv(title,0));
3014                 av_push(RETVAL,newSVpv(icon,0));
3015 #line 3016 "SDL_perl.c"
3016         ST(0) = newRV((SV*)RETVAL);
3017         sv_2mortal(ST(0));
3018     }
3019     XSRETURN(1);
3020 }
3021
3022 XS(XS_SDL_WMSetIcon); /* prototype to pass -Wmissing-prototypes */
3023 XS(XS_SDL_WMSetIcon)
3024 {
3025     dXSARGS;
3026     if (items != 1)
3027         Perl_croak(aTHX_ "Usage: SDL::WMSetIcon(icon)");
3028     {
3029         SDL_Surface *   icon = INT2PTR(SDL_Surface *,SvIV(ST(0)));
3030 #line 1629 "SDL_perl.xs"
3031                 SDL_WM_SetIcon(icon,NULL);
3032 #line 3033 "SDL_perl.c"
3033     }
3034     XSRETURN_EMPTY;
3035 }
3036
3037 XS(XS_SDL_WarpMouse); /* prototype to pass -Wmissing-prototypes */
3038 XS(XS_SDL_WarpMouse)
3039 {
3040     dXSARGS;
3041     if (items != 2)
3042         Perl_croak(aTHX_ "Usage: SDL::WarpMouse(x, y)");
3043     {
3044         Uint16  x = (Uint16)SvUV(ST(0));
3045         Uint16  y = (Uint16)SvUV(ST(1));
3046 #line 1636 "SDL_perl.xs"
3047                 SDL_WarpMouse(x,y);
3048 #line 3049 "SDL_perl.c"
3049     }
3050     XSRETURN_EMPTY;
3051 }
3052
3053 XS(XS_SDL_GetMouseState); /* prototype to pass -Wmissing-prototypes */
3054 XS(XS_SDL_GetMouseState)
3055 {
3056     dXSARGS;
3057     if (items != 0)
3058         Perl_croak(aTHX_ "Usage: SDL::GetMouseState()");
3059     {
3060         AV *    RETVAL;
3061 #line 1641 "SDL_perl.xs"
3062                 Uint8 mask;
3063                 int x;
3064                 int y;
3065                 mask = SDL_GetMouseState(&x,&y);
3066                 RETVAL = newAV();
3067                 av_push(RETVAL,newSViv(mask));
3068                 av_push(RETVAL,newSViv(x));
3069                 av_push(RETVAL,newSViv(y));
3070 #line 3071 "SDL_perl.c"
3071         ST(0) = newRV((SV*)RETVAL);
3072         sv_2mortal(ST(0));
3073     }
3074     XSRETURN(1);
3075 }
3076
3077 XS(XS_SDL_GetRelativeMouseState); /* prototype to pass -Wmissing-prototypes */
3078 XS(XS_SDL_GetRelativeMouseState)
3079 {
3080     dXSARGS;
3081     if (items != 0)
3082         Perl_croak(aTHX_ "Usage: SDL::GetRelativeMouseState()");
3083     {
3084         AV *    RETVAL;
3085 #line 1655 "SDL_perl.xs"
3086                 Uint8 mask;
3087                 int x;
3088                 int y;
3089                 mask = SDL_GetRelativeMouseState(&x,&y);
3090                 RETVAL = newAV();
3091                 av_push(RETVAL,newSViv(mask));
3092                 av_push(RETVAL,newSViv(x));
3093                 av_push(RETVAL,newSViv(y));
3094 #line 3095 "SDL_perl.c"
3095         ST(0) = newRV((SV*)RETVAL);
3096         sv_2mortal(ST(0));
3097     }
3098     XSRETURN(1);
3099 }
3100
3101 XS(XS_SDL_NewCursor); /* prototype to pass -Wmissing-prototypes */
3102 XS(XS_SDL_NewCursor)
3103 {
3104     dXSARGS;
3105     if (items != 4)
3106         Perl_croak(aTHX_ "Usage: SDL::NewCursor(data, mask, x, y)");
3107     {
3108         SDL_Surface *   data = INT2PTR(SDL_Surface *,SvIV(ST(0)));
3109         SDL_Surface *   mask = INT2PTR(SDL_Surface *,SvIV(ST(1)));
3110         int     x = (int)SvIV(ST(2));
3111         int     y = (int)SvIV(ST(3));
3112         SDL_Cursor *    RETVAL;
3113         dXSTARG;
3114 #line 1673 "SDL_perl.xs"
3115                 RETVAL = SDL_CreateCursor((Uint8*)data->pixels,
3116                                 (Uint8*)mask->pixels,data->w,data->h,x,y);
3117 #line 3118 "SDL_perl.c"
3118         XSprePUSH; PUSHi(PTR2IV(RETVAL));
3119     }
3120     XSRETURN(1);
3121 }
3122
3123 XS(XS_SDL_FreeCursor); /* prototype to pass -Wmissing-prototypes */
3124 XS(XS_SDL_FreeCursor)
3125 {
3126     dXSARGS;
3127     if (items != 1)
3128         Perl_croak(aTHX_ "Usage: SDL::FreeCursor(cursor)");
3129     {
3130         SDL_Cursor *    cursor = INT2PTR(SDL_Cursor *,SvIV(ST(0)));
3131 #line 1682 "SDL_perl.xs"
3132                 SDL_FreeCursor(cursor);
3133 #line 3134 "SDL_perl.c"
3134     }
3135     XSRETURN_EMPTY;
3136 }
3137
3138 XS(XS_SDL_SetCursor); /* prototype to pass -Wmissing-prototypes */
3139 XS(XS_SDL_SetCursor)
3140 {
3141     dXSARGS;
3142     if (items != 1)
3143         Perl_croak(aTHX_ "Usage: SDL::SetCursor(cursor)");
3144     {
3145         SDL_Cursor *    cursor = INT2PTR(SDL_Cursor *,SvIV(ST(0)));
3146 #line 1688 "SDL_perl.xs"
3147                 SDL_SetCursor(cursor);
3148 #line 3149 "SDL_perl.c"
3149     }
3150     XSRETURN_EMPTY;
3151 }
3152
3153 XS(XS_SDL_GetCursor); /* prototype to pass -Wmissing-prototypes */
3154 XS(XS_SDL_GetCursor)
3155 {
3156     dXSARGS;
3157     if (items != 0)
3158         Perl_croak(aTHX_ "Usage: SDL::GetCursor()");
3159     {
3160         SDL_Cursor *    RETVAL;
3161         dXSTARG;
3162 #line 1693 "SDL_perl.xs"
3163                 RETVAL = SDL_GetCursor();
3164 #line 3165 "SDL_perl.c"
3165         XSprePUSH; PUSHi(PTR2IV(RETVAL));
3166     }
3167     XSRETURN(1);
3168 }
3169
3170 XS(XS_SDL_ShowCursor); /* prototype to pass -Wmissing-prototypes */
3171 XS(XS_SDL_ShowCursor)
3172 {
3173     dXSARGS;
3174     if (items != 1)
3175         Perl_croak(aTHX_ "Usage: SDL::ShowCursor(toggle)");
3176     {
3177         int     toggle = (int)SvIV(ST(0));
3178         int     RETVAL;
3179         dXSTARG;
3180 #line 1701 "SDL_perl.xs"
3181                 RETVAL = SDL_ShowCursor(toggle);
3182 #line 3183 "SDL_perl.c"
3183         XSprePUSH; PUSHi((IV)RETVAL);
3184     }
3185     XSRETURN(1);
3186 }
3187
3188 XS(XS_SDL_NewAudioSpec); /* prototype to pass -Wmissing-prototypes */
3189 XS(XS_SDL_NewAudioSpec)
3190 {
3191     dXSARGS;
3192     if (items != 4)
3193         Perl_croak(aTHX_ "Usage: SDL::NewAudioSpec(freq, format, channels, samples)");
3194     {
3195         int     freq = (int)SvIV(ST(0));
3196         Uint16  format = (Uint16)SvUV(ST(1));
3197         Uint8   channels = (unsigned char)SvUV(ST(2));
3198         Uint16  samples = (Uint16)SvUV(ST(3));
3199         SDL_AudioSpec * RETVAL;
3200         dXSTARG;
3201 #line 1712 "SDL_perl.xs"
3202                 RETVAL = (SDL_AudioSpec *)safemalloc(sizeof(SDL_AudioSpec));
3203                 RETVAL->freq = freq;
3204                 RETVAL->format = format;
3205                 RETVAL->channels = channels;
3206                 RETVAL->samples = samples;
3207 #line 3208 "SDL_perl.c"
3208         XSprePUSH; PUSHi(PTR2IV(RETVAL));
3209     }
3210     XSRETURN(1);
3211 }
3212
3213 XS(XS_SDL_FreeAudioSpec); /* prototype to pass -Wmissing-prototypes */
3214 XS(XS_SDL_FreeAudioSpec)
3215 {
3216     dXSARGS;
3217     if (items != 1)
3218         Perl_croak(aTHX_ "Usage: SDL::FreeAudioSpec(spec)");
3219     {
3220         SDL_AudioSpec * spec = INT2PTR(SDL_AudioSpec *,SvIV(ST(0)));
3221 #line 1724 "SDL_perl.xs"
3222                 safefree(spec);
3223 #line 3224 "SDL_perl.c"
3224     }
3225     XSRETURN_EMPTY;
3226 }
3227
3228 XS(XS_SDL_NewAudioCVT); /* prototype to pass -Wmissing-prototypes */
3229 XS(XS_SDL_NewAudioCVT)
3230 {
3231     dXSARGS;
3232     if (items != 6)
3233         Perl_croak(aTHX_ "Usage: SDL::NewAudioCVT(src_format, src_channels, src_rate, dst_format, dst_channels, dst_rate)");
3234     {
3235         Uint16  src_format = (Uint16)SvUV(ST(0));
3236         Uint8   src_channels = (unsigned char)SvUV(ST(1));
3237         int     src_rate = (int)SvIV(ST(2));
3238         Uint16  dst_format = (Uint16)SvUV(ST(3));
3239         Uint8   dst_channels = (unsigned char)SvUV(ST(4));
3240         int     dst_rate = (int)SvIV(ST(5));
3241         SDL_AudioCVT *  RETVAL;
3242         dXSTARG;
3243 #line 1735 "SDL_perl.xs"
3244                 RETVAL = (SDL_AudioCVT *)safemalloc(sizeof(SDL_AudioCVT));
3245                 if (SDL_BuildAudioCVT(RETVAL,src_format, src_channels, src_rate,
3246                         dst_format, dst_channels, dst_rate)) { 
3247                         safefree(RETVAL); RETVAL = NULL; }
3248 #line 3249 "SDL_perl.c"
3249         XSprePUSH; PUSHi(PTR2IV(RETVAL));
3250     }
3251     XSRETURN(1);
3252 }
3253
3254 XS(XS_SDL_FreeAudioCVT); /* prototype to pass -Wmissing-prototypes */
3255 XS(XS_SDL_FreeAudioCVT)
3256 {
3257     dXSARGS;
3258     if (items != 1)
3259         Perl_croak(aTHX_ "Usage: SDL::FreeAudioCVT(cvt)");
3260     {
3261         SDL_AudioCVT *  cvt = INT2PTR(SDL_AudioCVT *,SvIV(ST(0)));
3262 #line 1746 "SDL_perl.xs"
3263                 safefree(cvt);
3264 #line 3265 "SDL_perl.c"
3265     }
3266     XSRETURN_EMPTY;
3267 }
3268
3269 XS(XS_SDL_ConvertAudioData); /* prototype to pass -Wmissing-prototypes */
3270 XS(XS_SDL_ConvertAudioData)
3271 {
3272     dXSARGS;
3273     if (items != 3)
3274         Perl_croak(aTHX_ "Usage: SDL::ConvertAudioData(cvt, data, len)");
3275     {
3276         SDL_AudioCVT *  cvt = INT2PTR(SDL_AudioCVT *,SvIV(ST(0)));
3277         Uint8 * data = INT2PTR(Uint8 *,SvIV(ST(1)));
3278         int     len = (int)SvIV(ST(2));
3279         int     RETVAL;
3280         dXSTARG;
3281 #line 1754 "SDL_perl.xs"
3282                 cvt->len = len;
3283                 cvt->buf = (Uint8*) safemalloc(cvt->len*cvt->len_mult);
3284                 memcpy(cvt->buf,data,cvt->len);
3285                 RETVAL = SDL_ConvertAudio(cvt);
3286 #line 3287 "SDL_perl.c"
3287         XSprePUSH; PUSHi((IV)RETVAL);
3288     }
3289     XSRETURN(1);
3290 }
3291
3292 XS(XS_SDL_OpenAudio); /* prototype to pass -Wmissing-prototypes */
3293 XS(XS_SDL_OpenAudio)
3294 {
3295     dXSARGS;
3296     if (items != 2)
3297         Perl_croak(aTHX_ "Usage: SDL::OpenAudio(spec, callback)");
3298     {
3299         SDL_AudioSpec * spec = INT2PTR(SDL_AudioSpec *,SvIV(ST(0)));
3300         SV*     callback = ST(1);
3301         int     RETVAL;
3302         dXSTARG;
3303 #line 1766 "SDL_perl.xs"
3304                 spec->userdata = (void*)callback;
3305                 spec->callback = sdl_perl_audio_callback;
3306                 RETVAL = SDL_OpenAudio(spec,NULL);
3307 #line 3308 "SDL_perl.c"
3308         XSprePUSH; PUSHi((IV)RETVAL);
3309     }
3310     XSRETURN(1);
3311 }
3312
3313 XS(XS_SDL_GetAudioStatus); /* prototype to pass -Wmissing-prototypes */
3314 XS(XS_SDL_GetAudioStatus)
3315 {
3316     dXSARGS;
3317     if (items != 0)
3318         Perl_croak(aTHX_ "Usage: SDL::GetAudioStatus()");
3319     {
3320         Uint32  RETVAL;
3321         dXSTARG;
3322 #line 1775 "SDL_perl.xs"
3323                 RETVAL = SDL_GetAudioStatus ();
3324 #line 3325 "SDL_perl.c"
3325         XSprePUSH; PUSHu((UV)RETVAL);
3326     }
3327     XSRETURN(1);
3328 }
3329
3330 XS(XS_SDL_PauseAudio); /* prototype to pass -Wmissing-prototypes */
3331 XS(XS_SDL_PauseAudio)
3332 {
3333     dXSARGS;
3334     if (items != 1)
3335         Perl_croak(aTHX_ "Usage: SDL::PauseAudio(p_on)");
3336     {
3337         int     p_on = (int)SvIV(ST(0));
3338 #line 1783 "SDL_perl.xs"
3339                 SDL_PauseAudio(p_on);
3340 #line 3341 "SDL_perl.c"
3341     }
3342     XSRETURN_EMPTY;
3343 }
3344
3345 XS(XS_SDL_LockAudio); /* prototype to pass -Wmissing-prototypes */
3346 XS(XS_SDL_LockAudio)
3347 {
3348     dXSARGS;
3349     if (items != 0)
3350         Perl_croak(aTHX_ "Usage: SDL::LockAudio()");
3351     {
3352 #line 1788 "SDL_perl.xs"
3353                 SDL_LockAudio();
3354 #line 3355 "SDL_perl.c"
3355     }
3356     XSRETURN_EMPTY;
3357 }
3358
3359 XS(XS_SDL_UnlockAudio); /* prototype to pass -Wmissing-prototypes */
3360 XS(XS_SDL_UnlockAudio)
3361 {
3362     dXSARGS;
3363     if (items != 0)
3364         Perl_croak(aTHX_ "Usage: SDL::UnlockAudio()");
3365     {
3366 #line 1793 "SDL_perl.xs"
3367                 SDL_UnlockAudio();
3368 #line 3369 "SDL_perl.c"
3369     }
3370     XSRETURN_EMPTY;
3371 }
3372
3373 XS(XS_SDL_CloseAudio); /* prototype to pass -Wmissing-prototypes */
3374 XS(XS_SDL_CloseAudio)
3375 {
3376     dXSARGS;
3377     if (items != 0)
3378         Perl_croak(aTHX_ "Usage: SDL::CloseAudio()");
3379     {
3380 #line 1798 "SDL_perl.xs"
3381                 SDL_CloseAudio();
3382 #line 3383 "SDL_perl.c"
3383     }
3384     XSRETURN_EMPTY;
3385 }
3386
3387 XS(XS_SDL_FreeWAV); /* prototype to pass -Wmissing-prototypes */
3388 XS(XS_SDL_FreeWAV)
3389 {
3390     dXSARGS;
3391     if (items != 1)
3392         Perl_croak(aTHX_ "Usage: SDL::FreeWAV(buf)");
3393     {
3394         Uint8 * buf = INT2PTR(Uint8 *,SvIV(ST(0)));
3395 #line 1804 "SDL_perl.xs"
3396                 SDL_FreeWAV(buf);
3397 #line 3398 "SDL_perl.c"
3398     }
3399     XSRETURN_EMPTY;
3400 }
3401
3402 XS(XS_SDL_LoadWAV); /* prototype to pass -Wmissing-prototypes */
3403 XS(XS_SDL_LoadWAV)
3404 {
3405     dXSARGS;
3406     if (items != 2)
3407         Perl_croak(aTHX_ "Usage: SDL::LoadWAV(filename, spec)");
3408     {
3409         char *  filename = (char *)SvPV_nolen(ST(0));
3410         SDL_AudioSpec * spec = INT2PTR(SDL_AudioSpec *,SvIV(ST(1)));
3411         AV *    RETVAL;
3412 #line 1811 "SDL_perl.xs"
3413                 SDL_AudioSpec *temp;
3414                 Uint8 *buf;
3415                 Uint32 len;
3416
3417                 RETVAL = newAV();
3418                 temp = SDL_LoadWAV(filename,spec,&buf,&len);
3419                 if ( ! temp ) goto error;
3420                 av_push(RETVAL,newSViv(PTR2IV(temp)));
3421                 av_push(RETVAL,newSViv(PTR2IV(buf)));
3422                 av_push(RETVAL,newSViv(len));
3423 error:
3424 #line 3425 "SDL_perl.c"
3425         ST(0) = newRV((SV*)RETVAL);
3426         sv_2mortal(ST(0));
3427     }
3428     XSRETURN(1);
3429 }
3430
3431 #ifdef HAVE_SDL_MIXER
3432 #define XSubPPtmpAAAB 1
3433
3434 XS(XS_SDL_MixAudio); /* prototype to pass -Wmissing-prototypes */
3435 XS(XS_SDL_MixAudio)
3436 {
3437     dXSARGS;
3438     if (items != 4)
3439         Perl_croak(aTHX_ "Usage: SDL::MixAudio(dst, src, len, volume)");
3440     {
3441         Uint8 * dst = INT2PTR(Uint8 *,SvIV(ST(0)));
3442         Uint8 * src = INT2PTR(Uint8 *,SvIV(ST(1)));
3443         Uint32  len = (Uint32)SvUV(ST(2));
3444         int     volume = (int)SvIV(ST(3));
3445 #line 1834 "SDL_perl.xs"
3446                 SDL_MixAudio(dst,src,len,volume);
3447 #line 3448 "SDL_perl.c"
3448     }
3449     XSRETURN_EMPTY;
3450 }
3451
3452 XS(XS_SDL_MixOpenAudio); /* prototype to pass -Wmissing-prototypes */
3453 XS(XS_SDL_MixOpenAudio)
3454 {
3455     dXSARGS;
3456     if (items != 4)
3457         Perl_croak(aTHX_ "Usage: SDL::MixOpenAudio(frequency, format, channels, chunksize)");
3458     {
3459         int     frequency = (int)SvIV(ST(0));
3460         Uint16  format = (Uint16)SvUV(ST(1));
3461         int     channels = (int)SvIV(ST(2));
3462         int     chunksize = (int)SvIV(ST(3));
3463         int     RETVAL;
3464         dXSTARG;
3465 #line 1843 "SDL_perl.xs"
3466                 RETVAL = Mix_OpenAudio(frequency, format, channels, chunksize);
3467 #line 3468 "SDL_perl.c"
3468         XSprePUSH; PUSHi((IV)RETVAL);
3469     }
3470     XSRETURN(1);
3471 }
3472
3473 XS(XS_SDL_MixAllocateChannels); /* prototype to pass -Wmissing-prototypes */
3474 XS(XS_SDL_MixAllocateChannels)
3475 {
3476     dXSARGS;
3477     if (items != 1)
3478         Perl_croak(aTHX_ "Usage: SDL::MixAllocateChannels(number)");
3479     {
3480         int     number = (int)SvIV(ST(0));
3481         int     RETVAL;
3482         dXSTARG;
3483 #line 1851 "SDL_perl.xs"
3484                 RETVAL = Mix_AllocateChannels(number);
3485 #line 3486 "SDL_perl.c"
3486         XSprePUSH; PUSHi((IV)RETVAL);
3487     }
3488     XSRETURN(1);
3489 }
3490
3491 XS(XS_SDL_MixQuerySpec); /* prototype to pass -Wmissing-prototypes */
3492 XS(XS_SDL_MixQuerySpec)
3493 {
3494     dXSARGS;
3495     if (items != 0)
3496         Perl_croak(aTHX_ "Usage: SDL::MixQuerySpec()");
3497     {
3498         AV *    RETVAL;
3499 #line 1858 "SDL_perl.xs"
3500                 int freq, channels, status;
3501                 Uint16 format;
3502                 status = Mix_QuerySpec(&freq,&format,&channels);
3503                 RETVAL = newAV();
3504                 av_push(RETVAL,newSViv(status));
3505                 av_push(RETVAL,newSViv(freq));
3506                 av_push(RETVAL,newSViv(format));
3507                 av_push(RETVAL,newSViv(channels));
3508 #line 3509 "SDL_perl.c"
3509         ST(0) = newRV((SV*)RETVAL);
3510         sv_2mortal(ST(0));
3511     }
3512     XSRETURN(1);
3513 }
3514
3515 XS(XS_SDL_MixLoadWAV); /* prototype to pass -Wmissing-prototypes */
3516 XS(XS_SDL_MixLoadWAV)
3517 {
3518     dXSARGS;
3519     if (items != 1)
3520         Perl_croak(aTHX_ "Usage: SDL::MixLoadWAV(filename)");
3521     {
3522         char *  filename = (char *)SvPV_nolen(ST(0));
3523         Mix_Chunk *     RETVAL;
3524         dXSTARG;
3525 #line 1873 "SDL_perl.xs"
3526                 RETVAL = Mix_LoadWAV(filename);
3527 #line 3528 "SDL_perl.c"
3528         XSprePUSH; PUSHi(PTR2IV(RETVAL));
3529     }
3530     XSRETURN(1);
3531 }
3532
3533 XS(XS_SDL_MixLoadMusic); /* prototype to pass -Wmissing-prototypes */
3534 XS(XS_SDL_MixLoadMusic)
3535 {
3536     dXSARGS;
3537     if (items != 1)
3538         Perl_croak(aTHX_ "Usage: SDL::MixLoadMusic(filename)");
3539     {
3540         char *  filename = (char *)SvPV_nolen(ST(0));
3541         Mix_Music *     RETVAL;
3542         dXSTARG;
3543 #line 1881 "SDL_perl.xs"
3544                 RETVAL = Mix_LoadMUS(filename);
3545 #line 3546 "SDL_perl.c"
3546         XSprePUSH; PUSHi(PTR2IV(RETVAL));
3547     }
3548     XSRETURN(1);
3549 }
3550
3551 XS(XS_SDL_MixQuickLoadWAV); /* prototype to pass -Wmissing-prototypes */
3552 XS(XS_SDL_MixQuickLoadWAV)
3553 {
3554     dXSARGS;
3555     if (items != 1)
3556         Perl_croak(aTHX_ "Usage: SDL::MixQuickLoadWAV(buf)");
3557     {
3558         Uint8 * buf = INT2PTR(Uint8 *,SvIV(ST(0)));
3559         Mix_Chunk *     RETVAL;
3560         dXSTARG;
3561 #line 1889 "SDL_perl.xs"
3562                 RETVAL = Mix_QuickLoad_WAV(buf);
3563 #line 3564 "SDL_perl.c"
3564         XSprePUSH; PUSHi(PTR2IV(RETVAL));
3565     }
3566     XSRETURN(1);
3567 }
3568
3569 XS(XS_SDL_MixFreeChunk); /* prototype to pass -Wmissing-prototypes */
3570 XS(XS_SDL_MixFreeChunk)
3571 {
3572     dXSARGS;
3573     if (items != 1)
3574         Perl_croak(aTHX_ "Usage: SDL::MixFreeChunk(chunk)");
3575     {
3576         Mix_Chunk *     chunk = INT2PTR(Mix_Chunk *,SvIV(ST(0)));
3577 #line 1897 "SDL_perl.xs"
3578                 Mix_FreeChunk(chunk);
3579 #line 3580 "SDL_perl.c"
3580     }
3581     XSRETURN_EMPTY;
3582 }
3583
3584 XS(XS_SDL_MixFreeMusic); /* prototype to pass -Wmissing-prototypes */
3585 XS(XS_SDL_MixFreeMusic)
3586 {
3587     dXSARGS;
3588     if (items != 1)
3589         Perl_croak(aTHX_ "Usage: SDL::MixFreeMusic(music)");
3590     {
3591         Mix_Music *     music = INT2PTR(Mix_Music *,SvIV(ST(0)));
3592 #line 1903 "SDL_perl.xs"
3593                 Mix_FreeMusic(music);
3594 #line 3595 "SDL_perl.c"
3595     }
3596     XSRETURN_EMPTY;
3597 }
3598
3599 XS(XS_SDL_MixSetPostMixCallback); /* prototype to pass -Wmissing-prototypes */
3600 XS(XS_SDL_MixSetPostMixCallback)
3601 {
3602     dXSARGS;
3603     if (items != 2)
3604         Perl_croak(aTHX_ "Usage: SDL::MixSetPostMixCallback(func, arg)");
3605     {
3606         void *  func = INT2PTR(void *,SvIV(ST(0)));
3607         void *  arg = INT2PTR(void *,SvIV(ST(1)));
3608 #line 1910 "SDL_perl.xs"
3609                 Mix_SetPostMix(func,arg);
3610 #line 3611 "SDL_perl.c"
3611     }
3612     XSRETURN_EMPTY;
3613 }
3614
3615 XS(XS_SDL_PerlMixMusicHook); /* prototype to pass -Wmissing-prototypes */
3616 XS(XS_SDL_PerlMixMusicHook)
3617 {
3618     dXSARGS;
3619     if (items != 0)
3620         Perl_croak(aTHX_ "Usage: SDL::PerlMixMusicHook()");
3621     {
3622         void *  RETVAL;
3623         dXSTARG;
3624 #line 1915 "SDL_perl.xs"
3625                 RETVAL = sdl_perl_music_callback;
3626 #line 3627 "SDL_perl.c"
3627         XSprePUSH; PUSHi(PTR2IV(RETVAL));
3628     }
3629     XSRETURN(1);
3630 }
3631
3632 XS(XS_SDL_MixSetMusicHook); /* prototype to pass -Wmissing-prototypes */
3633 XS(XS_SDL_MixSetMusicHook)
3634 {
3635     dXSARGS;
3636     if (items != 2)
3637         Perl_croak(aTHX_ "Usage: SDL::MixSetMusicHook(func, arg)");
3638     {
3639         void *  func = INT2PTR(void *,SvIV(ST(0)));
3640         void *  arg = INT2PTR(void *,SvIV(ST(1)));
3641 #line 1924 "SDL_perl.xs"
3642                 Mix_HookMusic(func,arg);
3643 #line 3644 "SDL_perl.c"
3644     }
3645     XSRETURN_EMPTY;
3646 }
3647
3648 XS(XS_SDL_MixSetMusicFinishedHook); /* prototype to pass -Wmissing-prototypes */
3649 XS(XS_SDL_MixSetMusicFinishedHook)
3650 {
3651     dXSARGS;
3652     if (items != 1)
3653         Perl_croak(aTHX_ "Usage: SDL::MixSetMusicFinishedHook(func)");
3654     {
3655         void *  func = INT2PTR(void *,SvIV(ST(0)));
3656 #line 1930 "SDL_perl.xs"
3657                 mix_music_finished_cv = func;
3658                 Mix_HookMusicFinished(sdl_perl_music_finished_callback);
3659 #line 3660 "SDL_perl.c"
3660     }
3661     XSRETURN_EMPTY;
3662 }
3663
3664 XS(XS_SDL_MixGetMusicHookData); /* prototype to pass -Wmissing-prototypes */
3665 XS(XS_SDL_MixGetMusicHookData)
3666 {
3667     dXSARGS;
3668     if (items != 0)
3669         Perl_croak(aTHX_ "Usage: SDL::MixGetMusicHookData()");
3670     {
3671         void *  RETVAL;
3672         dXSTARG;
3673 #line 1936 "SDL_perl.xs"
3674                 RETVAL = Mix_GetMusicHookData();
3675 #line 3676 "SDL_perl.c"
3676         XSprePUSH; PUSHi(PTR2IV(RETVAL));
3677     }
3678     XSRETURN(1);
3679 }
3680
3681 XS(XS_SDL_MixReverseChannels); /* prototype to pass -Wmissing-prototypes */
3682 XS(XS_SDL_MixReverseChannels)
3683 {
3684     dXSARGS;
3685     if (items != 1)
3686         Perl_croak(aTHX_ "Usage: SDL::MixReverseChannels(number)");
3687     {
3688         int     number = (int)SvIV(ST(0));
3689         int     RETVAL;
3690         dXSTARG;
3691 #line 1944 "SDL_perl.xs"
3692                 RETVAL = Mix_ReserveChannels ( number );
3693 #line 3694 "SDL_perl.c"
3694         XSprePUSH; PUSHi((IV)RETVAL);
3695     }
3696     XSRETURN(1);
3697 }
3698
3699 XS(XS_SDL_MixGroupChannel); /* prototype to pass -Wmissing-prototypes */
3700 XS(XS_SDL_MixGroupChannel)
3701 {
3702     dXSARGS;
3703     if (items != 2)
3704         Perl_croak(aTHX_ "Usage: SDL::MixGroupChannel(which, tag)");
3705     {
3706         int     which = (int)SvIV(ST(0));
3707         int     tag = (int)SvIV(ST(1));
3708         int     RETVAL;
3709         dXSTARG;
3710 #line 1953 "SDL_perl.xs"
3711                 RETVAL = Mix_GroupChannel(which,tag);
3712 #line 3713 "SDL_perl.c"
3713         XSprePUSH; PUSHi((IV)RETVAL);
3714     }
3715     XSRETURN(1);
3716 }
3717
3718 XS(XS_SDL_MixGroupChannels); /* prototype to pass -Wmissing-prototypes */
3719 XS(XS_SDL_MixGroupChannels)
3720 {
3721     dXSARGS;
3722     if (items != 3)
3723         Perl_croak(aTHX_ "Usage: SDL::MixGroupChannels(from, to, tag)");
3724     {
3725         int     from = (int)SvIV(ST(0));
3726         int     to = (int)SvIV(ST(1));
3727         int     tag = (int)SvIV(ST(2));
3728         int     RETVAL;
3729         dXSTARG;
3730 #line 1963 "SDL_perl.xs"
3731                 RETVAL = Mix_GroupChannels(from,to,tag);
3732 #line 3733 "SDL_perl.c"
3733         XSprePUSH; PUSHi((IV)RETVAL);
3734     }
3735     XSRETURN(1);
3736 }
3737
3738 XS(XS_SDL_MixGroupAvailable); /* prototype to pass -Wmissing-prototypes */
3739 XS(XS_SDL_MixGroupAvailable)
3740 {
3741     dXSARGS;
3742     if (items != 1)
3743         Perl_croak(aTHX_ "Usage: SDL::MixGroupAvailable(tag)");
3744     {
3745         int     tag = (int)SvIV(ST(0));
3746         int     RETVAL;
3747         dXSTARG;
3748 #line 1971 "SDL_perl.xs"
3749                 RETVAL = Mix_GroupAvailable(tag);
3750 #line 3751 "SDL_perl.c"
3751         XSprePUSH; PUSHi((IV)RETVAL);
3752     }
3753     XSRETURN(1);
3754 }
3755
3756 XS(XS_SDL_MixGroupCount); /* prototype to pass -Wmissing-prototypes */
3757 XS(XS_SDL_MixGroupCount)
3758 {
3759     dXSARGS;
3760     if (items != 1)
3761         Perl_croak(aTHX_ "Usage: SDL::MixGroupCount(tag)");
3762     {
3763         int     tag = (int)SvIV(ST(0));
3764         int     RETVAL;
3765         dXSTARG;
3766 #line 1979 "SDL_perl.xs"
3767                 RETVAL = Mix_GroupCount(tag);
3768 #line 3769 "SDL_perl.c"
3769         XSprePUSH; PUSHi((IV)RETVAL);
3770     }
3771     XSRETURN(1);
3772 }
3773
3774 XS(XS_SDL_MixGroupOldest); /* prototype to pass -Wmissing-prototypes */
3775 XS(XS_SDL_MixGroupOldest)
3776 {
3777     dXSARGS;
3778     if (items != 1)
3779         Perl_croak(aTHX_ "Usage: SDL::MixGroupOldest(tag)");
3780     {
3781         int     tag = (int)SvIV(ST(0));
3782         int     RETVAL;
3783         dXSTARG;
3784 #line 1987 "SDL_perl.xs"
3785                 RETVAL = Mix_GroupOldest(tag);
3786 #line 3787 "SDL_perl.c"
3787         XSprePUSH; PUSHi((IV)RETVAL);
3788     }
3789     XSRETURN(1);
3790 }
3791
3792 XS(XS_SDL_MixGroupNewer); /* prototype to pass -Wmissing-prototypes */
3793 XS(XS_SDL_MixGroupNewer)
3794 {
3795     dXSARGS;
3796     if (items != 1)
3797         Perl_croak(aTHX_ "Usage: SDL::MixGroupNewer(tag)");
3798     {
3799         int     tag = (int)SvIV(ST(0));
3800         int     RETVAL;
3801         dXSTARG;
3802 #line 1995 "SDL_perl.xs"
3803                 RETVAL = Mix_GroupNewer(tag);
3804 #line 3805 "SDL_perl.c"
3805         XSprePUSH; PUSHi((IV)RETVAL);
3806     }
3807     XSRETURN(1);
3808 }
3809
3810 XS(XS_SDL_MixPlayChannel); /* prototype to pass -Wmissing-prototypes */
3811 XS(XS_SDL_MixPlayChannel)
3812 {
3813     dXSARGS;
3814     if (items != 3)
3815         Perl_croak(aTHX_ "Usage: SDL::MixPlayChannel(channel, chunk, loops)");
3816     {
3817         int     channel = (int)SvIV(ST(0));
3818         Mix_Chunk *     chunk = INT2PTR(Mix_Chunk *,SvIV(ST(1)));
3819         int     loops = (int)SvIV(ST(2));
3820         int     RETVAL;
3821         dXSTARG;
3822 #line 2005 "SDL_perl.xs"
3823                 RETVAL = Mix_PlayChannel(channel,chunk,loops);
3824 #line 3825 "SDL_perl.c"
3825         XSprePUSH; PUSHi((IV)RETVAL);
3826     }
3827     XSRETURN(1);
3828 }
3829
3830 XS(XS_SDL_MixPlayChannelTimed); /* prototype to pass -Wmissing-prototypes */
3831 XS(XS_SDL_MixPlayChannelTimed)
3832 {
3833     dXSARGS;
3834     if (items != 4)
3835         Perl_croak(aTHX_ "Usage: SDL::MixPlayChannelTimed(channel, chunk, loops, ticks)");
3836     {
3837         int     channel = (int)SvIV(ST(0));
3838         Mix_Chunk *     chunk = INT2PTR(Mix_Chunk *,SvIV(ST(1)));
3839         int     loops = (int)SvIV(ST(2));
3840         int     ticks = (int)SvIV(ST(3));
3841         int     RETVAL;
3842         dXSTARG;
3843 #line 2016 "SDL_perl.xs"
3844                 RETVAL = Mix_PlayChannelTimed(channel,chunk,loops,ticks);
3845 #line 3846 "SDL_perl.c"
3846         XSprePUSH; PUSHi((IV)RETVAL);
3847     }
3848     XSRETURN(1);
3849 }
3850
3851 XS(XS_SDL_MixPlayMusic); /* prototype to pass -Wmissing-prototypes */
3852 XS(XS_SDL_MixPlayMusic)
3853 {
3854     dXSARGS;
3855     if (items != 2)
3856         Perl_croak(aTHX_ "Usage: SDL::MixPlayMusic(music, loops)");
3857     {
3858         Mix_Music *     music = INT2PTR(Mix_Music *,SvIV(ST(0)));
3859         int     loops = (int)SvIV(ST(1));
3860         int     RETVAL;
3861         dXSTARG;
3862 #line 2025 "SDL_perl.xs"
3863                 RETVAL = Mix_PlayMusic(music,loops);
3864 #line 3865 "SDL_perl.c"
3865         XSprePUSH; PUSHi((IV)RETVAL);
3866     }
3867     XSRETURN(1);
3868 }
3869
3870 XS(XS_SDL_MixFadeInChannel); /* prototype to pass -Wmissing-prototypes */
3871 XS(XS_SDL_MixFadeInChannel)
3872 {
3873     dXSARGS;
3874     if (items != 4)
3875         Perl_croak(aTHX_ "Usage: SDL::MixFadeInChannel(channel, chunk, loops, ms)");
3876     {
3877         int     channel = (int)SvIV(ST(0));
3878         Mix_Chunk *     chunk = INT2PTR(Mix_Chunk *,SvIV(ST(1)));
3879         int     loops = (int)SvIV(ST(2));
3880         int     ms = (int)SvIV(ST(3));
3881         int     RETVAL;
3882         dXSTARG;
3883 #line 2036 "SDL_perl.xs"
3884                 RETVAL = Mix_FadeInChannel(channel,chunk,loops,ms);
3885 #line 3886 "SDL_perl.c"
3886         XSprePUSH; PUSHi((IV)RETVAL);
3887     }
3888     XSRETURN(1);
3889 }
3890
3891 XS(XS_SDL_MixFadeInChannelTimed); /* prototype to pass -Wmissing-prototypes */
3892 XS(XS_SDL_MixFadeInChannelTimed)
3893 {
3894     dXSARGS;
3895     if (items != 5)
3896         Perl_croak(aTHX_ "Usage: SDL::MixFadeInChannelTimed(channel, chunk, loops, ms, ticks)");
3897     {
3898         int     channel = (int)SvIV(ST(0));
3899         Mix_Chunk *     chunk = INT2PTR(Mix_Chunk *,SvIV(ST(1)));
3900         int     loops = (int)SvIV(ST(2));
3901         int     ticks = (int)SvIV(ST(4));
3902         int     ms = (int)SvIV(ST(3));
3903         int     RETVAL;
3904         dXSTARG;
3905 #line 2048 "SDL_perl.xs"
3906                 RETVAL = Mix_FadeInChannelTimed(channel,chunk,loops,ms,ticks);
3907 #line 3908 "SDL_perl.c"
3908         XSprePUSH; PUSHi((IV)RETVAL);
3909     }
3910     XSRETURN(1);
3911 }
3912
3913 XS(XS_SDL_MixFadeInMusic); /* prototype to pass -Wmissing-prototypes */
3914 XS(XS_SDL_MixFadeInMusic)
3915 {
3916     dXSARGS;
3917     if (items != 3)
3918         Perl_croak(aTHX_ "Usage: SDL::MixFadeInMusic(music, loops, ms)");
3919     {
3920         Mix_Music *     music = INT2PTR(Mix_Music *,SvIV(ST(0)));
3921         int     loops = (int)SvIV(ST(1));
3922         int     ms = (int)SvIV(ST(2));
3923         int     RETVAL;
3924         dXSTARG;
3925 #line 2058 "SDL_perl.xs"
3926                 RETVAL = Mix_FadeInMusic(music,loops,ms);
3927 #line 3928 "SDL_perl.c"
3928         XSprePUSH; PUSHi((IV)RETVAL);
3929     }
3930     XSRETURN(1);
3931 }
3932
3933 XS(XS_SDL_MixVolume); /* prototype to pass -Wmissing-prototypes */
3934 XS(XS_SDL_MixVolume)
3935 {
3936     dXSARGS;
3937     if (items != 2)
3938         Perl_croak(aTHX_ "Usage: SDL::MixVolume(channel, volume)");
3939     {
3940         int     channel = (int)SvIV(ST(0));
3941         int     volume = (int)SvIV(ST(1));
3942         int     RETVAL;
3943         dXSTARG;
3944 #line 2067 "SDL_perl.xs"
3945                 RETVAL = Mix_Volume(channel,volume);
3946 #line 3947 "SDL_perl.c"
3947         XSprePUSH; PUSHi((IV)RETVAL);
3948     }
3949     XSRETURN(1);
3950 }
3951
3952 XS(XS_SDL_MixVolumeChunk); /* prototype to pass -Wmissing-prototypes */
3953 XS(XS_SDL_MixVolumeChunk)
3954 {
3955     dXSARGS;
3956     if (items != 2)
3957         Perl_croak(aTHX_ "Usage: SDL::MixVolumeChunk(chunk, volume)");
3958     {
3959         Mix_Chunk *     chunk = INT2PTR(Mix_Chunk *,SvIV(ST(0)));
3960         int     volume = (int)SvIV(ST(1));
3961         int     RETVAL;
3962         dXSTARG;
3963 #line 2076 "SDL_perl.xs"
3964                 RETVAL = Mix_VolumeChunk(chunk,volume);
3965 #line 3966 "SDL_perl.c"
3966         XSprePUSH; PUSHi((IV)RETVAL);
3967     }
3968     XSRETURN(1);
3969 }
3970
3971 XS(XS_SDL_MixVolumeMusic); /* prototype to pass -Wmissing-prototypes */
3972 XS(XS_SDL_MixVolumeMusic)
3973 {
3974     dXSARGS;
3975     if (items != 1)
3976         Perl_croak(aTHX_ "Usage: SDL::MixVolumeMusic(volume)");
3977     {
3978         int     volume = (int)SvIV(ST(0));
3979         int     RETVAL;
3980         dXSTARG;
3981 #line 2084 "SDL_perl.xs"
3982                 RETVAL = Mix_VolumeMusic(volume);
3983 #line 3984 "SDL_perl.c"
3984         XSprePUSH; PUSHi((IV)RETVAL);
3985     }
3986     XSRETURN(1);
3987 }
3988
3989 XS(XS_SDL_MixHaltChannel); /* prototype to pass -Wmissing-prototypes */
3990 XS(XS_SDL_MixHaltChannel)
3991 {
3992     dXSARGS;
3993     if (items != 1)
3994         Perl_croak(aTHX_ "Usage: SDL::MixHaltChannel(channel)");
3995     {
3996         int     channel = (int)SvIV(ST(0));
3997         int     RETVAL;
3998         dXSTARG;
3999 #line 2092 "SDL_perl.xs"
4000                 RETVAL = Mix_HaltChannel(channel);
4001 #line 4002 "SDL_perl.c"
4002         XSprePUSH; PUSHi((IV)RETVAL);
4003     }
4004     XSRETURN(1);
4005 }
4006
4007 XS(XS_SDL_MixHaltGroup); /* prototype to pass -Wmissing-prototypes */
4008 XS(XS_SDL_MixHaltGroup)
4009 {
4010     dXSARGS;
4011     if (items != 1)
4012         Perl_croak(aTHX_ "Usage: SDL::MixHaltGroup(tag)");
4013     {
4014         int     tag = (int)SvIV(ST(0));
4015         int     RETVAL;
4016         dXSTARG;
4017 #line 2100 "SDL_perl.xs"
4018                 RETVAL = Mix_HaltGroup(tag);
4019 #line 4020 "SDL_perl.c"
4020         XSprePUSH; PUSHi((IV)RETVAL);
4021     }
4022     XSRETURN(1);
4023 }
4024
4025 XS(XS_SDL_MixHaltMusic); /* prototype to pass -Wmissing-prototypes */
4026 XS(XS_SDL_MixHaltMusic)
4027 {
4028     dXSARGS;
4029     if (items != 0)
4030         Perl_croak(aTHX_ "Usage: SDL::MixHaltMusic()");
4031     {
4032         int     RETVAL;
4033         dXSTARG;
4034 #line 2107 "SDL_perl.xs"
4035                 RETVAL = Mix_HaltMusic();
4036 #line 4037 "SDL_perl.c"
4037         XSprePUSH; PUSHi((IV)RETVAL);
4038     }
4039     XSRETURN(1);
4040 }
4041
4042 XS(XS_SDL_MixExpireChannel); /* prototype to pass -Wmissing-prototypes */
4043 XS(XS_SDL_MixExpireChannel)
4044 {
4045     dXSARGS;
4046     if (items != 2)
4047         Perl_croak(aTHX_ "Usage: SDL::MixExpireChannel(channel, ticks)");
4048     {
4049         int     channel = (int)SvIV(ST(0));
4050         int     ticks = (int)SvIV(ST(1));
4051         int     RETVAL;
4052         dXSTARG;
4053 #line 2116 "SDL_perl.xs"
4054                 RETVAL = Mix_ExpireChannel ( channel,ticks);
4055 #line 4056 "SDL_perl.c"
4056         XSprePUSH; PUSHi((IV)RETVAL);
4057     }
4058     XSRETURN(1);
4059 }
4060
4061 XS(XS_SDL_MixFadeOutChannel); /* prototype to pass -Wmissing-prototypes */
4062 XS(XS_SDL_MixFadeOutChannel)
4063 {
4064     dXSARGS;
4065     if (items != 2)
4066         Perl_croak(aTHX_ "Usage: SDL::MixFadeOutChannel(which, ms)");
4067     {
4068         int     which = (int)SvIV(ST(0));
4069         int     ms = (int)SvIV(ST(1));
4070         int     RETVAL;
4071         dXSTARG;
4072 #line 2125 "SDL_perl.xs"
4073                 RETVAL = Mix_FadeOutChannel(which,ms);
4074 #line 4075 "SDL_perl.c"
4075         XSprePUSH; PUSHi((IV)RETVAL);
4076     }
4077     XSRETURN(1);
4078 }
4079
4080 XS(XS_SDL_MixFadeOutGroup); /* prototype to pass -Wmissing-prototypes */
4081 XS(XS_SDL_MixFadeOutGroup)
4082 {
4083     dXSARGS;
4084     if (items != 2)
4085         Perl_croak(aTHX_ "Usage: SDL::MixFadeOutGroup(which, ms)");
4086     {
4087         int     which = (int)SvIV(ST(0));
4088         int     ms = (int)SvIV(ST(1));
4089         int     RETVAL;
4090         dXSTARG;
4091 #line 2134 "SDL_perl.xs"
4092                 RETVAL = Mix_FadeOutGroup(which,ms);
4093 #line 4094 "SDL_perl.c"
4094         XSprePUSH; PUSHi((IV)RETVAL);
4095     }
4096     XSRETURN(1);
4097 }
4098
4099 XS(XS_SDL_MixFadeOutMusic); /* prototype to pass -Wmissing-prototypes */
4100 XS(XS_SDL_MixFadeOutMusic)
4101 {
4102     dXSARGS;
4103     if (items != 1)
4104         Perl_croak(aTHX_ "Usage: SDL::MixFadeOutMusic(ms)");
4105     {
4106         int     ms = (int)SvIV(ST(0));
4107         int     RETVAL;
4108         dXSTARG;
4109 #line 2142 "SDL_perl.xs"
4110                 RETVAL = Mix_FadeOutMusic(ms);
4111 #line 4112 "SDL_perl.c"
4112         XSprePUSH; PUSHi((IV)RETVAL);
4113     }
4114     XSRETURN(1);
4115 }
4116
4117 XS(XS_SDL_MixFadingMusic); /* prototype to pass -Wmissing-prototypes */
4118 XS(XS_SDL_MixFadingMusic)
4119 {
4120     dXSARGS;
4121     if (items != 0)
4122         Perl_croak(aTHX_ "Usage: SDL::MixFadingMusic()");
4123     {
4124         Mix_Fading      RETVAL;
4125         dXSTARG;
4126 #line 2149 "SDL_perl.xs"
4127                 RETVAL = Mix_FadingMusic();
4128 #line 4129 "SDL_perl.c"
4129         XSprePUSH; PUSHu((UV)RETVAL);
4130     }
4131     XSRETURN(1);
4132 }
4133
4134 XS(XS_SDL_MixFadingChannel); /* prototype to pass -Wmissing-prototypes */
4135 XS(XS_SDL_MixFadingChannel)
4136 {
4137     dXSARGS;
4138     if (items != 1)
4139         Perl_croak(aTHX_ "Usage: SDL::MixFadingChannel(which)");
4140     {
4141         int     which = (int)SvIV(ST(0));
4142         Mix_Fading      RETVAL;
4143         dXSTARG;
4144 #line 2157 "SDL_perl.xs"
4145                 RETVAL = Mix_FadingChannel(which);
4146 #line 4147 "SDL_perl.c"
4147         XSprePUSH; PUSHu((UV)RETVAL);
4148     }
4149     XSRETURN(1);
4150 }
4151
4152 XS(XS_SDL_MixPause); /* prototype to pass -Wmissing-prototypes */
4153 XS(XS_SDL_MixPause)
4154 {
4155     dXSARGS;
4156     if (items != 1)
4157         Perl_croak(aTHX_ "Usage: SDL::MixPause(channel)");
4158     {
4159         int     channel = (int)SvIV(ST(0));
4160 #line 2165 "SDL_perl.xs"
4161                 Mix_Pause(channel);
4162 #line 4163 "SDL_perl.c"
4163     }
4164     XSRETURN_EMPTY;
4165 }
4166
4167 XS(XS_SDL_MixResume); /* prototype to pass -Wmissing-prototypes */
4168 XS(XS_SDL_MixResume)
4169 {
4170     dXSARGS;
4171     if (items != 1)
4172         Perl_croak(aTHX_ "Usage: SDL::MixResume(channel)");
4173     {
4174         int     channel = (int)SvIV(ST(0));
4175 #line 2171 "SDL_perl.xs"
4176                 Mix_Resume(channel);
4177 #line 4178 "SDL_perl.c"
4178     }
4179     XSRETURN_EMPTY;
4180 }
4181
4182 XS(XS_SDL_MixPaused); /* prototype to pass -Wmissing-prototypes */
4183 XS(XS_SDL_MixPaused)
4184 {
4185     dXSARGS;
4186     if (items != 1)
4187         Perl_croak(aTHX_ "Usage: SDL::MixPaused(channel)");
4188     {
4189         int     channel = (int)SvIV(ST(0));
4190         int     RETVAL;
4191         dXSTARG;
4192 #line 2177 "SDL_perl.xs"
4193                 RETVAL = Mix_Paused(channel);
4194 #line 4195 "SDL_perl.c"
4195         XSprePUSH; PUSHi((IV)RETVAL);
4196     }
4197     XSRETURN(1);
4198 }
4199
4200 XS(XS_SDL_MixPauseMusic); /* prototype to pass -Wmissing-prototypes */
4201 XS(XS_SDL_MixPauseMusic)
4202 {
4203     dXSARGS;
4204     if (items != 0)
4205         Perl_croak(aTHX_ "Usage: SDL::MixPauseMusic()");
4206     {
4207 #line 2184 "SDL_perl.xs"
4208                 Mix_PauseMusic();
4209 #line 4210 "SDL_perl.c"
4210     }
4211     XSRETURN_EMPTY;
4212 }
4213
4214 XS(XS_SDL_MixResumeMusic); /* prototype to pass -Wmissing-prototypes */
4215 XS(XS_SDL_MixResumeMusic)
4216 {
4217     dXSARGS;
4218     if (items != 0)
4219         Perl_croak(aTHX_ "Usage: SDL::MixResumeMusic()");
4220     {
4221 #line 2189 "SDL_perl.xs"
4222                 Mix_ResumeMusic();
4223 #line 4224 "SDL_perl.c"
4224     }
4225     XSRETURN_EMPTY;
4226 }
4227
4228 XS(XS_SDL_MixRewindMusic); /* prototype to pass -Wmissing-prototypes */
4229 XS(XS_SDL_MixRewindMusic)
4230 {
4231     dXSARGS;
4232     if (items != 0)
4233         Perl_croak(aTHX_ "Usage: SDL::MixRewindMusic()");
4234     {
4235 #line 2194 "SDL_perl.xs"
4236                 Mix_RewindMusic();
4237 #line 4238 "SDL_perl.c"
4238     }
4239     XSRETURN_EMPTY;
4240 }
4241
4242 XS(XS_SDL_MixPausedMusic); /* prototype to pass -Wmissing-prototypes */
4243 XS(XS_SDL_MixPausedMusic)
4244 {
4245     dXSARGS;
4246     if (items != 0)
4247         Perl_croak(aTHX_ "Usage: SDL::MixPausedMusic()");
4248     {
4249         int     RETVAL;
4250         dXSTARG;
4251 #line 2199 "SDL_perl.xs"
4252                 RETVAL = Mix_PausedMusic();
4253 #line 4254 "SDL_perl.c"
4254         XSprePUSH; PUSHi((IV)RETVAL);
4255     }
4256     XSRETURN(1);
4257 }
4258
4259 XS(XS_SDL_MixPlaying); /* prototype to pass -Wmissing-prototypes */
4260 XS(XS_SDL_MixPlaying)
4261 {
4262     dXSARGS;
4263     if (items != 1)
4264         Perl_croak(aTHX_ "Usage: SDL::MixPlaying(channel)");
4265     {
4266         int     channel = (int)SvIV(ST(0));
4267         int     RETVAL;
4268         dXSTARG;
4269 #line 2207 "SDL_perl.xs"
4270                 RETVAL = Mix_Playing(channel);
4271 #line 4272 "SDL_perl.c"
4272         XSprePUSH; PUSHi((IV)RETVAL);
4273     }
4274     XSRETURN(1);
4275 }
4276
4277 XS(XS_SDL_MixPlayingMusic); /* prototype to pass -Wmissing-prototypes */
4278 XS(XS_SDL_MixPlayingMusic)
4279 {
4280     dXSARGS;
4281     if (items != 0)
4282         Perl_croak(aTHX_ "Usage: SDL::MixPlayingMusic()");
4283     {
4284         int     RETVAL;
4285         dXSTARG;
4286 #line 2214 "SDL_perl.xs"
4287                 RETVAL = Mix_PlayingMusic();
4288 #line 4289 "SDL_perl.c"
4289         XSprePUSH; PUSHi((IV)RETVAL);
4290     }
4291     XSRETURN(1);
4292 }
4293
4294 XS(XS_SDL_MixCloseAudio); /* prototype to pass -Wmissing-prototypes */
4295 XS(XS_SDL_MixCloseAudio)
4296 {
4297     dXSARGS;
4298     if (items != 0)
4299         Perl_croak(aTHX_ "Usage: SDL::MixCloseAudio()");
4300     {
4301 #line 2222 "SDL_perl.xs"
4302                 Mix_CloseAudio();
4303 #line 4304 "SDL_perl.c"
4304     }
4305     XSRETURN_EMPTY;
4306 }
4307
4308 #endif
4309 XS(XS_SDL_GLLoadLibrary); /* prototype to pass -Wmissing-prototypes */
4310 XS(XS_SDL_GLLoadLibrary)
4311 {
4312     dXSARGS;
4313     if (items != 1)
4314         Perl_croak(aTHX_ "Usage: SDL::GLLoadLibrary(path)");
4315     {
4316         char *  path = (char *)SvPV_nolen(ST(0));
4317         int     RETVAL;
4318         dXSTARG;
4319 #line 2230 "SDL_perl.xs"
4320                 RETVAL = SDL_GL_LoadLibrary(path);
4321 #line 4322 "SDL_perl.c"
4322         XSprePUSH; PUSHi((IV)RETVAL);
4323     }
4324     XSRETURN(1);
4325 }
4326
4327 XS(XS_SDL_GLGetProcAddress); /* prototype to pass -Wmissing-prototypes */
4328 XS(XS_SDL_GLGetProcAddress)
4329 {
4330     dXSARGS;
4331     if (items != 1)
4332         Perl_croak(aTHX_ "Usage: SDL::GLGetProcAddress(proc)");
4333     {
4334         char *  proc = (char *)SvPV_nolen(ST(0));
4335         void *  RETVAL;
4336         dXSTARG;
4337 #line 2238 "SDL_perl.xs"
4338                 RETVAL = SDL_GL_GetProcAddress(proc);
4339 #line 4340 "SDL_perl.c"
4340         XSprePUSH; PUSHi(PTR2IV(RETVAL));
4341     }
4342     XSRETURN(1);
4343 }
4344
4345 XS(XS_SDL_GLSetAttribute); /* prototype to pass -Wmissing-prototypes */
4346 XS(XS_SDL_GLSetAttribute)
4347 {
4348     dXSARGS;
4349     if (items != 2)
4350         Perl_croak(aTHX_ "Usage: SDL::GLSetAttribute(attr, value)");
4351     {
4352         int     attr = (int)SvIV(ST(0));
4353         int     value = (int)SvIV(ST(1));
4354         int     RETVAL;
4355         dXSTARG;
4356 #line 2247 "SDL_perl.xs"
4357                 RETVAL = SDL_GL_SetAttribute(attr, value);
4358 #line 4359 "SDL_perl.c"
4359         XSprePUSH; PUSHi((IV)RETVAL);
4360     }
4361     XSRETURN(1);
4362 }
4363
4364 XS(XS_SDL_GLGetAttribute); /* prototype to pass -Wmissing-prototypes */
4365 XS(XS_SDL_GLGetAttribute)
4366 {
4367     dXSARGS;
4368     if (items != 1)
4369         Perl_croak(aTHX_ "Usage: SDL::GLGetAttribute(attr)");
4370     {
4371         int     attr = (int)SvIV(ST(0));
4372         AV *    RETVAL;
4373 #line 2255 "SDL_perl.xs"
4374                 int value;
4375                 RETVAL = newAV();
4376                 av_push(RETVAL,newSViv(SDL_GL_GetAttribute(attr, &value)));
4377                 av_push(RETVAL,newSViv(value));
4378 #line 4379 "SDL_perl.c"
4379         ST(0) = newRV((SV*)RETVAL);
4380         sv_2mortal(ST(0));
4381     }
4382     XSRETURN(1);
4383 }
4384
4385 XS(XS_SDL_GLSwapBuffers); /* prototype to pass -Wmissing-prototypes */
4386 XS(XS_SDL_GLSwapBuffers)
4387 {
4388     dXSARGS;
4389     if (items != 0)
4390         Perl_croak(aTHX_ "Usage: SDL::GLSwapBuffers()");
4391     {
4392 #line 2265 "SDL_perl.xs"
4393                 SDL_GL_SwapBuffers ();
4394 #line 4395 "SDL_perl.c"
4395     }
4396     XSRETURN_EMPTY;
4397 }
4398
4399 XS(XS_SDL_BigEndian); /* prototype to pass -Wmissing-prototypes */
4400 XS(XS_SDL_BigEndian)
4401 {
4402     dXSARGS;
4403     if (items != 0)
4404         Perl_croak(aTHX_ "Usage: SDL::BigEndian()");
4405     {
4406         int     RETVAL;
4407         dXSTARG;
4408 #line 2271 "SDL_perl.xs"
4409                 RETVAL = (SDL_BYTEORDER == SDL_BIG_ENDIAN);
4410 #line 4411 "SDL_perl.c"
4411         XSprePUSH; PUSHi((IV)RETVAL);
4412     }
4413     XSRETURN(1);
4414 }
4415
4416 XS(XS_SDL_NumJoysticks); /* prototype to pass -Wmissing-prototypes */
4417 XS(XS_SDL_NumJoysticks)
4418 {
4419     dXSARGS;
4420     if (items != 0)
4421         Perl_croak(aTHX_ "Usage: SDL::NumJoysticks()");
4422     {
4423         int     RETVAL;
4424         dXSTARG;
4425 #line 2278 "SDL_perl.xs"
4426                 RETVAL = SDL_NumJoysticks();
4427 #line 4428 "SDL_perl.c"
4428         XSprePUSH; PUSHi((IV)RETVAL);
4429     }
4430     XSRETURN(1);
4431 }
4432
4433 XS(XS_SDL_JoystickName); /* prototype to pass -Wmissing-prototypes */
4434 XS(XS_SDL_JoystickName)
4435 {
4436     dXSARGS;
4437     if (items != 1)
4438         Perl_croak(aTHX_ "Usage: SDL::JoystickName(index)");
4439     {
4440         int     index = (int)SvIV(ST(0));
4441         char *  RETVAL;
4442         dXSTARG;
4443 #line 2286 "SDL_perl.xs"
4444                 RETVAL = (char*)SDL_JoystickName(index);
4445 #line 4446 "SDL_perl.c"
4446         sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
4447     }
4448     XSRETURN(1);
4449 }
4450
4451 XS(XS_SDL_JoystickOpen); /* prototype to pass -Wmissing-prototypes */
4452 XS(XS_SDL_JoystickOpen)
4453 {
4454     dXSARGS;
4455     if (items != 1)
4456         Perl_croak(aTHX_ "Usage: SDL::JoystickOpen(index)");
4457     {
4458         int     index = (int)SvIV(ST(0));
4459         SDL_Joystick *  RETVAL;
4460         dXSTARG;
4461 #line 2294 "SDL_perl.xs"
4462                 RETVAL = SDL_JoystickOpen(index);
4463 #line 4464 "SDL_perl.c"
4464         XSprePUSH; PUSHi(PTR2IV(RETVAL));
4465     }
4466     XSRETURN(1);
4467 }
4468
4469 XS(XS_SDL_JoystickOpened); /* prototype to pass -Wmissing-prototypes */
4470 XS(XS_SDL_JoystickOpened)
4471 {
4472     dXSARGS;
4473     if (items != 1)
4474         Perl_croak(aTHX_ "Usage: SDL::JoystickOpened(index)");
4475     {
4476         int     index = (int)SvIV(ST(0));
4477         int     RETVAL;
4478         dXSTARG;
4479 #line 2302 "SDL_perl.xs"
4480                 RETVAL = SDL_JoystickOpened(index);
4481 #line 4482 "SDL_perl.c"
4482         XSprePUSH; PUSHi((IV)RETVAL);
4483     }
4484     XSRETURN(1);
4485 }
4486
4487 XS(XS_SDL_JoystickIndex); /* prototype to pass -Wmissing-prototypes */
4488 XS(XS_SDL_JoystickIndex)
4489 {
4490     dXSARGS;
4491     if (items != 1)
4492         Perl_croak(aTHX_ "Usage: SDL::JoystickIndex(joystick)");
4493     {
4494         SDL_Joystick *  joystick = INT2PTR(SDL_Joystick *,SvIV(ST(0)));
4495         int     RETVAL;
4496         dXSTARG;
4497 #line 2310 "SDL_perl.xs"
4498                 RETVAL = SDL_JoystickIndex(joystick);
4499 #line 4500 "SDL_perl.c"
4500         XSprePUSH; PUSHi((IV)RETVAL);
4501     }
4502     XSRETURN(1);
4503 }
4504
4505 XS(XS_SDL_JoystickNumAxes); /* prototype to pass -Wmissing-prototypes */
4506 XS(XS_SDL_JoystickNumAxes)
4507 {
4508     dXSARGS;
4509     if (items != 1)
4510         Perl_croak(aTHX_ "Usage: SDL::JoystickNumAxes(joystick)");
4511     {
4512         SDL_Joystick *  joystick = INT2PTR(SDL_Joystick *,SvIV(ST(0)));
4513         int     RETVAL;
4514         dXSTARG;
4515 #line 2318 "SDL_perl.xs"
4516                 RETVAL = SDL_JoystickNumAxes(joystick);
4517 #line 4518 "SDL_perl.c"
4518         XSprePUSH; PUSHi((IV)RETVAL);
4519     }
4520     XSRETURN(1);
4521 }
4522
4523 XS(XS_SDL_JoystickNumBalls); /* prototype to pass -Wmissing-prototypes */
4524 XS(XS_SDL_JoystickNumBalls)
4525 {
4526     dXSARGS;
4527     if (items != 1)
4528         Perl_croak(aTHX_ "Usage: SDL::JoystickNumBalls(joystick)");
4529     {
4530         SDL_Joystick *  joystick = INT2PTR(SDL_Joystick *,SvIV(ST(0)));
4531         int     RETVAL;
4532         dXSTARG;
4533 #line 2326 "SDL_perl.xs"
4534                 RETVAL = SDL_JoystickNumBalls(joystick);
4535 #line 4536 "SDL_perl.c"
4536         XSprePUSH; PUSHi((IV)RETVAL);
4537     }
4538     XSRETURN(1);
4539 }
4540
4541 XS(XS_SDL_JoystickNumHats); /* prototype to pass -Wmissing-prototypes */
4542 XS(XS_SDL_JoystickNumHats)
4543 {
4544     dXSARGS;
4545     if (items != 1)
4546         Perl_croak(aTHX_ "Usage: SDL::JoystickNumHats(joystick)");
4547     {
4548         SDL_Joystick *  joystick = INT2PTR(SDL_Joystick *,SvIV(ST(0)));
4549         int     RETVAL;
4550         dXSTARG;
4551 #line 2334 "SDL_perl.xs"
4552                 RETVAL = SDL_JoystickNumHats(joystick);
4553 #line 4554 "SDL_perl.c"
4554         XSprePUSH; PUSHi((IV)RETVAL);
4555     }
4556     XSRETURN(1);
4557 }
4558
4559 XS(XS_SDL_JoystickNumButtons); /* prototype to pass -Wmissing-prototypes */
4560 XS(XS_SDL_JoystickNumButtons)
4561 {
4562     dXSARGS;
4563     if (items != 1)
4564         Perl_croak(aTHX_ "Usage: SDL::JoystickNumButtons(joystick)");
4565     {
4566         SDL_Joystick *  joystick = INT2PTR(SDL_Joystick *,SvIV(ST(0)));
4567         int     RETVAL;
4568         dXSTARG;
4569 #line 2342 "SDL_perl.xs"
4570                 RETVAL = SDL_JoystickNumButtons(joystick);
4571 #line 4572 "SDL_perl.c"
4572         XSprePUSH; PUSHi((IV)RETVAL);
4573     }
4574     XSRETURN(1);
4575 }
4576
4577 XS(XS_SDL_JoystickUpdate); /* prototype to pass -Wmissing-prototypes */
4578 XS(XS_SDL_JoystickUpdate)
4579 {
4580     dXSARGS;
4581     if (items != 0)
4582         Perl_croak(aTHX_ "Usage: SDL::JoystickUpdate()");
4583     {
4584 #line 2349 "SDL_perl.xs"
4585                 SDL_JoystickUpdate();
4586 #line 4587 "SDL_perl.c"
4587     }
4588     XSRETURN_EMPTY;
4589 }
4590
4591 XS(XS_SDL_JoystickGetAxis); /* prototype to pass -Wmissing-prototypes */
4592 XS(XS_SDL_JoystickGetAxis)
4593 {
4594     dXSARGS;
4595     if (items != 2)
4596         Perl_croak(aTHX_ "Usage: SDL::JoystickGetAxis(joystick, axis)");
4597     {
4598         SDL_Joystick *  joystick = INT2PTR(SDL_Joystick *,SvIV(ST(0)));
4599         int     axis = (int)SvIV(ST(1));
4600         Sint16  RETVAL;
4601         dXSTARG;
4602 #line 2356 "SDL_perl.xs"
4603                 RETVAL = SDL_JoystickGetAxis(joystick,axis);
4604 #line 4605 "SDL_perl.c"
4605         XSprePUSH; PUSHi((IV)RETVAL);
4606     }
4607     XSRETURN(1);
4608 }
4609
4610 XS(XS_SDL_JoystickGetHat); /* prototype to pass -Wmissing-prototypes */
4611 XS(XS_SDL_JoystickGetHat)
4612 {
4613     dXSARGS;
4614     if (items != 2)
4615         Perl_croak(aTHX_ "Usage: SDL::JoystickGetHat(joystick, hat)");
4616     {
4617         SDL_Joystick *  joystick = INT2PTR(SDL_Joystick *,SvIV(ST(0)));
4618         int     hat = (int)SvIV(ST(1));
4619         Uint8   RETVAL;
4620         dXSTARG;
4621 #line 2365 "SDL_perl.xs"
4622                 RETVAL = SDL_JoystickGetHat(joystick,hat);
4623 #line 4624 "SDL_perl.c"
4624         XSprePUSH; PUSHu((UV)RETVAL);
4625     }
4626     XSRETURN(1);
4627 }
4628
4629 XS(XS_SDL_JoystickGetButton); /* prototype to pass -Wmissing-prototypes */
4630 XS(XS_SDL_JoystickGetButton)
4631 {
4632     dXSARGS;
4633     if (items != 2)
4634         Perl_croak(aTHX_ "Usage: SDL::JoystickGetButton(joystick, button)");
4635     {
4636         SDL_Joystick *  joystick = INT2PTR(SDL_Joystick *,SvIV(ST(0)));
4637         int     button = (int)SvIV(ST(1));
4638         Uint8   RETVAL;
4639         dXSTARG;
4640 #line 2374 "SDL_perl.xs"
4641                 RETVAL = SDL_JoystickGetButton(joystick,button);
4642 #line 4643 "SDL_perl.c"
4643         XSprePUSH; PUSHu((UV)RETVAL);
4644     }
4645     XSRETURN(1);
4646 }
4647
4648 XS(XS_SDL_JoystickGetBall); /* prototype to pass -Wmissing-prototypes */
4649 XS(XS_SDL_JoystickGetBall)
4650 {
4651     dXSARGS;
4652     if (items != 2)
4653         Perl_croak(aTHX_ "Usage: SDL::JoystickGetBall(joystick, ball)");
4654     {
4655         SDL_Joystick *  joystick = INT2PTR(SDL_Joystick *,SvIV(ST(0)));
4656         int     ball = (int)SvIV(ST(1));
4657         AV *    RETVAL;
4658 #line 2383 "SDL_perl.xs"
4659                 int success,dx,dy;
4660                 success = SDL_JoystickGetBall(joystick,ball,&dx,&dy);
4661                 RETVAL = newAV();
4662                 av_push(RETVAL,newSViv(success));
4663                 av_push(RETVAL,newSViv(dx));
4664                 av_push(RETVAL,newSViv(dy));
4665 #line 4666 "SDL_perl.c"
4666         ST(0) = newRV((SV*)RETVAL);
4667         sv_2mortal(ST(0));
4668     }
4669     XSRETURN(1);
4670 }
4671
4672 XS(XS_SDL_JoystickClose); /* prototype to pass -Wmissing-prototypes */
4673 XS(XS_SDL_JoystickClose)
4674 {
4675     dXSARGS;
4676     if (items != 1)
4677         Perl_croak(aTHX_ "Usage: SDL::JoystickClose(joystick)");
4678     {
4679         SDL_Joystick *  joystick = INT2PTR(SDL_Joystick *,SvIV(ST(0)));
4680 #line 2396 "SDL_perl.xs"
4681                 SDL_JoystickClose(joystick);
4682 #line 4683 "SDL_perl.c"
4683     }
4684     XSRETURN_EMPTY;
4685 }
4686
4687 XS(XS_SDL_JoyAxisEventWhich); /* prototype to pass -Wmissing-prototypes */
4688 XS(XS_SDL_JoyAxisEventWhich)
4689 {
4690     dXSARGS;
4691     if (items != 1)
4692         Perl_croak(aTHX_ "Usage: SDL::JoyAxisEventWhich(e)");
4693     {
4694         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
4695         Sint16  RETVAL;
4696         dXSTARG;
4697 #line 2402 "SDL_perl.xs"
4698                 RETVAL = e->jaxis.which;
4699 #line 4700 "SDL_perl.c"
4700         XSprePUSH; PUSHi((IV)RETVAL);
4701     }
4702     XSRETURN(1);
4703 }
4704
4705 XS(XS_SDL_JoyAxisEventAxis); /* prototype to pass -Wmissing-prototypes */
4706 XS(XS_SDL_JoyAxisEventAxis)
4707 {
4708     dXSARGS;
4709     if (items != 1)
4710         Perl_croak(aTHX_ "Usage: SDL::JoyAxisEventAxis(e)");
4711     {
4712         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
4713         Uint8   RETVAL;
4714         dXSTARG;
4715 #line 2410 "SDL_perl.xs"
4716                 RETVAL = e->jaxis.axis;
4717 #line 4718 "SDL_perl.c"
4718         XSprePUSH; PUSHu((UV)RETVAL);
4719     }
4720     XSRETURN(1);
4721 }
4722
4723 XS(XS_SDL_JoyAxisEventValue); /* prototype to pass -Wmissing-prototypes */
4724 XS(XS_SDL_JoyAxisEventValue)
4725 {
4726     dXSARGS;
4727     if (items != 1)
4728         Perl_croak(aTHX_ "Usage: SDL::JoyAxisEventValue(e)");
4729     {
4730         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
4731         Uint8   RETVAL;
4732         dXSTARG;
4733 #line 2418 "SDL_perl.xs"
4734                 RETVAL = e->jaxis.value;
4735 #line 4736 "SDL_perl.c"
4736         XSprePUSH; PUSHu((UV)RETVAL);
4737     }
4738     XSRETURN(1);
4739 }
4740
4741 XS(XS_SDL_JoyButtonEventWhich); /* prototype to pass -Wmissing-prototypes */
4742 XS(XS_SDL_JoyButtonEventWhich)
4743 {
4744     dXSARGS;
4745     if (items != 1)
4746         Perl_croak(aTHX_ "Usage: SDL::JoyButtonEventWhich(e)");
4747     {
4748         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
4749         Uint8   RETVAL;
4750         dXSTARG;
4751 #line 2426 "SDL_perl.xs"
4752                 RETVAL = e->jbutton.which;
4753 #line 4754 "SDL_perl.c"
4754         XSprePUSH; PUSHu((UV)RETVAL);
4755     }
4756     XSRETURN(1);
4757 }
4758
4759 XS(XS_SDL_JoyButtonEventButton); /* prototype to pass -Wmissing-prototypes */
4760 XS(XS_SDL_JoyButtonEventButton)
4761 {
4762     dXSARGS;
4763     if (items != 1)
4764         Perl_croak(aTHX_ "Usage: SDL::JoyButtonEventButton(e)");
4765     {
4766         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
4767         Uint8   RETVAL;
4768         dXSTARG;
4769 #line 2434 "SDL_perl.xs"
4770                 RETVAL = e->jbutton.button;
4771 #line 4772 "SDL_perl.c"
4772         XSprePUSH; PUSHu((UV)RETVAL);
4773     }
4774     XSRETURN(1);
4775 }
4776
4777 XS(XS_SDL_JoyButtonEventState); /* prototype to pass -Wmissing-prototypes */
4778 XS(XS_SDL_JoyButtonEventState)
4779 {
4780     dXSARGS;
4781     if (items != 1)
4782         Perl_croak(aTHX_ "Usage: SDL::JoyButtonEventState(e)");
4783     {
4784         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
4785         Uint8   RETVAL;
4786         dXSTARG;
4787 #line 2442 "SDL_perl.xs"
4788                 RETVAL = e->jbutton.state;
4789 #line 4790 "SDL_perl.c"
4790         XSprePUSH; PUSHu((UV)RETVAL);
4791     }
4792     XSRETURN(1);
4793 }
4794
4795 XS(XS_SDL_JoyHatEventWhich); /* prototype to pass -Wmissing-prototypes */
4796 XS(XS_SDL_JoyHatEventWhich)
4797 {
4798     dXSARGS;
4799     if (items != 1)
4800         Perl_croak(aTHX_ "Usage: SDL::JoyHatEventWhich(e)");
4801     {
4802         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
4803         Uint8   RETVAL;
4804         dXSTARG;
4805 #line 2450 "SDL_perl.xs"
4806                 RETVAL = e->jhat.which;
4807 #line 4808 "SDL_perl.c"
4808         XSprePUSH; PUSHu((UV)RETVAL);
4809     }
4810     XSRETURN(1);
4811 }
4812
4813 XS(XS_SDL_JoyHatEventHat); /* prototype to pass -Wmissing-prototypes */
4814 XS(XS_SDL_JoyHatEventHat)
4815 {
4816     dXSARGS;
4817     if (items != 1)
4818         Perl_croak(aTHX_ "Usage: SDL::JoyHatEventHat(e)");
4819     {
4820         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
4821         Uint8   RETVAL;
4822         dXSTARG;
4823 #line 2458 "SDL_perl.xs"
4824                 RETVAL = e->jhat.hat;
4825 #line 4826 "SDL_perl.c"
4826         XSprePUSH; PUSHu((UV)RETVAL);
4827     }
4828     XSRETURN(1);
4829 }
4830
4831 XS(XS_SDL_JoyHatEventValue); /* prototype to pass -Wmissing-prototypes */
4832 XS(XS_SDL_JoyHatEventValue)
4833 {
4834     dXSARGS;
4835     if (items != 1)
4836         Perl_croak(aTHX_ "Usage: SDL::JoyHatEventValue(e)");
4837     {
4838         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
4839         Uint8   RETVAL;
4840         dXSTARG;
4841 #line 2466 "SDL_perl.xs"
4842                 RETVAL = e->jhat.value;
4843 #line 4844 "SDL_perl.c"
4844         XSprePUSH; PUSHu((UV)RETVAL);
4845     }
4846     XSRETURN(1);
4847 }
4848
4849 XS(XS_SDL_JoyBallEventWhich); /* prototype to pass -Wmissing-prototypes */
4850 XS(XS_SDL_JoyBallEventWhich)
4851 {
4852     dXSARGS;
4853     if (items != 1)
4854         Perl_croak(aTHX_ "Usage: SDL::JoyBallEventWhich(e)");
4855     {
4856         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
4857         Uint8   RETVAL;
4858         dXSTARG;
4859 #line 2474 "SDL_perl.xs"
4860                 RETVAL = e->jball.which;
4861 #line 4862 "SDL_perl.c"
4862         XSprePUSH; PUSHu((UV)RETVAL);
4863     }
4864     XSRETURN(1);
4865 }
4866
4867 XS(XS_SDL_JoyBallEventBall); /* prototype to pass -Wmissing-prototypes */
4868 XS(XS_SDL_JoyBallEventBall)
4869 {
4870     dXSARGS;
4871     if (items != 1)
4872         Perl_croak(aTHX_ "Usage: SDL::JoyBallEventBall(e)");
4873     {
4874         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
4875         Uint8   RETVAL;
4876         dXSTARG;
4877 #line 2482 "SDL_perl.xs"
4878                 RETVAL = e->jball.ball;
4879 #line 4880 "SDL_perl.c"
4880         XSprePUSH; PUSHu((UV)RETVAL);
4881     }
4882     XSRETURN(1);
4883 }
4884
4885 XS(XS_SDL_JoyBallEventXrel); /* prototype to pass -Wmissing-prototypes */
4886 XS(XS_SDL_JoyBallEventXrel)
4887 {
4888     dXSARGS;
4889     if (items != 1)
4890         Perl_croak(aTHX_ "Usage: SDL::JoyBallEventXrel(e)");
4891     {
4892         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
4893         Sint16  RETVAL;
4894         dXSTARG;
4895 #line 2490 "SDL_perl.xs"
4896                 RETVAL = e->jball.xrel;
4897 #line 4898 "SDL_perl.c"
4898         XSprePUSH; PUSHi((IV)RETVAL);
4899     }
4900     XSRETURN(1);
4901 }
4902
4903 XS(XS_SDL_JoyBallEventYrel); /* prototype to pass -Wmissing-prototypes */
4904 XS(XS_SDL_JoyBallEventYrel)
4905 {
4906     dXSARGS;
4907     if (items != 1)
4908         Perl_croak(aTHX_ "Usage: SDL::JoyBallEventYrel(e)");
4909     {
4910         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
4911         Sint16  RETVAL;
4912         dXSTARG;
4913 #line 2498 "SDL_perl.xs"
4914                 RETVAL = e->jball.yrel;
4915 #line 4916 "SDL_perl.c"
4916         XSprePUSH; PUSHi((IV)RETVAL);
4917     }
4918     XSRETURN(1);
4919 }
4920
4921 XS(XS_SDL_SetClipRect); /* prototype to pass -Wmissing-prototypes */
4922 XS(XS_SDL_SetClipRect)
4923 {
4924     dXSARGS;
4925     if (items != 2)
4926         Perl_croak(aTHX_ "Usage: SDL::SetClipRect(surface, rect)");
4927     {
4928         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
4929         SDL_Rect *      rect = INT2PTR(SDL_Rect *,SvIV(ST(1)));
4930 #line 2507 "SDL_perl.xs"
4931                 SDL_SetClipRect(surface,rect);
4932 #line 4933 "SDL_perl.c"
4933     }
4934     XSRETURN_EMPTY;
4935 }
4936
4937 XS(XS_SDL_GetClipRect); /* prototype to pass -Wmissing-prototypes */
4938 XS(XS_SDL_GetClipRect)
4939 {
4940     dXSARGS;
4941     if (items != 1)
4942         Perl_croak(aTHX_ "Usage: SDL::GetClipRect(surface)");
4943     {
4944         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
4945         SDL_Rect *      RETVAL;
4946         dXSTARG;
4947 #line 2513 "SDL_perl.xs"
4948                 RETVAL = (SDL_Rect*) safemalloc(sizeof(SDL_Rect));
4949                 SDL_GetClipRect(surface,RETVAL);
4950 #line 4951 "SDL_perl.c"
4951         XSprePUSH; PUSHi(PTR2IV(RETVAL));
4952     }
4953     XSRETURN(1);
4954 }
4955
4956 #ifdef HAVE_SDL_NET
4957 #define XSubPPtmpAAAC 1
4958
4959 XS(XS_SDL_NetInit); /* prototype to pass -Wmissing-prototypes */
4960 XS(XS_SDL_NetInit)
4961 {
4962     dXSARGS;
4963     if (items != 0)
4964         Perl_croak(aTHX_ "Usage: SDL::NetInit()");
4965     {
4966         int     RETVAL;
4967         dXSTARG;
4968 #line 2524 "SDL_perl.xs"
4969                 RETVAL = SDLNet_Init();
4970 #line 4971 "SDL_perl.c"
4971         XSprePUSH; PUSHi((IV)RETVAL);
4972     }
4973     XSRETURN(1);
4974 }
4975
4976 XS(XS_SDL_NetQuit); /* prototype to pass -Wmissing-prototypes */
4977 XS(XS_SDL_NetQuit)
4978 {
4979     dXSARGS;
4980     if (items != 0)
4981         Perl_croak(aTHX_ "Usage: SDL::NetQuit()");
4982     {
4983 #line 2531 "SDL_perl.xs"
4984                 SDLNet_Quit();
4985 #line 4986 "SDL_perl.c"
4986     }
4987     XSRETURN_EMPTY;
4988 }
4989
4990 XS(XS_SDL_NetNewIPaddress); /* prototype to pass -Wmissing-prototypes */
4991 XS(XS_SDL_NetNewIPaddress)
4992 {
4993     dXSARGS;
4994     if (items != 2)
4995         Perl_croak(aTHX_ "Usage: SDL::NetNewIPaddress(host, port)");
4996     {
4997         Uint32  host = (Uint32)SvUV(ST(0));
4998         Uint16  port = (Uint16)SvUV(ST(1));
4999         IPaddress *     RETVAL;
5000         dXSTARG;
5001 #line 2538 "SDL_perl.xs"
5002                 RETVAL = (IPaddress*) safemalloc(sizeof(IPaddress));
5003                 RETVAL->host = host;
5004                 RETVAL->port = port;
5005 #line 5006 "SDL_perl.c"
5006         XSprePUSH; PUSHi(PTR2IV(RETVAL));
5007     }
5008     XSRETURN(1);
5009 }
5010
5011 XS(XS_SDL_NetIPaddressHost); /* prototype to pass -Wmissing-prototypes */
5012 XS(XS_SDL_NetIPaddressHost)
5013 {
5014     dXSARGS;
5015     if (items != 1)
5016         Perl_croak(aTHX_ "Usage: SDL::NetIPaddressHost(ip)");
5017     {
5018         IPaddress *     ip = INT2PTR(IPaddress *,SvIV(ST(0)));
5019         Uint32  RETVAL;
5020         dXSTARG;
5021 #line 2548 "SDL_perl.xs"
5022                 RETVAL = ip->host;
5023 #line 5024 "SDL_perl.c"
5024         XSprePUSH; PUSHu((UV)RETVAL);
5025     }
5026     XSRETURN(1);
5027 }
5028
5029 XS(XS_SDL_NetIPaddressPort); /* prototype to pass -Wmissing-prototypes */
5030 XS(XS_SDL_NetIPaddressPort)
5031 {
5032     dXSARGS;
5033     if (items != 1)
5034         Perl_croak(aTHX_ "Usage: SDL::NetIPaddressPort(ip)");
5035     {
5036         IPaddress *     ip = INT2PTR(IPaddress *,SvIV(ST(0)));
5037         Uint16  RETVAL;
5038         dXSTARG;
5039 #line 2556 "SDL_perl.xs"
5040                 RETVAL = ip->port;
5041 #line 5042 "SDL_perl.c"
5042         XSprePUSH; PUSHu((UV)RETVAL);
5043     }
5044     XSRETURN(1);
5045 }
5046
5047 XS(XS_SDL_NetFreeIPaddress); /* prototype to pass -Wmissing-prototypes */
5048 XS(XS_SDL_NetFreeIPaddress)
5049 {
5050     dXSARGS;
5051     if (items != 1)
5052         Perl_croak(aTHX_ "Usage: SDL::NetFreeIPaddress(ip)");
5053     {
5054         IPaddress *     ip = INT2PTR(IPaddress *,SvIV(ST(0)));
5055 #line 2564 "SDL_perl.xs"
5056                 safefree(ip);
5057 #line 5058 "SDL_perl.c"
5058     }
5059     XSRETURN_EMPTY;
5060 }
5061
5062 XS(XS_SDL_NetResolveIP); /* prototype to pass -Wmissing-prototypes */
5063 XS(XS_SDL_NetResolveIP)
5064 {
5065     dXSARGS;
5066     if (items != 1)
5067         Perl_croak(aTHX_ "Usage: SDL::NetResolveIP(address)");
5068     {
5069         IPaddress *     address = INT2PTR(IPaddress *,SvIV(ST(0)));
5070         const char *    RETVAL;
5071         dXSTARG;
5072 #line 2570 "SDL_perl.xs"
5073                 RETVAL = SDLNet_ResolveIP(address);
5074 #line 5075 "SDL_perl.c"
5075         sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
5076     }
5077     XSRETURN(1);
5078 }
5079
5080 XS(XS_SDL_NetResolveHost); /* prototype to pass -Wmissing-prototypes */
5081 XS(XS_SDL_NetResolveHost)
5082 {
5083     dXSARGS;
5084     if (items != 3)
5085         Perl_croak(aTHX_ "Usage: SDL::NetResolveHost(address, host, port)");
5086     {
5087         IPaddress *     address = INT2PTR(IPaddress *,SvIV(ST(0)));
5088         const char *    host = (const char *)SvPV_nolen(ST(1));
5089         Uint16  port = (Uint16)SvUV(ST(2));
5090         int     RETVAL;
5091         dXSTARG;
5092 #line 2580 "SDL_perl.xs"
5093                 RETVAL = SDLNet_ResolveHost(address,host,port);
5094 #line 5095 "SDL_perl.c"
5095         XSprePUSH; PUSHi((IV)RETVAL);
5096     }
5097     XSRETURN(1);
5098 }
5099
5100 XS(XS_SDL_NetTCPOpen); /* prototype to pass -Wmissing-prototypes */
5101 XS(XS_SDL_NetTCPOpen)
5102 {
5103     dXSARGS;
5104     if (items != 1)
5105         Perl_croak(aTHX_ "Usage: SDL::NetTCPOpen(ip)");
5106     {
5107         IPaddress *     ip = INT2PTR(IPaddress *,SvIV(ST(0)));
5108         TCPsocket       RETVAL;
5109         dXSTARG;
5110 #line 2588 "SDL_perl.xs"
5111                 RETVAL = SDLNet_TCP_Open(ip);
5112 #line 5113 "SDL_perl.c"
5113         XSprePUSH; PUSHi(PTR2IV(RETVAL));
5114     }
5115     XSRETURN(1);
5116 }
5117
5118 XS(XS_SDL_NetTCPAccept); /* prototype to pass -Wmissing-prototypes */
5119 XS(XS_SDL_NetTCPAccept)
5120 {
5121     dXSARGS;
5122     if (items != 1)
5123         Perl_croak(aTHX_ "Usage: SDL::NetTCPAccept(server)");
5124     {
5125         TCPsocket       server = INT2PTR(TCPsocket,SvIV(ST(0)));
5126         TCPsocket       RETVAL;
5127         dXSTARG;
5128 #line 2596 "SDL_perl.xs"
5129                 RETVAL = SDLNet_TCP_Accept(server);
5130 #line 5131 "SDL_perl.c"
5131         XSprePUSH; PUSHi(PTR2IV(RETVAL));
5132     }
5133     XSRETURN(1);
5134 }
5135
5136 XS(XS_SDL_NetTCPGetPeerAddress); /* prototype to pass -Wmissing-prototypes */
5137 XS(XS_SDL_NetTCPGetPeerAddress)
5138 {
5139     dXSARGS;
5140     if (items != 1)
5141         Perl_croak(aTHX_ "Usage: SDL::NetTCPGetPeerAddress(sock)");
5142     {
5143         TCPsocket       sock = INT2PTR(TCPsocket,SvIV(ST(0)));
5144         IPaddress *     RETVAL;
5145         dXSTARG;
5146 #line 2604 "SDL_perl.xs"
5147                 RETVAL = SDLNet_TCP_GetPeerAddress(sock);
5148 #line 5149 "SDL_perl.c"
5149         XSprePUSH; PUSHi(PTR2IV(RETVAL));
5150     }
5151     XSRETURN(1);
5152 }
5153
5154 XS(XS_SDL_NetTCPSend); /* prototype to pass -Wmissing-prototypes */
5155 XS(XS_SDL_NetTCPSend)
5156 {
5157     dXSARGS;
5158     if (items != 3)
5159         Perl_croak(aTHX_ "Usage: SDL::NetTCPSend(sock, data, len)");
5160     {
5161         TCPsocket       sock = INT2PTR(TCPsocket,SvIV(ST(0)));
5162         void *  data = INT2PTR(void *,SvIV(ST(1)));
5163         int     len = (int)SvIV(ST(2));
5164         int     RETVAL;
5165         dXSTARG;
5166 #line 2614 "SDL_perl.xs"
5167                 RETVAL = SDLNet_TCP_Send(sock,data,len);
5168 #line 5169 "SDL_perl.c"
5169         XSprePUSH; PUSHi((IV)RETVAL);
5170     }
5171     XSRETURN(1);
5172 }
5173
5174 XS(XS_SDL_NetTCPRecv); /* prototype to pass -Wmissing-prototypes */
5175 XS(XS_SDL_NetTCPRecv)
5176 {
5177     dXSARGS;
5178     if (items != 2)
5179         Perl_croak(aTHX_ "Usage: SDL::NetTCPRecv(sock, maxlen)");
5180     {
5181         TCPsocket       sock = INT2PTR(TCPsocket,SvIV(ST(0)));
5182         int     maxlen = (int)SvIV(ST(1));
5183         AV *    RETVAL;
5184 #line 2623 "SDL_perl.xs"
5185                 int status;
5186                 void *buffer;
5187                 buffer = safemalloc(maxlen);
5188                 RETVAL = newAV();
5189                 status = SDLNet_TCP_Recv(sock,buffer,maxlen);
5190                 av_push(RETVAL,newSViv(status));
5191                 av_push(RETVAL,newSVpvn((char*)buffer,maxlen));
5192 #line 5193 "SDL_perl.c"
5193         ST(0) = newRV((SV*)RETVAL);
5194         sv_2mortal(ST(0));
5195     }
5196     XSRETURN(1);
5197 }
5198
5199 XS(XS_SDL_NetTCPClose); /* prototype to pass -Wmissing-prototypes */
5200 XS(XS_SDL_NetTCPClose)
5201 {
5202     dXSARGS;
5203     if (items != 1)
5204         Perl_croak(aTHX_ "Usage: SDL::NetTCPClose(sock)");
5205     {
5206         TCPsocket       sock = INT2PTR(TCPsocket,SvIV(ST(0)));
5207 #line 2637 "SDL_perl.xs"
5208                 SDLNet_TCP_Close(sock);
5209 #line 5210 "SDL_perl.c"
5210     }
5211     XSRETURN_EMPTY;
5212 }
5213
5214 XS(XS_SDL_NetAllocPacket); /* prototype to pass -Wmissing-prototypes */
5215 XS(XS_SDL_NetAllocPacket)
5216 {
5217     dXSARGS;
5218     if (items != 1)
5219         Perl_croak(aTHX_ "Usage: SDL::NetAllocPacket(size)");
5220     {
5221         int     size = (int)SvIV(ST(0));
5222         UDPpacket *     RETVAL;
5223         dXSTARG;
5224 #line 2643 "SDL_perl.xs"
5225                 RETVAL = SDLNet_AllocPacket(size);
5226 #line 5227 "SDL_perl.c"
5227         XSprePUSH; PUSHi(PTR2IV(RETVAL));
5228     }
5229     XSRETURN(1);
5230 }
5231
5232 XS(XS_SDL_NetAllocPacketV); /* prototype to pass -Wmissing-prototypes */
5233 XS(XS_SDL_NetAllocPacketV)
5234 {
5235     dXSARGS;
5236     if (items != 2)
5237         Perl_croak(aTHX_ "Usage: SDL::NetAllocPacketV(howmany, size)");
5238     {
5239         int     howmany = (int)SvIV(ST(0));
5240         int     size = (int)SvIV(ST(1));
5241         UDPpacket **    RETVAL;
5242         dXSTARG;
5243 #line 2652 "SDL_perl.xs"
5244                 RETVAL = SDLNet_AllocPacketV(howmany,size);
5245 #line 5246 "SDL_perl.c"
5246         XSprePUSH; PUSHi(PTR2IV(RETVAL));
5247     }
5248     XSRETURN(1);
5249 }
5250
5251 XS(XS_SDL_NetResizePacket); /* prototype to pass -Wmissing-prototypes */
5252 XS(XS_SDL_NetResizePacket)
5253 {
5254     dXSARGS;
5255     if (items != 2)
5256         Perl_croak(aTHX_ "Usage: SDL::NetResizePacket(packet, newsize)");
5257     {
5258         UDPpacket *     packet = INT2PTR(UDPpacket *,SvIV(ST(0)));
5259         int     newsize = (int)SvIV(ST(1));
5260         int     RETVAL;
5261         dXSTARG;
5262 #line 2661 "SDL_perl.xs"
5263                 RETVAL = SDLNet_ResizePacket(packet,newsize);
5264 #line 5265 "SDL_perl.c"
5265         XSprePUSH; PUSHi((IV)RETVAL);
5266     }
5267     XSRETURN(1);
5268 }
5269
5270 XS(XS_SDL_NetFreePacket); /* prototype to pass -Wmissing-prototypes */
5271 XS(XS_SDL_NetFreePacket)
5272 {
5273     dXSARGS;
5274     if (items != 1)
5275         Perl_croak(aTHX_ "Usage: SDL::NetFreePacket(packet)");
5276     {
5277         UDPpacket *     packet = INT2PTR(UDPpacket *,SvIV(ST(0)));
5278 #line 2669 "SDL_perl.xs"
5279                 SDLNet_FreePacket(packet);
5280 #line 5281 "SDL_perl.c"
5281     }
5282     XSRETURN_EMPTY;
5283 }
5284
5285 XS(XS_SDL_NetFreePacketV); /* prototype to pass -Wmissing-prototypes */
5286 XS(XS_SDL_NetFreePacketV)
5287 {
5288     dXSARGS;
5289     if (items != 1)
5290         Perl_croak(aTHX_ "Usage: SDL::NetFreePacketV(packet)");
5291     {
5292         UDPpacket **    packet = INT2PTR(UDPpacket **,SvIV(ST(0)));
5293 #line 2675 "SDL_perl.xs"
5294                 SDLNet_FreePacketV(packet);
5295 #line 5296 "SDL_perl.c"
5296     }
5297     XSRETURN_EMPTY;
5298 }
5299
5300 XS(XS_SDL_NetUDPOpen); /* prototype to pass -Wmissing-prototypes */
5301 XS(XS_SDL_NetUDPOpen)
5302 {
5303     dXSARGS;
5304     if (items != 1)
5305         Perl_croak(aTHX_ "Usage: SDL::NetUDPOpen(port)");
5306     {
5307         Uint16  port = (Uint16)SvUV(ST(0));
5308         UDPsocket       RETVAL;
5309         dXSTARG;
5310 #line 2681 "SDL_perl.xs"
5311                 RETVAL = SDLNet_UDP_Open(port);
5312 #line 5313 "SDL_perl.c"
5313         XSprePUSH; PUSHi(PTR2IV(RETVAL));
5314     }
5315     XSRETURN(1);
5316 }
5317
5318 XS(XS_SDL_NetUDPBind); /* prototype to pass -Wmissing-prototypes */
5319 XS(XS_SDL_NetUDPBind)
5320 {
5321     dXSARGS;
5322     if (items != 3)
5323         Perl_croak(aTHX_ "Usage: SDL::NetUDPBind(sock, channel, address)");
5324     {
5325         UDPsocket       sock = INT2PTR(UDPsocket,SvIV(ST(0)));
5326         int     channel = (int)SvIV(ST(1));
5327         IPaddress *     address = INT2PTR(IPaddress *,SvIV(ST(2)));
5328         int     RETVAL;
5329         dXSTARG;
5330 #line 2691 "SDL_perl.xs"
5331                 RETVAL = SDLNet_UDP_Bind(sock,channel,address);
5332 #line 5333 "SDL_perl.c"
5333         XSprePUSH; PUSHi((IV)RETVAL);
5334     }
5335     XSRETURN(1);
5336 }
5337
5338 XS(XS_SDL_NetUDPUnbind); /* prototype to pass -Wmissing-prototypes */
5339 XS(XS_SDL_NetUDPUnbind)
5340 {
5341     dXSARGS;
5342     if (items != 2)
5343         Perl_croak(aTHX_ "Usage: SDL::NetUDPUnbind(sock, channel)");
5344     {
5345         UDPsocket       sock = INT2PTR(UDPsocket,SvIV(ST(0)));
5346         int     channel = (int)SvIV(ST(1));
5347 #line 2700 "SDL_perl.xs"
5348                 SDLNet_UDP_Unbind(sock,channel);
5349 #line 5350 "SDL_perl.c"
5350     }
5351     XSRETURN_EMPTY;
5352 }
5353
5354 XS(XS_SDL_NetUDPGetPeerAddress); /* prototype to pass -Wmissing-prototypes */
5355 XS(XS_SDL_NetUDPGetPeerAddress)
5356 {
5357     dXSARGS;
5358     if (items != 2)
5359         Perl_croak(aTHX_ "Usage: SDL::NetUDPGetPeerAddress(sock, channel)");
5360     {
5361         UDPsocket       sock = INT2PTR(UDPsocket,SvIV(ST(0)));
5362         int     channel = (int)SvIV(ST(1));
5363         IPaddress *     RETVAL;
5364         dXSTARG;
5365 #line 2707 "SDL_perl.xs"
5366                 RETVAL = SDLNet_UDP_GetPeerAddress(sock,channel);
5367 #line 5368 "SDL_perl.c"
5368         XSprePUSH; PUSHi(PTR2IV(RETVAL));
5369     }
5370     XSRETURN(1);
5371 }
5372
5373 XS(XS_SDL_NetUDPSendV); /* prototype to pass -Wmissing-prototypes */
5374 XS(XS_SDL_NetUDPSendV)
5375 {
5376     dXSARGS;
5377     if (items != 3)
5378         Perl_croak(aTHX_ "Usage: SDL::NetUDPSendV(sock, packets, npackets)");
5379     {
5380         UDPsocket       sock = INT2PTR(UDPsocket,SvIV(ST(0)));
5381         UDPpacket **    packets = INT2PTR(UDPpacket **,SvIV(ST(1)));
5382         int     npackets = (int)SvIV(ST(2));
5383         int     RETVAL;
5384         dXSTARG;
5385 #line 2717 "SDL_perl.xs"
5386                 RETVAL = SDLNet_UDP_SendV(sock,packets,npackets);
5387 #line 5388 "SDL_perl.c"
5388         XSprePUSH; PUSHi((IV)RETVAL);
5389     }
5390     XSRETURN(1);
5391 }
5392
5393 XS(XS_SDL_NetUDPSend); /* prototype to pass -Wmissing-prototypes */
5394 XS(XS_SDL_NetUDPSend)
5395 {
5396     dXSARGS;
5397     if (items != 3)
5398         Perl_croak(aTHX_ "Usage: SDL::NetUDPSend(sock, channel, packet)");
5399     {
5400         UDPsocket       sock = INT2PTR(UDPsocket,SvIV(ST(0)));
5401         int     channel = (int)SvIV(ST(1));
5402         UDPpacket *     packet = INT2PTR(UDPpacket *,SvIV(ST(2)));
5403         int     RETVAL;
5404         dXSTARG;
5405 #line 2727 "SDL_perl.xs"
5406                 RETVAL = SDLNet_UDP_Send(sock,channel,packet);
5407 #line 5408 "SDL_perl.c"
5408         XSprePUSH; PUSHi((IV)RETVAL);
5409     }
5410     XSRETURN(1);
5411 }
5412
5413 XS(XS_SDL_NetUDPRecvV); /* prototype to pass -Wmissing-prototypes */
5414 XS(XS_SDL_NetUDPRecvV)
5415 {
5416     dXSARGS;
5417     if (items != 2)
5418         Perl_croak(aTHX_ "Usage: SDL::NetUDPRecvV(sock, packets)");
5419     {
5420         UDPsocket       sock = INT2PTR(UDPsocket,SvIV(ST(0)));
5421         UDPpacket **    packets = INT2PTR(UDPpacket **,SvIV(ST(1)));
5422         int     RETVAL;
5423         dXSTARG;
5424 #line 2736 "SDL_perl.xs"
5425                 RETVAL = SDLNet_UDP_RecvV(sock,packets);
5426 #line 5427 "SDL_perl.c"
5427         XSprePUSH; PUSHi((IV)RETVAL);
5428     }
5429     XSRETURN(1);
5430 }
5431
5432 XS(XS_SDL_NetUDPRecv); /* prototype to pass -Wmissing-prototypes */
5433 XS(XS_SDL_NetUDPRecv)
5434 {
5435     dXSARGS;
5436     if (items != 2)
5437         Perl_croak(aTHX_ "Usage: SDL::NetUDPRecv(sock, packet)");
5438     {
5439         UDPsocket       sock = INT2PTR(UDPsocket,SvIV(ST(0)));
5440         UDPpacket *     packet = INT2PTR(UDPpacket *,SvIV(ST(1)));
5441         int     RETVAL;
5442         dXSTARG;
5443 #line 2745 "SDL_perl.xs"
5444                 RETVAL = SDLNet_UDP_Recv(sock,packet);
5445 #line 5446 "SDL_perl.c"
5446         XSprePUSH; PUSHi((IV)RETVAL);
5447     }
5448     XSRETURN(1);
5449 }
5450
5451 XS(XS_SDL_NetUDPClose); /* prototype to pass -Wmissing-prototypes */
5452 XS(XS_SDL_NetUDPClose)
5453 {
5454     dXSARGS;
5455     if (items != 1)
5456         Perl_croak(aTHX_ "Usage: SDL::NetUDPClose(sock)");
5457     {
5458         UDPsocket       sock = INT2PTR(UDPsocket,SvIV(ST(0)));
5459 #line 2753 "SDL_perl.xs"
5460                 SDLNet_UDP_Close(sock);
5461 #line 5462 "SDL_perl.c"
5462     }
5463     XSRETURN_EMPTY;
5464 }
5465
5466 XS(XS_SDL_NetAllocSocketSet); /* prototype to pass -Wmissing-prototypes */
5467 XS(XS_SDL_NetAllocSocketSet)
5468 {
5469     dXSARGS;
5470     if (items != 1)
5471         Perl_croak(aTHX_ "Usage: SDL::NetAllocSocketSet(maxsockets)");
5472     {
5473         int     maxsockets = (int)SvIV(ST(0));
5474         SDLNet_SocketSet        RETVAL;
5475         dXSTARG;
5476 #line 2759 "SDL_perl.xs"
5477                 RETVAL = SDLNet_AllocSocketSet(maxsockets);
5478 #line 5479 "SDL_perl.c"
5479         XSprePUSH; PUSHi(PTR2IV(RETVAL));
5480     }
5481     XSRETURN(1);
5482 }
5483
5484 XS(XS_SDL_NetTCP_AddSocket); /* prototype to pass -Wmissing-prototypes */
5485 XS(XS_SDL_NetTCP_AddSocket)
5486 {
5487     dXSARGS;
5488     if (items != 2)
5489         Perl_croak(aTHX_ "Usage: SDL::NetTCP_AddSocket(set, sock)");
5490     {
5491         SDLNet_SocketSet        set = INT2PTR(SDLNet_SocketSet,SvIV(ST(0)));
5492         TCPsocket       sock = INT2PTR(TCPsocket,SvIV(ST(1)));
5493         int     RETVAL;
5494         dXSTARG;
5495 #line 2768 "SDL_perl.xs"
5496                 RETVAL = SDLNet_TCP_AddSocket(set,sock);
5497 #line 5498 "SDL_perl.c"
5498         XSprePUSH; PUSHi((IV)RETVAL);
5499     }
5500     XSRETURN(1);
5501 }
5502
5503 XS(XS_SDL_NetUDP_AddSocket); /* prototype to pass -Wmissing-prototypes */
5504 XS(XS_SDL_NetUDP_AddSocket)
5505 {
5506     dXSARGS;
5507     if (items != 2)
5508         Perl_croak(aTHX_ "Usage: SDL::NetUDP_AddSocket(set, sock)");
5509     {
5510         SDLNet_SocketSet        set = INT2PTR(SDLNet_SocketSet,SvIV(ST(0)));
5511         UDPsocket       sock = INT2PTR(UDPsocket,SvIV(ST(1)));
5512         int     RETVAL;
5513         dXSTARG;
5514 #line 2777 "SDL_perl.xs"
5515                 RETVAL = SDLNet_UDP_AddSocket(set,sock);
5516 #line 5517 "SDL_perl.c"
5517         XSprePUSH; PUSHi((IV)RETVAL);
5518     }
5519     XSRETURN(1);
5520 }
5521
5522 XS(XS_SDL_NetTCP_DelSocket); /* prototype to pass -Wmissing-prototypes */
5523 XS(XS_SDL_NetTCP_DelSocket)
5524 {
5525     dXSARGS;
5526     if (items != 2)
5527         Perl_croak(aTHX_ "Usage: SDL::NetTCP_DelSocket(set, sock)");
5528     {
5529         SDLNet_SocketSet        set = INT2PTR(SDLNet_SocketSet,SvIV(ST(0)));
5530         TCPsocket       sock = INT2PTR(TCPsocket,SvIV(ST(1)));
5531         int     RETVAL;
5532         dXSTARG;
5533 #line 2786 "SDL_perl.xs"
5534                 RETVAL = SDLNet_TCP_DelSocket(set,sock);
5535 #line 5536 "SDL_perl.c"
5536         XSprePUSH; PUSHi((IV)RETVAL);
5537     }
5538     XSRETURN(1);
5539 }
5540
5541 XS(XS_SDL_NetUDP_DelSocket); /* prototype to pass -Wmissing-prototypes */
5542 XS(XS_SDL_NetUDP_DelSocket)
5543 {
5544     dXSARGS;
5545     if (items != 2)
5546         Perl_croak(aTHX_ "Usage: SDL::NetUDP_DelSocket(set, sock)");
5547     {
5548         SDLNet_SocketSet        set = INT2PTR(SDLNet_SocketSet,SvIV(ST(0)));
5549         UDPsocket       sock = INT2PTR(UDPsocket,SvIV(ST(1)));
5550         int     RETVAL;
5551         dXSTARG;
5552 #line 2795 "SDL_perl.xs"
5553                 RETVAL = SDLNet_UDP_DelSocket(set,sock);
5554 #line 5555 "SDL_perl.c"
5555         XSprePUSH; PUSHi((IV)RETVAL);
5556     }
5557     XSRETURN(1);
5558 }
5559
5560 XS(XS_SDL_NetCheckSockets); /* prototype to pass -Wmissing-prototypes */
5561 XS(XS_SDL_NetCheckSockets)
5562 {
5563     dXSARGS;
5564     if (items != 2)
5565         Perl_croak(aTHX_ "Usage: SDL::NetCheckSockets(set, timeout)");
5566     {
5567         SDLNet_SocketSet        set = INT2PTR(SDLNet_SocketSet,SvIV(ST(0)));
5568         Uint32  timeout = (Uint32)SvUV(ST(1));
5569         int     RETVAL;
5570         dXSTARG;
5571 #line 2804 "SDL_perl.xs"
5572                 RETVAL = SDLNet_CheckSockets(set,timeout);
5573 #line 5574 "SDL_perl.c"
5574         XSprePUSH; PUSHi((IV)RETVAL);
5575     }
5576     XSRETURN(1);
5577 }
5578
5579 XS(XS_SDL_NetSocketReady); /* prototype to pass -Wmissing-prototypes */
5580 XS(XS_SDL_NetSocketReady)
5581 {
5582     dXSARGS;
5583     if (items != 1)
5584         Perl_croak(aTHX_ "Usage: SDL::NetSocketReady(sock)");
5585     {
5586         SDLNet_GenericSocket    sock = INT2PTR(SDLNet_GenericSocket,SvIV(ST(0)));
5587         int     RETVAL;
5588         dXSTARG;
5589 #line 2812 "SDL_perl.xs"
5590                 RETVAL = SDLNet_SocketReady(sock);
5591 #line 5592 "SDL_perl.c"
5592         XSprePUSH; PUSHi((IV)RETVAL);
5593     }
5594     XSRETURN(1);
5595 }
5596
5597 XS(XS_SDL_NetFreeSocketSet); /* prototype to pass -Wmissing-prototypes */
5598 XS(XS_SDL_NetFreeSocketSet)
5599 {
5600     dXSARGS;
5601     if (items != 1)
5602         Perl_croak(aTHX_ "Usage: SDL::NetFreeSocketSet(set)");
5603     {
5604         SDLNet_SocketSet        set = INT2PTR(SDLNet_SocketSet,SvIV(ST(0)));
5605 #line 2820 "SDL_perl.xs"
5606                 SDLNet_FreeSocketSet(set);
5607 #line 5608 "SDL_perl.c"
5608     }
5609     XSRETURN_EMPTY;
5610 }
5611
5612 XS(XS_SDL_NetWrite16); /* prototype to pass -Wmissing-prototypes */
5613 XS(XS_SDL_NetWrite16)
5614 {
5615     dXSARGS;
5616     if (items != 2)
5617         Perl_croak(aTHX_ "Usage: SDL::NetWrite16(value, area)");
5618     {
5619         Uint16  value = (Uint16)SvUV(ST(0));
5620         void *  area = INT2PTR(void *,SvIV(ST(1)));
5621 #line 2827 "SDL_perl.xs"
5622                 SDLNet_Write16(value,area);
5623 #line 5624 "SDL_perl.c"
5624     }
5625     XSRETURN_EMPTY;
5626 }
5627
5628 XS(XS_SDL_NetWrite32); /* prototype to pass -Wmissing-prototypes */
5629 XS(XS_SDL_NetWrite32)
5630 {
5631     dXSARGS;
5632     if (items != 2)
5633         Perl_croak(aTHX_ "Usage: SDL::NetWrite32(value, area)");
5634     {
5635         Uint32  value = (Uint32)SvUV(ST(0));
5636         void *  area = INT2PTR(void *,SvIV(ST(1)));
5637 #line 2834 "SDL_perl.xs"
5638                 SDLNet_Write32(value,area);
5639 #line 5640 "SDL_perl.c"
5640     }
5641     XSRETURN_EMPTY;
5642 }
5643
5644 XS(XS_SDL_NetRead16); /* prototype to pass -Wmissing-prototypes */
5645 XS(XS_SDL_NetRead16)
5646 {
5647     dXSARGS;
5648     if (items != 1)
5649         Perl_croak(aTHX_ "Usage: SDL::NetRead16(area)");
5650     {
5651         void *  area = INT2PTR(void *,SvIV(ST(0)));
5652         Uint16  RETVAL;
5653         dXSTARG;
5654 #line 2840 "SDL_perl.xs"
5655                 RETVAL = SDLNet_Read16(area);
5656 #line 5657 "SDL_perl.c"
5657         XSprePUSH; PUSHu((UV)RETVAL);
5658     }
5659     XSRETURN(1);
5660 }
5661
5662 XS(XS_SDL_NetRead32); /* prototype to pass -Wmissing-prototypes */
5663 XS(XS_SDL_NetRead32)
5664 {
5665     dXSARGS;
5666     if (items != 1)
5667         Perl_croak(aTHX_ "Usage: SDL::NetRead32(area)");
5668     {
5669         void *  area = INT2PTR(void *,SvIV(ST(0)));
5670         Uint32  RETVAL;
5671         dXSTARG;
5672 #line 2848 "SDL_perl.xs"
5673                 RETVAL = SDLNet_Read32(area);
5674 #line 5675 "SDL_perl.c"
5675         XSprePUSH; PUSHu((UV)RETVAL);
5676     }
5677     XSRETURN(1);
5678 }
5679
5680 #endif 
5681 #ifdef HAVE_SDL_TTF
5682 #define XSubPPtmpAAAD 1
5683
5684 XS(XS_SDL_TTFInit); /* prototype to pass -Wmissing-prototypes */
5685 XS(XS_SDL_TTFInit)
5686 {
5687     dXSARGS;
5688     if (items != 0)
5689         Perl_croak(aTHX_ "Usage: SDL::TTFInit()");
5690     {
5691         int     RETVAL;
5692         dXSTARG;
5693 #line 2859 "SDL_perl.xs"
5694                 RETVAL = TTF_Init();
5695 #line 5696 "SDL_perl.c"
5696         XSprePUSH; PUSHi((IV)RETVAL);
5697     }
5698     XSRETURN(1);
5699 }
5700
5701 XS(XS_SDL_TTFQuit); /* prototype to pass -Wmissing-prototypes */
5702 XS(XS_SDL_TTFQuit)
5703 {
5704     dXSARGS;
5705     if (items != 0)
5706         Perl_croak(aTHX_ "Usage: SDL::TTFQuit()");
5707     {
5708 #line 2866 "SDL_perl.xs"
5709                 TTF_Quit();
5710 #line 5711 "SDL_perl.c"
5711     }
5712     XSRETURN_EMPTY;
5713 }
5714
5715 XS(XS_SDL_TTFOpenFont); /* prototype to pass -Wmissing-prototypes */
5716 XS(XS_SDL_TTFOpenFont)
5717 {
5718     dXSARGS;
5719     if (items != 2)
5720         Perl_croak(aTHX_ "Usage: SDL::TTFOpenFont(file, ptsize)");
5721     {
5722         char *  file = (char *)SvPV_nolen(ST(0));
5723         int     ptsize = (int)SvIV(ST(1));
5724         TTF_Font *      RETVAL;
5725         dXSTARG;
5726 #line 2873 "SDL_perl.xs"
5727                 RETVAL = TTF_OpenFont(file,ptsize);
5728 #line 5729 "SDL_perl.c"
5729         XSprePUSH; PUSHi(PTR2IV(RETVAL));
5730     }
5731     XSRETURN(1);
5732 }
5733
5734 XS(XS_SDL_TTFGetFontStyle); /* prototype to pass -Wmissing-prototypes */
5735 XS(XS_SDL_TTFGetFontStyle)
5736 {
5737     dXSARGS;
5738     if (items != 1)
5739         Perl_croak(aTHX_ "Usage: SDL::TTFGetFontStyle(font)");
5740     {
5741         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
5742         int     RETVAL;
5743         dXSTARG;
5744 #line 2881 "SDL_perl.xs"
5745                 RETVAL = TTF_GetFontStyle(font);
5746 #line 5747 "SDL_perl.c"
5747         XSprePUSH; PUSHi((IV)RETVAL);
5748     }
5749     XSRETURN(1);
5750 }
5751
5752 XS(XS_SDL_TTFSetFontStyle); /* prototype to pass -Wmissing-prototypes */
5753 XS(XS_SDL_TTFSetFontStyle)
5754 {
5755     dXSARGS;
5756     if (items != 2)
5757         Perl_croak(aTHX_ "Usage: SDL::TTFSetFontStyle(font, style)");
5758     {
5759         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
5760         int     style = (int)SvIV(ST(1));
5761 #line 2890 "SDL_perl.xs"
5762                 TTF_SetFontStyle(font,style);
5763 #line 5764 "SDL_perl.c"
5764     }
5765     XSRETURN_EMPTY;
5766 }
5767
5768 XS(XS_SDL_TTFFontHeight); /* prototype to pass -Wmissing-prototypes */
5769 XS(XS_SDL_TTFFontHeight)
5770 {
5771     dXSARGS;
5772     if (items != 1)
5773         Perl_croak(aTHX_ "Usage: SDL::TTFFontHeight(font)");
5774     {
5775         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
5776         int     RETVAL;
5777         dXSTARG;
5778 #line 2896 "SDL_perl.xs"
5779                 RETVAL = TTF_FontHeight(font);
5780 #line 5781 "SDL_perl.c"
5781         XSprePUSH; PUSHi((IV)RETVAL);
5782     }
5783     XSRETURN(1);
5784 }
5785
5786 XS(XS_SDL_TTFFontAscent); /* prototype to pass -Wmissing-prototypes */
5787 XS(XS_SDL_TTFFontAscent)
5788 {
5789     dXSARGS;
5790     if (items != 1)
5791         Perl_croak(aTHX_ "Usage: SDL::TTFFontAscent(font)");
5792     {
5793         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
5794         int     RETVAL;
5795         dXSTARG;
5796 #line 2904 "SDL_perl.xs"
5797                 RETVAL = TTF_FontAscent(font);
5798 #line 5799 "SDL_perl.c"
5799         XSprePUSH; PUSHi((IV)RETVAL);
5800     }
5801     XSRETURN(1);
5802 }
5803
5804 XS(XS_SDL_TTFFontDescent); /* prototype to pass -Wmissing-prototypes */
5805 XS(XS_SDL_TTFFontDescent)
5806 {
5807     dXSARGS;
5808     if (items != 1)
5809         Perl_croak(aTHX_ "Usage: SDL::TTFFontDescent(font)");
5810     {
5811         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
5812         int     RETVAL;
5813         dXSTARG;
5814 #line 2912 "SDL_perl.xs"
5815                 RETVAL = TTF_FontDescent(font);
5816 #line 5817 "SDL_perl.c"
5817         XSprePUSH; PUSHi((IV)RETVAL);
5818     }
5819     XSRETURN(1);
5820 }
5821
5822 XS(XS_SDL_TTFFontLineSkip); /* prototype to pass -Wmissing-prototypes */
5823 XS(XS_SDL_TTFFontLineSkip)
5824 {
5825     dXSARGS;
5826     if (items != 1)
5827         Perl_croak(aTHX_ "Usage: SDL::TTFFontLineSkip(font)");
5828     {
5829         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
5830         int     RETVAL;
5831         dXSTARG;
5832 #line 2920 "SDL_perl.xs"
5833                 RETVAL = TTF_FontLineSkip(font);
5834 #line 5835 "SDL_perl.c"
5835         XSprePUSH; PUSHi((IV)RETVAL);
5836     }
5837     XSRETURN(1);
5838 }
5839
5840 XS(XS_SDL_TTFGlyphMetrics); /* prototype to pass -Wmissing-prototypes */
5841 XS(XS_SDL_TTFGlyphMetrics)
5842 {
5843     dXSARGS;
5844     if (items != 2)
5845         Perl_croak(aTHX_ "Usage: SDL::TTFGlyphMetrics(font, ch)");
5846     {
5847         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
5848         Uint16  ch = (Uint16)SvUV(ST(1));
5849         AV *    RETVAL;
5850 #line 2929 "SDL_perl.xs"
5851                 int minx, miny, maxx, maxy, advance;
5852                 RETVAL = newAV();
5853                 TTF_GlyphMetrics(font, ch, &minx, &miny, &maxx, &maxy, &advance);
5854                 av_push(RETVAL,newSViv(minx));
5855                 av_push(RETVAL,newSViv(miny));
5856                 av_push(RETVAL,newSViv(maxx));
5857                 av_push(RETVAL,newSViv(maxy));
5858                 av_push(RETVAL,newSViv(advance));
5859 #line 5860 "SDL_perl.c"
5860         ST(0) = newRV((SV*)RETVAL);
5861         sv_2mortal(ST(0));
5862     }
5863     XSRETURN(1);
5864 }
5865
5866 XS(XS_SDL_TTFSizeText); /* prototype to pass -Wmissing-prototypes */
5867 XS(XS_SDL_TTFSizeText)
5868 {
5869     dXSARGS;
5870     if (items != 2)
5871         Perl_croak(aTHX_ "Usage: SDL::TTFSizeText(font, text)");
5872     {
5873         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
5874         char *  text = (char *)SvPV_nolen(ST(1));
5875         AV *    RETVAL;
5876 #line 2945 "SDL_perl.xs"
5877                 int w,h;
5878                 RETVAL = newAV();
5879                 TTF_SizeText(font,text,&w,&h);
5880                 av_push(RETVAL,newSViv(w));
5881                 av_push(RETVAL,newSViv(h));
5882 #line 5883 "SDL_perl.c"
5883         ST(0) = newRV((SV*)RETVAL);
5884         sv_2mortal(ST(0));
5885     }
5886     XSRETURN(1);
5887 }
5888
5889 XS(XS_SDL_TTFSizeUTF8); /* prototype to pass -Wmissing-prototypes */
5890 XS(XS_SDL_TTFSizeUTF8)
5891 {
5892     dXSARGS;
5893     if (items != 2)
5894         Perl_croak(aTHX_ "Usage: SDL::TTFSizeUTF8(font, text)");
5895     {
5896         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
5897         char *  text = (char *)SvPV_nolen(ST(1));
5898         AV *    RETVAL;
5899 #line 2958 "SDL_perl.xs"
5900                 int w,h;
5901                 RETVAL = newAV();
5902                 TTF_SizeUTF8(font,text,&w,&h);
5903                 av_push(RETVAL,newSViv(w));
5904                 av_push(RETVAL,newSViv(h));
5905 #line 5906 "SDL_perl.c"
5906         ST(0) = newRV((SV*)RETVAL);
5907         sv_2mortal(ST(0));
5908     }
5909     XSRETURN(1);
5910 }
5911
5912 XS(XS_SDL_TTFSizeUNICODE); /* prototype to pass -Wmissing-prototypes */
5913 XS(XS_SDL_TTFSizeUNICODE)
5914 {
5915     dXSARGS;
5916     if (items != 2)
5917         Perl_croak(aTHX_ "Usage: SDL::TTFSizeUNICODE(font, text)");
5918     {
5919         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
5920         const Uint16 *  text = INT2PTR(const Uint16 *,SvIV(ST(1)));
5921         AV *    RETVAL;
5922 #line 2971 "SDL_perl.xs"
5923                 int w,h;
5924                 RETVAL = newAV();
5925                 TTF_SizeUNICODE(font,text,&w,&h);
5926                 av_push(RETVAL,newSViv(w));
5927                 av_push(RETVAL,newSViv(h));
5928 #line 5929 "SDL_perl.c"
5929         ST(0) = newRV((SV*)RETVAL);
5930         sv_2mortal(ST(0));
5931     }
5932     XSRETURN(1);
5933 }
5934
5935 XS(XS_SDL_TTFRenderTextSolid); /* prototype to pass -Wmissing-prototypes */
5936 XS(XS_SDL_TTFRenderTextSolid)
5937 {
5938     dXSARGS;
5939     if (items != 3)
5940         Perl_croak(aTHX_ "Usage: SDL::TTFRenderTextSolid(font, text, fg)");
5941     {
5942         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
5943         char *  text = (char *)SvPV_nolen(ST(1));
5944         SDL_Color *     fg = INT2PTR(SDL_Color *,SvIV(ST(2)));
5945         SDL_Surface *   RETVAL;
5946         dXSTARG;
5947 #line 2985 "SDL_perl.xs"
5948                 RETVAL = TTF_RenderText_Solid(font,text,*fg);
5949 #line 5950 "SDL_perl.c"
5950         XSprePUSH; PUSHi(PTR2IV(RETVAL));
5951     }
5952     XSRETURN(1);
5953 }
5954
5955 XS(XS_SDL_TTFRenderUTF8Solid); /* prototype to pass -Wmissing-prototypes */
5956 XS(XS_SDL_TTFRenderUTF8Solid)
5957 {
5958     dXSARGS;
5959     if (items != 3)
5960         Perl_croak(aTHX_ "Usage: SDL::TTFRenderUTF8Solid(font, text, fg)");
5961     {
5962         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
5963         char *  text = (char *)SvPV_nolen(ST(1));
5964         SDL_Color *     fg = INT2PTR(SDL_Color *,SvIV(ST(2)));
5965         SDL_Surface *   RETVAL;
5966         dXSTARG;
5967 #line 2995 "SDL_perl.xs"
5968                 RETVAL = TTF_RenderUTF8_Solid(font,text,*fg);
5969 #line 5970 "SDL_perl.c"
5970         XSprePUSH; PUSHi(PTR2IV(RETVAL));
5971     }
5972     XSRETURN(1);
5973 }
5974
5975 XS(XS_SDL_TTFRenderUNICODESolid); /* prototype to pass -Wmissing-prototypes */
5976 XS(XS_SDL_TTFRenderUNICODESolid)
5977 {
5978     dXSARGS;
5979     if (items != 3)
5980         Perl_croak(aTHX_ "Usage: SDL::TTFRenderUNICODESolid(font, text, fg)");
5981     {
5982         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
5983         const Uint16 *  text = INT2PTR(const Uint16 *,SvIV(ST(1)));
5984         SDL_Color *     fg = INT2PTR(SDL_Color *,SvIV(ST(2)));
5985         SDL_Surface *   RETVAL;
5986         dXSTARG;
5987 #line 3005 "SDL_perl.xs"
5988                 RETVAL = TTF_RenderUNICODE_Solid(font,text,*fg);
5989 #line 5990 "SDL_perl.c"
5990         XSprePUSH; PUSHi(PTR2IV(RETVAL));
5991     }
5992     XSRETURN(1);
5993 }
5994
5995 XS(XS_SDL_TTFRenderGlyphSolid); /* prototype to pass -Wmissing-prototypes */
5996 XS(XS_SDL_TTFRenderGlyphSolid)
5997 {
5998     dXSARGS;
5999     if (items != 3)
6000         Perl_croak(aTHX_ "Usage: SDL::TTFRenderGlyphSolid(font, ch, fg)");
6001     {
6002         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
6003         Uint16  ch = (Uint16)SvUV(ST(1));
6004         SDL_Color *     fg = INT2PTR(SDL_Color *,SvIV(ST(2)));
6005         SDL_Surface *   RETVAL;
6006         dXSTARG;
6007 #line 3015 "SDL_perl.xs"
6008                 RETVAL = TTF_RenderGlyph_Solid(font,ch,*fg);
6009 #line 6010 "SDL_perl.c"
6010         XSprePUSH; PUSHi(PTR2IV(RETVAL));
6011     }
6012     XSRETURN(1);
6013 }
6014
6015 XS(XS_SDL_TTFRenderTextShaded); /* prototype to pass -Wmissing-prototypes */
6016 XS(XS_SDL_TTFRenderTextShaded)
6017 {
6018     dXSARGS;
6019     if (items != 4)
6020         Perl_croak(aTHX_ "Usage: SDL::TTFRenderTextShaded(font, text, fg, bg)");
6021     {
6022         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
6023         char *  text = (char *)SvPV_nolen(ST(1));
6024         SDL_Color *     fg = INT2PTR(SDL_Color *,SvIV(ST(2)));
6025         SDL_Color *     bg = INT2PTR(SDL_Color *,SvIV(ST(3)));
6026         SDL_Surface *   RETVAL;
6027         dXSTARG;
6028 #line 3026 "SDL_perl.xs"
6029                 RETVAL = TTF_RenderText_Shaded(font,text,*fg,*bg);
6030 #line 6031 "SDL_perl.c"
6031         XSprePUSH; PUSHi(PTR2IV(RETVAL));
6032     }
6033     XSRETURN(1);
6034 }
6035
6036 XS(XS_SDL_TTFRenderUTF8Shaded); /* prototype to pass -Wmissing-prototypes */
6037 XS(XS_SDL_TTFRenderUTF8Shaded)
6038 {
6039     dXSARGS;
6040     if (items != 4)
6041         Perl_croak(aTHX_ "Usage: SDL::TTFRenderUTF8Shaded(font, text, fg, bg)");
6042     {
6043         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
6044         char *  text = (char *)SvPV_nolen(ST(1));
6045         SDL_Color *     fg = INT2PTR(SDL_Color *,SvIV(ST(2)));
6046         SDL_Color *     bg = INT2PTR(SDL_Color *,SvIV(ST(3)));
6047         SDL_Surface *   RETVAL;
6048         dXSTARG;
6049 #line 3037 "SDL_perl.xs"
6050                 RETVAL = TTF_RenderUTF8_Shaded(font,text,*fg,*bg);
6051 #line 6052 "SDL_perl.c"
6052         XSprePUSH; PUSHi(PTR2IV(RETVAL));
6053     }
6054     XSRETURN(1);
6055 }
6056
6057 XS(XS_SDL_TTFRenderUNICODEShaded); /* prototype to pass -Wmissing-prototypes */
6058 XS(XS_SDL_TTFRenderUNICODEShaded)
6059 {
6060     dXSARGS;
6061     if (items != 4)
6062         Perl_croak(aTHX_ "Usage: SDL::TTFRenderUNICODEShaded(font, text, fg, bg)");
6063     {
6064         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
6065         const Uint16 *  text = INT2PTR(const Uint16 *,SvIV(ST(1)));
6066         SDL_Color *     fg = INT2PTR(SDL_Color *,SvIV(ST(2)));
6067         SDL_Color *     bg = INT2PTR(SDL_Color *,SvIV(ST(3)));
6068         SDL_Surface *   RETVAL;
6069         dXSTARG;
6070 #line 3048 "SDL_perl.xs"
6071                 RETVAL = TTF_RenderUNICODE_Shaded(font,text,*fg,*bg);
6072 #line 6073 "SDL_perl.c"
6073         XSprePUSH; PUSHi(PTR2IV(RETVAL));
6074     }
6075     XSRETURN(1);
6076 }
6077
6078 XS(XS_SDL_TTFRenderGlyphShaded); /* prototype to pass -Wmissing-prototypes */
6079 XS(XS_SDL_TTFRenderGlyphShaded)
6080 {
6081     dXSARGS;
6082     if (items != 4)
6083         Perl_croak(aTHX_ "Usage: SDL::TTFRenderGlyphShaded(font, ch, fg, bg)");
6084     {
6085         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
6086         Uint16  ch = (Uint16)SvUV(ST(1));
6087         SDL_Color *     fg = INT2PTR(SDL_Color *,SvIV(ST(2)));
6088         SDL_Color *     bg = INT2PTR(SDL_Color *,SvIV(ST(3)));
6089         SDL_Surface *   RETVAL;
6090         dXSTARG;
6091 #line 3059 "SDL_perl.xs"
6092                 RETVAL = TTF_RenderGlyph_Shaded(font,ch,*fg,*bg);
6093 #line 6094 "SDL_perl.c"
6094         XSprePUSH; PUSHi(PTR2IV(RETVAL));
6095     }
6096     XSRETURN(1);
6097 }
6098
6099 XS(XS_SDL_TTFRenderTextBlended); /* prototype to pass -Wmissing-prototypes */
6100 XS(XS_SDL_TTFRenderTextBlended)
6101 {
6102     dXSARGS;
6103     if (items != 3)
6104         Perl_croak(aTHX_ "Usage: SDL::TTFRenderTextBlended(font, text, fg)");
6105     {
6106         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
6107         char *  text = (char *)SvPV_nolen(ST(1));
6108         SDL_Color *     fg = INT2PTR(SDL_Color *,SvIV(ST(2)));
6109         SDL_Surface *   RETVAL;
6110         dXSTARG;
6111 #line 3069 "SDL_perl.xs"
6112                 RETVAL = TTF_RenderText_Blended(font,text,*fg);
6113 #line 6114 "SDL_perl.c"
6114         XSprePUSH; PUSHi(PTR2IV(RETVAL));
6115     }
6116     XSRETURN(1);
6117 }
6118
6119 XS(XS_SDL_TTFRenderUTF8Blended); /* prototype to pass -Wmissing-prototypes */
6120 XS(XS_SDL_TTFRenderUTF8Blended)
6121 {
6122     dXSARGS;
6123     if (items != 3)
6124         Perl_croak(aTHX_ "Usage: SDL::TTFRenderUTF8Blended(font, text, fg)");
6125     {
6126         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
6127         char *  text = (char *)SvPV_nolen(ST(1));
6128         SDL_Color *     fg = INT2PTR(SDL_Color *,SvIV(ST(2)));
6129         SDL_Surface *   RETVAL;
6130         dXSTARG;
6131 #line 3079 "SDL_perl.xs"
6132                 RETVAL = TTF_RenderUTF8_Blended(font,text,*fg);
6133 #line 6134 "SDL_perl.c"
6134         XSprePUSH; PUSHi(PTR2IV(RETVAL));
6135     }
6136     XSRETURN(1);
6137 }
6138
6139 XS(XS_SDL_TTFRenderUNICODEBlended); /* prototype to pass -Wmissing-prototypes */
6140 XS(XS_SDL_TTFRenderUNICODEBlended)
6141 {
6142     dXSARGS;
6143     if (items != 3)
6144         Perl_croak(aTHX_ "Usage: SDL::TTFRenderUNICODEBlended(font, text, fg)");
6145     {
6146         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
6147         const Uint16 *  text = INT2PTR(const Uint16 *,SvIV(ST(1)));
6148         SDL_Color *     fg = INT2PTR(SDL_Color *,SvIV(ST(2)));
6149         SDL_Surface *   RETVAL;
6150         dXSTARG;
6151 #line 3089 "SDL_perl.xs"
6152                 RETVAL = TTF_RenderUNICODE_Blended(font,text,*fg);
6153 #line 6154 "SDL_perl.c"
6154         XSprePUSH; PUSHi(PTR2IV(RETVAL));
6155     }
6156     XSRETURN(1);
6157 }
6158
6159 XS(XS_SDL_TTFRenderGlyphBlended); /* prototype to pass -Wmissing-prototypes */
6160 XS(XS_SDL_TTFRenderGlyphBlended)
6161 {
6162     dXSARGS;
6163     if (items != 3)
6164         Perl_croak(aTHX_ "Usage: SDL::TTFRenderGlyphBlended(font, ch, fg)");
6165     {
6166         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
6167         Uint16  ch = (Uint16)SvUV(ST(1));
6168         SDL_Color *     fg = INT2PTR(SDL_Color *,SvIV(ST(2)));
6169         SDL_Surface *   RETVAL;
6170         dXSTARG;
6171 #line 3099 "SDL_perl.xs"
6172                 RETVAL = TTF_RenderGlyph_Blended(font,ch,*fg);
6173 #line 6174 "SDL_perl.c"
6174         XSprePUSH; PUSHi(PTR2IV(RETVAL));
6175     }
6176     XSRETURN(1);
6177 }
6178
6179 XS(XS_SDL_TTFCloseFont); /* prototype to pass -Wmissing-prototypes */
6180 XS(XS_SDL_TTFCloseFont)
6181 {
6182     dXSARGS;
6183     if (items != 1)
6184         Perl_croak(aTHX_ "Usage: SDL::TTFCloseFont(font)");
6185     {
6186         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
6187 #line 3107 "SDL_perl.xs"
6188                 TTF_CloseFont(font);
6189 #line 6190 "SDL_perl.c"
6190     }
6191     XSRETURN_EMPTY;
6192 }
6193
6194 XS(XS_SDL_TTFPutString); /* prototype to pass -Wmissing-prototypes */
6195 XS(XS_SDL_TTFPutString)
6196 {
6197     dXSARGS;
6198     if (items != 8)
6199         Perl_croak(aTHX_ "Usage: SDL::TTFPutString(font, mode, surface, x, y, fg, bg, text)");
6200     {
6201         TTF_Font *      font = INT2PTR(TTF_Font *,SvIV(ST(0)));
6202         int     mode = (int)SvIV(ST(1));
6203         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(2)));
6204         int     x = (int)SvIV(ST(3));
6205         int     y = (int)SvIV(ST(4));
6206         SDL_Color *     fg = INT2PTR(SDL_Color *,SvIV(ST(5)));
6207         SDL_Color *     bg = INT2PTR(SDL_Color *,SvIV(ST(6)));
6208         char *  text = (char *)SvPV_nolen(ST(7));
6209         SDL_Surface *   RETVAL;
6210         dXSTARG;
6211 #line 3120 "SDL_perl.xs"
6212                 SDL_Surface *img;
6213                 SDL_Rect dest;
6214                 int w,h;
6215                 dest.x = x;
6216                 dest.y = y;
6217                 RETVAL = NULL;
6218                 switch (mode) {
6219                         case TEXT_SOLID:
6220                                 img = TTF_RenderText_Solid(font,text,*fg);
6221                                 TTF_SizeText(font,text,&w,&h);
6222                                 dest.w = w;
6223                                 dest.h = h;
6224                                 break;
6225                         case TEXT_SHADED:
6226                                 img = TTF_RenderText_Shaded(font,text,*fg,*bg);
6227                                 TTF_SizeText(font,text,&w,&h);
6228                                 dest.w = w;
6229                                 dest.h = h;
6230                                 break;
6231                         case TEXT_BLENDED:
6232                                 img = TTF_RenderText_Blended(font,text,*fg);
6233                                 TTF_SizeText(font,text,&w,&h);
6234                                 dest.w = w;
6235                                 dest.h = h;
6236                                 break;
6237                         case UTF8_SOLID:
6238                                 img = TTF_RenderUTF8_Solid(font,text,*fg);
6239                                 TTF_SizeUTF8(font,text,&w,&h);
6240                                 dest.w = w;
6241                                 dest.h = h;
6242                                 break;
6243                         case UTF8_SHADED:
6244                                 img = TTF_RenderUTF8_Shaded(font,text,*fg,*bg);
6245                                 TTF_SizeUTF8(font,text,&w,&h);
6246                                 dest.w = w;
6247                                 dest.h = h;
6248                                 break;
6249                         case UTF8_BLENDED:
6250                                 img = TTF_RenderUTF8_Blended(font,text,*fg);
6251                                 TTF_SizeUTF8(font,text,&w,&h);
6252                                 dest.w = w;
6253                                 dest.h = h;
6254                                 break;
6255                         case UNICODE_SOLID:
6256                                 img = TTF_RenderUNICODE_Solid(font,(Uint16*)text,*fg);
6257                                 TTF_SizeUNICODE(font,(Uint16*)text,&w,&h);
6258                                 dest.w = w;
6259                                 dest.h = h;
6260                                 break;
6261                         case UNICODE_SHADED:
6262                                 img = TTF_RenderUNICODE_Shaded(font,(Uint16*)text,*fg,*bg);
6263                                 TTF_SizeUNICODE(font,(Uint16*)text,&w,&h);
6264                                 dest.w = w;
6265                                 dest.h = h;
6266                                 break;
6267                         case UNICODE_BLENDED:
6268                                 img = TTF_RenderUNICODE_Blended(font,(Uint16*)text,*fg);
6269                                 TTF_SizeUNICODE(font,(Uint16*)text,&w,&h);
6270                                 dest.w = w;
6271                                 dest.h = h;
6272                                 break;
6273                         default:
6274                                 img = TTF_RenderText_Shaded(font,text,*fg,*bg);
6275                                 TTF_SizeText(font,text,&w,&h);
6276                                 dest.w = w;
6277                                 dest.h = h;
6278                 }
6279                 if ( img && img->format && img->format->palette ) {
6280                         SDL_Color *c = &img->format->palette->colors[0];
6281                         Uint32 key = SDL_MapRGB( img->format, c->r, c->g, c->b );
6282                         SDL_SetColorKey(img,SDL_SRCCOLORKEY,key );
6283                         if (0 > SDL_BlitSurface(img,NULL,surface,&dest)) {
6284                                 SDL_FreeSurface(img);
6285                                 RETVAL = NULL;  
6286                         } else {
6287                                 RETVAL = img;
6288                         }
6289                 }
6290 #line 6291 "SDL_perl.c"
6291         XSprePUSH; PUSHi(PTR2IV(RETVAL));
6292     }
6293     XSRETURN(1);
6294 }
6295
6296 #endif
6297 XS(XS_SDL_CreateYUVOverlay); /* prototype to pass -Wmissing-prototypes */
6298 XS(XS_SDL_CreateYUVOverlay)
6299 {
6300     dXSARGS;
6301     if (items != 4)
6302         Perl_croak(aTHX_ "Usage: SDL::CreateYUVOverlay(width, height, format, display)");
6303     {
6304         int     width = (int)SvIV(ST(0));
6305         int     height = (int)SvIV(ST(1));
6306         Uint32  format = (Uint32)SvUV(ST(2));
6307         SDL_Surface *   display = INT2PTR(SDL_Surface *,SvIV(ST(3)));
6308         SDL_Overlay *   RETVAL;
6309         dXSTARG;
6310 #line 3210 "SDL_perl.xs"
6311                 RETVAL = SDL_CreateYUVOverlay ( width, height, format, display );
6312 #line 6313 "SDL_perl.c"
6313         XSprePUSH; PUSHi(PTR2IV(RETVAL));
6314     }
6315     XSRETURN(1);
6316 }
6317
6318 XS(XS_SDL_LockYUVOverlay); /* prototype to pass -Wmissing-prototypes */
6319 XS(XS_SDL_LockYUVOverlay)
6320 {
6321     dXSARGS;
6322     if (items != 1)
6323         Perl_croak(aTHX_ "Usage: SDL::LockYUVOverlay(overlay)");
6324     {
6325         SDL_Overlay *   overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0)));
6326         int     RETVAL;
6327         dXSTARG;
6328 #line 3218 "SDL_perl.xs"
6329                 RETVAL = SDL_LockYUVOverlay(overlay);
6330 #line 6331 "SDL_perl.c"
6331         XSprePUSH; PUSHi((IV)RETVAL);
6332     }
6333     XSRETURN(1);
6334 }
6335
6336 XS(XS_SDL_UnlockYUVOverlay); /* prototype to pass -Wmissing-prototypes */
6337 XS(XS_SDL_UnlockYUVOverlay)
6338 {
6339     dXSARGS;
6340     if (items != 1)
6341         Perl_croak(aTHX_ "Usage: SDL::UnlockYUVOverlay(overlay)");
6342     {
6343         SDL_Overlay *   overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0)));
6344 #line 3226 "SDL_perl.xs"
6345                 SDL_UnlockYUVOverlay(overlay);
6346 #line 6347 "SDL_perl.c"
6347     }
6348     XSRETURN_EMPTY;
6349 }
6350
6351 XS(XS_SDL_DisplayYUVOverlay); /* prototype to pass -Wmissing-prototypes */
6352 XS(XS_SDL_DisplayYUVOverlay)
6353 {
6354     dXSARGS;
6355     if (items != 2)
6356         Perl_croak(aTHX_ "Usage: SDL::DisplayYUVOverlay(overlay, dstrect)");
6357     {
6358         SDL_Overlay *   overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0)));
6359         SDL_Rect *      dstrect = INT2PTR(SDL_Rect *,SvIV(ST(1)));
6360         int     RETVAL;
6361         dXSTARG;
6362 #line 3233 "SDL_perl.xs"
6363                 RETVAL = SDL_DisplayYUVOverlay ( overlay, dstrect );
6364 #line 6365 "SDL_perl.c"
6365         XSprePUSH; PUSHi((IV)RETVAL);
6366     }
6367     XSRETURN(1);
6368 }
6369
6370 XS(XS_SDL_FreeYUVOverlay); /* prototype to pass -Wmissing-prototypes */
6371 XS(XS_SDL_FreeYUVOverlay)
6372 {
6373     dXSARGS;
6374     if (items != 1)
6375         Perl_croak(aTHX_ "Usage: SDL::FreeYUVOverlay(overlay)");
6376     {
6377         SDL_Overlay *   overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0)));
6378 #line 3241 "SDL_perl.xs"
6379                 SDL_FreeYUVOverlay ( overlay );
6380 #line 6381 "SDL_perl.c"
6381     }
6382     XSRETURN_EMPTY;
6383 }
6384
6385 XS(XS_SDL_OverlayFormat); /* prototype to pass -Wmissing-prototypes */
6386 XS(XS_SDL_OverlayFormat)
6387 {
6388     dXSARGS;
6389     if (items < 1)
6390         Perl_croak(aTHX_ "Usage: SDL::OverlayFormat(overlay, ...)");
6391     {
6392         SDL_Overlay *   overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0)));
6393         Uint32  RETVAL;
6394         dXSTARG;
6395 #line 3247 "SDL_perl.xs"
6396                 if ( items > 1 ) 
6397                         overlay->format = SvIV(ST(1));
6398                 RETVAL = overlay->format;
6399 #line 6400 "SDL_perl.c"
6400         XSprePUSH; PUSHu((UV)RETVAL);
6401     }
6402     XSRETURN(1);
6403 }
6404
6405 XS(XS_SDL_OverlayW); /* prototype to pass -Wmissing-prototypes */
6406 XS(XS_SDL_OverlayW)
6407 {
6408     dXSARGS;
6409     if (items < 1)
6410         Perl_croak(aTHX_ "Usage: SDL::OverlayW(overlay, ...)");
6411     {
6412         SDL_Overlay *   overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0)));
6413         int     RETVAL;
6414         dXSTARG;
6415 #line 3257 "SDL_perl.xs"
6416                 if ( items > 1 ) 
6417                         overlay->w = SvIV(ST(1));
6418                 RETVAL = overlay->w;
6419 #line 6420 "SDL_perl.c"
6420         XSprePUSH; PUSHi((IV)RETVAL);
6421     }
6422     XSRETURN(1);
6423 }
6424
6425 XS(XS_SDL_OverlayH); /* prototype to pass -Wmissing-prototypes */
6426 XS(XS_SDL_OverlayH)
6427 {
6428     dXSARGS;
6429     if (items < 1)
6430         Perl_croak(aTHX_ "Usage: SDL::OverlayH(overlay, ...)");
6431     {
6432         SDL_Overlay *   overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0)));
6433         int     RETVAL;
6434         dXSTARG;
6435 #line 3267 "SDL_perl.xs"
6436                 if ( items > 1 )
6437                         overlay->h = SvIV(ST(1));
6438                 RETVAL = overlay->h;
6439 #line 6440 "SDL_perl.c"
6440         XSprePUSH; PUSHi((IV)RETVAL);
6441     }
6442     XSRETURN(1);
6443 }
6444
6445 XS(XS_SDL_OverlayPlanes); /* prototype to pass -Wmissing-prototypes */
6446 XS(XS_SDL_OverlayPlanes)
6447 {
6448     dXSARGS;
6449     if (items < 1)
6450         Perl_croak(aTHX_ "Usage: SDL::OverlayPlanes(overlay, ...)");
6451     {
6452         SDL_Overlay *   overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0)));
6453         int     RETVAL;
6454         dXSTARG;
6455 #line 3277 "SDL_perl.xs"
6456                 if ( items > 1 )
6457                         overlay->planes = SvIV(ST(1));
6458                 RETVAL = overlay->planes;
6459 #line 6460 "SDL_perl.c"
6460         XSprePUSH; PUSHi((IV)RETVAL);
6461     }
6462     XSRETURN(1);
6463 }
6464
6465 XS(XS_SDL_OverlayHW); /* prototype to pass -Wmissing-prototypes */
6466 XS(XS_SDL_OverlayHW)
6467 {
6468     dXSARGS;
6469     if (items != 1)
6470         Perl_croak(aTHX_ "Usage: SDL::OverlayHW(overlay)");
6471     {
6472         SDL_Overlay *   overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0)));
6473         Uint32  RETVAL;
6474         dXSTARG;
6475 #line 3287 "SDL_perl.xs"
6476                 RETVAL = overlay->hw_overlay;
6477 #line 6478 "SDL_perl.c"
6478         XSprePUSH; PUSHu((UV)RETVAL);
6479     }
6480     XSRETURN(1);
6481 }
6482
6483 XS(XS_SDL_OverlayPitches); /* prototype to pass -Wmissing-prototypes */
6484 XS(XS_SDL_OverlayPitches)
6485 {
6486     dXSARGS;
6487     if (items != 1)
6488         Perl_croak(aTHX_ "Usage: SDL::OverlayPitches(overlay)");
6489     {
6490         SDL_Overlay *   overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0)));
6491         Uint16 *        RETVAL;
6492         dXSTARG;
6493 #line 3295 "SDL_perl.xs"
6494                 RETVAL = overlay->pitches;
6495 #line 6496 "SDL_perl.c"
6496         XSprePUSH; PUSHi(PTR2IV(RETVAL));
6497     }
6498     XSRETURN(1);
6499 }
6500
6501 XS(XS_SDL_OverlayPixels); /* prototype to pass -Wmissing-prototypes */
6502 XS(XS_SDL_OverlayPixels)
6503 {
6504     dXSARGS;
6505     if (items != 1)
6506         Perl_croak(aTHX_ "Usage: SDL::OverlayPixels(overlay)");
6507     {
6508         SDL_Overlay *   overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0)));
6509         Uint8 **        RETVAL;
6510         dXSTARG;
6511 #line 3303 "SDL_perl.xs"
6512                 RETVAL = overlay->pixels;
6513 #line 6514 "SDL_perl.c"
6514         XSprePUSH; PUSHi(PTR2IV(RETVAL));
6515     }
6516     XSRETURN(1);
6517 }
6518
6519 XS(XS_SDL_WMToggleFullScreen); /* prototype to pass -Wmissing-prototypes */
6520 XS(XS_SDL_WMToggleFullScreen)
6521 {
6522     dXSARGS;
6523     if (items != 1)
6524         Perl_croak(aTHX_ "Usage: SDL::WMToggleFullScreen(surface)");
6525     {
6526         SDL_Surface *   surface = INT2PTR(SDL_Surface *,SvIV(ST(0)));
6527         int     RETVAL;
6528         dXSTARG;
6529 #line 3311 "SDL_perl.xs"
6530                 RETVAL = SDL_WM_ToggleFullScreen(surface);
6531 #line 6532 "SDL_perl.c"
6532         XSprePUSH; PUSHi((IV)RETVAL);
6533     }
6534     XSRETURN(1);
6535 }
6536
6537 XS(XS_SDL_WMGrabInput); /* prototype to pass -Wmissing-prototypes */
6538 XS(XS_SDL_WMGrabInput)
6539 {
6540     dXSARGS;
6541     if (items != 1)
6542         Perl_croak(aTHX_ "Usage: SDL::WMGrabInput(mode)");
6543     {
6544         Uint32  mode = (Uint32)SvUV(ST(0));
6545         Uint32  RETVAL;
6546         dXSTARG;
6547 #line 3319 "SDL_perl.xs"
6548                 RETVAL = SDL_WM_GrabInput(mode);
6549 #line 6550 "SDL_perl.c"
6550         XSprePUSH; PUSHu((UV)RETVAL);
6551     }
6552     XSRETURN(1);
6553 }
6554
6555 XS(XS_SDL_WMIconifyWindow); /* prototype to pass -Wmissing-prototypes */
6556 XS(XS_SDL_WMIconifyWindow)
6557 {
6558     dXSARGS;
6559     if (items != 0)
6560         Perl_croak(aTHX_ "Usage: SDL::WMIconifyWindow()");
6561     {
6562         int     RETVAL;
6563         dXSTARG;
6564 #line 3326 "SDL_perl.xs"
6565                 RETVAL = SDL_WM_IconifyWindow();
6566 #line 6567 "SDL_perl.c"
6567         XSprePUSH; PUSHi((IV)RETVAL);
6568     }
6569     XSRETURN(1);
6570 }
6571
6572 XS(XS_SDL_ResizeEventW); /* prototype to pass -Wmissing-prototypes */
6573 XS(XS_SDL_ResizeEventW)
6574 {
6575     dXSARGS;
6576     if (items != 1)
6577         Perl_croak(aTHX_ "Usage: SDL::ResizeEventW(e)");
6578     {
6579         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
6580         int     RETVAL;
6581         dXSTARG;
6582 #line 3334 "SDL_perl.xs"
6583                 RETVAL = e->resize.w;
6584 #line 6585 "SDL_perl.c"
6585         XSprePUSH; PUSHi((IV)RETVAL);
6586     }
6587     XSRETURN(1);
6588 }
6589
6590 XS(XS_SDL_ResizeEventH); /* prototype to pass -Wmissing-prototypes */
6591 XS(XS_SDL_ResizeEventH)
6592 {
6593     dXSARGS;
6594     if (items != 1)
6595         Perl_croak(aTHX_ "Usage: SDL::ResizeEventH(e)");
6596     {
6597         SDL_Event *     e = INT2PTR(SDL_Event *,SvIV(ST(0)));
6598         int     RETVAL;
6599         dXSTARG;
6600 #line 3342 "SDL_perl.xs"
6601                 RETVAL = e->resize.h;
6602 #line 6603 "SDL_perl.c"
6603         XSprePUSH; PUSHi((IV)RETVAL);
6604     }
6605     XSRETURN(1);
6606 }
6607
6608 XS(XS_SDL_AudioDriverName); /* prototype to pass -Wmissing-prototypes */
6609 XS(XS_SDL_AudioDriverName)
6610 {
6611     dXSARGS;
6612     if (items != 0)
6613         Perl_croak(aTHX_ "Usage: SDL::AudioDriverName()");
6614     {
6615         char *  RETVAL;
6616         dXSTARG;
6617 #line 3349 "SDL_perl.xs"
6618                 char name[32];
6619                 RETVAL = SDL_AudioDriverName(name,32);
6620 #line 6621 "SDL_perl.c"
6621         sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
6622     }
6623     XSRETURN(1);
6624 }
6625
6626 XS(XS_SDL_GetKeyState); /* prototype to pass -Wmissing-prototypes */
6627 XS(XS_SDL_GetKeyState)
6628 {
6629     dXSARGS;
6630     if (items != 1)
6631         Perl_croak(aTHX_ "Usage: SDL::GetKeyState(k)");
6632     {
6633         SDLKey  k = (SDLKey)SvUV(ST(0));
6634         Uint32  RETVAL;
6635         dXSTARG;
6636 #line 3358 "SDL_perl.xs"
6637                 if (k >= SDLK_LAST) Perl_croak (aTHX_ "Key out of range");      
6638                 RETVAL = SDL_GetKeyState(NULL)[k];
6639 #line 6640 "SDL_perl.c"
6640         XSprePUSH; PUSHu((UV)RETVAL);
6641     }
6642     XSRETURN(1);
6643 }
6644
6645 #ifdef HAVE_SMPEG
6646 #define XSubPPtmpAAAE 1
6647
6648 XS(XS_SDL_NewSMPEGInfo); /* prototype to pass -Wmissing-prototypes */
6649 XS(XS_SDL_NewSMPEGInfo)
6650 {
6651     dXSARGS;
6652     if (items != 0)
6653         Perl_croak(aTHX_ "Usage: SDL::NewSMPEGInfo()");
6654     {
6655         SMPEG_Info *    RETVAL;
6656         dXSTARG;
6657 #line 3368 "SDL_perl.xs"
6658                 RETVAL = (SMPEG_Info *) safemalloc (sizeof(SMPEG_Info));
6659 #line 6660 "SDL_perl.c"
6660         XSprePUSH; PUSHi(PTR2IV(RETVAL));
6661     }
6662     XSRETURN(1);
6663 }
6664
6665 XS(XS_SDL_FreeSMPEGInfo); /* prototype to pass -Wmissing-prototypes */
6666 XS(XS_SDL_FreeSMPEGInfo)
6667 {
6668     dXSARGS;
6669     if (items != 1)
6670         Perl_croak(aTHX_ "Usage: SDL::FreeSMPEGInfo(info)");
6671     {
6672         SMPEG_Info *    info = INT2PTR(SMPEG_Info *,SvIV(ST(0)));
6673 #line 3376 "SDL_perl.xs"
6674                 safefree(info);
6675 #line 6676 "SDL_perl.c"
6676     }
6677     XSRETURN_EMPTY;
6678 }
6679
6680 XS(XS_SDL_SMPEGInfoHasAudio); /* prototype to pass -Wmissing-prototypes */
6681 XS(XS_SDL_SMPEGInfoHasAudio)
6682 {
6683     dXSARGS;
6684     if (items != 1)
6685         Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoHasAudio(info)");
6686     {
6687         SMPEG_Info*     info = INT2PTR(SMPEG_Info *,SvIV(ST(0)));
6688         int     RETVAL;
6689         dXSTARG;
6690 #line 3382 "SDL_perl.xs"
6691                 RETVAL = info->has_audio;
6692 #line 6693 "SDL_perl.c"
6693         XSprePUSH; PUSHi((IV)RETVAL);
6694     }
6695     XSRETURN(1);
6696 }
6697
6698 XS(XS_SDL_SMPEGInfoHasVideo); /* prototype to pass -Wmissing-prototypes */
6699 XS(XS_SDL_SMPEGInfoHasVideo)
6700 {
6701     dXSARGS;
6702     if (items != 1)
6703         Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoHasVideo(info)");
6704     {
6705         SMPEG_Info*     info = INT2PTR(SMPEG_Info *,SvIV(ST(0)));
6706         int     RETVAL;
6707         dXSTARG;
6708 #line 3390 "SDL_perl.xs"
6709                 RETVAL = info->has_video;
6710 #line 6711 "SDL_perl.c"
6711         XSprePUSH; PUSHi((IV)RETVAL);
6712     }
6713     XSRETURN(1);
6714 }
6715
6716 XS(XS_SDL_SMPEGInfoWidth); /* prototype to pass -Wmissing-prototypes */
6717 XS(XS_SDL_SMPEGInfoWidth)
6718 {
6719     dXSARGS;
6720     if (items != 1)
6721         Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoWidth(info)");
6722     {
6723         SMPEG_Info*     info = INT2PTR(SMPEG_Info *,SvIV(ST(0)));
6724         int     RETVAL;
6725         dXSTARG;
6726 #line 3398 "SDL_perl.xs"
6727                 RETVAL = info->width;
6728 #line 6729 "SDL_perl.c"
6729         XSprePUSH; PUSHi((IV)RETVAL);
6730     }
6731     XSRETURN(1);
6732 }
6733
6734 XS(XS_SDL_SMPEGInfoHeight); /* prototype to pass -Wmissing-prototypes */
6735 XS(XS_SDL_SMPEGInfoHeight)
6736 {
6737     dXSARGS;
6738     if (items != 1)
6739         Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoHeight(info)");
6740     {
6741         SMPEG_Info*     info = INT2PTR(SMPEG_Info *,SvIV(ST(0)));
6742         int     RETVAL;
6743         dXSTARG;
6744 #line 3406 "SDL_perl.xs"
6745                 RETVAL = info->height;
6746 #line 6747 "SDL_perl.c"
6747         XSprePUSH; PUSHi((IV)RETVAL);
6748     }
6749     XSRETURN(1);
6750 }
6751
6752 XS(XS_SDL_SMPEGInfoCurrentFrame); /* prototype to pass -Wmissing-prototypes */
6753 XS(XS_SDL_SMPEGInfoCurrentFrame)
6754 {
6755     dXSARGS;
6756     if (items != 1)
6757         Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoCurrentFrame(info)");
6758     {
6759         SMPEG_Info*     info = INT2PTR(SMPEG_Info *,SvIV(ST(0)));
6760         int     RETVAL;
6761         dXSTARG;
6762 #line 3414 "SDL_perl.xs"
6763                 RETVAL = info->current_frame;
6764 #line 6765 "SDL_perl.c"
6765         XSprePUSH; PUSHi((IV)RETVAL);
6766     }
6767     XSRETURN(1);
6768 }
6769
6770 XS(XS_SDL_SMPEGInfoCurrentFPS); /* prototype to pass -Wmissing-prototypes */
6771 XS(XS_SDL_SMPEGInfoCurrentFPS)
6772 {
6773     dXSARGS;
6774     if (items != 1)
6775         Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoCurrentFPS(info)");
6776     {
6777         SMPEG_Info*     info = INT2PTR(SMPEG_Info *,SvIV(ST(0)));
6778         double  RETVAL;
6779         dXSTARG;
6780 #line 3422 "SDL_perl.xs"
6781                 RETVAL = info->current_fps;
6782 #line 6783 "SDL_perl.c"
6783         XSprePUSH; PUSHn((double)RETVAL);
6784     }
6785     XSRETURN(1);
6786 }
6787
6788 XS(XS_SDL_SMPEGInfoCurrentAudioFrame); /* prototype to pass -Wmissing-prototypes */
6789 XS(XS_SDL_SMPEGInfoCurrentAudioFrame)
6790 {
6791     dXSARGS;
6792     if (items != 1)
6793         Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoCurrentAudioFrame(info)");
6794     {
6795         SMPEG_Info*     info = INT2PTR(SMPEG_Info *,SvIV(ST(0)));
6796         int     RETVAL;
6797         dXSTARG;
6798 #line 3430 "SDL_perl.xs"
6799                 RETVAL = info->audio_current_frame;
6800 #line 6801 "SDL_perl.c"
6801         XSprePUSH; PUSHi((IV)RETVAL);
6802     }
6803     XSRETURN(1);
6804 }
6805
6806 XS(XS_SDL_SMPEGInfoCurrentOffset); /* prototype to pass -Wmissing-prototypes */
6807 XS(XS_SDL_SMPEGInfoCurrentOffset)
6808 {
6809     dXSARGS;
6810     if (items != 1)
6811         Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoCurrentOffset(info)");
6812     {
6813         SMPEG_Info*     info = INT2PTR(SMPEG_Info *,SvIV(ST(0)));
6814         int     RETVAL;
6815         dXSTARG;
6816 #line 3438 "SDL_perl.xs"
6817                 RETVAL = info->current_offset;
6818 #line 6819 "SDL_perl.c"
6819         XSprePUSH; PUSHi((IV)RETVAL);
6820     }
6821     XSRETURN(1);
6822 }
6823
6824 XS(XS_SDL_SMPEGInfoTotalSize); /* prototype to pass -Wmissing-prototypes */
6825 XS(XS_SDL_SMPEGInfoTotalSize)
6826 {
6827     dXSARGS;
6828     if (items != 1)
6829         Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoTotalSize(info)");
6830     {
6831         SMPEG_Info*     info = INT2PTR(SMPEG_Info *,SvIV(ST(0)));
6832         int     RETVAL;
6833         dXSTARG;
6834 #line 3446 "SDL_perl.xs"
6835                 RETVAL = info->total_size;
6836 #line 6837 "SDL_perl.c"
6837         XSprePUSH; PUSHi((IV)RETVAL);
6838     }
6839     XSRETURN(1);
6840 }
6841
6842 XS(XS_SDL_SMPEGInfoCurrentTime); /* prototype to pass -Wmissing-prototypes */
6843 XS(XS_SDL_SMPEGInfoCurrentTime)
6844 {
6845     dXSARGS;
6846     if (items != 1)
6847         Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoCurrentTime(info)");
6848     {
6849         SMPEG_Info*     info = INT2PTR(SMPEG_Info *,SvIV(ST(0)));
6850         double  RETVAL;
6851         dXSTARG;
6852 #line 3454 "SDL_perl.xs"
6853                 RETVAL = info->current_time;
6854 #line 6855 "SDL_perl.c"
6855         XSprePUSH; PUSHn((double)RETVAL);
6856     }
6857     XSRETURN(1);
6858 }
6859
6860 XS(XS_SDL_SMPEGInfoTotalTime); /* prototype to pass -Wmissing-prototypes */
6861 XS(XS_SDL_SMPEGInfoTotalTime)
6862 {
6863     dXSARGS;
6864     if (items != 1)
6865         Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoTotalTime(info)");
6866     {
6867         SMPEG_Info*     info = INT2PTR(SMPEG_Info *,SvIV(ST(0)));
6868         double  RETVAL;
6869         dXSTARG;
6870 #line 3462 "SDL_perl.xs"
6871                 RETVAL = info->total_time;
6872 #line 6873 "SDL_perl.c"
6873         XSprePUSH; PUSHn((double)RETVAL);
6874     }
6875     XSRETURN(1);
6876 }
6877
6878 XS(XS_SDL_SMPEGError); /* prototype to pass -Wmissing-prototypes */
6879 XS(XS_SDL_SMPEGError)
6880 {
6881     dXSARGS;
6882     if (items != 1)
6883         Perl_croak(aTHX_ "Usage: SDL::SMPEGError(mpeg)");
6884     {
6885         SMPEG*  mpeg = INT2PTR(SMPEG *,SvIV(ST(0)));
6886         char *  RETVAL;
6887         dXSTARG;
6888 #line 3470 "SDL_perl.xs"
6889                 RETVAL = SMPEG_error(mpeg);
6890 #line 6891 "SDL_perl.c"
6891         sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
6892     }
6893     XSRETURN(1);
6894 }
6895
6896 XS(XS_SDL_NewSMPEG); /* prototype to pass -Wmissing-prototypes */
6897 XS(XS_SDL_NewSMPEG)
6898 {
6899     dXSARGS;
6900     if (items != 3)
6901         Perl_croak(aTHX_ "Usage: SDL::NewSMPEG(filename, info, use_audio)");
6902     {
6903         char*   filename = (char *)SvPV_nolen(ST(0));
6904         SMPEG_Info*     info = INT2PTR(SMPEG_Info *,SvIV(ST(1)));
6905         int     use_audio = (int)SvIV(ST(2));
6906         SMPEG * RETVAL;
6907         dXSTARG;
6908 #line 3480 "SDL_perl.xs"
6909 #ifdef HAVE_SDL_MIXER
6910                 RETVAL = SMPEG_new(filename,info,0);
6911 #else
6912                 RETVAL = SMPEG_new(filename,info,use_audio);
6913 #endif
6914 #line 6915 "SDL_perl.c"
6915         XSprePUSH; PUSHi(PTR2IV(RETVAL));
6916     }
6917     XSRETURN(1);
6918 }
6919
6920 XS(XS_SDL_FreeSMPEG); /* prototype to pass -Wmissing-prototypes */
6921 XS(XS_SDL_FreeSMPEG)
6922 {
6923     dXSARGS;
6924     if (items != 1)
6925         Perl_croak(aTHX_ "Usage: SDL::FreeSMPEG(mpeg)");
6926     {
6927         SMPEG*  mpeg = INT2PTR(SMPEG *,SvIV(ST(0)));
6928 #line 3492 "SDL_perl.xs"
6929                 SMPEG_delete(mpeg);
6930 #line 6931 "SDL_perl.c"
6931     }
6932     XSRETURN_EMPTY;
6933 }
6934
6935 XS(XS_SDL_SMPEGEnableAudio); /* prototype to pass -Wmissing-prototypes */
6936 XS(XS_SDL_SMPEGEnableAudio)
6937 {
6938     dXSARGS;
6939     if (items != 2)
6940         Perl_croak(aTHX_ "Usage: SDL::SMPEGEnableAudio(mpeg, flag)");
6941     {
6942         SMPEG*  mpeg = INT2PTR(SMPEG *,SvIV(ST(0)));
6943         int     flag = (int)SvIV(ST(1));
6944 #line 3499 "SDL_perl.xs"
6945                 SMPEG_enableaudio(mpeg,flag);
6946 #ifdef HAVE_SDL_MIXER
6947                 sdl_perl_use_smpeg_audio = flag;
6948 #endif
6949 #line 6950 "SDL_perl.c"
6950     }
6951     XSRETURN_EMPTY;
6952 }
6953
6954 XS(XS_SDL_SMPEGEnableVideo); /* prototype to pass -Wmissing-prototypes */
6955 XS(XS_SDL_SMPEGEnableVideo)
6956 {
6957     dXSARGS;
6958     if (items != 2)
6959         Perl_croak(aTHX_ "Usage: SDL::SMPEGEnableVideo(mpeg, flag)");
6960     {
6961         SMPEG*  mpeg = INT2PTR(SMPEG *,SvIV(ST(0)));
6962         int     flag = (int)SvIV(ST(1));
6963 #line 3509 "SDL_perl.xs"
6964                 SMPEG_enablevideo(mpeg,flag);
6965 #line 6966 "SDL_perl.c"
6966     }
6967     XSRETURN_EMPTY;
6968 }
6969
6970 XS(XS_SDL_SMPEGSetVolume); /* prototype to pass -Wmissing-prototypes */
6971 XS(XS_SDL_SMPEGSetVolume)
6972 {
6973     dXSARGS;
6974     if (items != 2)
6975         Perl_croak(aTHX_ "Usage: SDL::SMPEGSetVolume(mpeg, volume)");
6976     {
6977         SMPEG*  mpeg = INT2PTR(SMPEG *,SvIV(ST(0)));
6978         int     volume = (int)SvIV(ST(1));
6979 #line 3516 "SDL_perl.xs"
6980                 SMPEG_setvolume(mpeg,volume);
6981 #line 6982 "SDL_perl.c"
6982     }
6983     XSRETURN_EMPTY;
6984 }
6985
6986 XS(XS_SDL_SMPEGSetDisplay); /* prototype to pass -Wmissing-prototypes */
6987 XS(XS_SDL_SMPEGSetDisplay)
6988 {
6989     dXSARGS;
6990     if (items != 3)
6991         Perl_croak(aTHX_ "Usage: SDL::SMPEGSetDisplay(mpeg, dest, surfLock)");
6992     {
6993         SMPEG*  mpeg = INT2PTR(SMPEG *,SvIV(ST(0)));
6994         SDL_Surface*    dest = INT2PTR(SDL_Surface *,SvIV(ST(1)));
6995         SDL_mutex*      surfLock = INT2PTR(SDL_mutex *,SvIV(ST(2)));
6996 #line 3524 "SDL_perl.xs"
6997                 SMPEG_setdisplay(mpeg,dest,surfLock,NULL);
6998 #line 6999 "SDL_perl.c"
6999     }
7000     XSRETURN_EMPTY;
7001 }
7002
7003 XS(XS_SDL_SMPEGScaleXY); /* prototype to pass -Wmissing-prototypes */
7004 XS(XS_SDL_SMPEGScaleXY)
7005 {
7006     dXSARGS;
7007     if (items != 3)
7008         Perl_croak(aTHX_ "Usage: SDL::SMPEGScaleXY(mpeg, w, h)");
7009     {
7010         SMPEG*  mpeg = INT2PTR(SMPEG *,SvIV(ST(0)));
7011         int     w = (int)SvIV(ST(1));
7012         int     h = (int)SvIV(ST(2));
7013 #line 3532 "SDL_perl.xs"
7014                 SMPEG_scaleXY(mpeg,w,h);
7015 #line 7016 "SDL_perl.c"
7016     }
7017     XSRETURN_EMPTY;
7018 }
7019
7020 XS(XS_SDL_SMPEGScale); /* prototype to pass -Wmissing-prototypes */
7021 XS(XS_SDL_SMPEGScale)
7022 {
7023     dXSARGS;
7024     if (items != 2)
7025         Perl_croak(aTHX_ "Usage: SDL::SMPEGScale(mpeg, scale)");
7026     {
7027         SMPEG*  mpeg = INT2PTR(SMPEG *,SvIV(ST(0)));
7028         int     scale = (int)SvIV(ST(1));
7029 #line 3539 "SDL_perl.xs"
7030                 SMPEG_scale(mpeg,scale);
7031 #line 7032 "SDL_perl.c"
7032     }
7033     XSRETURN_EMPTY;
7034 }
7035
7036 XS(XS_SDL_SMPEGPlay); /* prototype to pass -Wmissing-prototypes */
7037 XS(XS_SDL_SMPEGPlay)
7038 {
7039     dXSARGS;
7040     if (items != 1)
7041         Perl_croak(aTHX_ "Usage: SDL::SMPEGPlay(mpeg)");
7042     {
7043         SMPEG*  mpeg = INT2PTR(SMPEG *,SvIV(ST(0)));
7044 #line 3545 "SDL_perl.xs"
7045                 SDL_AudioSpec audiofmt;
7046                 Uint16 format;
7047                 int freq, channels;
7048 #ifdef HAVE_SDL_MIXER
7049                 if  (sdl_perl_use_smpeg_audio ) {
7050                         SMPEG_enableaudio(mpeg, 0);
7051                         Mix_QuerySpec(&freq, &format, &channels);
7052                         audiofmt.format = format;
7053                         audiofmt.freq = freq;
7054                         audiofmt.channels = channels;
7055                         SMPEG_actualSpec(mpeg, &audiofmt);
7056                         Mix_HookMusic(SMPEG_playAudioSDL, mpeg);
7057                         SMPEG_enableaudio(mpeg, 1);
7058                 }
7059 #endif
7060                 SMPEG_play(mpeg);
7061 #line 7062 "SDL_perl.c"
7062     }
7063     XSRETURN_EMPTY;
7064 }
7065
7066 XS(XS_SDL_SMPEGStatus); /* prototype to pass -Wmissing-prototypes */
7067 XS(XS_SDL_SMPEGStatus)
7068 {
7069     dXSARGS;
7070     if (items != 1)
7071         Perl_croak(aTHX_ "Usage: SDL::SMPEGStatus(mpeg)");
7072     {
7073         SMPEG*  mpeg = INT2PTR(SMPEG *,SvIV(ST(0)));
7074         SMPEGstatus     RETVAL;
7075         dXSTARG;
7076 #line 3566 "SDL_perl.xs"
7077                 RETVAL = SMPEG_status(mpeg);
7078 #line 7079 "SDL_perl.c"
7079         XSprePUSH; PUSHi((IV)RETVAL);
7080     }
7081     XSRETURN(1);
7082 }
7083
7084 XS(XS_SDL_SMPEGPause); /* prototype to pass -Wmissing-prototypes */
7085 XS(XS_SDL_SMPEGPause)
7086 {
7087     dXSARGS;
7088     if (items != 1)
7089         Perl_croak(aTHX_ "Usage: SDL::SMPEGPause(mpeg)");
7090     {
7091         SMPEG*  mpeg = INT2PTR(SMPEG *,SvIV(ST(0)));
7092 #line 3574 "SDL_perl.xs"
7093                 SMPEG_pause(mpeg);
7094 #line 7095 "SDL_perl.c"
7095     }
7096     XSRETURN_EMPTY;
7097 }
7098
7099 XS(XS_SDL_SMPEGLoop); /* prototype to pass -Wmissing-prototypes */
7100 XS(XS_SDL_SMPEGLoop)
7101 {
7102     dXSARGS;
7103     if (items != 2)
7104         Perl_croak(aTHX_ "Usage: SDL::SMPEGLoop(mpeg, repeat)");
7105     {
7106         SMPEG*  mpeg = INT2PTR(SMPEG *,SvIV(ST(0)));
7107         int     repeat = (int)SvIV(ST(1));
7108 #line 3581 "SDL_perl.xs"
7109                 SMPEG_loop(mpeg,repeat);
7110 #line 7111 "SDL_perl.c"
7111     }
7112     XSRETURN_EMPTY;
7113 }
7114
7115 XS(XS_SDL_SMPEGStop); /* prototype to pass -Wmissing-prototypes */
7116 XS(XS_SDL_SMPEGStop)
7117 {
7118     dXSARGS;
7119     if (items != 1)
7120         Perl_croak(aTHX_ "Usage: SDL::SMPEGStop(mpeg)");
7121     {
7122         SMPEG*  mpeg = INT2PTR(SMPEG *,SvIV(ST(0)));
7123 #line 3587 "SDL_perl.xs"
7124                 SMPEG_stop(mpeg);
7125 #ifdef HAVE_SDL_MIXER
7126                 Mix_HookMusic(NULL, NULL);
7127 #endif
7128 #line 7129 "SDL_perl.c"
7129     }
7130     XSRETURN_EMPTY;
7131 }
7132
7133 XS(XS_SDL_SMPEGRewind); /* prototype to pass -Wmissing-prototypes */
7134 XS(XS_SDL_SMPEGRewind)
7135 {
7136     dXSARGS;
7137     if (items != 1)
7138         Perl_croak(aTHX_ "Usage: SDL::SMPEGRewind(mpeg)");
7139     {
7140         SMPEG*  mpeg = INT2PTR(SMPEG *,SvIV(ST(0)));
7141 #line 3596 "SDL_perl.xs"
7142                 SMPEG_rewind(mpeg);
7143 #line 7144 "SDL_perl.c"
7144     }
7145     XSRETURN_EMPTY;
7146 }
7147
7148 XS(XS_SDL_SMPEGSeek); /* prototype to pass -Wmissing-prototypes */
7149 XS(XS_SDL_SMPEGSeek)
7150 {
7151     dXSARGS;
7152     if (items != 2)
7153         Perl_croak(aTHX_ "Usage: SDL::SMPEGSeek(mpeg, bytes)");
7154     {
7155         SMPEG*  mpeg = INT2PTR(SMPEG *,SvIV(ST(0)));
7156         int     bytes = (int)SvIV(ST(1));
7157 #line 3603 "SDL_perl.xs"
7158                 SMPEG_seek(mpeg,bytes);
7159 #line 7160 "SDL_perl.c"
7160     }
7161     XSRETURN_EMPTY;
7162 }
7163
7164 XS(XS_SDL_SMPEGSkip); /* prototype to pass -Wmissing-prototypes */
7165 XS(XS_SDL_SMPEGSkip)
7166 {
7167     dXSARGS;
7168     if (items != 2)
7169         Perl_croak(aTHX_ "Usage: SDL::SMPEGSkip(mpeg, seconds)");
7170     {
7171         SMPEG*  mpeg = INT2PTR(SMPEG *,SvIV(ST(0)));
7172         float   seconds = (float)SvNV(ST(1));
7173 #line 3610 "SDL_perl.xs"
7174                 SMPEG_skip(mpeg,seconds);
7175 #line 7176 "SDL_perl.c"
7176     }
7177     XSRETURN_EMPTY;
7178 }
7179
7180 XS(XS_SDL_SMPEGSetDisplayRegion); /* prototype to pass -Wmissing-prototypes */
7181 XS(XS_SDL_SMPEGSetDisplayRegion)
7182 {
7183     dXSARGS;
7184     if (items != 2)
7185         Perl_croak(aTHX_ "Usage: SDL::SMPEGSetDisplayRegion(mpeg, rect)");
7186     {
7187         SMPEG*  mpeg = INT2PTR(SMPEG *,SvIV(ST(0)));
7188         SDL_Rect*       rect = INT2PTR(SDL_Rect *,SvIV(ST(1)));
7189 #line 3617 "SDL_perl.xs"
7190                 SMPEG_setdisplayregion(mpeg,rect->x,rect->y,rect->w,rect->h);
7191 #line 7192 "SDL_perl.c"
7192     }
7193     XSRETURN_EMPTY;
7194 }
7195
7196 XS(XS_SDL_SMPEGRenderFrame); /* prototype to pass -Wmissing-prototypes */
7197 XS(XS_SDL_SMPEGRenderFrame)
7198 {
7199     dXSARGS;
7200     if (items != 2)
7201         Perl_croak(aTHX_ "Usage: SDL::SMPEGRenderFrame(mpeg, frame)");
7202     {
7203         SMPEG*  mpeg = INT2PTR(SMPEG *,SvIV(ST(0)));
7204         int     frame = (int)SvIV(ST(1));
7205 #line 3624 "SDL_perl.xs"
7206                 SMPEG_renderFrame(mpeg,frame);
7207 #line 7208 "SDL_perl.c"
7208     }
7209     XSRETURN_EMPTY;
7210 }
7211
7212 XS(XS_SDL_SMPEGGetInfo); /* prototype to pass -Wmissing-prototypes */
7213 XS(XS_SDL_SMPEGGetInfo)
7214 {
7215     dXSARGS;
7216     if (items != 1)
7217         Perl_croak(aTHX_ "Usage: SDL::SMPEGGetInfo(mpeg)");
7218     {
7219         SMPEG*  mpeg = INT2PTR(SMPEG *,SvIV(ST(0)));
7220         SMPEG_Info *    RETVAL;
7221         dXSTARG;
7222 #line 3630 "SDL_perl.xs"
7223                 RETVAL = (SMPEG_Info *) safemalloc (sizeof(SMPEG_Info));
7224                 SMPEG_getinfo(mpeg,RETVAL);
7225 #line 7226 "SDL_perl.c"
7226         XSprePUSH; PUSHi(PTR2IV(RETVAL));
7227     }
7228     XSRETURN(1);
7229 }
7230
7231 #endif
7232 #ifdef HAVE_SDL_GFX
7233 #define XSubPPtmpAAAF 1
7234
7235 XS(XS_SDL_GFXRotoZoom); /* prototype to pass -Wmissing-prototypes */
7236 XS(XS_SDL_GFXRotoZoom)
7237 {
7238     dXSARGS;
7239     if (items != 4)
7240         Perl_croak(aTHX_ "Usage: SDL::GFXRotoZoom(src, angle, zoom, smooth)");
7241     {
7242         SDL_Surface *   src = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7243         double  angle = (double)SvNV(ST(1));
7244         double  zoom = (double)SvNV(ST(2));
7245         int     smooth = (int)SvIV(ST(3));
7246         SDL_Surface *   RETVAL;
7247         dXSTARG;
7248 #line 3647 "SDL_perl.xs"
7249                 RETVAL = rotozoomSurface( src, angle, zoom, smooth);
7250 #line 7251 "SDL_perl.c"
7251         XSprePUSH; PUSHi(PTR2IV(RETVAL));
7252     }
7253     XSRETURN(1);
7254 }
7255
7256 XS(XS_SDL_GFXZoom); /* prototype to pass -Wmissing-prototypes */
7257 XS(XS_SDL_GFXZoom)
7258 {
7259     dXSARGS;
7260     if (items != 4)
7261         Perl_croak(aTHX_ "Usage: SDL::GFXZoom(src, zoomx, zoomy, smooth)");
7262     {
7263         SDL_Surface *   src = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7264         double  zoomx = (double)SvNV(ST(1));
7265         double  zoomy = (double)SvNV(ST(2));
7266         int     smooth = (int)SvIV(ST(3));
7267         SDL_Surface *   RETVAL;
7268         dXSTARG;
7269 #line 3658 "SDL_perl.xs"
7270                 RETVAL = zoomSurface( src, zoomx, zoomy, smooth);
7271 #line 7272 "SDL_perl.c"
7272         XSprePUSH; PUSHi(PTR2IV(RETVAL));
7273     }
7274     XSRETURN(1);
7275 }
7276
7277 XS(XS_SDL_GFXPixelColor); /* prototype to pass -Wmissing-prototypes */
7278 XS(XS_SDL_GFXPixelColor)
7279 {
7280     dXSARGS;
7281     if (items != 4)
7282         Perl_croak(aTHX_ "Usage: SDL::GFXPixelColor(dst, x, y, color)");
7283     {
7284         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7285         Sint16  x = (Sint16)SvIV(ST(1));
7286         Sint16  y = (Sint16)SvIV(ST(2));
7287         Uint32  color = (Uint32)SvUV(ST(3));
7288         int     RETVAL;
7289         dXSTARG;
7290 #line 3669 "SDL_perl.xs"
7291                 RETVAL = pixelColor( dst, x, y, color);
7292 #line 7293 "SDL_perl.c"
7293         XSprePUSH; PUSHi((IV)RETVAL);
7294     }
7295     XSRETURN(1);
7296 }
7297
7298 XS(XS_SDL_GFXPixelRGBA); /* prototype to pass -Wmissing-prototypes */
7299 XS(XS_SDL_GFXPixelRGBA)
7300 {
7301     dXSARGS;
7302     if (items != 7)
7303         Perl_croak(aTHX_ "Usage: SDL::GFXPixelRGBA(dst, x, y, r, g, b, a)");
7304     {
7305         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7306         Sint16  x = (Sint16)SvIV(ST(1));
7307         Sint16  y = (Sint16)SvIV(ST(2));
7308         Uint8   r = (unsigned char)SvUV(ST(3));
7309         Uint8   g = (unsigned char)SvUV(ST(4));
7310         Uint8   b = (unsigned char)SvUV(ST(5));
7311         Uint8   a = (unsigned char)SvUV(ST(6));
7312         int     RETVAL;
7313         dXSTARG;
7314 #line 3683 "SDL_perl.xs"
7315                 RETVAL = pixelRGBA( dst, x, y, r, g, b, a );
7316 #line 7317 "SDL_perl.c"
7317         XSprePUSH; PUSHi((IV)RETVAL);
7318     }
7319     XSRETURN(1);
7320 }
7321
7322 XS(XS_SDL_GFXHlineColor); /* prototype to pass -Wmissing-prototypes */
7323 XS(XS_SDL_GFXHlineColor)
7324 {
7325     dXSARGS;
7326     if (items != 5)
7327         Perl_croak(aTHX_ "Usage: SDL::GFXHlineColor(dst, x1, x2, y, color)");
7328     {
7329         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7330         Sint16  x1 = (Sint16)SvIV(ST(1));
7331         Sint16  x2 = (Sint16)SvIV(ST(2));
7332         Sint16  y = (Sint16)SvIV(ST(3));
7333         Uint32  color = (Uint32)SvUV(ST(4));
7334         int     RETVAL;
7335         dXSTARG;
7336 #line 3695 "SDL_perl.xs"
7337                 RETVAL = hlineColor( dst, x1, x2, y, color );
7338 #line 7339 "SDL_perl.c"
7339         XSprePUSH; PUSHi((IV)RETVAL);
7340     }
7341     XSRETURN(1);
7342 }
7343
7344 XS(XS_SDL_GFXHlineRGBA); /* prototype to pass -Wmissing-prototypes */
7345 XS(XS_SDL_GFXHlineRGBA)
7346 {
7347     dXSARGS;
7348     if (items != 8)
7349         Perl_croak(aTHX_ "Usage: SDL::GFXHlineRGBA(dst, x1, x2, y, r, g, b, a)");
7350     {
7351         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7352         Sint16  x1 = (Sint16)SvIV(ST(1));
7353         Sint16  x2 = (Sint16)SvIV(ST(2));
7354         Sint16  y = (Sint16)SvIV(ST(3));
7355         Uint8   r = (unsigned char)SvUV(ST(4));
7356         Uint8   g = (unsigned char)SvUV(ST(5));
7357         Uint8   b = (unsigned char)SvUV(ST(6));
7358         Uint8   a = (unsigned char)SvUV(ST(7));
7359         int     RETVAL;
7360         dXSTARG;
7361 #line 3710 "SDL_perl.xs"
7362                 RETVAL = hlineRGBA( dst, x1, x2, y, r, g, b, a );
7363 #line 7364 "SDL_perl.c"
7364         XSprePUSH; PUSHi((IV)RETVAL);
7365     }
7366     XSRETURN(1);
7367 }
7368
7369 XS(XS_SDL_GFXVlineColor); /* prototype to pass -Wmissing-prototypes */
7370 XS(XS_SDL_GFXVlineColor)
7371 {
7372     dXSARGS;
7373     if (items != 5)
7374         Perl_croak(aTHX_ "Usage: SDL::GFXVlineColor(dst, x, y1, y2, color)");
7375     {
7376         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7377         Sint16  x = (Sint16)SvIV(ST(1));
7378         Sint16  y1 = (Sint16)SvIV(ST(2));
7379         Sint16  y2 = (Sint16)SvIV(ST(3));
7380         Uint32  color = (Uint32)SvUV(ST(4));
7381         int     RETVAL;
7382         dXSTARG;
7383 #line 3722 "SDL_perl.xs"
7384                 RETVAL = vlineColor( dst, x, y1, y2, color );
7385 #line 7386 "SDL_perl.c"
7386         XSprePUSH; PUSHi((IV)RETVAL);
7387     }
7388     XSRETURN(1);
7389 }
7390
7391 XS(XS_SDL_GFXVlineRGBA); /* prototype to pass -Wmissing-prototypes */
7392 XS(XS_SDL_GFXVlineRGBA)
7393 {
7394     dXSARGS;
7395     if (items != 8)
7396         Perl_croak(aTHX_ "Usage: SDL::GFXVlineRGBA(dst, x, y1, y2, r, g, b, a)");
7397     {
7398         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7399         Sint16  x = (Sint16)SvIV(ST(1));
7400         Sint16  y1 = (Sint16)SvIV(ST(2));
7401         Sint16  y2 = (Sint16)SvIV(ST(3));
7402         Uint8   r = (unsigned char)SvUV(ST(4));
7403         Uint8   g = (unsigned char)SvUV(ST(5));
7404         Uint8   b = (unsigned char)SvUV(ST(6));
7405         Uint8   a = (unsigned char)SvUV(ST(7));
7406         int     RETVAL;
7407         dXSTARG;
7408 #line 3737 "SDL_perl.xs"
7409                 RETVAL = vlineRGBA( dst, x, y1, y2, r, g, b, a );
7410 #line 7411 "SDL_perl.c"
7411         XSprePUSH; PUSHi((IV)RETVAL);
7412     }
7413     XSRETURN(1);
7414 }
7415
7416 XS(XS_SDL_GFXRectangleColor); /* prototype to pass -Wmissing-prototypes */
7417 XS(XS_SDL_GFXRectangleColor)
7418 {
7419     dXSARGS;
7420     if (items != 6)
7421         Perl_croak(aTHX_ "Usage: SDL::GFXRectangleColor(dst, x1, y1, x2, y2, color)");
7422     {
7423         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7424         Sint16  x1 = (Sint16)SvIV(ST(1));
7425         Sint16  y1 = (Sint16)SvIV(ST(2));
7426         Sint16  x2 = (Sint16)SvIV(ST(3));
7427         Sint16  y2 = (Sint16)SvIV(ST(4));
7428         Uint32  color = (Uint32)SvUV(ST(5));
7429         int     RETVAL;
7430         dXSTARG;
7431 #line 3750 "SDL_perl.xs"
7432                 RETVAL = rectangleColor( dst, x1, y1, x2, y2, color );
7433 #line 7434 "SDL_perl.c"
7434         XSprePUSH; PUSHi((IV)RETVAL);
7435     }
7436     XSRETURN(1);
7437 }
7438
7439 XS(XS_SDL_GFXRectangleRGBA); /* prototype to pass -Wmissing-prototypes */
7440 XS(XS_SDL_GFXRectangleRGBA)
7441 {
7442     dXSARGS;
7443     if (items != 9)
7444         Perl_croak(aTHX_ "Usage: SDL::GFXRectangleRGBA(dst, x1, y1, x2, y2, r, g, b, a)");
7445     {
7446         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7447         Sint16  x1 = (Sint16)SvIV(ST(1));
7448         Sint16  y1 = (Sint16)SvIV(ST(2));
7449         Sint16  x2 = (Sint16)SvIV(ST(3));
7450         Sint16  y2 = (Sint16)SvIV(ST(4));
7451         Uint8   r = (unsigned char)SvUV(ST(5));
7452         Uint8   g = (unsigned char)SvUV(ST(6));
7453         Uint8   b = (unsigned char)SvUV(ST(7));
7454         Uint8   a = (unsigned char)SvUV(ST(8));
7455         int     RETVAL;
7456         dXSTARG;
7457 #line 3766 "SDL_perl.xs"
7458                 RETVAL = rectangleRGBA( dst, x1, y1, x2, y2, r, g, b, a );
7459 #line 7460 "SDL_perl.c"
7460         XSprePUSH; PUSHi((IV)RETVAL);
7461     }
7462     XSRETURN(1);
7463 }
7464
7465 XS(XS_SDL_GFXBoxColor); /* prototype to pass -Wmissing-prototypes */
7466 XS(XS_SDL_GFXBoxColor)
7467 {
7468     dXSARGS;
7469     if (items != 6)
7470         Perl_croak(aTHX_ "Usage: SDL::GFXBoxColor(dst, x1, y1, x2, y2, color)");
7471     {
7472         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7473         Sint16  x1 = (Sint16)SvIV(ST(1));
7474         Sint16  y1 = (Sint16)SvIV(ST(2));
7475         Sint16  x2 = (Sint16)SvIV(ST(3));
7476         Sint16  y2 = (Sint16)SvIV(ST(4));
7477         Uint32  color = (Uint32)SvUV(ST(5));
7478         int     RETVAL;
7479         dXSTARG;
7480 #line 3779 "SDL_perl.xs"
7481                 RETVAL = boxColor( dst, x1, y1, x2, y2, color );
7482 #line 7483 "SDL_perl.c"
7483         XSprePUSH; PUSHi((IV)RETVAL);
7484     }
7485     XSRETURN(1);
7486 }
7487
7488 XS(XS_SDL_GFXBoxRGBA); /* prototype to pass -Wmissing-prototypes */
7489 XS(XS_SDL_GFXBoxRGBA)
7490 {
7491     dXSARGS;
7492     if (items != 9)
7493         Perl_croak(aTHX_ "Usage: SDL::GFXBoxRGBA(dst, x1, y1, x2, y2, r, g, b, a)");
7494     {
7495         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7496         Sint16  x1 = (Sint16)SvIV(ST(1));
7497         Sint16  y1 = (Sint16)SvIV(ST(2));
7498         Sint16  x2 = (Sint16)SvIV(ST(3));
7499         Sint16  y2 = (Sint16)SvIV(ST(4));
7500         Uint8   r = (unsigned char)SvUV(ST(5));
7501         Uint8   g = (unsigned char)SvUV(ST(6));
7502         Uint8   b = (unsigned char)SvUV(ST(7));
7503         Uint8   a = (unsigned char)SvUV(ST(8));
7504         int     RETVAL;
7505         dXSTARG;
7506 #line 3795 "SDL_perl.xs"
7507                 RETVAL = boxRGBA( dst, x1, y1, x2, y2, r, g, b, a );
7508 #line 7509 "SDL_perl.c"
7509         XSprePUSH; PUSHi((IV)RETVAL);
7510     }
7511     XSRETURN(1);
7512 }
7513
7514 XS(XS_SDL_GFXLineColor); /* prototype to pass -Wmissing-prototypes */
7515 XS(XS_SDL_GFXLineColor)
7516 {
7517     dXSARGS;
7518     if (items != 6)
7519         Perl_croak(aTHX_ "Usage: SDL::GFXLineColor(dst, x1, y1, x2, y2, color)");
7520     {
7521         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7522         Sint16  x1 = (Sint16)SvIV(ST(1));
7523         Sint16  y1 = (Sint16)SvIV(ST(2));
7524         Sint16  x2 = (Sint16)SvIV(ST(3));
7525         Sint16  y2 = (Sint16)SvIV(ST(4));
7526         Uint32  color = (Uint32)SvUV(ST(5));
7527         int     RETVAL;
7528         dXSTARG;
7529 #line 3808 "SDL_perl.xs"
7530                 RETVAL = lineColor( dst, x1, y1, x2, y2, color );
7531 #line 7532 "SDL_perl.c"
7532         XSprePUSH; PUSHi((IV)RETVAL);
7533     }
7534     XSRETURN(1);
7535 }
7536
7537 XS(XS_SDL_GFXLineRGBA); /* prototype to pass -Wmissing-prototypes */
7538 XS(XS_SDL_GFXLineRGBA)
7539 {
7540     dXSARGS;
7541     if (items != 9)
7542         Perl_croak(aTHX_ "Usage: SDL::GFXLineRGBA(dst, x1, y1, x2, y2, r, g, b, a)");
7543     {
7544         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7545         Sint16  x1 = (Sint16)SvIV(ST(1));
7546         Sint16  y1 = (Sint16)SvIV(ST(2));
7547         Sint16  x2 = (Sint16)SvIV(ST(3));
7548         Sint16  y2 = (Sint16)SvIV(ST(4));
7549         Uint8   r = (unsigned char)SvUV(ST(5));
7550         Uint8   g = (unsigned char)SvUV(ST(6));
7551         Uint8   b = (unsigned char)SvUV(ST(7));
7552         Uint8   a = (unsigned char)SvUV(ST(8));
7553         int     RETVAL;
7554         dXSTARG;
7555 #line 3824 "SDL_perl.xs"
7556                 RETVAL = lineRGBA( dst, x1, y1, x2, y2, r, g, b, a );
7557 #line 7558 "SDL_perl.c"
7558         XSprePUSH; PUSHi((IV)RETVAL);
7559     }
7560     XSRETURN(1);
7561 }
7562
7563 XS(XS_SDL_GFXAalineColor); /* prototype to pass -Wmissing-prototypes */
7564 XS(XS_SDL_GFXAalineColor)
7565 {
7566     dXSARGS;
7567     if (items != 6)
7568         Perl_croak(aTHX_ "Usage: SDL::GFXAalineColor(dst, x1, y1, x2, y2, color)");
7569     {
7570         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7571         Sint16  x1 = (Sint16)SvIV(ST(1));
7572         Sint16  y1 = (Sint16)SvIV(ST(2));
7573         Sint16  x2 = (Sint16)SvIV(ST(3));
7574         Sint16  y2 = (Sint16)SvIV(ST(4));
7575         Uint32  color = (Uint32)SvUV(ST(5));
7576         int     RETVAL;
7577         dXSTARG;
7578 #line 3837 "SDL_perl.xs"
7579                 RETVAL = aalineColor( dst, x1, y1, x2, y2, color );
7580 #line 7581 "SDL_perl.c"
7581         XSprePUSH; PUSHi((IV)RETVAL);
7582     }
7583     XSRETURN(1);
7584 }
7585
7586 XS(XS_SDL_GFXAalineRGBA); /* prototype to pass -Wmissing-prototypes */
7587 XS(XS_SDL_GFXAalineRGBA)
7588 {
7589     dXSARGS;
7590     if (items != 9)
7591         Perl_croak(aTHX_ "Usage: SDL::GFXAalineRGBA(dst, x1, y1, x2, y2, r, g, b, a)");
7592     {
7593         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7594         Sint16  x1 = (Sint16)SvIV(ST(1));
7595         Sint16  y1 = (Sint16)SvIV(ST(2));
7596         Sint16  x2 = (Sint16)SvIV(ST(3));
7597         Sint16  y2 = (Sint16)SvIV(ST(4));
7598         Uint8   r = (unsigned char)SvUV(ST(5));
7599         Uint8   g = (unsigned char)SvUV(ST(6));
7600         Uint8   b = (unsigned char)SvUV(ST(7));
7601         Uint8   a = (unsigned char)SvUV(ST(8));
7602         int     RETVAL;
7603         dXSTARG;
7604 #line 3853 "SDL_perl.xs"
7605                 RETVAL = aalineRGBA( dst, x1, y1, x2, y2, r, g, b, a );
7606 #line 7607 "SDL_perl.c"
7607         XSprePUSH; PUSHi((IV)RETVAL);
7608     }
7609     XSRETURN(1);
7610 }
7611
7612 XS(XS_SDL_GFXCircleColor); /* prototype to pass -Wmissing-prototypes */
7613 XS(XS_SDL_GFXCircleColor)
7614 {
7615     dXSARGS;
7616     if (items != 5)
7617         Perl_croak(aTHX_ "Usage: SDL::GFXCircleColor(dst, x, y, r, color)");
7618     {
7619         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7620         Sint16  x = (Sint16)SvIV(ST(1));
7621         Sint16  y = (Sint16)SvIV(ST(2));
7622         Sint16  r = (Sint16)SvIV(ST(3));
7623         Uint32  color = (Uint32)SvUV(ST(4));
7624         int     RETVAL;
7625         dXSTARG;
7626 #line 3865 "SDL_perl.xs"
7627                 RETVAL = circleColor( dst, x, y, r, color );
7628 #line 7629 "SDL_perl.c"
7629         XSprePUSH; PUSHi((IV)RETVAL);
7630     }
7631     XSRETURN(1);
7632 }
7633
7634 XS(XS_SDL_GFXCircleRGBA); /* prototype to pass -Wmissing-prototypes */
7635 XS(XS_SDL_GFXCircleRGBA)
7636 {
7637     dXSARGS;
7638     if (items != 8)
7639         Perl_croak(aTHX_ "Usage: SDL::GFXCircleRGBA(dst, x, y, rad, r, g, b, a)");
7640     {
7641         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7642         Sint16  x = (Sint16)SvIV(ST(1));
7643         Sint16  y = (Sint16)SvIV(ST(2));
7644         Sint16  rad = (Sint16)SvIV(ST(3));
7645         Uint8   r = (unsigned char)SvUV(ST(4));
7646         Uint8   g = (unsigned char)SvUV(ST(5));
7647         Uint8   b = (unsigned char)SvUV(ST(6));
7648         Uint8   a = (unsigned char)SvUV(ST(7));
7649         int     RETVAL;
7650         dXSTARG;
7651 #line 3880 "SDL_perl.xs"
7652                 RETVAL = circleRGBA( dst, x, y, rad, r, g, b, a );
7653 #line 7654 "SDL_perl.c"
7654         XSprePUSH; PUSHi((IV)RETVAL);
7655     }
7656     XSRETURN(1);
7657 }
7658
7659 XS(XS_SDL_GFXAacircleColor); /* prototype to pass -Wmissing-prototypes */
7660 XS(XS_SDL_GFXAacircleColor)
7661 {
7662     dXSARGS;
7663     if (items != 5)
7664         Perl_croak(aTHX_ "Usage: SDL::GFXAacircleColor(dst, x, y, r, color)");
7665     {
7666         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7667         Sint16  x = (Sint16)SvIV(ST(1));
7668         Sint16  y = (Sint16)SvIV(ST(2));
7669         Sint16  r = (Sint16)SvIV(ST(3));
7670         Uint32  color = (Uint32)SvUV(ST(4));
7671         int     RETVAL;
7672         dXSTARG;
7673 #line 3892 "SDL_perl.xs"
7674                 RETVAL = aacircleColor( dst, x, y, r, color );
7675 #line 7676 "SDL_perl.c"
7676         XSprePUSH; PUSHi((IV)RETVAL);
7677     }
7678     XSRETURN(1);
7679 }
7680
7681 XS(XS_SDL_GFXAacircleRGBA); /* prototype to pass -Wmissing-prototypes */
7682 XS(XS_SDL_GFXAacircleRGBA)
7683 {
7684     dXSARGS;
7685     if (items != 8)
7686         Perl_croak(aTHX_ "Usage: SDL::GFXAacircleRGBA(dst, x, y, rad, r, g, b, a)");
7687     {
7688         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7689         Sint16  x = (Sint16)SvIV(ST(1));
7690         Sint16  y = (Sint16)SvIV(ST(2));
7691         Sint16  rad = (Sint16)SvIV(ST(3));
7692         Uint8   r = (unsigned char)SvUV(ST(4));
7693         Uint8   g = (unsigned char)SvUV(ST(5));
7694         Uint8   b = (unsigned char)SvUV(ST(6));
7695         Uint8   a = (unsigned char)SvUV(ST(7));
7696         int     RETVAL;
7697         dXSTARG;
7698 #line 3907 "SDL_perl.xs"
7699                 RETVAL = aacircleRGBA( dst, x, y, rad, r, g, b, a );
7700 #line 7701 "SDL_perl.c"
7701         XSprePUSH; PUSHi((IV)RETVAL);
7702     }
7703     XSRETURN(1);
7704 }
7705
7706 XS(XS_SDL_GFXFilledCircleColor); /* prototype to pass -Wmissing-prototypes */
7707 XS(XS_SDL_GFXFilledCircleColor)
7708 {
7709     dXSARGS;
7710     if (items != 5)
7711         Perl_croak(aTHX_ "Usage: SDL::GFXFilledCircleColor(dst, x, y, r, color)");
7712     {
7713         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7714         Sint16  x = (Sint16)SvIV(ST(1));
7715         Sint16  y = (Sint16)SvIV(ST(2));
7716         Sint16  r = (Sint16)SvIV(ST(3));
7717         Uint32  color = (Uint32)SvUV(ST(4));
7718         int     RETVAL;
7719         dXSTARG;
7720 #line 3919 "SDL_perl.xs"
7721                 RETVAL = filledCircleColor( dst, x, y, r, color );
7722 #line 7723 "SDL_perl.c"
7723         XSprePUSH; PUSHi((IV)RETVAL);
7724     }
7725     XSRETURN(1);
7726 }
7727
7728 XS(XS_SDL_GFXFilledCircleRGBA); /* prototype to pass -Wmissing-prototypes */
7729 XS(XS_SDL_GFXFilledCircleRGBA)
7730 {
7731     dXSARGS;
7732     if (items != 8)
7733         Perl_croak(aTHX_ "Usage: SDL::GFXFilledCircleRGBA(dst, x, y, rad, r, g, b, a)");
7734     {
7735         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7736         Sint16  x = (Sint16)SvIV(ST(1));
7737         Sint16  y = (Sint16)SvIV(ST(2));
7738         Sint16  rad = (Sint16)SvIV(ST(3));
7739         Uint8   r = (unsigned char)SvUV(ST(4));
7740         Uint8   g = (unsigned char)SvUV(ST(5));
7741         Uint8   b = (unsigned char)SvUV(ST(6));
7742         Uint8   a = (unsigned char)SvUV(ST(7));
7743         int     RETVAL;
7744         dXSTARG;
7745 #line 3934 "SDL_perl.xs"
7746                 RETVAL = filledCircleRGBA( dst, x, y, rad, r, g, b, a );
7747 #line 7748 "SDL_perl.c"
7748         XSprePUSH; PUSHi((IV)RETVAL);
7749     }
7750     XSRETURN(1);
7751 }
7752
7753 XS(XS_SDL_GFXEllipseColor); /* prototype to pass -Wmissing-prototypes */
7754 XS(XS_SDL_GFXEllipseColor)
7755 {
7756     dXSARGS;
7757     if (items != 6)
7758         Perl_croak(aTHX_ "Usage: SDL::GFXEllipseColor(dst, x, y, rx, ry, color)");
7759     {
7760         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7761         Sint16  x = (Sint16)SvIV(ST(1));
7762         Sint16  y = (Sint16)SvIV(ST(2));
7763         Sint16  rx = (Sint16)SvIV(ST(3));
7764         Sint16  ry = (Sint16)SvIV(ST(4));
7765         Uint32  color = (Uint32)SvUV(ST(5));
7766         int     RETVAL;
7767         dXSTARG;
7768 #line 3947 "SDL_perl.xs"
7769                 RETVAL = ellipseColor( dst, x, y, rx, ry, color );
7770 #line 7771 "SDL_perl.c"
7771         XSprePUSH; PUSHi((IV)RETVAL);
7772     }
7773     XSRETURN(1);
7774 }
7775
7776 XS(XS_SDL_GFXEllipseRGBA); /* prototype to pass -Wmissing-prototypes */
7777 XS(XS_SDL_GFXEllipseRGBA)
7778 {
7779     dXSARGS;
7780     if (items != 9)
7781         Perl_croak(aTHX_ "Usage: SDL::GFXEllipseRGBA(dst, x, y, rx, ry, r, g, b, a)");
7782     {
7783         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7784         Sint16  x = (Sint16)SvIV(ST(1));
7785         Sint16  y = (Sint16)SvIV(ST(2));
7786         Sint16  rx = (Sint16)SvIV(ST(3));
7787         Sint16  ry = (Sint16)SvIV(ST(4));
7788         Uint8   r = (unsigned char)SvUV(ST(5));
7789         Uint8   g = (unsigned char)SvUV(ST(6));
7790         Uint8   b = (unsigned char)SvUV(ST(7));
7791         Uint8   a = (unsigned char)SvUV(ST(8));
7792         int     RETVAL;
7793         dXSTARG;
7794 #line 3963 "SDL_perl.xs"
7795                 RETVAL = ellipseRGBA( dst, x, y, rx, ry, r, g, b, a );
7796 #line 7797 "SDL_perl.c"
7797         XSprePUSH; PUSHi((IV)RETVAL);
7798     }
7799     XSRETURN(1);
7800 }
7801
7802 XS(XS_SDL_GFXAaellipseColor); /* prototype to pass -Wmissing-prototypes */
7803 XS(XS_SDL_GFXAaellipseColor)
7804 {
7805     dXSARGS;
7806     if (items != 6)
7807         Perl_croak(aTHX_ "Usage: SDL::GFXAaellipseColor(dst, xc, yc, rx, ry, color)");
7808     {
7809         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7810         Sint16  xc = (Sint16)SvIV(ST(1));
7811         Sint16  yc = (Sint16)SvIV(ST(2));
7812         Sint16  rx = (Sint16)SvIV(ST(3));
7813         Sint16  ry = (Sint16)SvIV(ST(4));
7814         Uint32  color = (Uint32)SvUV(ST(5));
7815         int     RETVAL;
7816         dXSTARG;
7817 #line 3976 "SDL_perl.xs"
7818                 RETVAL = aaellipseColor( dst, xc, yc, rx, ry, color );
7819 #line 7820 "SDL_perl.c"
7820         XSprePUSH; PUSHi((IV)RETVAL);
7821     }
7822     XSRETURN(1);
7823 }
7824
7825 XS(XS_SDL_GFXAaellipseRGBA); /* prototype to pass -Wmissing-prototypes */
7826 XS(XS_SDL_GFXAaellipseRGBA)
7827 {
7828     dXSARGS;
7829     if (items != 9)
7830         Perl_croak(aTHX_ "Usage: SDL::GFXAaellipseRGBA(dst, x, y, rx, ry, r, g, b, a)");
7831     {
7832         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7833         Sint16  x = (Sint16)SvIV(ST(1));
7834         Sint16  y = (Sint16)SvIV(ST(2));
7835         Sint16  rx = (Sint16)SvIV(ST(3));
7836         Sint16  ry = (Sint16)SvIV(ST(4));
7837         Uint8   r = (unsigned char)SvUV(ST(5));
7838         Uint8   g = (unsigned char)SvUV(ST(6));
7839         Uint8   b = (unsigned char)SvUV(ST(7));
7840         Uint8   a = (unsigned char)SvUV(ST(8));
7841         int     RETVAL;
7842         dXSTARG;
7843 #line 3992 "SDL_perl.xs"
7844                 RETVAL = aaellipseRGBA( dst, x, y, rx, ry, r, g, b, a );
7845 #line 7846 "SDL_perl.c"
7846         XSprePUSH; PUSHi((IV)RETVAL);
7847     }
7848     XSRETURN(1);
7849 }
7850
7851 XS(XS_SDL_GFXFilledEllipseColor); /* prototype to pass -Wmissing-prototypes */
7852 XS(XS_SDL_GFXFilledEllipseColor)
7853 {
7854     dXSARGS;
7855     if (items != 6)
7856         Perl_croak(aTHX_ "Usage: SDL::GFXFilledEllipseColor(dst, x, y, rx, ry, color)");
7857     {
7858         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7859         Sint16  x = (Sint16)SvIV(ST(1));
7860         Sint16  y = (Sint16)SvIV(ST(2));
7861         Sint16  rx = (Sint16)SvIV(ST(3));
7862         Sint16  ry = (Sint16)SvIV(ST(4));
7863         Uint32  color = (Uint32)SvUV(ST(5));
7864         int     RETVAL;
7865         dXSTARG;
7866 #line 4005 "SDL_perl.xs"
7867                 RETVAL = filledEllipseColor( dst, x, y, rx, ry, color );
7868 #line 7869 "SDL_perl.c"
7869         XSprePUSH; PUSHi((IV)RETVAL);
7870     }
7871     XSRETURN(1);
7872 }
7873
7874 XS(XS_SDL_GFXFilledEllipseRGBA); /* prototype to pass -Wmissing-prototypes */
7875 XS(XS_SDL_GFXFilledEllipseRGBA)
7876 {
7877     dXSARGS;
7878     if (items != 9)
7879         Perl_croak(aTHX_ "Usage: SDL::GFXFilledEllipseRGBA(dst, x, y, rx, ry, r, g, b, a)");
7880     {
7881         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7882         Sint16  x = (Sint16)SvIV(ST(1));
7883         Sint16  y = (Sint16)SvIV(ST(2));
7884         Sint16  rx = (Sint16)SvIV(ST(3));
7885         Sint16  ry = (Sint16)SvIV(ST(4));
7886         Uint8   r = (unsigned char)SvUV(ST(5));
7887         Uint8   g = (unsigned char)SvUV(ST(6));
7888         Uint8   b = (unsigned char)SvUV(ST(7));
7889         Uint8   a = (unsigned char)SvUV(ST(8));
7890         int     RETVAL;
7891         dXSTARG;
7892 #line 4021 "SDL_perl.xs"
7893                 RETVAL = filledEllipseRGBA( dst, x, y, rx, ry, r, g, b, a );
7894 #line 7895 "SDL_perl.c"
7895         XSprePUSH; PUSHi((IV)RETVAL);
7896     }
7897     XSRETURN(1);
7898 }
7899
7900 XS(XS_SDL_GFXFilledPieColor); /* prototype to pass -Wmissing-prototypes */
7901 XS(XS_SDL_GFXFilledPieColor)
7902 {
7903     dXSARGS;
7904     if (items != 7)
7905         Perl_croak(aTHX_ "Usage: SDL::GFXFilledPieColor(dst, x, y, rad, start, end, color)");
7906     {
7907         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7908         Sint16  x = (Sint16)SvIV(ST(1));
7909         Sint16  y = (Sint16)SvIV(ST(2));
7910         Sint16  rad = (Sint16)SvIV(ST(3));
7911         Sint16  start = (Sint16)SvIV(ST(4));
7912         Sint16  end = (Sint16)SvIV(ST(5));
7913         Uint32  color = (Uint32)SvUV(ST(6));
7914         int     RETVAL;
7915         dXSTARG;
7916 #line 4035 "SDL_perl.xs"
7917                 RETVAL = filledPieColor( dst, x, y, rad, start, end, color );
7918 #line 7919 "SDL_perl.c"
7919         XSprePUSH; PUSHi((IV)RETVAL);
7920     }
7921     XSRETURN(1);
7922 }
7923
7924 XS(XS_SDL_GFXFilledPieRGBA); /* prototype to pass -Wmissing-prototypes */
7925 XS(XS_SDL_GFXFilledPieRGBA)
7926 {
7927     dXSARGS;
7928     if (items != 10)
7929         Perl_croak(aTHX_ "Usage: SDL::GFXFilledPieRGBA(dst, x, y, rad, start, end, r, g, b, a)");
7930     {
7931         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7932         Sint16  x = (Sint16)SvIV(ST(1));
7933         Sint16  y = (Sint16)SvIV(ST(2));
7934         Sint16  rad = (Sint16)SvIV(ST(3));
7935         Sint16  start = (Sint16)SvIV(ST(4));
7936         Sint16  end = (Sint16)SvIV(ST(5));
7937         Uint8   r = (unsigned char)SvUV(ST(6));
7938         Uint8   g = (unsigned char)SvUV(ST(7));
7939         Uint8   b = (unsigned char)SvUV(ST(8));
7940         Uint8   a = (unsigned char)SvUV(ST(9));
7941         int     RETVAL;
7942         dXSTARG;
7943 #line 4052 "SDL_perl.xs"
7944                 RETVAL = filledPieRGBA( dst, x, y, rad, start, end, r, g, b, a );
7945 #line 7946 "SDL_perl.c"
7946         XSprePUSH; PUSHi((IV)RETVAL);
7947     }
7948     XSRETURN(1);
7949 }
7950
7951 XS(XS_SDL_GFXPolygonColor); /* prototype to pass -Wmissing-prototypes */
7952 XS(XS_SDL_GFXPolygonColor)
7953 {
7954     dXSARGS;
7955     if (items != 5)
7956         Perl_croak(aTHX_ "Usage: SDL::GFXPolygonColor(dst, vx, vy, n, color)");
7957     {
7958         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7959         Sint16* vx = INT2PTR(Sint16 *,SvIV(ST(1)));
7960         Sint16* vy = INT2PTR(Sint16 *,SvIV(ST(2)));
7961         int     n = (int)SvIV(ST(3));
7962         Uint32  color = (Uint32)SvUV(ST(4));
7963         int     RETVAL;
7964         dXSTARG;
7965 #line 4064 "SDL_perl.xs"
7966                 RETVAL = polygonColor( dst, vx, vy, n, color );
7967 #line 7968 "SDL_perl.c"
7968         XSprePUSH; PUSHi((IV)RETVAL);
7969     }
7970     XSRETURN(1);
7971 }
7972
7973 XS(XS_SDL_GFXPolygonRGBA); /* prototype to pass -Wmissing-prototypes */
7974 XS(XS_SDL_GFXPolygonRGBA)
7975 {
7976     dXSARGS;
7977     if (items != 8)
7978         Perl_croak(aTHX_ "Usage: SDL::GFXPolygonRGBA(dst, vx, vy, n, r, g, b, a)");
7979     {
7980         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
7981         Sint16* vx = INT2PTR(Sint16 *,SvIV(ST(1)));
7982         Sint16* vy = INT2PTR(Sint16 *,SvIV(ST(2)));
7983         int     n = (int)SvIV(ST(3));
7984         Uint8   r = (unsigned char)SvUV(ST(4));
7985         Uint8   g = (unsigned char)SvUV(ST(5));
7986         Uint8   b = (unsigned char)SvUV(ST(6));
7987         Uint8   a = (unsigned char)SvUV(ST(7));
7988         int     RETVAL;
7989         dXSTARG;
7990 #line 4079 "SDL_perl.xs"
7991                 RETVAL = polygonRGBA( dst, vx, vy, n, r, g, b, a );
7992 #line 7993 "SDL_perl.c"
7993         XSprePUSH; PUSHi((IV)RETVAL);
7994     }
7995     XSRETURN(1);
7996 }
7997
7998 XS(XS_SDL_GFXAapolygonColor); /* prototype to pass -Wmissing-prototypes */
7999 XS(XS_SDL_GFXAapolygonColor)
8000 {
8001     dXSARGS;
8002     if (items != 5)
8003         Perl_croak(aTHX_ "Usage: SDL::GFXAapolygonColor(dst, vx, vy, n, color)");
8004     {
8005         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
8006         Sint16* vx = INT2PTR(Sint16 *,SvIV(ST(1)));
8007         Sint16* vy = INT2PTR(Sint16 *,SvIV(ST(2)));
8008         int     n = (int)SvIV(ST(3));
8009         Uint32  color = (Uint32)SvUV(ST(4));
8010         int     RETVAL;
8011         dXSTARG;
8012 #line 4091 "SDL_perl.xs"
8013                 RETVAL = aapolygonColor( dst, vx, vy, n, color );
8014 #line 8015 "SDL_perl.c"
8015         XSprePUSH; PUSHi((IV)RETVAL);
8016     }
8017     XSRETURN(1);
8018 }
8019
8020 XS(XS_SDL_GFXAapolygonRGBA); /* prototype to pass -Wmissing-prototypes */
8021 XS(XS_SDL_GFXAapolygonRGBA)
8022 {
8023     dXSARGS;
8024     if (items != 8)
8025         Perl_croak(aTHX_ "Usage: SDL::GFXAapolygonRGBA(dst, vx, vy, n, r, g, b, a)");
8026     {
8027         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
8028         Sint16* vx = INT2PTR(Sint16 *,SvIV(ST(1)));
8029         Sint16* vy = INT2PTR(Sint16 *,SvIV(ST(2)));
8030         int     n = (int)SvIV(ST(3));
8031         Uint8   r = (unsigned char)SvUV(ST(4));
8032         Uint8   g = (unsigned char)SvUV(ST(5));
8033         Uint8   b = (unsigned char)SvUV(ST(6));
8034         Uint8   a = (unsigned char)SvUV(ST(7));
8035         int     RETVAL;
8036         dXSTARG;
8037 #line 4106 "SDL_perl.xs"
8038                 RETVAL = aapolygonRGBA( dst, vx, vy, n, r, g, b, a );
8039 #line 8040 "SDL_perl.c"
8040         XSprePUSH; PUSHi((IV)RETVAL);
8041     }
8042     XSRETURN(1);
8043 }
8044
8045 XS(XS_SDL_GFXFilledPolygonColor); /* prototype to pass -Wmissing-prototypes */
8046 XS(XS_SDL_GFXFilledPolygonColor)
8047 {
8048     dXSARGS;
8049     if (items != 5)
8050         Perl_croak(aTHX_ "Usage: SDL::GFXFilledPolygonColor(dst, vx, vy, n, color)");
8051     {
8052         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
8053         Sint16* vx = INT2PTR(Sint16 *,SvIV(ST(1)));
8054         Sint16* vy = INT2PTR(Sint16 *,SvIV(ST(2)));
8055         int     n = (int)SvIV(ST(3));
8056         int     color = (int)SvIV(ST(4));
8057         int     RETVAL;
8058         dXSTARG;
8059 #line 4118 "SDL_perl.xs"
8060                 RETVAL = filledPolygonColor( dst, vx, vy, n, color );
8061 #line 8062 "SDL_perl.c"
8062         XSprePUSH; PUSHi((IV)RETVAL);
8063     }
8064     XSRETURN(1);
8065 }
8066
8067 XS(XS_SDL_GFXFilledPolygonRGBA); /* prototype to pass -Wmissing-prototypes */
8068 XS(XS_SDL_GFXFilledPolygonRGBA)
8069 {
8070     dXSARGS;
8071     if (items != 8)
8072         Perl_croak(aTHX_ "Usage: SDL::GFXFilledPolygonRGBA(dst, vx, vy, n, r, g, b, a)");
8073     {
8074         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
8075         Sint16* vx = INT2PTR(Sint16 *,SvIV(ST(1)));
8076         Sint16* vy = INT2PTR(Sint16 *,SvIV(ST(2)));
8077         int     n = (int)SvIV(ST(3));
8078         Uint8   r = (unsigned char)SvUV(ST(4));
8079         Uint8   g = (unsigned char)SvUV(ST(5));
8080         Uint8   b = (unsigned char)SvUV(ST(6));
8081         Uint8   a = (unsigned char)SvUV(ST(7));
8082         int     RETVAL;
8083         dXSTARG;
8084 #line 4133 "SDL_perl.xs"
8085                 RETVAL = filledPolygonRGBA( dst, vx, vy, n, r, g, b, a );
8086 #line 8087 "SDL_perl.c"
8087         XSprePUSH; PUSHi((IV)RETVAL);
8088     }
8089     XSRETURN(1);
8090 }
8091
8092 XS(XS_SDL_GFXCharacterColor); /* prototype to pass -Wmissing-prototypes */
8093 XS(XS_SDL_GFXCharacterColor)
8094 {
8095     dXSARGS;
8096     if (items != 5)
8097         Perl_croak(aTHX_ "Usage: SDL::GFXCharacterColor(dst, x, y, c, color)");
8098     {
8099         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
8100         Sint16  x = (Sint16)SvIV(ST(1));
8101         Sint16  y = (Sint16)SvIV(ST(2));
8102         char    c = (char)*SvPV_nolen(ST(3));
8103         Uint32  color = (Uint32)SvUV(ST(4));
8104         int     RETVAL;
8105         dXSTARG;
8106 #line 4145 "SDL_perl.xs"
8107                 RETVAL = characterColor( dst, x, y, c, color );
8108 #line 8109 "SDL_perl.c"
8109         XSprePUSH; PUSHi((IV)RETVAL);
8110     }
8111     XSRETURN(1);
8112 }
8113
8114 XS(XS_SDL_GFXCharacterRGBA); /* prototype to pass -Wmissing-prototypes */
8115 XS(XS_SDL_GFXCharacterRGBA)
8116 {
8117     dXSARGS;
8118     if (items != 8)
8119         Perl_croak(aTHX_ "Usage: SDL::GFXCharacterRGBA(dst, x, y, c, r, g, b, a)");
8120     {
8121         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
8122         Sint16  x = (Sint16)SvIV(ST(1));
8123         Sint16  y = (Sint16)SvIV(ST(2));
8124         char    c = (char)*SvPV_nolen(ST(3));
8125         Uint8   r = (unsigned char)SvUV(ST(4));
8126         Uint8   g = (unsigned char)SvUV(ST(5));
8127         Uint8   b = (unsigned char)SvUV(ST(6));
8128         Uint8   a = (unsigned char)SvUV(ST(7));
8129         int     RETVAL;
8130         dXSTARG;
8131 #line 4160 "SDL_perl.xs"
8132                 RETVAL = characterRGBA( dst, x, y, c, r, g, b, a );
8133 #line 8134 "SDL_perl.c"
8134         XSprePUSH; PUSHi((IV)RETVAL);
8135     }
8136     XSRETURN(1);
8137 }
8138
8139 XS(XS_SDL_GFXStringColor); /* prototype to pass -Wmissing-prototypes */
8140 XS(XS_SDL_GFXStringColor)
8141 {
8142     dXSARGS;
8143     if (items != 5)
8144         Perl_croak(aTHX_ "Usage: SDL::GFXStringColor(dst, x, y, c, color)");
8145     {
8146         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
8147         Sint16  x = (Sint16)SvIV(ST(1));
8148         Sint16  y = (Sint16)SvIV(ST(2));
8149         char*   c = (char *)SvPV_nolen(ST(3));
8150         Uint32  color = (Uint32)SvUV(ST(4));
8151         int     RETVAL;
8152         dXSTARG;
8153 #line 4172 "SDL_perl.xs"
8154                 RETVAL = stringColor( dst, x, y, c, color );
8155 #line 8156 "SDL_perl.c"
8156         XSprePUSH; PUSHi((IV)RETVAL);
8157     }
8158     XSRETURN(1);
8159 }
8160
8161 XS(XS_SDL_GFXStringRGBA); /* prototype to pass -Wmissing-prototypes */
8162 XS(XS_SDL_GFXStringRGBA)
8163 {
8164     dXSARGS;
8165     if (items != 8)
8166         Perl_croak(aTHX_ "Usage: SDL::GFXStringRGBA(dst, x, y, c, r, g, b, a)");
8167     {
8168         SDL_Surface*    dst = INT2PTR(SDL_Surface *,SvIV(ST(0)));
8169         Sint16  x = (Sint16)SvIV(ST(1));
8170         Sint16  y = (Sint16)SvIV(ST(2));
8171         char*   c = (char *)SvPV_nolen(ST(3));
8172         Uint8   r = (unsigned char)SvUV(ST(4));
8173         Uint8   g = (unsigned char)SvUV(ST(5));
8174         Uint8   b = (unsigned char)SvUV(ST(6));
8175         Uint8   a = (unsigned char)SvUV(ST(7));
8176         int     RETVAL;
8177         dXSTARG;
8178 #line 4187 "SDL_perl.xs"
8179                 RETVAL = stringRGBA( dst, x, y, c, r, g, b, a );
8180 #line 8181 "SDL_perl.c"
8181         XSprePUSH; PUSHi((IV)RETVAL);
8182     }
8183     XSRETURN(1);
8184 }
8185
8186 #endif
8187 #ifdef HAVE_SDL_SVG
8188 #define XSubPPtmpAAAG 1
8189
8190 XS(XS_SDL_SVG_Load); /* prototype to pass -Wmissing-prototypes */
8191 XS(XS_SDL_SVG_Load)
8192 {
8193     dXSARGS;
8194     if (items != 1)
8195         Perl_croak(aTHX_ "Usage: SDL::SVG_Load(filename)");
8196     {
8197         char*   filename = (char *)SvPV_nolen(ST(0));
8198         SDL_svg_context *       RETVAL;
8199         dXSTARG;
8200 #line 4200 "SDL_perl.xs"
8201                 RETVAL = SVG_Load(filename);
8202 #line 8203 "SDL_perl.c"
8203         XSprePUSH; PUSHi(PTR2IV(RETVAL));
8204     }
8205     XSRETURN(1);
8206 }
8207
8208 XS(XS_SDL_SVG_LoadBuffer); /* prototype to pass -Wmissing-prototypes */
8209 XS(XS_SDL_SVG_LoadBuffer)
8210 {
8211     dXSARGS;
8212     if (items != 2)
8213         Perl_croak(aTHX_ "Usage: SDL::SVG_LoadBuffer(data, len)");
8214     {
8215         char*   data = (char *)SvPV_nolen(ST(0));
8216         int     len = (int)SvIV(ST(1));
8217         SDL_svg_context *       RETVAL;
8218         dXSTARG;
8219 #line 4209 "SDL_perl.xs"
8220                 RETVAL = SVG_LoadBuffer(data,len);
8221 #line 8222 "SDL_perl.c"
8222         XSprePUSH; PUSHi(PTR2IV(RETVAL));
8223     }
8224     XSRETURN(1);
8225 }
8226
8227 XS(XS_SDL_SVG_SetOffset); /* prototype to pass -Wmissing-prototypes */
8228 XS(XS_SDL_SVG_SetOffset)
8229 {
8230     dXSARGS;
8231     if (items != 3)
8232         Perl_croak(aTHX_ "Usage: SDL::SVG_SetOffset(source, xoff, yoff)");
8233     {
8234         SDL_svg_context*        source = INT2PTR(SDL_svg_context *,SvIV(ST(0)));
8235         double  xoff = (double)SvNV(ST(1));
8236         double  yoff = (double)SvNV(ST(2));
8237         int     RETVAL;
8238         dXSTARG;
8239 #line 4219 "SDL_perl.xs"
8240                 RETVAL = SVG_SetOffset(source,xoff,yoff);
8241 #line 8242 "SDL_perl.c"
8242         XSprePUSH; PUSHi((IV)RETVAL);
8243     }
8244     XSRETURN(1);
8245 }
8246
8247 XS(XS_SDL_SVG_SetScale); /* prototype to pass -Wmissing-prototypes */
8248 XS(XS_SDL_SVG_SetScale)
8249 {
8250     dXSARGS;
8251     if (items != 3)
8252         Perl_croak(aTHX_ "Usage: SDL::SVG_SetScale(source, xscale, yscale)");
8253     {
8254         SDL_svg_context*        source = INT2PTR(SDL_svg_context *,SvIV(ST(0)));
8255         double  xscale = (double)SvNV(ST(1));
8256         double  yscale = (double)SvNV(ST(2));
8257         int     RETVAL;
8258         dXSTARG;
8259 #line 4229 "SDL_perl.xs"
8260                 RETVAL = SVG_SetScale(source,xscale,yscale);
8261 #line 8262 "SDL_perl.c"
8262         XSprePUSH; PUSHi((IV)RETVAL);
8263     }
8264     XSRETURN(1);
8265 }
8266
8267 XS(XS_SDL_SVG_RenderToSurface); /* prototype to pass -Wmissing-prototypes */
8268 XS(XS_SDL_SVG_RenderToSurface)
8269 {
8270     dXSARGS;
8271     if (items != 4)
8272         Perl_croak(aTHX_ "Usage: SDL::SVG_RenderToSurface(source, x, y, dest)");
8273     {
8274         SDL_svg_context*        source = INT2PTR(SDL_svg_context *,SvIV(ST(0)));
8275         int     x = (int)SvIV(ST(1));
8276         int     y = (int)SvIV(ST(2));
8277         SDL_Surface*    dest = INT2PTR(SDL_Surface *,SvIV(ST(3)));
8278         int     RETVAL;
8279         dXSTARG;
8280 #line 4240 "SDL_perl.xs"
8281                 RETVAL = SVG_RenderToSurface(source,x,y,dest);
8282 #line 8283 "SDL_perl.c"
8283         XSprePUSH; PUSHi((IV)RETVAL);
8284     }
8285     XSRETURN(1);
8286 }
8287
8288 XS(XS_SDL_SVG_Free); /* prototype to pass -Wmissing-prototypes */
8289 XS(XS_SDL_SVG_Free)
8290 {
8291     dXSARGS;
8292     if (items != 1)
8293         Perl_croak(aTHX_ "Usage: SDL::SVG_Free(source)");
8294     {
8295         SDL_svg_context*        source = INT2PTR(SDL_svg_context *,SvIV(ST(0)));
8296 #line 4248 "SDL_perl.xs"
8297                 SVG_Free(source);       
8298 #line 8299 "SDL_perl.c"
8299     }
8300     XSRETURN_EMPTY;
8301 }
8302
8303 XS(XS_SDL_SVG_Set_Flags); /* prototype to pass -Wmissing-prototypes */
8304 XS(XS_SDL_SVG_Set_Flags)
8305 {
8306     dXSARGS;
8307     if (items != 2)
8308         Perl_croak(aTHX_ "Usage: SDL::SVG_Set_Flags(source, flags)");
8309     {
8310         SDL_svg_context*        source = INT2PTR(SDL_svg_context *,SvIV(ST(0)));
8311         Uint32  flags = (Uint32)SvUV(ST(1));
8312 #line 4255 "SDL_perl.xs"
8313                 SVG_Set_Flags(source,flags);
8314 #line 8315 "SDL_perl.c"
8315     }
8316     XSRETURN_EMPTY;
8317 }
8318
8319 XS(XS_SDL_SVG_Width); /* prototype to pass -Wmissing-prototypes */
8320 XS(XS_SDL_SVG_Width)
8321 {
8322     dXSARGS;
8323     if (items != 1)
8324         Perl_croak(aTHX_ "Usage: SDL::SVG_Width(source)");
8325     {
8326         SDL_svg_context*        source = INT2PTR(SDL_svg_context *,SvIV(ST(0)));
8327         float   RETVAL;
8328         dXSTARG;
8329 #line 4261 "SDL_perl.xs"
8330                 RETVAL = SVG_Width(source);
8331 #line 8332 "SDL_perl.c"
8332         XSprePUSH; PUSHn((double)RETVAL);
8333     }
8334     XSRETURN(1);
8335 }
8336
8337 XS(XS_SDL_SVG_HEIGHT); /* prototype to pass -Wmissing-prototypes */
8338 XS(XS_SDL_SVG_HEIGHT)
8339 {
8340     dXSARGS;
8341     if (items != 1)
8342         Perl_croak(aTHX_ "Usage: SDL::SVG_HEIGHT(source)");
8343     {
8344         SDL_svg_context*        source = INT2PTR(SDL_svg_context *,SvIV(ST(0)));
8345         float   RETVAL;
8346         dXSTARG;
8347 #line 4269 "SDL_perl.xs"
8348                 RETVAL = SVG_Height(source);
8349 #line 8350 "SDL_perl.c"
8350         XSprePUSH; PUSHn((double)RETVAL);
8351     }
8352     XSRETURN(1);
8353 }
8354
8355 XS(XS_SDL_SVG_SetClipping); /* prototype to pass -Wmissing-prototypes */
8356 XS(XS_SDL_SVG_SetClipping)
8357 {
8358     dXSARGS;
8359     if (items != 5)
8360         Perl_croak(aTHX_ "Usage: SDL::SVG_SetClipping(source, minx, miny, maxx, maxy)");
8361     {
8362         SDL_svg_context*        source = INT2PTR(SDL_svg_context *,SvIV(ST(0)));
8363         int     minx = (int)SvIV(ST(1));
8364         int     miny = (int)SvIV(ST(2));
8365         int     maxx = (int)SvIV(ST(3));
8366         int     maxy = (int)SvIV(ST(4));
8367 #line 4281 "SDL_perl.xs"
8368                 SVG_SetClipping(source,minx,miny,maxx,maxy);
8369 #line 8370 "SDL_perl.c"
8370     }
8371     XSRETURN_EMPTY;
8372 }
8373
8374 XS(XS_SDL_SVG_Version); /* prototype to pass -Wmissing-prototypes */
8375 XS(XS_SDL_SVG_Version)
8376 {
8377     dXSARGS;
8378     if (items != 0)
8379         Perl_croak(aTHX_ "Usage: SDL::SVG_Version()");
8380     {
8381         int     RETVAL;
8382         dXSTARG;
8383 #line 4286 "SDL_perl.xs"
8384                 RETVAL = SVG_Version();
8385 #line 8386 "SDL_perl.c"
8386         XSprePUSH; PUSHi((IV)RETVAL);
8387     }
8388     XSRETURN(1);
8389 }
8390
8391 #endif
8392 #ifdef HAVE_SDL_SOUND
8393 #define XSubPPtmpAAAH 1
8394
8395 XS(XS_SDL_SoundAudioInfoFormat); /* prototype to pass -Wmissing-prototypes */
8396 XS(XS_SDL_SoundAudioInfoFormat)
8397 {
8398     dXSARGS;
8399     if (items != 1)
8400         Perl_croak(aTHX_ "Usage: SDL::SoundAudioInfoFormat(audioinfo)");
8401     {
8402         Sound_AudioInfo*        audioinfo = INT2PTR(Sound_AudioInfo *,SvIV(ST(0)));
8403         Uint16  RETVAL;
8404         dXSTARG;
8405 #line 4299 "SDL_perl.xs"
8406                 RETVAL = audioinfo->format;
8407 #line 8408 "SDL_perl.c"
8408         XSprePUSH; PUSHu((UV)RETVAL);
8409     }
8410     XSRETURN(1);
8411 }
8412
8413 XS(XS_SDL_SoundAudioInfoChannels); /* prototype to pass -Wmissing-prototypes */
8414 XS(XS_SDL_SoundAudioInfoChannels)
8415 {
8416     dXSARGS;
8417     if (items != 1)
8418         Perl_croak(aTHX_ "Usage: SDL::SoundAudioInfoChannels(audioinfo)");
8419     {
8420         Sound_AudioInfo*        audioinfo = INT2PTR(Sound_AudioInfo *,SvIV(ST(0)));
8421         Uint8   RETVAL;
8422         dXSTARG;
8423 #line 4307 "SDL_perl.xs"
8424                 RETVAL = audioinfo->channels;
8425 #line 8426 "SDL_perl.c"
8426         XSprePUSH; PUSHu((UV)RETVAL);
8427     }
8428     XSRETURN(1);
8429 }
8430
8431 XS(XS_SDL_SoundAudioInforate); /* prototype to pass -Wmissing-prototypes */
8432 XS(XS_SDL_SoundAudioInforate)
8433 {
8434     dXSARGS;
8435     if (items != 1)
8436         Perl_croak(aTHX_ "Usage: SDL::SoundAudioInforate(audioinfo)");
8437     {
8438         Sound_AudioInfo*        audioinfo = INT2PTR(Sound_AudioInfo *,SvIV(ST(0)));
8439         Uint32  RETVAL;
8440         dXSTARG;
8441 #line 4315 "SDL_perl.xs"
8442                 RETVAL = audioinfo->rate;
8443 #line 8444 "SDL_perl.c"
8444         XSprePUSH; PUSHu((UV)RETVAL);
8445     }
8446     XSRETURN(1);
8447 }
8448
8449 XS(XS_SDL_SoundDecoderInfoExtensions); /* prototype to pass -Wmissing-prototypes */
8450 XS(XS_SDL_SoundDecoderInfoExtensions)
8451 {
8452     dXSARGS;
8453     if (items != 1)
8454         Perl_croak(aTHX_ "Usage: SDL::SoundDecoderInfoExtensions(decoderinfo)");
8455     {
8456         Sound_DecoderInfo*      decoderinfo = INT2PTR(Sound_DecoderInfo *,SvIV(ST(0)));
8457         AV *    RETVAL;
8458 #line 4323 "SDL_perl.xs"
8459                 const char **ext;
8460                 for ( ext = decoderinfo->extensions; *ext != NULL; ext++ ){
8461                         av_push(RETVAL,newSVpv(*ext,0));
8462                 }
8463 #line 8464 "SDL_perl.c"
8464         ST(0) = newRV((SV*)RETVAL);
8465         sv_2mortal(ST(0));
8466     }
8467     XSRETURN(1);
8468 }
8469
8470 XS(XS_SDL_SoundDecoderInfoDescription); /* prototype to pass -Wmissing-prototypes */
8471 XS(XS_SDL_SoundDecoderInfoDescription)
8472 {
8473     dXSARGS;
8474     if (items != 1)
8475         Perl_croak(aTHX_ "Usage: SDL::SoundDecoderInfoDescription(decoderinfo)");
8476     {
8477         Sound_DecoderInfo*      decoderinfo = INT2PTR(Sound_DecoderInfo *,SvIV(ST(0)));
8478         const char *    RETVAL;
8479         dXSTARG;
8480 #line 4334 "SDL_perl.xs"
8481                 RETVAL = decoderinfo->description;
8482 #line 8483 "SDL_perl.c"
8483         sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
8484     }
8485     XSRETURN(1);
8486 }
8487
8488 XS(XS_SDL_SoundDecoderInfoAuthor); /* prototype to pass -Wmissing-prototypes */
8489 XS(XS_SDL_SoundDecoderInfoAuthor)
8490 {
8491     dXSARGS;
8492     if (items != 1)
8493         Perl_croak(aTHX_ "Usage: SDL::SoundDecoderInfoAuthor(decoderinfo)");
8494     {
8495         Sound_DecoderInfo*      decoderinfo = INT2PTR(Sound_DecoderInfo *,SvIV(ST(0)));
8496         const char *    RETVAL;
8497         dXSTARG;
8498 #line 4342 "SDL_perl.xs"
8499                 RETVAL = decoderinfo->author;
8500 #line 8501 "SDL_perl.c"
8501         sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
8502     }
8503     XSRETURN(1);
8504 }
8505
8506 XS(XS_SDL_SoundDecoderInfoUrl); /* prototype to pass -Wmissing-prototypes */
8507 XS(XS_SDL_SoundDecoderInfoUrl)
8508 {
8509     dXSARGS;
8510     if (items != 1)
8511         Perl_croak(aTHX_ "Usage: SDL::SoundDecoderInfoUrl(decoderinfo)");
8512     {
8513         Sound_DecoderInfo*      decoderinfo = INT2PTR(Sound_DecoderInfo *,SvIV(ST(0)));
8514         const char *    RETVAL;
8515         dXSTARG;
8516 #line 4350 "SDL_perl.xs"
8517                 RETVAL = decoderinfo->url;
8518 #line 8519 "SDL_perl.c"
8519         sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
8520     }
8521     XSRETURN(1);
8522 }
8523
8524 XS(XS_SDL_SoundSampleDecoder); /* prototype to pass -Wmissing-prototypes */
8525 XS(XS_SDL_SoundSampleDecoder)
8526 {
8527     dXSARGS;
8528     if (items != 1)
8529         Perl_croak(aTHX_ "Usage: SDL::SoundSampleDecoder(sample)");
8530     {
8531         Sound_Sample*   sample = INT2PTR(Sound_Sample *,SvIV(ST(0)));
8532         const Sound_DecoderInfo *       RETVAL;
8533         dXSTARG;
8534 #line 4358 "SDL_perl.xs"
8535                 RETVAL = sample->decoder;
8536 #line 8537 "SDL_perl.c"
8537         XSprePUSH; PUSHi(PTR2IV(RETVAL));
8538     }
8539     XSRETURN(1);
8540 }
8541
8542 XS(XS_SDL_SoundSampleDesired); /* prototype to pass -Wmissing-prototypes */
8543 XS(XS_SDL_SoundSampleDesired)
8544 {
8545     dXSARGS;
8546     if (items != 1)
8547         Perl_croak(aTHX_ "Usage: SDL::SoundSampleDesired(sample)");
8548     {
8549         Sound_Sample*   sample = INT2PTR(Sound_Sample *,SvIV(ST(0)));
8550         Sound_AudioInfo *       RETVAL;
8551         dXSTARG;
8552 #line 4366 "SDL_perl.xs"
8553                 RETVAL = &sample->desired;
8554 #line 8555 "SDL_perl.c"
8555         XSprePUSH; PUSHi(PTR2IV(RETVAL));
8556     }
8557     XSRETURN(1);
8558 }
8559
8560 XS(XS_SDL_SoundSampleAcutal); /* prototype to pass -Wmissing-prototypes */
8561 XS(XS_SDL_SoundSampleAcutal)
8562 {
8563     dXSARGS;
8564     if (items != 1)
8565         Perl_croak(aTHX_ "Usage: SDL::SoundSampleAcutal(sample)");
8566     {
8567         Sound_Sample*   sample = INT2PTR(Sound_Sample *,SvIV(ST(0)));
8568         Sound_AudioInfo *       RETVAL;
8569         dXSTARG;
8570 #line 4374 "SDL_perl.xs"
8571                 RETVAL = &sample->actual;
8572 #line 8573 "SDL_perl.c"
8573         XSprePUSH; PUSHi(PTR2IV(RETVAL));
8574     }
8575     XSRETURN(1);
8576 }
8577
8578 XS(XS_SDL_SoundSampleBuffer); /* prototype to pass -Wmissing-prototypes */
8579 XS(XS_SDL_SoundSampleBuffer)
8580 {
8581     dXSARGS;
8582     if (items != 1)
8583         Perl_croak(aTHX_ "Usage: SDL::SoundSampleBuffer(sample)");
8584     {
8585         Sound_Sample*   sample = INT2PTR(Sound_Sample *,SvIV(ST(0)));
8586         char *  RETVAL;
8587         dXSTARG;
8588 #line 4382 "SDL_perl.xs"
8589                 RETVAL = sample->buffer;
8590 #line 8591 "SDL_perl.c"
8591         sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
8592     }
8593     XSRETURN(1);
8594 }
8595
8596 XS(XS_SDL_SoundSampleBufferSize); /* prototype to pass -Wmissing-prototypes */
8597 XS(XS_SDL_SoundSampleBufferSize)
8598 {
8599     dXSARGS;
8600     if (items != 1)
8601         Perl_croak(aTHX_ "Usage: SDL::SoundSampleBufferSize(sample)");
8602     {
8603         Sound_Sample*   sample = INT2PTR(Sound_Sample *,SvIV(ST(0)));
8604         Uint32  RETVAL;
8605         dXSTARG;
8606 #line 4390 "SDL_perl.xs"
8607                 RETVAL = sample->buffer_size;
8608 #line 8609 "SDL_perl.c"
8609         XSprePUSH; PUSHu((UV)RETVAL);
8610     }
8611     XSRETURN(1);
8612 }
8613
8614 XS(XS_SDL_SoundSampleFlags); /* prototype to pass -Wmissing-prototypes */
8615 XS(XS_SDL_SoundSampleFlags)
8616 {
8617     dXSARGS;
8618     if (items != 1)
8619         Perl_croak(aTHX_ "Usage: SDL::SoundSampleFlags(sample)");
8620     {
8621         Sound_Sample*   sample = INT2PTR(Sound_Sample *,SvIV(ST(0)));
8622         Uint32  RETVAL;
8623         dXSTARG;
8624 #line 4398 "SDL_perl.xs"
8625                 RETVAL = (Uint32)sample->flags;
8626 #line 8627 "SDL_perl.c"
8627         XSprePUSH; PUSHu((UV)RETVAL);
8628     }
8629     XSRETURN(1);
8630 }
8631
8632 XS(XS_SDL_Sound_Init); /* prototype to pass -Wmissing-prototypes */
8633 XS(XS_SDL_Sound_Init)
8634 {
8635     dXSARGS;
8636     if (items != 0)
8637         Perl_croak(aTHX_ "Usage: SDL::Sound_Init()");
8638     {
8639         int     RETVAL;
8640         dXSTARG;
8641 #line 4405 "SDL_perl.xs"
8642                 RETVAL = Sound_Init();
8643 #line 8644 "SDL_perl.c"
8644         XSprePUSH; PUSHi((IV)RETVAL);
8645     }
8646     XSRETURN(1);
8647 }
8648
8649 XS(XS_SDL_Sound_Quit); /* prototype to pass -Wmissing-prototypes */
8650 XS(XS_SDL_Sound_Quit)
8651 {
8652     dXSARGS;
8653     if (items != 0)
8654         Perl_croak(aTHX_ "Usage: SDL::Sound_Quit()");
8655     {
8656         int     RETVAL;
8657         dXSTARG;
8658 #line 4412 "SDL_perl.xs"
8659                 RETVAL = Sound_Quit();
8660 #line 8661 "SDL_perl.c"
8661         XSprePUSH; PUSHi((IV)RETVAL);
8662     }
8663     XSRETURN(1);
8664 }
8665
8666 XS(XS_SDL_Sound_AvailableDecoders); /* prototype to pass -Wmissing-prototypes */
8667 XS(XS_SDL_Sound_AvailableDecoders)
8668 {
8669     dXSARGS;
8670     if (items != 0)
8671         Perl_croak(aTHX_ "Usage: SDL::Sound_AvailableDecoders()");
8672     {
8673         AV *    RETVAL;
8674 #line 4419 "SDL_perl.xs"
8675                 RETVAL = newAV();
8676                 const Sound_DecoderInfo** sdi;
8677                 sdi = Sound_AvailableDecoders();
8678                 if (sdi != NULL)  {
8679                         for (;*sdi != NULL; ++sdi) {
8680                                 av_push(RETVAL,sv_2mortal(newSViv(PTR2IV(*sdi))));
8681                         }
8682                 }
8683 #line 8684 "SDL_perl.c"
8684         ST(0) = newRV((SV*)RETVAL);
8685         sv_2mortal(ST(0));
8686     }
8687     XSRETURN(1);
8688 }
8689
8690 XS(XS_SDL_Sound_GetError); /* prototype to pass -Wmissing-prototypes */
8691 XS(XS_SDL_Sound_GetError)
8692 {
8693     dXSARGS;
8694     if (items != 0)
8695         Perl_croak(aTHX_ "Usage: SDL::Sound_GetError()");
8696     {
8697         const char *    RETVAL;
8698         dXSTARG;
8699 #line 4433 "SDL_perl.xs"
8700                 RETVAL = Sound_GetError();
8701 #line 8702 "SDL_perl.c"
8702         sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
8703     }
8704     XSRETURN(1);
8705 }
8706
8707 XS(XS_SDL_Sound_ClearError); /* prototype to pass -Wmissing-prototypes */
8708 XS(XS_SDL_Sound_ClearError)
8709 {
8710     dXSARGS;
8711     if (items != 0)
8712         Perl_croak(aTHX_ "Usage: SDL::Sound_ClearError()");
8713     {
8714 #line 4440 "SDL_perl.xs"
8715                 Sound_ClearError();
8716 #line 8717 "SDL_perl.c"
8717     }
8718     XSRETURN_EMPTY;
8719 }
8720
8721 XS(XS_SDL_Sound_NewSample); /* prototype to pass -Wmissing-prototypes */
8722 XS(XS_SDL_Sound_NewSample)
8723 {
8724     dXSARGS;
8725     if (items != 4)
8726         Perl_croak(aTHX_ "Usage: SDL::Sound_NewSample(rw, ext, desired, buffsize)");
8727     {
8728         SDL_RWops*      rw = INT2PTR(SDL_RWops *,SvIV(ST(0)));
8729         const char*     ext = (const char *)SvPV_nolen(ST(1));
8730         Sound_AudioInfo*        desired = INT2PTR(Sound_AudioInfo *,SvIV(ST(2)));
8731         Uint32  buffsize = (Uint32)SvUV(ST(3));
8732         Sound_Sample *  RETVAL;
8733         dXSTARG;
8734 #line 4449 "SDL_perl.xs"
8735                 RETVAL = Sound_NewSample(rw,ext,desired,buffsize);
8736 #line 8737 "SDL_perl.c"
8737         XSprePUSH; PUSHi(PTR2IV(RETVAL));
8738     }
8739     XSRETURN(1);
8740 }
8741
8742 XS(XS_SDL_Sound_NewSampleFromMem); /* prototype to pass -Wmissing-prototypes */
8743 XS(XS_SDL_Sound_NewSampleFromMem)
8744 {
8745     dXSARGS;
8746     if (items != 5)
8747         Perl_croak(aTHX_ "Usage: SDL::Sound_NewSampleFromMem(data, size, ext, desired, buffsize)");
8748     {
8749         const Uint8 *   data = INT2PTR(const Uint8 *,SvIV(ST(0)));
8750         Uint32  size = (Uint32)SvUV(ST(1));
8751         const char*     ext = (const char *)SvPV_nolen(ST(2));
8752         Sound_AudioInfo*        desired = INT2PTR(Sound_AudioInfo *,SvIV(ST(3)));
8753         Uint32  buffsize = (Uint32)SvUV(ST(4));
8754         Sound_Sample *  RETVAL;
8755         dXSTARG;
8756 #line 4461 "SDL_perl.xs"
8757                 RETVAL = Sound_NewSampleFromMem(data,size,ext,desired,buffsize);
8758 #line 8759 "SDL_perl.c"
8759         XSprePUSH; PUSHi(PTR2IV(RETVAL));
8760     }
8761     XSRETURN(1);
8762 }
8763
8764 XS(XS_SDL_Sound_NewSampleFromFile); /* prototype to pass -Wmissing-prototypes */
8765 XS(XS_SDL_Sound_NewSampleFromFile)
8766 {
8767     dXSARGS;
8768     if (items != 3)
8769         Perl_croak(aTHX_ "Usage: SDL::Sound_NewSampleFromFile(fname, desired, buffsize)");
8770     {
8771         const char*     fname = (const char *)SvPV_nolen(ST(0));
8772         Sound_AudioInfo*        desired = INT2PTR(Sound_AudioInfo *,SvIV(ST(1)));
8773         Uint32  buffsize = (Uint32)SvUV(ST(2));
8774         Sound_Sample *  RETVAL;
8775         dXSTARG;
8776 #line 4471 "SDL_perl.xs"
8777                 RETVAL = Sound_NewSampleFromFile(fname,desired,buffsize);
8778 #line 8779 "SDL_perl.c"
8779         XSprePUSH; PUSHi(PTR2IV(RETVAL));
8780     }
8781     XSRETURN(1);
8782 }
8783
8784 XS(XS_SDL_Sound_FreeSample); /* prototype to pass -Wmissing-prototypes */
8785 XS(XS_SDL_Sound_FreeSample)
8786 {
8787     dXSARGS;
8788     if (items != 1)
8789         Perl_croak(aTHX_ "Usage: SDL::Sound_FreeSample(sample)");
8790     {
8791         Sound_Sample*   sample = INT2PTR(Sound_Sample *,SvIV(ST(0)));
8792 #line 4479 "SDL_perl.xs"
8793                 Sound_FreeSample(sample);
8794 #line 8795 "SDL_perl.c"
8795     }
8796     XSRETURN_EMPTY;
8797 }
8798
8799 XS(XS_SDL_Sound_GetDuration); /* prototype to pass -Wmissing-prototypes */
8800 XS(XS_SDL_Sound_GetDuration)
8801 {
8802     dXSARGS;
8803     if (items != 1)
8804         Perl_croak(aTHX_ "Usage: SDL::Sound_GetDuration(sample)");
8805     {
8806         Sound_Sample*   sample = INT2PTR(Sound_Sample *,SvIV(ST(0)));
8807         Sint32  RETVAL;
8808         dXSTARG;
8809 #line 4485 "SDL_perl.xs"
8810                 RETVAL = Sound_GetDuration(sample);
8811 #line 8812 "SDL_perl.c"
8812         XSprePUSH; PUSHi((IV)RETVAL);
8813     }
8814     XSRETURN(1);
8815 }
8816
8817 XS(XS_SDL_Sound_SetBufferSize); /* prototype to pass -Wmissing-prototypes */
8818 XS(XS_SDL_Sound_SetBufferSize)
8819 {
8820     dXSARGS;
8821     if (items != 2)
8822         Perl_croak(aTHX_ "Usage: SDL::Sound_SetBufferSize(sample, size)");
8823     {
8824         Sound_Sample*   sample = INT2PTR(Sound_Sample *,SvIV(ST(0)));
8825         Uint32  size = (Uint32)SvUV(ST(1));
8826         int     RETVAL;
8827         dXSTARG;
8828 #line 4494 "SDL_perl.xs"
8829                 RETVAL = Sound_SetBufferSize(sample,size);
8830 #line 8831 "SDL_perl.c"
8831         XSprePUSH; PUSHi((IV)RETVAL);
8832     }
8833     XSRETURN(1);
8834 }
8835
8836 XS(XS_SDL_Sound_Decode); /* prototype to pass -Wmissing-prototypes */
8837 XS(XS_SDL_Sound_Decode)
8838 {
8839     dXSARGS;
8840     if (items != 1)
8841         Perl_croak(aTHX_ "Usage: SDL::Sound_Decode(sample)");
8842     {
8843         Sound_Sample*   sample = INT2PTR(Sound_Sample *,SvIV(ST(0)));
8844         Uint32  RETVAL;
8845         dXSTARG;
8846 #line 4502 "SDL_perl.xs"
8847                 RETVAL = Sound_Decode(sample);
8848 #line 8849 "SDL_perl.c"
8849         XSprePUSH; PUSHu((UV)RETVAL);
8850     }
8851     XSRETURN(1);
8852 }
8853
8854 XS(XS_SDL_Sound_DecodeAll); /* prototype to pass -Wmissing-prototypes */
8855 XS(XS_SDL_Sound_DecodeAll)
8856 {
8857     dXSARGS;
8858     if (items != 1)
8859         Perl_croak(aTHX_ "Usage: SDL::Sound_DecodeAll(sample)");
8860     {
8861         Sound_Sample*   sample = INT2PTR(Sound_Sample *,SvIV(ST(0)));
8862         Uint32  RETVAL;
8863         dXSTARG;
8864 #line 4510 "SDL_perl.xs"
8865                 RETVAL = Sound_DecodeAll(sample);
8866 #line 8867 "SDL_perl.c"
8867         XSprePUSH; PUSHu((UV)RETVAL);
8868     }
8869     XSRETURN(1);
8870 }
8871
8872 XS(XS_SDL_Sound_Rewind); /* prototype to pass -Wmissing-prototypes */
8873 XS(XS_SDL_Sound_Rewind)
8874 {
8875     dXSARGS;
8876     if (items != 1)
8877         Perl_croak(aTHX_ "Usage: SDL::Sound_Rewind(sample)");
8878     {
8879         Sound_Sample*   sample = INT2PTR(Sound_Sample *,SvIV(ST(0)));
8880         int     RETVAL;
8881         dXSTARG;
8882 #line 4518 "SDL_perl.xs"
8883                 RETVAL = Sound_Rewind(sample);
8884 #line 8885 "SDL_perl.c"
8885         XSprePUSH; PUSHi((IV)RETVAL);
8886     }
8887     XSRETURN(1);
8888 }
8889
8890 XS(XS_SDL_Sound_Seek); /* prototype to pass -Wmissing-prototypes */
8891 XS(XS_SDL_Sound_Seek)
8892 {
8893     dXSARGS;
8894     if (items != 2)
8895         Perl_croak(aTHX_ "Usage: SDL::Sound_Seek(sample, ms)");
8896     {
8897         Sound_Sample*   sample = INT2PTR(Sound_Sample *,SvIV(ST(0)));
8898         Uint32  ms = (Uint32)SvUV(ST(1));
8899         int     RETVAL;
8900         dXSTARG;
8901 #line 4527 "SDL_perl.xs"
8902                 RETVAL = Sound_Seek(sample,ms);
8903 #line 8904 "SDL_perl.c"
8904         XSprePUSH; PUSHi((IV)RETVAL);
8905     }
8906     XSRETURN(1);
8907 }
8908
8909 #endif
8910 #ifdef __cplusplus
8911 extern "C"
8912 #endif
8913 XS(boot_SDL); /* prototype to pass -Wmissing-prototypes */
8914 XS(boot_SDL)
8915 {
8916     dXSARGS;
8917     char* file = __FILE__;
8918
8919     XS_VERSION_BOOTCHECK ;
8920
8921         newXS("SDL::GetError", XS_SDL_GetError, file);
8922         newXS("SDL::Init", XS_SDL_Init, file);
8923         newXS("SDL::InitSubSystem", XS_SDL_InitSubSystem, file);
8924         newXS("SDL::QuitSubSystem", XS_SDL_QuitSubSystem, file);
8925         newXS("SDL::Quit", XS_SDL_Quit, file);
8926         newXS("SDL::WasInit", XS_SDL_WasInit, file);
8927         newXS("SDL::Delay", XS_SDL_Delay, file);
8928         newXS("SDL::GetTicks", XS_SDL_GetTicks, file);
8929         newXS("SDL::SetTimer", XS_SDL_SetTimer, file);
8930         newXS("SDL::AddTimer", XS_SDL_AddTimer, file);
8931         newXS("SDL::PerlTimerCallback", XS_SDL_PerlTimerCallback, file);
8932         newXS("SDL::NewTimer", XS_SDL_NewTimer, file);
8933         newXS("SDL::RemoveTimer", XS_SDL_RemoveTimer, file);
8934         newXS("SDL::RWFromFile", XS_SDL_RWFromFile, file);
8935         newXS("SDL::RWFromFP", XS_SDL_RWFromFP, file);
8936         newXS("SDL::RWFromMem", XS_SDL_RWFromMem, file);
8937         newXS("SDL::RWFromConstMem", XS_SDL_RWFromConstMem, file);
8938         newXS("SDL::AllocRW", XS_SDL_AllocRW, file);
8939         newXS("SDL::FreeRW", XS_SDL_FreeRW, file);
8940         newXS("SDL::RWseek", XS_SDL_RWseek, file);
8941         newXS("SDL::RWtell", XS_SDL_RWtell, file);
8942         newXS("SDL::RWread", XS_SDL_RWread, file);
8943         newXS("SDL::RWwrite", XS_SDL_RWwrite, file);
8944         newXS("SDL::RWclose", XS_SDL_RWclose, file);
8945         newXS("SDL::CDNumDrives", XS_SDL_CDNumDrives, file);
8946         newXS("SDL::CDName", XS_SDL_CDName, file);
8947         newXS("SDL::CDOpen", XS_SDL_CDOpen, file);
8948         newXS("SDL::CDTrackId", XS_SDL_CDTrackId, file);
8949         newXS("SDL::CDTrackType", XS_SDL_CDTrackType, file);
8950         newXS("SDL::CDTrackLength", XS_SDL_CDTrackLength, file);
8951         newXS("SDL::CDTrackOffset", XS_SDL_CDTrackOffset, file);
8952         newXS("SDL::CDStatus", XS_SDL_CDStatus, file);
8953         newXS("SDL::CDPlayTracks", XS_SDL_CDPlayTracks, file);
8954         newXS("SDL::CDPlay", XS_SDL_CDPlay, file);
8955         newXS("SDL::CDPause", XS_SDL_CDPause, file);
8956         newXS("SDL::CDResume", XS_SDL_CDResume, file);
8957         newXS("SDL::CDStop", XS_SDL_CDStop, file);
8958         newXS("SDL::CDEject", XS_SDL_CDEject, file);
8959         newXS("SDL::CDClose", XS_SDL_CDClose, file);
8960         newXS("SDL::CDId", XS_SDL_CDId, file);
8961         newXS("SDL::CDNumTracks", XS_SDL_CDNumTracks, file);
8962         newXS("SDL::CDCurTrack", XS_SDL_CDCurTrack, file);
8963         newXS("SDL::CDCurFrame", XS_SDL_CDCurFrame, file);
8964         newXS("SDL::CDTrack", XS_SDL_CDTrack, file);
8965         newXS("SDL::PumpEvents", XS_SDL_PumpEvents, file);
8966         newXS("SDL::PushEvent", XS_SDL_PushEvent, file);
8967         newXS("SDL::NewEvent", XS_SDL_NewEvent, file);
8968         newXS("SDL::FreeEvent", XS_SDL_FreeEvent, file);
8969         newXS("SDL::PollEvent", XS_SDL_PollEvent, file);
8970         newXS("SDL::WaitEvent", XS_SDL_WaitEvent, file);
8971         newXS("SDL::EventState", XS_SDL_EventState, file);
8972         newXS("SDL::EventType", XS_SDL_EventType, file);
8973         newXS("SDL::SetEventType", XS_SDL_SetEventType, file);
8974         newXS("SDL::ActiveEventGain", XS_SDL_ActiveEventGain, file);
8975         newXS("SDL::ActiveEventState", XS_SDL_ActiveEventState, file);
8976         newXS("SDL::KeyEventState", XS_SDL_KeyEventState, file);
8977         newXS("SDL::KeyEventSym", XS_SDL_KeyEventSym, file);
8978         newXS("SDL::KeyEventMod", XS_SDL_KeyEventMod, file);
8979         newXS("SDL::KeyEventUnicode", XS_SDL_KeyEventUnicode, file);
8980         newXS("SDL::KeyEventScanCode", XS_SDL_KeyEventScanCode, file);
8981         newXS("SDL::MouseMotionState", XS_SDL_MouseMotionState, file);
8982         newXS("SDL::MouseMotionX", XS_SDL_MouseMotionX, file);
8983         newXS("SDL::MouseMotionY", XS_SDL_MouseMotionY, file);
8984         newXS("SDL::MouseMotionXrel", XS_SDL_MouseMotionXrel, file);
8985         newXS("SDL::MouseMotionYrel", XS_SDL_MouseMotionYrel, file);
8986         newXS("SDL::MouseButtonState", XS_SDL_MouseButtonState, file);
8987         newXS("SDL::MouseButton", XS_SDL_MouseButton, file);
8988         newXS("SDL::MouseButtonX", XS_SDL_MouseButtonX, file);
8989         newXS("SDL::MouseButtonY", XS_SDL_MouseButtonY, file);
8990         newXS("SDL::SysWMEventMsg", XS_SDL_SysWMEventMsg, file);
8991         newXS("SDL::EnableUnicode", XS_SDL_EnableUnicode, file);
8992         newXS("SDL::EnableKeyRepeat", XS_SDL_EnableKeyRepeat, file);
8993         newXS("SDL::GetModState", XS_SDL_GetModState, file);
8994         newXS("SDL::SetModState", XS_SDL_SetModState, file);
8995         newXS("SDL::GetKeyName", XS_SDL_GetKeyName, file);
8996         newXS("SDL::CreateRGBSurface", XS_SDL_CreateRGBSurface, file);
8997         newXS("SDL::CreateRGBSurfaceFrom", XS_SDL_CreateRGBSurfaceFrom, file);
8998 #if XSubPPtmpAAAA
8999         newXS("SDL::IMGLoad", XS_SDL_IMGLoad, file);
9000 #endif
9001         newXS("SDL::SurfaceCopy", XS_SDL_SurfaceCopy, file);
9002         newXS("SDL::FreeSurface", XS_SDL_FreeSurface, file);
9003         newXS("SDL::SurfaceFlags", XS_SDL_SurfaceFlags, file);
9004         newXS("SDL::SurfacePalette", XS_SDL_SurfacePalette, file);
9005         newXS("SDL::SurfaceBitsPerPixel", XS_SDL_SurfaceBitsPerPixel, file);
9006         newXS("SDL::SurfaceBytesPerPixel", XS_SDL_SurfaceBytesPerPixel, file);
9007         newXS("SDL::SurfaceRshift", XS_SDL_SurfaceRshift, file);
9008         newXS("SDL::SurfaceGshift", XS_SDL_SurfaceGshift, file);
9009         newXS("SDL::SurfaceBshift", XS_SDL_SurfaceBshift, file);
9010         newXS("SDL::SurfaceAshift", XS_SDL_SurfaceAshift, file);
9011         newXS("SDL::SurfaceRmask", XS_SDL_SurfaceRmask, file);
9012         newXS("SDL::SurfaceGmask", XS_SDL_SurfaceGmask, file);
9013         newXS("SDL::SurfaceBmask", XS_SDL_SurfaceBmask, file);
9014         newXS("SDL::SurfaceAmask", XS_SDL_SurfaceAmask, file);
9015         newXS("SDL::SurfaceColorKey", XS_SDL_SurfaceColorKey, file);
9016         newXS("SDL::SurfaceAlpha", XS_SDL_SurfaceAlpha, file);
9017         newXS("SDL::SurfaceW", XS_SDL_SurfaceW, file);
9018         newXS("SDL::SurfaceH", XS_SDL_SurfaceH, file);
9019         newXS("SDL::SurfacePitch", XS_SDL_SurfacePitch, file);
9020         newXS("SDL::SurfacePixels", XS_SDL_SurfacePixels, file);
9021         newXS("SDL::SurfacePixel", XS_SDL_SurfacePixel, file);
9022         newXS("SDL::MUSTLOCK", XS_SDL_MUSTLOCK, file);
9023         newXS("SDL::SurfaceLock", XS_SDL_SurfaceLock, file);
9024         newXS("SDL::SurfaceUnlock", XS_SDL_SurfaceUnlock, file);
9025         newXS("SDL::GetVideoSurface", XS_SDL_GetVideoSurface, file);
9026         newXS("SDL::VideoInfo", XS_SDL_VideoInfo, file);
9027         newXS("SDL::NewRect", XS_SDL_NewRect, file);
9028         newXS("SDL::FreeRect", XS_SDL_FreeRect, file);
9029         newXS("SDL::RectX", XS_SDL_RectX, file);
9030         newXS("SDL::RectY", XS_SDL_RectY, file);
9031         newXS("SDL::RectW", XS_SDL_RectW, file);
9032         newXS("SDL::RectH", XS_SDL_RectH, file);
9033         newXS("SDL::ListModes", XS_SDL_ListModes, file);
9034         newXS("SDL::NewColor", XS_SDL_NewColor, file);
9035         newXS("SDL::ColorR", XS_SDL_ColorR, file);
9036         newXS("SDL::ColorG", XS_SDL_ColorG, file);
9037         newXS("SDL::ColorB", XS_SDL_ColorB, file);
9038         newXS("SDL::FreeColor", XS_SDL_FreeColor, file);
9039         newXS("SDL::NewPalette", XS_SDL_NewPalette, file);
9040         newXS("SDL::PaletteNColors", XS_SDL_PaletteNColors, file);
9041         newXS("SDL::PaletteColors", XS_SDL_PaletteColors, file);
9042         newXS("SDL::VideoModeOK", XS_SDL_VideoModeOK, file);
9043         newXS("SDL::SetVideoMode", XS_SDL_SetVideoMode, file);
9044         newXS("SDL::UpdateRect", XS_SDL_UpdateRect, file);
9045         newXS("SDL::UpdateRects", XS_SDL_UpdateRects, file);
9046         newXS("SDL::Flip", XS_SDL_Flip, file);
9047         newXS("SDL::SetColors", XS_SDL_SetColors, file);
9048         newXS("SDL::MapRGB", XS_SDL_MapRGB, file);
9049         newXS("SDL::MapRGBA", XS_SDL_MapRGBA, file);
9050         newXS("SDL::GetRGB", XS_SDL_GetRGB, file);
9051         newXS("SDL::GetRGBA", XS_SDL_GetRGBA, file);
9052         newXS("SDL::SaveBMP", XS_SDL_SaveBMP, file);
9053         newXS("SDL::SetColorKey", XS_SDL_SetColorKey, file);
9054         newXS("SDL::SetAlpha", XS_SDL_SetAlpha, file);
9055         newXS("SDL::DisplayFormat", XS_SDL_DisplayFormat, file);
9056         newXS("SDL::DisplayFormatAlpha", XS_SDL_DisplayFormatAlpha, file);
9057         newXS("SDL::ConvertRGB", XS_SDL_ConvertRGB, file);
9058         newXS("SDL::ConvertRGBA", XS_SDL_ConvertRGBA, file);
9059         newXS("SDL::BlitSurface", XS_SDL_BlitSurface, file);
9060         newXS("SDL::FillRect", XS_SDL_FillRect, file);
9061         newXS("SDL::GetAppState", XS_SDL_GetAppState, file);
9062         newXS("SDL::WMSetCaption", XS_SDL_WMSetCaption, file);
9063         newXS("SDL::WMGetCaption", XS_SDL_WMGetCaption, file);
9064         newXS("SDL::WMSetIcon", XS_SDL_WMSetIcon, file);
9065         newXS("SDL::WarpMouse", XS_SDL_WarpMouse, file);
9066         newXS("SDL::GetMouseState", XS_SDL_GetMouseState, file);
9067         newXS("SDL::GetRelativeMouseState", XS_SDL_GetRelativeMouseState, file);
9068         newXS("SDL::NewCursor", XS_SDL_NewCursor, file);
9069         newXS("SDL::FreeCursor", XS_SDL_FreeCursor, file);
9070         newXS("SDL::SetCursor", XS_SDL_SetCursor, file);
9071         newXS("SDL::GetCursor", XS_SDL_GetCursor, file);
9072         newXS("SDL::ShowCursor", XS_SDL_ShowCursor, file);
9073         newXS("SDL::NewAudioSpec", XS_SDL_NewAudioSpec, file);
9074         newXS("SDL::FreeAudioSpec", XS_SDL_FreeAudioSpec, file);
9075         newXS("SDL::NewAudioCVT", XS_SDL_NewAudioCVT, file);
9076         newXS("SDL::FreeAudioCVT", XS_SDL_FreeAudioCVT, file);
9077         newXS("SDL::ConvertAudioData", XS_SDL_ConvertAudioData, file);
9078         newXS("SDL::OpenAudio", XS_SDL_OpenAudio, file);
9079         newXS("SDL::GetAudioStatus", XS_SDL_GetAudioStatus, file);
9080         newXS("SDL::PauseAudio", XS_SDL_PauseAudio, file);
9081         newXS("SDL::LockAudio", XS_SDL_LockAudio, file);
9082         newXS("SDL::UnlockAudio", XS_SDL_UnlockAudio, file);
9083         newXS("SDL::CloseAudio", XS_SDL_CloseAudio, file);
9084         newXS("SDL::FreeWAV", XS_SDL_FreeWAV, file);
9085         newXS("SDL::LoadWAV", XS_SDL_LoadWAV, file);
9086 #if XSubPPtmpAAAB
9087         newXS("SDL::MixAudio", XS_SDL_MixAudio, file);
9088         newXS("SDL::MixOpenAudio", XS_SDL_MixOpenAudio, file);
9089         newXS("SDL::MixAllocateChannels", XS_SDL_MixAllocateChannels, file);
9090         newXS("SDL::MixQuerySpec", XS_SDL_MixQuerySpec, file);
9091         newXS("SDL::MixLoadWAV", XS_SDL_MixLoadWAV, file);
9092         newXS("SDL::MixLoadMusic", XS_SDL_MixLoadMusic, file);
9093         newXS("SDL::MixQuickLoadWAV", XS_SDL_MixQuickLoadWAV, file);
9094         newXS("SDL::MixFreeChunk", XS_SDL_MixFreeChunk, file);
9095         newXS("SDL::MixFreeMusic", XS_SDL_MixFreeMusic, file);
9096         newXS("SDL::MixSetPostMixCallback", XS_SDL_MixSetPostMixCallback, file);
9097         newXS("SDL::PerlMixMusicHook", XS_SDL_PerlMixMusicHook, file);
9098         newXS("SDL::MixSetMusicHook", XS_SDL_MixSetMusicHook, file);
9099         newXS("SDL::MixSetMusicFinishedHook", XS_SDL_MixSetMusicFinishedHook, file);
9100         newXS("SDL::MixGetMusicHookData", XS_SDL_MixGetMusicHookData, file);
9101         newXS("SDL::MixReverseChannels", XS_SDL_MixReverseChannels, file);
9102         newXS("SDL::MixGroupChannel", XS_SDL_MixGroupChannel, file);
9103         newXS("SDL::MixGroupChannels", XS_SDL_MixGroupChannels, file);
9104         newXS("SDL::MixGroupAvailable", XS_SDL_MixGroupAvailable, file);
9105         newXS("SDL::MixGroupCount", XS_SDL_MixGroupCount, file);
9106         newXS("SDL::MixGroupOldest", XS_SDL_MixGroupOldest, file);
9107         newXS("SDL::MixGroupNewer", XS_SDL_MixGroupNewer, file);
9108         newXS("SDL::MixPlayChannel", XS_SDL_MixPlayChannel, file);
9109         newXS("SDL::MixPlayChannelTimed", XS_SDL_MixPlayChannelTimed, file);
9110         newXS("SDL::MixPlayMusic", XS_SDL_MixPlayMusic, file);
9111         newXS("SDL::MixFadeInChannel", XS_SDL_MixFadeInChannel, file);
9112         newXS("SDL::MixFadeInChannelTimed", XS_SDL_MixFadeInChannelTimed, file);
9113         newXS("SDL::MixFadeInMusic", XS_SDL_MixFadeInMusic, file);
9114         newXS("SDL::MixVolume", XS_SDL_MixVolume, file);
9115         newXS("SDL::MixVolumeChunk", XS_SDL_MixVolumeChunk, file);
9116         newXS("SDL::MixVolumeMusic", XS_SDL_MixVolumeMusic, file);
9117         newXS("SDL::MixHaltChannel", XS_SDL_MixHaltChannel, file);
9118         newXS("SDL::MixHaltGroup", XS_SDL_MixHaltGroup, file);
9119         newXS("SDL::MixHaltMusic", XS_SDL_MixHaltMusic, file);
9120         newXS("SDL::MixExpireChannel", XS_SDL_MixExpireChannel, file);
9121         newXS("SDL::MixFadeOutChannel", XS_SDL_MixFadeOutChannel, file);
9122         newXS("SDL::MixFadeOutGroup", XS_SDL_MixFadeOutGroup, file);
9123         newXS("SDL::MixFadeOutMusic", XS_SDL_MixFadeOutMusic, file);
9124         newXS("SDL::MixFadingMusic", XS_SDL_MixFadingMusic, file);
9125         newXS("SDL::MixFadingChannel", XS_SDL_MixFadingChannel, file);
9126         newXS("SDL::MixPause", XS_SDL_MixPause, file);
9127         newXS("SDL::MixResume", XS_SDL_MixResume, file);
9128         newXS("SDL::MixPaused", XS_SDL_MixPaused, file);
9129         newXS("SDL::MixPauseMusic", XS_SDL_MixPauseMusic, file);
9130         newXS("SDL::MixResumeMusic", XS_SDL_MixResumeMusic, file);
9131         newXS("SDL::MixRewindMusic", XS_SDL_MixRewindMusic, file);
9132         newXS("SDL::MixPausedMusic", XS_SDL_MixPausedMusic, file);
9133         newXS("SDL::MixPlaying", XS_SDL_MixPlaying, file);
9134         newXS("SDL::MixPlayingMusic", XS_SDL_MixPlayingMusic, file);
9135         newXS("SDL::MixCloseAudio", XS_SDL_MixCloseAudio, file);
9136 #endif
9137         newXS("SDL::GLLoadLibrary", XS_SDL_GLLoadLibrary, file);
9138         newXS("SDL::GLGetProcAddress", XS_SDL_GLGetProcAddress, file);
9139         newXS("SDL::GLSetAttribute", XS_SDL_GLSetAttribute, file);
9140         newXS("SDL::GLGetAttribute", XS_SDL_GLGetAttribute, file);
9141         newXS("SDL::GLSwapBuffers", XS_SDL_GLSwapBuffers, file);
9142         newXS("SDL::BigEndian", XS_SDL_BigEndian, file);
9143         newXS("SDL::NumJoysticks", XS_SDL_NumJoysticks, file);
9144         newXS("SDL::JoystickName", XS_SDL_JoystickName, file);
9145         newXS("SDL::JoystickOpen", XS_SDL_JoystickOpen, file);
9146         newXS("SDL::JoystickOpened", XS_SDL_JoystickOpened, file);
9147         newXS("SDL::JoystickIndex", XS_SDL_JoystickIndex, file);
9148         newXS("SDL::JoystickNumAxes", XS_SDL_JoystickNumAxes, file);
9149         newXS("SDL::JoystickNumBalls", XS_SDL_JoystickNumBalls, file);
9150         newXS("SDL::JoystickNumHats", XS_SDL_JoystickNumHats, file);
9151         newXS("SDL::JoystickNumButtons", XS_SDL_JoystickNumButtons, file);
9152         newXS("SDL::JoystickUpdate", XS_SDL_JoystickUpdate, file);
9153         newXS("SDL::JoystickGetAxis", XS_SDL_JoystickGetAxis, file);
9154         newXS("SDL::JoystickGetHat", XS_SDL_JoystickGetHat, file);
9155         newXS("SDL::JoystickGetButton", XS_SDL_JoystickGetButton, file);
9156         newXS("SDL::JoystickGetBall", XS_SDL_JoystickGetBall, file);
9157         newXS("SDL::JoystickClose", XS_SDL_JoystickClose, file);
9158         newXS("SDL::JoyAxisEventWhich", XS_SDL_JoyAxisEventWhich, file);
9159         newXS("SDL::JoyAxisEventAxis", XS_SDL_JoyAxisEventAxis, file);
9160         newXS("SDL::JoyAxisEventValue", XS_SDL_JoyAxisEventValue, file);
9161         newXS("SDL::JoyButtonEventWhich", XS_SDL_JoyButtonEventWhich, file);
9162         newXS("SDL::JoyButtonEventButton", XS_SDL_JoyButtonEventButton, file);
9163         newXS("SDL::JoyButtonEventState", XS_SDL_JoyButtonEventState, file);
9164         newXS("SDL::JoyHatEventWhich", XS_SDL_JoyHatEventWhich, file);
9165         newXS("SDL::JoyHatEventHat", XS_SDL_JoyHatEventHat, file);
9166         newXS("SDL::JoyHatEventValue", XS_SDL_JoyHatEventValue, file);
9167         newXS("SDL::JoyBallEventWhich", XS_SDL_JoyBallEventWhich, file);
9168         newXS("SDL::JoyBallEventBall", XS_SDL_JoyBallEventBall, file);
9169         newXS("SDL::JoyBallEventXrel", XS_SDL_JoyBallEventXrel, file);
9170         newXS("SDL::JoyBallEventYrel", XS_SDL_JoyBallEventYrel, file);
9171         newXS("SDL::SetClipRect", XS_SDL_SetClipRect, file);
9172         newXS("SDL::GetClipRect", XS_SDL_GetClipRect, file);
9173 #if XSubPPtmpAAAC
9174         newXS("SDL::NetInit", XS_SDL_NetInit, file);
9175         newXS("SDL::NetQuit", XS_SDL_NetQuit, file);
9176         newXS("SDL::NetNewIPaddress", XS_SDL_NetNewIPaddress, file);
9177         newXS("SDL::NetIPaddressHost", XS_SDL_NetIPaddressHost, file);
9178         newXS("SDL::NetIPaddressPort", XS_SDL_NetIPaddressPort, file);
9179         newXS("SDL::NetFreeIPaddress", XS_SDL_NetFreeIPaddress, file);
9180         newXS("SDL::NetResolveIP", XS_SDL_NetResolveIP, file);
9181         newXS("SDL::NetResolveHost", XS_SDL_NetResolveHost, file);
9182         newXS("SDL::NetTCPOpen", XS_SDL_NetTCPOpen, file);
9183         newXS("SDL::NetTCPAccept", XS_SDL_NetTCPAccept, file);
9184         newXS("SDL::NetTCPGetPeerAddress", XS_SDL_NetTCPGetPeerAddress, file);
9185         newXS("SDL::NetTCPSend", XS_SDL_NetTCPSend, file);
9186         newXS("SDL::NetTCPRecv", XS_SDL_NetTCPRecv, file);
9187         newXS("SDL::NetTCPClose", XS_SDL_NetTCPClose, file);
9188         newXS("SDL::NetAllocPacket", XS_SDL_NetAllocPacket, file);
9189         newXS("SDL::NetAllocPacketV", XS_SDL_NetAllocPacketV, file);
9190         newXS("SDL::NetResizePacket", XS_SDL_NetResizePacket, file);
9191         newXS("SDL::NetFreePacket", XS_SDL_NetFreePacket, file);
9192         newXS("SDL::NetFreePacketV", XS_SDL_NetFreePacketV, file);
9193         newXS("SDL::NetUDPOpen", XS_SDL_NetUDPOpen, file);
9194         newXS("SDL::NetUDPBind", XS_SDL_NetUDPBind, file);
9195         newXS("SDL::NetUDPUnbind", XS_SDL_NetUDPUnbind, file);
9196         newXS("SDL::NetUDPGetPeerAddress", XS_SDL_NetUDPGetPeerAddress, file);
9197         newXS("SDL::NetUDPSendV", XS_SDL_NetUDPSendV, file);
9198         newXS("SDL::NetUDPSend", XS_SDL_NetUDPSend, file);
9199         newXS("SDL::NetUDPRecvV", XS_SDL_NetUDPRecvV, file);
9200         newXS("SDL::NetUDPRecv", XS_SDL_NetUDPRecv, file);
9201         newXS("SDL::NetUDPClose", XS_SDL_NetUDPClose, file);
9202         newXS("SDL::NetAllocSocketSet", XS_SDL_NetAllocSocketSet, file);
9203         newXS("SDL::NetTCP_AddSocket", XS_SDL_NetTCP_AddSocket, file);
9204         newXS("SDL::NetUDP_AddSocket", XS_SDL_NetUDP_AddSocket, file);
9205         newXS("SDL::NetTCP_DelSocket", XS_SDL_NetTCP_DelSocket, file);
9206         newXS("SDL::NetUDP_DelSocket", XS_SDL_NetUDP_DelSocket, file);
9207         newXS("SDL::NetCheckSockets", XS_SDL_NetCheckSockets, file);
9208         newXS("SDL::NetSocketReady", XS_SDL_NetSocketReady, file);
9209         newXS("SDL::NetFreeSocketSet", XS_SDL_NetFreeSocketSet, file);
9210         newXS("SDL::NetWrite16", XS_SDL_NetWrite16, file);
9211         newXS("SDL::NetWrite32", XS_SDL_NetWrite32, file);
9212         newXS("SDL::NetRead16", XS_SDL_NetRead16, file);
9213         newXS("SDL::NetRead32", XS_SDL_NetRead32, file);
9214 #endif
9215 #if XSubPPtmpAAAD
9216         newXS("SDL::TTFInit", XS_SDL_TTFInit, file);
9217         newXS("SDL::TTFQuit", XS_SDL_TTFQuit, file);
9218         newXS("SDL::TTFOpenFont", XS_SDL_TTFOpenFont, file);
9219         newXS("SDL::TTFGetFontStyle", XS_SDL_TTFGetFontStyle, file);
9220         newXS("SDL::TTFSetFontStyle", XS_SDL_TTFSetFontStyle, file);
9221         newXS("SDL::TTFFontHeight", XS_SDL_TTFFontHeight, file);
9222         newXS("SDL::TTFFontAscent", XS_SDL_TTFFontAscent, file);
9223         newXS("SDL::TTFFontDescent", XS_SDL_TTFFontDescent, file);
9224         newXS("SDL::TTFFontLineSkip", XS_SDL_TTFFontLineSkip, file);
9225         newXS("SDL::TTFGlyphMetrics", XS_SDL_TTFGlyphMetrics, file);
9226         newXS("SDL::TTFSizeText", XS_SDL_TTFSizeText, file);
9227         newXS("SDL::TTFSizeUTF8", XS_SDL_TTFSizeUTF8, file);
9228         newXS("SDL::TTFSizeUNICODE", XS_SDL_TTFSizeUNICODE, file);
9229         newXS("SDL::TTFRenderTextSolid", XS_SDL_TTFRenderTextSolid, file);
9230         newXS("SDL::TTFRenderUTF8Solid", XS_SDL_TTFRenderUTF8Solid, file);
9231         newXS("SDL::TTFRenderUNICODESolid", XS_SDL_TTFRenderUNICODESolid, file);
9232         newXS("SDL::TTFRenderGlyphSolid", XS_SDL_TTFRenderGlyphSolid, file);
9233         newXS("SDL::TTFRenderTextShaded", XS_SDL_TTFRenderTextShaded, file);
9234         newXS("SDL::TTFRenderUTF8Shaded", XS_SDL_TTFRenderUTF8Shaded, file);
9235         newXS("SDL::TTFRenderUNICODEShaded", XS_SDL_TTFRenderUNICODEShaded, file);
9236         newXS("SDL::TTFRenderGlyphShaded", XS_SDL_TTFRenderGlyphShaded, file);
9237         newXS("SDL::TTFRenderTextBlended", XS_SDL_TTFRenderTextBlended, file);
9238         newXS("SDL::TTFRenderUTF8Blended", XS_SDL_TTFRenderUTF8Blended, file);
9239         newXS("SDL::TTFRenderUNICODEBlended", XS_SDL_TTFRenderUNICODEBlended, file);
9240         newXS("SDL::TTFRenderGlyphBlended", XS_SDL_TTFRenderGlyphBlended, file);
9241         newXS("SDL::TTFCloseFont", XS_SDL_TTFCloseFont, file);
9242         newXS("SDL::TTFPutString", XS_SDL_TTFPutString, file);
9243 #endif
9244         newXS("SDL::CreateYUVOverlay", XS_SDL_CreateYUVOverlay, file);
9245         newXS("SDL::LockYUVOverlay", XS_SDL_LockYUVOverlay, file);
9246         newXS("SDL::UnlockYUVOverlay", XS_SDL_UnlockYUVOverlay, file);
9247         newXS("SDL::DisplayYUVOverlay", XS_SDL_DisplayYUVOverlay, file);
9248         newXS("SDL::FreeYUVOverlay", XS_SDL_FreeYUVOverlay, file);
9249         newXS("SDL::OverlayFormat", XS_SDL_OverlayFormat, file);
9250         newXS("SDL::OverlayW", XS_SDL_OverlayW, file);
9251         newXS("SDL::OverlayH", XS_SDL_OverlayH, file);
9252         newXS("SDL::OverlayPlanes", XS_SDL_OverlayPlanes, file);
9253         newXS("SDL::OverlayHW", XS_SDL_OverlayHW, file);
9254         newXS("SDL::OverlayPitches", XS_SDL_OverlayPitches, file);
9255         newXS("SDL::OverlayPixels", XS_SDL_OverlayPixels, file);
9256         newXS("SDL::WMToggleFullScreen", XS_SDL_WMToggleFullScreen, file);
9257         newXS("SDL::WMGrabInput", XS_SDL_WMGrabInput, file);
9258         newXS("SDL::WMIconifyWindow", XS_SDL_WMIconifyWindow, file);
9259         newXS("SDL::ResizeEventW", XS_SDL_ResizeEventW, file);
9260         newXS("SDL::ResizeEventH", XS_SDL_ResizeEventH, file);
9261         newXS("SDL::AudioDriverName", XS_SDL_AudioDriverName, file);
9262         newXS("SDL::GetKeyState", XS_SDL_GetKeyState, file);
9263 #if XSubPPtmpAAAE
9264         newXS("SDL::NewSMPEGInfo", XS_SDL_NewSMPEGInfo, file);
9265         newXS("SDL::FreeSMPEGInfo", XS_SDL_FreeSMPEGInfo, file);
9266         newXS("SDL::SMPEGInfoHasAudio", XS_SDL_SMPEGInfoHasAudio, file);
9267         newXS("SDL::SMPEGInfoHasVideo", XS_SDL_SMPEGInfoHasVideo, file);
9268         newXS("SDL::SMPEGInfoWidth", XS_SDL_SMPEGInfoWidth, file);
9269         newXS("SDL::SMPEGInfoHeight", XS_SDL_SMPEGInfoHeight, file);
9270         newXS("SDL::SMPEGInfoCurrentFrame", XS_SDL_SMPEGInfoCurrentFrame, file);
9271         newXS("SDL::SMPEGInfoCurrentFPS", XS_SDL_SMPEGInfoCurrentFPS, file);
9272         newXS("SDL::SMPEGInfoCurrentAudioFrame", XS_SDL_SMPEGInfoCurrentAudioFrame, file);
9273         newXS("SDL::SMPEGInfoCurrentOffset", XS_SDL_SMPEGInfoCurrentOffset, file);
9274         newXS("SDL::SMPEGInfoTotalSize", XS_SDL_SMPEGInfoTotalSize, file);
9275         newXS("SDL::SMPEGInfoCurrentTime", XS_SDL_SMPEGInfoCurrentTime, file);
9276         newXS("SDL::SMPEGInfoTotalTime", XS_SDL_SMPEGInfoTotalTime, file);
9277         newXS("SDL::SMPEGError", XS_SDL_SMPEGError, file);
9278         newXS("SDL::NewSMPEG", XS_SDL_NewSMPEG, file);
9279         newXS("SDL::FreeSMPEG", XS_SDL_FreeSMPEG, file);
9280         newXS("SDL::SMPEGEnableAudio", XS_SDL_SMPEGEnableAudio, file);
9281         newXS("SDL::SMPEGEnableVideo", XS_SDL_SMPEGEnableVideo, file);
9282         newXS("SDL::SMPEGSetVolume", XS_SDL_SMPEGSetVolume, file);
9283         newXS("SDL::SMPEGSetDisplay", XS_SDL_SMPEGSetDisplay, file);
9284         newXS("SDL::SMPEGScaleXY", XS_SDL_SMPEGScaleXY, file);
9285         newXS("SDL::SMPEGScale", XS_SDL_SMPEGScale, file);
9286         newXS("SDL::SMPEGPlay", XS_SDL_SMPEGPlay, file);
9287         newXS("SDL::SMPEGStatus", XS_SDL_SMPEGStatus, file);
9288         newXS("SDL::SMPEGPause", XS_SDL_SMPEGPause, file);
9289         newXS("SDL::SMPEGLoop", XS_SDL_SMPEGLoop, file);
9290         newXS("SDL::SMPEGStop", XS_SDL_SMPEGStop, file);
9291         newXS("SDL::SMPEGRewind", XS_SDL_SMPEGRewind, file);
9292         newXS("SDL::SMPEGSeek", XS_SDL_SMPEGSeek, file);
9293         newXS("SDL::SMPEGSkip", XS_SDL_SMPEGSkip, file);
9294         newXS("SDL::SMPEGSetDisplayRegion", XS_SDL_SMPEGSetDisplayRegion, file);
9295         newXS("SDL::SMPEGRenderFrame", XS_SDL_SMPEGRenderFrame, file);
9296         newXS("SDL::SMPEGGetInfo", XS_SDL_SMPEGGetInfo, file);
9297 #endif
9298 #if XSubPPtmpAAAF
9299         newXS("SDL::GFXRotoZoom", XS_SDL_GFXRotoZoom, file);
9300         newXS("SDL::GFXZoom", XS_SDL_GFXZoom, file);
9301         newXS("SDL::GFXPixelColor", XS_SDL_GFXPixelColor, file);
9302         newXS("SDL::GFXPixelRGBA", XS_SDL_GFXPixelRGBA, file);
9303         newXS("SDL::GFXHlineColor", XS_SDL_GFXHlineColor, file);
9304         newXS("SDL::GFXHlineRGBA", XS_SDL_GFXHlineRGBA, file);
9305         newXS("SDL::GFXVlineColor", XS_SDL_GFXVlineColor, file);
9306         newXS("SDL::GFXVlineRGBA", XS_SDL_GFXVlineRGBA, file);
9307         newXS("SDL::GFXRectangleColor", XS_SDL_GFXRectangleColor, file);
9308         newXS("SDL::GFXRectangleRGBA", XS_SDL_GFXRectangleRGBA, file);
9309         newXS("SDL::GFXBoxColor", XS_SDL_GFXBoxColor, file);
9310         newXS("SDL::GFXBoxRGBA", XS_SDL_GFXBoxRGBA, file);
9311         newXS("SDL::GFXLineColor", XS_SDL_GFXLineColor, file);
9312         newXS("SDL::GFXLineRGBA", XS_SDL_GFXLineRGBA, file);
9313         newXS("SDL::GFXAalineColor", XS_SDL_GFXAalineColor, file);
9314         newXS("SDL::GFXAalineRGBA", XS_SDL_GFXAalineRGBA, file);
9315         newXS("SDL::GFXCircleColor", XS_SDL_GFXCircleColor, file);
9316         newXS("SDL::GFXCircleRGBA", XS_SDL_GFXCircleRGBA, file);
9317         newXS("SDL::GFXAacircleColor", XS_SDL_GFXAacircleColor, file);
9318         newXS("SDL::GFXAacircleRGBA", XS_SDL_GFXAacircleRGBA, file);
9319         newXS("SDL::GFXFilledCircleColor", XS_SDL_GFXFilledCircleColor, file);
9320         newXS("SDL::GFXFilledCircleRGBA", XS_SDL_GFXFilledCircleRGBA, file);
9321         newXS("SDL::GFXEllipseColor", XS_SDL_GFXEllipseColor, file);
9322         newXS("SDL::GFXEllipseRGBA", XS_SDL_GFXEllipseRGBA, file);
9323         newXS("SDL::GFXAaellipseColor", XS_SDL_GFXAaellipseColor, file);
9324         newXS("SDL::GFXAaellipseRGBA", XS_SDL_GFXAaellipseRGBA, file);
9325         newXS("SDL::GFXFilledEllipseColor", XS_SDL_GFXFilledEllipseColor, file);
9326         newXS("SDL::GFXFilledEllipseRGBA", XS_SDL_GFXFilledEllipseRGBA, file);
9327         newXS("SDL::GFXFilledPieColor", XS_SDL_GFXFilledPieColor, file);
9328         newXS("SDL::GFXFilledPieRGBA", XS_SDL_GFXFilledPieRGBA, file);
9329         newXS("SDL::GFXPolygonColor", XS_SDL_GFXPolygonColor, file);
9330         newXS("SDL::GFXPolygonRGBA", XS_SDL_GFXPolygonRGBA, file);
9331         newXS("SDL::GFXAapolygonColor", XS_SDL_GFXAapolygonColor, file);
9332         newXS("SDL::GFXAapolygonRGBA", XS_SDL_GFXAapolygonRGBA, file);
9333         newXS("SDL::GFXFilledPolygonColor", XS_SDL_GFXFilledPolygonColor, file);
9334         newXS("SDL::GFXFilledPolygonRGBA", XS_SDL_GFXFilledPolygonRGBA, file);
9335         newXS("SDL::GFXCharacterColor", XS_SDL_GFXCharacterColor, file);
9336         newXS("SDL::GFXCharacterRGBA", XS_SDL_GFXCharacterRGBA, file);
9337         newXS("SDL::GFXStringColor", XS_SDL_GFXStringColor, file);
9338         newXS("SDL::GFXStringRGBA", XS_SDL_GFXStringRGBA, file);
9339 #endif
9340 #if XSubPPtmpAAAG
9341         newXS("SDL::SVG_Load", XS_SDL_SVG_Load, file);
9342         newXS("SDL::SVG_LoadBuffer", XS_SDL_SVG_LoadBuffer, file);
9343         newXS("SDL::SVG_SetOffset", XS_SDL_SVG_SetOffset, file);
9344         newXS("SDL::SVG_SetScale", XS_SDL_SVG_SetScale, file);
9345         newXS("SDL::SVG_RenderToSurface", XS_SDL_SVG_RenderToSurface, file);
9346         newXS("SDL::SVG_Free", XS_SDL_SVG_Free, file);
9347         newXS("SDL::SVG_Set_Flags", XS_SDL_SVG_Set_Flags, file);
9348         newXS("SDL::SVG_Width", XS_SDL_SVG_Width, file);
9349         newXS("SDL::SVG_HEIGHT", XS_SDL_SVG_HEIGHT, file);
9350         newXS("SDL::SVG_SetClipping", XS_SDL_SVG_SetClipping, file);
9351         newXS("SDL::SVG_Version", XS_SDL_SVG_Version, file);
9352 #endif
9353 #if XSubPPtmpAAAH
9354         newXS("SDL::SoundAudioInfoFormat", XS_SDL_SoundAudioInfoFormat, file);
9355         newXS("SDL::SoundAudioInfoChannels", XS_SDL_SoundAudioInfoChannels, file);
9356         newXS("SDL::SoundAudioInforate", XS_SDL_SoundAudioInforate, file);
9357         newXS("SDL::SoundDecoderInfoExtensions", XS_SDL_SoundDecoderInfoExtensions, file);
9358         newXS("SDL::SoundDecoderInfoDescription", XS_SDL_SoundDecoderInfoDescription, file);
9359         newXS("SDL::SoundDecoderInfoAuthor", XS_SDL_SoundDecoderInfoAuthor, file);
9360         newXS("SDL::SoundDecoderInfoUrl", XS_SDL_SoundDecoderInfoUrl, file);
9361         newXS("SDL::SoundSampleDecoder", XS_SDL_SoundSampleDecoder, file);
9362         newXS("SDL::SoundSampleDesired", XS_SDL_SoundSampleDesired, file);
9363         newXS("SDL::SoundSampleAcutal", XS_SDL_SoundSampleAcutal, file);
9364         newXS("SDL::SoundSampleBuffer", XS_SDL_SoundSampleBuffer, file);
9365         newXS("SDL::SoundSampleBufferSize", XS_SDL_SoundSampleBufferSize, file);
9366         newXS("SDL::SoundSampleFlags", XS_SDL_SoundSampleFlags, file);
9367         newXS("SDL::Sound_Init", XS_SDL_Sound_Init, file);
9368         newXS("SDL::Sound_Quit", XS_SDL_Sound_Quit, file);
9369         newXS("SDL::Sound_AvailableDecoders", XS_SDL_Sound_AvailableDecoders, file);
9370         newXS("SDL::Sound_GetError", XS_SDL_Sound_GetError, file);
9371         newXS("SDL::Sound_ClearError", XS_SDL_Sound_ClearError, file);
9372         newXS("SDL::Sound_NewSample", XS_SDL_Sound_NewSample, file);
9373         newXS("SDL::Sound_NewSampleFromMem", XS_SDL_Sound_NewSampleFromMem, file);
9374         newXS("SDL::Sound_NewSampleFromFile", XS_SDL_Sound_NewSampleFromFile, file);
9375         newXS("SDL::Sound_FreeSample", XS_SDL_Sound_FreeSample, file);
9376         newXS("SDL::Sound_GetDuration", XS_SDL_Sound_GetDuration, file);
9377         newXS("SDL::Sound_SetBufferSize", XS_SDL_Sound_SetBufferSize, file);
9378         newXS("SDL::Sound_Decode", XS_SDL_Sound_Decode, file);
9379         newXS("SDL::Sound_DecodeAll", XS_SDL_Sound_DecodeAll, file);
9380         newXS("SDL::Sound_Rewind", XS_SDL_Sound_Rewind, file);
9381         newXS("SDL::Sound_Seek", XS_SDL_Sound_Seek, file);
9382 #endif
9383
9384     /* Initialisation Section */
9385
9386 #if XSubPPtmpAAAA
9387 #endif
9388 #if XSubPPtmpAAAB
9389 #endif
9390 #if XSubPPtmpAAAC
9391 #endif
9392 #if XSubPPtmpAAAD
9393 #endif
9394 #if XSubPPtmpAAAE
9395 #endif
9396 #if XSubPPtmpAAAF
9397 #endif
9398 #if XSubPPtmpAAAG
9399 #endif
9400 #if XSubPPtmpAAAH
9401 #endif
9402 #line 9403 "SDL_perl.c"
9403
9404     /* End of Initialisation Section */
9405
9406     XSRETURN_YES;
9407 }
9408