2005-05-20 12:29:03 +00:00
|
|
|
#import <Foundation/NSAutoreleasePool.h>
|
|
|
|
#import <AppKit/NSApplication.h>
|
2005-04-19 19:53:18 +00:00
|
|
|
|
|
|
|
#ifdef GNUSTEP
|
|
|
|
#import "GameController.h"
|
|
|
|
|
|
|
|
GameController* controller;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
int debug = NO;
|
|
|
|
|
|
|
|
int main(int argc, const char *argv[])
|
|
|
|
{
|
|
|
|
#ifdef GNUSTEP
|
2005-05-20 12:29:03 +00:00
|
|
|
// This is still necessary for NSFont calls
|
2005-04-19 19:53:18 +00:00
|
|
|
[NSApplication sharedApplication];
|
|
|
|
|
2005-05-20 12:29:03 +00:00
|
|
|
// Need this because we're not using the default run loop's autorelease pool
|
|
|
|
[[NSAutoreleasePool alloc] init];
|
|
|
|
|
2005-04-19 19:53:18 +00:00
|
|
|
// dajt: allocate and set the NSApplication delegate manually because not using NIB to do this
|
|
|
|
controller = [[GameController alloc] init];
|
|
|
|
|
2005-05-20 12:29:03 +00:00
|
|
|
// Call applicationDidFinishLaunching because NSApp is not running in GNUstep port
|
|
|
|
[controller applicationDidFinishLaunching: nil];
|
|
|
|
#else
|
2005-04-19 19:53:18 +00:00
|
|
|
return NSApplicationMain(argc, argv);
|
2005-05-20 12:29:03 +00:00
|
|
|
#endif
|
2005-04-19 19:53:18 +00:00
|
|
|
|
2005-05-20 12:29:03 +00:00
|
|
|
// never reached
|
|
|
|
return 0;
|
|
|
|
}
|
2005-04-19 19:53:18 +00:00
|
|
|
|
2005-05-20 12:29:03 +00:00
|
|
|
/*
|
|
|
|
* This is called from a couple of places, and having it here saves one more AppKit dependency.
|
|
|
|
*/
|
|
|
|
void NSBeep()
|
|
|
|
{
|
|
|
|
}
|