equal
deleted
inserted
replaced
40 if (self.interfaceBridge == nil) { |
40 if (self.interfaceBridge == nil) { |
41 GameInterfaceBridge *bridge = [[GameInterfaceBridge alloc] initWithController:self.parentViewController]; |
41 GameInterfaceBridge *bridge = [[GameInterfaceBridge alloc] initWithController:self.parentViewController]; |
42 self.interfaceBridge = bridge; |
42 self.interfaceBridge = bridge; |
43 [bridge release]; |
43 [bridge release]; |
44 } |
44 } |
|
45 // TODO: it is useless to keep the modalcontroller around when calling interfacebridge |
|
46 // but as long as it is an instance we mustn't release it beforehand |
|
47 // moreover in this way the stats don't show up :/ |
|
48 [self.interfaceBridge startSaveGame:[defaults objectForKey:@"savedGamePath"]]; |
45 [self.parentViewController dismissModalViewControllerAnimated:NO]; |
49 [self.parentViewController dismissModalViewControllerAnimated:NO]; |
46 [self.interfaceBridge startSaveGame:[defaults objectForKey:@"savedGamePath"]]; |
|
47 } else { |
50 } else { |
48 [AudioManagerController playBackSound]; |
51 [AudioManagerController playBackSound]; |
49 [defaults setObject:@"" forKey:@"savedGamePath"]; |
52 [defaults setObject:@"" forKey:@"savedGamePath"]; |
50 [defaults synchronize]; |
53 [defaults synchronize]; |
51 [self.parentViewController dismissModalViewControllerAnimated:YES]; |
54 [self.parentViewController dismissModalViewControllerAnimated:YES]; |