• Advertisement
Sign in to follow this  

Resizing sprites with SDL and without SDL_Buffer

This topic is 4724 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, my first post here, this community kicks ass! I wanted to know about the thread's subject, that's because I'd like to port my projects to Amiga and SDL_Buffer isn't available on that platform (yet). How can I realize dynamic sprite resizing in a game? It doesn't seem to work when I change surfaces size.. Thanks a lot! Bye :)

Share this post


Link to post
Share on other sites
Advertisement
Try SDL_gfx @ http://www.ferzkopp.net/~aschiffler/Software/SDL_gfx-2.0/

You want zoomSurface()
Quote:
SDL_Surface * zoomSurface (SDL_Surface *src, double zoomx, double zoomy, int smooth);

Zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface.
'zoomx' and 'zoomy' are scaling factors for width and height. If 'smooth' is 1
then the destination 32bit surface is anti-aliased. If the surface is not 8bit
or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement