sirdude
February 2nd, 2008, 08:04 PM
Hi Troy,
I had a couple of programming questions and I figured I'd try and ask them on the website instead of sending you a private email like I have in the past. Other people may be looking for the same info so I thought it might be better this way. Then again this stuff may be too techy for people on these boards, if so I apologize in advance... and feel free to delete this post ;)
Anyway here is the basic thing. I've done quite a bit with SDL, most of the time I do development on a Linux machine. I've recently bought a mac, and I have a couple of newbie questions. First off how do you manage the resource files in code when your building an application for multiple platforms. I created a simple test file to explain what I mean.
http://www.cs.umn.edu/~mein/game/draw_title.c All it does is take a png and display it. But do you have different paths for the different platforms, in the code, or how do you deal with it?
I looked at DirkDashing and know how your dirs are setup on both platforms, I'm just wondering if you need to do something tricky in the code, or does OSX just automatically look in Contents/Resources by default like it was the current directory?
My second question will explain some of my confusion. If you could answer my questions and or point me to some documentation you think I should read that would be great.
I'm able to build a SDL project on OSX but I'm still using Makefiles and not sure how to turn things into an "app" I started playing with Xcode but I'm having a couple of issues, mostly to do with how do you take an existing c SDL project and configure Xcode to work with it.
Lets say I had the example file above and the image file it references data/images/title.png
How would you go about turning it into an Xcode project?
Would you start with an empty Project, or an Application->Carbon Application, or something else?
Then how do you add a target for your existing c file.
What do you need to do to create the app and tie in the png file?
Thanks,
Kent Mein
I had a couple of programming questions and I figured I'd try and ask them on the website instead of sending you a private email like I have in the past. Other people may be looking for the same info so I thought it might be better this way. Then again this stuff may be too techy for people on these boards, if so I apologize in advance... and feel free to delete this post ;)
Anyway here is the basic thing. I've done quite a bit with SDL, most of the time I do development on a Linux machine. I've recently bought a mac, and I have a couple of newbie questions. First off how do you manage the resource files in code when your building an application for multiple platforms. I created a simple test file to explain what I mean.
http://www.cs.umn.edu/~mein/game/draw_title.c All it does is take a png and display it. But do you have different paths for the different platforms, in the code, or how do you deal with it?
I looked at DirkDashing and know how your dirs are setup on both platforms, I'm just wondering if you need to do something tricky in the code, or does OSX just automatically look in Contents/Resources by default like it was the current directory?
My second question will explain some of my confusion. If you could answer my questions and or point me to some documentation you think I should read that would be great.
I'm able to build a SDL project on OSX but I'm still using Makefiles and not sure how to turn things into an "app" I started playing with Xcode but I'm having a couple of issues, mostly to do with how do you take an existing c SDL project and configure Xcode to work with it.
Lets say I had the example file above and the image file it references data/images/title.png
How would you go about turning it into an Xcode project?
Would you start with an empty Project, or an Application->Carbon Application, or something else?
Then how do you add a target for your existing c file.
What do you need to do to create the app and tie in the png file?
Thanks,
Kent Mein