tile based game engine?

Pages: 12
No, just do a loop like that every time you have to draw the surfaces, and give the surface the position you got from what i mentioned in my last post.
Have something like this where you see comments in that post:
1
2
3
4
SDL_Rect Rectangle;
Rectangle.x = x * 32;
Rectangle.y = y * 32;
SDL_BlitSurface( ..., ..., ..., &Rectangle);
oh, sorry, i misunderstood you a bit then :P

thanks for clearing it up. i'l stop bothering you good people now, and go try figure out the rest by myself, at least as long as i get :D

edit: god im stupid....i went back to look at your loop, and realised i had written a very similar function myself earlier. only i printed the value of the array, and not a surface. but i still had the whole one row, then go to the next one, thing as you had :)
knowing that will make it a lot easier :D
Last edited on
Topic archived. No new replies allowed.
Pages: 12