[SDL] Surface Drawing Problem

Started by
2 comments, last by nullsquared 17 years, 9 months ago
I have a tile class for a tile based game and it has an SDL_Surface as one of it's members. Loading an image that I'm trying to load into a solitary SDL_Surface and displaying it works just fine, but if I try to load the image into tile.img and display tile.img, nothing shows up on the screen. What could be the problem?
Advertisement
Could you show us how you load it and display it? This could be because of many things.
Well, I figured out how to make it work, but I don't know why that makes it work.

I have a class, and that was a member, but the functions that were in that class as well couldn't display it for some reason, but if I declared the tile outside of the class, it worked. Why would that happen?
Quote:Original post by Grantyt3
Well, I figured out how to make it work, but I don't know why that makes it work.

I have a class, and that was a member, but the functions that were in that class as well couldn't display it for some reason, but if I declared the tile outside of the class, it worked. Why would that happen?


I'm not sure, could you maybe post some short code snippets so we can see? I'm sorta confused :/.

This topic is closed to new replies.

Advertisement