--- a/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m Tue Feb 16 11:31:55 2016 -0500
+++ b/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m Wed Feb 17 23:27:13 2016 +0100
@@ -251,9 +251,7 @@
+(void) startSimpleGame {
// generate a seed
- CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault);
- NSString *seed = (NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuid);
- CFRelease(uuid);
+ NSString *seed = [HWUtils seed];
NSString *seedCmd = [[NSString alloc] initWithFormat:@"eseed {%@}", seed];
[seed release];
--- a/project_files/HedgewarsMobile/Classes/HWUtils.h Tue Feb 16 11:31:55 2016 -0500
+++ b/project_files/HedgewarsMobile/Classes/HWUtils.h Wed Feb 17 23:27:13 2016 +0100
@@ -43,6 +43,7 @@
+(BOOL) isNetworkReachable;
+(NSString *) languageID;
//+(UIView *)mainSDLViewInstance;
++(NSString *) seed;
@end
--- a/project_files/HedgewarsMobile/Classes/HWUtils.m Tue Feb 16 11:31:55 2016 -0500
+++ b/project_files/HedgewarsMobile/Classes/HWUtils.m Wed Feb 17 23:27:13 2016 +0100
@@ -174,4 +174,12 @@
}
*/
++ (NSString *)seed
+{
+ CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault);
+ NSString *seed = (NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuid);
+ CFRelease(uuid);
+ return seed;
+}
+
@end
--- a/project_files/HedgewarsMobile/Classes/MapConfigViewController.m Tue Feb 16 11:31:55 2016 -0500
+++ b/project_files/HedgewarsMobile/Classes/MapConfigViewController.m Wed Feb 17 23:27:13 2016 +0100
@@ -45,9 +45,7 @@
return;
// generate a seed
- CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault);
- NSString *seed = (NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuid);
- CFRelease(uuid);
+ NSString *seed = [HWUtils seed];
NSString *seedCmd = [[NSString alloc] initWithFormat:@"eseed {%@}", seed];
self.seedCommand = seedCmd;
[seedCmd release];