I still haven't gotten SDL_perl to build properly for ActivePerl / VC6, but I wanted
to start playing around with it, so I installed PodMaster's ppd from crazyinsomniac's
repository. It seems to work for the most part, but I've run into two things I'd like
to ask about, and chromatic suggested I ask here.
Simplest is, basically, does fullscreen() work on Win32? When I call fullscreen() on
my SDL::App object (see code below), it seems to do nothing. I'm not sure if this is
a limitation of SDL_perl, just on Win32, or if I'm doing something wrong.
Secondly, I wasn't able to get image loading to work. I used the example code almost
straight from SDL::Tutorial::Images, but it dies when trying to create an SDL::Surface
with a name parameter. chromatic pointed out that I needed SDL_image installed, which
I hadn't seen on the SDL website before. However, I installed the SDL_image Win32
.dll's from libsdl.org, and it made no difference. Anyway, any help on this would be
much appreciated.
Thanks,
Cory
-- Test Code --
#!/usr/bin/winperl
use warnings;
use strict;
BEGIN { $ENV{PATH} = 'C:\Program Files\SDL-1.2.7\lib;' . $ENV{PATH} }
use SDL;
use SDL::App;
use SDL::Constants;
die $SDL::VERSION, "\n";
my $title = 'My SDL App';
my ($width, $height, $depth) = ( 640, 480, 16 );
my $app = SDL::App->new(
-width => $width,
-height => $height,
-depth => $depth,
-title => $title,
);
$app->fullscreen(1); # does nothing
# Dies here...
my $img = SDL::Surface->new( -name => 'mouse.png' );
# with the error (formatted):
#
# Can't locate auto/SDL/IMGLoad.al in @INC (@INC contains:
# /usr/lib/perl5/site_perl/5.8.0
# c:/Perl/lib c:/Perl/site/lib
# .
# ) at c:/Perl/site/lib/SDL/Surface.pm line 26
my $rect = SDL::Rect->new(
-width => $img->width,
-height => $img->height,
-x => 160,
-y => 120,
);
$img->blit($rect, $app, $rect);
$app->update($rect);
$app->loop(
{
SDL_QUIT() => sub { exit },
}
);