-#! perl -w
+#!/usr/bin/env perl
#
-# Copyright (C) 2003 chromatic
-# Copyright (C) 2004 David J. Goehrig
-# Copyright (C) 2009 Kartik Thakore
+# Build.PL
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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 warnings;
use SDL::Build;
use YAML;
-use YAML::Node;
my $sdl_compile_flags = `sdl-config --cflags`;
my $sdl_link_flags = `sdl-config --libs`;
SDL => {
file => {
from => 'src/SDL.xs',
- to => './SDL_perl.xs',
+ to => 'src/SDL_perl.xs',
},
- 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 )],
},
OpenGL => {
file => {
from => 'src/OpenGL.xs',
- to => 'SDL/OpenGL.xs',
+ to => 'src/SDL/OpenGL.xs',
},
libraries => [qw( SDL GL GLU )],
},
SFont => {
file => {
from => 'src/SFont.xs',
- to => 'SDL/SFont.xs',
+ to => 'src/SDL/SFont.xs',
},
libraries => [qw( SDL SDL_image )],
},
define => 'HAVE_SDL_MIXER',
header => 'SDL_mixer.h'
},
+ SDL_sound => {
+ define => 'HAVE_SDL_SOUND',
+ header => 'SDL_sound.h'
+ },
SDL_net => {
define => 'HAVE_SDL_NET',
header => 'SDL_net.h'
define => 'HAVE_SDL_GFX',
header => 'SDL_gfxPrimitives.h'
},
+ SDL_svg => {
+ define => 'HAVE_SDL_SVG',
+ header => 'SDL_svg.h'
+ },
png => {
define => 'HAVE_PNG',
header => 'png.h',
# see build/lib/SDL/Build/*pm
my $arch = SDL::Build->get_arch( $^O );
+print "[Build.PL] arch $arch\n";
+
# see which subsystems can be built -- do we have headers for them?
my $build_systems = $arch->find_subsystems( \%subsystems, \%libraries );
$arch->write_sdl_config( $build_systems );
# and fetch all of the information needed to compile
-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 );
# mangle the compilable files into a format Module::Build can understand
my %xs = map { $subsystems{$_}{file}{from} => $subsystems{$_}{file}{to} }
keys %subsystems;
+
my $build = SDL::Build->new(
- module_name => 'SDL',
dist_name => 'SDL_Perl',
license => 'lgpl',
dist_version_from => 'lib/SDL.pm',
{
'Pod::ToDemo' => '0.20',
},
- c_source => 'src',
+ c_source => $c_source,
+ c_sources => $c_sources,
xs_files => \%xs,
dist_author => 'David J. Goehrig <DGOEHRIG@cpan.org>',
+ install_base => $install_base
);
# and here's where the real (and ugly) magic works... see SDL::Build
Revision history for Perl extension SDL_perl.
-* 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
+* Jul 8 2006 David J. Goehrig <dgoehrig@cpan.org>
+ - finished embedding data in example scripts
+ - fixed Mac OS X file associations
-* Oct 4 2004 David J. Goehrig <dgoehrig@cpan.org>
+* Mar 15 2006 David J. Goehrig <dgoehrig@cpan.org>
+ - fixed OpenGL examples to work under MacOS X using the SDL Perl.app bundle
+
+* Oct 12 2005 David J. Goehrig <dgoehrig@cpan.org>
+ - 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 <dgoehrig@cpan.org>
+ - Changed constructors to die upon invalid initialization
+
+* Oct 5 2005 David J. Goehrig <dgoehrig@cpan.org>
+ - Updated the copyright notices as per the LGPL guidelines
+
+* Oct 4 2005 David J. Goehrig <dgoehrig@cpan.org>
- Patched Cygwin.pm
- Fixed SDL::Rect documentation
- Fixed Freebsd build module package designation
---
name: SDL_Perl
-version: 2.1.3
+version: 2.2.0
author:
- David J. Goehrig <DGOEHRIG@cpan.org>
abstract: Simple DirectMedia Layer for Perl
provides:
SDL:
file: lib/SDL.pm
- version: 2.1.3
+ version: 2.2.0
SDL::App:
file: lib/SDL/App.pm
SDL::Cdrom:
file: lib/SDL/Sound.pm
SDL::Surface:
file: lib/SDL/Surface.pm
- SDL::TTFont:
- file: lib/SDL/TTFont.pm
SDL::Timer:
file: lib/SDL/Timer.pm
SDL::Tool::Font:
file: lib/SDL/Tutorial.pm
SDL::Tutorial::Animation:
file: lib/SDL/Tutorial/Animation.pm
- SDL::Tutorial::Drawing:
- file: lib/SDL/Tutorial/Drawing.pm
SDL::Tutorial::Images:
file: lib/SDL/Tutorial/Images.pm
+ SDL::Tutorial:Drawing:
+ file: lib/SDL/Tutorial/Drawing.pm
SDL::Video:
file: lib/SDL/Video.pm
+ SDL:TTFont:
+ file: lib/SDL/TTFont.pm
SDL_perl:
file: lib/SDL_perl.pm
Walker:
-README for SDL_Perl-2.2
+README for SDL_Perl-2.2.0
-First step is to make SDL perl pass all tests in
-t/.
+What's New in 2.2.0:
-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.
-Simple Run:
-perl Build.PL
-perl Build
-perl Build test
-perl Build install
+Prerequisites:
-There are more test scripts in test/
+SDL Perl recommends installing the following libraries available
+from http://www.libsdl.org/ prior to installing:
-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 <dgoehrig@cpan.org>
-kthakore <thakore.kartik@gmail.com>
-1 August 2009
TODO for SDL_perl
o Add SDL_EventFilter support
+ 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
+#!/usr/bin/env perl
#
-# Copyright (C) 2004 David J. Goehrig
+# SDL.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
# Copyright (C) 2009 Kartik Thakore
package SDL;
BEGIN {
@ISA = qw(Exporter DynaLoader);
@EXPORT = qw( in verify &NULL );
- # reexport all SDL constants
- for (@SDL::Constants::EXPORT) {
- push @EXPORT,$_;
- }
};
-$VERSION = '2.1.3';
+$VERSION = '2.2.1';
print "$VERSION" if (defined($ARGV[0]) && ($ARGV[0] eq '--SDLperl'));
the bitwise OR product of the following functions:
=over 4
-
=item *
INIT_AUDIO()
-# App.pm
+#!/usr/bin/env perl
#
-# The application object, sort of like a surface
+# App.pm
#
-# Copyright (C) 2000,2002,2003,2004 David J. Goehrig
-# Copyright (C) 2009 Kartik Thakore
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
#
+# ------------------------------------------------------------------------------
+#
+# 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
+#
+
package SDL::App;
use strict;
use SDL::Surface;
use SDL::Rect;
+sub DESTROY {
+
+}
+
our @ISA = qw(SDL::Surface);
sub new {
-red_accum_size -ras -blue_accum_size -bas
-green_accum_sizee -gas -alpha_accum_size -aas
-double_buffer -db -buffer_size -bs -stencil_size -st
- -asyncblit -init
+ -asyncblit
/ ) if ($SDL::DEBUG);
- # 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());
my $t = $options{-title} || $options{-t} || $0;
my $it = $options{-icon_title} || $options{-it} || $t;
$f |= SDL::SDL_DOUBLEBUF() if ($db);
$f |= SDL::SDL_ASYNCBLIT() if ($async);
- if ($f & SDL_OPENGL()) {
+ if ($f & SDL::SDL_OPENGL()) {
$SDL::App::USING_OPENGL = 1;
- 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);
- 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);
} else {
$SDL::App::USING_OPENGL = 0;
}
- my $self = \SDL::SetVideoMode($w,$h,$d,$f);
- $$self
+
+ my $self = \SDL::SetVideoMode($w,$h,$d,$f)
or croak SDL::GetError();
if ($ic and -e $ic) {
my $flags = SDL::SurfaceFlags($$self);
if ( $flags & SDL::SDL_RESIZABLE()) {
my $bpp = SDL::SurfaceBitsPerPixel($$self);
- $$self = SDL::SetVideoMode($w,$h,$bpp,$flags);
+ $self = \SDL::SetVideoMode($w,$h,$bpp,$flags);
}
}
-# Cdrom.pm
+#!/usr/bin/env perl
#
-# a SDL cdrom manipluation module
+# Cdrom.pm
#
-# Copyright (C) 2000,2002 David J. Goehrig
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
#
package SDL::Cdrom;
-# Color.pm
+#!/usr/bin/env perl
#
-# A package for manipulating SDL_Color *
+# Color.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
#
-# Copyright (C) 2002,2003,2004 David J. Goehrig
package SDL::Color;
sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
-
- # called like SDL::Color->new($red,$green,$blue);
- return bless \SDL::NewColor(@_), $class if (@_ == 3);
-
my $self;
+
my (%options) = @_;
verify (%options, qw/ -color -surface -pixel -r -g -b /) if $SDL::DEBUG;
}
croak "Could not create color, ", SDL::GetError(), "\n"
unless ($$self);
- bless $self, $class;
+ bless $self,$class;
+ return $self;
}
sub DESTROY {
SDL::ColorB($$self,@_);
}
-sub rgb {
- my $self = shift;
- SDL::ColorRGB($$self,@_);
-}
-
sub pixel {
croak "SDL::Color::pixel requires an SDL::Surface"
unless !$SDL::DEBUG || $_[1]->isa("SDL::Surface");
SDL::MapRGB(${$_[1]},$_[0]->r(),$_[0]->g(),$_[0]->b());
}
-$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;
1;
=head1 SYNOPSIS
- $color = SDL::Color->new($red,$green,$blue); # fastest
-
$color = new SDL::Color ( -r => 0xde, -g => 0xad, -b =>c0 );
$color = new SDL::Color -surface => $app, -pixel => $app->pixel($x,$y);
$color = new SDL::Color -color => SDL::NewColor(0xff,0xaa,0xdd);
=head1 DESCRIPTION
C<SDL::Color> is a wrapper for display format independent color
-representations.
+representations, with the same interface as L<SDL::Color>.
=head2 new ( -color => )
C<SDL::Color::new> with a C<-color> option will construct a new object
referencing the passed SDL_Color*.
-=head2 new ($r, $g, $b)
-
-C<SDL::Color::new> with three color values will construct both a SDL_Color
-structure, and the associated object with the specified values.
-
=head2 new (-r => , -g => , -b => )
C<SDL::Color::new> with C<-r,-g,-b> options will construct both a SDL_Color
the red, green, and blue components respectively. The color value can be set
by passing a byte value (0-255) to each function.
-=head2 rgb ( $red, $green, $blue )
-
-C<SDL::Color::rgb> 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.
-
=head2 pixel ( surface )
C<SDL::Color::pixel> takes a C<SDL::Surface> object and r,g,b values, and
David J. Goehrig
-Additions by Tels 2006.
-
=head1 SEE ALSO
-L<perl> and L<SDL::Surface>.
+L<perl> L<SDL::Surface>
=cut
-# SDL::Constants
+#!/usr/bin/env perl
#
-# This is an automatically generated file, don't bother editing
+# Constants.pm
#
-# Copyright (C) 2003,2004 David J. Goehrig <dgoehrig@cpan.org>
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
#
package SDL::Constants;
-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);
@EXPORT=qw(
AUDIO_S16
AUDIO_S16MSB
MIX_FADING_OUT
MIX_MAX_VOLUME
MIX_NO_FADING
- MIX_CHANNEL_POST
SDLK_0
SDLK_1
SDLK_2
UTF8_BLENDED
UTF8_SHADED
UTF8_SOLID
+ SDL_SVG_FLAG_DIRECT
+ SDL_SVG_FLAG_COMPOSITE
+ SDL_SAMPLEFLAG_NONE
+ SDL_SAMPLEFLAG_CANSEEK
+ SDL_SAMPLEFLAG_EOF
+ SDL_SAMPLEFLAG_ERROR
+ SDL_SAMPLEFLAG_EAGAIN
);
+for (@EXPORT) {
+ *{"SDL::" . $_} = *{$_};
+ *{"main::" . $_} = *{$_};
+}
-__DATA__
sub AUDIO_S16 {32784}
sub AUDIO_S16MSB {36880}
sub AUDIO_S8 {32776}
sub MIX_FADING_OUT {1}
sub MIX_MAX_VOLUME {128}
sub MIX_NO_FADING {0}
-sub MIX_CHANNEL_POST {2}
sub SDLK_0 {48}
sub SDLK_1 {49}
sub SDLK_2 {50}
sub UTF8_BLENDED {32}
sub UTF8_SHADED {16}
sub UTF8_SOLID {8}
+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}
+1;
+#!/usr/bin/env perl
+#
# Cursor.pm
#
-# Copyright (C) 2000,2002 David J. Goehrig
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
#
package SDL::Cursor;
verify (%options, qw/ -data -mask -x -y /) if $SDL::DEBUG;
+ die SDL::GetError() unless $$self;
my $self = \SDL::NewCursor($options{-data},$options{-mask},
$options{-x},$options{-y});
bless $self, $class;
-# Event.pm
+#!/usr/bin/env perl
#
-# A package for handling SDL_Event *
+# Event.pm
#
-# 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 <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
#
package SDL::Event;
+
use strict;
use warnings;
use Carp;
return SDL::PollEvent($$self);
}
-sub peep($$$$)
-{
- my ($event, $numEvents, $action, $mask) = @_;
- return SDL::PeepEvents($$event, $numEvents, $action, $mask);
-}
-
sub push {
my $self = shift;
return SDL::PushEvent($$self);
=head2 pump()
-Pumps the event loop, gathering events from the input devices.
-
=head2 poll()
-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
-
-
=head2 wait()
Waits for an event end returns then. Always returns true.
-# Font.pm
+#!/usr/bin/env perl
#
-# a SDL perl extension for SFont support
+# Font.pm
#
-# Copyright (C) David J. Goehrig 2000,2002
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
#
package SDL::Font;
+
use strict;
use warnings;
use Carp;
+#!/usr/bin/env perl
#
-# MPEG.pm
+# MPEG.pm
#
-# A package for manipulating MPEG video
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
#
-# Copyright (C) 2004 David J. Goehrig
package SDL::MPEG;
-# Mixer.pm
+#!/usr/bin/env perl
+#
+# Mixer.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
#
-# a SDL module for manipulating the SDL_mixer lib.
-#
-# Copyright (C) 2000,2002 David J. Goehrig
-# Copyright (C) 2009 Kartik Thakore
package SDL::Mixer;
+
use strict;
use warnings;
use Carp;
return SDL::MixVolumeMusic($volume);
}
-sub mix_set_panning($$$$) {
- my ($self,$channel,$left,$right) = @_;
- return SDL::MixSetPanning($channel,$left,$right);
- }
-
-
sub halt_channel ($$) {
my ($self,$channel) = @_;
return SDL::MixHaltChannel($channel);
return SDL::MixPlaying($channel);
}
-sub mix_volume_chunk($$$) {
- my ($self, $chunk, $volume) = @_;
- return SDL::MixVolumeChunk($chunk, $volume);
-}
-
sub playing_music () {
return SDL::MixPlayingMusic();
}
Return true when the music is currently playing.
-=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)
-
=head1 AUTHORS
-Kartik Thakore
David J. Goehrig, basic doc added by Tels <http://bloodgate.com>.
=head1 SEE ALSO
-# Music.pm
+#!/usr/bin/env perl
#
-# a SDL_mixer data module
+# Music.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
#
-# Copyright (C) 2000,2002 David J. Goehrig
package SDL::Music;
+
use strict;
use warnings;
use Carp;
sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
+ die SDL::GetError() unless $$self;
my $filename = shift;
my $self = \SDL::MixLoadMusic($filename);
bless $self,$class;
-# SDL::OpenGL.pm
+#!/usr/bin/env perl
#
-# A simplified OpenGL wrapper
+# OpenGL.pm
#
-# Copyright (C) 2002, 2003, 2004 David J. Goehrig
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
#
package SDL::OpenGL;
@ISA=qw(Exporter DynaLoader);
use SDL;
-use SDL::OpenGL::Constants;
bootstrap SDL::OpenGL;
}
}
-# export all GL constants
-for (@SDL::OpenGL::Constants::EXPORT) {
- push @EXPORT, $_;
-}
-
+use SDL::OpenGL::Constants;
1;
-# SDL::OpenGL::Constants
+#!/usr/bin/env perl
#
-# This is an autogenerate file, don't bother editing
+# Constants.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
#
-# Copyright (C) 2003 David J. Goehrig <dave@sdlperl.org>
package SDL::OpenGL::Constants;
-require Exporter;
-
-use SelfLoader;
-#$SelfLoader::DEBUG=1;
-
-use vars qw(
- @EXPORT
- @ISA
-);
-
-@ISA=qw(Exporter);
@EXPORT=qw(
GLU_AUTO_LOAD_MATRIX
GLU_CULLING
GL_ZOOM_Y
);
-__DATA__
+for (@EXPORT) {
+ *{"SDL::" . $_} = *{$_};
+ *{"main::" . $_} = *{$_};
+}
+
sub GLU_AUTO_LOAD_MATRIX {100200}
sub GLU_CULLING {100201}
sub GLU_DISPLAY_MODE {100204}
sub GL_ZERO {0}
sub GL_ZOOM_X {0x0D16}
sub GL_ZOOM_Y {0x0D17}
+
+1;
+#!/usr/bin/env perl
#
-# Palette.pm
+# Palette.pm
#
-# a module for manipulating SDL_Palette *
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
#
-# 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!
package SDL::Palette;
use strict;
$image = shift;
$self = \$image->palette();
} else {
+ die SDL::GetError() unless $$self;
$self = \SDL::NewPalette(256);
}
bless $self, $class;
+#!/usr/bin/env perl
#
-# Rect.pm
+# Rect.pm
#
-# A package for manipulating SDL_Rect *
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
#
-# Copyright (C) 2003 David J. Goehrig
package SDL::Rect;
+
use strict;
use warnings;
use Carp;
my $y = $options{-y} || 0;
my $w = $options{-width} || $options{-w} || 0;
my $h = $options{-height} || $options{-h} || 0;
+ die SDL::GetError() unless $$self;
my $self = \SDL::NewRect($x,$y,$w,$h);
bless $self,$class;
-# SDL::OpenGL.pm
+#!/usr/bin/env perl
#
-# SFont bitmat font support
+# SFont.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
#
-# Copyright (C) 2004 David J. Goehrig
package SDL::SFont;
+#!/usr/bin/env perl
#
-# Sound.pm
+# Sound.pm
#
-# a SDL_mixer data module
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
#
-# Copyright (C) 2000,2002 David J. Goehrig
package SDL::Sound;
use strict;
my $proto = shift;
my $class = ref($proto) || $proto;
my $filename = shift;
+ die SDL::GetError() unless $$self;
my $self = \SDL::MixLoadWAV($filename);
bless $self,$class;
return $self;
+#!/usr/bin/env perl
+#
+# Surface.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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.
#
-# 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:
#
-# A package for manipulating SDL_Surface *
+# David J. Goehrig
+# dgoehrig@cpan.org
#
-# Copyright (C) 2003 David J. Goehrig
package SDL::Surface;
-# TTFont.pm
+#!/usr/bin/env perl
#
-# a SDL perl extension for SDL_ttf support
+# TTFont.pm
#
-# Copyright (C) David J. Goehrig 2002
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
#
package SDL::TTFont;
my $self = {};
my %options;
(%options) = @_;
- $self->{-mode} = $options{-mode} || $options{-m} || TEXT_SHADED();
+ $self->{-mode} = $options{-mode} || $options{-m} || SDL::TEXT_SHADED();
$self->{-name} = $options{-name} || $options{-n};
$self->{-size} = $options{-size} || $options{-s};
$self->{-fg} = $options{-foreground} || $options{-fg} || $SDL::Color::black;
sub normal {
my ($self) = @_;
- SDL::TTFSetFontStyle($$self{-font},TTF_STYLE_NORMAL());
+ SDL::TTFSetFontStyle($$self{-font},SDL::TTF_STYLE_NORMAL());
}
sub bold {
my ($self) = @_;
- SDL::TTFSetFontStyle($$self{-font},TTF_STYLE_BOLD());
+ SDL::TTFSetFontStyle($$self{-font},SDL::TTF_STYLE_BOLD());
}
sub italic {
my ($self) = @_;
- SDL::TTFSetFontStyle($$self{-font},TTF_STYLE_ITALIC());
+ SDL::TTFSetFontStyle($$self{-font},SDL::TTF_STYLE_ITALIC());
}
sub underline {
my ($self) = @_;
- SDL::TTFSetFontStyle($$self{-font},TTF_STYLE_UNDERLINE());
+ SDL::TTFSetFontStyle($$self{-font},SDL::TTF_STYLE_UNDERLINE());
}
sub text_shaded {
my ($self) = @_;
- $$self{-mode} = TEXT_SHADED();
+ $$self{-mode} = SDL::TEXT_SHADED();
}
sub text_solid {
my ($self) = @_;
- $$self{-mode} = TEXT_SOLID();
+ $$self{-mode} = SDL::TEXT_SOLID();
}
sub text_blended {
my ($self) = @_;
- $$self{-mode} = TEXT_BLENDED();
+ $$self{-mode} = SDL::TEXT_BLENDED();
}
sub utf8_shaded {
my ($self) = @_;
- $$self{-mode} = UTF8_SHADED();
+ $$self{-mode} = SDL::UTF8_SHADED();
}
sub utf8_solid {
my ($self) = @_;
- $$self{-mode} = UTF8_SOLID();
+ $$self{-mode} = SDL::UTF8_SOLID();
}
sub utf8_blended {
my ($self) = @_;
- $$self{-mode} = UTF8_BLENDED();
+ $$self{-mode} = SDL::UTF8_BLENDED();
}
sub unicode_shaded {
my ($self) = @_;
- $$self{-mode} = UNICODE_SHADED();
+ $$self{-mode} = SDL::UNICODE_SHADED();
}
sub unicode_solid {
my ($self) = @_;
- $$self{-mode} = UNICODE_SOLID();
+ $$self{-mode} = SDL::UNICODE_SOLID();
}
sub unicode_blended {
my ($self) = @_;
- $$self{-mode} = UNICODE_BLENDED();
+ $$self{-mode} = SDL::UNICODE_BLENDED();
}
croak "Could not initialize True Type Fonts\n"
-# Timer.pm
+#!/usr/bin/env perl
#
-# A package for manipulating SDL_Timer *
+# Timer.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
#
-# Copyright (C) 2002 David J. Goehrig
package SDL::Timer;
+
use strict;
use warnings;
use Carp;
+#!/usr/bin/env perl
#
-# SDL::Tool::Font - format agnostic font tool
+# Font.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
#
-# Copyright (C) 2002 David J. Goehrig
package SDL::Tool::Font;
sub print {
my ($self,$surface,$x,$y,@text) = @_;
croak "Tool::Font::print requires a SDL::Surface\n"
- unless ($surface->isa('SDL::Surface'));
+ unless ($SDL::DEBUG && $surface->isa('SDL::Surface'));
if ($$self{-font}->isa('SDL::Font')) {
$$self{-font}->use();
SDL::SFont::PutString( $$surface, $x, $y, join('',@text));
+#!/usr/bin/env perl
#
-# SDL::GraphicTool - zooming and rotating graphic tool
+# Graphic.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
#
-# Copyright (C) 2002 Russell E. Valentine
-# Copyright (C) 2002 David J. Goehrig
package SDL::Tool::Graphic;
+#!/usr/bin/env perl
+#
+# Tutorial.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
+#
+
package SDL::Tutorial;
-use Pod::ToDemo <<'END_HERE';
+use strict;
+use SDL;
use SDL::App;
# change these values as necessary
+#!/usr/bin/env perl
+#
+# Animation.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
+#
+
package SDL::Tutorial::Animation;
-use Pod::ToDemo <<'END_HERE';
+use strict;
+use SDL;
use SDL::App;
use SDL::Rect;
use SDL::Color;
-package SDL::Tutorial::Drawing;
-
-use Pod::ToDemo <<'END_HERE';
+#!/usr/bin/env perl
+#
+# Drawing.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
+#
+
+package SDL::Tutorial:Drawing;
+
+use strict;
+use SDL;
use SDL::App;
use SDL::Rect;
use SDL::Color;
+#!/usr/bin/env perl
+#
+# Images.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
+#
+
package SDL::Tutorial::Images;
use strict;
+use SDL;
use warnings;
my %images;
+#!/usr/bin/env perl
#
-# Video.pm
+# Video.pm
#
-# A package for manipulating MPEG video
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
#
-# Copyright (C) 2004 David J. Goehrig
package SDL::Video;
my $n = $options{-name} || croak "SDL::Video must supply a filename to SDL::Video::new\n";
my $a = $options{'-audio'} ? 1 : 0;
my $info = new SDL::MPEG();
+ die SDL::GetError() unless $$self;
my $self = \SDL::NewSMPEG($n,$$info,$a);
bless $self,$class;
+#!/usr/bin/env perl
+#
+# SDL_perl.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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.
#
-# 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
#
package SDL_perl;
+#!/usr/bin/env perl
#
-# Copyright (C) 2004 chromatic
-# Copyright (C) 2004 David J. Goehrig
+# Build.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
#
package SDL::Build;
sub process_xs
{
my ($self, $file) = @_;
-
my $properties = $self->{properties};
my $file_args = $self->notes( 'file_flags' )->{$file};
+
my @old_values = @$properties{ keys %$file_args };
@$properties{ keys %$file_args } = values %$file_args;
$self->SUPER::process_xs( $file );
@$properties{ keys %$file_args } = @old_values;
+
}
# every platform has slightly different library and header paths
@{ $includes->{$subsystem} },
split(' ',$sdl_compile),
@{ $defines->{$subsystem} },
- ( defined $Config{usethreads} ? ('-DUSE_THREADS', '-fPIC') : '-fPIC' ),
+ ( defined $Config{usethreads} ? ('-DUSE_THREADS', '-fPIC') : ('-fPIC' )),
],
extra_linker_flags =>
[
print $file $text;
}
+# 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);
+}
+
1;
+#!/usr/bin/env perl
+#
+# Cygwin.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
+#
+
package SDL::Build::Cygwin;
use base 'SDL::Build';
+#!/usr/bin/env perl
+#
+# Darwin.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
+#
+
package SDL::Build::Darwin;
use base 'SDL::Build';
'/usr/local/include/gl' => '/usr/local/lib',
'/usr/include/GL' => '/usr/lib',
'/usr/include/gl' => '/usr/lib',
-
- '/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',
);
}
-sub build_defines
+sub build_c_sources
{
- my $self = shift;
- my $defines = $self->SUPER::build_defines(@_);
+ return [qw/
+ launcher.m
+ /];
+}
- push @{$defines->{SDL}}, "-Ddarwin", "-DMACOSX";
+sub build_c_source
+{
+ return 'MacOSX';
+}
- return $defines;
+sub build_install_base
+{
+ return "SDL Perl.app/Contents/Resources";
}
+
+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\"";
+}
+
1;
+#!/usr/bin/env perl
+#
+# Freebsd.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
+#
+
package SDL::Build::Freebsd;
use base 'SDL::Build';
+#!/usr/bin/env perl
+#
+# Linux.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
+#
+
package SDL::Build::Linux;
use base 'SDL::Build';
+#!/usr/bin/env perl
+#
+# MSWin32.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
+#
+
package SDL::Build::MSWin32;
use strict;
+#!/usr/bin/env perl
+#
+# Netbsd.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
+#
+
package SDL::Build::Netbsd;
-use base 'SDL::Build';
+use strict;
sub fetch_includes
{
-// SDL::OpenGL
//
-// Copyright (C) 2002,2003,2004 David J. Goehrig
+// OpenGL.xs
+//
+// Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+//
+// ------------------------------------------------------------------------------
+//
+// 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 <gl.h>
#include <glu.h>
-#include <GL/glx.h>
#ifdef USE_THREADS
#define HAVE_TLS_CONTEXT
#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFF
#endif /* GL_ALL_CLIENT_BITS */
-#include "defines.h"
+#include "../defines.h"
SV* sdl_perl_nurbs_error_hook;
void
case GL_MAX_ATTRIB_STACK_DEPTH:
case GL_POLYGON_SMOOTH_HINT:
case GL_ACCUM_GREEN_BITS:
- case GL_MAX_TEXTURE_UNITS_ARB:
{
GLint ret[1];
int i;
croak("Unknown glGet parameter!");
}
-const char * glGetString ( name )
- GLenum name
- CODE:
- RETVAL = (const char *)glGetString (name);
- OUTPUT:
- RETVAL
Uint32
glIsEnabled ( cap )
glCallLists(len,GL_BYTE,str);
void
-glRasterPos ( x, y, ... )
+glRasterPos ( x, y, z, ... )
double x
double y
+ double z
CODE:
- 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);
}
void
glGenTextures ( n )
Uint32 n;
CODE:
- Uint32 i;
- Uint32 *names;
- names = (Uint32*)safemalloc(sizeof(Uint32)*n);
+ GLsizei i;
+ GLuint* names;
+ names = (GLuint*)safemalloc(sizeof(GLuint)*n);
RETVAL = newAV();
glGenTextures(n,names);
for ( i = 0; i < n; i++ ) {
void
glDeleteTextures ( ... )
CODE:
- Uint32 *textures;
+ GLuint* textures;
int i;
- textures = (Uint32*)safemalloc(sizeof(Uint32) * items);
+ textures = (GLuint*)safemalloc(sizeof(GLuint) * items);
if ( textures ) {
for ( i = 0; i < items; i++ ) {
textures[i] = SvIV(ST(i));
AV*
glAreTexturesResident ( ... )
CODE:
- Uint32 *textures;
+ GLuint* textures;
GLboolean *homes;
int i;
RETVAL = newAV();
- textures = (Uint32*)safemalloc(sizeof(Uint32) * items);
+ textures = (GLuint*)safemalloc(sizeof(GLuint) * items);
homes = (GLboolean*)safemalloc(sizeof(GLboolean) * items);
if ( textures ) {
for ( i = 0; i < items; i++ ) {
#endif
-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 );
-
#endif
+//
// SDL.xs
//
-// SDL Perl by David J. Goehrig <dgoehrig@cpan.org>
+// Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+//
+// ------------------------------------------------------------------------------
+//
+// 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
//
-// 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
#include "EXTERN.h"
#include "perl.h"
#include <SDL.h>
+#ifdef HAVE_GL
+#include <gl.h>
+#endif
+
+#ifdef HAVE_GLU
+#include <glu.h>
+#endif
+
#ifdef HAVE_SDL_IMAGE
#include <SDL_image.h>
#endif
void (*mix_music_finished_cv)();
#endif
-#ifdef HAVE_GL
-#include <gl.h>
-#endif
-
-#ifdef HAVE_GLU
-#include <glu.h>
+#ifdef HAVE_SDL_SOUND
+#include <SDL_sound.h>
#endif
#ifdef HAVE_SDL_NET
#include <SDL_imageFilter.h>
#endif
+#ifdef HAVE_SDL_SVG
+#include <SDL_svg.h>
+#endif
+
#ifdef USE_THREADS
#define HAVE_TLS_CONTEXT
#endif
#include "defines.h"
-#ifdef MACOSX
-#include <CoreServices/CoreServices.h>
-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
-
-
-
-
-
Uint32
sdl_perl_timer_callback ( Uint32 interval, void* param )
{
#endif
+#define INIT_NS_APPLICATION
+#define QUIT_NS_APPLICATION
+
+
void
sdl_perl_atexit (void)
{
+ QUIT_NS_APPLICATION
SDL_Quit();
-#ifdef MACOSX
- SDL_macosx_quit();
-#endif
}
void boot_SDL();
Init ( flags )
Uint32 flags
CODE:
-#ifdef MACOSX
- SDL_macosx_init();
-#endif
+ INIT_NS_APPLICATION
RETVAL = SDL_Init(flags);
#ifdef HAVE_TLS_CONTEXT
Perl_call_atexit(PERL_GET_CONTEXT, (void*)sdl_perl_atexit,0);
void
Quit ()
CODE:
+ QUIT_NS_APPLICATION
SDL_Quit();
-#ifdef MACOSX
- SDL_macosx_quit();
-#endif
-
int
WasInit ( flags )
OUTPUT:
RETVAL
+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
+
int
CDNumDrives ()
CODE:
CODE:
safefree(e);
-
-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
-
-
int
PollEvent ( e )
SDL_Event *e
RETVAL
void
-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
FreeColor ( color )
SDL_Color *color
CODE:
RETVAL
int
-MixSetPanning ( channel, left, right )
- int channel
- Uint8 left
- Uint8 right
- CODE:
- RETVAL = Mix_SetPanning(channel,left, right);
- OUTPUT:
- RETVAL
-
-
-int
MixPlayChannelTimed ( channel, chunk, loops, ticks )
int channel
Mix_Chunk *chunk
OUTPUT:
RETVAL
-Sint16
+Uint8
JoyButtonEventWhich ( e )
SDL_Event *e
CODE:
int
NetResolveHost ( address, host, port )
IPaddress *address
- char *host
+ const char *host
Uint16 port
CODE:
RETVAL = SDLNet_ResolveHost(address,host,port);
void
FreeSMPEGInfo ( info )
- SMPEG_Info *info;
+ SMPEG_Info *info
CODE:
safefree(info);
int
SMPEGInfoHasAudio ( info )
- SMPEG_Info* info;
+ SMPEG_Info* info
CODE:
RETVAL = info->has_audio;
OUTPUT:
int
SMPEGInfoHasVideo ( info )
- SMPEG_Info* info;
+ SMPEG_Info* info
CODE:
RETVAL = info->has_video;
OUTPUT:
int
SMPEGInfoWidth ( info )
- SMPEG_Info* info;
+ SMPEG_Info* info
CODE:
RETVAL = info->width;
OUTPUT:
int
SMPEGInfoHeight ( info )
- SMPEG_Info* info;
+ SMPEG_Info* info
CODE:
RETVAL = info->height;
OUTPUT:
int
SMPEGInfoCurrentFrame ( info )
- SMPEG_Info* info;
+ SMPEG_Info* info
CODE:
RETVAL = info->current_frame;
OUTPUT:
double
SMPEGInfoCurrentFPS ( info )
- SMPEG_Info* info;
+ SMPEG_Info* info
CODE:
RETVAL = info->current_fps;
OUTPUT:
int
SMPEGInfoCurrentAudioFrame ( info )
- SMPEG_Info* info;
+ SMPEG_Info* info
CODE:
RETVAL = info->audio_current_frame;
OUTPUT:
int
SMPEGInfoCurrentOffset ( info )
- SMPEG_Info* info;
+ SMPEG_Info* info
CODE:
RETVAL = info->current_offset;
OUTPUT:
int
SMPEGInfoTotalSize ( info )
- SMPEG_Info* info;
+ SMPEG_Info* info
CODE:
RETVAL = info->total_size;
OUTPUT:
double
SMPEGInfoCurrentTime ( info )
- SMPEG_Info* info;
+ SMPEG_Info* info
CODE:
RETVAL = info->current_time;
OUTPUT:
double
SMPEGInfoTotalTime ( info )
- SMPEG_Info* info;
+ SMPEG_Info* info
CODE:
RETVAL = info->total_time;
OUTPUT:
char *
SMPEGError ( mpeg )
- SMPEG* mpeg ;
+ SMPEG* mpeg
CODE:
RETVAL = SMPEG_error(mpeg);
OUTPUT:
SMPEG*
NewSMPEG ( filename, info, use_audio )
- char* filename;
- SMPEG_Info* info;
+ char* filename
+ SMPEG_Info* info
int use_audio
CODE:
#ifdef HAVE_SDL_MIXER
void
FreeSMPEG ( mpeg )
- SMPEG* mpeg;
+ SMPEG* mpeg
CODE:
SMPEG_delete(mpeg);
void
SMPEGEnableAudio ( mpeg , flag )
- SMPEG* mpeg ;
- int flag;
+ SMPEG* mpeg
+ int flag
CODE:
SMPEG_enableaudio(mpeg,flag);
#ifdef HAVE_SDL_MIXER
void
SMPEGEnableVideo ( mpeg , flag )
- SMPEG* mpeg ;
- int flag;
+ SMPEG* mpeg
+ int flag
CODE:
SMPEG_enablevideo(mpeg,flag);
void
SMPEGSetVolume ( mpeg , volume )
- SMPEG* mpeg ;
- int volume;
+ SMPEG* mpeg
+ int volume
CODE:
SMPEG_setvolume(mpeg,volume);
void
SMPEGSetDisplay ( mpeg, dest, surfLock )
- SMPEG* mpeg;
- SDL_Surface* dest;
- SDL_mutex* surfLock;
+ SMPEG* mpeg
+ SDL_Surface* dest
+ SDL_mutex* surfLock
CODE:
SMPEG_setdisplay(mpeg,dest,surfLock,NULL);
void
SMPEGScaleXY ( mpeg, w, h)
- SMPEG* mpeg;
- int w;
- int h;
+ SMPEG* mpeg
+ int w
+ int h
CODE:
SMPEG_scaleXY(mpeg,w,h);
void
SMPEGScale ( mpeg, scale )
- SMPEG* mpeg;
+ SMPEG* mpeg
int scale
CODE:
SMPEG_scale(mpeg,scale);
void
SMPEGPlay ( mpeg )
- SMPEG* mpeg;
+ SMPEG* mpeg
CODE:
SDL_AudioSpec audiofmt;
Uint16 format;
SMPEGstatus
SMPEGStatus ( mpeg )
- SMPEG* mpeg;
+ SMPEG* mpeg
CODE:
RETVAL = SMPEG_status(mpeg);
OUTPUT:
void
SMPEGPause ( mpeg )
- SMPEG* mpeg;
+ SMPEG* mpeg
CODE:
SMPEG_pause(mpeg);
void
SMPEGLoop ( mpeg, repeat )
- SMPEG* mpeg;
+ SMPEG* mpeg
int repeat
CODE:
SMPEG_loop(mpeg,repeat);
void
SMPEGStop ( mpeg )
- SMPEG* mpeg;
+ SMPEG* mpeg
CODE:
SMPEG_stop(mpeg);
#ifdef HAVE_SDL_MIXER
void
SMPEGRewind ( mpeg )
- SMPEG* mpeg;
+ SMPEG* mpeg
CODE:
SMPEG_rewind(mpeg);
void
SMPEGSeek ( mpeg, bytes )
- SMPEG* mpeg;
- int bytes;
+ SMPEG* mpeg
+ int bytes
CODE:
SMPEG_seek(mpeg,bytes);
void
SMPEGSkip ( mpeg, seconds )
- SMPEG* mpeg;
- float seconds;
+ SMPEG* mpeg
+ float seconds
CODE:
SMPEG_skip(mpeg,seconds);
void
SMPEGSetDisplayRegion ( mpeg, rect )
- SMPEG* mpeg;
- SDL_Rect* rect;
+ SMPEG* mpeg
+ SDL_Rect* rect
CODE:
SMPEG_setdisplayregion(mpeg,rect->x,rect->y,rect->w,rect->h);
void
SMPEGRenderFrame ( mpeg, frame )
- SMPEG* mpeg;
- int frame;
+ SMPEG* mpeg
+ int frame
CODE:
SMPEG_renderFrame(mpeg,frame);
SMPEG_Info *
SMPEGGetInfo ( mpeg )
- SMPEG* mpeg;
+ SMPEG* mpeg
CODE:
RETVAL = (SMPEG_Info *) safemalloc (sizeof(SMPEG_Info));
SMPEG_getinfo(mpeg,RETVAL);
SDL_Surface *
GFXRotoZoom ( src, angle, zoom, smooth)
- 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
SDL_Surface *
GFXZoom ( src, zoomx, zoomy, smooth)
- 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
int
GFXPixelColor ( dst, x, y, color )
- 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
int
GFXPixelRGBA ( dst, x, y, r, g, b, a )
- 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
int
GFXHlineColor ( dst, x1, x2, y, color )
- 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
int
GFXHlineRGBA ( dst, x1, x2, y, r, g, b, a )
- 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
int
GFXVlineColor ( dst, x, y1, y2, color )
- 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
int
GFXVlineRGBA ( dst, x, y1, y2, r, g, b, a )
- 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
int
GFXRectangleColor ( dst, x1, y1, x2, y2, color )
- 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
int
GFXRectangleRGBA ( dst, x1, y1, x2, y2, r, g, b, a )
- 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
int
GFXBoxColor ( dst, x1, y1, x2, y2, color )
- 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
int
GFXBoxRGBA ( dst, x1, y1, x2, y2, r, g, b, a )
- 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
int
GFXLineColor ( dst, x1, y1, x2, y2, color )
- 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
int
GFXLineRGBA ( dst, x1, y1, x2, y2, r, g, b, a )
- 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
int
GFXAalineColor ( dst, x1, y1, x2, y2, color )
- 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
int
GFXAalineRGBA ( dst, x1, y1, x2, y2, r, g, b, a )
- 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
int
GFXCircleColor ( dst, x, y, r, color )
- 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
int
GFXCircleRGBA ( dst, x, y, rad, r, g, b, a )
- 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
int
GFXAacircleColor ( dst, x, y, r, color )
- 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
int
GFXAacircleRGBA ( dst, x, y, rad, r, g, b, a )
- 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
int
GFXFilledCircleColor ( dst, x, y, r, color )
- 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
int
GFXFilledCircleRGBA ( dst, x, y, rad, r, g, b, a )
- 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
int
GFXEllipseColor ( dst, x, y, rx, ry, color )
- 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
int
GFXEllipseRGBA ( dst, x, y, rx, ry, r, g, b, a )
- 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
int
GFXAaellipseColor ( dst, xc, yc, rx, ry, color )
- 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
int
GFXAaellipseRGBA ( dst, x, y, rx, ry, r, g, b, a )
- 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
int
GFXFilledEllipseColor ( dst, x, y, rx, ry, color )
- 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
int
GFXFilledEllipseRGBA ( dst, x, y, rx, ry, r, g, b, a )
- 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
int
GFXFilledPieColor ( dst, x, y, rad, start, end, color )
- 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
int
GFXFilledPieRGBA ( dst, x, y, rad, start, end, r, g, b, a )
- 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
int
GFXPolygonColor ( dst, vx, vy, n, color )
- 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
int
GFXPolygonRGBA ( dst, vx, vy, n, r, g, b, a )
- 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
int
GFXAapolygonColor ( dst, vx, vy, n, color )
- 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
int
GFXAapolygonRGBA ( dst, vx, vy, n, r, g, b, a )
- 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
int
GFXFilledPolygonColor ( dst, vx, vy, n, color )
- 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
int
GFXFilledPolygonRGBA ( dst, vx, vy, n, r, g, b, a )
- 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
int
GFXCharacterColor ( dst, x, y, c, color )
- 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
int
GFXCharacterRGBA ( dst, x, y, c, r, g, b, a )
- 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
int
GFXStringColor ( dst, x, y, c, color )
- 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
int
GFXStringRGBA ( dst, x, y, c, r, g, b, a )
- 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
+
#endif
SoundDecoderInfoExtensions ( decoderinfo )
Sound_DecoderInfo* decoderinfo
CODE:
- char **ext;
+ const char **ext;
for ( ext = decoderinfo->extensions; *ext != NULL; ext++ ){
- av_push(RETVAL,sv_2mortal(newSVpv(*ext,0)));
+ av_push(RETVAL,newSVpv(*ext,0));
}
OUTPUT:
RETVAL
-char*
+const char*
SoundDecoderInfoDescription ( decoderinfo )
Sound_DecoderInfo* decoderinfo
CODE:
OUTPUT:
RETVAL
-char*
+const char*
SoundDecoderInfoAuthor ( decoderinfo )
Sound_DecoderInfo* decoderinfo
CODE:
OUTPUT:
RETVAL
-char*
+const char*
SoundDecoderInfoUrl ( decoderinfo )
Sound_DecoderInfo* decoderinfo
CODE:
SoundSampleBufferSize ( sample )
Sound_Sample* sample
CODE:
- RETVAL = sample->buffer;
+ RETVAL = sample->buffer_size;
OUTPUT:
RETVAL
OUTPUT:
RETVAL
+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
+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
#endif
-/************************************************************************
-* SFONT - SDL Font Library by Karl Bartel <karlb@gmx.net> *
-* *
-* 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 <dgoehrig@cpan.org>
+//
+// ------------------------------------------------------------------------------
+//
+// 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 "SDL.h"
-// SDL::SFont
//
-// SFont bitmap font support
+// SFont.xs
//
-// SFont library code by Karl Bartel <karlb@gmx.net>
+// Original SFont code Copyright (C) Karl Bartel
+// Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
//
-// 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
//
#include "EXTERN.h"
#define HAVE_TLS_CONTEXT
#endif
-#include "defines.h"
-#include "SFont.h"
+#include "../defines.h"
+#include "../SFont.h"
#ifdef HAVE_SDL_IMAGE
#include <SDL_image.h>
//
-// Copyright (C) 2004 David J. Goehrig
+// defines.h
//
+// Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+//
+// ------------------------------------------------------------------------------
+//
+// 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
//
#ifndef SDL_PERL_DEFINES_H
#
# Copyright (C) 2003 Tels
# Copyright (C) 2004 David J. Goehrig
-# 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
+#
+#
# basic testing of SDL::App
BEGIN {
- unshift @INC, 'blib/lib','blib/arch', 'blib/arch/auto/', 'blib/arch/auto/SDL/SFont';
+ unshift @INC, 'blib/lib','blib/arch';
}
use strict;
# 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 {
#!/usr/bin/perl -w
#
-# Copyright (C) 2003,2006 Tels
+# Copyright (C) 2003 Tels
# Copyright (C) 2004 David J. Goehrig
#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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 {
use Test::More;
-plan ( tests => 15 );
+plan ( tests => 10 );
use_ok( 'SDL::Color' );
r
g
b
- rgb
pixel /);
# some basic tests:
is ($color->g(),0, 'g is 0');
is ($color->b(),0, 'b is 0');
-is (join(":", $color->rgb()), '0:0:0', 'r, g and b are 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');
-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)');
-
# Copyright (C) 2003 Tels
# Copyright (C) 2004 David J. Goehrig
#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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 {
# Copyright (C) 2003 Tels
# Copyright (C) 2004 David J. Goehrig
#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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 {
type
pump
poll
- peep
wait
set
set_unicode
button
button_state
button_x
- button_y
- /);
+ button_y /);
#
# Copyright (C) 2003 Tels
# Copyright (C) 2004 David J. Goehrig
-# Copyright (C) 2009 Kartik Thakore
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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', 'blib/arch/auto/src/SDL/SFont';
+ unshift @INC, 'blib/lib','blib/arch';
}
use strict;
#
# Copyright (C) 2003 Tels
# Copyright (C) 2004 David J. Goehrig
-# Copyright (C) 2009 Kartik Thakore
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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 {
music_paused
playing
playing_music
- mix_volume_chunk
- mix_set_panning
/);
# these are exported by default, so main:: should know them:
# Copyright (C) 2003 Tels
# Copyright (C) 2004 David J. Goehrig
#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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 {
# Copyright (C) 2003 Tels
# Copyright (C) 2004 David J. Goehrig
#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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 {
#
# Copyright (C) 2003 Tels
# Copyright (C) 2004 David J. Goehrig
-# Copyright (C) 2009 Kartik Thakore
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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', 'blib/arch/auto/src/SDL/OpenGL';
+ unshift @INC, 'blib/lib','blib/arch';
}
use strict;
use Test::More;
if ( SDL::Config->has('GL') && SDL::Config->has('GLU') ) {
- plan ( tests => 4 );
+ plan ( tests => 3 );
} else {
plan ( skip_all => 'OpenGL support not compiled' );
}
glFrontFace
glFrustum
glGet
- glGetString
glLight
glLoadIdentity
glMap1
gluNurbsCurve
gluNurbsProperty
gluNurbsSurface
- gluPwlCurve
- gluNewQuadric
- gluDeleteQuadric
- gluQuadricNormals
- gluQuadricTexture
- gluCylinder
- gluDisk
- gluPartialDisk
- gluSphere /);
-
-can_ok('main',qw/glXUseXFont/);
+ gluPwlCurve /);
# Copyright (C) 2003 Tels
# Copyright (C) 2004 David J. Goehrig
#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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 {
# Copyright (C) 2003 Tels
# Copyright (C) 2004 David J. Goehrig
#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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 {
# Copyright (C) 2003 Tels
# Copyright (C) 2004 David J. Goehrig
#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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 {
# Copyright (C) 2003 Tels
# Copyright (C) 2004 David J. Goehrig
#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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 {
#
# Copyright (C) 2003 Tels
# Copyright (C) 2004 David J. Goehrig
-# Copyright (C) 2009 Kartik Thakore
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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', 'blib/arch/auto/src/SDL/SFont',;
+ unshift @INC, 'blib/lib','blib/arch';
}
use strict;
isa_ok($surface,'SDL::Surface');
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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
+#
# Copyright (C) 2003 Tels
# Copyright (C) 2004 David J. Goehrig
#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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 {
# Copyright (C) 2003 Tels
# Copyright (C) 2004 David J. Goehrig
#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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', 'blib/arch/auto/src/SDL/SFont/';
+ unshift @INC, 'blib/lib','blib/arch';
}
use strict;
#
# Copyright (C) 2003 Tels
# Copyright (C) 2004 David J. Goehrig
-# Copyright (C) 2009 Kartik Thakore
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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', 'blib/arch/auto/src/SDL/SFont/';
+ unshift @INC, 'blib/lib','blib/arch';
}
use strict;
#
# Copyright (C) 2003 Tels
# Copyright (C) 2004 David J. Goehrig
-# Copyright (C) 2009 Kartik Thakore
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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', 'blib/arch/auto/src/SDL/SFont';
+ unshift @INC, 'blib/lib','blib/arch';
}
use strict;
#
# Copyright (C) 2003 Tels
# Copyright (C) 2004 David J. Goehrig
-# Copyright (C) 2009 Kartik Thakore
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# 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', 'blib/arch/auto/src/SDL/SFont';
+ unshift @INC, 'blib/lib','blib/arch';
}
use strict;
const Uint16 * T_PTR
Uint8 T_U_CHAR
Uint8 * T_PTR
+const Uint8* T_PTR
Uint8 ** T_PTR
Uint16 T_UV
Uint16 * T_PTR
Sint32 T_IV
Sint32 * T_PTR
SDL_Event * T_PTR
-SDL_eventaction T_PTR
SDL_Surface * T_PTR
SDL_SysWMmsg * T_PTR
SDL_CD * T_PTR
GLUnurbsObj * T_PTR
GLUtesselator * T_PTR
GLuint T_UV
+GLuint* T_PTR
GLint T_IV
GLint* T_PTR
float * T_PTR
float T_NV
GLfloat T_NV
-GLUquadric * T_PTR
-GLdouble T_NV
Sound_DecoderInfo * T_PTR
const Sound_DecoderInfo * T_PTR
Sound_Sample * T_PTR
Sound_AudioInfo * T_PTR
-Font T_IV
+SDL_RWops* T_PTR
+SDL_svg_context* T_PTR