Jump to content
  • Advertisement
Sign in to follow this  
Grantyt3

[SDL] Surface Drawing Problem

This topic is 4485 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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?

Share this post


Link to post
Share on other sites
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 :/.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!