208 NSString *script = self.mapConfigViewController.missionCommand; |
208 NSString *script = self.mapConfigViewController.missionCommand; |
209 if ([script isEqualToString:@""]) |
209 if ([script isEqualToString:@""]) |
210 script = self.schemeWeaponConfigViewController.scriptCommand; |
210 script = self.schemeWeaponConfigViewController.scriptCommand; |
211 |
211 |
212 // create the configuration file that is going to be sent to engine |
212 // create the configuration file that is going to be sent to engine |
213 NSDictionary *gameDictionary = [NSDictionary dictionaryWithObjectsAndKeys: |
213 NSDictionary *gameDictionary = [[NSDictionary alloc] initWithObjectsAndKeys: |
214 self.mapConfigViewController.seedCommand,@"seed_command", |
214 self.mapConfigViewController.seedCommand,@"seed_command", |
215 self.mapConfigViewController.templateFilterCommand,@"templatefilter_command", |
215 self.mapConfigViewController.templateFilterCommand,@"templatefilter_command", |
216 self.mapConfigViewController.mapGenCommand,@"mapgen_command", |
216 self.mapConfigViewController.mapGenCommand,@"mapgen_command", |
217 self.mapConfigViewController.mazeSizeCommand,@"mazesize_command", |
217 self.mapConfigViewController.mazeSizeCommand,@"mazesize_command", |
218 self.mapConfigViewController.themeCommand,@"theme_command", |
218 self.mapConfigViewController.themeCommand,@"theme_command", |
221 self.schemeWeaponConfigViewController.selectedScheme,@"scheme", |
221 self.schemeWeaponConfigViewController.selectedScheme,@"scheme", |
222 self.schemeWeaponConfigViewController.selectedWeapon,@"weapon", |
222 self.schemeWeaponConfigViewController.selectedWeapon,@"weapon", |
223 script,@"mission_command", |
223 script,@"mission_command", |
224 nil]; |
224 nil]; |
225 |
225 |
226 GameInterfaceBridge *bridge = [[GameInterfaceBridge alloc] initWithController:self]; |
226 [GameInterfaceBridge startLocalGame:gameDictionary]; |
227 [bridge startLocalGame:gameDictionary]; |
227 [gameDictionary release]; |
228 [bridge release]; |
|
229 } |
228 } |
230 |
229 |
231 -(void) loadNiceHogs { |
230 -(void) loadNiceHogs { |
232 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; |
231 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; |
233 srand(time(NULL)); |
232 srand(time(NULL)); |