cocoaTouch/SDLOverrides/SDL_uikitappdelegate.m
changeset 2772 1965eba10be6
parent 2743 39d097ac2276
child 2803 1f446fc5c8ec
--- a/cocoaTouch/SDLOverrides/SDL_uikitappdelegate.m	Mon Feb 08 18:12:06 2010 +0000
+++ b/cocoaTouch/SDLOverrides/SDL_uikitappdelegate.m	Mon Feb 08 21:49:52 2010 +0000
@@ -28,6 +28,7 @@
 #import "SDL_video.h"
 #import "GameSetup.h"
 #import "PascalImports.h"
+#import "MainMenuViewController.h"
 
 //#import "SoundEffect.h"	
 //	SoundEffect *erasingSound = [[SoundEffect alloc] initWithContentsOfFile:[mainBundle pathForResource:@"Erase" ofType:@"caf"]];
@@ -85,15 +86,13 @@
 
 	NSLog(@"Game is launching...");
 	const char **gameArgs = [setup getSettings];
+	[setup release];
 	
-	// direct execution or thread? check the one that gives most fps
-	// library or call SDL_main? pascal quits at the end of the main
+	// this is the pascal fuction that starts the game
 	Game(gameArgs);
 	
 	free(gameArgs);
 	NSLog(@"Game is exting...");
-	
-	[setup release];
 
 	[uiwindow addSubview: viewController.view];
 	[uiwindow makeKeyAndVisible];
@@ -107,6 +106,7 @@
 }
 
 -(BOOL) checkFirstRun {
+	//move all this inside the MainMenuViewController
 	BOOL isFirstRun = NO;
 	
 	//use a nssthread a ask the user to wait