
-----------------------------------
Zren
Wed Apr 15, 2009 10:18 pm

Tiling with SDL
-----------------------------------
I've been learning C++ and SDL from LazyFoo.net. After awhile I decided to attempt at making a platformer, since I learn best when trying to convert the teaching into a game. Unfortunatly I can't seem to understand how to tile surfaces...properly.

clip is the x,y,w,h of the source image that is being use to tile.

My logic is this:
Load Image.
Split into three.
Tile middle part.
Send X,Y, Width & Height of Clip to function.
Print to temporary Surface.
Print temp surface to screen.

I can't seem to understand why this won't work.


    //image is 100x20. image is using the pixels from 10 