[SDL] Surface Drawing Problem
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?
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 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
Popular Topics
Advertisement