develooper Front page | perl.sdl.devel | Postings from March 2011

Can`t draw sprite on another sprite

From:
Roman V. Nikolaev
Date:
March 22, 2011 13:03
Subject:
Can`t draw sprite on another sprite
Message ID:
4D89007A.4080900@rambler.ru
How?
I was use SDLx::Sprite::Animated, but my images in separate files like:
unit-run1.png, unit-run2.png, unit-run3.png, ...
I make simple child (in attach) but this strings not work:

my $full = SDLx::Surface->new(width=>$width, height=>$height);
$_->surface->blit($full) for @sprite;

I try SDLx::Sprite->draw but it not work too. I think I go to wrong way.
Please help me to do this.

P.S. What you think: this code (with fixes) can be added later in
SDLx::Sprite::Animated?


Roman V. Nikolaev




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About