From: Kartik Thakore Date: Tue, 4 Aug 2009 22:25:26 +0000 (-0400) Subject: Clean up files that could mess up merge X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b0a5571bd5d570184477a912d5946aa2b7725c9f;p=sdlgit%2FSDL_perl.git Clean up files that could mess up merge --- diff --git a/2.1.3 to 2.2.1.diff b/2.1.3 to 2.2.1.diff deleted file mode 100644 index c57facb..0000000 --- a/2.1.3 to 2.2.1.diff +++ /dev/null @@ -1,4579 +0,0 @@ -diff -r SDL_perl/Build.PL sdlperl/Build.PL -1c1 -< #! perl -w ---- -> #!/usr/bin/env perl -3,5c3,30 -< # Copyright (C) 2003 chromatic -< # Copyright (C) 2004 David J. Goehrig -< # Copyright (C) 2009 Kartik Thakore ---- -> # Build.PL -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -> # -> -13d37 -< use YAML::Node; -39c63 -< to => './SDL_perl.xs', ---- -> to => 'src/SDL_perl.xs', -41,42c65,66 -< libraries => [qw( SDL SDL_image SDL_mixer SDL_net SDL_ttf SDL_gfx -< png jpeg smpeg )], ---- -> libraries => [qw( SDL SDL_image SDL_mixer SDL_sound SDL_net SDL_ttf -> SDL_gfx SDL_svg png jpeg smpeg )], -47c71 -< to => 'SDL/OpenGL.xs', ---- -> to => 'src/SDL/OpenGL.xs', -54c78 -< to => 'SDL/SFont.xs', ---- -> to => 'src/SDL/SFont.xs', -72a97,100 -> SDL_sound => { -> define => 'HAVE_SDL_SOUND', -> header => 'SDL_sound.h' -> }, -84a113,116 -> SDL_svg => { -> define => 'HAVE_SDL_SVG', -> header => 'SDL_svg.h' -> }, -110a143,144 -> print "[Build.PL] arch $arch\n"; -> -118,120c152,157 -< my $defines = $arch->build_defines( \%libraries, $build_systems ); -< my $includes = $arch->build_includes( \%libraries, $build_systems ); -< my $links = $arch->build_links( \%libraries, $build_systems ); ---- -> my $defines = $arch->build_defines( \%libraries, $build_systems ); -> my $includes = $arch->build_includes( \%libraries, $build_systems ); -> my $links = $arch->build_links( \%libraries, $build_systems ); -> my $c_sources = $arch->build_c_sources( \%libraries, $build_systems ); -> my $c_source = $arch->build_c_source( \%libraries, $build_systems ); -> my $install_base = $arch->build_install_base( \%libraries, $build_systems ); -124a162 -> -126d163 -< module_name => 'SDL', -139c176,177 -< c_source => 'src', ---- -> c_source => $c_source, -> c_sources => $c_sources, -141a180 -> install_base => $install_base -diff -r SDL_perl/CHANGELOG sdlperl/CHANGELOG -2,9d1 -< * Aug 2 2009 Kartik Thakore -< - Added patches -< - Verified and Tested patches -< - Clean bugs -< -< * Mar 3 2006 Tels 77 Tests -< - Color.pm: add rgb(), and make new($r,$g,$b) work for speed -< - add ColorRGB() to src/SDL.xs -11c3,24 -< * Oct 4 2004 David J. Goehrig ---- -> * Jul 8 2006 David J. Goehrig -> - finished embedding data in example scripts -> - fixed Mac OS X file associations -> -> * Mar 15 2006 David J. Goehrig -> - fixed OpenGL examples to work under MacOS X using the SDL Perl.app bundle -> -> * Oct 12 2005 David J. Goehrig -> - Fixed bug where SDL::App frees underlying Surface via DESTROY -> - Added SDL_svg support -> - cleaned up SDL_gfx support in SDL.xs -> - cleaned up smpeg support in SDL.xs -> - Added more SDL_sound support -> - Added basic SDL_RWops support (TODO - perl callback for user defined) -> -> * Oct 6 2005 David J. Goehrig -> - Changed constructors to die upon invalid initialization -> -> * Oct 5 2005 David J. Goehrig -> - Updated the copyright notices as per the LGPL guidelines -> -> * Oct 4 2005 David J. Goehrig -diff -r SDL_perl/META.yml sdlperl/META.yml -3c3 -< version: 2.1.3 ---- -> version: 2.2.0 -14c14 -< version: 2.1.3 ---- -> version: 2.2.0 -49,50d48 -< SDL::TTFont: -< file: lib/SDL/TTFont.pm -61,62d58 -< SDL::Tutorial::Drawing: -< file: lib/SDL/Tutorial/Drawing.pm -64a61,62 -> SDL::Tutorial:Drawing: -> file: lib/SDL/Tutorial/Drawing.pm -66a65,66 -> SDL:TTFont: -> file: lib/SDL/TTFont.pm -Only in sdlperl/: MacOSX -diff -r SDL_perl/README sdlperl/README -1c1 -< README for SDL_Perl-2.2 ---- -> README for SDL_Perl-2.2.0 -3,4c3 -< First step is to make SDL perl pass all tests in -< t/. ---- -> What's New in 2.2.0: -6c5,9 -< I will add these as a issue. ---- -> SDL_Perl-2.2.0 adds support for a few new modules, fixes a few more -> bugs, and improves the error handling of the object layer. Additional -> support for SDL_sound, SDL_svg, and SDL_vnc has been added. In the -> OO layer, all constructors now die when they fail to construct an object -> with a valid underlying datastructure pointer. -8,12c11 -< Simple Run: -< perl Build.PL -< perl Build -< perl Build test -< perl Build install ---- -> Prerequisites: -14c13,14 -< There are more test scripts in test/ ---- -> SDL Perl recommends installing the following libraries available -> from http://www.libsdl.org/ prior to installing: -16c16,71 -< Disclaimer: This might be moved to CPAN when I get access ---- -> SDL-1.2.8 -> smpeg-0.4.5 -> SDL_image-1.2.4 -> SDL_mixer-1.2.6 -> SDL_sound-1.0.1 -> SDL_net-1.2.5 -> SDL_gfx-2.0.13 -> SDL_ttf-2.0.7 -> SDL_svg-1.1.9 -> SDL_vnc-1.0.0 -> -> Additionally the following Perl modules should be installed: -> -> Module-Build-0.22 -> Test-Simple-0.62 -> -> Installation: -> -> perl Build.PL -> ./Build -> ./Build test -> ./Build install -> -> The build process will use the new Module::Build facility -> to autodetect and build SDL Perl for your platform. If -> the build fails please forward bugs to sdl-devel@perl.org. -> -> Documentation: -> -> Each module now includes its own documentation, and -> is accessible through perldoc. Additional tutorials, -> code, and tips can be found at the website: -> -> http://sdl.perl.org -> -> Online documentation and tutorials are available through -> perldoc module. -> -> Contributing: -> -> Anyone wishing to contribute modules, sprite engines, documentation, -> and anything else that others might find useful, please join -> the mailing list: -> -> sdl-devel@perl.org -> -> This is a mailing list for those interested in SDLperl development, -> both as an applications developer, and as a core contributor. -> -> I am always more than happy to take patches, bug reports, and -> helpful suggestions. It is feedback, both good and poor, that -> keeps projects like this going. -> -> Enjoy, -> -> David J. Goehrig -18,19d72 -< kthakore -< 1 August 2009 -diff -r SDL_perl/TODO sdlperl/TODO -3a4,8 -> o fix OpenGL build without glu.h -> o fix openFile: support on Mac (SDL patch) -> o add Windows application bundle support -> o add Linux application bundle support -> o add embedded media module -Only in sdlperl/: _build -Only in sdlperl/: blib -diff -r SDL_perl/lib/SDL/App.pm sdlperl/lib/SDL/App.pm -1c1 -< # App.pm ---- -> #!/usr/bin/env perl -3c3 -< # The application object, sort of like a surface ---- -> # App.pm -5,6c5 -< # Copyright (C) 2000,2002,2003,2004 David J. Goehrig -< # Copyright (C) 2009 Kartik Thakore ---- -> # Copyright (C) 2005 David J. Goehrig -7a7,30 -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -> # -> -17a41,44 -> sub DESTROY { -> -> } -> -30c57 -< -asyncblit -init ---- -> -asyncblit -33,36c60 -< # SDL_INIT_VIDEO() is 0, so check defined instead of truth. -< my $init = defined $options{-init} ? $options{-init} : SDL_INIT_EVERYTHING(); -< -< SDL::Init($init); ---- -> SDL::Init(SDL::SDL_INIT_EVERYTHING()); -65c89 -< if ($f & SDL_OPENGL()) { ---- -> if ($f & SDL::SDL_OPENGL()) { -67,75c91,99 -< SDL::GLSetAttribute(SDL_GL_RED_SIZE(),$r) if ($r); -< SDL::GLSetAttribute(SDL_GL_GREEN_SIZE(),$g) if ($g); -< SDL::GLSetAttribute(SDL_GL_BLUE_SIZE(),$b) if ($b); -< SDL::GLSetAttribute(SDL_GL_ALPHA_SIZE(),$a) if ($a); -< -< SDL::GLSetAttribute(SDL_GL_RED_ACCUM_SIZE(),$ras) if ($ras); -< SDL::GLSetAttribute(SDL_GL_GREEN_ACCUM_SIZE(),$gas) if ($gas); -< SDL::GLSetAttribute(SDL_GL_BLUE_ACCUM_SIZE(),$bas) if ($bas); -< SDL::GLSetAttribute(SDL_GL_ALPHA_ACCUM_SIZE(),$aas) if ($aas); ---- -> SDL::GLSetAttribute(SDL::SDL_GL_RED_SIZE(),$r) if ($r); -> SDL::GLSetAttribute(SDL::SDL_GL_GREEN_SIZE(),$g) if ($g); -> SDL::GLSetAttribute(SDL::SDL_GL_BLUE_SIZE(),$b) if ($b); -> SDL::GLSetAttribute(SDL::SDL_GL_ALPHA_SIZE(),$a) if ($a); -> -> SDL::GLSetAttribute(SDL::SDL_GL_RED_ACCUM_SIZE(),$ras) if ($ras); -> SDL::GLSetAttribute(SDL::SDL_GL_GREEN_ACCUM_SIZE(),$gas) if ($gas); -> SDL::GLSetAttribute(SDL::SDL_GL_BLUE_ACCUM_SIZE(),$bas) if ($bas); -> SDL::GLSetAttribute(SDL::SDL_GL_ALPHA_ACCUM_SIZE(),$aas) if ($aas); -77,79c101,103 -< SDL::GLSetAttribute(SDL_GL_DOUBLEBUFFER(),$db) if ($db); -< SDL::GLSetAttribute(SDL_GL_BUFFER_SIZE(),$bs) if ($bs); -< SDL::GLSetAttribute(SDL_GL_DEPTH_SIZE(),$d); ---- -> SDL::GLSetAttribute(SDL::SDL_GL_DOUBLEBUFFER(),$db) if ($db); -> SDL::GLSetAttribute(SDL::SDL_GL_BUFFER_SIZE(),$bs) if ($bs); -> SDL::GLSetAttribute(SDL::SDL_GL_DEPTH_SIZE(),$d); -83,84c107,108 -< my $self = \SDL::SetVideoMode($w,$h,$d,$f); -< $$self ---- -> -> my $self = \SDL::SetVideoMode($w,$h,$d,$f) -103c127 -< $$self = SDL::SetVideoMode($w,$h,$bpp,$flags); ---- -> $self = \SDL::SetVideoMode($w,$h,$bpp,$flags); -diff -r SDL_perl/lib/SDL/Cdrom.pm sdlperl/lib/SDL/Cdrom.pm -1c1 -< # Cdrom.pm ---- -> #!/usr/bin/env perl -3c3 -< # a SDL cdrom manipluation module ---- -> # Cdrom.pm -5c5,28 -< # Copyright (C) 2000,2002 David J. Goehrig ---- -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -diff -r SDL_perl/lib/SDL/Color.pm sdlperl/lib/SDL/Color.pm -1c1 -< # Color.pm ---- -> #!/usr/bin/env perl -3c3,28 -< # A package for manipulating SDL_Color * ---- -> # Color.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -5d29 -< # Copyright (C) 2002,2003,2004 David J. Goehrig -15,18d38 -< -< # called like SDL::Color->new($red,$green,$blue); -< return bless \SDL::NewColor(@_), $class if (@_ == 3); -< -19a40 -> -39c60,61 -< bless $self, $class; ---- -> bless $self,$class; -> return $self; -61,65d82 -< sub rgb { -< my $self = shift; -< SDL::ColorRGB($$self,@_); -< } -< -72,78c89,95 -< $SDL::Color::black = SDL::Color->new(0,0,0); -< $SDL::Color::white = SDL::Color->new(255,255,255); -< $SDL::Color::red = SDL::Color->new(255,0,0); -< $SDL::Color::blue = SDL::Color->new(0,0,255); -< $SDL::Color::green = SDL::Color->new(0,255,0); -< $SDL::Color::purple = SDL::Color->new(255,0,255); -< $SDL::Color::yellow = SDL::Color->new(255,255,0); ---- -> $SDL::Color::black = new SDL::Color -r => 0, -g => 0, -b => 0; -> $SDL::Color::white = new SDL::Color -r => 255, -g => 255, -b => 255; -> $SDL::Color::red = new SDL::Color -r => 255, -g => 0, -b => 0; -> $SDL::Color::blue = new SDL::Color -r => 0, -g => 0, -b => 255; -> $SDL::Color::green = new SDL::Color -r => 0, -g => 255, -b => 0; -> $SDL::Color::purple = new SDL::Color -r => 255, -g => 0, -b => 255; -> $SDL::Color::yellow = new SDL::Color -r => 255, -g => 255, -b => 0; -92,93d108 -< $color = SDL::Color->new($red,$green,$blue); # fastest -< -101c116 -< representations. ---- -> representations, with the same interface as L. -108,112d122 -< =head2 new ($r, $g, $b) -< -< C with three color values will construct both a SDL_Color -< structure, and the associated object with the specified values. -< -130,136d139 -< =head2 rgb ( $red, $green, $blue ) -< -< C is an accessor method for the red, green, and blue components -< in one go. It will return a list of three values. -< -< The color value can be set by passing a byte value (0-255) for each color component. -< -146,147d148 -< Additions by Tels 2006. -< -150c151 -< L and L. ---- -> L L -Only in sdlperl/lib/SDL: Config.pm -diff -r SDL_perl/lib/SDL/Constants.pm sdlperl/lib/SDL/Constants.pm -1c1 -< # SDL::Constants ---- -> #!/usr/bin/env perl -3c3 -< # This is an automatically generated file, don't bother editing ---- -> # Constants.pm -5c5,28 -< # Copyright (C) 2003,2004 David J. Goehrig ---- -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -10,29d32 -< require Exporter; -< -< BEGIN { -< #supposedly this crap isn't thread safe -< #SelfLoader screws up and we can't be certain to read all DATA -< #if this isn't loaded prior to creating new threads. -< -< if (! $threads::threads) { -< -< use SelfLoader; -< #$SelfLoader::DEBUG=1; -< } -< }; -< -< use vars qw( -< @EXPORT -< @ISA -< ); -< -< @ISA=qw(Exporter); -63d65 -< MIX_CHANNEL_POST -296a299,305 -> SDL_SVG_FLAG_DIRECT -> SDL_SVG_FLAG_COMPOSITE -> SDL_SAMPLEFLAG_NONE -> SDL_SAMPLEFLAG_CANSEEK -> SDL_SAMPLEFLAG_EOF -> SDL_SAMPLEFLAG_ERROR -> SDL_SAMPLEFLAG_EAGAIN -298a308,311 -> for (@EXPORT) { -> *{"SDL::" . $_} = *{$_}; -> *{"main::" . $_} = *{$_}; -> } -300d312 -< __DATA__ -333d344 -< sub MIX_CHANNEL_POST {2} -566a578,584 -> sub SDL_SVG_FLAG_DIRECT {0} -> sub SDL_SVG_FLAG_COMPOSITE {1} -> sub SDL_SAMPLEFLAG_NONE {0} -> sub SDL_SAMPLEFLAG_CANSEEK {1} -> sub SDL_SAMPLEFLAG_EOF {1<<29} -> sub SDL_SAMPLEFLAG_ERROR {1<<30} -> sub SDL_SAMPLEFLAG_EAGAIN {1<<31} -567a586 -> 1; -diff -r SDL_perl/lib/SDL/Cursor.pm sdlperl/lib/SDL/Cursor.pm -0a1,2 -> #!/usr/bin/env perl -> # -3c5,28 -< # Copyright (C) 2000,2002 David J. Goehrig ---- -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -17a43 -> die SDL::GetError() unless $$self; -diff -r SDL_perl/lib/SDL/Event.pm sdlperl/lib/SDL/Event.pm -1c1 -< # Event.pm ---- -> #!/usr/bin/env perl -3c3 -< # A package for handling SDL_Event * ---- -> # Event.pm -5,7c5,28 -< # Copyright (C) 2000,2001,2002 David J. Goehrig -< # Copyright (C) 2009 Kartik Thakore -< # see the file COPYING for terms of use ---- -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -10a32 -> -45,50d66 -< sub peep($$$$) -< { -< my ($event, $numEvents, $action, $mask) = @_; -< return SDL::PeepEvents($$event, $numEvents, $action, $mask); -< } -< -231,232d246 -< Pumps the event loop, gathering events from the input devices. -< -235,249d248 -< Polls for currently pending events -< -< =head2 peep() -< -< Checks the event queue for messages and optionally returns them. -< -< If action is SDL_ADDEVENT, up to numevents events will be added to the back of the event queue. -< -< If action is SDL_PEEKEVENT, up to numevents events at the front of the event queue, matching mask, will be returned and will not be removed from the queue. -< -< If action is SDL_GETEVENT, up to numevents events at the front of the event queue, matching mask, will be returned and will be removed from the queue. -< -< The mask parameter is a bitwise OR of SDL_EVENTMASK(event_type), for all event types you are interested in -< -< -diff -r SDL_perl/lib/SDL/Font.pm sdlperl/lib/SDL/Font.pm -1c1 -< # Font.pm ---- -> #!/usr/bin/env perl -3c3 -< # a SDL perl extension for SFont support ---- -> # Font.pm -5c5,28 -< # Copyright (C) David J. Goehrig 2000,2002 ---- -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -8a32 -> -diff -r SDL_perl/lib/SDL/MPEG.pm sdlperl/lib/SDL/MPEG.pm -0a1 -> #!/usr/bin/env perl -2c3 -< # MPEG.pm ---- -> # MPEG.pm -4c5,28 -< # A package for manipulating MPEG video ---- -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -6d29 -< # Copyright (C) 2004 David J. Goehrig -diff -r SDL_perl/lib/SDL/Mixer.pm sdlperl/lib/SDL/Mixer.pm -1c1,28 -< # Mixer.pm ---- -> #!/usr/bin/env perl -> # -> # Mixer.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -3,6d29 -< # a SDL module for manipulating the SDL_mixer lib. -< # -< # Copyright (C) 2000,2002 David J. Goehrig -< # Copyright (C) 2009 Kartik Thakore -8a32 -> -127,132d150 -< sub mix_set_panning($$$$) { -< my ($self,$channel,$left,$right) = @_; -< return SDL::MixSetPanning($channel,$left,$right); -< } -< -< -212,216d229 -< sub mix_volume_chunk($$$) { -< my ($self, $chunk, $volume) = @_; -< return SDL::MixVolumeChunk($chunk, $volume); -< } -< -396,403d408 -< =head2 sub mix_set_panning(channel,left,right) -< -< Set panning for mixer, Use MIX_CHANNEL_POST to process the postmix stream -< -< Volume for the left channel, range is 0(silence) to 255(loud) -< -< Volume for the right channel, range is 0(silence) to 255(loud) -< -406d410 -< Kartik Thakore -diff -r SDL_perl/lib/SDL/Music.pm sdlperl/lib/SDL/Music.pm -1c1 -< # Music.pm ---- -> #!/usr/bin/env perl -3c3,28 -< # a SDL_mixer data module ---- -> # Music.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -5d29 -< # Copyright (C) 2000,2002 David J. Goehrig -7a32 -> -15a41 -> die SDL::GetError() unless $$self; -diff -r SDL_perl/lib/SDL/OpenGL/Constants.pm sdlperl/lib/SDL/OpenGL/Constants.pm -1c1 -< # SDL::OpenGL::Constants ---- -> #!/usr/bin/env perl -3c3,28 -< # This is an autogenerate file, don't bother editing ---- -> # Constants.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -5d29 -< # Copyright (C) 2003 David J. Goehrig -9,19d32 -< require Exporter; -< -< use SelfLoader; -< #$SelfLoader::DEBUG=1; -< -< use vars qw( -< @EXPORT -< @ISA -< ); -< -< @ISA=qw(Exporter); -1588c1601,1605 -< __DATA__ ---- -> for (@EXPORT) { -> *{"SDL::" . $_} = *{$_}; -> *{"main::" . $_} = *{$_}; -> } -> -3153a3171,3172 -> -> 1; -diff -r SDL_perl/lib/SDL/OpenGL.pm sdlperl/lib/SDL/OpenGL.pm -1c1 -< # SDL::OpenGL.pm ---- -> #!/usr/bin/env perl -3c3 -< # A simplified OpenGL wrapper ---- -> # OpenGL.pm -5c5,28 -< # Copyright (C) 2002, 2003, 2004 David J. Goehrig ---- -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -19d41 -< use SDL::OpenGL::Constants; -28,32c50 -< # export all GL constants -< for (@SDL::OpenGL::Constants::EXPORT) { -< push @EXPORT, $_; -< } -< ---- -> use SDL::OpenGL::Constants; -diff -r SDL_perl/lib/SDL/Palette.pm sdlperl/lib/SDL/Palette.pm -0a1 -> #!/usr/bin/env perl -2c3 -< # Palette.pm ---- -> # Palette.pm -4c5 -< # a module for manipulating SDL_Palette * ---- -> # Copyright (C) 2005 David J. Goehrig -6c7,33 -< # Copyright (C) 2000,2002 David J. Goehrig ---- -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -> # -> -> # NB: there is no palette destructor because most of the time the -> # palette will be owned by a surface, so any palettes you create -> # with new, won't be destroyed until the program ends! -25a53 -> die SDL::GetError() unless $$self; -diff -r SDL_perl/lib/SDL/Rect.pm sdlperl/lib/SDL/Rect.pm -0a1 -> #!/usr/bin/env perl -2c3 -< # Rect.pm ---- -> # Rect.pm -4c5,28 -< # A package for manipulating SDL_Rect * ---- -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -6d29 -< # Copyright (C) 2003 David J. Goehrig -8a32 -> -24a49 -> die SDL::GetError() unless $$self; -diff -r SDL_perl/lib/SDL/SFont.pm sdlperl/lib/SDL/SFont.pm -1c1 -< # SDL::OpenGL.pm ---- -> #!/usr/bin/env perl -3c3,28 -< # SFont bitmat font support ---- -> # SFont.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -5d29 -< # Copyright (C) 2004 David J. Goehrig -diff -r SDL_perl/lib/SDL/Sound.pm sdlperl/lib/SDL/Sound.pm -0a1 -> #!/usr/bin/env perl -2c3 -< # Sound.pm ---- -> # Sound.pm -4c5,28 -< # a SDL_mixer data module ---- -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -6d29 -< # Copyright (C) 2000,2002 David J. Goehrig -15a39 -> die SDL::GetError() unless $$self; -diff -r SDL_perl/lib/SDL/Surface.pm sdlperl/lib/SDL/Surface.pm -0a1,12 -> #!/usr/bin/env perl -> # -> # Surface.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -2c14,25 -< # Surface.pm ---- -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -4c27,28 -< # A package for manipulating SDL_Surface * ---- -> # David J. Goehrig -> # dgoehrig@cpan.org -6d29 -< # Copyright (C) 2003 David J. Goehrig -50,51c73 -< die "SDL::Surface::new failed. ", SDL::GetError() -< unless ( $$self); ---- -> die SDL::GetError() unless $$self; -diff -r SDL_perl/lib/SDL/TTFont.pm sdlperl/lib/SDL/TTFont.pm -1c1 -< # TTFont.pm ---- -> #!/usr/bin/env perl -3c3 -< # a SDL perl extension for SDL_ttf support ---- -> # TTFont.pm -5c5,28 -< # Copyright (C) David J. Goehrig 2002 ---- -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -24c47 -< $self->{-mode} = $options{-mode} || $options{-m} || TEXT_SHADED(); ---- -> $self->{-mode} = $options{-mode} || $options{-m} || SDL::TEXT_SHADED(); -89c112 -< SDL::TTFSetFontStyle($$self{-font},TTF_STYLE_NORMAL()); ---- -> SDL::TTFSetFontStyle($$self{-font},SDL::TTF_STYLE_NORMAL()); -94c117 -< SDL::TTFSetFontStyle($$self{-font},TTF_STYLE_BOLD()); ---- -> SDL::TTFSetFontStyle($$self{-font},SDL::TTF_STYLE_BOLD()); -99c122 -< SDL::TTFSetFontStyle($$self{-font},TTF_STYLE_ITALIC()); ---- -> SDL::TTFSetFontStyle($$self{-font},SDL::TTF_STYLE_ITALIC()); -105c128 -< SDL::TTFSetFontStyle($$self{-font},TTF_STYLE_UNDERLINE()); ---- -> SDL::TTFSetFontStyle($$self{-font},SDL::TTF_STYLE_UNDERLINE()); -110c133 -< $$self{-mode} = TEXT_SHADED(); ---- -> $$self{-mode} = SDL::TEXT_SHADED(); -115c138 -< $$self{-mode} = TEXT_SOLID(); ---- -> $$self{-mode} = SDL::TEXT_SOLID(); -120c143 -< $$self{-mode} = TEXT_BLENDED(); ---- -> $$self{-mode} = SDL::TEXT_BLENDED(); -125c148 -< $$self{-mode} = UTF8_SHADED(); ---- -> $$self{-mode} = SDL::UTF8_SHADED(); -130c153 -< $$self{-mode} = UTF8_SOLID(); ---- -> $$self{-mode} = SDL::UTF8_SOLID(); -135c158 -< $$self{-mode} = UTF8_BLENDED(); ---- -> $$self{-mode} = SDL::UTF8_BLENDED(); -140c163 -< $$self{-mode} = UNICODE_SHADED(); ---- -> $$self{-mode} = SDL::UNICODE_SHADED(); -145c168 -< $$self{-mode} = UNICODE_SOLID(); ---- -> $$self{-mode} = SDL::UNICODE_SOLID(); -150c173 -< $$self{-mode} = UNICODE_BLENDED(); ---- -> $$self{-mode} = SDL::UNICODE_BLENDED(); -diff -r SDL_perl/lib/SDL/Timer.pm sdlperl/lib/SDL/Timer.pm -1c1 -< # Timer.pm ---- -> #!/usr/bin/env perl -3c3,28 -< # A package for manipulating SDL_Timer * ---- -> # Timer.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -5d29 -< # Copyright (C) 2002 David J. Goehrig -7a32 -> -diff -r SDL_perl/lib/SDL/Tool/Font.pm sdlperl/lib/SDL/Tool/Font.pm -0a1 -> #!/usr/bin/env perl -2c3,28 -< # SDL::Tool::Font - format agnostic font tool ---- -> # Font.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -4d29 -< # Copyright (C) 2002 David J. Goehrig -49c74 -< unless ($surface->isa('SDL::Surface')); ---- -> unless ($SDL::DEBUG && $surface->isa('SDL::Surface')); -diff -r SDL_perl/lib/SDL/Tool/Graphic.pm sdlperl/lib/SDL/Tool/Graphic.pm -0a1 -> #!/usr/bin/env perl -2c3,28 -< # SDL::GraphicTool - zooming and rotating graphic tool ---- -> # Graphic.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -4,5d29 -< # Copyright (C) 2002 Russell E. Valentine -< # Copyright (C) 2002 David J. Goehrig -Only in sdlperl/lib/SDL/Tutorial: .svn -diff -r SDL_perl/lib/SDL/Tutorial/Animation.pm sdlperl/lib/SDL/Tutorial/Animation.pm -0a1,30 -> #!/usr/bin/env perl -> # -> # Animation.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -> # -> -3c33,34 -< use Pod::ToDemo <<'END_HERE'; ---- -> use strict; -> use SDL; -diff -r SDL_perl/lib/SDL/Tutorial/Drawing.pm sdlperl/lib/SDL/Tutorial/Drawing.pm -1c1,29 -< package SDL::Tutorial::Drawing; ---- -> #!/usr/bin/env perl -> # -> # Drawing.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -> # -3c31,34 -< use Pod::ToDemo <<'END_HERE'; ---- -> package SDL::Tutorial:Drawing; -> -> use strict; -> use SDL; -diff -r SDL_perl/lib/SDL/Tutorial/Images.pm sdlperl/lib/SDL/Tutorial/Images.pm -0a1,30 -> #!/usr/bin/env perl -> # -> # Images.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -> # -> -3a34 -> use SDL; -diff -r SDL_perl/lib/SDL/Tutorial.pm sdlperl/lib/SDL/Tutorial.pm -0a1,30 -> #!/usr/bin/env perl -> # -> # Tutorial.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -> # -> -3c33,34 -< use Pod::ToDemo <<'END_HERE'; ---- -> use strict; -> use SDL; -diff -r SDL_perl/lib/SDL/Video.pm sdlperl/lib/SDL/Video.pm -0a1 -> #!/usr/bin/env perl -2c3 -< # Video.pm ---- -> # Video.pm -4c5,28 -< # A package for manipulating MPEG video ---- -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -6d29 -< # Copyright (C) 2004 David J. Goehrig -26a50 -> die SDL::GetError() unless $$self; -diff -r SDL_perl/lib/SDL.pm sdlperl/lib/SDL.pm -0a1 -> #!/usr/bin/env perl -2c3,28 -< # Copyright (C) 2004 David J. Goehrig ---- -> # SDL.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -19,22d44 -< # reexport all SDL constants -< for (@SDL::Constants::EXPORT) { -< push @EXPORT,$_; -< } -26c48 -< $VERSION = '2.1.3'; ---- -> $VERSION = '2.2.1'; -76d97 -< -diff -r SDL_perl/lib/SDL_perl.pm sdlperl/lib/SDL_perl.pm -0a1,12 -> #!/usr/bin/env perl -> # -> # SDL_perl.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -2c14,28 -< # Copyright (C) 2004 David J. Goehrig ---- -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -diff -r SDL_perl/make/lib/SDL/Build/Cygwin.pm sdlperl/make/lib/SDL/Build/Cygwin.pm -0a1,30 -> #!/usr/bin/env perl -> # -> # Cygwin.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -> # -> -diff -r SDL_perl/make/lib/SDL/Build/Darwin.pm sdlperl/make/lib/SDL/Build/Darwin.pm -0a1,30 -> #!/usr/bin/env perl -> # -> # Darwin.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -> # -> -18,31c48,58 -< -< '/Library/Frameworks/SDL.framework/Headers' => '../../lib', -< '/Library/Frameworks/SDL_mixer.framework/Headers' => '../../lib', -< '/Library/Frameworks/SDL_image.framework/Headers' => '../../lib', -< '/Library/Frameworks/SDL_net.framework/Headers' => '../../lib', -< '/Library/Frameworks/SDL_ttf.framework/Headers' => '../../lib', -< '/Library/Frameworks/SDL_gfx.framework/Headers' => '../../lib', -< '/Library/Frameworks/libogg.framework/Headers' => '../../lib', -< '/Library/Frameworks/libvorbis.framework/Headers' => '../../lib', -< '/Frameworks/libvorbisfile.framework/Headers' => '../../lib', -< '/Library/Frameworks/libvorbisenc.framework/Headers' => '../../lib', -< '../../include' => '../../lib', -< '/System/Library/Frameworks/OpenGL.framework/Headers' => -< '/System/Library/Frameworks/OpenGL.framework/Libraries', ---- -> -> '/System/Library/Frameworks/SDL_mixer.framework/Headers' => '../../lib', -> '/System/Library/Frameworks/SDL_image.framework/Headers' => '../../lib', -> '/System/Library/Frameworks/SDL_ttf.framework/Headers' => '../../lib', -> '/System/Library/Frameworks/libogg.framework/Headers' => '../../lib', -> '/System/Library/Frameworks/libvorbis.framework/Headers' => '../../lib', -> '/System/Library/Frameworks/libvorbisfile.framework/Headers' => '../../lib', -> '/System/Library/Frameworks/libvorbisenc.framework/Headers' => '../../lib', -> '../../include' => '../../lib', -> '/System/Library/Frameworks/OpenGL.framework/Headers' => -> '/System/Library/Frameworks/OpenGL.framework/Libraries', -35c62 -< sub build_defines ---- -> sub build_c_sources -37,38c64,67 -< my $self = shift; -< my $defines = $self->SUPER::build_defines(@_); ---- -> return [qw/ -> launcher.m -> /]; -> } -40c69,72 -< push @{$defines->{SDL}}, "-Ddarwin", "-DMACOSX"; ---- -> sub build_c_source -> { -> return 'MacOSX'; -> } -42c74,76 -< return $defines; ---- -> sub build_install_base -> { -> return "SDL Perl.app/Contents/Resources"; -43a78,94 -> -> sub build_bundle -> { -> $bundle_contents="SDL Perl.app/Contents"; -> system "mkdir -p \"$bundle_contents\""; -> mkdir "$bundle_contents/MacOS",0755; -> $libs = `sdl-config --libs`; -> chomp($libs); -> $libs =~ s/-lSDLmain//g; -> system "gcc $libs -framework Cocoa `perl -MExtUtils::Embed -e ldopts` MacOSX/launcher.o -o \"$bundle_contents/MacOS/SDL Perl\""; -> -> mkdir "$bundle_contents/Resources",0755; -> system "echo \"APPL????\" > \"$bundle_contents/PkgInfo\""; -> system "cp MacOSX/Info.plist \"$bundle_contents/\""; -> system "cp \"MacOSX/SDL Perl.icns\" \"$bundle_contents/Resources\""; -> } -> -diff -r SDL_perl/make/lib/SDL/Build/Freebsd.pm sdlperl/make/lib/SDL/Build/Freebsd.pm -0a1,30 -> #!/usr/bin/env perl -> # -> # Freebsd.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -> # -> -diff -r SDL_perl/make/lib/SDL/Build/Linux.pm sdlperl/make/lib/SDL/Build/Linux.pm -0a1,30 -> #!/usr/bin/env perl -> # -> # Linux.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -> # -> -diff -r SDL_perl/make/lib/SDL/Build/MSWin32.pm sdlperl/make/lib/SDL/Build/MSWin32.pm -0a1,30 -> #!/usr/bin/env perl -> # -> # MSWin32.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -> # -> -diff -r SDL_perl/make/lib/SDL/Build/Netbsd.pm sdlperl/make/lib/SDL/Build/Netbsd.pm -0a1,30 -> #!/usr/bin/env perl -> # -> # Netbsd.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -> # -> -3c33 -< use base 'SDL::Build'; ---- -> use strict; -diff -r SDL_perl/make/lib/SDL/Build.pm sdlperl/make/lib/SDL/Build.pm -0a1 -> #!/usr/bin/env perl -2,3c3,28 -< # Copyright (C) 2004 chromatic -< # Copyright (C) 2004 David J. Goehrig ---- -> # Build.pm -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig@cpan.org -22d46 -< -25a50 -> -29a55 -> -148c174 -< ( defined $Config{usethreads} ? ('-DUSE_THREADS', '-fPIC') : '-fPIC' ), ---- -> ( defined $Config{usethreads} ? ('-DUSE_THREADS', '-fPIC') : ('-fPIC' )), -200a227,266 -> # Subclass Darwin to build Objective-C addons -> -> sub filter_support { -> my $self = shift; -> print STDERR "[SDL::Build] generic filter\n"; -> return (); -> } -> -> sub process_support_files { -> my $self = shift; -> my $p = $self->{properties}; -> return unless $p->{c_source}; -> return unless $p->{c_sources}; -> -> push @{$p->{include_dirs}}, $p->{c_source}; -> unless ( $p->{extra_compiler_flags} && $p->{extra_compiler_flags} =~ /DARCHNAME/) { -> $p->{extra_compiler_flags} .= " -DARCHNAME=" . $self->{config}{archname}; -> } -> print STDERR "[SDL::Build] extra compiler flags" . $p->{extra_compiler_flags} . "\n"; -> -> foreach my $file (map($p->{c_source} . "/$_", @{$p->{c_sources}})) { -> push @{$p->{objects}}, $self->compile_c($file); -> } -> } -> -> # Override to create a MacOS Bundle -> sub build_bundle -> { -> return; -> } -> -> # Override Install method for darwin -> sub ACTION_install { -> my ($self) = @_; -> require ExtUtils::Install; -> $self->depends_on('build'); -> $self->get_arch($^O)->build_bundle(); -> ExtUtils::Install::install($self->install_map, 1, 0, $self->{args}{uninst}||0); -> } -> -Only in sdlperl/: pod2htmd.tmp -Only in sdlperl/: pod2htmi.tmp -diff -r SDL_perl/src/OpenGL.xs sdlperl/src/OpenGL.xs -1d0 -< // SDL::OpenGL -3c2,28 -< // Copyright (C) 2002,2003,2004 David J. Goehrig ---- -> // OpenGL.xs -> // -> // Copyright (C) 2005 David J. Goehrig -> // -> // ------------------------------------------------------------------------------ -> // -> // This library is free software; you can redistribute it and/or -> // modify it under the terms of the GNU Lesser General Public -> // License as published by the Free Software Foundation; either -> // version 2.1 of the License, or (at your option) any later version. -> // -> // This library is distributed in the hope that it will be useful, -> // but WITHOUT ANY WARRANTY; without even the implied warranty of -> // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> // Lesser General Public License for more details. -> // -> // You should have received a copy of the GNU Lesser General Public -> // License along with this library; if not, write to the Free Software -> // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> // -> // ------------------------------------------------------------------------------ -> // -> // Please feel free to send questions, suggestions or improvements to: -> // -> // David J. Goehrig -> // dgoehrig@cpan.org -> // -17d41 -< #include -27c51 -< #include "defines.h" ---- -> #include "../defines.h" -673d696 -< case GL_MAX_TEXTURE_UNITS_ARB: -713,718d735 -< const char * glGetString ( name ) -< GLenum name -< CODE: -< RETVAL = (const char *)glGetString (name); -< OUTPUT: -< RETVAL -1236c1253 -< glRasterPos ( x, y, ... ) ---- -> glRasterPos ( x, y, z, ... ) -1238a1256 -> double z -1240,1253c1258,1262 -< if (items == 2) -< { -< glRasterPos2d (x,y); -< } -< else if (items == 3) -< { -< double z = SvNV (ST(2)); -< glRasterPos3d (x,y,z); -< } -< else if (items == 4) -< { -< double z = SvNV (ST(2)); -< double w = SvNV (ST(3)); -< glRasterPos4d (x,y,z,w); ---- -> if ( items == 4 ) { -> double w = SvNV(ST(3)); -> glRasterPos4d(x,y,z,w); -> } else { -> glRasterPos3d(x,y,z); -1737,1739c1746,1748 -< Uint32 i; -< Uint32 *names; -< names = (Uint32*)safemalloc(sizeof(Uint32)*n); ---- -> GLsizei i; -> GLuint* names; -> names = (GLuint*)safemalloc(sizeof(GLuint)*n); -1767c1776 -< Uint32 *textures; ---- -> GLuint* textures; -1769c1778 -< textures = (Uint32*)safemalloc(sizeof(Uint32) * items); ---- -> textures = (GLuint*)safemalloc(sizeof(GLuint) * items); -1781c1790 -< Uint32 *textures; ---- -> GLuint* textures; -1785c1794 -< textures = (Uint32*)safemalloc(sizeof(Uint32) * items); ---- -> textures = (GLuint*)safemalloc(sizeof(GLuint) * items); -2722,2803d2730 -< GLUquadric * -< gluNewQuadric () -< CODE: -< RETVAL = gluNewQuadric (); -< OUTPUT: -< RETVAL -< -< void -< gluDeleteQuadric (quad) -< GLUquadric *quad -< CODE: -< gluDeleteQuadric(quad); -< -< void -< gluQuadricNormals ( quad, normal ) -< GLUquadric *quad -< GLenum normal -< CODE: -< gluQuadricNormals(quad, normal); -< -< -< void -< gluQuadricTexture ( quad, texture ) -< GLUquadric *quad -< GLboolean texture -< CODE: -< gluQuadricTexture ( quad, texture ); -< -< void -< gluCylinder ( quad, base, top, height, slices, stacks ) -< GLUquadric *quad -< GLdouble base -< GLdouble top -< GLdouble height -< GLint slices -< GLint stacks -< CODE: -< gluCylinder ( quad, base, top, height, slices, stacks ); -< -< void -< gluDisk ( quad, inner, outer, slices, loops ) -< GLUquadric *quad -< GLdouble inner -< GLdouble outer -< GLint slices -< GLint loops -< CODE: -< gluDisk ( quad, inner, outer, slices, loops ); -< -< void -< gluPartialDisk ( quad, inner, outer, slices, loops, start, sweep ) -< GLUquadric *quad -< GLdouble inner -< GLdouble outer -< GLint slices -< GLint loops -< GLdouble start -< GLdouble sweep -< -< CODE: -< gluPartialDisk ( quad, inner, outer, slices, loops, start, sweep ); -< -< void -< gluSphere ( quad, radius, slices, stacks ) -< GLUquadric *quad -< GLdouble radius -< GLint slices -< GLint stacks -< CODE: -< gluSphere ( quad, radius, slices, stacks ); -< -< -< -< void -< glXUseXFont ( font, first, count, list_base ) -< Font font -< int first -< int count -< int list_base -< CODE: -< glXUseXFont ( font, first, count, list_base ); -< -Only in sdlperl/src: SDL -diff -r SDL_perl/src/SDL.xs sdlperl/src/SDL.xs -0a1 -> // -3c4,27 -< // SDL Perl by David J. Goehrig ---- -> // Copyright (C) 2005 David J. Goehrig -> // -> // ------------------------------------------------------------------------------ -> // -> // This library is free software; you can redistribute it and/or -> // modify it under the terms of the GNU Lesser General Public -> // License as published by the Free Software Foundation; either -> // version 2.1 of the License, or (at your option) any later version. -> // -> // This library is distributed in the hope that it will be useful, -> // but WITHOUT ANY WARRANTY; without even the implied warranty of -> // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> // Lesser General Public License for more details. -> // -> // You should have received a copy of the GNU Lesser General Public -> // License along with this library; if not, write to the Free Software -> // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> // -> // ------------------------------------------------------------------------------ -> // -> // Please feel free to send questions, suggestions or improvements to: -> // -> // David J. Goehrig -> // dgoehrig@cpan.org -5,8d28 -< // Copyright (C) 2000,2001,2002,2003,2004 David J. Goehrig -< // Copyright (C) 2009 Kartik Thakore -< // This software is under the GNU Library General Public License (LGPL) -< // see the file COPYING for terms of use -19a40,47 -> #ifdef HAVE_GL -> #include -> #endif -> -> #ifdef HAVE_GLU -> #include -> #endif -> -29,34c57,58 -< #ifdef HAVE_GL -< #include -< #endif -< -< #ifdef HAVE_GLU -< #include ---- -> #ifdef HAVE_SDL_SOUND -> #include -67a92,95 -> #ifdef HAVE_SDL_SVG -> #include -> #endif -> -74,99d101 -< #ifdef MACOSX -< #include -< void CPSEnableForegroundOperation(ProcessSerialNumber* psn); -< void NSApplicationLoad(); -< void SDL_macosx_init(void) { -< Boolean sameProc; -< ProcessSerialNumber myProc, frProc; -< if (GetFrontProcess(&frProc) == noErr) -< if (GetCurrentProcess(&myProc) == noErr) -< if (SameProcess(&frProc, &myProc, &sameProc) == noErr && sameProc == 0) { -< /* -< NSLog(@"creating bad autorelease pool"); -< [[NSAutoreleasePool alloc] init]; -< */ -< NSApplicationLoad(); -< CPSEnableForegroundOperation(&myProc); -< } -< } -< void SDL_macosx_quit(void) { -< } -< #endif // MACOSX -< -< -< -< -< -208a211,214 -> #define INIT_NS_APPLICATION -> #define QUIT_NS_APPLICATION -> -> -211a218 -> QUIT_NS_APPLICATION -213,215d219 -< #ifdef MACOSX -< SDL_macosx_quit(); -< #endif -241,243c245 -< #ifdef MACOSX -< SDL_macosx_init(); -< #endif ---- -> INIT_NS_APPLICATION -269a272 -> QUIT_NS_APPLICATION -271,274d273 -< #ifdef MACOSX -< SDL_macosx_quit(); -< #endif -< -339a339,435 -> SDL_RWops* -> RWFromFile ( file, mode ) -> char* file -> char * mode -> CODE: -> RETVAL = SDL_RWFromFile(file,mode); -> OUTPUT: -> RETVAL -> -> SDL_RWops* -> RWFromFP ( fp, autoclose ) -> FILE* fp -> int autoclose -> CODE: -> RETVAL = SDL_RWFromFP(fp,autoclose); -> OUTPUT: -> RETVAL -> -> SDL_RWops* -> RWFromMem ( mem, size ) -> char* mem -> int size -> CODE: -> RETVAL = SDL_RWFromMem((void*)mem,size); -> OUTPUT: -> RETVAL -> -> SDL_RWops* -> RWFromConstMem ( mem, size ) -> const char* mem -> int size -> CODE: -> RETVAL = SDL_RWFromConstMem((const void*)mem,size); -> OUTPUT: -> RETVAL -> -> SDL_RWops* -> AllocRW () -> CODE: -> RETVAL = SDL_AllocRW(); -> OUTPUT: -> RETVAL -> -> void -> FreeRW ( rw ) -> SDL_RWops* rw -> CODE: -> SDL_FreeRW(rw); -> -> int -> RWseek ( rw, off, whence ) -> SDL_RWops* rw -> int off -> int whence -> CODE: -> RETVAL = SDL_RWseek(rw,off,whence); -> OUTPUT: -> RETVAL -> -> int -> RWtell ( rw ) -> SDL_RWops* rw -> CODE: -> RETVAL = SDL_RWtell(rw); -> OUTPUT: -> RETVAL -> -> int -> RWread ( rw, mem, size, n ) -> SDL_RWops* rw -> char* mem -> int size -> int n -> CODE: -> RETVAL = SDL_RWread(rw,mem,size,n); -> OUTPUT: -> RETVAL -> -> int -> RWwrite ( rw, mem, size, n ) -> SDL_RWops* rw -> char* mem -> int size -> int n -> CODE: -> RETVAL = SDL_RWwrite(rw,mem,size,n); -> OUTPUT: -> RETVAL -> -> int -> RWclose ( rw ) -> SDL_RWops* rw -> CODE: -> RETVAL = SDL_RWclose(rw); -> OUTPUT: -> RETVAL -> -530,542d625 -< -< int -< PeepEvents( e, numevents, action, mask) -< SDL_Event *e -< int numevents -< SDL_eventaction action -< Uint32 mask -< CODE: -< RETVAL = (int)SDL_PeepEvents( e, numevents, action, mask); -< OUTPUT: -< RETVAL -< -< -1224,1237d1306 -< ColorRGB ( color, ... ) -< SDL_Color *color -< PPCODE: -< if (items > 1 ) { -< color->r = SvIV(ST(1)); -< color->g = SvIV(ST(2)); -< color->b = SvIV(ST(3)); -< } -< mXPUSHi( color->r ); -< mXPUSHi( color->g ); -< mXPUSHi( color->b ); -< XSRETURN(3); -< -< void -1941,1951d2009 -< MixSetPanning ( channel, left, right ) -< int channel -< Uint8 left -< Uint8 right -< CODE: -< RETVAL = Mix_SetPanning(channel,left, right); -< OUTPUT: -< RETVAL -< -< -< int -2364c2422 -< Sint16 ---- -> Uint8 -2519c2577 -< char *host ---- -> const char *host -3316c3374 -< SMPEG_Info *info; ---- -> SMPEG_Info *info -3322c3380 -< SMPEG_Info* info; ---- -> SMPEG_Info* info -3330c3388 -< SMPEG_Info* info; ---- -> SMPEG_Info* info -3338c3396 -< SMPEG_Info* info; ---- -> SMPEG_Info* info -3346c3404 -< SMPEG_Info* info; ---- -> SMPEG_Info* info -3354c3412 -< SMPEG_Info* info; ---- -> SMPEG_Info* info -3362c3420 -< SMPEG_Info* info; ---- -> SMPEG_Info* info -3370c3428 -< SMPEG_Info* info; ---- -> SMPEG_Info* info -3378c3436 -< SMPEG_Info* info; ---- -> SMPEG_Info* info -3386c3444 -< SMPEG_Info* info; ---- -> SMPEG_Info* info -3394c3452 -< SMPEG_Info* info; ---- -> SMPEG_Info* info -3402c3460 -< SMPEG_Info* info; ---- -> SMPEG_Info* info -3410c3468 -< SMPEG* mpeg ; ---- -> SMPEG* mpeg -3418,3419c3476,3477 -< char* filename; -< SMPEG_Info* info; ---- -> char* filename -> SMPEG_Info* info -3432c3490 -< SMPEG* mpeg; ---- -> SMPEG* mpeg -3438,3439c3496,3497 -< SMPEG* mpeg ; -< int flag; ---- -> SMPEG* mpeg -> int flag -3448,3449c3506,3507 -< SMPEG* mpeg ; -< int flag; ---- -> SMPEG* mpeg -> int flag -3455,3456c3513,3514 -< SMPEG* mpeg ; -< int volume; ---- -> SMPEG* mpeg -> int volume -3462,3464c3520,3522 -< SMPEG* mpeg; -< SDL_Surface* dest; -< SDL_mutex* surfLock; ---- -> SMPEG* mpeg -> SDL_Surface* dest -> SDL_mutex* surfLock -3470,3472c3528,3530 -< SMPEG* mpeg; -< int w; -< int h; ---- -> SMPEG* mpeg -> int w -> int h -3478c3536 -< SMPEG* mpeg; ---- -> SMPEG* mpeg -3485c3543 -< SMPEG* mpeg; ---- -> SMPEG* mpeg -3506c3564 -< SMPEG* mpeg; ---- -> SMPEG* mpeg -3514c3572 -< SMPEG* mpeg; ---- -> SMPEG* mpeg -3520c3578 -< SMPEG* mpeg; ---- -> SMPEG* mpeg -3527c3585 -< SMPEG* mpeg; ---- -> SMPEG* mpeg -3536c3594 -< SMPEG* mpeg; ---- -> SMPEG* mpeg -3542,3543c3600,3601 -< SMPEG* mpeg; -< int bytes; ---- -> SMPEG* mpeg -> int bytes -3549,3550c3607,3608 -< SMPEG* mpeg; -< float seconds; ---- -> SMPEG* mpeg -> float seconds -3556,3557c3614,3615 -< SMPEG* mpeg; -< SDL_Rect* rect; ---- -> SMPEG* mpeg -> SDL_Rect* rect -3563,3564c3621,3622 -< SMPEG* mpeg; -< int frame; ---- -> SMPEG* mpeg -> int frame -3570c3628 -< SMPEG* mpeg; ---- -> SMPEG* mpeg -3584,3591c3642,3649 -< SDL_Surface * src; -< double angle; -< double zoom; -< int smooth; -< CODE: -< RETVAL = rotozoomSurface( src, angle, zoom, smooth); -< OUTPUT: -< RETVAL ---- -> SDL_Surface * src -> double angle -> double zoom -> int smooth -> CODE: -> RETVAL = rotozoomSurface( src, angle, zoom, smooth); -> OUTPUT: -> RETVAL -3595,3603c3653,3660 -< SDL_Surface *src; -< double zoomx; -< double zoomy; -< int smooth; -< CODE: -< RETVAL = zoomSurface( src, zoomx, zoomy, smooth); -< OUTPUT: -< RETVAL -< ---- -> SDL_Surface *src -> double zoomx -> double zoomy -> int smooth -> CODE: -> RETVAL = zoomSurface( src, zoomx, zoomy, smooth); -> OUTPUT: -> RETVAL -3607,3614c3664,3671 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y; -< Uint32 color; -< CODE: -< RETVAL = pixelColor( dst, x, y, color); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y -> Uint32 color -> CODE: -> RETVAL = pixelColor( dst, x, y, color); -> OUTPUT: -> RETVAL -3618,3628c3675,3685 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y; -< Uint8 r; -< Uint8 g; -< Uint8 b; -< Uint8 a; -< CODE: -< RETVAL = pixelRGBA( dst, x, y, r, g, b, a ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y -> Uint8 r -> Uint8 g -> Uint8 b -> Uint8 a -> CODE: -> RETVAL = pixelRGBA( dst, x, y, r, g, b, a ); -> OUTPUT: -> RETVAL -3632,3640c3689,3697 -< SDL_Surface* dst; -< Sint16 x1; -< Sint16 x2; -< Sint16 y; -< Uint32 color; -< CODE: -< RETVAL = hlineColor( dst, x1, x2, y, color ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x1 -> Sint16 x2 -> Sint16 y -> Uint32 color -> CODE: -> RETVAL = hlineColor( dst, x1, x2, y, color ); -> OUTPUT: -> RETVAL -3644,3655c3701,3712 -< SDL_Surface* dst; -< Sint16 x1; -< Sint16 x2; -< Sint16 y; -< Uint8 r; -< Uint8 g; -< Uint8 b; -< Uint8 a; -< CODE: -< RETVAL = hlineRGBA( dst, x1, x2, y, r, g, b, a ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x1 -> Sint16 x2 -> Sint16 y -> Uint8 r -> Uint8 g -> Uint8 b -> Uint8 a -> CODE: -> RETVAL = hlineRGBA( dst, x1, x2, y, r, g, b, a ); -> OUTPUT: -> RETVAL -3659,3667c3716,3724 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y1; -< Sint16 y2; -< Uint32 color; -< CODE: -< RETVAL = vlineColor( dst, x, y1, y2, color ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y1 -> Sint16 y2 -> Uint32 color -> CODE: -> RETVAL = vlineColor( dst, x, y1, y2, color ); -> OUTPUT: -> RETVAL -3671,3682c3728,3739 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y1; -< Sint16 y2; -< Uint8 r; -< Uint8 g; -< Uint8 b; -< Uint8 a; -< CODE: -< RETVAL = vlineRGBA( dst, x, y1, y2, r, g, b, a ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y1 -> Sint16 y2 -> Uint8 r -> Uint8 g -> Uint8 b -> Uint8 a -> CODE: -> RETVAL = vlineRGBA( dst, x, y1, y2, r, g, b, a ); -> OUTPUT: -> RETVAL -3686,3695c3743,3752 -< SDL_Surface* dst; -< Sint16 x1; -< Sint16 y1; -< Sint16 x2; -< Sint16 y2; -< Uint32 color; -< CODE: -< RETVAL = rectangleColor( dst, x1, y1, x2, y2, color ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x1 -> Sint16 y1 -> Sint16 x2 -> Sint16 y2 -> Uint32 color -> CODE: -> RETVAL = rectangleColor( dst, x1, y1, x2, y2, color ); -> OUTPUT: -> RETVAL -3699,3711c3756,3768 -< SDL_Surface* dst; -< Sint16 x1; -< Sint16 y1; -< Sint16 x2; -< Sint16 y2; -< Uint8 r; -< Uint8 g; -< Uint8 b; -< Uint8 a; -< CODE: -< RETVAL = rectangleRGBA( dst, x1, y1, x2, y2, r, g, b, a ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x1 -> Sint16 y1 -> Sint16 x2 -> Sint16 y2 -> Uint8 r -> Uint8 g -> Uint8 b -> Uint8 a -> CODE: -> RETVAL = rectangleRGBA( dst, x1, y1, x2, y2, r, g, b, a ); -> OUTPUT: -> RETVAL -3715,3724c3772,3781 -< SDL_Surface* dst; -< Sint16 x1; -< Sint16 y1; -< Sint16 x2; -< Sint16 y2; -< Uint32 color; -< CODE: -< RETVAL = boxColor( dst, x1, y1, x2, y2, color ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x1 -> Sint16 y1 -> Sint16 x2 -> Sint16 y2 -> Uint32 color -> CODE: -> RETVAL = boxColor( dst, x1, y1, x2, y2, color ); -> OUTPUT: -> RETVAL -3728,3740c3785,3797 -< SDL_Surface* dst; -< Sint16 x1; -< Sint16 y1; -< Sint16 x2; -< Sint16 y2; -< Uint8 r; -< Uint8 g; -< Uint8 b; -< Uint8 a; -< CODE: -< RETVAL = boxRGBA( dst, x1, y1, x2, y2, r, g, b, a ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst; -> Sint16 x1 -> Sint16 y1 -> Sint16 x2 -> Sint16 y2 -> Uint8 r -> Uint8 g -> Uint8 b -> Uint8 a -> CODE: -> RETVAL = boxRGBA( dst, x1, y1, x2, y2, r, g, b, a ); -> OUTPUT: -> RETVAL -3744,3753c3801,3810 -< SDL_Surface* dst; -< Sint16 x1; -< Sint16 y1; -< Sint16 x2; -< Sint16 y2; -< Uint32 color; -< CODE: -< RETVAL = lineColor( dst, x1, y1, x2, y2, color ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x1 -> Sint16 y1 -> Sint16 x2 -> Sint16 y2 -> Uint32 color -> CODE: -> RETVAL = lineColor( dst, x1, y1, x2, y2, color ); -> OUTPUT: -> RETVAL -3757,3769c3814,3826 -< SDL_Surface* dst; -< Sint16 x1; -< Sint16 y1; -< Sint16 x2; -< Sint16 y2; -< Uint8 r; -< Uint8 g; -< Uint8 b; -< Uint8 a; -< CODE: -< RETVAL = lineRGBA( dst, x1, y1, x2, y2, r, g, b, a ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x1 -> Sint16 y1 -> Sint16 x2 -> Sint16 y2 -> Uint8 r -> Uint8 g -> Uint8 b -> Uint8 a -> CODE: -> RETVAL = lineRGBA( dst, x1, y1, x2, y2, r, g, b, a ); -> OUTPUT: -> RETVAL -3773,3782c3830,3839 -< SDL_Surface* dst; -< Sint16 x1; -< Sint16 y1; -< Sint16 x2; -< Sint16 y2; -< Uint32 color; -< CODE: -< RETVAL = aalineColor( dst, x1, y1, x2, y2, color ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x1 -> Sint16 y1 -> Sint16 x2 -> Sint16 y2 -> Uint32 color -> CODE: -> RETVAL = aalineColor( dst, x1, y1, x2, y2, color ); -> OUTPUT: -> RETVAL -3786,3798c3843,3855 -< SDL_Surface* dst; -< Sint16 x1; -< Sint16 y1; -< Sint16 x2; -< Sint16 y2; -< Uint8 r; -< Uint8 g; -< Uint8 b; -< Uint8 a; -< CODE: -< RETVAL = aalineRGBA( dst, x1, y1, x2, y2, r, g, b, a ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x1 -> Sint16 y1 -> Sint16 x2 -> Sint16 y2 -> Uint8 r -> Uint8 g -> Uint8 b -> Uint8 a -> CODE: -> RETVAL = aalineRGBA( dst, x1, y1, x2, y2, r, g, b, a ); -> OUTPUT: -> RETVAL -3802,3810c3859,3867 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y; -< Sint16 r; -< Uint32 color; -< CODE: -< RETVAL = circleColor( dst, x, y, r, color ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y -> Sint16 r -> Uint32 color -> CODE: -> RETVAL = circleColor( dst, x, y, r, color ); -> OUTPUT: -> RETVAL -3814,3825c3871,3882 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y; -< Sint16 rad; -< Uint8 r; -< Uint8 g; -< Uint8 b; -< Uint8 a; -< CODE: -< RETVAL = circleRGBA( dst, x, y, rad, r, g, b, a ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y -> Sint16 rad -> Uint8 r -> Uint8 g -> Uint8 b -> Uint8 a -> CODE: -> RETVAL = circleRGBA( dst, x, y, rad, r, g, b, a ); -> OUTPUT: -> RETVAL -3829,3837c3886,3894 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y; -< Sint16 r; -< Uint32 color; -< CODE: -< RETVAL = aacircleColor( dst, x, y, r, color ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y -> Sint16 r -> Uint32 color -> CODE: -> RETVAL = aacircleColor( dst, x, y, r, color ); -> OUTPUT: -> RETVAL -3841,3852c3898,3909 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y; -< Sint16 rad; -< Uint8 r; -< Uint8 g; -< Uint8 b; -< Uint8 a; -< CODE: -< RETVAL = aacircleRGBA( dst, x, y, rad, r, g, b, a ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y -> Sint16 rad -> Uint8 r -> Uint8 g -> Uint8 b -> Uint8 a -> CODE: -> RETVAL = aacircleRGBA( dst, x, y, rad, r, g, b, a ); -> OUTPUT: -> RETVAL -3856,3864c3913,3921 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y; -< Sint16 r; -< Uint32 color; -< CODE: -< RETVAL = filledCircleColor( dst, x, y, r, color ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y -> Sint16 r -> Uint32 color -> CODE: -> RETVAL = filledCircleColor( dst, x, y, r, color ); -> OUTPUT: -> RETVAL -3868,3879c3925,3936 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y; -< Sint16 rad; -< Uint8 r; -< Uint8 g; -< Uint8 b; -< Uint8 a; -< CODE: -< RETVAL = filledCircleRGBA( dst, x, y, rad, r, g, b, a ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y -> Sint16 rad -> Uint8 r -> Uint8 g -> Uint8 b -> Uint8 a -> CODE: -> RETVAL = filledCircleRGBA( dst, x, y, rad, r, g, b, a ); -> OUTPUT: -> RETVAL -3883,3892c3940,3949 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y; -< Sint16 rx; -< Sint16 ry; -< Uint32 color; -< CODE: -< RETVAL = ellipseColor( dst, x, y, rx, ry, color ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y -> Sint16 rx -> Sint16 ry -> Uint32 color -> CODE: -> RETVAL = ellipseColor( dst, x, y, rx, ry, color ); -> OUTPUT: -> RETVAL -3896,3908c3953,3965 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y; -< Sint16 rx; -< Sint16 ry; -< Uint8 r; -< Uint8 g; -< Uint8 b; -< Uint8 a; -< CODE: -< RETVAL = ellipseRGBA( dst, x, y, rx, ry, r, g, b, a ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y -> Sint16 rx -> Sint16 ry -> Uint8 r -> Uint8 g -> Uint8 b -> Uint8 a -> CODE: -> RETVAL = ellipseRGBA( dst, x, y, rx, ry, r, g, b, a ); -> OUTPUT: -> RETVAL -3912,3921c3969,3978 -< SDL_Surface* dst; -< Sint16 xc; -< Sint16 yc; -< Sint16 rx; -< Sint16 ry; -< Uint32 color; -< CODE: -< RETVAL = aaellipseColor( dst, xc, yc, rx, ry, color ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 xc -> Sint16 yc -> Sint16 rx -> Sint16 ry -> Uint32 color -> CODE: -> RETVAL = aaellipseColor( dst, xc, yc, rx, ry, color ); -> OUTPUT: -> RETVAL -3925,3937c3982,3994 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y; -< Sint16 rx; -< Sint16 ry; -< Uint8 r; -< Uint8 g; -< Uint8 b; -< Uint8 a; -< CODE: -< RETVAL = aaellipseRGBA( dst, x, y, rx, ry, r, g, b, a ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y -> Sint16 rx -> Sint16 ry -> Uint8 r -> Uint8 g -> Uint8 b -> Uint8 a -> CODE: -> RETVAL = aaellipseRGBA( dst, x, y, rx, ry, r, g, b, a ); -> OUTPUT: -> RETVAL -3941,3950c3998,4007 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y; -< Sint16 rx; -< Sint16 ry; -< Uint32 color; -< CODE: -< RETVAL = filledEllipseColor( dst, x, y, rx, ry, color ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y -> Sint16 rx -> Sint16 ry -> Uint32 color -> CODE: -> RETVAL = filledEllipseColor( dst, x, y, rx, ry, color ); -> OUTPUT: -> RETVAL -3954,3966c4011,4023 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y; -< Sint16 rx; -< Sint16 ry; -< Uint8 r; -< Uint8 g; -< Uint8 b; -< Uint8 a; -< CODE: -< RETVAL = filledEllipseRGBA( dst, x, y, rx, ry, r, g, b, a ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y -> Sint16 rx -> Sint16 ry -> Uint8 r -> Uint8 g -> Uint8 b -> Uint8 a -> CODE: -> RETVAL = filledEllipseRGBA( dst, x, y, rx, ry, r, g, b, a ); -> OUTPUT: -> RETVAL -3970,3980c4027,4037 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y; -< Sint16 rad; -< Sint16 start; -< Sint16 end; -< Uint32 color; -< CODE: -< RETVAL = filledPieColor( dst, x, y, rad, start, end, color ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y -> Sint16 rad -> Sint16 start -> Sint16 end -> Uint32 color -> CODE: -> RETVAL = filledPieColor( dst, x, y, rad, start, end, color ); -> OUTPUT: -> RETVAL -3984,3997c4041,4054 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y; -< Sint16 rad; -< Sint16 start; -< Sint16 end; -< Uint8 r; -< Uint8 g; -< Uint8 b; -< Uint8 a; -< CODE: -< RETVAL = filledPieRGBA( dst, x, y, rad, start, end, r, g, b, a ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y -> Sint16 rad -> Sint16 start -> Sint16 end -> Uint8 r -> Uint8 g -> Uint8 b -> Uint8 a -> CODE: -> RETVAL = filledPieRGBA( dst, x, y, rad, start, end, r, g, b, a ); -> OUTPUT: -> RETVAL -4001,4009c4058,4066 -< SDL_Surface* dst; -< Sint16* vx; -< Sint16* vy; -< int n; -< Uint32 color; -< CODE: -< RETVAL = polygonColor( dst, vx, vy, n, color ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16* vx -> Sint16* vy -> int n -> Uint32 color; -> CODE: -> RETVAL = polygonColor( dst, vx, vy, n, color ); -> OUTPUT: -> RETVAL -4013,4024c4070,4081 -< SDL_Surface* dst; -< Sint16* vx; -< Sint16* vy; -< int n; -< Uint8 r; -< Uint8 g; -< Uint8 b; -< Uint8 a; -< CODE: -< RETVAL = polygonRGBA( dst, vx, vy, n, r, g, b, a ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16* vx -> Sint16* vy -> int n -> Uint8 r -> Uint8 g -> Uint8 b -> Uint8 a -> CODE: -> RETVAL = polygonRGBA( dst, vx, vy, n, r, g, b, a ); -> OUTPUT: -> RETVAL -4028,4036c4085,4093 -< SDL_Surface* dst; -< Sint16* vx; -< Sint16* vy; -< int n; -< Uint32 color; -< CODE: -< RETVAL = aapolygonColor( dst, vx, vy, n, color ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16* vx -> Sint16* vy -> int n -> Uint32 color -> CODE: -> RETVAL = aapolygonColor( dst, vx, vy, n, color ); -> OUTPUT: -> RETVAL -4040,4051c4097,4108 -< SDL_Surface* dst; -< Sint16* vx; -< Sint16* vy; -< int n; -< Uint8 r; -< Uint8 g; -< Uint8 b; -< Uint8 a; -< CODE: -< RETVAL = aapolygonRGBA( dst, vx, vy, n, r, g, b, a ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16* vx -> Sint16* vy -> int n -> Uint8 r -> Uint8 g -> Uint8 b -> Uint8 a -> CODE: -> RETVAL = aapolygonRGBA( dst, vx, vy, n, r, g, b, a ); -> OUTPUT: -> RETVAL -4055,4063c4112,4120 -< SDL_Surface* dst; -< Sint16* vx; -< Sint16* vy; -< int n; -< int color; -< CODE: -< RETVAL = filledPolygonColor( dst, vx, vy, n, color ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16* vx -> Sint16* vy -> int n -> int color -> CODE: -> RETVAL = filledPolygonColor( dst, vx, vy, n, color ); -> OUTPUT: -> RETVAL -4067,4078c4124,4135 -< SDL_Surface* dst; -< Sint16* vx; -< Sint16* vy; -< int n; -< Uint8 r; -< Uint8 g; -< Uint8 b; -< Uint8 a; -< CODE: -< RETVAL = filledPolygonRGBA( dst, vx, vy, n, r, g, b, a ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16* vx -> Sint16* vy -> int n -> Uint8 r -> Uint8 g -> Uint8 b -> Uint8 a -> CODE: -> RETVAL = filledPolygonRGBA( dst, vx, vy, n, r, g, b, a ); -> OUTPUT: -> RETVAL -4082,4090c4139,4147 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y; -< char c; -< Uint32 color; -< CODE: -< RETVAL = characterColor( dst, x, y, c, color ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y -> char c -> Uint32 color -> CODE: -> RETVAL = characterColor( dst, x, y, c, color ); -> OUTPUT: -> RETVAL -4094,4105c4151,4162 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y; -< char c; -< Uint8 r; -< Uint8 g; -< Uint8 b; -< Uint8 a; -< CODE: -< RETVAL = characterRGBA( dst, x, y, c, r, g, b, a ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y -> char c -> Uint8 r -> Uint8 g -> Uint8 b -> Uint8 a -> CODE: -> RETVAL = characterRGBA( dst, x, y, c, r, g, b, a ); -> OUTPUT: -> RETVAL -4109,4117c4166,4174 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y; -< char* c; -< Uint32 color; -< CODE: -< RETVAL = stringColor( dst, x, y, c, color ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y -> char* c -> Uint32 color -> CODE: -> RETVAL = stringColor( dst, x, y, c, color ); -> OUTPUT: -> RETVAL -4121,4132c4178,4289 -< SDL_Surface* dst; -< Sint16 x; -< Sint16 y; -< char* c; -< Uint8 r; -< Uint8 g; -< Uint8 b; -< Uint8 a; -< CODE: -< RETVAL = stringRGBA( dst, x, y, c, r, g, b, a ); -< OUTPUT: -< RETVAL ---- -> SDL_Surface* dst -> Sint16 x -> Sint16 y -> char* c -> Uint8 r -> Uint8 g -> Uint8 b -> Uint8 a -> CODE: -> RETVAL = stringRGBA( dst, x, y, c, r, g, b, a ); -> OUTPUT: -> RETVAL -> -> #endif -> -> -> #ifdef HAVE_SDL_SVG -> -> SDL_svg_context * -> SVG_Load ( filename ) -> char* filename -> CODE: -> RETVAL = SVG_Load(filename); -> OUTPUT: -> RETVAL -> -> SDL_svg_context * -> SVG_LoadBuffer ( data, len ) -> char* data -> int len -> CODE: -> RETVAL = SVG_LoadBuffer(data,len); -> OUTPUT: -> RETVAL -> -> int -> SVG_SetOffset ( source, xoff, yoff ) -> SDL_svg_context* source -> double xoff -> double yoff -> CODE: -> RETVAL = SVG_SetOffset(source,xoff,yoff); -> OUTPUT: -> RETVAL -> -> int -> SVG_SetScale ( source, xscale, yscale ) -> SDL_svg_context* source -> double xscale -> double yscale -> CODE: -> RETVAL = SVG_SetScale(source,xscale,yscale); -> OUTPUT: -> RETVAL -> -> int -> SVG_RenderToSurface ( source, x, y, dest ) -> SDL_svg_context* source -> int x -> int y -> SDL_Surface* dest; -> CODE: -> RETVAL = SVG_RenderToSurface(source,x,y,dest); -> OUTPUT: -> RETVAL -> -> void -> SVG_Free ( source ) -> SDL_svg_context* source -> CODE: -> SVG_Free(source); -> -> void -> SVG_Set_Flags ( source, flags ) -> SDL_svg_context* source -> Uint32 flags -> CODE: -> SVG_Set_Flags(source,flags); -> -> float -> SVG_Width ( source ) -> SDL_svg_context* source -> CODE: -> RETVAL = SVG_Width(source); -> OUTPUT: -> RETVAL -> -> float -> SVG_HEIGHT ( source ) -> SDL_svg_context* source -> CODE: -> RETVAL = SVG_Height(source); -> OUTPUT: -> RETVAL -> -> void -> SVG_SetClipping ( source, minx, miny, maxx, maxy ) -> SDL_svg_context* source -> int minx -> int miny -> int maxx -> int maxy -> CODE: -> SVG_SetClipping(source,minx,miny,maxx,maxy); -> -> int -> SVG_Version ( ) -> CODE: -> RETVAL = SVG_Version(); -> OUTPUT: -> RETVAL -> -4166c4323 -< char **ext; ---- -> const char **ext; -4168c4325 -< av_push(RETVAL,sv_2mortal(newSVpv(*ext,0))); ---- -> av_push(RETVAL,newSVpv(*ext,0)); -4173c4330 -< char* ---- -> const char* -4181c4338 -< char* ---- -> const char* -4189c4346 -< char* ---- -> const char* -4233c4390 -< RETVAL = sample->buffer; ---- -> RETVAL = sample->buffer_size; -4244a4402,4451 -> int -> Sound_Init ( ) -> CODE: -> RETVAL = Sound_Init(); -> OUTPUT: -> RETVAL -> -> int -> Sound_Quit ( ) -> CODE: -> RETVAL = Sound_Quit(); -> OUTPUT: -> RETVAL -> -> AV* -> Sound_AvailableDecoders ( ) -> CODE: -> RETVAL = newAV(); -> const Sound_DecoderInfo** sdi; -> sdi = Sound_AvailableDecoders(); -> if (sdi != NULL) { -> for (;*sdi != NULL; ++sdi) { -> av_push(RETVAL,sv_2mortal(newSViv(PTR2IV(*sdi)))); -> } -> } -> OUTPUT: -> RETVAL -> -> const char* -> Sound_GetError ( ) -> CODE: -> RETVAL = Sound_GetError(); -> OUTPUT: -> RETVAL -> -> void -> Sound_ClearError ( ) -> CODE: -> Sound_ClearError(); -> -> Sound_Sample* -> Sound_NewSample ( rw, ext, desired, buffsize ) -> SDL_RWops* rw -> const char* ext -> Sound_AudioInfo* desired -> Uint32 buffsize -> CODE: -> RETVAL = Sound_NewSample(rw,ext,desired,buffsize); -> OUTPUT: -> RETVAL -4245a4453,4529 -> Sound_Sample* -> Sound_NewSampleFromMem ( data, size, ext, desired, buffsize ) -> const Uint8 *data -> Uint32 size -> const char* ext -> Sound_AudioInfo* desired -> Uint32 buffsize -> CODE: -> RETVAL = Sound_NewSampleFromMem(data,size,ext,desired,buffsize); -> OUTPUT: -> RETVAL -> -> Sound_Sample* -> Sound_NewSampleFromFile ( fname, desired, buffsize ) -> const char* fname -> Sound_AudioInfo* desired -> Uint32 buffsize -> CODE: -> RETVAL = Sound_NewSampleFromFile(fname,desired,buffsize); -> OUTPUT: -> RETVAL -> -> void -> Sound_FreeSample ( sample ) -> Sound_Sample* sample -> CODE: -> Sound_FreeSample(sample); -> -> Sint32 -> Sound_GetDuration ( sample ) -> Sound_Sample* sample -> CODE: -> RETVAL = Sound_GetDuration(sample); -> OUTPUT: -> RETVAL -> -> int -> Sound_SetBufferSize ( sample, size ) -> Sound_Sample* sample -> Uint32 size -> CODE: -> RETVAL = Sound_SetBufferSize(sample,size); -> OUTPUT: -> RETVAL -> -> Uint32 -> Sound_Decode ( sample ) -> Sound_Sample* sample -> CODE: -> RETVAL = Sound_Decode(sample); -> OUTPUT: -> RETVAL -> -> Uint32 -> Sound_DecodeAll ( sample ) -> Sound_Sample* sample -> CODE: -> RETVAL = Sound_DecodeAll(sample); -> OUTPUT: -> RETVAL -> -> int -> Sound_Rewind ( sample ) -> Sound_Sample* sample -> CODE: -> RETVAL = Sound_Rewind(sample); -> OUTPUT: -> RETVAL -> -> int -> Sound_Seek ( sample, ms ) -> Sound_Sample* sample -> Uint32 ms -> CODE: -> RETVAL = Sound_Seek(sample,ms); -> OUTPUT: -> RETVAL -Only in sdlperl/src: SDL_perl.bs -Only in sdlperl/src: SDL_perl.c -Only in sdlperl/src: SDL_perl.o -Only in sdlperl/src: SDL_perl.xs -diff -r SDL_perl/src/SFont.h sdlperl/src/SFont.h -1,9c1,29 -< /************************************************************************ -< * SFONT - SDL Font Library by Karl Bartel * -< * * -< * All functions are explained below. There are two versions of each * -< * funtction. The first is the normal one, the function with the * -< * 2 at the end can be used when you want to handle more than one font * -< * in your program. * -< * * -< ************************************************************************/ ---- -> // -> // SFont.h -> // -> // Original SFont code Copyright (C) Karl Bartel -> // Copyright (C) 2005 David J. Goehrig -> // -> // ------------------------------------------------------------------------------ -> // -> // This library is free software; you can redistribute it and/or -> // modify it under the terms of the GNU Lesser General Public -> // License as published by the Free Software Foundation; either -> // version 2.1 of the License, or (at your option) any later version. -> // -> // This library is distributed in the hope that it will be useful, -> // but WITHOUT ANY WARRANTY; without even the implied warranty of -> // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> // Lesser General Public License for more details. -> // -> // You should have received a copy of the GNU Lesser General Public -> // License along with this library; if not, write to the Free Software -> // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> // -> // ------------------------------------------------------------------------------ -> // -> // Please feel free to send questions, suggestions or improvements to: -> // -> // David J. Goehrig -> // dgoehrig@cpan.org -> // -diff -r SDL_perl/src/SFont.xs sdlperl/src/SFont.xs -1d0 -< // SDL::SFont -3c2 -< // SFont bitmap font support ---- -> // SFont.xs -5c4,5 -< // SFont library code by Karl Bartel ---- -> // Original SFont code Copyright (C) Karl Bartel -> // Copyright (C) 2005 David J. Goehrig -7c7,28 -< // SFont.xs Copyright (C) 2004 David J. Goehrig ---- -> // ------------------------------------------------------------------------------ -> // -> // This library is free software; you can redistribute it and/or -> // modify it under the terms of the GNU Lesser General Public -> // License as published by the Free Software Foundation; either -> // version 2.1 of the License, or (at your option) any later version. -> // -> // This library is distributed in the hope that it will be useful, -> // but WITHOUT ANY WARRANTY; without even the implied warranty of -> // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> // Lesser General Public License for more details. -> // -> // You should have received a copy of the GNU Lesser General Public -> // License along with this library; if not, write to the Free Software -> // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> // -> // ------------------------------------------------------------------------------ -> // -> // Please feel free to send questions, suggestions or improvements to: -> // -> // David J. Goehrig -> // dgoehrig@cpan.org -26,27c47,48 -< #include "defines.h" -< #include "SFont.h" ---- -> #include "../defines.h" -> #include "../SFont.h" -diff -r SDL_perl/src/defines.h sdlperl/src/defines.h -2c2 -< // Copyright (C) 2004 David J. Goehrig ---- -> // defines.h -3a4,27 -> // Copyright (C) 2005 David J. Goehrig -> // -> // ------------------------------------------------------------------------------ -> // -> // This library is free software; you can redistribute it and/or -> // modify it under the terms of the GNU Lesser General Public -> // License as published by the Free Software Foundation; either -> // version 2.1 of the License, or (at your option) any later version. -> // -> // This library is distributed in the hope that it will be useful, -> // but WITHOUT ANY WARRANTY; without even the implied warranty of -> // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> // Lesser General Public License for more details. -> // -> // You should have received a copy of the GNU Lesser General Public -> // License along with this library; if not, write to the Free Software -> // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> // -> // ------------------------------------------------------------------------------ -> // -> // Please feel free to send questions, suggestions or improvements to: -> // -> // David J. Goehrig -> // dgoehrig@cpan.org -Only in sdlperl/src: support -diff -r SDL_perl/t/apppm.t sdlperl/t/apppm.t -5c5,29 -< # Copyright (C) 2009 Kartik Thakore ---- -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -> # -9c33 -< unshift @INC, 'blib/lib','blib/arch', 'blib/arch/auto/', 'blib/arch/auto/SDL/SFont'; ---- -> unshift @INC, 'blib/lib','blib/arch'; -diff -r SDL_perl/t/cdrompm.t sdlperl/t/cdrompm.t -5a6,29 -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -> # -diff -r SDL_perl/t/colorpm.t sdlperl/t/colorpm.t -3c3 -< # Copyright (C) 2003,2006 Tels ---- -> # Copyright (C) 2003 Tels -5a6,31 -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -> # -16c42 -< plan ( tests => 15 ); ---- -> plan ( tests => 10 ); -25d50 -< rgb -36,37d60 -< is (join(":", $color->rgb()), '0:0:0', 'r, g and b are 0'); -< -44,51d66 -< is (join(":", $color->rgb()), '255:255:255', 'r, g and b are 255'); -< is (join(":", $color->rgb(128,0,80)), '128:0:80', 'r, g and b are set'); -< is (join(":", $color->rgb()), '128:0:80', 'r, g and b still set'); -< -< # test the new new($r,$g,$b) calling style -< $color = SDL::Color->new( 255,70,128); -< is (join(":", $color->rgb()), '255:70:128', 'r, g and b are set via new($r,$g,$b)'); -< -diff -r SDL_perl/t/cursorpm.t sdlperl/t/cursorpm.t -5a6,31 -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -> # -diff -r SDL_perl/t/eventpm.t sdlperl/t/eventpm.t -5a6,31 -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -> # -25d50 -< peep -46,47c71 -< button_y -< /); ---- -> button_y /); -diff -r SDL_perl/t/fontpm.t sdlperl/t/fontpm.t -5c5,31 -< # Copyright (C) 2009 Kartik Thakore ---- -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -> # -9c35 -< unshift @INC, 'blib/lib','blib/arch', 'blib/arch/auto/src/SDL/SFont'; ---- -> unshift @INC, 'blib/lib','blib/arch'; -diff -r SDL_perl/t/mixerpm.t sdlperl/t/mixerpm.t -5c5,31 -< # Copyright (C) 2009 Kartik Thakore ---- -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -> # -61,62d86 -< mix_volume_chunk -< mix_set_panning -diff -r SDL_perl/t/mpegpm.t sdlperl/t/mpegpm.t -5a6,31 -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -> # -diff -r SDL_perl/t/musicpm.t sdlperl/t/musicpm.t -5a6,31 -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -> # -diff -r SDL_perl/t/opengl.t sdlperl/t/opengl.t -5c5,31 -< # Copyright (C) 2009 Kartik Thakore ---- -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -> # -9c35 -< unshift @INC, 'blib/lib','blib/arch', 'blib/arch/auto/src/SDL/OpenGL'; ---- -> unshift @INC, 'blib/lib','blib/arch'; -18c44 -< plan ( tests => 4 ); ---- -> plan ( tests => 3 ); -39d64 -< glGetString -68,78c93 -< gluPwlCurve -< gluNewQuadric -< gluDeleteQuadric -< gluQuadricNormals -< gluQuadricTexture -< gluCylinder -< gluDisk -< gluPartialDisk -< gluSphere /); -< -< can_ok('main',qw/glXUseXFont/); ---- -> gluPwlCurve /); -diff -r SDL_perl/t/palettepm.t sdlperl/t/palettepm.t -5a6,31 -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -> # -diff -r SDL_perl/t/rectpm.t sdlperl/t/rectpm.t -5a6,31 -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -> # -diff -r SDL_perl/t/sdlpm.t sdlperl/t/sdlpm.t -5a6,31 -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -> # -diff -r SDL_perl/t/soundpm.t sdlperl/t/soundpm.t -5a6,31 -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -> # -diff -r SDL_perl/t/surfacepm.t sdlperl/t/surfacepm.t -5c5,31 -< # Copyright (C) 2009 Kartik Thakore ---- -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -> # -9c35 -< unshift @INC, 'blib/lib','blib/arch', 'blib/arch/auto/src/SDL/SFont',; ---- -> unshift @INC, 'blib/lib','blib/arch'; -61a88,113 -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -diff -r SDL_perl/t/timerpm.t sdlperl/t/timerpm.t -5a6,31 -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -> # -diff -r SDL_perl/t/toolfontpm.t sdlperl/t/toolfontpm.t -5a6,31 -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -> # -9c35 -< unshift @INC, 'blib/lib','blib/arch', 'blib/arch/auto/src/SDL/SFont/'; ---- -> unshift @INC, 'blib/lib','blib/arch'; -diff -r SDL_perl/t/toolgraphicpm.t sdlperl/t/toolgraphicpm.t -5c5,31 -< # Copyright (C) 2009 Kartik Thakore ---- -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -> # -9c35 -< unshift @INC, 'blib/lib','blib/arch', 'blib/arch/auto/src/SDL/SFont/'; ---- -> unshift @INC, 'blib/lib','blib/arch'; -diff -r SDL_perl/t/ttfontpm.t sdlperl/t/ttfontpm.t -5c5,31 -< # Copyright (C) 2009 Kartik Thakore ---- -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -> # -9c35 -< unshift @INC, 'blib/lib','blib/arch', 'blib/arch/auto/src/SDL/SFont'; ---- -> unshift @INC, 'blib/lib','blib/arch'; -diff -r SDL_perl/t/videopm.t sdlperl/t/videopm.t -5c5,31 -< # Copyright (C) 2009 Kartik Thakore ---- -> # -> # Copyright (C) 2005 David J. Goehrig -> # -> # ------------------------------------------------------------------------------ -> # -> # This library is free software; you can redistribute it and/or -> # modify it under the terms of the GNU Lesser General Public -> # License as published by the Free Software Foundation; either -> # version 2.1 of the License, or (at your option) any later version. -> # -> # This library is distributed in the hope that it will be useful, -> # but WITHOUT ANY WARRANTY; without even the implied warranty of -> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> # Lesser General Public License for more details. -> # -> # You should have received a copy of the GNU Lesser General Public -> # License along with this library; if not, write to the Free Software -> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -> # -> # ------------------------------------------------------------------------------ -> # -> # Please feel free to send questions, suggestions or improvements to: -> # -> # David J. Goehrig -> # dgoehrig\@cpan.org -> # -> # -9c35 -< unshift @INC, 'blib/lib','blib/arch', 'blib/arch/auto/src/SDL/SFont'; ---- -> unshift @INC, 'blib/lib','blib/arch'; -diff -r SDL_perl/typemap sdlperl/typemap -4a5 -> const Uint8* T_PTR -16d16 -< SDL_eventaction T_PTR -57a58 -> GLuint* T_PTR -63,64d63 -< GLUquadric * T_PTR -< GLdouble T_NV -69c68,69 -< Font T_IV ---- -> SDL_RWops* T_PTR -> SDL_svg_context* T_PTR diff --git a/Build b/Build deleted file mode 100755 index 343458c..0000000 --- a/Build +++ /dev/null @@ -1,39 +0,0 @@ -#! /usr/env/bin perl - -use strict; -use Cwd; -use File::Spec; - -BEGIN { - $^W = 1; # Use warnings - my $curdir = File::Spec->canonpath( Cwd::cwd() ); - my $is_same_dir = $^O eq 'MSWin32' ? (Win32::GetShortPathName($curdir) eq '/Users/dave/sdlperl') - : ($curdir eq '/Users/dave/sdlperl'); - unless ($is_same_dir) { - die ('This script must be run from /Users/dave/sdlperl, not '.$curdir."\n". - "Please re-run the Build.PL script here.\n"); - } - unshift @INC, - ( - '/Users/dave/sdlperl/make/lib' - ); -} - -use SDL::Build; - -# Some platforms have problems setting $^X in shebang contexts, fix it up here -$^X = Module::Build->find_perl_interpreter - unless File::Spec->file_name_is_absolute($^X); - -if (-e 'Build.PL' and not SDL::Build->up_to_date("Build.PL", $0)) { - warn "Warning: Build.PL has been altered. You may need to run 'perl Build.PL' again.\n"; -} - -# This should have just enough arguments to be able to bootstrap the rest. -my $build = SDL::Build->resume ( - properties => { - config_dir => '/Users/dave/sdlperl/_build', - }, -); - -$build->dispatch; diff --git a/src/SDL_perl.bs b/src/SDL_perl.bs deleted file mode 100644 index e69de29..0000000 diff --git a/src/SDL_perl.c b/src/SDL_perl.c deleted file mode 100644 index 28fbdfb..0000000 --- a/src/SDL_perl.c +++ /dev/null @@ -1,9408 +0,0 @@ -/* - * This file was generated automatically by xsubpp version 1.9508 from the - * contents of SDL_perl.xs. Do not edit this file, edit SDL_perl.xs instead. - * - * ANY CHANGES MADE HERE WILL BE LOST! - * - */ - -#line 1 "SDL_perl.xs" -// -// SDL.xs -// -// Copyright (C) 2005 David J. Goehrig -// -// ------------------------------------------------------------------------------ -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// -// ------------------------------------------------------------------------------ -// -// Please feel free to send questions, suggestions or improvements to: -// -// David J. Goehrig -// dgoehrig@cpan.org -// - -#include "EXTERN.h" -#include "perl.h" -#include "XSUB.h" - -#ifndef aTHX_ -#define aTHX_ -#endif - -#include - -#ifdef HAVE_GL -#include -#endif - -#ifdef HAVE_GLU -#include -#endif - -#ifdef HAVE_SDL_IMAGE -#include -#endif - -#ifdef HAVE_SDL_MIXER -#include -void (*mix_music_finished_cv)(); -#endif - -#ifdef HAVE_SDL_SOUND -#include -#endif - -#ifdef HAVE_SDL_NET -#include -#endif - -#ifdef HAVE_SDL_TTF -#include -#define TEXT_SOLID 1 -#define TEXT_SHADED 2 -#define TEXT_BLENDED 4 -#define UTF8_SOLID 8 -#define UTF8_SHADED 16 -#define UTF8_BLENDED 32 -#define UNICODE_SOLID 64 -#define UNICODE_SHADED 128 -#define UNICODE_BLENDED 256 -#endif - -#ifdef HAVE_SMPEG -#include -#ifdef HAVE_SDL_MIXER -static int sdl_perl_use_smpeg_audio = 0; -#endif -#endif - -#ifdef HAVE_SDL_GFX -#include -#include -#include -#include -#endif - -#ifdef HAVE_SDL_SVG -#include -#endif - -#ifdef USE_THREADS -#define HAVE_TLS_CONTEXT -#endif - -#include "defines.h" - -Uint32 -sdl_perl_timer_callback ( Uint32 interval, void* param ) -{ - Uint32 retval; - int back; - SV* cmd; - ENTER_TLS_CONTEXT - dSP; - - cmd = (SV*)param; - - ENTER; - SAVETMPS; - PUSHMARK(SP); - XPUSHs(sv_2mortal(newSViv(interval))); - PUTBACK; - - if (0 != (back = call_sv(cmd,G_SCALAR))) { - SPAGAIN; - if (back != 1 ) Perl_croak (aTHX_ "Timer Callback failed!"); - retval = POPi; - } else { - Perl_croak(aTHX_ "Timer Callback failed!"); - } - - FREETMPS; - LEAVE; - - LEAVE_TLS_CONTEXT - - return retval; -} - -void -sdl_perl_audio_callback ( void* data, Uint8 *stream, int len ) -{ - SV *cmd; - ENTER_TLS_CONTEXT - dSP; - - cmd = (SV*)data; - - ENTER; - SAVETMPS; - PUSHMARK(SP); - XPUSHs(sv_2mortal(newSViv(PTR2IV(stream)))); - XPUSHs(sv_2mortal(newSViv(len))); - PUTBACK; - - call_sv(cmd,G_VOID|G_DISCARD); - - PUTBACK; - FREETMPS; - LEAVE; - - LEAVE_TLS_CONTEXT -} - -#ifdef HAVE_SDL_MIXER - -void -sdl_perl_music_callback ( void ) -{ - SV *cmd; - ENTER_TLS_CONTEXT - dSP; - - cmd = (SV*)Mix_GetMusicHookData(); - - ENTER; - SAVETMPS; - PUSHMARK(SP); - PUTBACK; - - call_sv(cmd,G_VOID|G_DISCARD); - - PUTBACK; - FREETMPS; - LEAVE; - - LEAVE_TLS_CONTEXT -} - -void -sdl_perl_music_finished_callback ( void ) -{ - SV *cmd; - ENTER_TLS_CONTEXT - dSP; - - cmd = (SV*)mix_music_finished_cv; - if ( cmd == NULL ) return; - - ENTER; - SAVETMPS; - PUSHMARK(SP); - PUTBACK; - - call_sv(cmd,G_VOID|G_DISCARD); - - PUTBACK; - FREETMPS; - LEAVE; - - LEAVE_TLS_CONTEXT -} - -#endif - -#define INIT_NS_APPLICATION -#define QUIT_NS_APPLICATION - - -void -sdl_perl_atexit (void) -{ - QUIT_NS_APPLICATION - SDL_Quit(); -} - -void boot_SDL(); -void boot_SDL__OpenGL(); - -XS(boot_SDL_perl) -{ - GET_TLS_CONTEXT - boot_SDL(); -} - -#line 241 "SDL_perl.c" -XS(XS_SDL_GetError); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GetError) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::GetError()"); - { - char * RETVAL; - dXSTARG; -#line 237 "SDL_perl.xs" - RETVAL = SDL_GetError(); -#line 253 "SDL_perl.c" - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; - } - XSRETURN(1); -} - -XS(XS_SDL_Init); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_Init) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::Init(flags)"); - { - Uint32 flags = (Uint32)SvUV(ST(0)); - int RETVAL; - dXSTARG; -#line 245 "SDL_perl.xs" - INIT_NS_APPLICATION - RETVAL = SDL_Init(flags); -#ifdef HAVE_TLS_CONTEXT - Perl_call_atexit(PERL_GET_CONTEXT, (void*)sdl_perl_atexit,0); -#else - atexit(sdl_perl_atexit); -#endif -#line 277 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_InitSubSystem); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_InitSubSystem) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::InitSubSystem(flags)"); - { - Uint32 flags = (Uint32)SvUV(ST(0)); - int RETVAL; - dXSTARG; -#line 259 "SDL_perl.xs" - RETVAL = SDL_InitSubSystem(flags); -#line 295 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_QuitSubSystem); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_QuitSubSystem) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::QuitSubSystem(flags)"); - { - Uint32 flags = (Uint32)SvUV(ST(0)); -#line 267 "SDL_perl.xs" - SDL_QuitSubSystem(flags); -#line 311 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_Quit); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_Quit) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::Quit()"); - { -#line 272 "SDL_perl.xs" - QUIT_NS_APPLICATION - SDL_Quit(); -#line 326 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_WasInit); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_WasInit) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::WasInit(flags)"); - { - Uint32 flags = (Uint32)SvUV(ST(0)); - int RETVAL; - dXSTARG; -#line 279 "SDL_perl.xs" - RETVAL = SDL_WasInit(flags); -#line 343 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_Delay); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_Delay) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::Delay(ms)"); - { - int ms = (int)SvIV(ST(0)); -#line 287 "SDL_perl.xs" - SDL_Delay(ms); -#line 359 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_GetTicks); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GetTicks) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::GetTicks()"); - { - Uint32 RETVAL; - dXSTARG; -#line 292 "SDL_perl.xs" - RETVAL = SDL_GetTicks(); -#line 375 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SetTimer); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SetTimer) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::SetTimer(interval, callback)"); - { - Uint32 interval = (Uint32)SvUV(ST(0)); - SDL_TimerCallback callback = INT2PTR(SDL_TimerCallback,SvIV(ST(1))); - int RETVAL; - dXSTARG; -#line 301 "SDL_perl.xs" - RETVAL = SDL_SetTimer(interval,callback); -#line 394 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_AddTimer); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_AddTimer) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::AddTimer(interval, callback, param)"); - { - Uint32 interval = (Uint32)SvUV(ST(0)); - SDL_NewTimerCallback callback = INT2PTR(SDL_NewTimerCallback,SvIV(ST(1))); - void * param = INT2PTR(void *,SvIV(ST(2))); - SDL_TimerID RETVAL; - dXSTARG; -#line 311 "SDL_perl.xs" - RETVAL = SDL_AddTimer(interval,callback,param); -#line 414 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_PerlTimerCallback); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_PerlTimerCallback) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::PerlTimerCallback()"); - { - SDL_NewTimerCallback RETVAL; - dXSTARG; -#line 318 "SDL_perl.xs" - RETVAL = sdl_perl_timer_callback; -#line 431 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_NewTimer); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NewTimer) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::NewTimer(interval, cmd)"); - { - Uint32 interval = (Uint32)SvUV(ST(0)); - void * cmd = INT2PTR(void *,SvIV(ST(1))); - SDL_TimerID RETVAL; - dXSTARG; -#line 327 "SDL_perl.xs" - RETVAL = SDL_AddTimer(interval,sdl_perl_timer_callback,cmd); -#line 450 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_RemoveTimer); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_RemoveTimer) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::RemoveTimer(id)"); - { - SDL_TimerID id = INT2PTR(SDL_TimerID,SvIV(ST(0))); - Uint32 RETVAL; - dXSTARG; -#line 335 "SDL_perl.xs" - RETVAL = SDL_RemoveTimer(id); -#line 468 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_RWFromFile); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_RWFromFile) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::RWFromFile(file, mode)"); - { - char* file = (char *)SvPV_nolen(ST(0)); - char * mode = (char *)SvPV_nolen(ST(1)); - SDL_RWops * RETVAL; - dXSTARG; -#line 344 "SDL_perl.xs" - RETVAL = SDL_RWFromFile(file,mode); -#line 487 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_RWFromFP); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_RWFromFP) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::RWFromFP(fp, autoclose)"); - { - FILE* fp = PerlIO_findFILE(IoIFP(sv_2io(ST(0)))); - int autoclose = (int)SvIV(ST(1)); - SDL_RWops * RETVAL; - dXSTARG; -#line 353 "SDL_perl.xs" - RETVAL = SDL_RWFromFP(fp,autoclose); -#line 506 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_RWFromMem); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_RWFromMem) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::RWFromMem(mem, size)"); - { - char* mem = (char *)SvPV_nolen(ST(0)); - int size = (int)SvIV(ST(1)); - SDL_RWops * RETVAL; - dXSTARG; -#line 362 "SDL_perl.xs" - RETVAL = SDL_RWFromMem((void*)mem,size); -#line 525 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_RWFromConstMem); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_RWFromConstMem) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::RWFromConstMem(mem, size)"); - { - const char* mem = (const char *)SvPV_nolen(ST(0)); - int size = (int)SvIV(ST(1)); - SDL_RWops * RETVAL; - dXSTARG; -#line 371 "SDL_perl.xs" - RETVAL = SDL_RWFromConstMem((const void*)mem,size); -#line 544 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_AllocRW); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_AllocRW) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::AllocRW()"); - { - SDL_RWops * RETVAL; - dXSTARG; -#line 378 "SDL_perl.xs" - RETVAL = SDL_AllocRW(); -#line 561 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_FreeRW); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_FreeRW) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::FreeRW(rw)"); - { - SDL_RWops* rw = INT2PTR(SDL_RWops *,SvIV(ST(0))); -#line 386 "SDL_perl.xs" - SDL_FreeRW(rw); -#line 577 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_RWseek); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_RWseek) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::RWseek(rw, off, whence)"); - { - SDL_RWops* rw = INT2PTR(SDL_RWops *,SvIV(ST(0))); - int off = (int)SvIV(ST(1)); - int whence = (int)SvIV(ST(2)); - int RETVAL; - dXSTARG; -#line 394 "SDL_perl.xs" - RETVAL = SDL_RWseek(rw,off,whence); -#line 596 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_RWtell); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_RWtell) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::RWtell(rw)"); - { - SDL_RWops* rw = INT2PTR(SDL_RWops *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 402 "SDL_perl.xs" - RETVAL = SDL_RWtell(rw); -#line 614 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_RWread); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_RWread) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::RWread(rw, mem, size, n)"); - { - SDL_RWops* rw = INT2PTR(SDL_RWops *,SvIV(ST(0))); - char* mem = (char *)SvPV_nolen(ST(1)); - int size = (int)SvIV(ST(2)); - int n = (int)SvIV(ST(3)); - int RETVAL; - dXSTARG; -#line 413 "SDL_perl.xs" - RETVAL = SDL_RWread(rw,mem,size,n); -#line 635 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_RWwrite); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_RWwrite) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::RWwrite(rw, mem, size, n)"); - { - SDL_RWops* rw = INT2PTR(SDL_RWops *,SvIV(ST(0))); - char* mem = (char *)SvPV_nolen(ST(1)); - int size = (int)SvIV(ST(2)); - int n = (int)SvIV(ST(3)); - int RETVAL; - dXSTARG; -#line 424 "SDL_perl.xs" - RETVAL = SDL_RWwrite(rw,mem,size,n); -#line 656 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_RWclose); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_RWclose) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::RWclose(rw)"); - { - SDL_RWops* rw = INT2PTR(SDL_RWops *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 432 "SDL_perl.xs" - RETVAL = SDL_RWclose(rw); -#line 674 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_CDNumDrives); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CDNumDrives) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::CDNumDrives()"); - { - int RETVAL; - dXSTARG; -#line 439 "SDL_perl.xs" - RETVAL = SDL_CDNumDrives(); -#line 691 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_CDName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CDName) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::CDName(drive)"); - { - int drive = (int)SvIV(ST(0)); - char * RETVAL; - dXSTARG; -#line 447 "SDL_perl.xs" - RETVAL = strdup(SDL_CDName(drive)); -#line 709 "SDL_perl.c" - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; - } - XSRETURN(1); -} - -XS(XS_SDL_CDOpen); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CDOpen) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::CDOpen(drive)"); - { - int drive = (int)SvIV(ST(0)); - SDL_CD * RETVAL; - dXSTARG; -#line 455 "SDL_perl.xs" - RETVAL = SDL_CDOpen(drive); -#line 727 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_CDTrackId); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CDTrackId) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::CDTrackId(track)"); - { - SDL_CDtrack * track = INT2PTR(SDL_CDtrack *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 463 "SDL_perl.xs" - RETVAL = track->id; -#line 745 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_CDTrackType); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CDTrackType) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::CDTrackType(track)"); - { - SDL_CDtrack * track = INT2PTR(SDL_CDtrack *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 471 "SDL_perl.xs" - RETVAL = track->type; -#line 763 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_CDTrackLength); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CDTrackLength) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::CDTrackLength(track)"); - { - SDL_CDtrack * track = INT2PTR(SDL_CDtrack *,SvIV(ST(0))); - Uint16 RETVAL; - dXSTARG; -#line 479 "SDL_perl.xs" - RETVAL = track->length; -#line 781 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_CDTrackOffset); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CDTrackOffset) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::CDTrackOffset(track)"); - { - SDL_CDtrack * track = INT2PTR(SDL_CDtrack *,SvIV(ST(0))); - Uint32 RETVAL; - dXSTARG; -#line 487 "SDL_perl.xs" - RETVAL = track->offset; -#line 799 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_CDStatus); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CDStatus) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::CDStatus(cd)"); - { - SDL_CD * cd = INT2PTR(SDL_CD *,SvIV(ST(0))); - Uint32 RETVAL; - dXSTARG; -#line 495 "SDL_perl.xs" - RETVAL = SDL_CDStatus(cd); -#line 817 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_CDPlayTracks); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CDPlayTracks) -{ - dXSARGS; - if (items != 5) - Perl_croak(aTHX_ "Usage: SDL::CDPlayTracks(cd, start_track, ntracks, start_frame, nframes)"); - { - SDL_CD * cd = INT2PTR(SDL_CD *,SvIV(ST(0))); - int start_track = (int)SvIV(ST(1)); - int ntracks = (int)SvIV(ST(2)); - int start_frame = (int)SvIV(ST(3)); - int nframes = (int)SvIV(ST(4)); - int RETVAL; - dXSTARG; -#line 507 "SDL_perl.xs" - RETVAL = SDL_CDPlayTracks(cd,start_track,start_frame,ntracks,nframes); -#line 839 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_CDPlay); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CDPlay) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::CDPlay(cd, start, length)"); - { - SDL_CD * cd = INT2PTR(SDL_CD *,SvIV(ST(0))); - int start = (int)SvIV(ST(1)); - int length = (int)SvIV(ST(2)); - int RETVAL; - dXSTARG; -#line 517 "SDL_perl.xs" - RETVAL = SDL_CDPlay(cd,start,length); -#line 859 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_CDPause); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CDPause) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::CDPause(cd)"); - { - SDL_CD * cd = INT2PTR(SDL_CD *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 525 "SDL_perl.xs" - RETVAL = SDL_CDPause(cd); -#line 877 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_CDResume); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CDResume) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::CDResume(cd)"); - { - SDL_CD * cd = INT2PTR(SDL_CD *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 533 "SDL_perl.xs" - RETVAL = SDL_CDResume(cd); -#line 895 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_CDStop); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CDStop) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::CDStop(cd)"); - { - SDL_CD * cd = INT2PTR(SDL_CD *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 541 "SDL_perl.xs" - RETVAL = SDL_CDStop(cd); -#line 913 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_CDEject); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CDEject) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::CDEject(cd)"); - { - SDL_CD * cd = INT2PTR(SDL_CD *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 549 "SDL_perl.xs" - RETVAL = SDL_CDEject(cd); -#line 931 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_CDClose); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CDClose) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::CDClose(cd)"); - { - SDL_CD * cd = INT2PTR(SDL_CD *,SvIV(ST(0))); -#line 557 "SDL_perl.xs" - SDL_CDClose(cd); -#line 947 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_CDId); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CDId) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::CDId(cd)"); - { - SDL_CD * cd = INT2PTR(SDL_CD *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 563 "SDL_perl.xs" - RETVAL = cd->id; -#line 964 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_CDNumTracks); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CDNumTracks) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::CDNumTracks(cd)"); - { - SDL_CD * cd = INT2PTR(SDL_CD *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 571 "SDL_perl.xs" - RETVAL = cd->numtracks; -#line 982 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_CDCurTrack); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CDCurTrack) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::CDCurTrack(cd)"); - { - SDL_CD * cd = INT2PTR(SDL_CD *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 579 "SDL_perl.xs" - RETVAL = cd->cur_track; -#line 1000 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_CDCurFrame); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CDCurFrame) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::CDCurFrame(cd)"); - { - SDL_CD * cd = INT2PTR(SDL_CD *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 587 "SDL_perl.xs" - RETVAL = cd->cur_frame; -#line 1018 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_CDTrack); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CDTrack) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::CDTrack(cd, number)"); - { - SDL_CD * cd = INT2PTR(SDL_CD *,SvIV(ST(0))); - int number = (int)SvIV(ST(1)); - SDL_CDtrack * RETVAL; - dXSTARG; -#line 596 "SDL_perl.xs" - RETVAL = (SDL_CDtrack *)(cd->track + number); -#line 1037 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_PumpEvents); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_PumpEvents) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::PumpEvents()"); - { -#line 603 "SDL_perl.xs" - SDL_PumpEvents(); -#line 1052 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_PushEvent); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_PushEvent) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::PushEvent(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 609 "SDL_perl.xs" - RETVAL = SDL_PushEvent( e ); -#line 1069 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NewEvent); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NewEvent) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::NewEvent()"); - { - SDL_Event * RETVAL; - dXSTARG; -#line 616 "SDL_perl.xs" - RETVAL = (SDL_Event *) safemalloc (sizeof(SDL_Event)); -#line 1086 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_FreeEvent); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_FreeEvent) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::FreeEvent(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); -#line 624 "SDL_perl.xs" - safefree(e); -#line 1102 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_PollEvent); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_PollEvent) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::PollEvent(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 630 "SDL_perl.xs" - RETVAL = SDL_PollEvent(e); -#line 1119 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_WaitEvent); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_WaitEvent) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::WaitEvent(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 638 "SDL_perl.xs" - RETVAL = SDL_WaitEvent(e); -#line 1137 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_EventState); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_EventState) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::EventState(type, state)"); - { - Uint8 type = (unsigned char)SvUV(ST(0)); - int state = (int)SvIV(ST(1)); - Uint8 RETVAL; - dXSTARG; -#line 647 "SDL_perl.xs" - RETVAL = SDL_EventState(type,state); -#line 1156 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_EventType); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_EventType) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::EventType(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 655 "SDL_perl.xs" - RETVAL = e->type; -#line 1174 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SetEventType); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SetEventType) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::SetEventType(e, type)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint8 type = (unsigned char)SvUV(ST(1)); - Uint8 RETVAL; - dXSTARG; -#line 664 "SDL_perl.xs" - RETVAL = e->type; - e->type = type; -#line 1194 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_ActiveEventGain); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_ActiveEventGain) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::ActiveEventGain(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 673 "SDL_perl.xs" - RETVAL = e->active.gain; -#line 1212 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_ActiveEventState); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_ActiveEventState) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::ActiveEventState(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 681 "SDL_perl.xs" - RETVAL = e->active.state; -#line 1230 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_KeyEventState); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_KeyEventState) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::KeyEventState(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 689 "SDL_perl.xs" - RETVAL = e->key.state; -#line 1248 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_KeyEventSym); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_KeyEventSym) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::KeyEventSym(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 697 "SDL_perl.xs" - RETVAL = e->key.keysym.sym; -#line 1266 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_KeyEventMod); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_KeyEventMod) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::KeyEventMod(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 705 "SDL_perl.xs" - RETVAL = e->key.keysym.mod; -#line 1284 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_KeyEventUnicode); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_KeyEventUnicode) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::KeyEventUnicode(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint16 RETVAL; - dXSTARG; -#line 713 "SDL_perl.xs" - RETVAL = e->key.keysym.unicode; -#line 1302 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_KeyEventScanCode); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_KeyEventScanCode) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::KeyEventScanCode(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 721 "SDL_perl.xs" - RETVAL = e->key.keysym.scancode; -#line 1320 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MouseMotionState); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MouseMotionState) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MouseMotionState(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 729 "SDL_perl.xs" - RETVAL = e->motion.state; -#line 1338 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MouseMotionX); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MouseMotionX) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MouseMotionX(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint16 RETVAL; - dXSTARG; -#line 737 "SDL_perl.xs" - RETVAL = e->motion.x; -#line 1356 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MouseMotionY); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MouseMotionY) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MouseMotionY(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint16 RETVAL; - dXSTARG; -#line 745 "SDL_perl.xs" - RETVAL = e->motion.y; -#line 1374 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MouseMotionXrel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MouseMotionXrel) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MouseMotionXrel(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Sint16 RETVAL; - dXSTARG; -#line 753 "SDL_perl.xs" - RETVAL = e->motion.xrel; -#line 1392 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MouseMotionYrel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MouseMotionYrel) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MouseMotionYrel(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Sint16 RETVAL; - dXSTARG; -#line 761 "SDL_perl.xs" - RETVAL = e->motion.yrel; -#line 1410 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MouseButtonState); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MouseButtonState) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MouseButtonState(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 769 "SDL_perl.xs" - RETVAL = e->button.state; -#line 1428 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MouseButton); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MouseButton) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MouseButton(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 777 "SDL_perl.xs" - RETVAL = e->button.button; -#line 1446 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MouseButtonX); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MouseButtonX) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MouseButtonX(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint16 RETVAL; - dXSTARG; -#line 785 "SDL_perl.xs" - RETVAL = e->button.x; -#line 1464 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MouseButtonY); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MouseButtonY) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MouseButtonY(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint16 RETVAL; - dXSTARG; -#line 793 "SDL_perl.xs" - RETVAL = e->button.y; -#line 1482 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SysWMEventMsg); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SysWMEventMsg) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SysWMEventMsg(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - SDL_SysWMmsg * RETVAL; - dXSTARG; -#line 801 "SDL_perl.xs" - RETVAL = e->syswm.msg; -#line 1500 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_EnableUnicode); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_EnableUnicode) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::EnableUnicode(enable)"); - { - int enable = (int)SvIV(ST(0)); - int RETVAL; - dXSTARG; -#line 809 "SDL_perl.xs" - RETVAL = SDL_EnableUNICODE(enable); -#line 1518 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_EnableKeyRepeat); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_EnableKeyRepeat) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::EnableKeyRepeat(delay, interval)"); - { - int delay = (int)SvIV(ST(0)); - int interval = (int)SvIV(ST(1)); -#line 818 "SDL_perl.xs" - SDL_EnableKeyRepeat(delay,interval); -#line 1535 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_GetModState); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GetModState) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::GetModState()"); - { - Uint32 RETVAL; - dXSTARG; -#line 823 "SDL_perl.xs" - RETVAL = SDL_GetModState(); -#line 1551 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SetModState); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SetModState) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SetModState(state)"); - { - Uint32 state = (Uint32)SvUV(ST(0)); -#line 831 "SDL_perl.xs" - SDL_SetModState(state); -#line 1567 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_GetKeyName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GetKeyName) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::GetKeyName(sym)"); - { - int sym = (int)SvIV(ST(0)); - char * RETVAL; - dXSTARG; -#line 837 "SDL_perl.xs" - RETVAL = SDL_GetKeyName(sym); -#line 1584 "SDL_perl.c" - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; - } - XSRETURN(1); -} - -XS(XS_SDL_CreateRGBSurface); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CreateRGBSurface) -{ - dXSARGS; - if (items != 8) - Perl_croak(aTHX_ "Usage: SDL::CreateRGBSurface(flags, width, height, depth, Rmask, Gmask, Bmask, Amask)"); - { - Uint32 flags = (Uint32)SvUV(ST(0)); - int width = (int)SvIV(ST(1)); - int height = (int)SvIV(ST(2)); - int depth = (int)SvIV(ST(3)); - Uint32 Rmask = (Uint32)SvUV(ST(4)); - Uint32 Gmask = (Uint32)SvUV(ST(5)); - Uint32 Bmask = (Uint32)SvUV(ST(6)); - Uint32 Amask = (Uint32)SvUV(ST(7)); - SDL_Surface * RETVAL; - dXSTARG; -#line 852 "SDL_perl.xs" - RETVAL = SDL_CreateRGBSurface ( flags, width, height, - depth, Rmask, Gmask, Bmask, Amask ); -#line 1610 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_CreateRGBSurfaceFrom); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CreateRGBSurfaceFrom) -{ - dXSARGS; - if (items != 9) - Perl_croak(aTHX_ "Usage: SDL::CreateRGBSurfaceFrom(pixels, width, height, depth, pitch, Rmask, Gmask, Bmask, Amask)"); - { - char * pixels = (char *)SvPV_nolen(ST(0)); - int width = (int)SvIV(ST(1)); - int height = (int)SvIV(ST(2)); - int depth = (int)SvIV(ST(3)); - int pitch = (int)SvIV(ST(4)); - Uint32 Rmask = (Uint32)SvUV(ST(5)); - Uint32 Gmask = (Uint32)SvUV(ST(6)); - Uint32 Bmask = (Uint32)SvUV(ST(7)); - Uint32 Amask = (Uint32)SvUV(ST(8)); - SDL_Surface * RETVAL; - dXSTARG; -#line 870 "SDL_perl.xs" - Uint8* pixeldata; - Uint32 len = pitch * height; - New(0,pixeldata,len,Uint8); - Copy(pixels,pixeldata,len,Uint8); - RETVAL = SDL_CreateRGBSurfaceFrom ( pixeldata, width, height, - depth, pitch, Rmask, Gmask, Bmask, Amask ); -#line 1641 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -#ifdef HAVE_SDL_IMAGE -#define XSubPPtmpAAAA 1 - -XS(XS_SDL_IMGLoad); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_IMGLoad) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::IMGLoad(fname)"); - { - char * fname = (char *)SvPV_nolen(ST(0)); - SDL_Surface * RETVAL; - dXSTARG; -#line 885 "SDL_perl.xs" - RETVAL = IMG_Load(fname); -#line 1662 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -#endif -XS(XS_SDL_SurfaceCopy); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfaceCopy) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfaceCopy(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - SDL_Surface * RETVAL; - dXSTARG; -#line 895 "SDL_perl.xs" - Uint8* pixels; - Uint32 size = surface->pitch * surface->h; - New(0,pixels,size,Uint8); - Copy(surface->pixels,pixels,size,Uint8); - RETVAL = SDL_CreateRGBSurfaceFrom(pixels,surface->w,surface->h, - surface->format->BitsPerPixel, surface->pitch, - surface->format->Rmask, surface->format->Gmask, - surface->format->Bmask, surface->format->Amask); -#line 1688 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_FreeSurface); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_FreeSurface) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::FreeSurface(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); -#line 910 "SDL_perl.xs" - if (surface) { - Uint8* pixels = surface->pixels; - Uint32 flags = surface->flags; - SDL_FreeSurface(surface); - if (flags & SDL_PREALLOC) - Safefree(pixels); - } -#line 1710 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SurfaceFlags); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfaceFlags) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfaceFlags(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Uint32 RETVAL; - dXSTARG; -#line 922 "SDL_perl.xs" - RETVAL = surface->flags; -#line 1727 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SurfacePalette); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfacePalette) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfacePalette(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - SDL_Palette * RETVAL; - dXSTARG; -#line 930 "SDL_perl.xs" - RETVAL = surface->format->palette; -#line 1745 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_SurfaceBitsPerPixel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfaceBitsPerPixel) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfaceBitsPerPixel(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 938 "SDL_perl.xs" - RETVAL = surface->format->BitsPerPixel; -#line 1763 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SurfaceBytesPerPixel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfaceBytesPerPixel) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfaceBytesPerPixel(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 946 "SDL_perl.xs" - RETVAL = surface->format->BytesPerPixel; -#line 1781 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SurfaceRshift); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfaceRshift) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfaceRshift(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 954 "SDL_perl.xs" - RETVAL = surface->format->Rshift; -#line 1799 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SurfaceGshift); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfaceGshift) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfaceGshift(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 962 "SDL_perl.xs" - RETVAL = surface->format->Gshift; -#line 1817 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SurfaceBshift); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfaceBshift) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfaceBshift(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 970 "SDL_perl.xs" - RETVAL = surface->format->Bshift; -#line 1835 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SurfaceAshift); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfaceAshift) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfaceAshift(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 978 "SDL_perl.xs" - RETVAL = surface->format->Ashift; -#line 1853 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SurfaceRmask); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfaceRmask) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfaceRmask(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Uint32 RETVAL; - dXSTARG; -#line 986 "SDL_perl.xs" - RETVAL = surface->format->Rmask; -#line 1871 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SurfaceGmask); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfaceGmask) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfaceGmask(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Uint32 RETVAL; - dXSTARG; -#line 994 "SDL_perl.xs" - RETVAL = surface->format->Gmask; -#line 1889 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SurfaceBmask); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfaceBmask) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfaceBmask(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Uint32 RETVAL; - dXSTARG; -#line 1002 "SDL_perl.xs" - RETVAL = surface->format->Bmask; -#line 1907 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SurfaceAmask); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfaceAmask) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfaceAmask(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Uint32 RETVAL; - dXSTARG; -#line 1010 "SDL_perl.xs" - RETVAL = surface->format->Amask; -#line 1925 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SurfaceColorKey); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfaceColorKey) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfaceColorKey(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Uint32 RETVAL; - dXSTARG; -#line 1018 "SDL_perl.xs" - RETVAL = surface->format->colorkey; -#line 1943 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SurfaceAlpha); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfaceAlpha) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfaceAlpha(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Uint32 RETVAL; - dXSTARG; -#line 1026 "SDL_perl.xs" - RETVAL = surface->format->alpha; -#line 1961 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SurfaceW); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfaceW) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfaceW(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 1034 "SDL_perl.xs" - RETVAL = surface->w; -#line 1979 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SurfaceH); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfaceH) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfaceH(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 1042 "SDL_perl.xs" - RETVAL = surface->h; -#line 1997 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SurfacePitch); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfacePitch) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfacePitch(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Uint16 RETVAL; - dXSTARG; -#line 1050 "SDL_perl.xs" - RETVAL = surface->pitch; -#line 2015 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SurfacePixels); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfacePixels) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfacePixels(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - SV * RETVAL; -#line 1058 "SDL_perl.xs" - RETVAL = newSVpvn(surface->pixels,surface->pitch*surface->h); -#line 2032 "SDL_perl.c" - ST(0) = RETVAL; - sv_2mortal(ST(0)); - } - XSRETURN(1); -} - -XS(XS_SDL_SurfacePixel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfacePixel) -{ - dXSARGS; - if (items < 3) - Perl_croak(aTHX_ "Usage: SDL::SurfacePixel(surface, x, y, ...)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint32 x = (Sint32)SvIV(ST(1)); - Sint32 y = (Sint32)SvIV(ST(2)); - SDL_Color * RETVAL; - dXSTARG; -#line 1068 "SDL_perl.xs" - SDL_Color* color; - int pix,index; - Uint8 r,g,b,a; - int bpp = surface->format->BytesPerPixel; - Uint8* p = (Uint8*)surface->pixels + bpp*x + surface->pitch*y; - if ( items < 3 || items > 4 ) - Perl_croak(aTHX_ "usage: SDL::SurfacePixel(surface,x,y,[color])"); - if ( items == 4) { - color = (SDL_Color*)SvIV(ST(3)); - pix = SDL_MapRGB(surface->format,color->r,color->g,color->b); - switch(bpp) { - case 1: - *(Uint8*)p = pix; - break; - case 2: - *(Uint16*)p = pix; - break; - case 3: - if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { - p[0] = (pix >> 16) & 0xff; - p[1] = (pix >> 8) & 0xff; - p[2] = pix & 0xff; - } else { - p[0] = pix & 0xff; - p[1] = (pix >> 8) & 0xff; - p[2] = (pix >> 16) & 0xff; - } - break; - case 4: - *(Uint32*)p = pix; - break; - } - } - RETVAL = (SDL_Color *) safemalloc(sizeof(SDL_Color)); - switch(bpp) { - case 1: - index = *(Uint8*)p; - memcpy(RETVAL,&surface->format->palette[index],sizeof(SDL_Color)); - break; - case 2: - pix = *(Uint16*)p; - SDL_GetRGB(pix,surface->format,&r,&g,&b); - RETVAL->r = r; - RETVAL->g = g; - RETVAL->b = b; - break; - case 3: - case 4: - pix = *(Uint32*)p; - SDL_GetRGB(pix,surface->format,&r,&g,&b); - RETVAL->r = r; - RETVAL->g = g; - RETVAL->b = b; - break; - } -#line 2107 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_MUSTLOCK); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MUSTLOCK) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MUSTLOCK(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 1130 "SDL_perl.xs" - RETVAL = SDL_MUSTLOCK(surface); -#line 2125 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SurfaceLock); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfaceLock) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfaceLock(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 1138 "SDL_perl.xs" - RETVAL = SDL_LockSurface(surface); -#line 2143 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SurfaceUnlock); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SurfaceUnlock) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SurfaceUnlock(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); -#line 1146 "SDL_perl.xs" - SDL_UnlockSurface(surface); -#line 2159 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_GetVideoSurface); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GetVideoSurface) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::GetVideoSurface()"); - { - SDL_Surface * RETVAL; - dXSTARG; -#line 1151 "SDL_perl.xs" - RETVAL = SDL_GetVideoSurface(); -#line 2175 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_VideoInfo); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_VideoInfo) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::VideoInfo()"); - { - HV * RETVAL; -#line 1159 "SDL_perl.xs" - HV *hv; - SDL_VideoInfo *info; - info = (SDL_VideoInfo *) safemalloc ( sizeof(SDL_VideoInfo)); - memcpy(info,SDL_GetVideoInfo(),sizeof(SDL_VideoInfo)); - hv = newHV(); - hv_store(hv,"hw_available",strlen("hw_available"), - newSViv(info->hw_available),0); - hv_store(hv,"wm_available",strlen("wm_available"), - newSViv(info->wm_available),0); - hv_store(hv,"blit_hw",strlen("blit_hw"), - newSViv(info->blit_hw),0); - hv_store(hv,"blit_hw_CC",strlen("blit_hw_CC"), - newSViv(info->blit_hw_CC),0); - hv_store(hv,"blit_hw_A",strlen("blit_hw_A"), - newSViv(info->blit_hw_A),0); - hv_store(hv,"blit_sw",strlen("blit_sw"), - newSViv(info->blit_sw),0); - hv_store(hv,"blit_sw_CC",strlen("blit_sw_CC"), - newSViv(info->blit_sw_CC),0); - hv_store(hv,"blit_sw_A",strlen("blit_sw_A"), - newSViv(info->blit_sw_A),0); - hv_store(hv,"blit_fill",strlen("blit_fill"), - newSViv(info->blit_fill),0); - hv_store(hv,"video_mem",strlen("video_mem"), - newSViv(info->video_mem),0); - RETVAL = hv; -#line 2216 "SDL_perl.c" - ST(0) = newRV((SV*)RETVAL); - sv_2mortal(ST(0)); - } - XSRETURN(1); -} - -XS(XS_SDL_NewRect); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NewRect) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::NewRect(x, y, w, h)"); - { - Sint16 x = (Sint16)SvIV(ST(0)); - Sint16 y = (Sint16)SvIV(ST(1)); - Uint16 w = (Uint16)SvUV(ST(2)); - Uint16 h = (Uint16)SvUV(ST(3)); - SDL_Rect * RETVAL; - dXSTARG; -#line 1195 "SDL_perl.xs" - RETVAL = (SDL_Rect *) safemalloc (sizeof(SDL_Rect)); - RETVAL->x = x; - RETVAL->y = y; - RETVAL->w = w; - RETVAL->h = h; -#line 2242 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_FreeRect); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_FreeRect) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::FreeRect(rect)"); - { - SDL_Rect * rect = INT2PTR(SDL_Rect *,SvIV(ST(0))); -#line 1207 "SDL_perl.xs" - safefree(rect); -#line 2258 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_RectX); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_RectX) -{ - dXSARGS; - if (items < 1) - Perl_croak(aTHX_ "Usage: SDL::RectX(rect, ...)"); - { - SDL_Rect * rect = INT2PTR(SDL_Rect *,SvIV(ST(0))); - Sint16 RETVAL; - dXSTARG; -#line 1213 "SDL_perl.xs" - if (items > 1 ) rect->x = SvIV(ST(1)); - RETVAL = rect->x; -#line 2276 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_RectY); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_RectY) -{ - dXSARGS; - if (items < 1) - Perl_croak(aTHX_ "Usage: SDL::RectY(rect, ...)"); - { - SDL_Rect * rect = INT2PTR(SDL_Rect *,SvIV(ST(0))); - Sint16 RETVAL; - dXSTARG; -#line 1222 "SDL_perl.xs" - if (items > 1 ) rect->y = SvIV(ST(1)); - RETVAL = rect->y; -#line 2295 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_RectW); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_RectW) -{ - dXSARGS; - if (items < 1) - Perl_croak(aTHX_ "Usage: SDL::RectW(rect, ...)"); - { - SDL_Rect * rect = INT2PTR(SDL_Rect *,SvIV(ST(0))); - Uint16 RETVAL; - dXSTARG; -#line 1231 "SDL_perl.xs" - if (items > 1 ) rect->w = SvIV(ST(1)); - RETVAL = rect->w; -#line 2314 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_RectH); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_RectH) -{ - dXSARGS; - if (items < 1) - Perl_croak(aTHX_ "Usage: SDL::RectH(rect, ...)"); - { - SDL_Rect * rect = INT2PTR(SDL_Rect *,SvIV(ST(0))); - Uint16 RETVAL; - dXSTARG; -#line 1240 "SDL_perl.xs" - if (items > 1 ) rect->h = SvIV(ST(1)); - RETVAL = rect->h; -#line 2333 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_ListModes); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_ListModes) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::ListModes(format, flags)"); - { - Uint32 flags = (Uint32)SvUV(ST(1)); - SDL_PixelFormat * format = INT2PTR(SDL_PixelFormat *,SvIV(ST(0))); - AV * RETVAL; -#line 1250 "SDL_perl.xs" - SDL_Rect **mode; - RETVAL = newAV(); - mode = SDL_ListModes(format,flags); - if (mode == (SDL_Rect**)-1 ) { - av_push(RETVAL,newSVpv("all",0)); - } else if (! mode ) { - av_push(RETVAL,newSVpv("none",0)); - } else { - for (;*mode;mode++) { - av_push(RETVAL,newSViv(PTR2IV(*mode))); - } - } -#line 2362 "SDL_perl.c" - ST(0) = newRV((SV*)RETVAL); - sv_2mortal(ST(0)); - } - XSRETURN(1); -} - -XS(XS_SDL_NewColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NewColor) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::NewColor(r, g, b)"); - { - Uint8 r = (unsigned char)SvUV(ST(0)); - Uint8 g = (unsigned char)SvUV(ST(1)); - Uint8 b = (unsigned char)SvUV(ST(2)); - SDL_Color * RETVAL; - dXSTARG; -#line 1272 "SDL_perl.xs" - RETVAL = (SDL_Color *) safemalloc(sizeof(SDL_Color)); - RETVAL->r = r; - RETVAL->g = g; - RETVAL->b = b; -#line 2386 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_ColorR); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_ColorR) -{ - dXSARGS; - if (items < 1) - Perl_croak(aTHX_ "Usage: SDL::ColorR(color, ...)"); - { - SDL_Color * color = INT2PTR(SDL_Color *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 1283 "SDL_perl.xs" - if (items > 1 ) color->r = SvIV(ST(1)); - RETVAL = color->r; -#line 2405 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_ColorG); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_ColorG) -{ - dXSARGS; - if (items < 1) - Perl_croak(aTHX_ "Usage: SDL::ColorG(color, ...)"); - { - SDL_Color * color = INT2PTR(SDL_Color *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 1292 "SDL_perl.xs" - if (items > 1 ) color->g = SvIV(ST(1)); - RETVAL = color->g; -#line 2424 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_ColorB); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_ColorB) -{ - dXSARGS; - if (items < 1) - Perl_croak(aTHX_ "Usage: SDL::ColorB(color, ...)"); - { - SDL_Color * color = INT2PTR(SDL_Color *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 1301 "SDL_perl.xs" - if (items > 1 ) color->b = SvIV(ST(1)); - RETVAL = color->b; -#line 2443 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_FreeColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_FreeColor) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::FreeColor(color)"); - { - SDL_Color * color = INT2PTR(SDL_Color *,SvIV(ST(0))); -#line 1310 "SDL_perl.xs" - return; safefree(color); -#line 2459 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_NewPalette); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NewPalette) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::NewPalette(number)"); - { - int number = (int)SvIV(ST(0)); - SDL_Palette * RETVAL; - dXSTARG; -#line 1316 "SDL_perl.xs" - RETVAL = (SDL_Palette *)safemalloc(sizeof(SDL_Palette)); - RETVAL->colors = (SDL_Color *)safemalloc(number * - sizeof(SDL_Color)); - RETVAL->ncolors = number; -#line 2479 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_PaletteNColors); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_PaletteNColors) -{ - dXSARGS; - if (items < 1) - Perl_croak(aTHX_ "Usage: SDL::PaletteNColors(palette, ...)"); - { - SDL_Palette * palette = INT2PTR(SDL_Palette *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 1327 "SDL_perl.xs" - if ( items > 1 ) palette->ncolors = SvIV(ST(1)); - RETVAL = palette->ncolors; -#line 2498 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_PaletteColors); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_PaletteColors) -{ - dXSARGS; - if (items < 2) - Perl_croak(aTHX_ "Usage: SDL::PaletteColors(palette, index, ...)"); - { - SDL_Palette * palette = INT2PTR(SDL_Palette *,SvIV(ST(0))); - int index = (int)SvIV(ST(1)); - SDL_Color * RETVAL; - dXSTARG; -#line 1337 "SDL_perl.xs" - if ( items > 2 ) { - palette->colors[index].r = SvUV(ST(2)); - palette->colors[index].g = SvUV(ST(3)); - palette->colors[index].b = SvUV(ST(4)); - } - RETVAL = (SDL_Color *)(palette->colors + index); -#line 2522 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_VideoModeOK); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_VideoModeOK) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::VideoModeOK(width, height, bpp, flags)"); - { - int width = (int)SvIV(ST(0)); - int height = (int)SvIV(ST(1)); - int bpp = (int)SvIV(ST(2)); - Uint32 flags = (Uint32)SvUV(ST(3)); - int RETVAL; - dXSTARG; -#line 1353 "SDL_perl.xs" - RETVAL = SDL_VideoModeOK(width,height,bpp,flags); -#line 2543 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SetVideoMode); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SetVideoMode) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::SetVideoMode(width, height, bpp, flags)"); - { - int width = (int)SvIV(ST(0)); - int height = (int)SvIV(ST(1)); - int bpp = (int)SvIV(ST(2)); - Uint32 flags = (Uint32)SvUV(ST(3)); - SDL_Surface * RETVAL; - dXSTARG; -#line 1364 "SDL_perl.xs" - RETVAL = SDL_SetVideoMode(width,height,bpp,flags); -#line 2564 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_UpdateRect); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_UpdateRect) -{ - dXSARGS; - if (items != 5) - Perl_croak(aTHX_ "Usage: SDL::UpdateRect(surface, x, y, w, h)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - int x = (int)SvIV(ST(1)); - int y = (int)SvIV(ST(2)); - int w = (int)SvIV(ST(3)); - int h = (int)SvIV(ST(4)); -#line 1376 "SDL_perl.xs" - SDL_UpdateRect(surface,x,y,w,h); -#line 2584 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_UpdateRects); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_UpdateRects) -{ - dXSARGS; - if (items < 1) - Perl_croak(aTHX_ "Usage: SDL::UpdateRects(surface, ...)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); -#line 1382 "SDL_perl.xs" - SDL_Rect *rects, *temp; - int num_rects,i; - if ( items < 2 ) return; - num_rects = items - 1; - rects = (SDL_Rect *)safemalloc(sizeof(SDL_Rect)*items); - for(i=0;ix; - rects[i].y = temp->y; - rects[i].w = temp->w; - rects[i].h = temp->h; - } - SDL_UpdateRects(surface,num_rects,rects); - safefree(rects); -#line 2612 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_Flip); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_Flip) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::Flip(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 1401 "SDL_perl.xs" - RETVAL = SDL_Flip(surface); -#line 2629 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SetColors); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SetColors) -{ - dXSARGS; - if (items < 2) - Perl_croak(aTHX_ "Usage: SDL::SetColors(surface, start, ...)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - int start = (int)SvIV(ST(1)); - int RETVAL; - dXSTARG; -#line 1410 "SDL_perl.xs" - SDL_Color *colors,*temp; - int i, length; - if ( items < 3 ) { RETVAL = 0; goto all_done; } - length = items - 2; - colors = (SDL_Color *)safemalloc(sizeof(SDL_Color)*(length+1)); - for ( i = 0; i < length ; i++ ) { - temp = (SDL_Color *)SvIV(ST(i+2)); - colors[i].r = temp->r; - colors[i].g = temp->g; - colors[i].b = temp->b; - } - RETVAL = SDL_SetColors(surface, colors, start, length ); - safefree(colors); -all_done: -#line 2661 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MapRGB); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MapRGB) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::MapRGB(surface, r, g, b)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Uint8 r = (unsigned char)SvUV(ST(1)); - Uint8 g = (unsigned char)SvUV(ST(2)); - Uint8 b = (unsigned char)SvUV(ST(3)); - Uint32 RETVAL; - dXSTARG; -#line 1434 "SDL_perl.xs" - RETVAL = SDL_MapRGB(surface->format,r,g,b); -#line 2682 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MapRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MapRGBA) -{ - dXSARGS; - if (items != 5) - Perl_croak(aTHX_ "Usage: SDL::MapRGBA(surface, r, g, b, a)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Uint8 r = (unsigned char)SvUV(ST(1)); - Uint8 g = (unsigned char)SvUV(ST(2)); - Uint8 b = (unsigned char)SvUV(ST(3)); - Uint8 a = (unsigned char)SvUV(ST(4)); - Uint32 RETVAL; - dXSTARG; -#line 1446 "SDL_perl.xs" - RETVAL = SDL_MapRGBA(surface->format,r,g,b,a); -#line 2704 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GetRGB); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GetRGB) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::GetRGB(surface, pixel)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Uint32 pixel = (Uint32)SvUV(ST(1)); - AV * RETVAL; -#line 1455 "SDL_perl.xs" - Uint8 r,g,b; - SDL_GetRGB(pixel,surface->format,&r,&g,&b); - RETVAL = newAV(); - av_push(RETVAL,newSViv(r)); - av_push(RETVAL,newSViv(g)); - av_push(RETVAL,newSViv(b)); -#line 2727 "SDL_perl.c" - ST(0) = newRV((SV*)RETVAL); - sv_2mortal(ST(0)); - } - XSRETURN(1); -} - -XS(XS_SDL_GetRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GetRGBA) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::GetRGBA(surface, pixel)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Uint32 pixel = (Uint32)SvUV(ST(1)); - AV * RETVAL; -#line 1469 "SDL_perl.xs" - Uint8 r,g,b,a; - SDL_GetRGBA(pixel,surface->format,&r,&g,&b,&a); - RETVAL = newAV(); - av_push(RETVAL,newSViv(r)); - av_push(RETVAL,newSViv(g)); - av_push(RETVAL,newSViv(b)); - av_push(RETVAL,newSViv(a)); -#line 2752 "SDL_perl.c" - ST(0) = newRV((SV*)RETVAL); - sv_2mortal(ST(0)); - } - XSRETURN(1); -} - -XS(XS_SDL_SaveBMP); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SaveBMP) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::SaveBMP(surface, filename)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - char * filename = (char *)SvPV_nolen(ST(1)); - int RETVAL; - dXSTARG; -#line 1484 "SDL_perl.xs" - RETVAL = SDL_SaveBMP(surface,filename); -#line 2772 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SetColorKey); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SetColorKey) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::SetColorKey(surface, flag, key)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Uint32 flag = (Uint32)SvUV(ST(1)); - SDL_Color * key = INT2PTR(SDL_Color *,SvIV(ST(2))); - int RETVAL; - dXSTARG; -#line 1494 "SDL_perl.xs" - Uint32 pixel = SDL_MapRGB(surface->format,key->r,key->g,key->b); - RETVAL = SDL_SetColorKey(surface,flag,pixel); -#line 2793 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SetAlpha); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SetAlpha) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::SetAlpha(surface, flag, alpha)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Uint32 flag = (Uint32)SvUV(ST(1)); - Uint8 alpha = (unsigned char)SvUV(ST(2)); - int RETVAL; - dXSTARG; -#line 1505 "SDL_perl.xs" - RETVAL = SDL_SetAlpha(surface,flag,alpha); -#line 2813 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_DisplayFormat); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_DisplayFormat) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::DisplayFormat(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - SDL_Surface * RETVAL; - dXSTARG; -#line 1513 "SDL_perl.xs" - RETVAL = SDL_DisplayFormat(surface); -#line 2831 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_DisplayFormatAlpha); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_DisplayFormatAlpha) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::DisplayFormatAlpha(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - SDL_Surface * RETVAL; - dXSTARG; -#line 1521 "SDL_perl.xs" - RETVAL = SDL_DisplayFormatAlpha(surface); -#line 2849 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_ConvertRGB); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_ConvertRGB) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::ConvertRGB(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - SDL_Surface * RETVAL; - dXSTARG; -#line 1529 "SDL_perl.xs" - SDL_PixelFormat fmt; - fmt.palette = NULL; - fmt.BitsPerPixel = 24; - fmt.BytesPerPixel = 3; - fmt.Rmask = 0x000000ff; - fmt.Gmask = 0x0000ff00; - fmt.Bmask = 0x00ff0000; - fmt.Amask = 0x00000000; - fmt.Rloss = 0; - fmt.Gloss = 0; - fmt.Bloss = 0; - fmt.Aloss = 0; - fmt.Rshift = 0; - fmt.Gshift = 8; - fmt.Bshift = 16; - fmt.Ashift = 24; - fmt.colorkey = 0; - fmt.alpha = 0; - RETVAL = SDL_ConvertSurface(surface,&fmt,surface->flags); -#line 2885 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_ConvertRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_ConvertRGBA) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::ConvertRGBA(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - SDL_Surface * RETVAL; - dXSTARG; -#line 1555 "SDL_perl.xs" - SDL_PixelFormat fmt; - fmt.palette = NULL; - fmt.BitsPerPixel = 32; - fmt.BytesPerPixel = 4; - fmt.Rmask = 0x000000ff; - fmt.Gmask = 0x0000ff00; - fmt.Bmask = 0x00ff0000; - fmt.Amask = 0xff000000; - fmt.Rloss = 0; - fmt.Gloss = 0; - fmt.Bloss = 0; - fmt.Aloss = 0; - fmt.Rshift = 0; - fmt.Gshift = 8; - fmt.Bshift = 16; - fmt.Ashift = 24; - fmt.colorkey = 0; - fmt.alpha = 0; - RETVAL = SDL_ConvertSurface(surface,&fmt,surface->flags); -#line 2921 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_BlitSurface); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_BlitSurface) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::BlitSurface(src, src_rect, dest, dest_rect)"); - { - SDL_Surface * src = INT2PTR(SDL_Surface *,SvIV(ST(0))); - SDL_Rect * src_rect = INT2PTR(SDL_Rect *,SvIV(ST(1))); - SDL_Surface * dest = INT2PTR(SDL_Surface *,SvIV(ST(2))); - SDL_Rect * dest_rect = INT2PTR(SDL_Rect *,SvIV(ST(3))); - int RETVAL; - dXSTARG; -#line 1584 "SDL_perl.xs" - RETVAL = SDL_BlitSurface(src,src_rect,dest,dest_rect); -#line 2942 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_FillRect); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_FillRect) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::FillRect(dest, dest_rect, color)"); - { - SDL_Surface * dest = INT2PTR(SDL_Surface *,SvIV(ST(0))); - SDL_Rect * dest_rect = INT2PTR(SDL_Rect *,SvIV(ST(1))); - SDL_Color * color = INT2PTR(SDL_Color *,SvIV(ST(2))); - int RETVAL; - dXSTARG; -#line 1594 "SDL_perl.xs" - Uint32 pixel = SDL_MapRGB(dest->format,color->r,color->g,color->b); - RETVAL = SDL_FillRect(dest,dest_rect,pixel); -#line 2963 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GetAppState); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GetAppState) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::GetAppState()"); - { - Uint8 RETVAL; - dXSTARG; -#line 1602 "SDL_perl.xs" - RETVAL = SDL_GetAppState(); -#line 2980 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_WMSetCaption); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_WMSetCaption) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::WMSetCaption(title, icon)"); - { - char * title = (char *)SvPV_nolen(ST(0)); - char * icon = (char *)SvPV_nolen(ST(1)); -#line 1612 "SDL_perl.xs" - SDL_WM_SetCaption(title,icon); -#line 2997 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_WMGetCaption); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_WMGetCaption) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::WMGetCaption()"); - { - AV * RETVAL; -#line 1617 "SDL_perl.xs" - char *title,*icon; - SDL_WM_GetCaption(&title,&icon); - RETVAL = newAV(); - av_push(RETVAL,newSVpv(title,0)); - av_push(RETVAL,newSVpv(icon,0)); -#line 3016 "SDL_perl.c" - ST(0) = newRV((SV*)RETVAL); - sv_2mortal(ST(0)); - } - XSRETURN(1); -} - -XS(XS_SDL_WMSetIcon); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_WMSetIcon) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::WMSetIcon(icon)"); - { - SDL_Surface * icon = INT2PTR(SDL_Surface *,SvIV(ST(0))); -#line 1629 "SDL_perl.xs" - SDL_WM_SetIcon(icon,NULL); -#line 3033 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_WarpMouse); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_WarpMouse) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::WarpMouse(x, y)"); - { - Uint16 x = (Uint16)SvUV(ST(0)); - Uint16 y = (Uint16)SvUV(ST(1)); -#line 1636 "SDL_perl.xs" - SDL_WarpMouse(x,y); -#line 3049 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_GetMouseState); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GetMouseState) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::GetMouseState()"); - { - AV * RETVAL; -#line 1641 "SDL_perl.xs" - Uint8 mask; - int x; - int y; - mask = SDL_GetMouseState(&x,&y); - RETVAL = newAV(); - av_push(RETVAL,newSViv(mask)); - av_push(RETVAL,newSViv(x)); - av_push(RETVAL,newSViv(y)); -#line 3071 "SDL_perl.c" - ST(0) = newRV((SV*)RETVAL); - sv_2mortal(ST(0)); - } - XSRETURN(1); -} - -XS(XS_SDL_GetRelativeMouseState); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GetRelativeMouseState) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::GetRelativeMouseState()"); - { - AV * RETVAL; -#line 1655 "SDL_perl.xs" - Uint8 mask; - int x; - int y; - mask = SDL_GetRelativeMouseState(&x,&y); - RETVAL = newAV(); - av_push(RETVAL,newSViv(mask)); - av_push(RETVAL,newSViv(x)); - av_push(RETVAL,newSViv(y)); -#line 3095 "SDL_perl.c" - ST(0) = newRV((SV*)RETVAL); - sv_2mortal(ST(0)); - } - XSRETURN(1); -} - -XS(XS_SDL_NewCursor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NewCursor) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::NewCursor(data, mask, x, y)"); - { - SDL_Surface * data = INT2PTR(SDL_Surface *,SvIV(ST(0))); - SDL_Surface * mask = INT2PTR(SDL_Surface *,SvIV(ST(1))); - int x = (int)SvIV(ST(2)); - int y = (int)SvIV(ST(3)); - SDL_Cursor * RETVAL; - dXSTARG; -#line 1673 "SDL_perl.xs" - RETVAL = SDL_CreateCursor((Uint8*)data->pixels, - (Uint8*)mask->pixels,data->w,data->h,x,y); -#line 3118 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_FreeCursor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_FreeCursor) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::FreeCursor(cursor)"); - { - SDL_Cursor * cursor = INT2PTR(SDL_Cursor *,SvIV(ST(0))); -#line 1682 "SDL_perl.xs" - SDL_FreeCursor(cursor); -#line 3134 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SetCursor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SetCursor) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SetCursor(cursor)"); - { - SDL_Cursor * cursor = INT2PTR(SDL_Cursor *,SvIV(ST(0))); -#line 1688 "SDL_perl.xs" - SDL_SetCursor(cursor); -#line 3149 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_GetCursor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GetCursor) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::GetCursor()"); - { - SDL_Cursor * RETVAL; - dXSTARG; -#line 1693 "SDL_perl.xs" - RETVAL = SDL_GetCursor(); -#line 3165 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_ShowCursor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_ShowCursor) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::ShowCursor(toggle)"); - { - int toggle = (int)SvIV(ST(0)); - int RETVAL; - dXSTARG; -#line 1701 "SDL_perl.xs" - RETVAL = SDL_ShowCursor(toggle); -#line 3183 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NewAudioSpec); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NewAudioSpec) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::NewAudioSpec(freq, format, channels, samples)"); - { - int freq = (int)SvIV(ST(0)); - Uint16 format = (Uint16)SvUV(ST(1)); - Uint8 channels = (unsigned char)SvUV(ST(2)); - Uint16 samples = (Uint16)SvUV(ST(3)); - SDL_AudioSpec * RETVAL; - dXSTARG; -#line 1712 "SDL_perl.xs" - RETVAL = (SDL_AudioSpec *)safemalloc(sizeof(SDL_AudioSpec)); - RETVAL->freq = freq; - RETVAL->format = format; - RETVAL->channels = channels; - RETVAL->samples = samples; -#line 3208 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_FreeAudioSpec); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_FreeAudioSpec) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::FreeAudioSpec(spec)"); - { - SDL_AudioSpec * spec = INT2PTR(SDL_AudioSpec *,SvIV(ST(0))); -#line 1724 "SDL_perl.xs" - safefree(spec); -#line 3224 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_NewAudioCVT); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NewAudioCVT) -{ - dXSARGS; - if (items != 6) - Perl_croak(aTHX_ "Usage: SDL::NewAudioCVT(src_format, src_channels, src_rate, dst_format, dst_channels, dst_rate)"); - { - Uint16 src_format = (Uint16)SvUV(ST(0)); - Uint8 src_channels = (unsigned char)SvUV(ST(1)); - int src_rate = (int)SvIV(ST(2)); - Uint16 dst_format = (Uint16)SvUV(ST(3)); - Uint8 dst_channels = (unsigned char)SvUV(ST(4)); - int dst_rate = (int)SvIV(ST(5)); - SDL_AudioCVT * RETVAL; - dXSTARG; -#line 1735 "SDL_perl.xs" - RETVAL = (SDL_AudioCVT *)safemalloc(sizeof(SDL_AudioCVT)); - if (SDL_BuildAudioCVT(RETVAL,src_format, src_channels, src_rate, - dst_format, dst_channels, dst_rate)) { - safefree(RETVAL); RETVAL = NULL; } -#line 3249 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_FreeAudioCVT); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_FreeAudioCVT) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::FreeAudioCVT(cvt)"); - { - SDL_AudioCVT * cvt = INT2PTR(SDL_AudioCVT *,SvIV(ST(0))); -#line 1746 "SDL_perl.xs" - safefree(cvt); -#line 3265 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_ConvertAudioData); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_ConvertAudioData) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::ConvertAudioData(cvt, data, len)"); - { - SDL_AudioCVT * cvt = INT2PTR(SDL_AudioCVT *,SvIV(ST(0))); - Uint8 * data = INT2PTR(Uint8 *,SvIV(ST(1))); - int len = (int)SvIV(ST(2)); - int RETVAL; - dXSTARG; -#line 1754 "SDL_perl.xs" - cvt->len = len; - cvt->buf = (Uint8*) safemalloc(cvt->len*cvt->len_mult); - memcpy(cvt->buf,data,cvt->len); - RETVAL = SDL_ConvertAudio(cvt); -#line 3287 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_OpenAudio); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_OpenAudio) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::OpenAudio(spec, callback)"); - { - SDL_AudioSpec * spec = INT2PTR(SDL_AudioSpec *,SvIV(ST(0))); - SV* callback = ST(1); - int RETVAL; - dXSTARG; -#line 1766 "SDL_perl.xs" - spec->userdata = (void*)callback; - spec->callback = sdl_perl_audio_callback; - RETVAL = SDL_OpenAudio(spec,NULL); -#line 3308 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GetAudioStatus); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GetAudioStatus) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::GetAudioStatus()"); - { - Uint32 RETVAL; - dXSTARG; -#line 1775 "SDL_perl.xs" - RETVAL = SDL_GetAudioStatus (); -#line 3325 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_PauseAudio); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_PauseAudio) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::PauseAudio(p_on)"); - { - int p_on = (int)SvIV(ST(0)); -#line 1783 "SDL_perl.xs" - SDL_PauseAudio(p_on); -#line 3341 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_LockAudio); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_LockAudio) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::LockAudio()"); - { -#line 1788 "SDL_perl.xs" - SDL_LockAudio(); -#line 3355 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_UnlockAudio); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_UnlockAudio) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::UnlockAudio()"); - { -#line 1793 "SDL_perl.xs" - SDL_UnlockAudio(); -#line 3369 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_CloseAudio); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CloseAudio) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::CloseAudio()"); - { -#line 1798 "SDL_perl.xs" - SDL_CloseAudio(); -#line 3383 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_FreeWAV); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_FreeWAV) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::FreeWAV(buf)"); - { - Uint8 * buf = INT2PTR(Uint8 *,SvIV(ST(0))); -#line 1804 "SDL_perl.xs" - SDL_FreeWAV(buf); -#line 3398 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_LoadWAV); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_LoadWAV) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::LoadWAV(filename, spec)"); - { - char * filename = (char *)SvPV_nolen(ST(0)); - SDL_AudioSpec * spec = INT2PTR(SDL_AudioSpec *,SvIV(ST(1))); - AV * RETVAL; -#line 1811 "SDL_perl.xs" - SDL_AudioSpec *temp; - Uint8 *buf; - Uint32 len; - - RETVAL = newAV(); - temp = SDL_LoadWAV(filename,spec,&buf,&len); - if ( ! temp ) goto error; - av_push(RETVAL,newSViv(PTR2IV(temp))); - av_push(RETVAL,newSViv(PTR2IV(buf))); - av_push(RETVAL,newSViv(len)); -error: -#line 3425 "SDL_perl.c" - ST(0) = newRV((SV*)RETVAL); - sv_2mortal(ST(0)); - } - XSRETURN(1); -} - -#ifdef HAVE_SDL_MIXER -#define XSubPPtmpAAAB 1 - -XS(XS_SDL_MixAudio); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixAudio) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::MixAudio(dst, src, len, volume)"); - { - Uint8 * dst = INT2PTR(Uint8 *,SvIV(ST(0))); - Uint8 * src = INT2PTR(Uint8 *,SvIV(ST(1))); - Uint32 len = (Uint32)SvUV(ST(2)); - int volume = (int)SvIV(ST(3)); -#line 1834 "SDL_perl.xs" - SDL_MixAudio(dst,src,len,volume); -#line 3448 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_MixOpenAudio); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixOpenAudio) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::MixOpenAudio(frequency, format, channels, chunksize)"); - { - int frequency = (int)SvIV(ST(0)); - Uint16 format = (Uint16)SvUV(ST(1)); - int channels = (int)SvIV(ST(2)); - int chunksize = (int)SvIV(ST(3)); - int RETVAL; - dXSTARG; -#line 1843 "SDL_perl.xs" - RETVAL = Mix_OpenAudio(frequency, format, channels, chunksize); -#line 3468 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixAllocateChannels); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixAllocateChannels) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixAllocateChannels(number)"); - { - int number = (int)SvIV(ST(0)); - int RETVAL; - dXSTARG; -#line 1851 "SDL_perl.xs" - RETVAL = Mix_AllocateChannels(number); -#line 3486 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixQuerySpec); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixQuerySpec) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::MixQuerySpec()"); - { - AV * RETVAL; -#line 1858 "SDL_perl.xs" - int freq, channels, status; - Uint16 format; - status = Mix_QuerySpec(&freq,&format,&channels); - RETVAL = newAV(); - av_push(RETVAL,newSViv(status)); - av_push(RETVAL,newSViv(freq)); - av_push(RETVAL,newSViv(format)); - av_push(RETVAL,newSViv(channels)); -#line 3509 "SDL_perl.c" - ST(0) = newRV((SV*)RETVAL); - sv_2mortal(ST(0)); - } - XSRETURN(1); -} - -XS(XS_SDL_MixLoadWAV); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixLoadWAV) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixLoadWAV(filename)"); - { - char * filename = (char *)SvPV_nolen(ST(0)); - Mix_Chunk * RETVAL; - dXSTARG; -#line 1873 "SDL_perl.xs" - RETVAL = Mix_LoadWAV(filename); -#line 3528 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_MixLoadMusic); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixLoadMusic) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixLoadMusic(filename)"); - { - char * filename = (char *)SvPV_nolen(ST(0)); - Mix_Music * RETVAL; - dXSTARG; -#line 1881 "SDL_perl.xs" - RETVAL = Mix_LoadMUS(filename); -#line 3546 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_MixQuickLoadWAV); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixQuickLoadWAV) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixQuickLoadWAV(buf)"); - { - Uint8 * buf = INT2PTR(Uint8 *,SvIV(ST(0))); - Mix_Chunk * RETVAL; - dXSTARG; -#line 1889 "SDL_perl.xs" - RETVAL = Mix_QuickLoad_WAV(buf); -#line 3564 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_MixFreeChunk); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixFreeChunk) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixFreeChunk(chunk)"); - { - Mix_Chunk * chunk = INT2PTR(Mix_Chunk *,SvIV(ST(0))); -#line 1897 "SDL_perl.xs" - Mix_FreeChunk(chunk); -#line 3580 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_MixFreeMusic); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixFreeMusic) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixFreeMusic(music)"); - { - Mix_Music * music = INT2PTR(Mix_Music *,SvIV(ST(0))); -#line 1903 "SDL_perl.xs" - Mix_FreeMusic(music); -#line 3595 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_MixSetPostMixCallback); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixSetPostMixCallback) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::MixSetPostMixCallback(func, arg)"); - { - void * func = INT2PTR(void *,SvIV(ST(0))); - void * arg = INT2PTR(void *,SvIV(ST(1))); -#line 1910 "SDL_perl.xs" - Mix_SetPostMix(func,arg); -#line 3611 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_PerlMixMusicHook); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_PerlMixMusicHook) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::PerlMixMusicHook()"); - { - void * RETVAL; - dXSTARG; -#line 1915 "SDL_perl.xs" - RETVAL = sdl_perl_music_callback; -#line 3627 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_MixSetMusicHook); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixSetMusicHook) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::MixSetMusicHook(func, arg)"); - { - void * func = INT2PTR(void *,SvIV(ST(0))); - void * arg = INT2PTR(void *,SvIV(ST(1))); -#line 1924 "SDL_perl.xs" - Mix_HookMusic(func,arg); -#line 3644 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_MixSetMusicFinishedHook); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixSetMusicFinishedHook) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixSetMusicFinishedHook(func)"); - { - void * func = INT2PTR(void *,SvIV(ST(0))); -#line 1930 "SDL_perl.xs" - mix_music_finished_cv = func; - Mix_HookMusicFinished(sdl_perl_music_finished_callback); -#line 3660 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_MixGetMusicHookData); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixGetMusicHookData) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::MixGetMusicHookData()"); - { - void * RETVAL; - dXSTARG; -#line 1936 "SDL_perl.xs" - RETVAL = Mix_GetMusicHookData(); -#line 3676 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_MixReverseChannels); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixReverseChannels) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixReverseChannels(number)"); - { - int number = (int)SvIV(ST(0)); - int RETVAL; - dXSTARG; -#line 1944 "SDL_perl.xs" - RETVAL = Mix_ReserveChannels ( number ); -#line 3694 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixGroupChannel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixGroupChannel) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::MixGroupChannel(which, tag)"); - { - int which = (int)SvIV(ST(0)); - int tag = (int)SvIV(ST(1)); - int RETVAL; - dXSTARG; -#line 1953 "SDL_perl.xs" - RETVAL = Mix_GroupChannel(which,tag); -#line 3713 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixGroupChannels); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixGroupChannels) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::MixGroupChannels(from, to, tag)"); - { - int from = (int)SvIV(ST(0)); - int to = (int)SvIV(ST(1)); - int tag = (int)SvIV(ST(2)); - int RETVAL; - dXSTARG; -#line 1963 "SDL_perl.xs" - RETVAL = Mix_GroupChannels(from,to,tag); -#line 3733 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixGroupAvailable); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixGroupAvailable) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixGroupAvailable(tag)"); - { - int tag = (int)SvIV(ST(0)); - int RETVAL; - dXSTARG; -#line 1971 "SDL_perl.xs" - RETVAL = Mix_GroupAvailable(tag); -#line 3751 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixGroupCount); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixGroupCount) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixGroupCount(tag)"); - { - int tag = (int)SvIV(ST(0)); - int RETVAL; - dXSTARG; -#line 1979 "SDL_perl.xs" - RETVAL = Mix_GroupCount(tag); -#line 3769 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixGroupOldest); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixGroupOldest) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixGroupOldest(tag)"); - { - int tag = (int)SvIV(ST(0)); - int RETVAL; - dXSTARG; -#line 1987 "SDL_perl.xs" - RETVAL = Mix_GroupOldest(tag); -#line 3787 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixGroupNewer); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixGroupNewer) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixGroupNewer(tag)"); - { - int tag = (int)SvIV(ST(0)); - int RETVAL; - dXSTARG; -#line 1995 "SDL_perl.xs" - RETVAL = Mix_GroupNewer(tag); -#line 3805 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixPlayChannel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixPlayChannel) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::MixPlayChannel(channel, chunk, loops)"); - { - int channel = (int)SvIV(ST(0)); - Mix_Chunk * chunk = INT2PTR(Mix_Chunk *,SvIV(ST(1))); - int loops = (int)SvIV(ST(2)); - int RETVAL; - dXSTARG; -#line 2005 "SDL_perl.xs" - RETVAL = Mix_PlayChannel(channel,chunk,loops); -#line 3825 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixPlayChannelTimed); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixPlayChannelTimed) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::MixPlayChannelTimed(channel, chunk, loops, ticks)"); - { - int channel = (int)SvIV(ST(0)); - Mix_Chunk * chunk = INT2PTR(Mix_Chunk *,SvIV(ST(1))); - int loops = (int)SvIV(ST(2)); - int ticks = (int)SvIV(ST(3)); - int RETVAL; - dXSTARG; -#line 2016 "SDL_perl.xs" - RETVAL = Mix_PlayChannelTimed(channel,chunk,loops,ticks); -#line 3846 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixPlayMusic); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixPlayMusic) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::MixPlayMusic(music, loops)"); - { - Mix_Music * music = INT2PTR(Mix_Music *,SvIV(ST(0))); - int loops = (int)SvIV(ST(1)); - int RETVAL; - dXSTARG; -#line 2025 "SDL_perl.xs" - RETVAL = Mix_PlayMusic(music,loops); -#line 3865 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixFadeInChannel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixFadeInChannel) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::MixFadeInChannel(channel, chunk, loops, ms)"); - { - int channel = (int)SvIV(ST(0)); - Mix_Chunk * chunk = INT2PTR(Mix_Chunk *,SvIV(ST(1))); - int loops = (int)SvIV(ST(2)); - int ms = (int)SvIV(ST(3)); - int RETVAL; - dXSTARG; -#line 2036 "SDL_perl.xs" - RETVAL = Mix_FadeInChannel(channel,chunk,loops,ms); -#line 3886 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixFadeInChannelTimed); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixFadeInChannelTimed) -{ - dXSARGS; - if (items != 5) - Perl_croak(aTHX_ "Usage: SDL::MixFadeInChannelTimed(channel, chunk, loops, ms, ticks)"); - { - int channel = (int)SvIV(ST(0)); - Mix_Chunk * chunk = INT2PTR(Mix_Chunk *,SvIV(ST(1))); - int loops = (int)SvIV(ST(2)); - int ticks = (int)SvIV(ST(4)); - int ms = (int)SvIV(ST(3)); - int RETVAL; - dXSTARG; -#line 2048 "SDL_perl.xs" - RETVAL = Mix_FadeInChannelTimed(channel,chunk,loops,ms,ticks); -#line 3908 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixFadeInMusic); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixFadeInMusic) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::MixFadeInMusic(music, loops, ms)"); - { - Mix_Music * music = INT2PTR(Mix_Music *,SvIV(ST(0))); - int loops = (int)SvIV(ST(1)); - int ms = (int)SvIV(ST(2)); - int RETVAL; - dXSTARG; -#line 2058 "SDL_perl.xs" - RETVAL = Mix_FadeInMusic(music,loops,ms); -#line 3928 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixVolume); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixVolume) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::MixVolume(channel, volume)"); - { - int channel = (int)SvIV(ST(0)); - int volume = (int)SvIV(ST(1)); - int RETVAL; - dXSTARG; -#line 2067 "SDL_perl.xs" - RETVAL = Mix_Volume(channel,volume); -#line 3947 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixVolumeChunk); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixVolumeChunk) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::MixVolumeChunk(chunk, volume)"); - { - Mix_Chunk * chunk = INT2PTR(Mix_Chunk *,SvIV(ST(0))); - int volume = (int)SvIV(ST(1)); - int RETVAL; - dXSTARG; -#line 2076 "SDL_perl.xs" - RETVAL = Mix_VolumeChunk(chunk,volume); -#line 3966 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixVolumeMusic); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixVolumeMusic) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixVolumeMusic(volume)"); - { - int volume = (int)SvIV(ST(0)); - int RETVAL; - dXSTARG; -#line 2084 "SDL_perl.xs" - RETVAL = Mix_VolumeMusic(volume); -#line 3984 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixHaltChannel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixHaltChannel) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixHaltChannel(channel)"); - { - int channel = (int)SvIV(ST(0)); - int RETVAL; - dXSTARG; -#line 2092 "SDL_perl.xs" - RETVAL = Mix_HaltChannel(channel); -#line 4002 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixHaltGroup); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixHaltGroup) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixHaltGroup(tag)"); - { - int tag = (int)SvIV(ST(0)); - int RETVAL; - dXSTARG; -#line 2100 "SDL_perl.xs" - RETVAL = Mix_HaltGroup(tag); -#line 4020 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixHaltMusic); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixHaltMusic) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::MixHaltMusic()"); - { - int RETVAL; - dXSTARG; -#line 2107 "SDL_perl.xs" - RETVAL = Mix_HaltMusic(); -#line 4037 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixExpireChannel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixExpireChannel) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::MixExpireChannel(channel, ticks)"); - { - int channel = (int)SvIV(ST(0)); - int ticks = (int)SvIV(ST(1)); - int RETVAL; - dXSTARG; -#line 2116 "SDL_perl.xs" - RETVAL = Mix_ExpireChannel ( channel,ticks); -#line 4056 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixFadeOutChannel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixFadeOutChannel) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::MixFadeOutChannel(which, ms)"); - { - int which = (int)SvIV(ST(0)); - int ms = (int)SvIV(ST(1)); - int RETVAL; - dXSTARG; -#line 2125 "SDL_perl.xs" - RETVAL = Mix_FadeOutChannel(which,ms); -#line 4075 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixFadeOutGroup); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixFadeOutGroup) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::MixFadeOutGroup(which, ms)"); - { - int which = (int)SvIV(ST(0)); - int ms = (int)SvIV(ST(1)); - int RETVAL; - dXSTARG; -#line 2134 "SDL_perl.xs" - RETVAL = Mix_FadeOutGroup(which,ms); -#line 4094 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixFadeOutMusic); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixFadeOutMusic) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixFadeOutMusic(ms)"); - { - int ms = (int)SvIV(ST(0)); - int RETVAL; - dXSTARG; -#line 2142 "SDL_perl.xs" - RETVAL = Mix_FadeOutMusic(ms); -#line 4112 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixFadingMusic); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixFadingMusic) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::MixFadingMusic()"); - { - Mix_Fading RETVAL; - dXSTARG; -#line 2149 "SDL_perl.xs" - RETVAL = Mix_FadingMusic(); -#line 4129 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixFadingChannel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixFadingChannel) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixFadingChannel(which)"); - { - int which = (int)SvIV(ST(0)); - Mix_Fading RETVAL; - dXSTARG; -#line 2157 "SDL_perl.xs" - RETVAL = Mix_FadingChannel(which); -#line 4147 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixPause); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixPause) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixPause(channel)"); - { - int channel = (int)SvIV(ST(0)); -#line 2165 "SDL_perl.xs" - Mix_Pause(channel); -#line 4163 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_MixResume); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixResume) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixResume(channel)"); - { - int channel = (int)SvIV(ST(0)); -#line 2171 "SDL_perl.xs" - Mix_Resume(channel); -#line 4178 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_MixPaused); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixPaused) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixPaused(channel)"); - { - int channel = (int)SvIV(ST(0)); - int RETVAL; - dXSTARG; -#line 2177 "SDL_perl.xs" - RETVAL = Mix_Paused(channel); -#line 4195 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixPauseMusic); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixPauseMusic) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::MixPauseMusic()"); - { -#line 2184 "SDL_perl.xs" - Mix_PauseMusic(); -#line 4210 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_MixResumeMusic); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixResumeMusic) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::MixResumeMusic()"); - { -#line 2189 "SDL_perl.xs" - Mix_ResumeMusic(); -#line 4224 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_MixRewindMusic); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixRewindMusic) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::MixRewindMusic()"); - { -#line 2194 "SDL_perl.xs" - Mix_RewindMusic(); -#line 4238 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_MixPausedMusic); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixPausedMusic) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::MixPausedMusic()"); - { - int RETVAL; - dXSTARG; -#line 2199 "SDL_perl.xs" - RETVAL = Mix_PausedMusic(); -#line 4254 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixPlaying); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixPlaying) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::MixPlaying(channel)"); - { - int channel = (int)SvIV(ST(0)); - int RETVAL; - dXSTARG; -#line 2207 "SDL_perl.xs" - RETVAL = Mix_Playing(channel); -#line 4272 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixPlayingMusic); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixPlayingMusic) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::MixPlayingMusic()"); - { - int RETVAL; - dXSTARG; -#line 2214 "SDL_perl.xs" - RETVAL = Mix_PlayingMusic(); -#line 4289 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_MixCloseAudio); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_MixCloseAudio) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::MixCloseAudio()"); - { -#line 2222 "SDL_perl.xs" - Mix_CloseAudio(); -#line 4304 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -#endif -XS(XS_SDL_GLLoadLibrary); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GLLoadLibrary) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::GLLoadLibrary(path)"); - { - char * path = (char *)SvPV_nolen(ST(0)); - int RETVAL; - dXSTARG; -#line 2230 "SDL_perl.xs" - RETVAL = SDL_GL_LoadLibrary(path); -#line 4322 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GLGetProcAddress); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GLGetProcAddress) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::GLGetProcAddress(proc)"); - { - char * proc = (char *)SvPV_nolen(ST(0)); - void * RETVAL; - dXSTARG; -#line 2238 "SDL_perl.xs" - RETVAL = SDL_GL_GetProcAddress(proc); -#line 4340 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_GLSetAttribute); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GLSetAttribute) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::GLSetAttribute(attr, value)"); - { - int attr = (int)SvIV(ST(0)); - int value = (int)SvIV(ST(1)); - int RETVAL; - dXSTARG; -#line 2247 "SDL_perl.xs" - RETVAL = SDL_GL_SetAttribute(attr, value); -#line 4359 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GLGetAttribute); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GLGetAttribute) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::GLGetAttribute(attr)"); - { - int attr = (int)SvIV(ST(0)); - AV * RETVAL; -#line 2255 "SDL_perl.xs" - int value; - RETVAL = newAV(); - av_push(RETVAL,newSViv(SDL_GL_GetAttribute(attr, &value))); - av_push(RETVAL,newSViv(value)); -#line 4379 "SDL_perl.c" - ST(0) = newRV((SV*)RETVAL); - sv_2mortal(ST(0)); - } - XSRETURN(1); -} - -XS(XS_SDL_GLSwapBuffers); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GLSwapBuffers) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::GLSwapBuffers()"); - { -#line 2265 "SDL_perl.xs" - SDL_GL_SwapBuffers (); -#line 4395 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_BigEndian); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_BigEndian) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::BigEndian()"); - { - int RETVAL; - dXSTARG; -#line 2271 "SDL_perl.xs" - RETVAL = (SDL_BYTEORDER == SDL_BIG_ENDIAN); -#line 4411 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NumJoysticks); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NumJoysticks) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::NumJoysticks()"); - { - int RETVAL; - dXSTARG; -#line 2278 "SDL_perl.xs" - RETVAL = SDL_NumJoysticks(); -#line 4428 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoystickName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoystickName) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoystickName(index)"); - { - int index = (int)SvIV(ST(0)); - char * RETVAL; - dXSTARG; -#line 2286 "SDL_perl.xs" - RETVAL = (char*)SDL_JoystickName(index); -#line 4446 "SDL_perl.c" - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; - } - XSRETURN(1); -} - -XS(XS_SDL_JoystickOpen); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoystickOpen) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoystickOpen(index)"); - { - int index = (int)SvIV(ST(0)); - SDL_Joystick * RETVAL; - dXSTARG; -#line 2294 "SDL_perl.xs" - RETVAL = SDL_JoystickOpen(index); -#line 4464 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_JoystickOpened); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoystickOpened) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoystickOpened(index)"); - { - int index = (int)SvIV(ST(0)); - int RETVAL; - dXSTARG; -#line 2302 "SDL_perl.xs" - RETVAL = SDL_JoystickOpened(index); -#line 4482 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoystickIndex); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoystickIndex) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoystickIndex(joystick)"); - { - SDL_Joystick * joystick = INT2PTR(SDL_Joystick *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 2310 "SDL_perl.xs" - RETVAL = SDL_JoystickIndex(joystick); -#line 4500 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoystickNumAxes); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoystickNumAxes) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoystickNumAxes(joystick)"); - { - SDL_Joystick * joystick = INT2PTR(SDL_Joystick *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 2318 "SDL_perl.xs" - RETVAL = SDL_JoystickNumAxes(joystick); -#line 4518 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoystickNumBalls); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoystickNumBalls) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoystickNumBalls(joystick)"); - { - SDL_Joystick * joystick = INT2PTR(SDL_Joystick *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 2326 "SDL_perl.xs" - RETVAL = SDL_JoystickNumBalls(joystick); -#line 4536 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoystickNumHats); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoystickNumHats) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoystickNumHats(joystick)"); - { - SDL_Joystick * joystick = INT2PTR(SDL_Joystick *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 2334 "SDL_perl.xs" - RETVAL = SDL_JoystickNumHats(joystick); -#line 4554 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoystickNumButtons); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoystickNumButtons) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoystickNumButtons(joystick)"); - { - SDL_Joystick * joystick = INT2PTR(SDL_Joystick *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 2342 "SDL_perl.xs" - RETVAL = SDL_JoystickNumButtons(joystick); -#line 4572 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoystickUpdate); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoystickUpdate) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::JoystickUpdate()"); - { -#line 2349 "SDL_perl.xs" - SDL_JoystickUpdate(); -#line 4587 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_JoystickGetAxis); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoystickGetAxis) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::JoystickGetAxis(joystick, axis)"); - { - SDL_Joystick * joystick = INT2PTR(SDL_Joystick *,SvIV(ST(0))); - int axis = (int)SvIV(ST(1)); - Sint16 RETVAL; - dXSTARG; -#line 2356 "SDL_perl.xs" - RETVAL = SDL_JoystickGetAxis(joystick,axis); -#line 4605 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoystickGetHat); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoystickGetHat) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::JoystickGetHat(joystick, hat)"); - { - SDL_Joystick * joystick = INT2PTR(SDL_Joystick *,SvIV(ST(0))); - int hat = (int)SvIV(ST(1)); - Uint8 RETVAL; - dXSTARG; -#line 2365 "SDL_perl.xs" - RETVAL = SDL_JoystickGetHat(joystick,hat); -#line 4624 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoystickGetButton); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoystickGetButton) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::JoystickGetButton(joystick, button)"); - { - SDL_Joystick * joystick = INT2PTR(SDL_Joystick *,SvIV(ST(0))); - int button = (int)SvIV(ST(1)); - Uint8 RETVAL; - dXSTARG; -#line 2374 "SDL_perl.xs" - RETVAL = SDL_JoystickGetButton(joystick,button); -#line 4643 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoystickGetBall); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoystickGetBall) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::JoystickGetBall(joystick, ball)"); - { - SDL_Joystick * joystick = INT2PTR(SDL_Joystick *,SvIV(ST(0))); - int ball = (int)SvIV(ST(1)); - AV * RETVAL; -#line 2383 "SDL_perl.xs" - int success,dx,dy; - success = SDL_JoystickGetBall(joystick,ball,&dx,&dy); - RETVAL = newAV(); - av_push(RETVAL,newSViv(success)); - av_push(RETVAL,newSViv(dx)); - av_push(RETVAL,newSViv(dy)); -#line 4666 "SDL_perl.c" - ST(0) = newRV((SV*)RETVAL); - sv_2mortal(ST(0)); - } - XSRETURN(1); -} - -XS(XS_SDL_JoystickClose); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoystickClose) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoystickClose(joystick)"); - { - SDL_Joystick * joystick = INT2PTR(SDL_Joystick *,SvIV(ST(0))); -#line 2396 "SDL_perl.xs" - SDL_JoystickClose(joystick); -#line 4683 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_JoyAxisEventWhich); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoyAxisEventWhich) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoyAxisEventWhich(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Sint16 RETVAL; - dXSTARG; -#line 2402 "SDL_perl.xs" - RETVAL = e->jaxis.which; -#line 4700 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoyAxisEventAxis); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoyAxisEventAxis) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoyAxisEventAxis(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 2410 "SDL_perl.xs" - RETVAL = e->jaxis.axis; -#line 4718 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoyAxisEventValue); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoyAxisEventValue) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoyAxisEventValue(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 2418 "SDL_perl.xs" - RETVAL = e->jaxis.value; -#line 4736 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoyButtonEventWhich); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoyButtonEventWhich) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoyButtonEventWhich(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 2426 "SDL_perl.xs" - RETVAL = e->jbutton.which; -#line 4754 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoyButtonEventButton); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoyButtonEventButton) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoyButtonEventButton(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 2434 "SDL_perl.xs" - RETVAL = e->jbutton.button; -#line 4772 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoyButtonEventState); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoyButtonEventState) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoyButtonEventState(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 2442 "SDL_perl.xs" - RETVAL = e->jbutton.state; -#line 4790 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoyHatEventWhich); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoyHatEventWhich) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoyHatEventWhich(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 2450 "SDL_perl.xs" - RETVAL = e->jhat.which; -#line 4808 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoyHatEventHat); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoyHatEventHat) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoyHatEventHat(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 2458 "SDL_perl.xs" - RETVAL = e->jhat.hat; -#line 4826 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoyHatEventValue); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoyHatEventValue) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoyHatEventValue(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 2466 "SDL_perl.xs" - RETVAL = e->jhat.value; -#line 4844 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoyBallEventWhich); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoyBallEventWhich) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoyBallEventWhich(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 2474 "SDL_perl.xs" - RETVAL = e->jball.which; -#line 4862 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoyBallEventBall); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoyBallEventBall) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoyBallEventBall(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 2482 "SDL_perl.xs" - RETVAL = e->jball.ball; -#line 4880 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoyBallEventXrel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoyBallEventXrel) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoyBallEventXrel(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Sint16 RETVAL; - dXSTARG; -#line 2490 "SDL_perl.xs" - RETVAL = e->jball.xrel; -#line 4898 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_JoyBallEventYrel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_JoyBallEventYrel) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::JoyBallEventYrel(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - Sint16 RETVAL; - dXSTARG; -#line 2498 "SDL_perl.xs" - RETVAL = e->jball.yrel; -#line 4916 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SetClipRect); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SetClipRect) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::SetClipRect(surface, rect)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - SDL_Rect * rect = INT2PTR(SDL_Rect *,SvIV(ST(1))); -#line 2507 "SDL_perl.xs" - SDL_SetClipRect(surface,rect); -#line 4933 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_GetClipRect); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GetClipRect) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::GetClipRect(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - SDL_Rect * RETVAL; - dXSTARG; -#line 2513 "SDL_perl.xs" - RETVAL = (SDL_Rect*) safemalloc(sizeof(SDL_Rect)); - SDL_GetClipRect(surface,RETVAL); -#line 4951 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -#ifdef HAVE_SDL_NET -#define XSubPPtmpAAAC 1 - -XS(XS_SDL_NetInit); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetInit) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::NetInit()"); - { - int RETVAL; - dXSTARG; -#line 2524 "SDL_perl.xs" - RETVAL = SDLNet_Init(); -#line 4971 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NetQuit); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetQuit) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::NetQuit()"); - { -#line 2531 "SDL_perl.xs" - SDLNet_Quit(); -#line 4986 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_NetNewIPaddress); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetNewIPaddress) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::NetNewIPaddress(host, port)"); - { - Uint32 host = (Uint32)SvUV(ST(0)); - Uint16 port = (Uint16)SvUV(ST(1)); - IPaddress * RETVAL; - dXSTARG; -#line 2538 "SDL_perl.xs" - RETVAL = (IPaddress*) safemalloc(sizeof(IPaddress)); - RETVAL->host = host; - RETVAL->port = port; -#line 5006 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_NetIPaddressHost); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetIPaddressHost) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::NetIPaddressHost(ip)"); - { - IPaddress * ip = INT2PTR(IPaddress *,SvIV(ST(0))); - Uint32 RETVAL; - dXSTARG; -#line 2548 "SDL_perl.xs" - RETVAL = ip->host; -#line 5024 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NetIPaddressPort); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetIPaddressPort) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::NetIPaddressPort(ip)"); - { - IPaddress * ip = INT2PTR(IPaddress *,SvIV(ST(0))); - Uint16 RETVAL; - dXSTARG; -#line 2556 "SDL_perl.xs" - RETVAL = ip->port; -#line 5042 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NetFreeIPaddress); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetFreeIPaddress) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::NetFreeIPaddress(ip)"); - { - IPaddress * ip = INT2PTR(IPaddress *,SvIV(ST(0))); -#line 2564 "SDL_perl.xs" - safefree(ip); -#line 5058 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_NetResolveIP); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetResolveIP) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::NetResolveIP(address)"); - { - IPaddress * address = INT2PTR(IPaddress *,SvIV(ST(0))); - const char * RETVAL; - dXSTARG; -#line 2570 "SDL_perl.xs" - RETVAL = SDLNet_ResolveIP(address); -#line 5075 "SDL_perl.c" - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; - } - XSRETURN(1); -} - -XS(XS_SDL_NetResolveHost); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetResolveHost) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::NetResolveHost(address, host, port)"); - { - IPaddress * address = INT2PTR(IPaddress *,SvIV(ST(0))); - const char * host = (const char *)SvPV_nolen(ST(1)); - Uint16 port = (Uint16)SvUV(ST(2)); - int RETVAL; - dXSTARG; -#line 2580 "SDL_perl.xs" - RETVAL = SDLNet_ResolveHost(address,host,port); -#line 5095 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NetTCPOpen); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetTCPOpen) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::NetTCPOpen(ip)"); - { - IPaddress * ip = INT2PTR(IPaddress *,SvIV(ST(0))); - TCPsocket RETVAL; - dXSTARG; -#line 2588 "SDL_perl.xs" - RETVAL = SDLNet_TCP_Open(ip); -#line 5113 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_NetTCPAccept); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetTCPAccept) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::NetTCPAccept(server)"); - { - TCPsocket server = INT2PTR(TCPsocket,SvIV(ST(0))); - TCPsocket RETVAL; - dXSTARG; -#line 2596 "SDL_perl.xs" - RETVAL = SDLNet_TCP_Accept(server); -#line 5131 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_NetTCPGetPeerAddress); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetTCPGetPeerAddress) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::NetTCPGetPeerAddress(sock)"); - { - TCPsocket sock = INT2PTR(TCPsocket,SvIV(ST(0))); - IPaddress * RETVAL; - dXSTARG; -#line 2604 "SDL_perl.xs" - RETVAL = SDLNet_TCP_GetPeerAddress(sock); -#line 5149 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_NetTCPSend); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetTCPSend) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::NetTCPSend(sock, data, len)"); - { - TCPsocket sock = INT2PTR(TCPsocket,SvIV(ST(0))); - void * data = INT2PTR(void *,SvIV(ST(1))); - int len = (int)SvIV(ST(2)); - int RETVAL; - dXSTARG; -#line 2614 "SDL_perl.xs" - RETVAL = SDLNet_TCP_Send(sock,data,len); -#line 5169 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NetTCPRecv); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetTCPRecv) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::NetTCPRecv(sock, maxlen)"); - { - TCPsocket sock = INT2PTR(TCPsocket,SvIV(ST(0))); - int maxlen = (int)SvIV(ST(1)); - AV * RETVAL; -#line 2623 "SDL_perl.xs" - int status; - void *buffer; - buffer = safemalloc(maxlen); - RETVAL = newAV(); - status = SDLNet_TCP_Recv(sock,buffer,maxlen); - av_push(RETVAL,newSViv(status)); - av_push(RETVAL,newSVpvn((char*)buffer,maxlen)); -#line 5193 "SDL_perl.c" - ST(0) = newRV((SV*)RETVAL); - sv_2mortal(ST(0)); - } - XSRETURN(1); -} - -XS(XS_SDL_NetTCPClose); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetTCPClose) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::NetTCPClose(sock)"); - { - TCPsocket sock = INT2PTR(TCPsocket,SvIV(ST(0))); -#line 2637 "SDL_perl.xs" - SDLNet_TCP_Close(sock); -#line 5210 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_NetAllocPacket); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetAllocPacket) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::NetAllocPacket(size)"); - { - int size = (int)SvIV(ST(0)); - UDPpacket * RETVAL; - dXSTARG; -#line 2643 "SDL_perl.xs" - RETVAL = SDLNet_AllocPacket(size); -#line 5227 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_NetAllocPacketV); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetAllocPacketV) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::NetAllocPacketV(howmany, size)"); - { - int howmany = (int)SvIV(ST(0)); - int size = (int)SvIV(ST(1)); - UDPpacket ** RETVAL; - dXSTARG; -#line 2652 "SDL_perl.xs" - RETVAL = SDLNet_AllocPacketV(howmany,size); -#line 5246 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_NetResizePacket); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetResizePacket) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::NetResizePacket(packet, newsize)"); - { - UDPpacket * packet = INT2PTR(UDPpacket *,SvIV(ST(0))); - int newsize = (int)SvIV(ST(1)); - int RETVAL; - dXSTARG; -#line 2661 "SDL_perl.xs" - RETVAL = SDLNet_ResizePacket(packet,newsize); -#line 5265 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NetFreePacket); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetFreePacket) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::NetFreePacket(packet)"); - { - UDPpacket * packet = INT2PTR(UDPpacket *,SvIV(ST(0))); -#line 2669 "SDL_perl.xs" - SDLNet_FreePacket(packet); -#line 5281 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_NetFreePacketV); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetFreePacketV) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::NetFreePacketV(packet)"); - { - UDPpacket ** packet = INT2PTR(UDPpacket **,SvIV(ST(0))); -#line 2675 "SDL_perl.xs" - SDLNet_FreePacketV(packet); -#line 5296 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_NetUDPOpen); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetUDPOpen) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::NetUDPOpen(port)"); - { - Uint16 port = (Uint16)SvUV(ST(0)); - UDPsocket RETVAL; - dXSTARG; -#line 2681 "SDL_perl.xs" - RETVAL = SDLNet_UDP_Open(port); -#line 5313 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_NetUDPBind); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetUDPBind) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::NetUDPBind(sock, channel, address)"); - { - UDPsocket sock = INT2PTR(UDPsocket,SvIV(ST(0))); - int channel = (int)SvIV(ST(1)); - IPaddress * address = INT2PTR(IPaddress *,SvIV(ST(2))); - int RETVAL; - dXSTARG; -#line 2691 "SDL_perl.xs" - RETVAL = SDLNet_UDP_Bind(sock,channel,address); -#line 5333 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NetUDPUnbind); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetUDPUnbind) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::NetUDPUnbind(sock, channel)"); - { - UDPsocket sock = INT2PTR(UDPsocket,SvIV(ST(0))); - int channel = (int)SvIV(ST(1)); -#line 2700 "SDL_perl.xs" - SDLNet_UDP_Unbind(sock,channel); -#line 5350 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_NetUDPGetPeerAddress); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetUDPGetPeerAddress) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::NetUDPGetPeerAddress(sock, channel)"); - { - UDPsocket sock = INT2PTR(UDPsocket,SvIV(ST(0))); - int channel = (int)SvIV(ST(1)); - IPaddress * RETVAL; - dXSTARG; -#line 2707 "SDL_perl.xs" - RETVAL = SDLNet_UDP_GetPeerAddress(sock,channel); -#line 5368 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_NetUDPSendV); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetUDPSendV) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::NetUDPSendV(sock, packets, npackets)"); - { - UDPsocket sock = INT2PTR(UDPsocket,SvIV(ST(0))); - UDPpacket ** packets = INT2PTR(UDPpacket **,SvIV(ST(1))); - int npackets = (int)SvIV(ST(2)); - int RETVAL; - dXSTARG; -#line 2717 "SDL_perl.xs" - RETVAL = SDLNet_UDP_SendV(sock,packets,npackets); -#line 5388 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NetUDPSend); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetUDPSend) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::NetUDPSend(sock, channel, packet)"); - { - UDPsocket sock = INT2PTR(UDPsocket,SvIV(ST(0))); - int channel = (int)SvIV(ST(1)); - UDPpacket * packet = INT2PTR(UDPpacket *,SvIV(ST(2))); - int RETVAL; - dXSTARG; -#line 2727 "SDL_perl.xs" - RETVAL = SDLNet_UDP_Send(sock,channel,packet); -#line 5408 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NetUDPRecvV); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetUDPRecvV) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::NetUDPRecvV(sock, packets)"); - { - UDPsocket sock = INT2PTR(UDPsocket,SvIV(ST(0))); - UDPpacket ** packets = INT2PTR(UDPpacket **,SvIV(ST(1))); - int RETVAL; - dXSTARG; -#line 2736 "SDL_perl.xs" - RETVAL = SDLNet_UDP_RecvV(sock,packets); -#line 5427 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NetUDPRecv); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetUDPRecv) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::NetUDPRecv(sock, packet)"); - { - UDPsocket sock = INT2PTR(UDPsocket,SvIV(ST(0))); - UDPpacket * packet = INT2PTR(UDPpacket *,SvIV(ST(1))); - int RETVAL; - dXSTARG; -#line 2745 "SDL_perl.xs" - RETVAL = SDLNet_UDP_Recv(sock,packet); -#line 5446 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NetUDPClose); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetUDPClose) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::NetUDPClose(sock)"); - { - UDPsocket sock = INT2PTR(UDPsocket,SvIV(ST(0))); -#line 2753 "SDL_perl.xs" - SDLNet_UDP_Close(sock); -#line 5462 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_NetAllocSocketSet); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetAllocSocketSet) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::NetAllocSocketSet(maxsockets)"); - { - int maxsockets = (int)SvIV(ST(0)); - SDLNet_SocketSet RETVAL; - dXSTARG; -#line 2759 "SDL_perl.xs" - RETVAL = SDLNet_AllocSocketSet(maxsockets); -#line 5479 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_NetTCP_AddSocket); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetTCP_AddSocket) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::NetTCP_AddSocket(set, sock)"); - { - SDLNet_SocketSet set = INT2PTR(SDLNet_SocketSet,SvIV(ST(0))); - TCPsocket sock = INT2PTR(TCPsocket,SvIV(ST(1))); - int RETVAL; - dXSTARG; -#line 2768 "SDL_perl.xs" - RETVAL = SDLNet_TCP_AddSocket(set,sock); -#line 5498 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NetUDP_AddSocket); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetUDP_AddSocket) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::NetUDP_AddSocket(set, sock)"); - { - SDLNet_SocketSet set = INT2PTR(SDLNet_SocketSet,SvIV(ST(0))); - UDPsocket sock = INT2PTR(UDPsocket,SvIV(ST(1))); - int RETVAL; - dXSTARG; -#line 2777 "SDL_perl.xs" - RETVAL = SDLNet_UDP_AddSocket(set,sock); -#line 5517 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NetTCP_DelSocket); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetTCP_DelSocket) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::NetTCP_DelSocket(set, sock)"); - { - SDLNet_SocketSet set = INT2PTR(SDLNet_SocketSet,SvIV(ST(0))); - TCPsocket sock = INT2PTR(TCPsocket,SvIV(ST(1))); - int RETVAL; - dXSTARG; -#line 2786 "SDL_perl.xs" - RETVAL = SDLNet_TCP_DelSocket(set,sock); -#line 5536 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NetUDP_DelSocket); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetUDP_DelSocket) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::NetUDP_DelSocket(set, sock)"); - { - SDLNet_SocketSet set = INT2PTR(SDLNet_SocketSet,SvIV(ST(0))); - UDPsocket sock = INT2PTR(UDPsocket,SvIV(ST(1))); - int RETVAL; - dXSTARG; -#line 2795 "SDL_perl.xs" - RETVAL = SDLNet_UDP_DelSocket(set,sock); -#line 5555 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NetCheckSockets); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetCheckSockets) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::NetCheckSockets(set, timeout)"); - { - SDLNet_SocketSet set = INT2PTR(SDLNet_SocketSet,SvIV(ST(0))); - Uint32 timeout = (Uint32)SvUV(ST(1)); - int RETVAL; - dXSTARG; -#line 2804 "SDL_perl.xs" - RETVAL = SDLNet_CheckSockets(set,timeout); -#line 5574 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NetSocketReady); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetSocketReady) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::NetSocketReady(sock)"); - { - SDLNet_GenericSocket sock = INT2PTR(SDLNet_GenericSocket,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 2812 "SDL_perl.xs" - RETVAL = SDLNet_SocketReady(sock); -#line 5592 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NetFreeSocketSet); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetFreeSocketSet) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::NetFreeSocketSet(set)"); - { - SDLNet_SocketSet set = INT2PTR(SDLNet_SocketSet,SvIV(ST(0))); -#line 2820 "SDL_perl.xs" - SDLNet_FreeSocketSet(set); -#line 5608 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_NetWrite16); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetWrite16) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::NetWrite16(value, area)"); - { - Uint16 value = (Uint16)SvUV(ST(0)); - void * area = INT2PTR(void *,SvIV(ST(1))); -#line 2827 "SDL_perl.xs" - SDLNet_Write16(value,area); -#line 5624 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_NetWrite32); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetWrite32) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::NetWrite32(value, area)"); - { - Uint32 value = (Uint32)SvUV(ST(0)); - void * area = INT2PTR(void *,SvIV(ST(1))); -#line 2834 "SDL_perl.xs" - SDLNet_Write32(value,area); -#line 5640 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_NetRead16); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetRead16) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::NetRead16(area)"); - { - void * area = INT2PTR(void *,SvIV(ST(0))); - Uint16 RETVAL; - dXSTARG; -#line 2840 "SDL_perl.xs" - RETVAL = SDLNet_Read16(area); -#line 5657 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_NetRead32); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NetRead32) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::NetRead32(area)"); - { - void * area = INT2PTR(void *,SvIV(ST(0))); - Uint32 RETVAL; - dXSTARG; -#line 2848 "SDL_perl.xs" - RETVAL = SDLNet_Read32(area); -#line 5675 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -#endif -#ifdef HAVE_SDL_TTF -#define XSubPPtmpAAAD 1 - -XS(XS_SDL_TTFInit); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFInit) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::TTFInit()"); - { - int RETVAL; - dXSTARG; -#line 2859 "SDL_perl.xs" - RETVAL = TTF_Init(); -#line 5696 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFQuit); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFQuit) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::TTFQuit()"); - { -#line 2866 "SDL_perl.xs" - TTF_Quit(); -#line 5711 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_TTFOpenFont); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFOpenFont) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::TTFOpenFont(file, ptsize)"); - { - char * file = (char *)SvPV_nolen(ST(0)); - int ptsize = (int)SvIV(ST(1)); - TTF_Font * RETVAL; - dXSTARG; -#line 2873 "SDL_perl.xs" - RETVAL = TTF_OpenFont(file,ptsize); -#line 5729 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFGetFontStyle); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFGetFontStyle) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::TTFGetFontStyle(font)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 2881 "SDL_perl.xs" - RETVAL = TTF_GetFontStyle(font); -#line 5747 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFSetFontStyle); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFSetFontStyle) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::TTFSetFontStyle(font, style)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - int style = (int)SvIV(ST(1)); -#line 2890 "SDL_perl.xs" - TTF_SetFontStyle(font,style); -#line 5764 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_TTFFontHeight); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFFontHeight) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::TTFFontHeight(font)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 2896 "SDL_perl.xs" - RETVAL = TTF_FontHeight(font); -#line 5781 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFFontAscent); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFFontAscent) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::TTFFontAscent(font)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 2904 "SDL_perl.xs" - RETVAL = TTF_FontAscent(font); -#line 5799 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFFontDescent); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFFontDescent) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::TTFFontDescent(font)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 2912 "SDL_perl.xs" - RETVAL = TTF_FontDescent(font); -#line 5817 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFFontLineSkip); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFFontLineSkip) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::TTFFontLineSkip(font)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 2920 "SDL_perl.xs" - RETVAL = TTF_FontLineSkip(font); -#line 5835 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFGlyphMetrics); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFGlyphMetrics) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::TTFGlyphMetrics(font, ch)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - Uint16 ch = (Uint16)SvUV(ST(1)); - AV * RETVAL; -#line 2929 "SDL_perl.xs" - int minx, miny, maxx, maxy, advance; - RETVAL = newAV(); - TTF_GlyphMetrics(font, ch, &minx, &miny, &maxx, &maxy, &advance); - av_push(RETVAL,newSViv(minx)); - av_push(RETVAL,newSViv(miny)); - av_push(RETVAL,newSViv(maxx)); - av_push(RETVAL,newSViv(maxy)); - av_push(RETVAL,newSViv(advance)); -#line 5860 "SDL_perl.c" - ST(0) = newRV((SV*)RETVAL); - sv_2mortal(ST(0)); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFSizeText); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFSizeText) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::TTFSizeText(font, text)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - char * text = (char *)SvPV_nolen(ST(1)); - AV * RETVAL; -#line 2945 "SDL_perl.xs" - int w,h; - RETVAL = newAV(); - TTF_SizeText(font,text,&w,&h); - av_push(RETVAL,newSViv(w)); - av_push(RETVAL,newSViv(h)); -#line 5883 "SDL_perl.c" - ST(0) = newRV((SV*)RETVAL); - sv_2mortal(ST(0)); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFSizeUTF8); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFSizeUTF8) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::TTFSizeUTF8(font, text)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - char * text = (char *)SvPV_nolen(ST(1)); - AV * RETVAL; -#line 2958 "SDL_perl.xs" - int w,h; - RETVAL = newAV(); - TTF_SizeUTF8(font,text,&w,&h); - av_push(RETVAL,newSViv(w)); - av_push(RETVAL,newSViv(h)); -#line 5906 "SDL_perl.c" - ST(0) = newRV((SV*)RETVAL); - sv_2mortal(ST(0)); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFSizeUNICODE); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFSizeUNICODE) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::TTFSizeUNICODE(font, text)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - const Uint16 * text = INT2PTR(const Uint16 *,SvIV(ST(1))); - AV * RETVAL; -#line 2971 "SDL_perl.xs" - int w,h; - RETVAL = newAV(); - TTF_SizeUNICODE(font,text,&w,&h); - av_push(RETVAL,newSViv(w)); - av_push(RETVAL,newSViv(h)); -#line 5929 "SDL_perl.c" - ST(0) = newRV((SV*)RETVAL); - sv_2mortal(ST(0)); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFRenderTextSolid); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFRenderTextSolid) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::TTFRenderTextSolid(font, text, fg)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - char * text = (char *)SvPV_nolen(ST(1)); - SDL_Color * fg = INT2PTR(SDL_Color *,SvIV(ST(2))); - SDL_Surface * RETVAL; - dXSTARG; -#line 2985 "SDL_perl.xs" - RETVAL = TTF_RenderText_Solid(font,text,*fg); -#line 5950 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFRenderUTF8Solid); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFRenderUTF8Solid) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::TTFRenderUTF8Solid(font, text, fg)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - char * text = (char *)SvPV_nolen(ST(1)); - SDL_Color * fg = INT2PTR(SDL_Color *,SvIV(ST(2))); - SDL_Surface * RETVAL; - dXSTARG; -#line 2995 "SDL_perl.xs" - RETVAL = TTF_RenderUTF8_Solid(font,text,*fg); -#line 5970 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFRenderUNICODESolid); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFRenderUNICODESolid) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::TTFRenderUNICODESolid(font, text, fg)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - const Uint16 * text = INT2PTR(const Uint16 *,SvIV(ST(1))); - SDL_Color * fg = INT2PTR(SDL_Color *,SvIV(ST(2))); - SDL_Surface * RETVAL; - dXSTARG; -#line 3005 "SDL_perl.xs" - RETVAL = TTF_RenderUNICODE_Solid(font,text,*fg); -#line 5990 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFRenderGlyphSolid); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFRenderGlyphSolid) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::TTFRenderGlyphSolid(font, ch, fg)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - Uint16 ch = (Uint16)SvUV(ST(1)); - SDL_Color * fg = INT2PTR(SDL_Color *,SvIV(ST(2))); - SDL_Surface * RETVAL; - dXSTARG; -#line 3015 "SDL_perl.xs" - RETVAL = TTF_RenderGlyph_Solid(font,ch,*fg); -#line 6010 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFRenderTextShaded); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFRenderTextShaded) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::TTFRenderTextShaded(font, text, fg, bg)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - char * text = (char *)SvPV_nolen(ST(1)); - SDL_Color * fg = INT2PTR(SDL_Color *,SvIV(ST(2))); - SDL_Color * bg = INT2PTR(SDL_Color *,SvIV(ST(3))); - SDL_Surface * RETVAL; - dXSTARG; -#line 3026 "SDL_perl.xs" - RETVAL = TTF_RenderText_Shaded(font,text,*fg,*bg); -#line 6031 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFRenderUTF8Shaded); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFRenderUTF8Shaded) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::TTFRenderUTF8Shaded(font, text, fg, bg)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - char * text = (char *)SvPV_nolen(ST(1)); - SDL_Color * fg = INT2PTR(SDL_Color *,SvIV(ST(2))); - SDL_Color * bg = INT2PTR(SDL_Color *,SvIV(ST(3))); - SDL_Surface * RETVAL; - dXSTARG; -#line 3037 "SDL_perl.xs" - RETVAL = TTF_RenderUTF8_Shaded(font,text,*fg,*bg); -#line 6052 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFRenderUNICODEShaded); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFRenderUNICODEShaded) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::TTFRenderUNICODEShaded(font, text, fg, bg)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - const Uint16 * text = INT2PTR(const Uint16 *,SvIV(ST(1))); - SDL_Color * fg = INT2PTR(SDL_Color *,SvIV(ST(2))); - SDL_Color * bg = INT2PTR(SDL_Color *,SvIV(ST(3))); - SDL_Surface * RETVAL; - dXSTARG; -#line 3048 "SDL_perl.xs" - RETVAL = TTF_RenderUNICODE_Shaded(font,text,*fg,*bg); -#line 6073 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFRenderGlyphShaded); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFRenderGlyphShaded) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::TTFRenderGlyphShaded(font, ch, fg, bg)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - Uint16 ch = (Uint16)SvUV(ST(1)); - SDL_Color * fg = INT2PTR(SDL_Color *,SvIV(ST(2))); - SDL_Color * bg = INT2PTR(SDL_Color *,SvIV(ST(3))); - SDL_Surface * RETVAL; - dXSTARG; -#line 3059 "SDL_perl.xs" - RETVAL = TTF_RenderGlyph_Shaded(font,ch,*fg,*bg); -#line 6094 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFRenderTextBlended); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFRenderTextBlended) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::TTFRenderTextBlended(font, text, fg)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - char * text = (char *)SvPV_nolen(ST(1)); - SDL_Color * fg = INT2PTR(SDL_Color *,SvIV(ST(2))); - SDL_Surface * RETVAL; - dXSTARG; -#line 3069 "SDL_perl.xs" - RETVAL = TTF_RenderText_Blended(font,text,*fg); -#line 6114 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFRenderUTF8Blended); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFRenderUTF8Blended) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::TTFRenderUTF8Blended(font, text, fg)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - char * text = (char *)SvPV_nolen(ST(1)); - SDL_Color * fg = INT2PTR(SDL_Color *,SvIV(ST(2))); - SDL_Surface * RETVAL; - dXSTARG; -#line 3079 "SDL_perl.xs" - RETVAL = TTF_RenderUTF8_Blended(font,text,*fg); -#line 6134 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFRenderUNICODEBlended); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFRenderUNICODEBlended) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::TTFRenderUNICODEBlended(font, text, fg)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - const Uint16 * text = INT2PTR(const Uint16 *,SvIV(ST(1))); - SDL_Color * fg = INT2PTR(SDL_Color *,SvIV(ST(2))); - SDL_Surface * RETVAL; - dXSTARG; -#line 3089 "SDL_perl.xs" - RETVAL = TTF_RenderUNICODE_Blended(font,text,*fg); -#line 6154 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFRenderGlyphBlended); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFRenderGlyphBlended) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::TTFRenderGlyphBlended(font, ch, fg)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - Uint16 ch = (Uint16)SvUV(ST(1)); - SDL_Color * fg = INT2PTR(SDL_Color *,SvIV(ST(2))); - SDL_Surface * RETVAL; - dXSTARG; -#line 3099 "SDL_perl.xs" - RETVAL = TTF_RenderGlyph_Blended(font,ch,*fg); -#line 6174 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_TTFCloseFont); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFCloseFont) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::TTFCloseFont(font)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); -#line 3107 "SDL_perl.xs" - TTF_CloseFont(font); -#line 6190 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_TTFPutString); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_TTFPutString) -{ - dXSARGS; - if (items != 8) - Perl_croak(aTHX_ "Usage: SDL::TTFPutString(font, mode, surface, x, y, fg, bg, text)"); - { - TTF_Font * font = INT2PTR(TTF_Font *,SvIV(ST(0))); - int mode = (int)SvIV(ST(1)); - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(2))); - int x = (int)SvIV(ST(3)); - int y = (int)SvIV(ST(4)); - SDL_Color * fg = INT2PTR(SDL_Color *,SvIV(ST(5))); - SDL_Color * bg = INT2PTR(SDL_Color *,SvIV(ST(6))); - char * text = (char *)SvPV_nolen(ST(7)); - SDL_Surface * RETVAL; - dXSTARG; -#line 3120 "SDL_perl.xs" - SDL_Surface *img; - SDL_Rect dest; - int w,h; - dest.x = x; - dest.y = y; - RETVAL = NULL; - switch (mode) { - case TEXT_SOLID: - img = TTF_RenderText_Solid(font,text,*fg); - TTF_SizeText(font,text,&w,&h); - dest.w = w; - dest.h = h; - break; - case TEXT_SHADED: - img = TTF_RenderText_Shaded(font,text,*fg,*bg); - TTF_SizeText(font,text,&w,&h); - dest.w = w; - dest.h = h; - break; - case TEXT_BLENDED: - img = TTF_RenderText_Blended(font,text,*fg); - TTF_SizeText(font,text,&w,&h); - dest.w = w; - dest.h = h; - break; - case UTF8_SOLID: - img = TTF_RenderUTF8_Solid(font,text,*fg); - TTF_SizeUTF8(font,text,&w,&h); - dest.w = w; - dest.h = h; - break; - case UTF8_SHADED: - img = TTF_RenderUTF8_Shaded(font,text,*fg,*bg); - TTF_SizeUTF8(font,text,&w,&h); - dest.w = w; - dest.h = h; - break; - case UTF8_BLENDED: - img = TTF_RenderUTF8_Blended(font,text,*fg); - TTF_SizeUTF8(font,text,&w,&h); - dest.w = w; - dest.h = h; - break; - case UNICODE_SOLID: - img = TTF_RenderUNICODE_Solid(font,(Uint16*)text,*fg); - TTF_SizeUNICODE(font,(Uint16*)text,&w,&h); - dest.w = w; - dest.h = h; - break; - case UNICODE_SHADED: - img = TTF_RenderUNICODE_Shaded(font,(Uint16*)text,*fg,*bg); - TTF_SizeUNICODE(font,(Uint16*)text,&w,&h); - dest.w = w; - dest.h = h; - break; - case UNICODE_BLENDED: - img = TTF_RenderUNICODE_Blended(font,(Uint16*)text,*fg); - TTF_SizeUNICODE(font,(Uint16*)text,&w,&h); - dest.w = w; - dest.h = h; - break; - default: - img = TTF_RenderText_Shaded(font,text,*fg,*bg); - TTF_SizeText(font,text,&w,&h); - dest.w = w; - dest.h = h; - } - if ( img && img->format && img->format->palette ) { - SDL_Color *c = &img->format->palette->colors[0]; - Uint32 key = SDL_MapRGB( img->format, c->r, c->g, c->b ); - SDL_SetColorKey(img,SDL_SRCCOLORKEY,key ); - if (0 > SDL_BlitSurface(img,NULL,surface,&dest)) { - SDL_FreeSurface(img); - RETVAL = NULL; - } else { - RETVAL = img; - } - } -#line 6291 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -#endif -XS(XS_SDL_CreateYUVOverlay); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_CreateYUVOverlay) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::CreateYUVOverlay(width, height, format, display)"); - { - int width = (int)SvIV(ST(0)); - int height = (int)SvIV(ST(1)); - Uint32 format = (Uint32)SvUV(ST(2)); - SDL_Surface * display = INT2PTR(SDL_Surface *,SvIV(ST(3))); - SDL_Overlay * RETVAL; - dXSTARG; -#line 3210 "SDL_perl.xs" - RETVAL = SDL_CreateYUVOverlay ( width, height, format, display ); -#line 6313 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_LockYUVOverlay); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_LockYUVOverlay) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::LockYUVOverlay(overlay)"); - { - SDL_Overlay * overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 3218 "SDL_perl.xs" - RETVAL = SDL_LockYUVOverlay(overlay); -#line 6331 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_UnlockYUVOverlay); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_UnlockYUVOverlay) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::UnlockYUVOverlay(overlay)"); - { - SDL_Overlay * overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0))); -#line 3226 "SDL_perl.xs" - SDL_UnlockYUVOverlay(overlay); -#line 6347 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_DisplayYUVOverlay); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_DisplayYUVOverlay) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::DisplayYUVOverlay(overlay, dstrect)"); - { - SDL_Overlay * overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0))); - SDL_Rect * dstrect = INT2PTR(SDL_Rect *,SvIV(ST(1))); - int RETVAL; - dXSTARG; -#line 3233 "SDL_perl.xs" - RETVAL = SDL_DisplayYUVOverlay ( overlay, dstrect ); -#line 6365 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_FreeYUVOverlay); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_FreeYUVOverlay) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::FreeYUVOverlay(overlay)"); - { - SDL_Overlay * overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0))); -#line 3241 "SDL_perl.xs" - SDL_FreeYUVOverlay ( overlay ); -#line 6381 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_OverlayFormat); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_OverlayFormat) -{ - dXSARGS; - if (items < 1) - Perl_croak(aTHX_ "Usage: SDL::OverlayFormat(overlay, ...)"); - { - SDL_Overlay * overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0))); - Uint32 RETVAL; - dXSTARG; -#line 3247 "SDL_perl.xs" - if ( items > 1 ) - overlay->format = SvIV(ST(1)); - RETVAL = overlay->format; -#line 6400 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_OverlayW); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_OverlayW) -{ - dXSARGS; - if (items < 1) - Perl_croak(aTHX_ "Usage: SDL::OverlayW(overlay, ...)"); - { - SDL_Overlay * overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 3257 "SDL_perl.xs" - if ( items > 1 ) - overlay->w = SvIV(ST(1)); - RETVAL = overlay->w; -#line 6420 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_OverlayH); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_OverlayH) -{ - dXSARGS; - if (items < 1) - Perl_croak(aTHX_ "Usage: SDL::OverlayH(overlay, ...)"); - { - SDL_Overlay * overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 3267 "SDL_perl.xs" - if ( items > 1 ) - overlay->h = SvIV(ST(1)); - RETVAL = overlay->h; -#line 6440 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_OverlayPlanes); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_OverlayPlanes) -{ - dXSARGS; - if (items < 1) - Perl_croak(aTHX_ "Usage: SDL::OverlayPlanes(overlay, ...)"); - { - SDL_Overlay * overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 3277 "SDL_perl.xs" - if ( items > 1 ) - overlay->planes = SvIV(ST(1)); - RETVAL = overlay->planes; -#line 6460 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_OverlayHW); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_OverlayHW) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::OverlayHW(overlay)"); - { - SDL_Overlay * overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0))); - Uint32 RETVAL; - dXSTARG; -#line 3287 "SDL_perl.xs" - RETVAL = overlay->hw_overlay; -#line 6478 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_OverlayPitches); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_OverlayPitches) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::OverlayPitches(overlay)"); - { - SDL_Overlay * overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0))); - Uint16 * RETVAL; - dXSTARG; -#line 3295 "SDL_perl.xs" - RETVAL = overlay->pitches; -#line 6496 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_OverlayPixels); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_OverlayPixels) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::OverlayPixels(overlay)"); - { - SDL_Overlay * overlay = INT2PTR(SDL_Overlay *,SvIV(ST(0))); - Uint8 ** RETVAL; - dXSTARG; -#line 3303 "SDL_perl.xs" - RETVAL = overlay->pixels; -#line 6514 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_WMToggleFullScreen); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_WMToggleFullScreen) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::WMToggleFullScreen(surface)"); - { - SDL_Surface * surface = INT2PTR(SDL_Surface *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 3311 "SDL_perl.xs" - RETVAL = SDL_WM_ToggleFullScreen(surface); -#line 6532 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_WMGrabInput); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_WMGrabInput) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::WMGrabInput(mode)"); - { - Uint32 mode = (Uint32)SvUV(ST(0)); - Uint32 RETVAL; - dXSTARG; -#line 3319 "SDL_perl.xs" - RETVAL = SDL_WM_GrabInput(mode); -#line 6550 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_WMIconifyWindow); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_WMIconifyWindow) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::WMIconifyWindow()"); - { - int RETVAL; - dXSTARG; -#line 3326 "SDL_perl.xs" - RETVAL = SDL_WM_IconifyWindow(); -#line 6567 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_ResizeEventW); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_ResizeEventW) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::ResizeEventW(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 3334 "SDL_perl.xs" - RETVAL = e->resize.w; -#line 6585 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_ResizeEventH); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_ResizeEventH) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::ResizeEventH(e)"); - { - SDL_Event * e = INT2PTR(SDL_Event *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 3342 "SDL_perl.xs" - RETVAL = e->resize.h; -#line 6603 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_AudioDriverName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_AudioDriverName) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::AudioDriverName()"); - { - char * RETVAL; - dXSTARG; -#line 3349 "SDL_perl.xs" - char name[32]; - RETVAL = SDL_AudioDriverName(name,32); -#line 6621 "SDL_perl.c" - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; - } - XSRETURN(1); -} - -XS(XS_SDL_GetKeyState); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GetKeyState) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::GetKeyState(k)"); - { - SDLKey k = (SDLKey)SvUV(ST(0)); - Uint32 RETVAL; - dXSTARG; -#line 3358 "SDL_perl.xs" - if (k >= SDLK_LAST) Perl_croak (aTHX_ "Key out of range"); - RETVAL = SDL_GetKeyState(NULL)[k]; -#line 6640 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -#ifdef HAVE_SMPEG -#define XSubPPtmpAAAE 1 - -XS(XS_SDL_NewSMPEGInfo); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NewSMPEGInfo) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::NewSMPEGInfo()"); - { - SMPEG_Info * RETVAL; - dXSTARG; -#line 3368 "SDL_perl.xs" - RETVAL = (SMPEG_Info *) safemalloc (sizeof(SMPEG_Info)); -#line 6660 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_FreeSMPEGInfo); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_FreeSMPEGInfo) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::FreeSMPEGInfo(info)"); - { - SMPEG_Info * info = INT2PTR(SMPEG_Info *,SvIV(ST(0))); -#line 3376 "SDL_perl.xs" - safefree(info); -#line 6676 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SMPEGInfoHasAudio); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGInfoHasAudio) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoHasAudio(info)"); - { - SMPEG_Info* info = INT2PTR(SMPEG_Info *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 3382 "SDL_perl.xs" - RETVAL = info->has_audio; -#line 6693 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SMPEGInfoHasVideo); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGInfoHasVideo) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoHasVideo(info)"); - { - SMPEG_Info* info = INT2PTR(SMPEG_Info *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 3390 "SDL_perl.xs" - RETVAL = info->has_video; -#line 6711 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SMPEGInfoWidth); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGInfoWidth) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoWidth(info)"); - { - SMPEG_Info* info = INT2PTR(SMPEG_Info *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 3398 "SDL_perl.xs" - RETVAL = info->width; -#line 6729 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SMPEGInfoHeight); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGInfoHeight) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoHeight(info)"); - { - SMPEG_Info* info = INT2PTR(SMPEG_Info *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 3406 "SDL_perl.xs" - RETVAL = info->height; -#line 6747 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SMPEGInfoCurrentFrame); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGInfoCurrentFrame) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoCurrentFrame(info)"); - { - SMPEG_Info* info = INT2PTR(SMPEG_Info *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 3414 "SDL_perl.xs" - RETVAL = info->current_frame; -#line 6765 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SMPEGInfoCurrentFPS); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGInfoCurrentFPS) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoCurrentFPS(info)"); - { - SMPEG_Info* info = INT2PTR(SMPEG_Info *,SvIV(ST(0))); - double RETVAL; - dXSTARG; -#line 3422 "SDL_perl.xs" - RETVAL = info->current_fps; -#line 6783 "SDL_perl.c" - XSprePUSH; PUSHn((double)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SMPEGInfoCurrentAudioFrame); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGInfoCurrentAudioFrame) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoCurrentAudioFrame(info)"); - { - SMPEG_Info* info = INT2PTR(SMPEG_Info *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 3430 "SDL_perl.xs" - RETVAL = info->audio_current_frame; -#line 6801 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SMPEGInfoCurrentOffset); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGInfoCurrentOffset) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoCurrentOffset(info)"); - { - SMPEG_Info* info = INT2PTR(SMPEG_Info *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 3438 "SDL_perl.xs" - RETVAL = info->current_offset; -#line 6819 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SMPEGInfoTotalSize); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGInfoTotalSize) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoTotalSize(info)"); - { - SMPEG_Info* info = INT2PTR(SMPEG_Info *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 3446 "SDL_perl.xs" - RETVAL = info->total_size; -#line 6837 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SMPEGInfoCurrentTime); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGInfoCurrentTime) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoCurrentTime(info)"); - { - SMPEG_Info* info = INT2PTR(SMPEG_Info *,SvIV(ST(0))); - double RETVAL; - dXSTARG; -#line 3454 "SDL_perl.xs" - RETVAL = info->current_time; -#line 6855 "SDL_perl.c" - XSprePUSH; PUSHn((double)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SMPEGInfoTotalTime); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGInfoTotalTime) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SMPEGInfoTotalTime(info)"); - { - SMPEG_Info* info = INT2PTR(SMPEG_Info *,SvIV(ST(0))); - double RETVAL; - dXSTARG; -#line 3462 "SDL_perl.xs" - RETVAL = info->total_time; -#line 6873 "SDL_perl.c" - XSprePUSH; PUSHn((double)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SMPEGError); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGError) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SMPEGError(mpeg)"); - { - SMPEG* mpeg = INT2PTR(SMPEG *,SvIV(ST(0))); - char * RETVAL; - dXSTARG; -#line 3470 "SDL_perl.xs" - RETVAL = SMPEG_error(mpeg); -#line 6891 "SDL_perl.c" - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; - } - XSRETURN(1); -} - -XS(XS_SDL_NewSMPEG); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_NewSMPEG) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::NewSMPEG(filename, info, use_audio)"); - { - char* filename = (char *)SvPV_nolen(ST(0)); - SMPEG_Info* info = INT2PTR(SMPEG_Info *,SvIV(ST(1))); - int use_audio = (int)SvIV(ST(2)); - SMPEG * RETVAL; - dXSTARG; -#line 3480 "SDL_perl.xs" -#ifdef HAVE_SDL_MIXER - RETVAL = SMPEG_new(filename,info,0); -#else - RETVAL = SMPEG_new(filename,info,use_audio); -#endif -#line 6915 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_FreeSMPEG); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_FreeSMPEG) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::FreeSMPEG(mpeg)"); - { - SMPEG* mpeg = INT2PTR(SMPEG *,SvIV(ST(0))); -#line 3492 "SDL_perl.xs" - SMPEG_delete(mpeg); -#line 6931 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SMPEGEnableAudio); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGEnableAudio) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::SMPEGEnableAudio(mpeg, flag)"); - { - SMPEG* mpeg = INT2PTR(SMPEG *,SvIV(ST(0))); - int flag = (int)SvIV(ST(1)); -#line 3499 "SDL_perl.xs" - SMPEG_enableaudio(mpeg,flag); -#ifdef HAVE_SDL_MIXER - sdl_perl_use_smpeg_audio = flag; -#endif -#line 6950 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SMPEGEnableVideo); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGEnableVideo) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::SMPEGEnableVideo(mpeg, flag)"); - { - SMPEG* mpeg = INT2PTR(SMPEG *,SvIV(ST(0))); - int flag = (int)SvIV(ST(1)); -#line 3509 "SDL_perl.xs" - SMPEG_enablevideo(mpeg,flag); -#line 6966 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SMPEGSetVolume); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGSetVolume) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::SMPEGSetVolume(mpeg, volume)"); - { - SMPEG* mpeg = INT2PTR(SMPEG *,SvIV(ST(0))); - int volume = (int)SvIV(ST(1)); -#line 3516 "SDL_perl.xs" - SMPEG_setvolume(mpeg,volume); -#line 6982 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SMPEGSetDisplay); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGSetDisplay) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::SMPEGSetDisplay(mpeg, dest, surfLock)"); - { - SMPEG* mpeg = INT2PTR(SMPEG *,SvIV(ST(0))); - SDL_Surface* dest = INT2PTR(SDL_Surface *,SvIV(ST(1))); - SDL_mutex* surfLock = INT2PTR(SDL_mutex *,SvIV(ST(2))); -#line 3524 "SDL_perl.xs" - SMPEG_setdisplay(mpeg,dest,surfLock,NULL); -#line 6999 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SMPEGScaleXY); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGScaleXY) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::SMPEGScaleXY(mpeg, w, h)"); - { - SMPEG* mpeg = INT2PTR(SMPEG *,SvIV(ST(0))); - int w = (int)SvIV(ST(1)); - int h = (int)SvIV(ST(2)); -#line 3532 "SDL_perl.xs" - SMPEG_scaleXY(mpeg,w,h); -#line 7016 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SMPEGScale); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGScale) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::SMPEGScale(mpeg, scale)"); - { - SMPEG* mpeg = INT2PTR(SMPEG *,SvIV(ST(0))); - int scale = (int)SvIV(ST(1)); -#line 3539 "SDL_perl.xs" - SMPEG_scale(mpeg,scale); -#line 7032 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SMPEGPlay); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGPlay) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SMPEGPlay(mpeg)"); - { - SMPEG* mpeg = INT2PTR(SMPEG *,SvIV(ST(0))); -#line 3545 "SDL_perl.xs" - SDL_AudioSpec audiofmt; - Uint16 format; - int freq, channels; -#ifdef HAVE_SDL_MIXER - if (sdl_perl_use_smpeg_audio ) { - SMPEG_enableaudio(mpeg, 0); - Mix_QuerySpec(&freq, &format, &channels); - audiofmt.format = format; - audiofmt.freq = freq; - audiofmt.channels = channels; - SMPEG_actualSpec(mpeg, &audiofmt); - Mix_HookMusic(SMPEG_playAudioSDL, mpeg); - SMPEG_enableaudio(mpeg, 1); - } -#endif - SMPEG_play(mpeg); -#line 7062 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SMPEGStatus); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGStatus) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SMPEGStatus(mpeg)"); - { - SMPEG* mpeg = INT2PTR(SMPEG *,SvIV(ST(0))); - SMPEGstatus RETVAL; - dXSTARG; -#line 3566 "SDL_perl.xs" - RETVAL = SMPEG_status(mpeg); -#line 7079 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SMPEGPause); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGPause) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SMPEGPause(mpeg)"); - { - SMPEG* mpeg = INT2PTR(SMPEG *,SvIV(ST(0))); -#line 3574 "SDL_perl.xs" - SMPEG_pause(mpeg); -#line 7095 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SMPEGLoop); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGLoop) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::SMPEGLoop(mpeg, repeat)"); - { - SMPEG* mpeg = INT2PTR(SMPEG *,SvIV(ST(0))); - int repeat = (int)SvIV(ST(1)); -#line 3581 "SDL_perl.xs" - SMPEG_loop(mpeg,repeat); -#line 7111 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SMPEGStop); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGStop) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SMPEGStop(mpeg)"); - { - SMPEG* mpeg = INT2PTR(SMPEG *,SvIV(ST(0))); -#line 3587 "SDL_perl.xs" - SMPEG_stop(mpeg); -#ifdef HAVE_SDL_MIXER - Mix_HookMusic(NULL, NULL); -#endif -#line 7129 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SMPEGRewind); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGRewind) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SMPEGRewind(mpeg)"); - { - SMPEG* mpeg = INT2PTR(SMPEG *,SvIV(ST(0))); -#line 3596 "SDL_perl.xs" - SMPEG_rewind(mpeg); -#line 7144 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SMPEGSeek); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGSeek) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::SMPEGSeek(mpeg, bytes)"); - { - SMPEG* mpeg = INT2PTR(SMPEG *,SvIV(ST(0))); - int bytes = (int)SvIV(ST(1)); -#line 3603 "SDL_perl.xs" - SMPEG_seek(mpeg,bytes); -#line 7160 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SMPEGSkip); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGSkip) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::SMPEGSkip(mpeg, seconds)"); - { - SMPEG* mpeg = INT2PTR(SMPEG *,SvIV(ST(0))); - float seconds = (float)SvNV(ST(1)); -#line 3610 "SDL_perl.xs" - SMPEG_skip(mpeg,seconds); -#line 7176 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SMPEGSetDisplayRegion); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGSetDisplayRegion) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::SMPEGSetDisplayRegion(mpeg, rect)"); - { - SMPEG* mpeg = INT2PTR(SMPEG *,SvIV(ST(0))); - SDL_Rect* rect = INT2PTR(SDL_Rect *,SvIV(ST(1))); -#line 3617 "SDL_perl.xs" - SMPEG_setdisplayregion(mpeg,rect->x,rect->y,rect->w,rect->h); -#line 7192 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SMPEGRenderFrame); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGRenderFrame) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::SMPEGRenderFrame(mpeg, frame)"); - { - SMPEG* mpeg = INT2PTR(SMPEG *,SvIV(ST(0))); - int frame = (int)SvIV(ST(1)); -#line 3624 "SDL_perl.xs" - SMPEG_renderFrame(mpeg,frame); -#line 7208 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SMPEGGetInfo); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SMPEGGetInfo) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SMPEGGetInfo(mpeg)"); - { - SMPEG* mpeg = INT2PTR(SMPEG *,SvIV(ST(0))); - SMPEG_Info * RETVAL; - dXSTARG; -#line 3630 "SDL_perl.xs" - RETVAL = (SMPEG_Info *) safemalloc (sizeof(SMPEG_Info)); - SMPEG_getinfo(mpeg,RETVAL); -#line 7226 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -#endif -#ifdef HAVE_SDL_GFX -#define XSubPPtmpAAAF 1 - -XS(XS_SDL_GFXRotoZoom); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXRotoZoom) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::GFXRotoZoom(src, angle, zoom, smooth)"); - { - SDL_Surface * src = INT2PTR(SDL_Surface *,SvIV(ST(0))); - double angle = (double)SvNV(ST(1)); - double zoom = (double)SvNV(ST(2)); - int smooth = (int)SvIV(ST(3)); - SDL_Surface * RETVAL; - dXSTARG; -#line 3647 "SDL_perl.xs" - RETVAL = rotozoomSurface( src, angle, zoom, smooth); -#line 7251 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXZoom); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXZoom) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::GFXZoom(src, zoomx, zoomy, smooth)"); - { - SDL_Surface * src = INT2PTR(SDL_Surface *,SvIV(ST(0))); - double zoomx = (double)SvNV(ST(1)); - double zoomy = (double)SvNV(ST(2)); - int smooth = (int)SvIV(ST(3)); - SDL_Surface * RETVAL; - dXSTARG; -#line 3658 "SDL_perl.xs" - RETVAL = zoomSurface( src, zoomx, zoomy, smooth); -#line 7272 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXPixelColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXPixelColor) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::GFXPixelColor(dst, x, y, color)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y = (Sint16)SvIV(ST(2)); - Uint32 color = (Uint32)SvUV(ST(3)); - int RETVAL; - dXSTARG; -#line 3669 "SDL_perl.xs" - RETVAL = pixelColor( dst, x, y, color); -#line 7293 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXPixelRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXPixelRGBA) -{ - dXSARGS; - if (items != 7) - Perl_croak(aTHX_ "Usage: SDL::GFXPixelRGBA(dst, x, y, r, g, b, a)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y = (Sint16)SvIV(ST(2)); - Uint8 r = (unsigned char)SvUV(ST(3)); - Uint8 g = (unsigned char)SvUV(ST(4)); - Uint8 b = (unsigned char)SvUV(ST(5)); - Uint8 a = (unsigned char)SvUV(ST(6)); - int RETVAL; - dXSTARG; -#line 3683 "SDL_perl.xs" - RETVAL = pixelRGBA( dst, x, y, r, g, b, a ); -#line 7317 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXHlineColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXHlineColor) -{ - dXSARGS; - if (items != 5) - Perl_croak(aTHX_ "Usage: SDL::GFXHlineColor(dst, x1, x2, y, color)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x1 = (Sint16)SvIV(ST(1)); - Sint16 x2 = (Sint16)SvIV(ST(2)); - Sint16 y = (Sint16)SvIV(ST(3)); - Uint32 color = (Uint32)SvUV(ST(4)); - int RETVAL; - dXSTARG; -#line 3695 "SDL_perl.xs" - RETVAL = hlineColor( dst, x1, x2, y, color ); -#line 7339 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXHlineRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXHlineRGBA) -{ - dXSARGS; - if (items != 8) - Perl_croak(aTHX_ "Usage: SDL::GFXHlineRGBA(dst, x1, x2, y, r, g, b, a)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x1 = (Sint16)SvIV(ST(1)); - Sint16 x2 = (Sint16)SvIV(ST(2)); - Sint16 y = (Sint16)SvIV(ST(3)); - Uint8 r = (unsigned char)SvUV(ST(4)); - Uint8 g = (unsigned char)SvUV(ST(5)); - Uint8 b = (unsigned char)SvUV(ST(6)); - Uint8 a = (unsigned char)SvUV(ST(7)); - int RETVAL; - dXSTARG; -#line 3710 "SDL_perl.xs" - RETVAL = hlineRGBA( dst, x1, x2, y, r, g, b, a ); -#line 7364 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXVlineColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXVlineColor) -{ - dXSARGS; - if (items != 5) - Perl_croak(aTHX_ "Usage: SDL::GFXVlineColor(dst, x, y1, y2, color)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y1 = (Sint16)SvIV(ST(2)); - Sint16 y2 = (Sint16)SvIV(ST(3)); - Uint32 color = (Uint32)SvUV(ST(4)); - int RETVAL; - dXSTARG; -#line 3722 "SDL_perl.xs" - RETVAL = vlineColor( dst, x, y1, y2, color ); -#line 7386 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXVlineRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXVlineRGBA) -{ - dXSARGS; - if (items != 8) - Perl_croak(aTHX_ "Usage: SDL::GFXVlineRGBA(dst, x, y1, y2, r, g, b, a)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y1 = (Sint16)SvIV(ST(2)); - Sint16 y2 = (Sint16)SvIV(ST(3)); - Uint8 r = (unsigned char)SvUV(ST(4)); - Uint8 g = (unsigned char)SvUV(ST(5)); - Uint8 b = (unsigned char)SvUV(ST(6)); - Uint8 a = (unsigned char)SvUV(ST(7)); - int RETVAL; - dXSTARG; -#line 3737 "SDL_perl.xs" - RETVAL = vlineRGBA( dst, x, y1, y2, r, g, b, a ); -#line 7411 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXRectangleColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXRectangleColor) -{ - dXSARGS; - if (items != 6) - Perl_croak(aTHX_ "Usage: SDL::GFXRectangleColor(dst, x1, y1, x2, y2, color)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x1 = (Sint16)SvIV(ST(1)); - Sint16 y1 = (Sint16)SvIV(ST(2)); - Sint16 x2 = (Sint16)SvIV(ST(3)); - Sint16 y2 = (Sint16)SvIV(ST(4)); - Uint32 color = (Uint32)SvUV(ST(5)); - int RETVAL; - dXSTARG; -#line 3750 "SDL_perl.xs" - RETVAL = rectangleColor( dst, x1, y1, x2, y2, color ); -#line 7434 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXRectangleRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXRectangleRGBA) -{ - dXSARGS; - if (items != 9) - Perl_croak(aTHX_ "Usage: SDL::GFXRectangleRGBA(dst, x1, y1, x2, y2, r, g, b, a)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x1 = (Sint16)SvIV(ST(1)); - Sint16 y1 = (Sint16)SvIV(ST(2)); - Sint16 x2 = (Sint16)SvIV(ST(3)); - Sint16 y2 = (Sint16)SvIV(ST(4)); - Uint8 r = (unsigned char)SvUV(ST(5)); - Uint8 g = (unsigned char)SvUV(ST(6)); - Uint8 b = (unsigned char)SvUV(ST(7)); - Uint8 a = (unsigned char)SvUV(ST(8)); - int RETVAL; - dXSTARG; -#line 3766 "SDL_perl.xs" - RETVAL = rectangleRGBA( dst, x1, y1, x2, y2, r, g, b, a ); -#line 7460 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXBoxColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXBoxColor) -{ - dXSARGS; - if (items != 6) - Perl_croak(aTHX_ "Usage: SDL::GFXBoxColor(dst, x1, y1, x2, y2, color)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x1 = (Sint16)SvIV(ST(1)); - Sint16 y1 = (Sint16)SvIV(ST(2)); - Sint16 x2 = (Sint16)SvIV(ST(3)); - Sint16 y2 = (Sint16)SvIV(ST(4)); - Uint32 color = (Uint32)SvUV(ST(5)); - int RETVAL; - dXSTARG; -#line 3779 "SDL_perl.xs" - RETVAL = boxColor( dst, x1, y1, x2, y2, color ); -#line 7483 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXBoxRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXBoxRGBA) -{ - dXSARGS; - if (items != 9) - Perl_croak(aTHX_ "Usage: SDL::GFXBoxRGBA(dst, x1, y1, x2, y2, r, g, b, a)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x1 = (Sint16)SvIV(ST(1)); - Sint16 y1 = (Sint16)SvIV(ST(2)); - Sint16 x2 = (Sint16)SvIV(ST(3)); - Sint16 y2 = (Sint16)SvIV(ST(4)); - Uint8 r = (unsigned char)SvUV(ST(5)); - Uint8 g = (unsigned char)SvUV(ST(6)); - Uint8 b = (unsigned char)SvUV(ST(7)); - Uint8 a = (unsigned char)SvUV(ST(8)); - int RETVAL; - dXSTARG; -#line 3795 "SDL_perl.xs" - RETVAL = boxRGBA( dst, x1, y1, x2, y2, r, g, b, a ); -#line 7509 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXLineColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXLineColor) -{ - dXSARGS; - if (items != 6) - Perl_croak(aTHX_ "Usage: SDL::GFXLineColor(dst, x1, y1, x2, y2, color)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x1 = (Sint16)SvIV(ST(1)); - Sint16 y1 = (Sint16)SvIV(ST(2)); - Sint16 x2 = (Sint16)SvIV(ST(3)); - Sint16 y2 = (Sint16)SvIV(ST(4)); - Uint32 color = (Uint32)SvUV(ST(5)); - int RETVAL; - dXSTARG; -#line 3808 "SDL_perl.xs" - RETVAL = lineColor( dst, x1, y1, x2, y2, color ); -#line 7532 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXLineRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXLineRGBA) -{ - dXSARGS; - if (items != 9) - Perl_croak(aTHX_ "Usage: SDL::GFXLineRGBA(dst, x1, y1, x2, y2, r, g, b, a)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x1 = (Sint16)SvIV(ST(1)); - Sint16 y1 = (Sint16)SvIV(ST(2)); - Sint16 x2 = (Sint16)SvIV(ST(3)); - Sint16 y2 = (Sint16)SvIV(ST(4)); - Uint8 r = (unsigned char)SvUV(ST(5)); - Uint8 g = (unsigned char)SvUV(ST(6)); - Uint8 b = (unsigned char)SvUV(ST(7)); - Uint8 a = (unsigned char)SvUV(ST(8)); - int RETVAL; - dXSTARG; -#line 3824 "SDL_perl.xs" - RETVAL = lineRGBA( dst, x1, y1, x2, y2, r, g, b, a ); -#line 7558 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXAalineColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXAalineColor) -{ - dXSARGS; - if (items != 6) - Perl_croak(aTHX_ "Usage: SDL::GFXAalineColor(dst, x1, y1, x2, y2, color)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x1 = (Sint16)SvIV(ST(1)); - Sint16 y1 = (Sint16)SvIV(ST(2)); - Sint16 x2 = (Sint16)SvIV(ST(3)); - Sint16 y2 = (Sint16)SvIV(ST(4)); - Uint32 color = (Uint32)SvUV(ST(5)); - int RETVAL; - dXSTARG; -#line 3837 "SDL_perl.xs" - RETVAL = aalineColor( dst, x1, y1, x2, y2, color ); -#line 7581 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXAalineRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXAalineRGBA) -{ - dXSARGS; - if (items != 9) - Perl_croak(aTHX_ "Usage: SDL::GFXAalineRGBA(dst, x1, y1, x2, y2, r, g, b, a)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x1 = (Sint16)SvIV(ST(1)); - Sint16 y1 = (Sint16)SvIV(ST(2)); - Sint16 x2 = (Sint16)SvIV(ST(3)); - Sint16 y2 = (Sint16)SvIV(ST(4)); - Uint8 r = (unsigned char)SvUV(ST(5)); - Uint8 g = (unsigned char)SvUV(ST(6)); - Uint8 b = (unsigned char)SvUV(ST(7)); - Uint8 a = (unsigned char)SvUV(ST(8)); - int RETVAL; - dXSTARG; -#line 3853 "SDL_perl.xs" - RETVAL = aalineRGBA( dst, x1, y1, x2, y2, r, g, b, a ); -#line 7607 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXCircleColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXCircleColor) -{ - dXSARGS; - if (items != 5) - Perl_croak(aTHX_ "Usage: SDL::GFXCircleColor(dst, x, y, r, color)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y = (Sint16)SvIV(ST(2)); - Sint16 r = (Sint16)SvIV(ST(3)); - Uint32 color = (Uint32)SvUV(ST(4)); - int RETVAL; - dXSTARG; -#line 3865 "SDL_perl.xs" - RETVAL = circleColor( dst, x, y, r, color ); -#line 7629 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXCircleRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXCircleRGBA) -{ - dXSARGS; - if (items != 8) - Perl_croak(aTHX_ "Usage: SDL::GFXCircleRGBA(dst, x, y, rad, r, g, b, a)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y = (Sint16)SvIV(ST(2)); - Sint16 rad = (Sint16)SvIV(ST(3)); - Uint8 r = (unsigned char)SvUV(ST(4)); - Uint8 g = (unsigned char)SvUV(ST(5)); - Uint8 b = (unsigned char)SvUV(ST(6)); - Uint8 a = (unsigned char)SvUV(ST(7)); - int RETVAL; - dXSTARG; -#line 3880 "SDL_perl.xs" - RETVAL = circleRGBA( dst, x, y, rad, r, g, b, a ); -#line 7654 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXAacircleColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXAacircleColor) -{ - dXSARGS; - if (items != 5) - Perl_croak(aTHX_ "Usage: SDL::GFXAacircleColor(dst, x, y, r, color)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y = (Sint16)SvIV(ST(2)); - Sint16 r = (Sint16)SvIV(ST(3)); - Uint32 color = (Uint32)SvUV(ST(4)); - int RETVAL; - dXSTARG; -#line 3892 "SDL_perl.xs" - RETVAL = aacircleColor( dst, x, y, r, color ); -#line 7676 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXAacircleRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXAacircleRGBA) -{ - dXSARGS; - if (items != 8) - Perl_croak(aTHX_ "Usage: SDL::GFXAacircleRGBA(dst, x, y, rad, r, g, b, a)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y = (Sint16)SvIV(ST(2)); - Sint16 rad = (Sint16)SvIV(ST(3)); - Uint8 r = (unsigned char)SvUV(ST(4)); - Uint8 g = (unsigned char)SvUV(ST(5)); - Uint8 b = (unsigned char)SvUV(ST(6)); - Uint8 a = (unsigned char)SvUV(ST(7)); - int RETVAL; - dXSTARG; -#line 3907 "SDL_perl.xs" - RETVAL = aacircleRGBA( dst, x, y, rad, r, g, b, a ); -#line 7701 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXFilledCircleColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXFilledCircleColor) -{ - dXSARGS; - if (items != 5) - Perl_croak(aTHX_ "Usage: SDL::GFXFilledCircleColor(dst, x, y, r, color)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y = (Sint16)SvIV(ST(2)); - Sint16 r = (Sint16)SvIV(ST(3)); - Uint32 color = (Uint32)SvUV(ST(4)); - int RETVAL; - dXSTARG; -#line 3919 "SDL_perl.xs" - RETVAL = filledCircleColor( dst, x, y, r, color ); -#line 7723 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXFilledCircleRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXFilledCircleRGBA) -{ - dXSARGS; - if (items != 8) - Perl_croak(aTHX_ "Usage: SDL::GFXFilledCircleRGBA(dst, x, y, rad, r, g, b, a)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y = (Sint16)SvIV(ST(2)); - Sint16 rad = (Sint16)SvIV(ST(3)); - Uint8 r = (unsigned char)SvUV(ST(4)); - Uint8 g = (unsigned char)SvUV(ST(5)); - Uint8 b = (unsigned char)SvUV(ST(6)); - Uint8 a = (unsigned char)SvUV(ST(7)); - int RETVAL; - dXSTARG; -#line 3934 "SDL_perl.xs" - RETVAL = filledCircleRGBA( dst, x, y, rad, r, g, b, a ); -#line 7748 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXEllipseColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXEllipseColor) -{ - dXSARGS; - if (items != 6) - Perl_croak(aTHX_ "Usage: SDL::GFXEllipseColor(dst, x, y, rx, ry, color)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y = (Sint16)SvIV(ST(2)); - Sint16 rx = (Sint16)SvIV(ST(3)); - Sint16 ry = (Sint16)SvIV(ST(4)); - Uint32 color = (Uint32)SvUV(ST(5)); - int RETVAL; - dXSTARG; -#line 3947 "SDL_perl.xs" - RETVAL = ellipseColor( dst, x, y, rx, ry, color ); -#line 7771 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXEllipseRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXEllipseRGBA) -{ - dXSARGS; - if (items != 9) - Perl_croak(aTHX_ "Usage: SDL::GFXEllipseRGBA(dst, x, y, rx, ry, r, g, b, a)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y = (Sint16)SvIV(ST(2)); - Sint16 rx = (Sint16)SvIV(ST(3)); - Sint16 ry = (Sint16)SvIV(ST(4)); - Uint8 r = (unsigned char)SvUV(ST(5)); - Uint8 g = (unsigned char)SvUV(ST(6)); - Uint8 b = (unsigned char)SvUV(ST(7)); - Uint8 a = (unsigned char)SvUV(ST(8)); - int RETVAL; - dXSTARG; -#line 3963 "SDL_perl.xs" - RETVAL = ellipseRGBA( dst, x, y, rx, ry, r, g, b, a ); -#line 7797 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXAaellipseColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXAaellipseColor) -{ - dXSARGS; - if (items != 6) - Perl_croak(aTHX_ "Usage: SDL::GFXAaellipseColor(dst, xc, yc, rx, ry, color)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 xc = (Sint16)SvIV(ST(1)); - Sint16 yc = (Sint16)SvIV(ST(2)); - Sint16 rx = (Sint16)SvIV(ST(3)); - Sint16 ry = (Sint16)SvIV(ST(4)); - Uint32 color = (Uint32)SvUV(ST(5)); - int RETVAL; - dXSTARG; -#line 3976 "SDL_perl.xs" - RETVAL = aaellipseColor( dst, xc, yc, rx, ry, color ); -#line 7820 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXAaellipseRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXAaellipseRGBA) -{ - dXSARGS; - if (items != 9) - Perl_croak(aTHX_ "Usage: SDL::GFXAaellipseRGBA(dst, x, y, rx, ry, r, g, b, a)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y = (Sint16)SvIV(ST(2)); - Sint16 rx = (Sint16)SvIV(ST(3)); - Sint16 ry = (Sint16)SvIV(ST(4)); - Uint8 r = (unsigned char)SvUV(ST(5)); - Uint8 g = (unsigned char)SvUV(ST(6)); - Uint8 b = (unsigned char)SvUV(ST(7)); - Uint8 a = (unsigned char)SvUV(ST(8)); - int RETVAL; - dXSTARG; -#line 3992 "SDL_perl.xs" - RETVAL = aaellipseRGBA( dst, x, y, rx, ry, r, g, b, a ); -#line 7846 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXFilledEllipseColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXFilledEllipseColor) -{ - dXSARGS; - if (items != 6) - Perl_croak(aTHX_ "Usage: SDL::GFXFilledEllipseColor(dst, x, y, rx, ry, color)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y = (Sint16)SvIV(ST(2)); - Sint16 rx = (Sint16)SvIV(ST(3)); - Sint16 ry = (Sint16)SvIV(ST(4)); - Uint32 color = (Uint32)SvUV(ST(5)); - int RETVAL; - dXSTARG; -#line 4005 "SDL_perl.xs" - RETVAL = filledEllipseColor( dst, x, y, rx, ry, color ); -#line 7869 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXFilledEllipseRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXFilledEllipseRGBA) -{ - dXSARGS; - if (items != 9) - Perl_croak(aTHX_ "Usage: SDL::GFXFilledEllipseRGBA(dst, x, y, rx, ry, r, g, b, a)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y = (Sint16)SvIV(ST(2)); - Sint16 rx = (Sint16)SvIV(ST(3)); - Sint16 ry = (Sint16)SvIV(ST(4)); - Uint8 r = (unsigned char)SvUV(ST(5)); - Uint8 g = (unsigned char)SvUV(ST(6)); - Uint8 b = (unsigned char)SvUV(ST(7)); - Uint8 a = (unsigned char)SvUV(ST(8)); - int RETVAL; - dXSTARG; -#line 4021 "SDL_perl.xs" - RETVAL = filledEllipseRGBA( dst, x, y, rx, ry, r, g, b, a ); -#line 7895 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXFilledPieColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXFilledPieColor) -{ - dXSARGS; - if (items != 7) - Perl_croak(aTHX_ "Usage: SDL::GFXFilledPieColor(dst, x, y, rad, start, end, color)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y = (Sint16)SvIV(ST(2)); - Sint16 rad = (Sint16)SvIV(ST(3)); - Sint16 start = (Sint16)SvIV(ST(4)); - Sint16 end = (Sint16)SvIV(ST(5)); - Uint32 color = (Uint32)SvUV(ST(6)); - int RETVAL; - dXSTARG; -#line 4035 "SDL_perl.xs" - RETVAL = filledPieColor( dst, x, y, rad, start, end, color ); -#line 7919 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXFilledPieRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXFilledPieRGBA) -{ - dXSARGS; - if (items != 10) - Perl_croak(aTHX_ "Usage: SDL::GFXFilledPieRGBA(dst, x, y, rad, start, end, r, g, b, a)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y = (Sint16)SvIV(ST(2)); - Sint16 rad = (Sint16)SvIV(ST(3)); - Sint16 start = (Sint16)SvIV(ST(4)); - Sint16 end = (Sint16)SvIV(ST(5)); - Uint8 r = (unsigned char)SvUV(ST(6)); - Uint8 g = (unsigned char)SvUV(ST(7)); - Uint8 b = (unsigned char)SvUV(ST(8)); - Uint8 a = (unsigned char)SvUV(ST(9)); - int RETVAL; - dXSTARG; -#line 4052 "SDL_perl.xs" - RETVAL = filledPieRGBA( dst, x, y, rad, start, end, r, g, b, a ); -#line 7946 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXPolygonColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXPolygonColor) -{ - dXSARGS; - if (items != 5) - Perl_croak(aTHX_ "Usage: SDL::GFXPolygonColor(dst, vx, vy, n, color)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16* vx = INT2PTR(Sint16 *,SvIV(ST(1))); - Sint16* vy = INT2PTR(Sint16 *,SvIV(ST(2))); - int n = (int)SvIV(ST(3)); - Uint32 color = (Uint32)SvUV(ST(4)); - int RETVAL; - dXSTARG; -#line 4064 "SDL_perl.xs" - RETVAL = polygonColor( dst, vx, vy, n, color ); -#line 7968 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXPolygonRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXPolygonRGBA) -{ - dXSARGS; - if (items != 8) - Perl_croak(aTHX_ "Usage: SDL::GFXPolygonRGBA(dst, vx, vy, n, r, g, b, a)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16* vx = INT2PTR(Sint16 *,SvIV(ST(1))); - Sint16* vy = INT2PTR(Sint16 *,SvIV(ST(2))); - int n = (int)SvIV(ST(3)); - Uint8 r = (unsigned char)SvUV(ST(4)); - Uint8 g = (unsigned char)SvUV(ST(5)); - Uint8 b = (unsigned char)SvUV(ST(6)); - Uint8 a = (unsigned char)SvUV(ST(7)); - int RETVAL; - dXSTARG; -#line 4079 "SDL_perl.xs" - RETVAL = polygonRGBA( dst, vx, vy, n, r, g, b, a ); -#line 7993 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXAapolygonColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXAapolygonColor) -{ - dXSARGS; - if (items != 5) - Perl_croak(aTHX_ "Usage: SDL::GFXAapolygonColor(dst, vx, vy, n, color)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16* vx = INT2PTR(Sint16 *,SvIV(ST(1))); - Sint16* vy = INT2PTR(Sint16 *,SvIV(ST(2))); - int n = (int)SvIV(ST(3)); - Uint32 color = (Uint32)SvUV(ST(4)); - int RETVAL; - dXSTARG; -#line 4091 "SDL_perl.xs" - RETVAL = aapolygonColor( dst, vx, vy, n, color ); -#line 8015 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXAapolygonRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXAapolygonRGBA) -{ - dXSARGS; - if (items != 8) - Perl_croak(aTHX_ "Usage: SDL::GFXAapolygonRGBA(dst, vx, vy, n, r, g, b, a)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16* vx = INT2PTR(Sint16 *,SvIV(ST(1))); - Sint16* vy = INT2PTR(Sint16 *,SvIV(ST(2))); - int n = (int)SvIV(ST(3)); - Uint8 r = (unsigned char)SvUV(ST(4)); - Uint8 g = (unsigned char)SvUV(ST(5)); - Uint8 b = (unsigned char)SvUV(ST(6)); - Uint8 a = (unsigned char)SvUV(ST(7)); - int RETVAL; - dXSTARG; -#line 4106 "SDL_perl.xs" - RETVAL = aapolygonRGBA( dst, vx, vy, n, r, g, b, a ); -#line 8040 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXFilledPolygonColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXFilledPolygonColor) -{ - dXSARGS; - if (items != 5) - Perl_croak(aTHX_ "Usage: SDL::GFXFilledPolygonColor(dst, vx, vy, n, color)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16* vx = INT2PTR(Sint16 *,SvIV(ST(1))); - Sint16* vy = INT2PTR(Sint16 *,SvIV(ST(2))); - int n = (int)SvIV(ST(3)); - int color = (int)SvIV(ST(4)); - int RETVAL; - dXSTARG; -#line 4118 "SDL_perl.xs" - RETVAL = filledPolygonColor( dst, vx, vy, n, color ); -#line 8062 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXFilledPolygonRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXFilledPolygonRGBA) -{ - dXSARGS; - if (items != 8) - Perl_croak(aTHX_ "Usage: SDL::GFXFilledPolygonRGBA(dst, vx, vy, n, r, g, b, a)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16* vx = INT2PTR(Sint16 *,SvIV(ST(1))); - Sint16* vy = INT2PTR(Sint16 *,SvIV(ST(2))); - int n = (int)SvIV(ST(3)); - Uint8 r = (unsigned char)SvUV(ST(4)); - Uint8 g = (unsigned char)SvUV(ST(5)); - Uint8 b = (unsigned char)SvUV(ST(6)); - Uint8 a = (unsigned char)SvUV(ST(7)); - int RETVAL; - dXSTARG; -#line 4133 "SDL_perl.xs" - RETVAL = filledPolygonRGBA( dst, vx, vy, n, r, g, b, a ); -#line 8087 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXCharacterColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXCharacterColor) -{ - dXSARGS; - if (items != 5) - Perl_croak(aTHX_ "Usage: SDL::GFXCharacterColor(dst, x, y, c, color)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y = (Sint16)SvIV(ST(2)); - char c = (char)*SvPV_nolen(ST(3)); - Uint32 color = (Uint32)SvUV(ST(4)); - int RETVAL; - dXSTARG; -#line 4145 "SDL_perl.xs" - RETVAL = characterColor( dst, x, y, c, color ); -#line 8109 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXCharacterRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXCharacterRGBA) -{ - dXSARGS; - if (items != 8) - Perl_croak(aTHX_ "Usage: SDL::GFXCharacterRGBA(dst, x, y, c, r, g, b, a)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y = (Sint16)SvIV(ST(2)); - char c = (char)*SvPV_nolen(ST(3)); - Uint8 r = (unsigned char)SvUV(ST(4)); - Uint8 g = (unsigned char)SvUV(ST(5)); - Uint8 b = (unsigned char)SvUV(ST(6)); - Uint8 a = (unsigned char)SvUV(ST(7)); - int RETVAL; - dXSTARG; -#line 4160 "SDL_perl.xs" - RETVAL = characterRGBA( dst, x, y, c, r, g, b, a ); -#line 8134 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXStringColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXStringColor) -{ - dXSARGS; - if (items != 5) - Perl_croak(aTHX_ "Usage: SDL::GFXStringColor(dst, x, y, c, color)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y = (Sint16)SvIV(ST(2)); - char* c = (char *)SvPV_nolen(ST(3)); - Uint32 color = (Uint32)SvUV(ST(4)); - int RETVAL; - dXSTARG; -#line 4172 "SDL_perl.xs" - RETVAL = stringColor( dst, x, y, c, color ); -#line 8156 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_GFXStringRGBA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_GFXStringRGBA) -{ - dXSARGS; - if (items != 8) - Perl_croak(aTHX_ "Usage: SDL::GFXStringRGBA(dst, x, y, c, r, g, b, a)"); - { - SDL_Surface* dst = INT2PTR(SDL_Surface *,SvIV(ST(0))); - Sint16 x = (Sint16)SvIV(ST(1)); - Sint16 y = (Sint16)SvIV(ST(2)); - char* c = (char *)SvPV_nolen(ST(3)); - Uint8 r = (unsigned char)SvUV(ST(4)); - Uint8 g = (unsigned char)SvUV(ST(5)); - Uint8 b = (unsigned char)SvUV(ST(6)); - Uint8 a = (unsigned char)SvUV(ST(7)); - int RETVAL; - dXSTARG; -#line 4187 "SDL_perl.xs" - RETVAL = stringRGBA( dst, x, y, c, r, g, b, a ); -#line 8181 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -#endif -#ifdef HAVE_SDL_SVG -#define XSubPPtmpAAAG 1 - -XS(XS_SDL_SVG_Load); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SVG_Load) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SVG_Load(filename)"); - { - char* filename = (char *)SvPV_nolen(ST(0)); - SDL_svg_context * RETVAL; - dXSTARG; -#line 4200 "SDL_perl.xs" - RETVAL = SVG_Load(filename); -#line 8203 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_SVG_LoadBuffer); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SVG_LoadBuffer) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::SVG_LoadBuffer(data, len)"); - { - char* data = (char *)SvPV_nolen(ST(0)); - int len = (int)SvIV(ST(1)); - SDL_svg_context * RETVAL; - dXSTARG; -#line 4209 "SDL_perl.xs" - RETVAL = SVG_LoadBuffer(data,len); -#line 8222 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_SVG_SetOffset); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SVG_SetOffset) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::SVG_SetOffset(source, xoff, yoff)"); - { - SDL_svg_context* source = INT2PTR(SDL_svg_context *,SvIV(ST(0))); - double xoff = (double)SvNV(ST(1)); - double yoff = (double)SvNV(ST(2)); - int RETVAL; - dXSTARG; -#line 4219 "SDL_perl.xs" - RETVAL = SVG_SetOffset(source,xoff,yoff); -#line 8242 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SVG_SetScale); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SVG_SetScale) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::SVG_SetScale(source, xscale, yscale)"); - { - SDL_svg_context* source = INT2PTR(SDL_svg_context *,SvIV(ST(0))); - double xscale = (double)SvNV(ST(1)); - double yscale = (double)SvNV(ST(2)); - int RETVAL; - dXSTARG; -#line 4229 "SDL_perl.xs" - RETVAL = SVG_SetScale(source,xscale,yscale); -#line 8262 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SVG_RenderToSurface); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SVG_RenderToSurface) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::SVG_RenderToSurface(source, x, y, dest)"); - { - SDL_svg_context* source = INT2PTR(SDL_svg_context *,SvIV(ST(0))); - int x = (int)SvIV(ST(1)); - int y = (int)SvIV(ST(2)); - SDL_Surface* dest = INT2PTR(SDL_Surface *,SvIV(ST(3))); - int RETVAL; - dXSTARG; -#line 4240 "SDL_perl.xs" - RETVAL = SVG_RenderToSurface(source,x,y,dest); -#line 8283 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SVG_Free); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SVG_Free) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SVG_Free(source)"); - { - SDL_svg_context* source = INT2PTR(SDL_svg_context *,SvIV(ST(0))); -#line 4248 "SDL_perl.xs" - SVG_Free(source); -#line 8299 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SVG_Set_Flags); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SVG_Set_Flags) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::SVG_Set_Flags(source, flags)"); - { - SDL_svg_context* source = INT2PTR(SDL_svg_context *,SvIV(ST(0))); - Uint32 flags = (Uint32)SvUV(ST(1)); -#line 4255 "SDL_perl.xs" - SVG_Set_Flags(source,flags); -#line 8315 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SVG_Width); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SVG_Width) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SVG_Width(source)"); - { - SDL_svg_context* source = INT2PTR(SDL_svg_context *,SvIV(ST(0))); - float RETVAL; - dXSTARG; -#line 4261 "SDL_perl.xs" - RETVAL = SVG_Width(source); -#line 8332 "SDL_perl.c" - XSprePUSH; PUSHn((double)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SVG_HEIGHT); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SVG_HEIGHT) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SVG_HEIGHT(source)"); - { - SDL_svg_context* source = INT2PTR(SDL_svg_context *,SvIV(ST(0))); - float RETVAL; - dXSTARG; -#line 4269 "SDL_perl.xs" - RETVAL = SVG_Height(source); -#line 8350 "SDL_perl.c" - XSprePUSH; PUSHn((double)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SVG_SetClipping); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SVG_SetClipping) -{ - dXSARGS; - if (items != 5) - Perl_croak(aTHX_ "Usage: SDL::SVG_SetClipping(source, minx, miny, maxx, maxy)"); - { - SDL_svg_context* source = INT2PTR(SDL_svg_context *,SvIV(ST(0))); - int minx = (int)SvIV(ST(1)); - int miny = (int)SvIV(ST(2)); - int maxx = (int)SvIV(ST(3)); - int maxy = (int)SvIV(ST(4)); -#line 4281 "SDL_perl.xs" - SVG_SetClipping(source,minx,miny,maxx,maxy); -#line 8370 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_SVG_Version); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SVG_Version) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::SVG_Version()"); - { - int RETVAL; - dXSTARG; -#line 4286 "SDL_perl.xs" - RETVAL = SVG_Version(); -#line 8386 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -#endif -#ifdef HAVE_SDL_SOUND -#define XSubPPtmpAAAH 1 - -XS(XS_SDL_SoundAudioInfoFormat); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SoundAudioInfoFormat) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SoundAudioInfoFormat(audioinfo)"); - { - Sound_AudioInfo* audioinfo = INT2PTR(Sound_AudioInfo *,SvIV(ST(0))); - Uint16 RETVAL; - dXSTARG; -#line 4299 "SDL_perl.xs" - RETVAL = audioinfo->format; -#line 8408 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SoundAudioInfoChannels); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SoundAudioInfoChannels) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SoundAudioInfoChannels(audioinfo)"); - { - Sound_AudioInfo* audioinfo = INT2PTR(Sound_AudioInfo *,SvIV(ST(0))); - Uint8 RETVAL; - dXSTARG; -#line 4307 "SDL_perl.xs" - RETVAL = audioinfo->channels; -#line 8426 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SoundAudioInforate); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SoundAudioInforate) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SoundAudioInforate(audioinfo)"); - { - Sound_AudioInfo* audioinfo = INT2PTR(Sound_AudioInfo *,SvIV(ST(0))); - Uint32 RETVAL; - dXSTARG; -#line 4315 "SDL_perl.xs" - RETVAL = audioinfo->rate; -#line 8444 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SoundDecoderInfoExtensions); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SoundDecoderInfoExtensions) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SoundDecoderInfoExtensions(decoderinfo)"); - { - Sound_DecoderInfo* decoderinfo = INT2PTR(Sound_DecoderInfo *,SvIV(ST(0))); - AV * RETVAL; -#line 4323 "SDL_perl.xs" - const char **ext; - for ( ext = decoderinfo->extensions; *ext != NULL; ext++ ){ - av_push(RETVAL,newSVpv(*ext,0)); - } -#line 8464 "SDL_perl.c" - ST(0) = newRV((SV*)RETVAL); - sv_2mortal(ST(0)); - } - XSRETURN(1); -} - -XS(XS_SDL_SoundDecoderInfoDescription); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SoundDecoderInfoDescription) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SoundDecoderInfoDescription(decoderinfo)"); - { - Sound_DecoderInfo* decoderinfo = INT2PTR(Sound_DecoderInfo *,SvIV(ST(0))); - const char * RETVAL; - dXSTARG; -#line 4334 "SDL_perl.xs" - RETVAL = decoderinfo->description; -#line 8483 "SDL_perl.c" - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; - } - XSRETURN(1); -} - -XS(XS_SDL_SoundDecoderInfoAuthor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SoundDecoderInfoAuthor) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SoundDecoderInfoAuthor(decoderinfo)"); - { - Sound_DecoderInfo* decoderinfo = INT2PTR(Sound_DecoderInfo *,SvIV(ST(0))); - const char * RETVAL; - dXSTARG; -#line 4342 "SDL_perl.xs" - RETVAL = decoderinfo->author; -#line 8501 "SDL_perl.c" - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; - } - XSRETURN(1); -} - -XS(XS_SDL_SoundDecoderInfoUrl); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SoundDecoderInfoUrl) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SoundDecoderInfoUrl(decoderinfo)"); - { - Sound_DecoderInfo* decoderinfo = INT2PTR(Sound_DecoderInfo *,SvIV(ST(0))); - const char * RETVAL; - dXSTARG; -#line 4350 "SDL_perl.xs" - RETVAL = decoderinfo->url; -#line 8519 "SDL_perl.c" - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; - } - XSRETURN(1); -} - -XS(XS_SDL_SoundSampleDecoder); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SoundSampleDecoder) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SoundSampleDecoder(sample)"); - { - Sound_Sample* sample = INT2PTR(Sound_Sample *,SvIV(ST(0))); - const Sound_DecoderInfo * RETVAL; - dXSTARG; -#line 4358 "SDL_perl.xs" - RETVAL = sample->decoder; -#line 8537 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_SoundSampleDesired); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SoundSampleDesired) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SoundSampleDesired(sample)"); - { - Sound_Sample* sample = INT2PTR(Sound_Sample *,SvIV(ST(0))); - Sound_AudioInfo * RETVAL; - dXSTARG; -#line 4366 "SDL_perl.xs" - RETVAL = &sample->desired; -#line 8555 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_SoundSampleAcutal); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SoundSampleAcutal) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SoundSampleAcutal(sample)"); - { - Sound_Sample* sample = INT2PTR(Sound_Sample *,SvIV(ST(0))); - Sound_AudioInfo * RETVAL; - dXSTARG; -#line 4374 "SDL_perl.xs" - RETVAL = &sample->actual; -#line 8573 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_SoundSampleBuffer); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SoundSampleBuffer) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SoundSampleBuffer(sample)"); - { - Sound_Sample* sample = INT2PTR(Sound_Sample *,SvIV(ST(0))); - char * RETVAL; - dXSTARG; -#line 4382 "SDL_perl.xs" - RETVAL = sample->buffer; -#line 8591 "SDL_perl.c" - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; - } - XSRETURN(1); -} - -XS(XS_SDL_SoundSampleBufferSize); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SoundSampleBufferSize) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SoundSampleBufferSize(sample)"); - { - Sound_Sample* sample = INT2PTR(Sound_Sample *,SvIV(ST(0))); - Uint32 RETVAL; - dXSTARG; -#line 4390 "SDL_perl.xs" - RETVAL = sample->buffer_size; -#line 8609 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_SoundSampleFlags); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_SoundSampleFlags) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::SoundSampleFlags(sample)"); - { - Sound_Sample* sample = INT2PTR(Sound_Sample *,SvIV(ST(0))); - Uint32 RETVAL; - dXSTARG; -#line 4398 "SDL_perl.xs" - RETVAL = (Uint32)sample->flags; -#line 8627 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_Sound_Init); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_Sound_Init) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::Sound_Init()"); - { - int RETVAL; - dXSTARG; -#line 4405 "SDL_perl.xs" - RETVAL = Sound_Init(); -#line 8644 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_Sound_Quit); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_Sound_Quit) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::Sound_Quit()"); - { - int RETVAL; - dXSTARG; -#line 4412 "SDL_perl.xs" - RETVAL = Sound_Quit(); -#line 8661 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_Sound_AvailableDecoders); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_Sound_AvailableDecoders) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::Sound_AvailableDecoders()"); - { - AV * RETVAL; -#line 4419 "SDL_perl.xs" - RETVAL = newAV(); - const Sound_DecoderInfo** sdi; - sdi = Sound_AvailableDecoders(); - if (sdi != NULL) { - for (;*sdi != NULL; ++sdi) { - av_push(RETVAL,sv_2mortal(newSViv(PTR2IV(*sdi)))); - } - } -#line 8684 "SDL_perl.c" - ST(0) = newRV((SV*)RETVAL); - sv_2mortal(ST(0)); - } - XSRETURN(1); -} - -XS(XS_SDL_Sound_GetError); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_Sound_GetError) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::Sound_GetError()"); - { - const char * RETVAL; - dXSTARG; -#line 4433 "SDL_perl.xs" - RETVAL = Sound_GetError(); -#line 8702 "SDL_perl.c" - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; - } - XSRETURN(1); -} - -XS(XS_SDL_Sound_ClearError); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_Sound_ClearError) -{ - dXSARGS; - if (items != 0) - Perl_croak(aTHX_ "Usage: SDL::Sound_ClearError()"); - { -#line 4440 "SDL_perl.xs" - Sound_ClearError(); -#line 8717 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_Sound_NewSample); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_Sound_NewSample) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: SDL::Sound_NewSample(rw, ext, desired, buffsize)"); - { - SDL_RWops* rw = INT2PTR(SDL_RWops *,SvIV(ST(0))); - const char* ext = (const char *)SvPV_nolen(ST(1)); - Sound_AudioInfo* desired = INT2PTR(Sound_AudioInfo *,SvIV(ST(2))); - Uint32 buffsize = (Uint32)SvUV(ST(3)); - Sound_Sample * RETVAL; - dXSTARG; -#line 4449 "SDL_perl.xs" - RETVAL = Sound_NewSample(rw,ext,desired,buffsize); -#line 8737 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_Sound_NewSampleFromMem); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_Sound_NewSampleFromMem) -{ - dXSARGS; - if (items != 5) - Perl_croak(aTHX_ "Usage: SDL::Sound_NewSampleFromMem(data, size, ext, desired, buffsize)"); - { - const Uint8 * data = INT2PTR(const Uint8 *,SvIV(ST(0))); - Uint32 size = (Uint32)SvUV(ST(1)); - const char* ext = (const char *)SvPV_nolen(ST(2)); - Sound_AudioInfo* desired = INT2PTR(Sound_AudioInfo *,SvIV(ST(3))); - Uint32 buffsize = (Uint32)SvUV(ST(4)); - Sound_Sample * RETVAL; - dXSTARG; -#line 4461 "SDL_perl.xs" - RETVAL = Sound_NewSampleFromMem(data,size,ext,desired,buffsize); -#line 8759 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_Sound_NewSampleFromFile); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_Sound_NewSampleFromFile) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: SDL::Sound_NewSampleFromFile(fname, desired, buffsize)"); - { - const char* fname = (const char *)SvPV_nolen(ST(0)); - Sound_AudioInfo* desired = INT2PTR(Sound_AudioInfo *,SvIV(ST(1))); - Uint32 buffsize = (Uint32)SvUV(ST(2)); - Sound_Sample * RETVAL; - dXSTARG; -#line 4471 "SDL_perl.xs" - RETVAL = Sound_NewSampleFromFile(fname,desired,buffsize); -#line 8779 "SDL_perl.c" - XSprePUSH; PUSHi(PTR2IV(RETVAL)); - } - XSRETURN(1); -} - -XS(XS_SDL_Sound_FreeSample); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_Sound_FreeSample) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::Sound_FreeSample(sample)"); - { - Sound_Sample* sample = INT2PTR(Sound_Sample *,SvIV(ST(0))); -#line 4479 "SDL_perl.xs" - Sound_FreeSample(sample); -#line 8795 "SDL_perl.c" - } - XSRETURN_EMPTY; -} - -XS(XS_SDL_Sound_GetDuration); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_Sound_GetDuration) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::Sound_GetDuration(sample)"); - { - Sound_Sample* sample = INT2PTR(Sound_Sample *,SvIV(ST(0))); - Sint32 RETVAL; - dXSTARG; -#line 4485 "SDL_perl.xs" - RETVAL = Sound_GetDuration(sample); -#line 8812 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_Sound_SetBufferSize); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_Sound_SetBufferSize) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::Sound_SetBufferSize(sample, size)"); - { - Sound_Sample* sample = INT2PTR(Sound_Sample *,SvIV(ST(0))); - Uint32 size = (Uint32)SvUV(ST(1)); - int RETVAL; - dXSTARG; -#line 4494 "SDL_perl.xs" - RETVAL = Sound_SetBufferSize(sample,size); -#line 8831 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_Sound_Decode); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_Sound_Decode) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::Sound_Decode(sample)"); - { - Sound_Sample* sample = INT2PTR(Sound_Sample *,SvIV(ST(0))); - Uint32 RETVAL; - dXSTARG; -#line 4502 "SDL_perl.xs" - RETVAL = Sound_Decode(sample); -#line 8849 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_Sound_DecodeAll); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_Sound_DecodeAll) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::Sound_DecodeAll(sample)"); - { - Sound_Sample* sample = INT2PTR(Sound_Sample *,SvIV(ST(0))); - Uint32 RETVAL; - dXSTARG; -#line 4510 "SDL_perl.xs" - RETVAL = Sound_DecodeAll(sample); -#line 8867 "SDL_perl.c" - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_Sound_Rewind); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_Sound_Rewind) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: SDL::Sound_Rewind(sample)"); - { - Sound_Sample* sample = INT2PTR(Sound_Sample *,SvIV(ST(0))); - int RETVAL; - dXSTARG; -#line 4518 "SDL_perl.xs" - RETVAL = Sound_Rewind(sample); -#line 8885 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -XS(XS_SDL_Sound_Seek); /* prototype to pass -Wmissing-prototypes */ -XS(XS_SDL_Sound_Seek) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: SDL::Sound_Seek(sample, ms)"); - { - Sound_Sample* sample = INT2PTR(Sound_Sample *,SvIV(ST(0))); - Uint32 ms = (Uint32)SvUV(ST(1)); - int RETVAL; - dXSTARG; -#line 4527 "SDL_perl.xs" - RETVAL = Sound_Seek(sample,ms); -#line 8904 "SDL_perl.c" - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -#endif -#ifdef __cplusplus -extern "C" -#endif -XS(boot_SDL); /* prototype to pass -Wmissing-prototypes */ -XS(boot_SDL) -{ - dXSARGS; - char* file = __FILE__; - - XS_VERSION_BOOTCHECK ; - - newXS("SDL::GetError", XS_SDL_GetError, file); - newXS("SDL::Init", XS_SDL_Init, file); - newXS("SDL::InitSubSystem", XS_SDL_InitSubSystem, file); - newXS("SDL::QuitSubSystem", XS_SDL_QuitSubSystem, file); - newXS("SDL::Quit", XS_SDL_Quit, file); - newXS("SDL::WasInit", XS_SDL_WasInit, file); - newXS("SDL::Delay", XS_SDL_Delay, file); - newXS("SDL::GetTicks", XS_SDL_GetTicks, file); - newXS("SDL::SetTimer", XS_SDL_SetTimer, file); - newXS("SDL::AddTimer", XS_SDL_AddTimer, file); - newXS("SDL::PerlTimerCallback", XS_SDL_PerlTimerCallback, file); - newXS("SDL::NewTimer", XS_SDL_NewTimer, file); - newXS("SDL::RemoveTimer", XS_SDL_RemoveTimer, file); - newXS("SDL::RWFromFile", XS_SDL_RWFromFile, file); - newXS("SDL::RWFromFP", XS_SDL_RWFromFP, file); - newXS("SDL::RWFromMem", XS_SDL_RWFromMem, file); - newXS("SDL::RWFromConstMem", XS_SDL_RWFromConstMem, file); - newXS("SDL::AllocRW", XS_SDL_AllocRW, file); - newXS("SDL::FreeRW", XS_SDL_FreeRW, file); - newXS("SDL::RWseek", XS_SDL_RWseek, file); - newXS("SDL::RWtell", XS_SDL_RWtell, file); - newXS("SDL::RWread", XS_SDL_RWread, file); - newXS("SDL::RWwrite", XS_SDL_RWwrite, file); - newXS("SDL::RWclose", XS_SDL_RWclose, file); - newXS("SDL::CDNumDrives", XS_SDL_CDNumDrives, file); - newXS("SDL::CDName", XS_SDL_CDName, file); - newXS("SDL::CDOpen", XS_SDL_CDOpen, file); - newXS("SDL::CDTrackId", XS_SDL_CDTrackId, file); - newXS("SDL::CDTrackType", XS_SDL_CDTrackType, file); - newXS("SDL::CDTrackLength", XS_SDL_CDTrackLength, file); - newXS("SDL::CDTrackOffset", XS_SDL_CDTrackOffset, file); - newXS("SDL::CDStatus", XS_SDL_CDStatus, file); - newXS("SDL::CDPlayTracks", XS_SDL_CDPlayTracks, file); - newXS("SDL::CDPlay", XS_SDL_CDPlay, file); - newXS("SDL::CDPause", XS_SDL_CDPause, file); - newXS("SDL::CDResume", XS_SDL_CDResume, file); - newXS("SDL::CDStop", XS_SDL_CDStop, file); - newXS("SDL::CDEject", XS_SDL_CDEject, file); - newXS("SDL::CDClose", XS_SDL_CDClose, file); - newXS("SDL::CDId", XS_SDL_CDId, file); - newXS("SDL::CDNumTracks", XS_SDL_CDNumTracks, file); - newXS("SDL::CDCurTrack", XS_SDL_CDCurTrack, file); - newXS("SDL::CDCurFrame", XS_SDL_CDCurFrame, file); - newXS("SDL::CDTrack", XS_SDL_CDTrack, file); - newXS("SDL::PumpEvents", XS_SDL_PumpEvents, file); - newXS("SDL::PushEvent", XS_SDL_PushEvent, file); - newXS("SDL::NewEvent", XS_SDL_NewEvent, file); - newXS("SDL::FreeEvent", XS_SDL_FreeEvent, file); - newXS("SDL::PollEvent", XS_SDL_PollEvent, file); - newXS("SDL::WaitEvent", XS_SDL_WaitEvent, file); - newXS("SDL::EventState", XS_SDL_EventState, file); - newXS("SDL::EventType", XS_SDL_EventType, file); - newXS("SDL::SetEventType", XS_SDL_SetEventType, file); - newXS("SDL::ActiveEventGain", XS_SDL_ActiveEventGain, file); - newXS("SDL::ActiveEventState", XS_SDL_ActiveEventState, file); - newXS("SDL::KeyEventState", XS_SDL_KeyEventState, file); - newXS("SDL::KeyEventSym", XS_SDL_KeyEventSym, file); - newXS("SDL::KeyEventMod", XS_SDL_KeyEventMod, file); - newXS("SDL::KeyEventUnicode", XS_SDL_KeyEventUnicode, file); - newXS("SDL::KeyEventScanCode", XS_SDL_KeyEventScanCode, file); - newXS("SDL::MouseMotionState", XS_SDL_MouseMotionState, file); - newXS("SDL::MouseMotionX", XS_SDL_MouseMotionX, file); - newXS("SDL::MouseMotionY", XS_SDL_MouseMotionY, file); - newXS("SDL::MouseMotionXrel", XS_SDL_MouseMotionXrel, file); - newXS("SDL::MouseMotionYrel", XS_SDL_MouseMotionYrel, file); - newXS("SDL::MouseButtonState", XS_SDL_MouseButtonState, file); - newXS("SDL::MouseButton", XS_SDL_MouseButton, file); - newXS("SDL::MouseButtonX", XS_SDL_MouseButtonX, file); - newXS("SDL::MouseButtonY", XS_SDL_MouseButtonY, file); - newXS("SDL::SysWMEventMsg", XS_SDL_SysWMEventMsg, file); - newXS("SDL::EnableUnicode", XS_SDL_EnableUnicode, file); - newXS("SDL::EnableKeyRepeat", XS_SDL_EnableKeyRepeat, file); - newXS("SDL::GetModState", XS_SDL_GetModState, file); - newXS("SDL::SetModState", XS_SDL_SetModState, file); - newXS("SDL::GetKeyName", XS_SDL_GetKeyName, file); - newXS("SDL::CreateRGBSurface", XS_SDL_CreateRGBSurface, file); - newXS("SDL::CreateRGBSurfaceFrom", XS_SDL_CreateRGBSurfaceFrom, file); -#if XSubPPtmpAAAA - newXS("SDL::IMGLoad", XS_SDL_IMGLoad, file); -#endif - newXS("SDL::SurfaceCopy", XS_SDL_SurfaceCopy, file); - newXS("SDL::FreeSurface", XS_SDL_FreeSurface, file); - newXS("SDL::SurfaceFlags", XS_SDL_SurfaceFlags, file); - newXS("SDL::SurfacePalette", XS_SDL_SurfacePalette, file); - newXS("SDL::SurfaceBitsPerPixel", XS_SDL_SurfaceBitsPerPixel, file); - newXS("SDL::SurfaceBytesPerPixel", XS_SDL_SurfaceBytesPerPixel, file); - newXS("SDL::SurfaceRshift", XS_SDL_SurfaceRshift, file); - newXS("SDL::SurfaceGshift", XS_SDL_SurfaceGshift, file); - newXS("SDL::SurfaceBshift", XS_SDL_SurfaceBshift, file); - newXS("SDL::SurfaceAshift", XS_SDL_SurfaceAshift, file); - newXS("SDL::SurfaceRmask", XS_SDL_SurfaceRmask, file); - newXS("SDL::SurfaceGmask", XS_SDL_SurfaceGmask, file); - newXS("SDL::SurfaceBmask", XS_SDL_SurfaceBmask, file); - newXS("SDL::SurfaceAmask", XS_SDL_SurfaceAmask, file); - newXS("SDL::SurfaceColorKey", XS_SDL_SurfaceColorKey, file); - newXS("SDL::SurfaceAlpha", XS_SDL_SurfaceAlpha, file); - newXS("SDL::SurfaceW", XS_SDL_SurfaceW, file); - newXS("SDL::SurfaceH", XS_SDL_SurfaceH, file); - newXS("SDL::SurfacePitch", XS_SDL_SurfacePitch, file); - newXS("SDL::SurfacePixels", XS_SDL_SurfacePixels, file); - newXS("SDL::SurfacePixel", XS_SDL_SurfacePixel, file); - newXS("SDL::MUSTLOCK", XS_SDL_MUSTLOCK, file); - newXS("SDL::SurfaceLock", XS_SDL_SurfaceLock, file); - newXS("SDL::SurfaceUnlock", XS_SDL_SurfaceUnlock, file); - newXS("SDL::GetVideoSurface", XS_SDL_GetVideoSurface, file); - newXS("SDL::VideoInfo", XS_SDL_VideoInfo, file); - newXS("SDL::NewRect", XS_SDL_NewRect, file); - newXS("SDL::FreeRect", XS_SDL_FreeRect, file); - newXS("SDL::RectX", XS_SDL_RectX, file); - newXS("SDL::RectY", XS_SDL_RectY, file); - newXS("SDL::RectW", XS_SDL_RectW, file); - newXS("SDL::RectH", XS_SDL_RectH, file); - newXS("SDL::ListModes", XS_SDL_ListModes, file); - newXS("SDL::NewColor", XS_SDL_NewColor, file); - newXS("SDL::ColorR", XS_SDL_ColorR, file); - newXS("SDL::ColorG", XS_SDL_ColorG, file); - newXS("SDL::ColorB", XS_SDL_ColorB, file); - newXS("SDL::FreeColor", XS_SDL_FreeColor, file); - newXS("SDL::NewPalette", XS_SDL_NewPalette, file); - newXS("SDL::PaletteNColors", XS_SDL_PaletteNColors, file); - newXS("SDL::PaletteColors", XS_SDL_PaletteColors, file); - newXS("SDL::VideoModeOK", XS_SDL_VideoModeOK, file); - newXS("SDL::SetVideoMode", XS_SDL_SetVideoMode, file); - newXS("SDL::UpdateRect", XS_SDL_UpdateRect, file); - newXS("SDL::UpdateRects", XS_SDL_UpdateRects, file); - newXS("SDL::Flip", XS_SDL_Flip, file); - newXS("SDL::SetColors", XS_SDL_SetColors, file); - newXS("SDL::MapRGB", XS_SDL_MapRGB, file); - newXS("SDL::MapRGBA", XS_SDL_MapRGBA, file); - newXS("SDL::GetRGB", XS_SDL_GetRGB, file); - newXS("SDL::GetRGBA", XS_SDL_GetRGBA, file); - newXS("SDL::SaveBMP", XS_SDL_SaveBMP, file); - newXS("SDL::SetColorKey", XS_SDL_SetColorKey, file); - newXS("SDL::SetAlpha", XS_SDL_SetAlpha, file); - newXS("SDL::DisplayFormat", XS_SDL_DisplayFormat, file); - newXS("SDL::DisplayFormatAlpha", XS_SDL_DisplayFormatAlpha, file); - newXS("SDL::ConvertRGB", XS_SDL_ConvertRGB, file); - newXS("SDL::ConvertRGBA", XS_SDL_ConvertRGBA, file); - newXS("SDL::BlitSurface", XS_SDL_BlitSurface, file); - newXS("SDL::FillRect", XS_SDL_FillRect, file); - newXS("SDL::GetAppState", XS_SDL_GetAppState, file); - newXS("SDL::WMSetCaption", XS_SDL_WMSetCaption, file); - newXS("SDL::WMGetCaption", XS_SDL_WMGetCaption, file); - newXS("SDL::WMSetIcon", XS_SDL_WMSetIcon, file); - newXS("SDL::WarpMouse", XS_SDL_WarpMouse, file); - newXS("SDL::GetMouseState", XS_SDL_GetMouseState, file); - newXS("SDL::GetRelativeMouseState", XS_SDL_GetRelativeMouseState, file); - newXS("SDL::NewCursor", XS_SDL_NewCursor, file); - newXS("SDL::FreeCursor", XS_SDL_FreeCursor, file); - newXS("SDL::SetCursor", XS_SDL_SetCursor, file); - newXS("SDL::GetCursor", XS_SDL_GetCursor, file); - newXS("SDL::ShowCursor", XS_SDL_ShowCursor, file); - newXS("SDL::NewAudioSpec", XS_SDL_NewAudioSpec, file); - newXS("SDL::FreeAudioSpec", XS_SDL_FreeAudioSpec, file); - newXS("SDL::NewAudioCVT", XS_SDL_NewAudioCVT, file); - newXS("SDL::FreeAudioCVT", XS_SDL_FreeAudioCVT, file); - newXS("SDL::ConvertAudioData", XS_SDL_ConvertAudioData, file); - newXS("SDL::OpenAudio", XS_SDL_OpenAudio, file); - newXS("SDL::GetAudioStatus", XS_SDL_GetAudioStatus, file); - newXS("SDL::PauseAudio", XS_SDL_PauseAudio, file); - newXS("SDL::LockAudio", XS_SDL_LockAudio, file); - newXS("SDL::UnlockAudio", XS_SDL_UnlockAudio, file); - newXS("SDL::CloseAudio", XS_SDL_CloseAudio, file); - newXS("SDL::FreeWAV", XS_SDL_FreeWAV, file); - newXS("SDL::LoadWAV", XS_SDL_LoadWAV, file); -#if XSubPPtmpAAAB - newXS("SDL::MixAudio", XS_SDL_MixAudio, file); - newXS("SDL::MixOpenAudio", XS_SDL_MixOpenAudio, file); - newXS("SDL::MixAllocateChannels", XS_SDL_MixAllocateChannels, file); - newXS("SDL::MixQuerySpec", XS_SDL_MixQuerySpec, file); - newXS("SDL::MixLoadWAV", XS_SDL_MixLoadWAV, file); - newXS("SDL::MixLoadMusic", XS_SDL_MixLoadMusic, file); - newXS("SDL::MixQuickLoadWAV", XS_SDL_MixQuickLoadWAV, file); - newXS("SDL::MixFreeChunk", XS_SDL_MixFreeChunk, file); - newXS("SDL::MixFreeMusic", XS_SDL_MixFreeMusic, file); - newXS("SDL::MixSetPostMixCallback", XS_SDL_MixSetPostMixCallback, file); - newXS("SDL::PerlMixMusicHook", XS_SDL_PerlMixMusicHook, file); - newXS("SDL::MixSetMusicHook", XS_SDL_MixSetMusicHook, file); - newXS("SDL::MixSetMusicFinishedHook", XS_SDL_MixSetMusicFinishedHook, file); - newXS("SDL::MixGetMusicHookData", XS_SDL_MixGetMusicHookData, file); - newXS("SDL::MixReverseChannels", XS_SDL_MixReverseChannels, file); - newXS("SDL::MixGroupChannel", XS_SDL_MixGroupChannel, file); - newXS("SDL::MixGroupChannels", XS_SDL_MixGroupChannels, file); - newXS("SDL::MixGroupAvailable", XS_SDL_MixGroupAvailable, file); - newXS("SDL::MixGroupCount", XS_SDL_MixGroupCount, file); - newXS("SDL::MixGroupOldest", XS_SDL_MixGroupOldest, file); - newXS("SDL::MixGroupNewer", XS_SDL_MixGroupNewer, file); - newXS("SDL::MixPlayChannel", XS_SDL_MixPlayChannel, file); - newXS("SDL::MixPlayChannelTimed", XS_SDL_MixPlayChannelTimed, file); - newXS("SDL::MixPlayMusic", XS_SDL_MixPlayMusic, file); - newXS("SDL::MixFadeInChannel", XS_SDL_MixFadeInChannel, file); - newXS("SDL::MixFadeInChannelTimed", XS_SDL_MixFadeInChannelTimed, file); - newXS("SDL::MixFadeInMusic", XS_SDL_MixFadeInMusic, file); - newXS("SDL::MixVolume", XS_SDL_MixVolume, file); - newXS("SDL::MixVolumeChunk", XS_SDL_MixVolumeChunk, file); - newXS("SDL::MixVolumeMusic", XS_SDL_MixVolumeMusic, file); - newXS("SDL::MixHaltChannel", XS_SDL_MixHaltChannel, file); - newXS("SDL::MixHaltGroup", XS_SDL_MixHaltGroup, file); - newXS("SDL::MixHaltMusic", XS_SDL_MixHaltMusic, file); - newXS("SDL::MixExpireChannel", XS_SDL_MixExpireChannel, file); - newXS("SDL::MixFadeOutChannel", XS_SDL_MixFadeOutChannel, file); - newXS("SDL::MixFadeOutGroup", XS_SDL_MixFadeOutGroup, file); - newXS("SDL::MixFadeOutMusic", XS_SDL_MixFadeOutMusic, file); - newXS("SDL::MixFadingMusic", XS_SDL_MixFadingMusic, file); - newXS("SDL::MixFadingChannel", XS_SDL_MixFadingChannel, file); - newXS("SDL::MixPause", XS_SDL_MixPause, file); - newXS("SDL::MixResume", XS_SDL_MixResume, file); - newXS("SDL::MixPaused", XS_SDL_MixPaused, file); - newXS("SDL::MixPauseMusic", XS_SDL_MixPauseMusic, file); - newXS("SDL::MixResumeMusic", XS_SDL_MixResumeMusic, file); - newXS("SDL::MixRewindMusic", XS_SDL_MixRewindMusic, file); - newXS("SDL::MixPausedMusic", XS_SDL_MixPausedMusic, file); - newXS("SDL::MixPlaying", XS_SDL_MixPlaying, file); - newXS("SDL::MixPlayingMusic", XS_SDL_MixPlayingMusic, file); - newXS("SDL::MixCloseAudio", XS_SDL_MixCloseAudio, file); -#endif - newXS("SDL::GLLoadLibrary", XS_SDL_GLLoadLibrary, file); - newXS("SDL::GLGetProcAddress", XS_SDL_GLGetProcAddress, file); - newXS("SDL::GLSetAttribute", XS_SDL_GLSetAttribute, file); - newXS("SDL::GLGetAttribute", XS_SDL_GLGetAttribute, file); - newXS("SDL::GLSwapBuffers", XS_SDL_GLSwapBuffers, file); - newXS("SDL::BigEndian", XS_SDL_BigEndian, file); - newXS("SDL::NumJoysticks", XS_SDL_NumJoysticks, file); - newXS("SDL::JoystickName", XS_SDL_JoystickName, file); - newXS("SDL::JoystickOpen", XS_SDL_JoystickOpen, file); - newXS("SDL::JoystickOpened", XS_SDL_JoystickOpened, file); - newXS("SDL::JoystickIndex", XS_SDL_JoystickIndex, file); - newXS("SDL::JoystickNumAxes", XS_SDL_JoystickNumAxes, file); - newXS("SDL::JoystickNumBalls", XS_SDL_JoystickNumBalls, file); - newXS("SDL::JoystickNumHats", XS_SDL_JoystickNumHats, file); - newXS("SDL::JoystickNumButtons", XS_SDL_JoystickNumButtons, file); - newXS("SDL::JoystickUpdate", XS_SDL_JoystickUpdate, file); - newXS("SDL::JoystickGetAxis", XS_SDL_JoystickGetAxis, file); - newXS("SDL::JoystickGetHat", XS_SDL_JoystickGetHat, file); - newXS("SDL::JoystickGetButton", XS_SDL_JoystickGetButton, file); - newXS("SDL::JoystickGetBall", XS_SDL_JoystickGetBall, file); - newXS("SDL::JoystickClose", XS_SDL_JoystickClose, file); - newXS("SDL::JoyAxisEventWhich", XS_SDL_JoyAxisEventWhich, file); - newXS("SDL::JoyAxisEventAxis", XS_SDL_JoyAxisEventAxis, file); - newXS("SDL::JoyAxisEventValue", XS_SDL_JoyAxisEventValue, file); - newXS("SDL::JoyButtonEventWhich", XS_SDL_JoyButtonEventWhich, file); - newXS("SDL::JoyButtonEventButton", XS_SDL_JoyButtonEventButton, file); - newXS("SDL::JoyButtonEventState", XS_SDL_JoyButtonEventState, file); - newXS("SDL::JoyHatEventWhich", XS_SDL_JoyHatEventWhich, file); - newXS("SDL::JoyHatEventHat", XS_SDL_JoyHatEventHat, file); - newXS("SDL::JoyHatEventValue", XS_SDL_JoyHatEventValue, file); - newXS("SDL::JoyBallEventWhich", XS_SDL_JoyBallEventWhich, file); - newXS("SDL::JoyBallEventBall", XS_SDL_JoyBallEventBall, file); - newXS("SDL::JoyBallEventXrel", XS_SDL_JoyBallEventXrel, file); - newXS("SDL::JoyBallEventYrel", XS_SDL_JoyBallEventYrel, file); - newXS("SDL::SetClipRect", XS_SDL_SetClipRect, file); - newXS("SDL::GetClipRect", XS_SDL_GetClipRect, file); -#if XSubPPtmpAAAC - newXS("SDL::NetInit", XS_SDL_NetInit, file); - newXS("SDL::NetQuit", XS_SDL_NetQuit, file); - newXS("SDL::NetNewIPaddress", XS_SDL_NetNewIPaddress, file); - newXS("SDL::NetIPaddressHost", XS_SDL_NetIPaddressHost, file); - newXS("SDL::NetIPaddressPort", XS_SDL_NetIPaddressPort, file); - newXS("SDL::NetFreeIPaddress", XS_SDL_NetFreeIPaddress, file); - newXS("SDL::NetResolveIP", XS_SDL_NetResolveIP, file); - newXS("SDL::NetResolveHost", XS_SDL_NetResolveHost, file); - newXS("SDL::NetTCPOpen", XS_SDL_NetTCPOpen, file); - newXS("SDL::NetTCPAccept", XS_SDL_NetTCPAccept, file); - newXS("SDL::NetTCPGetPeerAddress", XS_SDL_NetTCPGetPeerAddress, file); - newXS("SDL::NetTCPSend", XS_SDL_NetTCPSend, file); - newXS("SDL::NetTCPRecv", XS_SDL_NetTCPRecv, file); - newXS("SDL::NetTCPClose", XS_SDL_NetTCPClose, file); - newXS("SDL::NetAllocPacket", XS_SDL_NetAllocPacket, file); - newXS("SDL::NetAllocPacketV", XS_SDL_NetAllocPacketV, file); - newXS("SDL::NetResizePacket", XS_SDL_NetResizePacket, file); - newXS("SDL::NetFreePacket", XS_SDL_NetFreePacket, file); - newXS("SDL::NetFreePacketV", XS_SDL_NetFreePacketV, file); - newXS("SDL::NetUDPOpen", XS_SDL_NetUDPOpen, file); - newXS("SDL::NetUDPBind", XS_SDL_NetUDPBind, file); - newXS("SDL::NetUDPUnbind", XS_SDL_NetUDPUnbind, file); - newXS("SDL::NetUDPGetPeerAddress", XS_SDL_NetUDPGetPeerAddress, file); - newXS("SDL::NetUDPSendV", XS_SDL_NetUDPSendV, file); - newXS("SDL::NetUDPSend", XS_SDL_NetUDPSend, file); - newXS("SDL::NetUDPRecvV", XS_SDL_NetUDPRecvV, file); - newXS("SDL::NetUDPRecv", XS_SDL_NetUDPRecv, file); - newXS("SDL::NetUDPClose", XS_SDL_NetUDPClose, file); - newXS("SDL::NetAllocSocketSet", XS_SDL_NetAllocSocketSet, file); - newXS("SDL::NetTCP_AddSocket", XS_SDL_NetTCP_AddSocket, file); - newXS("SDL::NetUDP_AddSocket", XS_SDL_NetUDP_AddSocket, file); - newXS("SDL::NetTCP_DelSocket", XS_SDL_NetTCP_DelSocket, file); - newXS("SDL::NetUDP_DelSocket", XS_SDL_NetUDP_DelSocket, file); - newXS("SDL::NetCheckSockets", XS_SDL_NetCheckSockets, file); - newXS("SDL::NetSocketReady", XS_SDL_NetSocketReady, file); - newXS("SDL::NetFreeSocketSet", XS_SDL_NetFreeSocketSet, file); - newXS("SDL::NetWrite16", XS_SDL_NetWrite16, file); - newXS("SDL::NetWrite32", XS_SDL_NetWrite32, file); - newXS("SDL::NetRead16", XS_SDL_NetRead16, file); - newXS("SDL::NetRead32", XS_SDL_NetRead32, file); -#endif -#if XSubPPtmpAAAD - newXS("SDL::TTFInit", XS_SDL_TTFInit, file); - newXS("SDL::TTFQuit", XS_SDL_TTFQuit, file); - newXS("SDL::TTFOpenFont", XS_SDL_TTFOpenFont, file); - newXS("SDL::TTFGetFontStyle", XS_SDL_TTFGetFontStyle, file); - newXS("SDL::TTFSetFontStyle", XS_SDL_TTFSetFontStyle, file); - newXS("SDL::TTFFontHeight", XS_SDL_TTFFontHeight, file); - newXS("SDL::TTFFontAscent", XS_SDL_TTFFontAscent, file); - newXS("SDL::TTFFontDescent", XS_SDL_TTFFontDescent, file); - newXS("SDL::TTFFontLineSkip", XS_SDL_TTFFontLineSkip, file); - newXS("SDL::TTFGlyphMetrics", XS_SDL_TTFGlyphMetrics, file); - newXS("SDL::TTFSizeText", XS_SDL_TTFSizeText, file); - newXS("SDL::TTFSizeUTF8", XS_SDL_TTFSizeUTF8, file); - newXS("SDL::TTFSizeUNICODE", XS_SDL_TTFSizeUNICODE, file); - newXS("SDL::TTFRenderTextSolid", XS_SDL_TTFRenderTextSolid, file); - newXS("SDL::TTFRenderUTF8Solid", XS_SDL_TTFRenderUTF8Solid, file); - newXS("SDL::TTFRenderUNICODESolid", XS_SDL_TTFRenderUNICODESolid, file); - newXS("SDL::TTFRenderGlyphSolid", XS_SDL_TTFRenderGlyphSolid, file); - newXS("SDL::TTFRenderTextShaded", XS_SDL_TTFRenderTextShaded, file); - newXS("SDL::TTFRenderUTF8Shaded", XS_SDL_TTFRenderUTF8Shaded, file); - newXS("SDL::TTFRenderUNICODEShaded", XS_SDL_TTFRenderUNICODEShaded, file); - newXS("SDL::TTFRenderGlyphShaded", XS_SDL_TTFRenderGlyphShaded, file); - newXS("SDL::TTFRenderTextBlended", XS_SDL_TTFRenderTextBlended, file); - newXS("SDL::TTFRenderUTF8Blended", XS_SDL_TTFRenderUTF8Blended, file); - newXS("SDL::TTFRenderUNICODEBlended", XS_SDL_TTFRenderUNICODEBlended, file); - newXS("SDL::TTFRenderGlyphBlended", XS_SDL_TTFRenderGlyphBlended, file); - newXS("SDL::TTFCloseFont", XS_SDL_TTFCloseFont, file); - newXS("SDL::TTFPutString", XS_SDL_TTFPutString, file); -#endif - newXS("SDL::CreateYUVOverlay", XS_SDL_CreateYUVOverlay, file); - newXS("SDL::LockYUVOverlay", XS_SDL_LockYUVOverlay, file); - newXS("SDL::UnlockYUVOverlay", XS_SDL_UnlockYUVOverlay, file); - newXS("SDL::DisplayYUVOverlay", XS_SDL_DisplayYUVOverlay, file); - newXS("SDL::FreeYUVOverlay", XS_SDL_FreeYUVOverlay, file); - newXS("SDL::OverlayFormat", XS_SDL_OverlayFormat, file); - newXS("SDL::OverlayW", XS_SDL_OverlayW, file); - newXS("SDL::OverlayH", XS_SDL_OverlayH, file); - newXS("SDL::OverlayPlanes", XS_SDL_OverlayPlanes, file); - newXS("SDL::OverlayHW", XS_SDL_OverlayHW, file); - newXS("SDL::OverlayPitches", XS_SDL_OverlayPitches, file); - newXS("SDL::OverlayPixels", XS_SDL_OverlayPixels, file); - newXS("SDL::WMToggleFullScreen", XS_SDL_WMToggleFullScreen, file); - newXS("SDL::WMGrabInput", XS_SDL_WMGrabInput, file); - newXS("SDL::WMIconifyWindow", XS_SDL_WMIconifyWindow, file); - newXS("SDL::ResizeEventW", XS_SDL_ResizeEventW, file); - newXS("SDL::ResizeEventH", XS_SDL_ResizeEventH, file); - newXS("SDL::AudioDriverName", XS_SDL_AudioDriverName, file); - newXS("SDL::GetKeyState", XS_SDL_GetKeyState, file); -#if XSubPPtmpAAAE - newXS("SDL::NewSMPEGInfo", XS_SDL_NewSMPEGInfo, file); - newXS("SDL::FreeSMPEGInfo", XS_SDL_FreeSMPEGInfo, file); - newXS("SDL::SMPEGInfoHasAudio", XS_SDL_SMPEGInfoHasAudio, file); - newXS("SDL::SMPEGInfoHasVideo", XS_SDL_SMPEGInfoHasVideo, file); - newXS("SDL::SMPEGInfoWidth", XS_SDL_SMPEGInfoWidth, file); - newXS("SDL::SMPEGInfoHeight", XS_SDL_SMPEGInfoHeight, file); - newXS("SDL::SMPEGInfoCurrentFrame", XS_SDL_SMPEGInfoCurrentFrame, file); - newXS("SDL::SMPEGInfoCurrentFPS", XS_SDL_SMPEGInfoCurrentFPS, file); - newXS("SDL::SMPEGInfoCurrentAudioFrame", XS_SDL_SMPEGInfoCurrentAudioFrame, file); - newXS("SDL::SMPEGInfoCurrentOffset", XS_SDL_SMPEGInfoCurrentOffset, file); - newXS("SDL::SMPEGInfoTotalSize", XS_SDL_SMPEGInfoTotalSize, file); - newXS("SDL::SMPEGInfoCurrentTime", XS_SDL_SMPEGInfoCurrentTime, file); - newXS("SDL::SMPEGInfoTotalTime", XS_SDL_SMPEGInfoTotalTime, file); - newXS("SDL::SMPEGError", XS_SDL_SMPEGError, file); - newXS("SDL::NewSMPEG", XS_SDL_NewSMPEG, file); - newXS("SDL::FreeSMPEG", XS_SDL_FreeSMPEG, file); - newXS("SDL::SMPEGEnableAudio", XS_SDL_SMPEGEnableAudio, file); - newXS("SDL::SMPEGEnableVideo", XS_SDL_SMPEGEnableVideo, file); - newXS("SDL::SMPEGSetVolume", XS_SDL_SMPEGSetVolume, file); - newXS("SDL::SMPEGSetDisplay", XS_SDL_SMPEGSetDisplay, file); - newXS("SDL::SMPEGScaleXY", XS_SDL_SMPEGScaleXY, file); - newXS("SDL::SMPEGScale", XS_SDL_SMPEGScale, file); - newXS("SDL::SMPEGPlay", XS_SDL_SMPEGPlay, file); - newXS("SDL::SMPEGStatus", XS_SDL_SMPEGStatus, file); - newXS("SDL::SMPEGPause", XS_SDL_SMPEGPause, file); - newXS("SDL::SMPEGLoop", XS_SDL_SMPEGLoop, file); - newXS("SDL::SMPEGStop", XS_SDL_SMPEGStop, file); - newXS("SDL::SMPEGRewind", XS_SDL_SMPEGRewind, file); - newXS("SDL::SMPEGSeek", XS_SDL_SMPEGSeek, file); - newXS("SDL::SMPEGSkip", XS_SDL_SMPEGSkip, file); - newXS("SDL::SMPEGSetDisplayRegion", XS_SDL_SMPEGSetDisplayRegion, file); - newXS("SDL::SMPEGRenderFrame", XS_SDL_SMPEGRenderFrame, file); - newXS("SDL::SMPEGGetInfo", XS_SDL_SMPEGGetInfo, file); -#endif -#if XSubPPtmpAAAF - newXS("SDL::GFXRotoZoom", XS_SDL_GFXRotoZoom, file); - newXS("SDL::GFXZoom", XS_SDL_GFXZoom, file); - newXS("SDL::GFXPixelColor", XS_SDL_GFXPixelColor, file); - newXS("SDL::GFXPixelRGBA", XS_SDL_GFXPixelRGBA, file); - newXS("SDL::GFXHlineColor", XS_SDL_GFXHlineColor, file); - newXS("SDL::GFXHlineRGBA", XS_SDL_GFXHlineRGBA, file); - newXS("SDL::GFXVlineColor", XS_SDL_GFXVlineColor, file); - newXS("SDL::GFXVlineRGBA", XS_SDL_GFXVlineRGBA, file); - newXS("SDL::GFXRectangleColor", XS_SDL_GFXRectangleColor, file); - newXS("SDL::GFXRectangleRGBA", XS_SDL_GFXRectangleRGBA, file); - newXS("SDL::GFXBoxColor", XS_SDL_GFXBoxColor, file); - newXS("SDL::GFXBoxRGBA", XS_SDL_GFXBoxRGBA, file); - newXS("SDL::GFXLineColor", XS_SDL_GFXLineColor, file); - newXS("SDL::GFXLineRGBA", XS_SDL_GFXLineRGBA, file); - newXS("SDL::GFXAalineColor", XS_SDL_GFXAalineColor, file); - newXS("SDL::GFXAalineRGBA", XS_SDL_GFXAalineRGBA, file); - newXS("SDL::GFXCircleColor", XS_SDL_GFXCircleColor, file); - newXS("SDL::GFXCircleRGBA", XS_SDL_GFXCircleRGBA, file); - newXS("SDL::GFXAacircleColor", XS_SDL_GFXAacircleColor, file); - newXS("SDL::GFXAacircleRGBA", XS_SDL_GFXAacircleRGBA, file); - newXS("SDL::GFXFilledCircleColor", XS_SDL_GFXFilledCircleColor, file); - newXS("SDL::GFXFilledCircleRGBA", XS_SDL_GFXFilledCircleRGBA, file); - newXS("SDL::GFXEllipseColor", XS_SDL_GFXEllipseColor, file); - newXS("SDL::GFXEllipseRGBA", XS_SDL_GFXEllipseRGBA, file); - newXS("SDL::GFXAaellipseColor", XS_SDL_GFXAaellipseColor, file); - newXS("SDL::GFXAaellipseRGBA", XS_SDL_GFXAaellipseRGBA, file); - newXS("SDL::GFXFilledEllipseColor", XS_SDL_GFXFilledEllipseColor, file); - newXS("SDL::GFXFilledEllipseRGBA", XS_SDL_GFXFilledEllipseRGBA, file); - newXS("SDL::GFXFilledPieColor", XS_SDL_GFXFilledPieColor, file); - newXS("SDL::GFXFilledPieRGBA", XS_SDL_GFXFilledPieRGBA, file); - newXS("SDL::GFXPolygonColor", XS_SDL_GFXPolygonColor, file); - newXS("SDL::GFXPolygonRGBA", XS_SDL_GFXPolygonRGBA, file); - newXS("SDL::GFXAapolygonColor", XS_SDL_GFXAapolygonColor, file); - newXS("SDL::GFXAapolygonRGBA", XS_SDL_GFXAapolygonRGBA, file); - newXS("SDL::GFXFilledPolygonColor", XS_SDL_GFXFilledPolygonColor, file); - newXS("SDL::GFXFilledPolygonRGBA", XS_SDL_GFXFilledPolygonRGBA, file); - newXS("SDL::GFXCharacterColor", XS_SDL_GFXCharacterColor, file); - newXS("SDL::GFXCharacterRGBA", XS_SDL_GFXCharacterRGBA, file); - newXS("SDL::GFXStringColor", XS_SDL_GFXStringColor, file); - newXS("SDL::GFXStringRGBA", XS_SDL_GFXStringRGBA, file); -#endif -#if XSubPPtmpAAAG - newXS("SDL::SVG_Load", XS_SDL_SVG_Load, file); - newXS("SDL::SVG_LoadBuffer", XS_SDL_SVG_LoadBuffer, file); - newXS("SDL::SVG_SetOffset", XS_SDL_SVG_SetOffset, file); - newXS("SDL::SVG_SetScale", XS_SDL_SVG_SetScale, file); - newXS("SDL::SVG_RenderToSurface", XS_SDL_SVG_RenderToSurface, file); - newXS("SDL::SVG_Free", XS_SDL_SVG_Free, file); - newXS("SDL::SVG_Set_Flags", XS_SDL_SVG_Set_Flags, file); - newXS("SDL::SVG_Width", XS_SDL_SVG_Width, file); - newXS("SDL::SVG_HEIGHT", XS_SDL_SVG_HEIGHT, file); - newXS("SDL::SVG_SetClipping", XS_SDL_SVG_SetClipping, file); - newXS("SDL::SVG_Version", XS_SDL_SVG_Version, file); -#endif -#if XSubPPtmpAAAH - newXS("SDL::SoundAudioInfoFormat", XS_SDL_SoundAudioInfoFormat, file); - newXS("SDL::SoundAudioInfoChannels", XS_SDL_SoundAudioInfoChannels, file); - newXS("SDL::SoundAudioInforate", XS_SDL_SoundAudioInforate, file); - newXS("SDL::SoundDecoderInfoExtensions", XS_SDL_SoundDecoderInfoExtensions, file); - newXS("SDL::SoundDecoderInfoDescription", XS_SDL_SoundDecoderInfoDescription, file); - newXS("SDL::SoundDecoderInfoAuthor", XS_SDL_SoundDecoderInfoAuthor, file); - newXS("SDL::SoundDecoderInfoUrl", XS_SDL_SoundDecoderInfoUrl, file); - newXS("SDL::SoundSampleDecoder", XS_SDL_SoundSampleDecoder, file); - newXS("SDL::SoundSampleDesired", XS_SDL_SoundSampleDesired, file); - newXS("SDL::SoundSampleAcutal", XS_SDL_SoundSampleAcutal, file); - newXS("SDL::SoundSampleBuffer", XS_SDL_SoundSampleBuffer, file); - newXS("SDL::SoundSampleBufferSize", XS_SDL_SoundSampleBufferSize, file); - newXS("SDL::SoundSampleFlags", XS_SDL_SoundSampleFlags, file); - newXS("SDL::Sound_Init", XS_SDL_Sound_Init, file); - newXS("SDL::Sound_Quit", XS_SDL_Sound_Quit, file); - newXS("SDL::Sound_AvailableDecoders", XS_SDL_Sound_AvailableDecoders, file); - newXS("SDL::Sound_GetError", XS_SDL_Sound_GetError, file); - newXS("SDL::Sound_ClearError", XS_SDL_Sound_ClearError, file); - newXS("SDL::Sound_NewSample", XS_SDL_Sound_NewSample, file); - newXS("SDL::Sound_NewSampleFromMem", XS_SDL_Sound_NewSampleFromMem, file); - newXS("SDL::Sound_NewSampleFromFile", XS_SDL_Sound_NewSampleFromFile, file); - newXS("SDL::Sound_FreeSample", XS_SDL_Sound_FreeSample, file); - newXS("SDL::Sound_GetDuration", XS_SDL_Sound_GetDuration, file); - newXS("SDL::Sound_SetBufferSize", XS_SDL_Sound_SetBufferSize, file); - newXS("SDL::Sound_Decode", XS_SDL_Sound_Decode, file); - newXS("SDL::Sound_DecodeAll", XS_SDL_Sound_DecodeAll, file); - newXS("SDL::Sound_Rewind", XS_SDL_Sound_Rewind, file); - newXS("SDL::Sound_Seek", XS_SDL_Sound_Seek, file); -#endif - - /* Initialisation Section */ - -#if XSubPPtmpAAAA -#endif -#if XSubPPtmpAAAB -#endif -#if XSubPPtmpAAAC -#endif -#if XSubPPtmpAAAD -#endif -#if XSubPPtmpAAAE -#endif -#if XSubPPtmpAAAF -#endif -#if XSubPPtmpAAAG -#endif -#if XSubPPtmpAAAH -#endif -#line 9403 "SDL_perl.c" - - /* End of Initialisation Section */ - - XSRETURN_YES; -} - diff --git a/src/SDL_perl.o b/src/SDL_perl.o deleted file mode 100644 index 80ece95..0000000 Binary files a/src/SDL_perl.o and /dev/null differ diff --git a/t/apppm.t b/t/apppm.t deleted file mode 100644 index c577511..0000000 --- a/t/apppm.t +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2003 Tels -# Copyright (C) 2004 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# -# -# basic testing of SDL::App - -BEGIN { - unshift @INC, 'blib/lib','blib/arch'; -} - -use strict; -use SDL::Config; - -use Test::More; - -plan ( tests => 2 ); - -use_ok( 'SDL::App' ); - -can_ok ('SDL::App', qw/ - new - resize - title - delay - ticks - error - warp - fullscreen - iconify - grab_input - loop - sync - attribute /); diff --git a/t/cdrompm.t b/t/cdrompm.t deleted file mode 100644 index 5c8c212..0000000 --- a/t/cdrompm.t +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2003 Tels -# Copyright (C) 2004 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# -# -# basic testing of SDL::Cdrom - -BEGIN { - unshift @INC, 'blib/lib','blib/arch'; -} - -use strict; - -use Test::More; - -plan ( tests => 3 ); - -use_ok( 'SDL::Cdrom' ); - -can_ok ('main', qw/ CD_NUM_DRIVES /); - -can_ok ('SDL::Cdrom', qw/ - new - name - status - play - pause - resume - stop - eject - id - num_tracks - track - current - current_frame /); diff --git a/t/colorpm.t b/t/colorpm.t deleted file mode 100644 index 67dba94..0000000 --- a/t/colorpm.t +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2003 Tels -# Copyright (C) 2004 David J. Goehrig -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# -# -# basic testing of SDL::Color - -BEGIN { - unshift @INC, 'blib/lib','blib/arch'; -} - -use strict; - -use Test::More; - -plan ( tests => 10 ); - -use_ok( 'SDL::Color' ); - -can_ok ('SDL::Color', qw/ - new - r - g - b - pixel /); - -# some basic tests: - -my $color = SDL::Color->new(); -is (ref($color), 'SDL::Color', 'new was ok'); -is ($color->r(),0, 'r is 0'); -is ($color->g(),0, 'g is 0'); -is ($color->b(),0, 'b is 0'); - -$color = SDL::Color->new( -r => 0xff, -g => 0xff, -b => 0xff); -is (ref($color), 'SDL::Color', 'new was ok'); -is ($color->r(),255, 'r is 255'); -is ($color->g(),255, 'g is 255'); -is ($color->b(),255, 'b is 255'); - diff --git a/t/cursorpm.t b/t/cursorpm.t deleted file mode 100644 index f6f4283..0000000 --- a/t/cursorpm.t +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2003 Tels -# Copyright (C) 2004 David J. Goehrig -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# -# -# basic testing of SDL::Cursor - -BEGIN { - unshift @INC, 'blib/lib','blib/arch'; -} - -use strict; - -use Test::More; - -plan ( tests => 2 ); - -use_ok( 'SDL::Cursor' ); - -can_ok ('SDL::Cursor', qw/ - new - warp - use - get - show /); - diff --git a/t/eventpm.t b/t/eventpm.t deleted file mode 100644 index 3dca888..0000000 --- a/t/eventpm.t +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2003 Tels -# Copyright (C) 2004 David J. Goehrig -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# -# -# basic testing of SDL::Event - -BEGIN { - unshift @INC, 'blib/lib','blib/arch'; -} - -use strict; - -use Test::More; - -plan ( tests => 2 ); - -use_ok( 'SDL::Event' ); - -can_ok ('SDL::Event', qw/ - new - type - pump - poll - wait - set - set_unicode - set_key_repeat - active_gain - active_state - key_state - key_sym - key_name - key_mod - key_unicode - key_scancode - motion_state - motion_x - motion_y - motion_xrel - motion_yrel - button - button_state - button_x - button_y /); - - - diff --git a/t/fontpm.t b/t/fontpm.t deleted file mode 100644 index db1d7b8..0000000 --- a/t/fontpm.t +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2003 Tels -# Copyright (C) 2004 David J. Goehrig -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# -# -# basic testing of SDL::Font - -BEGIN { - unshift @INC, 'blib/lib','blib/arch'; -} - -use strict; -use SDL::Config; - -use Test::More; - -if ( SDL::Config->has('SDL_image') ) { - plan ( tests => 2 ); -} else { - plan ( skip_all => 'SDL_image support not compiled' ); -} - -use_ok( 'SDL::Font' ); - -can_ok ('SDL::Font', qw/ new use /); - - diff --git a/t/mixerpm.t b/t/mixerpm.t deleted file mode 100644 index 0ad5dbe..0000000 --- a/t/mixerpm.t +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2003 Tels -# Copyright (C) 2004 David J. Goehrig -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# -# -# basic testing of SDL::Mixer - -BEGIN { - unshift @INC, 'blib/lib','blib/arch'; -} - -use strict; -use SDL; -use SDL::Config; - -use Test::More; - -if ( SDL::Config->has('SDL_mixer') ) { - plan ( tests => 3 ); -} else { - plan ( skip_all => 'SDL_mixer support not compiled' ); -} - -use_ok( 'SDL::Mixer' ); - -can_ok ('SDL::Mixer', qw/ - new - query_spec - reserve_channels - allocate_channels - group_channel - group_channels - group_available - group_count - group_oldest - group_newer - play_channel - play_music - fade_in_channel - fade_in_music - channel_volume - music_volume - halt_channel - halt_group - halt_music - channel_expire - fade_out_channel - fade_out_group - fade_out_music - fading_music - fading_channel - pause - resume - paused - pause_music - resume_music - rewind_music - music_paused - playing - playing_music - /); - -# these are exported by default, so main:: should know them: -SDL::Init(SDL_INIT_AUDIO); -my $mixer = SDL::Mixer->new(); -isa_ok($mixer, 'SDL::Mixer'); - diff --git a/t/mpegpm.t b/t/mpegpm.t deleted file mode 100644 index 348a31c..0000000 --- a/t/mpegpm.t +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2003 Tels -# Copyright (C) 2004 David J. Goehrig -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# -# -# basic testing of SDL::MPEG - -BEGIN { - unshift @INC, 'blib/lib','blib/arch'; -} - -use strict; -use SDL::Config; - -use Test::More; - -if ( SDL::Config->has('smpeg') && SDL::Config->has('SDL_mixer') ) { - plan ( tests => 2 ); -} else { - plan ( skip_all => - ( SDL::Config->has('smpeg') ? '' : ' smpeg support not compiled') . - ( SDL::Config->has('SDL_mixer') ? '' : ' SDL_mixer support not compiled') ); -} - -use_ok( 'SDL::MPEG' ); - -can_ok ('SDL::MPEG', qw/ - new - has_audio - has_video - width - height - size - offset - frame - fps - time - length /); - - diff --git a/t/musicpm.t b/t/musicpm.t deleted file mode 100644 index a5ca6c6..0000000 --- a/t/musicpm.t +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2003 Tels -# Copyright (C) 2004 David J. Goehrig -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# -# -# basic testing of SDL::Music - -BEGIN { - unshift @INC, 'blib/lib','blib/arch'; -} - -use strict; -use SDL::Config; - -use Test::More; - -plan ( tests => 2 ); - -use_ok( 'SDL::Music' ); - -can_ok ('SDL::Music', qw/ - new - /); - - diff --git a/t/opengl.t b/t/opengl.t deleted file mode 100644 index 9c19e96..0000000 --- a/t/opengl.t +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2003 Tels -# Copyright (C) 2004 David J. Goehrig -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# -# -# basic testing of SDL::OpenGL - -BEGIN { - unshift @INC, 'blib/lib','blib/arch'; -} - -use strict; -use SDL::Config; - -use Test::More; - -if ( SDL::Config->has('GL') && SDL::Config->has('GLU') ) { - plan ( tests => 3 ); -} else { - plan ( skip_all => 'OpenGL support not compiled' ); -} - -use_ok('SDL::OpenGL'); - -can_ok('main', qw/ - glBegin - glClear - glClearColor - glColor - glCullFace - glEnable - glEnd - glEvalCoord1 - glEvalCoord2 - glEvalMesh2 - glFrontFace - glFrustum - glGet - glLight - glLoadIdentity - glMap1 - glMap2 - glMapGrid2 - glMaterial - glMatrixMode - glPointSize - glPopMatrix - glPushMatrix - glRotate - glScale - glShadeModel - glTranslate - glVertex - glVertex - glViewport /); - -can_ok('main',qw/ - gluPerspective - gluBeginSurface - gluBeginTrim - gluEndSurface - gluEndTrim - gluNewNurbsRenderer - gluNurbsCurve - gluNurbsProperty - gluNurbsSurface - gluPwlCurve /); diff --git a/t/palettepm.t b/t/palettepm.t deleted file mode 100644 index 3cc9cfc..0000000 --- a/t/palettepm.t +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2003 Tels -# Copyright (C) 2004 David J. Goehrig -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# -# -# basic testing of SDL::Palette - -BEGIN { - unshift @INC, 'blib/lib','blib/arch'; -} - -use strict; - -use Test::More; - -plan ( tests => 2 ); - -use_ok( 'SDL::Palette' ); - -can_ok ('SDL::Palette', qw/ - new - size - red - green - blue - color /); - diff --git a/t/rectpm.t b/t/rectpm.t deleted file mode 100644 index 422f64a..0000000 --- a/t/rectpm.t +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2003 Tels -# Copyright (C) 2004 David J. Goehrig -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# -# -# basic testing of SDL::Rect - -BEGIN { - unshift @INC, 'blib/lib','blib/arch'; -} - -use strict; - -use Test::More; - -plan ( tests => 15 ); - -use_ok( 'SDL::Rect' ); - -can_ok ('SDL::Rect', qw/ - new - x - y - width - height /); - -my $rect = SDL::Rect->new(); - -# creating with defaults -is (ref($rect),'SDL::Rect','new went ok'); -is ($rect->x(), 0, 'x is 0'); -is ($rect->y(), 0, 'y is 0'); -is ($rect->width(), 0, 'w is 0'); -is ($rect->height(), 0, 'h is 0'); - -# set and get at the same time -is ($rect->x(12), 12, 'x is now 12'); -is ($rect->y(123), 123, 'y is now 12'); -is ($rect->width(45), 45, 'w is now 45'); -is ($rect->height(67), 67, 'h is now 67'); - -# get alone -is ($rect->x(), 12, 'x is 12'); -is ($rect->y(), 123, 'y is 12'); -is ($rect->width(), 45, 'w is 45'); -is ($rect->height(), 67, 'h is 67'); - diff --git a/t/sdlpm.t b/t/sdlpm.t deleted file mode 100644 index 9545b02..0000000 --- a/t/sdlpm.t +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2003 Tels -# Copyright (C) 2004 David J. Goehrig -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# -# -# basic testing of SDL - -BEGIN { - unshift @INC, 'blib/lib','blib/arch'; -} - -use strict; -use SDL::Config; - -use Test::More; - -plan ( tests => 9 ); - -use_ok( 'SDL' ); - -can_ok ('SDL', qw/in verify/); - -is (SDL::in('foo','bar'), 0, "foo isn't in ('bar')"); -is (SDL::in('foo','foo'), 1, "foo is in ('foo')"); -is (SDL::in('foo','foo','bar'), 1, "foo is in ('foo','bar')"); -is (SDL::in('foo','foo','bar','foo'), 1, "foo is once in ('foo','bar','foo')"); -is (SDL::in('foo','fab','bar'), 0, "foo isn't in ('fab','bar')"); -is (SDL::in('foo','fab',undef,'bar'), 0, "foo isn't in ('fab',undef,'bar')"); -is (SDL::in('foo','fab',undef,'foo'), 1, "foo is in ('fab',undef,'foo')"); - diff --git a/t/soundpm.t b/t/soundpm.t deleted file mode 100644 index b63c397..0000000 --- a/t/soundpm.t +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2003 Tels -# Copyright (C) 2004 David J. Goehrig -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# -# -# basic testing of SDL::Sound - -BEGIN { - unshift @INC, 'blib/lib','blib/arch'; -} - -use strict; -use SDL::Config; - -use Test::More; - -plan ( tests => 2 ); - -use_ok( 'SDL::Sound' ); - -can_ok ('SDL::Sound', qw/ - new - volume - /); - diff --git a/t/surfacepm.t b/t/surfacepm.t deleted file mode 100644 index 9e698b3..0000000 --- a/t/surfacepm.t +++ /dev/null @@ -1,113 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2003 Tels -# Copyright (C) 2004 David J. Goehrig -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# -# -# basic testing of SDL::Surface - -BEGIN { - unshift @INC, 'blib/lib','blib/arch'; -} - -use strict; - -use Test::More; - -plan ( tests => 3 ); - -use_ok( 'SDL::Surface' ); - -can_ok ('SDL::Surface', qw/ - new - flags - palette - bpp - bytes_per_pixel - Rshift - Gshift - Bshift - Ashift - Rmask - Bmask - Gmask - Amask - color_key - alpha - width - height - pitch - pixels - pixel - fill - lockp - lock - unlock - update - flip - blit - set_colors - set_color_key - set_alpha - display_format - rgb - rgba - print - save_bmp - video_info /); - -my $surface = SDL::Surface->new(); - -isa_ok($surface,'SDL::Surface'); - -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# diff --git a/t/timerpm.t b/t/timerpm.t deleted file mode 100644 index 3e3624b..0000000 --- a/t/timerpm.t +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2003 Tels -# Copyright (C) 2004 David J. Goehrig -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# -# -# basic testing of SDL::Timer - -BEGIN { - unshift @INC, 'blib/lib','blib/arch'; -} - -use strict; -use SDL; -use SDL::Config; - -use Test::More; - -plan ( tests => 4 ); - -use_ok( 'SDL::Timer' ); - -can_ok ('SDL::Timer', qw/ - new run stop - /); - -my $fired = 0; - -SDL::Init(SDL_INIT_TIMER); - -my $timer = new SDL::Timer - sub { $fired++ }, -delay => 30, -times => 1; - -isa_ok($timer, 'SDL::Timer'); - -SDL::Delay(100); -is ($fired, 1,'timer fired once'); diff --git a/t/toolfontpm.t b/t/toolfontpm.t deleted file mode 100644 index e7efa73..0000000 --- a/t/toolfontpm.t +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2003 Tels -# Copyright (C) 2004 David J. Goehrig -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# -# -# basic testing of SDL::Tool::Font - -BEGIN { - unshift @INC, 'blib/lib','blib/arch'; -} - -use strict; -use SDL::Config; - -use Test::More; - -if ( SDL::Config->has('SDL_image') - && SDL::Config->has('SDL_ttf') ) { - plan ( tests => 2 ); -} else { - plan ( skip_all => - ( SDL::Config->has('SDL_image') - ? '' - : ' SDL_image support not compiled') - . ( SDL::Config->has('SDL_ttf') - ? '' - : ' SDL_ttf support not compiled')); -} - -use_ok( 'SDL::Tool::Font' ); - -can_ok ('SDL::Tool::Font', qw/ - new - print - /); - diff --git a/t/toolgraphicpm.t b/t/toolgraphicpm.t deleted file mode 100644 index 36dc0f7..0000000 --- a/t/toolgraphicpm.t +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2003 Tels -# Copyright (C) 2004 David J. Goehrig -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# -# -# basic testing of SDL::Tool::Graphic - -BEGIN { - unshift @INC, 'blib/lib','blib/arch'; -} - -use strict; -use SDL::Config; - -use Test::More; - -if ( SDL::Config->has('SDL_gfx') ) { - plan ( tests => 3 ); -} else { - plan ( skip_all => 'SDL_gfx support not compiled' ); -} - -use_ok( 'SDL::Tool::Graphic' ); - -can_ok ('SDL::Tool::Graphic', qw/ - new zoom rotoZoom - /); - -my $gtool = SDL::Tool::Graphic->new(); -isa_ok ($gtool, 'SDL::Tool::Graphic'); - diff --git a/t/ttfontpm.t b/t/ttfontpm.t deleted file mode 100644 index 823bea9..0000000 --- a/t/ttfontpm.t +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2003 Tels -# Copyright (C) 2004 David J. Goehrig -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# -# -# basic testing of SDL::TTFont - -BEGIN { - unshift @INC, 'blib/lib','blib/arch'; -} - -use strict; -use SDL::Config; - -use Test::More; - -if ( SDL::Config->has('SDL_ttf') ) { - plan ( tests => 2 ); -} else { - plan ( skip_all => 'SDL_ttf support not compiled' ); -} - -use_ok( 'SDL::TTFont' ); - -can_ok ('SDL::TTFont', qw/ - new - print - width - height - ascent - descent - normal - bold - italic - underline - text_shaded - text_solid - text_blended - utf8_shaded - utf8_solid - utf8_blended - unicode_shaded - unicode_solid - unicode_blended /); diff --git a/t/videopm.t b/t/videopm.t deleted file mode 100644 index 31d40d6..0000000 --- a/t/videopm.t +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2003 Tels -# Copyright (C) 2004 David J. Goehrig -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig\@cpan.org -# -# -# basic testing of SDL::VIDEO - -BEGIN { - unshift @INC, 'blib/lib','blib/arch'; -} - -use strict; -use SDL::Config; - -use Test::More; - -if ( SDL::Config->has('smpeg') && SDL::Config->has('SDL_mixer') ) { - plan ( tests => 2 ); -} else { - plan ( skip_all => - ( SDL::Config->has('smpeg') ? '' : ' smpeg support not compiled') . - ( SDL::Config->has('SDL_mixer') ? '' : ' SDL_mixer support not compiled') ); -} - -use_ok( 'SDL::Video' ); - -can_ok ('SDL::Video', qw/ - new - error - audio - video - volume - display - scale - play - pause - stop - rewind - seek - skip - loop - region - frame - info - status /); - - diff --git a/test/OpenGL/tutorial/lesson02.sdlpl b/test/OpenGL/tutorial/lesson02.sdlpl deleted file mode 100644 index 1752eb1..0000000 --- a/test/OpenGL/tutorial/lesson02.sdlpl +++ /dev/null @@ -1,156 +0,0 @@ -#!/usr/bin/env perl -# -# lesson02.pl -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig@cpan.org -# - -use strict; -use Getopt::Long; -use SDL; -use SDL::App; -use SDL::OpenGL; -use SDL::Event; - -my $arg_screen_width =640; -my $arg_screen_height=512; -my $arg_fullscreen=0; - -GetOptions( - "width:i" => \$arg_screen_width, - "height:i" => \$arg_screen_height, - "fullscreen!" => \$arg_fullscreen, - - ) or die $!; - -main(); -exit; - - -sub main - { - my $done=0; - - my $app = new SDL::App ( -title => "Jeff Molofee's GL Code Tutorial ... NeHe '99", - -icon => "icon.png", - -width => $arg_screen_width, - -height =>$arg_screen_height, - -d => 16, - -gl => 1, - - ); - $app->fullscreen() if ($arg_fullscreen); - - SDL::ShowCursor (0); - - my $event = new SDL::Event; - $event->set(SDL_SYSWMEVENT,SDL_IGNORE);# - - InitGL($arg_screen_width, $arg_screen_height); - - while ( ! $done ) { - - DrawGLScene(); - - $app->sync(); - - $event->pump; - $event->poll; - - - if ( $event->type == SDL_QUIT ) { - $done = 1; - } - - if ( $event->type == SDL_KEYDOWN ) { - if ( $event->key_sym == SDLK_ESCAPE ) { - $done = 1; - } - } - } - } - - - - - - -######################################################################### -#Pretty much in original form, but 'Perlised' - - -sub InitGL - { - my ($Width, $Height)=@_; - - glViewport(0, 0, $Width, $Height); - glClearColor(0.0, 0.0, 0.0, 0.0); # This Will Clear The Background Color To Black - glClearDepth(1.0); # Enables Clearing Of The Depth Buffer - glDepthFunc(GL_LESS()); # The Type Of Depth Test To Do - glEnable(GL_DEPTH_TEST()); # Enables Depth Testing - glShadeModel(GL_SMOOTH()); # Enables Smooth Color Shading - - glMatrixMode(GL_PROJECTION()); - glLoadIdentity(); # Reset The Projection Matrix - - gluPerspective(45.0, $Width/$Height, 0.1, 100.0); # Calculate The Aspect Ratio Of The Window - - glMatrixMode(GL_MODELVIEW()); - } - - - -# The main drawing function. -sub DrawGLScene - { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); # Clear The Screen And The Depth Buffer - glLoadIdentity(); # Reset The View - - glTranslate(-1.5,0.0,-6.0); # Move Left 1.5 Units And Into The Screen 6.0 - - # draw a triangle - glBegin(GL_POLYGON); # start drawing a polygon - glVertex( 0.0, 1.0, 0.0); # Top - glVertex( 1.0,-1.0, 0.0); # Bottom Right - glVertex(-1.0,-1.0, 0.0); # Bottom Left - glEnd(); # we're done with the polygon - - glTranslate(3.0,0.0,0.0); # Move Right 3 Units - - # draw a square (quadrilateral) - glBegin(GL_QUADS); # start drawing a polygon (4 sided) - glVertex(-1.0, 1.0, 0.0); # Top Left - glVertex( 1.0, 1.0, 0.0); # Top Right - glVertex( 1.0,-1.0, 0.0); # Bottom Right - glVertex(-1.0,-1.0, 0.0); # Bottom Left - glEnd(); # done with the polygon - - - } - - - - diff --git a/test/OpenGL/tutorial/lesson03.sdlpl b/test/OpenGL/tutorial/lesson03.sdlpl deleted file mode 100644 index d2129e1..0000000 --- a/test/OpenGL/tutorial/lesson03.sdlpl +++ /dev/null @@ -1,161 +0,0 @@ -#!/usr/bin/env perl -# -# lesson03.pl -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig@cpan.org - -use strict; -use Getopt::Long; -use SDL; -use SDL::App; -use SDL::OpenGL; -use SDL::Event; - -my $arg_screen_width =640; -my $arg_screen_height=512; -my $arg_fullscreen=0; - -GetOptions( - "width:i" => \$arg_screen_width, - "height:i" => \$arg_screen_height, - "fullscreen!" => \$arg_fullscreen, - ) or die $!; - -main(); -exit; - - -sub main - { - my $done=0; - - my $app = new SDL::App ( -title => "Jeff Molofee's GL Code Tutorial ... NeHe '99", - -icon => "icon.png", - -width => $arg_screen_width, - -height =>$arg_screen_height, - -d => 16, - -opengl => 1, - ); - $app->fullscreen() if $arg_fullscreen; - - SDL::ShowCursor(0); - - my $event = new SDL::Event; - $event->set(SDL_SYSWMEVENT,SDL_IGNORE);# - - - - InitGL($arg_screen_width, $arg_screen_height); - - while ( ! $done ) { - - DrawGLScene(); - - $app->sync(); - - $event->pump; - $event->poll; - - - if ( $event->type == SDL_QUIT ) { - $done = 1; - } - - if ( $event->type == SDL_KEYDOWN ) { - if ( $event->key_sym == SDLK_ESCAPE ) { - $done = 1; - } - } - } - } - - - - - - -######################################################################### -#Pretty much in original form, but 'Perlised' - - -sub InitGL - { - my ($Width, $Height)=@_; - - glViewport(0, 0, $Width, $Height); - glClearColor(0.0, 0.0, 0.0, 0.0); # This Will Clear The Background Color To Black - glClearDepth(1.0); # Enables Clearing Of The Depth Buffer - glDepthFunc(GL_LESS); # The Type Of Depth Test To Do - glEnable(GL_DEPTH_TEST); # Enables Depth Testing - glShadeModel(GL_SMOOTH); # Enables Smooth Color Shading - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); # Reset The Projection Matrix - - gluPerspective(45.0, $Width/$Height, 0.1, 100.0); # Calculate The Aspect Ratio Of The Window - - glMatrixMode(GL_MODELVIEW); - } - - - -# The main drawing function. -sub DrawGLScene - { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); # Clear The Screen And The Depth Buffer - glLoadIdentity(); # Reset The View - - glTranslate(-1.5,0.0,-6.0); # Move Left 1.5 Units And Into The Screen 6.0 - - # draw a triangle (in smooth coloring mode) - glBegin(GL_POLYGON); # start drawing a polygon - glColor(1.0,0.0,0.0); # Set The Color To Red - glVertex( 0.0, 1.0, 0.0); # Top - glColor(0.0,1.0,0.0); # Set The Color To Green - glVertex( 1.0,-1.0, 0.0); # Bottom Right - glColor(0.0,0.0,1.0); # Set The Color To Blue - glVertex(-1.0,-1.0, 0.0); # Bottom Left - glEnd(); # we're done with the polygon (smooth color interpolation) - - glTranslate(3.0,0.0,0.0); # Move Right 3 Units - - # draw a square (quadrilateral) - glColor(0.5,0.5,1.0); # set color to a blue shade. - glBegin(GL_QUADS); # start drawing a polygon (4 sided) - glVertex(-1.0, 1.0, 0.0); # Top Left - glVertex( 1.0, 1.0, 0.0); # Top Right - glVertex( 1.0,-1.0, 0.0); # Bottom Right - glVertex(-1.0,-1.0, 0.0); # Bottom Left - glEnd(); # done with the polygon - - - - - } - - - - diff --git a/test/OpenGL/tutorial/lesson04.sdlpl b/test/OpenGL/tutorial/lesson04.sdlpl deleted file mode 100644 index 82e0d3a..0000000 --- a/test/OpenGL/tutorial/lesson04.sdlpl +++ /dev/null @@ -1,179 +0,0 @@ -#!/usr/bin/env perl -# -# lesson04.pl -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig@cpan.org -# - -use strict; -use Getopt::Long; -use SDL; -use SDL::App; -use SDL::OpenGL; -use SDL::Event; - -my $arg_screen_width =640; -my $arg_screen_height=512; -my $arg_fullscreen=0; -my $delay=30; - -GetOptions( - "width:i" => \$arg_screen_width, - "height:i" => \$arg_screen_height, - "fullscreen!" => \$arg_fullscreen, - "delay:i" => \$delay, - ) or die < "Jeff Molofee's GL Code Tutorial ... NeHe '99", - -icon => "icon.png", - -width => $arg_screen_width, - -height =>$arg_screen_height, - -gl => 1, - ); - $app->fullscreen() if $arg_fullscreen; - - SDL::ShowCursor(0); - - my $event = new SDL::Event; - $event->set(SDL_SYSWMEVENT,SDL_IGNORE);# - - - - InitGL($arg_screen_width, $arg_screen_height); - - while ( ! $done ) { - - DrawGLScene(); - - $app->sync(); - $app->delay($delay); - - $event->pump; - $event->poll; - - - if ( $event->type == SDL_QUIT ) { - $done = 1; - } - - if ( $event->type == SDL_KEYDOWN ) { - if ( $event->key_sym == SDLK_ESCAPE ) { - $done = 1; - } - } - } - } - - - - - - -######################################################################### -#Pretty much in original form, but 'Perlised' - - - - - -sub InitGL - { - my ($Width, $Height)=@_; - - glViewport(0, 0, $Width, $Height); - glClearColor(0.0, 0.0, 0.0, 0.0); # This Will Clear The Background Color To Black - glClearDepth(1.0); # Enables Clearing Of The Depth Buffer - glDepthFunc(GL_LESS); # The Type Of Depth Test To Do - glEnable(GL_DEPTH_TEST); # Enables Depth Testing - glShadeModel(GL_SMOOTH); # Enables Smooth Color Shading - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); # Reset The Projection Matrix - - gluPerspective(45.0, $Width/$Height, 0.1, 100.0); # Calculate The Aspect Ratio Of The Window - - glMatrixMode(GL_MODELVIEW); - } - - - -# The main drawing function. -sub DrawGLScene - { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); # Clear The Screen And The Depth Buffer - glLoadIdentity(); # Reset The View - - glTranslate(-1.5,0.0,-6.0); # Move Left 1.5 Units And Into The Screen 6.0 - - glRotate($rtri,0.0,1.0,0.0); # Rotate The Triangle On The Y axis - # draw a triangle (in smooth coloring mode) - glBegin(GL_POLYGON); # start drawing a polygon - glColor(1.0,0.0,0.0); # Set The Color To Red - glVertex( 0.0, 1.0, 0.0); # Top - glColor(0.0,1.0,0.0); # Set The Color To Green - glVertex( 1.0,-1.0, 0.0); # Bottom Right - glColor(0.0,0.0,1.0); # Set The Color To Blue - glVertex(-1.0,-1.0, 0.0); # Bottom Left - glEnd(); # we're done with the polygon (smooth color interpolation) - - glLoadIdentity(); # make sure we're no longer rotated. - glTranslate(1.5,0.0,-6.0); # Move Right 3 Units, and back into the screen 6.0 - - glRotate($rquad,1.0,0.0,0.0); # Rotate The Quad On The X axis - # draw a square (quadrilateral) - glColor(0.5,0.5,1.0); # set color to a blue shade. - glBegin(GL_QUADS); # start drawing a polygon (4 sided) - glVertex(-1.0, 1.0, 0.0); # Top Left - glVertex( 1.0, 1.0, 0.0); # Top Right - glVertex( 1.0,-1.0, 0.0); # Bottom Right - glVertex(-1.0,-1.0, 0.0); # Bottom Left - glEnd(); # done with the polygon - - $rtri+=15.0; # Increase The Rotation Variable For The Triangle - $rquad-=15.0; # Decrease The Rotation Variable For The Quad - - - } - - - - diff --git a/test/OpenGL/tutorial/lesson05.sdlpl b/test/OpenGL/tutorial/lesson05.sdlpl deleted file mode 100644 index 45709cd..0000000 --- a/test/OpenGL/tutorial/lesson05.sdlpl +++ /dev/null @@ -1,242 +0,0 @@ -#!/usr/bin/env perl -# -# lesson05.pl -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig@cpan.org -# - -use strict; -use Getopt::Long; -use SDL; -use SDL::App; -use SDL::OpenGL; -use SDL::Event; -use SDL::Cursor; - -my $arg_screen_width =640; -my $arg_screen_height=512; -my $arg_fullscreen=0; -my $delay = 30; - -GetOptions( - "width:i" => \$arg_screen_width, - "height:i" => \$arg_screen_height, - "fullscreen!" => \$arg_fullscreen, - "delay:i" => \$delay, - ) or die $!; - -main(); -exit; - - -sub main - { - my $done=0; - - my $app = new SDL::App ( -title => "Jeff Molofee's GL Code Tutorial ... NeHe '99", - -icon => "icon.png", - -width => $arg_screen_width, - -height =>$arg_screen_height, - -opengl => 1, - ); - - $app->fullscreen if ($arg_fullscreen); - - SDL::ShowCursor(0); - - my $event = new SDL::Event; - $event->set(SDL_SYSWMEVENT(),SDL_IGNORE());# - - InitGL($arg_screen_width, $arg_screen_height); - - while ( ! $done ) { - - DrawGLScene(); - - $app->sync(); - $app->delay($delay); - - $event->pump; - $event->poll; - - - if ( $event->type == SDL_QUIT() ) { - $done = 1; - } - - if ( $event->type == SDL_KEYDOWN() ) { - if ( $event->key_sym == SDLK_ESCAPE() ) { - $done = 1; - } - } - } - } - - - - - - -######################################################################### -#Pretty much in original form, but 'Perlised' - - - -#/* rotation angle for the triangle. */ -my $rtri = 0.0; - -#/* rotation angle for the quadrilateral. */ -my $rquad = 0.0; - - -sub InitGL - { - my ($Width, $Height)=@_; - - glViewport(0, 0, $Width, $Height); - glClearColor(0.0, 0.0, 0.0, 0.0); # This Will Clear The Background Color To Black - glClearDepth(1.0); # Enables Clearing Of The Depth Buffer - glDepthFunc(GL_LESS); # The Type Of Depth Test To Do - glEnable(GL_DEPTH_TEST); # Enables Depth Testing - glShadeModel(GL_SMOOTH); # Enables Smooth Color Shading - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); # Reset The Projection Matrix - - gluPerspective(45.0, $Width/$Height, 0.1, 100.0); # Calculate The Aspect Ratio Of The Window - - glMatrixMode(GL_MODELVIEW); - } - - - -# The main drawing function. -sub DrawGLScene - { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); # Clear The Screen And The Depth Buffer - glLoadIdentity(); # Reset The View - - glTranslate(-1.5,0.0,-6.0); # Move Left 1.5 Units And Into The Screen 6.0 - - glRotate($rtri,0.0,1.0,0.0); # Rotate The Pyramid On The Y axis - - # draw a pyramid (in smooth coloring mode) - glBegin(GL_POLYGON); # start drawing a pyramid - - # front face of pyramid - glColor(1.0,0.0,0.0); # Set The Color To Red - glVertex(0.0, 1.0, 0.0); # Top of triangle (front) - glColor(0.0,1.0,0.0); # Set The Color To Green - glVertex(-1.0,-1.0, 1.0); # left of triangle (front) - glColor(0.0,0.0,1.0); # Set The Color To Blue - glVertex(1.0,-1.0, 1.0); # right of traingle (front) - - # right face of pyramid - glColor(1.0,0.0,0.0); # Red - glVertex( 0.0, 1.0, 0.0); # Top Of Triangle (Right) - glColor(0.0,0.0,1.0); # Blue - glVertex( 1.0,-1.0, 1.0); # Left Of Triangle (Right) - glColor(0.0,1.0,0.0); # Green - glVertex( 1.0,-1.0, -1.0); # Right Of Triangle (Right) - - # back face of pyramid - glColor(1.0,0.0,0.0); # Red - glVertex( 0.0, 1.0, 0.0); # Top Of Triangle (Back) - glColor(0.0,1.0,0.0); # Green - glVertex( 1.0,-1.0, -1.0); # Left Of Triangle (Back) - glColor(0.0,0.0,1.0); # Blue - glVertex(-1.0,-1.0, -1.0); # Right Of Triangle (Back) - - # left face of pyramid. - glColor(1.0,0.0,0.0); # Red - glVertex( 0.0, 1.0, 0.0); # Top Of Triangle (Left) - glColor(0.0,0.0,1.0); # Blue - glVertex(-1.0,-1.0,-1.0); # Left Of Triangle (Left) - glColor(0.0,1.0,0.0); # Green - glVertex(-1.0,-1.0, 1.0); # Right Of Triangle (Left) - - glEnd(); # Done Drawing The Pyramid - - glLoadIdentity(); # make sure we're no longer rotated. - glTranslate(1.5,0.0,-7.0); # Move Right 3 Units, and back into the screen 7 - - glRotate($rquad,1.0,1.0,1.0); # Rotate The Cube On X, Y, and Z - - # draw a cube (6 quadrilaterals) - glBegin(GL_QUADS); # start drawing the cube. - - # top of cube - glColor(0.0,1.0,0.0); # Set The Color To Blue - glVertex( 1.0, 1.0,-1.0); # Top Right Of The Quad (Top) - glVertex(-1.0, 1.0,-1.0); # Top Left Of The Quad (Top) - glVertex(-1.0, 1.0, 1.0); # Bottom Left Of The Quad (Top) - glVertex( 1.0, 1.0, 1.0); # Bottom Right Of The Quad (Top) - - # bottom of cube - glColor(1.0,0.5,0.0); # Set The Color To Orange - glVertex( 1.0,-1.0, 1.0); # Top Right Of The Quad (Bottom) - glVertex(-1.0,-1.0, 1.0); # Top Left Of The Quad (Bottom) - glVertex(-1.0,-1.0,-1.0); # Bottom Left Of The Quad (Bottom) - glVertex( 1.0,-1.0,-1.0); # Bottom Right Of The Quad (Bottom) - - # front of cube - glColor(1.0,0.0,0.0); # Set The Color To Red - glVertex( 1.0, 1.0, 1.0); # Top Right Of The Quad (Front) - glVertex(-1.0, 1.0, 1.0); # Top Left Of The Quad (Front) - glVertex(-1.0,-1.0, 1.0); # Bottom Left Of The Quad (Front) - glVertex( 1.0,-1.0, 1.0); # Bottom Right Of The Quad (Front) - - # back of cube. - glColor(1.0,1.0,0.0); # Set The Color To Yellow - glVertex( 1.0,-1.0,-1.0); # Top Right Of The Quad (Back) - glVertex(-1.0,-1.0,-1.0); # Top Left Of The Quad (Back) - glVertex(-1.0, 1.0,-1.0); # Bottom Left Of The Quad (Back) - glVertex( 1.0, 1.0,-1.0); # Bottom Right Of The Quad (Back) - - # left of cube - glColor(0.0,0.0,1.0); # Blue - glVertex(-1.0, 1.0, 1.0); # Top Right Of The Quad (Left) - glVertex(-1.0, 1.0,-1.0); # Top Left Of The Quad (Left) - glVertex(-1.0,-1.0,-1.0); # Bottom Left Of The Quad (Left) - glVertex(-1.0,-1.0, 1.0); # Bottom Right Of The Quad (Left) - - # Right of cube - glColor(1.0,0.0,1.0); # Set The Color To Violet - glVertex( 1.0, 1.0,-1.0); # Top Right Of The Quad (Right) - glVertex( 1.0, 1.0, 1.0); # Top Left Of The Quad (Right) - glVertex( 1.0,-1.0, 1.0); # Bottom Left Of The Quad (Right) - glVertex( 1.0,-1.0,-1.0); # Bottom Right Of The Quad (Right) - glEnd(); # Done Drawing The Cube - - $rtri+=15.0; # Increase The Rotation Variable For The Triangle - $rquad-=15.0; # Decrease The Rotation Variable For The Quad - - - } - - - - diff --git a/test/OpenGL/tutorial/lesson06.sdlpl b/test/OpenGL/tutorial/lesson06.sdlpl deleted file mode 100644 index 02a4c79..0000000 --- a/test/OpenGL/tutorial/lesson06.sdlpl +++ /dev/null @@ -1,2563 +0,0 @@ -#!/usr/bin/env perl -# -# lesson06.pl -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig@cpan.org -# - -use strict; -use Data::Dumper; -use Benchmark; -use Getopt::Long; -use MIME::Base64 qw(decode_base64); -use SDL; -use SDL::App; -use SDL::OpenGL; -use SDL::Event; - -my $arg_screen_width =640; -my $arg_screen_height=512; -my $arg_fullscreen=0; -my $delay = 3; - -GetOptions( - "width:i" => \$arg_screen_width, - "height:i" => \$arg_screen_height, - "fullscreen!" => \$arg_fullscreen, - "delay:i" => \$delay, - - ) or die $!; - -############################################################ - -my ($xrot, $yrot, $zrot) = (0,0,0); - -write_crate(); -main(); -exit; - - -sub main - { - my $done=0; - my $pth = $0; - $pth =~ s/\w+\.\w+$//; - - my $app = new SDL::App ( -title => "Jeff Molofee's GL Code Tutorial ... NeHe '99", - -icon => "$pth/Data/perl.png", - -width => $arg_screen_width, - -height =>$arg_screen_height, - -opengl => 1, - ); - $app->fullscreen() if $arg_fullscreen; - - SDL::ShowCursor(0); - - my $event = new SDL::Event; - $event->set(SDL_SYSWMEVENT,SDL_IGNORE); - - InitGL($arg_screen_width, $arg_screen_height); - - - while ( not $done ) { - - DrawGLScene(); - - $app->sync(); - - for (1 .. 10) { - $event->pump; - $event->poll; - $app->delay($delay); - } - - - if ( $event->type == SDL_QUIT ) { - $done = 1; - } - - if ( $event->type == SDL_KEYDOWN ) { - if ( $event->key_sym == SDLK_ESCAPE ) { - $done = 1; - } - } - } - } - - - - - - -######################################################################### -#Pretty much in original form, but 'Perlised' - - - - -sub InitGL - { - my ($Width, $Height) = @_; - - glViewport(0, 0, $Width, $Height); - - LoadGLTextures(); # Load The Texture(s) - - glEnable(GL_TEXTURE_2D()); # Enable Texture Mapping - - glClearColor(0.0, 0.0, 1.0, 0.0); # This Will Clear The Background Color To Black - glClearDepth(1.0); # Enables Clearing Of The Depth Buffer - glDepthFunc(GL_LESS); # The Type Of Depth Test To Do - glEnable(GL_DEPTH_TEST); # Enables Depth Testing - glShadeModel(GL_SMOOTH); # Enables Smooth Color Shading - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); # Reset The Projection Matrix - - gluPerspective(45.0, $Width/$Height, 0.1, 100.0); # Calculate The Aspect Ratio Of The Window - - glMatrixMode(GL_MODELVIEW); - } - - - -# The main drawing function. -sub DrawGLScene - { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); # Clear The Screen And The Depth Buffer - glLoadIdentity(); # Reset The View - - - glTranslate(0.0,0.0,-5.0); # move 5 units into the screen. - - glRotate($xrot,1.0,0.0,0.0); # Rotate On The X Axis - glRotate($yrot,0.0,1.0,0.0); # Rotate On The Y Axis - glRotate($zrot,0.0,0.0,1.0); # Rotate On The Z Axis - - glBindTexture(GL_TEXTURE_2D, 1); # choose the texture to use. - - glBegin(GL_QUADS); # begin drawing a cube - - # Front Face (note that the texture's corners have to match the quad's corners) - glTexCoord(0.0, 0.0); glVertex(-1.0, -1.0, 1.0); # Bottom Left Of The Texture and Quad - glTexCoord(1.0, 0.0); glVertex( 1.0, -1.0, 1.0); # Bottom Right Of The Texture and Quad - glTexCoord(1.0, 1.0); glVertex( 1.0, 1.0, 1.0); # Top Right Of The Texture and Quad - glTexCoord(0.0, 1.0); glVertex(-1.0, 1.0, 1.0); # Top Left Of The Texture and Quad - - # Back Face - glTexCoord(1.0, 0.0); glVertex(-1.0, -1.0, -1.0); # Bottom Right Of The Texture and Quad - glTexCoord(1.0, 1.0); glVertex(-1.0, 1.0, -1.0); # Top Right Of The Texture and Quad - glTexCoord(0.0, 1.0); glVertex( 1.0, 1.0, -1.0); # Top Left Of The Texture and Quad - glTexCoord(0.0, 0.0); glVertex( 1.0, -1.0, -1.0); # Bottom Left Of The Texture and Quad - - # Top Face - glTexCoord(0.0, 1.0); glVertex(-1.0, 1.0, -1.0); # Top Left Of The Texture and Quad - glTexCoord(0.0, 0.0); glVertex(-1.0, 1.0, 1.0); # Bottom Left Of The Texture and Quad - glTexCoord(1.0, 0.0); glVertex( 1.0, 1.0, 1.0); # Bottom Right Of The Texture and Quad - glTexCoord(1.0, 1.0); glVertex( 1.0, 1.0, -1.0); # Top Right Of The Texture and Quad - - # Bottom Face - glTexCoord(1.0, 1.0); glVertex(-1.0, -1.0, -1.0); # Top Right Of The Texture and Quad - glTexCoord(0.0, 1.0); glVertex( 1.0, -1.0, -1.0); # Top Left Of The Texture and Quad - glTexCoord(0.0, 0.0); glVertex( 1.0, -1.0, 1.0); # Bottom Left Of The Texture and Quad - glTexCoord(1.0, 0.0); glVertex(-1.0, -1.0, 1.0); # Bottom Right Of The Texture and Quad - - # Right face - glTexCoord(1.0, 0.0); glVertex( 1.0, -1.0, -1.0); # Bottom Right Of The Texture and Quad - glTexCoord(1.0, 1.0); glVertex( 1.0, 1.0, -1.0); # Top Right Of The Texture and Quad - glTexCoord(0.0, 1.0); glVertex( 1.0, 1.0, 1.0); # Top Left Of The Texture and Quad - glTexCoord(0.0, 0.0); glVertex( 1.0, -1.0, 1.0); # Bottom Left Of The Texture and Quad - - # Left Face - glTexCoord(0.0, 0.0); glVertex(-1.0, -1.0, -1.0); # Bottom Left Of The Texture and Quad - glTexCoord(1.0, 0.0); glVertex(-1.0, -1.0, 1.0); # Bottom Right Of The Texture and Quad - glTexCoord(1.0, 1.0); glVertex(-1.0, 1.0, 1.0); # Top Right Of The Texture and Quad - glTexCoord(0.0, 1.0); glVertex(-1.0, 1.0, -1.0); # Top Left Of The Texture and Quad - - glEnd(); # done with the polygon. - - $xrot+=15.0; # X Axis Rotation - $yrot+=15.0; # Y Axis Rotation - $zrot+=15.0; # Z Axis Rotation - - - } - -#my $image1,$a; #this can cause a segfault in LoadGLTextures/glTexImage2D !!! - - -sub LoadGLTextures - { - # Load Texture - - #uncomment this for a different method of loading: - #my $img_data = read_gfx_file(FILENAME=>"../../ScrollerDemos/backdrop2.h"); - #my $pixel_ptr = $img_data->{PIXEL_PTR}; - #my $pic_info = $img_data->{INFO}; - #my $width = $pic_info->{WIDTH}; - #my $height = $pic_info->{HEIGHT}; - - - #if you uncomment the bit above, comment this out: - #-snip- - my $pth = $0; - $pth =~ s/\w+\.\w+$//; - my $surface=create_SDL_surface_from_file("/tmp/crate.png"); - my $width=$surface->width(); - my $height=$surface->height(); - my $pitch = $surface->pitch(); - my $bytespp= $surface->bytes_per_pixel(); - my $size=$pitch*$height; - my $pixels = $surface->pixels(); - - # Create Texture - my $textures = glGenTextures(1); #name texture - die "Could not genereate textures" unless $$textures[0]; - - glBindTexture(GL_TEXTURE_2D, $$textures[0]); # 2d texture - - - glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); # scale linearly when image bigger than texture - glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); # scale linearly when image smalled than texture - - glTexImage2D(GL_TEXTURE_2D(), - 0, #level (0 normal, heighr is form mip-mapping) - GL_RGB(), #internal format (3=GL_RGB) - $width,$height, - 0, # border - GL_RGB(), #format RGB color data - GL_UNSIGNED_BYTE(), #unsigned bye data - $pixels); #ptr to texture data - - die "Problem setting up 2d Texture (dimensions not a power of 2?)):".glErrorString(glGetError())."\n" if glGetError(); - - } - -sub create_SDL_surface_from_file - { - my $filename=shift; - - my $surface = new SDL::Surface( -name => $filename); - - return $surface; - - } - - - - - -################### -#alternat loading support: - -#keep ref counts up: -my @sprite_c_heap =(); -my @sprite_area =(); - -sub read_gfx_file - { - my %args=( - TYPE => "GIMP_HEADER", - FILENAME => undef, - @_, - ); - - my $struct = read_gimp_header_image($args{FILENAME}); - my $size = length $struct->{DATA}; - my $c_array = new OpenGL::Array $size , GL_UNSIGNED_BYTE; - - # c_array is the main reason to do the following ref count trickster: - # (otherwise the OpenGL:Array goes out of scope and the memory (image) is ZEROed out (and invalidated) by the DESTROY method - push @sprite_c_heap, $c_array; - push @sprite_area, $struct; - - $c_array->assign_data(0, $struct->{DATA} ); #take a copy of the data - - return { - PIXEL_PTR => $c_array->ptr(), #could return $c_array instead to kepe ref count alive - INFO => $struct, - }; - - #that all needs modularising..... - - } - - -#nasty fixed to 3 byte RGB -sub read_gimp_header_image - { - my $file=shift; - my $cached_file="$file.cached-bin"; - - my ($width, $height,$pixel_format, $data)=(0,0,"RGB",""); - - #due to that fact that this aint the fastest code ever, we keep a cache. - if (-e $cached_file and (-C $file >= -C $cached_file)) - { - - print "Reading cached binary bitmap data : $cached_file\n"; - open (FH, "<$file.cached-bin") or die "Open: $!"; - my $line=""; - $width=; - $height=; - $pixel_format=; - chomp $width; - chomp $height; - chomp $pixel_format; #but who cares? not here anyway!!! - - #slurp in the rest of the file (its pixel data) - { - local $/; - undef $/; - - my @lines= ; - $data=join '', @lines; - } - - close (FH); - } - else # there is no cached file, or the cached file is out of date. - { - - open (FH, "<$file") or die "Open: $!"; - - my @data=(); - my @pixel=(); - while (defined (my $line=)) - { - $width =$1 if ($line =~ /width\s*=\s*(\d+)/); - $height=$1 if ($line =~ /height\s*=\s*(\d+)/); - if ($line =~ /^\s+\"(.+)\"$/g) - { - my $c=$1; - $c =~ s/\\(.)/$1/g; #remove meta guard - $c =~ - s/ - \G - (.)(.)(.)(.) - / - @data=(ord($1),ord($2),ord($3),ord($4)); - - chr ( ( ( ( $data[0] - 33) << 2) | ( ($data[1] - 33) >> 4) ) ). - chr ( ( ( ( ( $data[1] - 33) & 0xF) << 4) | ( ($data[2] - 33) >> 2) ) ). - chr ( ( ( ( ( $data[2] - 33) & 0x3) << 6) | ( ($data[3] - 33) ) ) ); - /gex; - - $data.=$c ; - } - } - - - close(FH); - - print "Writing cached binary bitmap data for: $file as $cached_file\n"; - - #create a binary cached copy - open (FH, ">$cached_file") or die "Open: $!"; - binmode FH; #we might have to put up with weak OSes. - print FH "$width\n$height\n$pixel_format\n$data"; - - close(FH); - } - - - - - return { - WIDTH => $width, - HEIGHT => $height, - FORMAT => $pixel_format, - DATA => $data - }; - } - - - -sub write_crate { - my $crate = decode_base64 < /tmp/crate.png"; - print FP $crate; - close FP; -} diff --git a/test/OpenGL/tutorial/lesson07.sdlpl b/test/OpenGL/tutorial/lesson07.sdlpl deleted file mode 100644 index 447b956..0000000 --- a/test/OpenGL/tutorial/lesson07.sdlpl +++ /dev/null @@ -1,2556 +0,0 @@ -#!/usr/bin/env perl -# -# lesson07.pl -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig@cpan.org -# -use Data::Dumper; -use Benchmark; -use Getopt::Long; -use MIME::Base64 qw(decode_base64); -use SDL; -use SDL::App; -use SDL::OpenGL; -use SDL::Event; -use SDL::Surface; -use SDL::OpenGL; - -my $arg_screen_width =640; -my $arg_screen_height=512; -my $arg_fullscreen=0; - -GetOptions( - "width:i" => \$arg_screen_width, - "height:i" => \$arg_screen_height, - "fullscreen!" => \$arg_fullscreen, - ) or die $!; - -############################################################ - -my $light = 0; - -my $xrot=0; # x rotation -my $yrot=0; # y rotation -my $xspeed=0; # x rotation speed -my $yspeed=0; # y rotation speed - -my $z=-5.0; # depth into the screen. - -my $filter = 1; # Which Filter To Use (nearest/linear/mipmapped) */ - -write_crate(); -main(); -exit; - -sub main - { - my $done=0; - my $vidmode_flags= SDL_OPENGL; - - $vidmode_flags|= SDL_FULLSCREEN if $arg_fullscreen; - - my $app = new SDL::App ( -title => "Jeff Molofee's GL Code Tutorial ... NeHe '99", - -icon => "icon.png", - -flags => $vidmode_flags, - -width => $arg_screen_width, - -height =>$arg_screen_height, - -opengl => 1, - ); - - SDL::ShowCursor(0); - - my $event = new SDL::Event; - $event->set(SDL_SYSWMEVENT,SDL_IGNORE); - - InitGL($arg_screen_width, $arg_screen_height); - - while ( not $done ) - { - - DrawGLScene(); - - $app->sync(); - - $event->pump; - $event->poll; - - $done = 1 if ( $event->type == SDL_QUIT ) ; - - - if ( $event->type == SDL_KEYDOWN ) - { - my $key= $event->key_sym; - - $done = 1 if ( $key == SDLK_ESCAPE ) ; - - - if ($key==SDLK_l) - { - printf("Light was: %d\n", $light); - $light = $light ? 0 : 1; # switch the current value of light, between 0 and 1. - printf("Light is now: %d\n", $light); - if (!$light) - { - glDisable(GL_LIGHTING); - } - else - { - glEnable(GL_LIGHTING); - } - - } - if ($key==SDLK_f) - { - printf("Filter was: %d\n", $filter); - $filter = 1+(($filter) % 3) ; - printf("Filter is now: %d\n", $filter); - } - - #bit lax: - $z-=0.02 if ( $key == SDLK_PAGEUP ); - $z+=0.02 if ( $key == SDLK_PAGEDOWN ); - $xspeed+=0.02 if ( $key == SDLK_UP ); - $xspeed-=0.02 if ( $key == SDLK_DOWN ); - $yspeed-=0.01 if ( $key == SDLK_LEFT ); - $yspeed+=0.01 if ( $key == SDLK_RIGHT ); - - } - } - } - - - - - - -######################################################################### -#Pretty much in original form, but 'Perlised' - - - - -sub InitGL - { - my ($Width, $Height) = @_; - - glViewport(0, 0, $Width, $Height); - - LoadGLTextures(); # Load The Texture(s) - - glEnable(GL_TEXTURE_2D); # Enable Texture Mapping - - - glClearColor(0.0, 0.0, 0.0, 0.0); # This Will Clear The Background Color To Black - glClearDepth(1.0); # Enables Clearing Of The Depth Buffer - glDepthFunc(GL_LESS); # The Type Of Depth Test To Do - glEnable(GL_DEPTH_TEST); # Enables Depth Testing - glShadeModel(GL_SMOOTH); # Enables Smooth Color Shading - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); # Reset The Projection Matrix - - gluPerspective(45.0, $Width/$Height, 0.1, 100.0); # Calculate The Aspect Ratio Of The Window - - glMatrixMode(GL_MODELVIEW); - - - my $LightAmbient = [ 0.5, 0.5, 0.5, 1.0 ]; # white ambient light at half intensity (rgba) */ - - my $LightDiffuse = [ 1.0, 1.0, 1.0, 1.0 ]; # super bright, full intensity diffuse light. */ - - my $LightPosition = [ 0.0 , 0.0, 2.0, 1.0 ]; # position of light (x, y, z, (position of light)) */ - - - - #hmm, undefine: - glLight(GL_LIGHT1, GL_AMBIENT, @$LightAmbient); # add lighting. (ambient) - glLight(GL_LIGHT1, GL_DIFFUSE, @$LightDiffuse); # add lighting. (diffuse). - glLight(GL_LIGHT1, GL_POSITION,@$LightPosition); # set light position. - glEnable(GL_LIGHT1); # turn light 1 on. - } - - - -# The main drawing function. -sub DrawGLScene - { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); # Clear The Screen And The Depth Buffer - glLoadIdentity(); # Reset The View - - glTranslate(0.0,0.0,$z); # move z units out from the screen. - - glRotate($xrot,1.0,0.0,0.0); # Rotate On The X Axis - glRotate($yrot,0.0,1.0,0.0); # Rotate On The Y Axis - - glBindTexture(GL_TEXTURE_2D, $filter); # choose the texture to use. - - glBegin(GL_QUADS); # begin drawing a cube - - # Front Face (note that the texture's corners have to match the quad's corners) - glNormal( 0.0, 0.0, 1.0); # front face points out of the screen on z. - glTexCoord(0.0, 0.0); glVertex(-1.0, -1.0, 1.0); # Bottom Left Of The Texture and Quad - glTexCoord(1.0, 0.0); glVertex( 1.0, -1.0, 1.0); # Bottom Right Of The Texture and Quad - glTexCoord(1.0, 1.0); glVertex( 1.0, 1.0, 1.0); # Top Right Of The Texture and Quad - glTexCoord(0.0, 1.0); glVertex(-1.0, 1.0, 1.0); # Top Left Of The Texture and Quad - - # Back Face - glNormal( 0.0, 0.0,-1.0); # back face points into the screen on z. - glTexCoord(1.0, 0.0); glVertex(-1.0, -1.0, -1.0); # Bottom Right Of The Texture and Quad - glTexCoord(1.0, 1.0); glVertex(-1.0, 1.0, -1.0); # Top Right Of The Texture and Quad - glTexCoord(0.0, 1.0); glVertex( 1.0, 1.0, -1.0); # Top Left Of The Texture and Quad - glTexCoord(0.0, 0.0); glVertex( 1.0, -1.0, -1.0); # Bottom Left Of The Texture and Quad - - # Top Face - glNormal( 0.0, 1.0, 0.0); # top face points up on y. - glTexCoord(0.0, 1.0); glVertex(-1.0, 1.0, -1.0); # Top Left Of The Texture and Quad - glTexCoord(0.0, 0.0); glVertex(-1.0, 1.0, 1.0); # Bottom Left Of The Texture and Quad - glTexCoord(1.0, 0.0); glVertex( 1.0, 1.0, 1.0); # Bottom Right Of The Texture and Quad - glTexCoord(1.0, 1.0); glVertex( 1.0, 1.0, -1.0); # Top Right Of The Texture and Quad - - # Bottom Face - glNormal( 0.0, -1.0, 0.0); # bottom face points down on y. - glTexCoord(1.0, 1.0); glVertex(-1.0, -1.0, -1.0); # Top Right Of The Texture and Quad - glTexCoord(0.0, 1.0); glVertex( 1.0, -1.0, -1.0); # Top Left Of The Texture and Quad - glTexCoord(0.0, 0.0); glVertex( 1.0, -1.0, 1.0); # Bottom Left Of The Texture and Quad - glTexCoord(1.0, 0.0); glVertex(-1.0, -1.0, 1.0); # Bottom Right Of The Texture and Quad - - # Right face - glNormal( 1.0, 0.0, 0.0); # right face points right on x. - glTexCoord(1.0, 0.0); glVertex( 1.0, -1.0, -1.0); # Bottom Right Of The Texture and Quad - glTexCoord(1.0, 1.0); glVertex( 1.0, 1.0, -1.0); # Top Right Of The Texture and Quad - glTexCoord(0.0, 1.0); glVertex( 1.0, 1.0, 1.0); # Top Left Of The Texture and Quad - glTexCoord(0.0, 0.0); glVertex( 1.0, -1.0, 1.0); # Bottom Left Of The Texture and Quad - - # Left Face - glNormal(-1.0, 0.0, 0.0); # left face points left on x. - glTexCoord(0.0, 0.0); glVertex(-1.0, -1.0, -1.0); # Bottom Left Of The Texture and Quad - glTexCoord(1.0, 0.0); glVertex(-1.0, -1.0, 1.0); # Bottom Right Of The Texture and Quad - glTexCoord(1.0, 1.0); glVertex(-1.0, 1.0, 1.0); # Top Right Of The Texture and Quad - glTexCoord(0.0, 1.0); glVertex(-1.0, 1.0, -1.0); # Top Left Of The Texture and Quad - - glEnd(); # done with the polygon. - - $xrot+=$xspeed; # X Axis Rotation - $yrot+=$yspeed; # Y Axis Rotation - - - - } - - - - -sub LoadGLTextures - { - # Load Texture - - - my $pth = $0; - $pth =~ s/\w+\.\w+$//; - my ($pixels, $width, $height, $size)=ImageLoad("/tmp/crate.png"); - - # Create Texture - - glGenTextures(3); - - # texture 1 (poor quality scaling) - glBindTexture(GL_TEXTURE_2D, 1); # 2d texture (x and y size) - - glTexParameter(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); # cheap scaling when image bigger than texture - glTexParameter(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); # cheap scaling when image smalled than texture - - # 2d texture, level of detail 0 (normal), 3 components (red, green, blue), x size from image, y size from image, - # border 0 (normal), rgb color data, unsigned byte data, and finally the data itself. - #glTexImage2D(GL_TEXTURE_2D, 0, 3, image1->w, image1->h, 0, GL_RGB, GL_UNSIGNED_BYTE, image1->pixels); - - glTexImage2D(GL_TEXTURE_2D, - 0, #level (0 normal, heighr is form mip-mapping) - 3, #internal format (3=GL_RGB) - $width,$height, - 0, # border - GL_RGB, #format RGB color data - GL_UNSIGNED_BYTE, #unsigned bye data - $pixels); #ptr to texture data - - - - # texture 2 (linear scaling) - glBindTexture(GL_TEXTURE_2D, 2); # 2d texture (x and y size) - glTexParameter(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); # scale linearly when image bigger than texture - glTexParameter(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); # scale linearly when image smalled than texture - #glTexImage2D(GL_TEXTURE_2D, 0, 3, image1->w, image1->h, 0, GL_RGB, GL_UNSIGNED_BYTE, image1->pixels); - - glTexImage2D(GL_TEXTURE_2D, - 0, #level (0 normal, heighr is form mip-mapping) - 3, #internal format (3=GL_RGB) - $width,$height, - 0, # border - GL_RGB, #format RGB color data - GL_UNSIGNED_BYTE, #unsigned bye data - $pixels); #ptr to texture data - - - - - # texture 3 (mipmapped scaling) - glBindTexture(GL_TEXTURE_2D, 3); # 2d texture (x and y size) - glTexParameter(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); # scale linearly when image bigger than texture - glTexParameter(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST); # scale linearly + mipmap when image smalled than texture - #glTexImage2D(GL_TEXTURE_2D, 0, 3, image1->w, image1->h, 0, GL_RGB, GL_UNSIGNED_BYTE, image1->pixels); - - glTexImage2D(GL_TEXTURE_2D, - 0, #level (0 normal, heighr is form mip-mapping) - 3, #internal format (3=GL_RGB) - $width,$height, - 0, # border - GL_RGB, #format RGB color data - GL_UNSIGNED_BYTE, #unsigned bye data - $pixels); #ptr to texture data - - # 2d texture, 3 colors, width, height, RGB in that order, byte data, and the data. - gluBuild2DMipmaps(GL_TEXTURE_2D, 3, $width, $height, GL_RGB, GL_UNSIGNED_BYTE, $pixels); - - my $glerr=glGetError(); - die "Problem setting up 2d Texture (dimensions not a power of 2?)):".gluErrorString($glerr)."\n" if $glerr; - - } - - - - - - - - - - - -#somthing needs to keep the ref count alive for objects which represents data in C space (they have no ref count): -my @ref=(); - -sub ImageLoad - { - my $filename=shift; - - my $surface = new SDL::Surface( -name => $filename); #makes use of SDL: BMP loader. - - - my $width=$surface->width(); - my $height=$surface->height(); - my $bytespp= $surface->bytes_per_pixel(); - my $size= $width*$height*$bytespp; - - my $surface_pixels=$surface->pixels(); - my $surface_size=$width*$height*$surface->bytes_per_pixel(); - my $raw_pixels = $surface_pixels; - - - - #do a conversion (the pixel data is accessable as a simple string) - - my $pixels=$raw_pixels; - my $pre_conv= $pixels; #rotate image 180 degrees! - my $new_pixels=""; - for (my $y=0; $y< $height; $y++) - { - my $y_pos=$y*$width*$bytespp; #calculate offset into the image (a string) - my $row=substr ($pre_conv, $y_pos, $width*$bytespp); #extract 1 pixel row - $row =~ s/\G(.)(.)(.)/$3$2$1/gms; #turn the BMP BGR order into OpenGL RGB order; - $new_pixels.= reverse $row; - } - - $raw_pixels = $new_pixels; #put transformed data into C array. - push @ref, $raw_pixels, $surface; - - #we could have created another SDL surface frm the '$raw_pixel's... oh well. - return ($raw_pixels, $width, $height, $size); - } - -sub write_crate { - my $crate = decode_base64 < /tmp/crate.png"; - print FP $crate; - close FP; -} diff --git a/test/OpenGL/tutorial/lesson08.sdlpl b/test/OpenGL/tutorial/lesson08.sdlpl deleted file mode 100644 index 72a69fd..0000000 --- a/test/OpenGL/tutorial/lesson08.sdlpl +++ /dev/null @@ -1,1281 +0,0 @@ -#!/usr/bin/env perl -# -# lesson08.pl -# -# Copyright (C) 2005 David J. Goehrig -# -# ------------------------------------------------------------------------------ -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# ------------------------------------------------------------------------------ -# -# Please feel free to send questions, suggestions or improvements to: -# -# David J. Goehrig -# dgoehrig@cpan.org -# -use Data::Dumper; -use Benchmark; -use Getopt::Long; -use MIME::Base64 qw(decode_base64); -use SDL; -use SDL::App; -use SDL::OpenGL; -use SDL::Event; -use SDL::Surface; -use SDL::Cursor; - -my $arg_screen_width =640; -my $arg_screen_height=512; -my $arg_fullscreen=0; - -GetOptions( - "width:i" => \$arg_screen_width, - "height:i" => \$arg_screen_height, - "fullscreen!" => \$arg_fullscreen, - - ) or die $!; - -############################################################ -my $light = 0; - -my $xrot=0; # x rotation -my $yrot=0; # y rotation -my $xspeed=0; # x rotation speed -my $yspeed=0; # y rotation speed - -my $z=-5.0; # depth into the screen. - -my $filter = 1; # Which Filter To Use (nearest/linear/mipmapped) */ -my $blend = 1; - - -print STDERR "Use b to toggle blend, page up/down to zoom, and arrow keys to rotate\n"; - -write_glass(); -main(); -exit; - - -sub main - { - my $done=0; - my $vidmode_flags= SDL_OPENGL; - - $vidmode_flags|= SDL_FULLSCREEN if $arg_fullscreen; - - my $app = new SDL::App ( -title => "Jeff Molofee's GL Code Tutorial ... NeHe '99", - -icon => "icon.png", - -flags => $vidmode_flags, - -width => $arg_screen_width, - -height =>$arg_screen_height, - -opengl => 1, - ); - - $app->grab_input(SDL_GRAB_ON); - - SDL::ShowCursor(0); - - my $event = new SDL::Event; - $event->set(SDL_SYSWMEVENT,SDL_IGNORE); - - InitGL($arg_screen_width, $arg_screen_height); - - glEnable(GL_BLEND); # Turn Blending On - glEnable(GL_LIGHTING); - glDisable(GL_DEPTH_TEST); # Turn Depth Testing Off - - while ( not $done ) - { - - DrawGLScene(); - - $app->sync(); - - $event->pump; - $event->poll; - - $done = 1 if ( $event->type == SDL_QUIT ) ; - - if ( $event->type == SDL_KEYDOWN ) - { - my $key= $event->key_sym; - - $done = 1 if ( $key == SDLK_ESCAPE ) ; - - if ($key==SDLK_f) - { - printf("Filter was: %d\n", $filter); - $filter = 1+(($filter) % 3) ; - printf("Filter is now: %d\n", $filter); - $app->delay(100); - } - if ($key == SDLK_b) - { - printf("Blend was: %d\n", $blend); - $blend = $blend ? 0 : 1; - printf("Blend is now: %d\n", $blend); - $app->delay(100); - if ($blend) - { - glEnable(GL_BLEND); # Turn Blending On - glEnable(GL_LIGHTING); - glDisable(GL_DEPTH_TEST); # Turn Depth Testing Off - } - else - { - glDisable(GL_BLEND); # Turn Blending Off - glDisable(GL_LIGHTING); - glEnable(GL_DEPTH_TEST); # Turn Depth Testing On - } - } - #bit lax: - $z-=0.02 if ( $key == SDLK_PAGEUP ); - $z+=0.02 if ( $key == SDLK_PAGEDOWN ); - $xspeed+=0.02 if ( $key == SDLK_UP ); - $xspeed-=0.02 if ( $key == SDLK_DOWN ); - $yspeed-=0.01 if ( $key == SDLK_LEFT ); - $yspeed+=0.01 if ( $key == SDLK_RIGHT ); - - } - } - $app->grab_input(SDL_GRAB_OFF); - } - - - - - - -######################################################################### -#Pretty much in original form, but 'Perlised' - - - - -sub InitGL - { - my ($Width, $Height) = @_; - - glViewport(0, 0, $Width, $Height); - - LoadGLTextures(); # Load The Texture(s) - - glEnable(GL_TEXTURE_2D); # Enable Texture Mapping - - - glClearColor(0.0, 0.0, 0.0, 0.0); # This Will Clear The Background Color To Black - glClearDepth(1.0); # Enables Clearing Of The Depth Buffer - glDepthFunc(GL_LESS); # The Type Of Depth Test To Do - glEnable(GL_DEPTH_TEST); # Enables Depth Testing - glShadeModel(GL_SMOOTH); # Enables Smooth Color Shading - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); # Reset The Projection Matrix - - gluPerspective(45.0, $Width/$Height, 0.1, 100.0); # Calculate The Aspect Ratio Of The Window - - glMatrixMode(GL_MODELVIEW); - - - my $LightAmbient = [ 0.5, 0.5, 0.5, 1.0 ]; # white ambient light at half intensity (rgba) */ - - my $LightDiffuse = [ 1.0, 1.0, 1.0, 1.0 ]; # super bright, full intensity diffuse light. */ - - my $LightPosition = [ 0.0 , 0.0, 2.0, 1.0 ]; # position of light (x, y, z, (position of light)) */ - - - - #setup light number 1 - glLight(GL_LIGHT1, GL_AMBIENT, @$LightAmbient); # add lighting. (ambient) - glLight(GL_LIGHT1, GL_DIFFUSE, @$LightDiffuse); # add lighting. (diffuse). - glLight(GL_LIGHT1, GL_POSITION,@$LightPosition); # set light position. - glEnable(GL_LIGHT1); # turn light 1 on. - #/* setup blending */ - glBlendFunc(GL_SRC_ALPHA,GL_ONE); # Set The Blending Function For Translucency - glColor(1.0, 1.0, 1.0, 0.5); - - - } - - - -# The main drawing function. -sub DrawGLScene - { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); # Clear The Screen And The Depth Buffer - glLoadIdentity(); # Reset The View - - glTranslate(0.0,0.0,$z); # move z units out from the screen. - - glRotate($xrot,1.0,0.0,0.0); # Rotate On The X Axis - glRotate($yrot,0.0,1.0,0.0); # Rotate On The Y Axis - - glBindTexture(GL_TEXTURE_2D, $filter); # choose the texture to use. - - glBegin(GL_QUADS); # begin drawing a cube - - # Front Face (note that the texture's corners have to match the quad's corners) - glNormal( 0.0, 0.0, 1.0); # front face points out of the screen on z. - glTexCoord(0.0, 0.0); glVertex(-1.0, -1.0, 1.0); # Bottom Left Of The Texture and Quad - glTexCoord(1.0, 0.0); glVertex( 1.0, -1.0, 1.0); # Bottom Right Of The Texture and Quad - glTexCoord(1.0, 1.0); glVertex( 1.0, 1.0, 1.0); # Top Right Of The Texture and Quad - glTexCoord(0.0, 1.0); glVertex(-1.0, 1.0, 1.0); # Top Left Of The Texture and Quad - - # Back Face - glNormal( 0.0, 0.0,-1.0); # back face points into the screen on z. - glTexCoord(1.0, 0.0); glVertex(-1.0, -1.0, -1.0); # Bottom Right Of The Texture and Quad - glTexCoord(1.0, 1.0); glVertex(-1.0, 1.0, -1.0); # Top Right Of The Texture and Quad - glTexCoord(0.0, 1.0); glVertex( 1.0, 1.0, -1.0); # Top Left Of The Texture and Quad - glTexCoord(0.0, 0.0); glVertex( 1.0, -1.0, -1.0); # Bottom Left Of The Texture and Quad - - # Top Face - glNormal( 0.0, 1.0, 0.0); # top face points up on y. - glTexCoord(0.0, 1.0); glVertex(-1.0, 1.0, -1.0); # Top Left Of The Texture and Quad - glTexCoord(0.0, 0.0); glVertex(-1.0, 1.0, 1.0); # Bottom Left Of The Texture and Quad - glTexCoord(1.0, 0.0); glVertex( 1.0, 1.0, 1.0); # Bottom Right Of The Texture and Quad - glTexCoord(1.0, 1.0); glVertex( 1.0, 1.0, -1.0); # Top Right Of The Texture and Quad - - # Bottom Face - glNormal( 0.0, -1.0, 0.0); # bottom face points down on y. - glTexCoord(1.0, 1.0); glVertex(-1.0, -1.0, -1.0); # Top Right Of The Texture and Quad - glTexCoord(0.0, 1.0); glVertex( 1.0, -1.0, -1.0); # Top Left Of The Texture and Quad - glTexCoord(0.0, 0.0); glVertex( 1.0, -1.0, 1.0); # Bottom Left Of The Texture and Quad - glTexCoord(1.0, 0.0); glVertex(-1.0, -1.0, 1.0); # Bottom Right Of The Texture and Quad - - # Right face - glNormal( 1.0, 0.0, 0.0); # right face points right on x. - glTexCoord(1.0, 0.0); glVertex( 1.0, -1.0, -1.0); # Bottom Right Of The Texture and Quad - glTexCoord(1.0, 1.0); glVertex( 1.0, 1.0, -1.0); # Top Right Of The Texture and Quad - glTexCoord(0.0, 1.0); glVertex( 1.0, 1.0, 1.0); # Top Left Of The Texture and Quad - glTexCoord(0.0, 0.0); glVertex( 1.0, -1.0, 1.0); # Bottom Left Of The Texture and Quad - - # Left Face - glNormal(-1.0, 0.0, 0.0); # left face points left on x. - glTexCoord(0.0, 0.0); glVertex(-1.0, -1.0, -1.0); # Bottom Left Of The Texture and Quad - glTexCoord(1.0, 0.0); glVertex(-1.0, -1.0, 1.0); # Bottom Right Of The Texture and Quad - glTexCoord(1.0, 1.0); glVertex(-1.0, 1.0, 1.0); # Top Right Of The Texture and Quad - glTexCoord(0.0, 1.0); glVertex(-1.0, 1.0, -1.0); # Top Left Of The Texture and Quad - - glEnd(); # done with the polygon. - - $xrot+=$xspeed; # X Axis Rotation - $yrot+=$yspeed; # Y Axis Rotation - - - - } - - - - -sub LoadGLTextures - { - # Load Texture - - my $pth = $0; - $pth =~ s/\w+\.\w+$//; - my ($pixels, $width, $height, $size)=ImageLoad("/tmp/glass.bmp"); - - # Create Texture - - glGenTextures(3); - - # texture 1 (poor quality scaling) - glBindTexture(GL_TEXTURE_2D, 1); # 2d texture (x and y size) - - glTexParameter(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); # cheap scaling when image bigger than texture - glTexParameter(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); # cheap scaling when image smalled than texture - - # 2d texture, level of detail 0 (normal), 3 components (red, green, blue), x size from image, y size from image, - # border 0 (normal), rgb color data, unsigned byte data, and finally the data itself. - #glTexImage2D(GL_TEXTURE_2D, 0, 3, image1->w, image1->h, 0, GL_RGB, GL_UNSIGNED_BYTE, image1->pixels); - - glTexImage2D(GL_TEXTURE_2D, - 0, #level (0 normal, heighr is form mip-mapping) - 3, #internal format (3=GL_RGB) - $width,$height, - 0, # border - GL_RGB, #format RGB color data - GL_UNSIGNED_BYTE, #unsigned bye data - $pixels); #ptr to texture data - - - - # texture 2 (linear scaling) - glBindTexture(GL_TEXTURE_2D, 2); # 2d texture (x and y size) - glTexParameter(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); # scale linearly when image bigger than texture - glTexParameter(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); # scale linearly when image smalled than texture - #glTexImage2D(GL_TEXTURE_2D, 0, 3, image1->w, image1->h, 0, GL_RGB, GL_UNSIGNED_BYTE, image1->pixels); - - glTexImage2D(GL_TEXTURE_2D, - 0, #level (0 normal, heighr is form mip-mapping) - 3, #internal format (3=GL_RGB) - $width,$height, - 0, # border - GL_RGB, #format RGB color data - GL_UNSIGNED_BYTE, #unsigned bye data - $pixels); #ptr to texture data - - - - - # texture 3 (mipmapped scaling) - glBindTexture(GL_TEXTURE_2D, 3); # 2d texture (x and y size) - glTexParameter(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); # scale linearly when image bigger than texture - glTexParameter(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST); # scale linearly + mipmap when image smalled than texture - #glTexImage2D(GL_TEXTURE_2D, 0, 3, image1->w, image1->h, 0, GL_RGB, GL_UNSIGNED_BYTE, image1->pixels); - - glTexImage2D(GL_TEXTURE_2D, - 0, #level (0 normal, heighr is form mip-mapping) - 3, #internal format (3=GL_RGB) - $width,$height, - 0, # border - GL_RGB, #format RGB color data - GL_UNSIGNED_BYTE, #unsigned bye data - $pixels); #ptr to texture data - - # 2d texture, 3 colors, width, height, RGB in that order, byte data, and the data. - gluBuild2DMipmaps(GL_TEXTURE_2D, 3, $width, $height, GL_RGB, GL_UNSIGNED_BYTE, $pixels); - - my $glerr=glGetError(); - die "Problem setting up 2d Texture (dimensions not a power of 2?)):".gluErrorString($glerr)."\n" if $glerr; - - } - - - - - - - - - - - -#somthing needs to keep the ref count alive for objects which represents data in C space (they have no ref count): -my @ref=(); - -sub ImageLoad - { - my $filename=shift; - - my $surface = new SDL::Surface( -name => $filename); #makes use of SDL: BMP loader. - - - my $width=$surface->width(); - my $height=$surface->height(); - my $bytespp= $surface->bytes_per_pixel(); - my $size= $width*$height*$bytespp; - - my $surface_pixels=$surface->pixels(); - my $surface_size=$width*$height*$surface->bytes_per_pixel(); - my $raw_pixels = reverse $surface_pixels; - - - - #do a conversion (the pixel data is accessable as a simple string) - - my $pixels=$raw_pixels; - my $pre_conv= $pixels; - my $new_pixels=""; - for (my $y=0; $y< $height; $y++) - { - my $y_pos=$y*$width*$bytespp; #calculate offset into the image (a string) - my $row=substr ($pre_conv, $y_pos, $width*$bytespp); #extract 1 pixel row - $row =~ s/\G(.)(.)(.)/$3$2$1/gms; #turn the BMP BGR order into OpenGL RGB order; - $new_pixels.= reverse $row; - } - - $raw_pixels = $new_pixels; #put transformed data into C array. - push @ref, $raw_pixels, $surface; - - #we could have created another SDL surface frm the '$raw_pixel's... oh well. - return ($raw_pixels, $width, $height, $size); - } - -sub write_glass { - my $glass = decode_base64 < /tmp/glass.bmp"; - print FP $glass; - close FP; -} -