project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m
changeset 6869 a187c280dd3d
parent 6866 efdd2e4fc45c
child 6870 f72cac290325
equal deleted inserted replaced
6868:f31b5213b163 6869:a187c280dd3d
    30 #pragma mark -
    30 #pragma mark -
    31 #pragma mark Instance methods for engine interaction
    31 #pragma mark Instance methods for engine interaction
    32 // prepares the controllers for hosting a game
    32 // prepares the controllers for hosting a game
    33 -(void) earlyEngineLaunch:(NSDictionary *)optionsOrNil {
    33 -(void) earlyEngineLaunch:(NSDictionary *)optionsOrNil {
    34     [self retain];
    34     [self retain];
    35     [AudioManagerController fadeOutBackgroundMusic];
    35     [[AudioManagerController mainManager] fadeOutBackgroundMusic];
    36 
    36 
    37     EngineProtocolNetwork *engineProtocol = [[EngineProtocolNetwork alloc] init];
    37     EngineProtocolNetwork *engineProtocol = [[EngineProtocolNetwork alloc] init];
    38     self.proto = engineProtocol;
    38     self.proto = engineProtocol;
    39     [engineProtocol release];
    39     [engineProtocol release];
    40     [self.proto spawnThread:self.savePath withOptions:optionsOrNil];
    40     [self.proto spawnThread:self.savePath withOptions:optionsOrNil];
    99     // can remove the savefile if the replay has ended
    99     // can remove the savefile if the replay has ended
   100     if ([HWUtils gameType] == gtSave)
   100     if ([HWUtils gameType] == gtSave)
   101         [[NSFileManager defaultManager] removeItemAtPath:self.savePath error:nil];
   101         [[NSFileManager defaultManager] removeItemAtPath:self.savePath error:nil];
   102 
   102 
   103     // restart music and we're done
   103     // restart music and we're done
   104     [AudioManagerController fadeInBackgroundMusic];
   104     [[AudioManagerController mainManager] fadeInBackgroundMusic];
   105     [HWUtils setGameStatus:gsNone];
   105     [HWUtils setGameStatus:gsNone];
   106     [HWUtils setGameType:gtNone];
   106     [HWUtils setGameType:gtNone];
   107     [self release];
   107     [self release];
   108 }
   108 }
   109 
   109