project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m
changeset 11577 28afdaa159cb
parent 11576 b709768e720c
child 12877 00215a7ec5f5
--- a/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m	Wed Feb 24 00:10:12 2016 +0100
+++ b/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m	Wed Feb 24 00:33:10 2016 +0100
@@ -259,6 +259,17 @@
     return seedCmd;
 }
 
++(void) startCampaignMissionGameWithScript:(NSString *)missionScriptName forCampaign:(NSString *)campaignName {
+    NSString *seedCmd = [self seedCommand];
+    NSString *campaignMissionPath = [[NSString alloc] initWithFormat:@"escript Missions/Campaign/%@/%@", campaignName, missionScriptName];
+    NSDictionary *campaignMissionDict = [[NSDictionary alloc] initWithObjectsAndKeys:campaignMissionPath, @"mission_command", seedCmd, @"seed_command", nil];
+    [campaignMissionPath release];
+    [seedCmd release];
+    
+    [self startGame:gtCampaign atPath:nil withOptions:campaignMissionDict];
+    [campaignMissionDict release];
+}
+
 +(void) startSimpleGame {
     NSString *seedCmd = [self seedCommand];