SDL Loading bitmap (Newb)

Bonked
Unregistered
 
Post: #1
Hello all,

I'm new to programming games on the mac. I'm using Xcode and started the tutorials on SDL i found on http://sol.gfxile.net/gp/index.html

Everything was going great up to lesson 13.
In this part the central idee is loading a bitmap. This however doesn't compile propely for me even when I use the provided source code.

Can anyone try the sourcecode found on the website and see if it works and if not fix it? I would be happy to know what's going wrong.

Source: http://sol.gfxile.net/gp/ch13.html

Thank you very much, Ed
Quote this message in a reply
Apprentice
Posts: 13
Joined: 2006.11
Post: #2
The source compiled for me on the first time. I got a runtime error, but that's just because I didn't bother to drop the images into the appropriate directory. Make sure the .bmp images are under /Project/build/development before running.

What error do you get when you try to compile?
Quote this message in a reply
Bonked
Unregistered
 
Post: #3
I stored the bitmap in the same folder where the .xcodeproject is. This is probably not the same folder you are talking about. I'll follow your advice when I get home. This will probably fix it.

Thanks,
Ed
Quote this message in a reply
clapton541
Unregistered
 
Post: #4
What you might want to try is instead of SDL_LoadBMP("tiles.bmp");
try
SDL_LoadBMP("yourapplicationname.app/Contents/Resources/tiles.bmp");
also make sure to add the bitmaps as an absolute path and you should probably copy the bitmaps into the project folder.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #5
Can you please not put the word newb in your thread title, thank you.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  game newb drunknbass 11 4,007 Aug 16, 2008 01:26 PM
Last Post: aardvarc