Skip to main content
GameDev.net gamedev.net
🔒 Locked

[SDL] Surface Drawing Problem

Started by Grantyt3 Jul 5, 2006 at 4:51 PM 2 replies 950+ views
Original Post
Grantyt3
Grantyt3
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?
Grantyt3
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?
nullsquared
nullsquared
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 :/.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.