Moving frozen Bubble to the new SDL API

[email protected] (Kartik Thakore)
Newsgroups perl.sdl.devel
Message-ID <[email protected]>
HI Guillaume,

Since most of the new SDL API is ready for frozen bubble I have started to
move FB over to it.  Here is my work so far
http://github.com/kthakore/frozen-bubble/tree/redesign you will need the
SDL_perl from here http://github.com/kthakore/SDL_perl/tree/redesign

However I am getting stuck at a particular location where you try to convert
SDL::Surface to a hash_ref or something and send it to
fb_c_stuff::rotate_bicubic

The conversion is done at the subroutine surf.

sub surf {
>     my ($surface) = @_;
>     $surfstyle ||= UNIVERSAL::isa($surface, 'HASH') ? 'hashref' :
> 'scalarref';
>     return $surfstyle eq 'hashref' ? $surface->{-surface} : $$surface;
> }
>


Since there are no comments here I am at a loss. Currently SDL::Surface as
Opaque Objects in the typemap to prevent memory leaks. You can see the

The code starts at line 2718.


        $canon{img}{$number} = SDL::Surface->new( SDL_ANYFORMAT,
> $shooter->w, $shooter->h,  32, 0,0,0,0);
>         fb_c_stuff::rotate_bicubic(surf($canon{img}{$number}),
> surf($shooter), $angle);
>

What is the need for surf here?

Thanks for any help in advance.

Cheers
Kartik Thakore
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.