[SDL] Reading and writing Data to/from Surface
Jan Pfeifer
janpf at yahoo-inc.com
Thu Nov 7 09:21:01 PST 2002
> >> I am trying to develop a FRomTopView Type of Game. [...]
> >> Now i have to Rotate and Translate the image in the map and
> >> then write it to the Screen Surface..
>
> MH> You may want to check out SDL_rotozoom, or even better, SDL_gfx. See
> MH> www.libsdl.org for more info.
>
> SDL_gfx supports only *full* surface zooming, but if I need to zoom a
> region?
> 1) I need to create a new temporary surface, then zoom it, it`s
> expensive for animation.
> 2) What can I use instead SDL_gfx?
for rotation you will always need to work with 2 surfaces, the original and
the one where the algorithm is writing the rotationed image ... (otherwise
during the rotation the algorithm would overwrite original pixels that are
still needed) So at least a scratch surface is needed ... (which could be
later blitted back to the original screen or directly to the framebuffer)
More information about the SDL
mailing list