PDA

View Full Version : Help porting Puyo Puyo from Code warrior 8 to xcode


unknown
2005.11.11, 03:02 PM
I dont have code warrior 8, but I want to compile Candy Crisis for X, so I started making an xcode project and I got some of the require'd libs like mikmod and stuff changed a couple of includes and it compiles,

But I get a black screen and then it crashes because it can do the Quickdraw GetPicture function, possibly because I havent included the rsrc file right maybe? The thing is I dont really know the Carbon API at all and have done almost no programming with Quickdraw so I really dont know.

The main thing I notice is that the carbon app xcode makes is a bundle and the carbon app you can download (which will be a code warrior compile) isnt, its just an app that you cant view package contents.

so basically im stuck here..
I can email someone the project so far if they think they could get any little bit farther, like getting the title screen to load or somthing :)

thanks..

Taxxodium
2005.11.11, 05:42 PM
If I recall correctly you need to do the following:

LoadResource(theResource);
picHandle = GetPicture(pictResourceID);
DrawPicture(picHandle, &rect);

So yes, you need to include the resource file to the project. Maybe we can turn this thing into using SDL/OpenGL, since Quickdraw is deprecated in Tiger.

szymczyk
2005.11.13, 03:21 PM
It takes some work to get resource files to work with Xcode. Go to the following site to learn what you must do to use resource files with Xcode:

http://www.meandmark.com/xcodetips.html

unknown
2005.11.13, 06:29 PM
YESSS!!! :wow:
It was crashing before the title screen, now its crashing after the title screen!

thanks a lot, now ive got to sort out the music stuff.

unknown
2005.11.13, 06:56 PM
Update:
Game now playable, except for the music, If I comment out one functions content for loading the music it all works fine. I think probably the mikmod that it uses is different from the mikmod framework (probably a newer version), so hopefully Ill have that working soon.

Volte
2005.11.14, 12:24 AM
got a build for us to try? never played it before but it sounds shinny.

unknown
2005.11.14, 04:17 AM
This is the sourceforge release page, they have a working build and also the codewarrior 8 project.
http://sourceforge.net/project/showfiles.php?group_id=151913&package_id=168495

The build ive got is the same as that except without music, so Illl get that done then email the creator about releasing an xcode project with the code as well.

unknown
2005.11.14, 07:04 AM
I got music to work!
The problem is when you double click the application the executable path is the path of the bundle, and it saves temporary music files for the player to load, its loading them from the actual executable path. So it works when you run it from the terminal except not from the finder.
Im working on a fix.