27 #import "OverlayViewController.h" |
27 #import "OverlayViewController.h" |
28 |
28 |
29 #define BUFFER_SIZE 255 // like in original frontend |
29 #define BUFFER_SIZE 255 // like in original frontend |
30 |
30 |
31 @implementation GameSetup |
31 @implementation GameSetup |
32 @synthesize systemSettings, gameConfig, savePath; |
32 @synthesize systemSettings, gameConfig, savePath, menuStyle; |
33 |
33 |
34 -(id) initWithDictionary:(NSDictionary *)gameDictionary { |
34 -(id) initWithDictionary:(NSDictionary *)gameDictionary { |
35 if (self = [super init]) { |
35 if (self = [super init]) { |
36 ipcPort = randomPort(); |
36 ipcPort = randomPort(); |
37 |
37 |
38 // should check they exist and throw and exection if not |
38 // should check they exist and throw and exection if not |
39 NSDictionary *dictSett = [[NSDictionary alloc] initWithContentsOfFile:SETTINGS_FILE()]; |
39 NSDictionary *dictSett = [[NSDictionary alloc] initWithContentsOfFile:SETTINGS_FILE()]; |
40 self.systemSettings = dictSett; |
40 self.systemSettings = dictSett; |
|
41 self.menuStyle = [[dictSett objectForKey:@"menu"] boolValue]; |
41 [dictSett release]; |
42 [dictSett release]; |
42 |
43 |
43 self.gameConfig = [gameDictionary objectForKey:@"game_dictionary"]; |
44 self.gameConfig = [gameDictionary objectForKey:@"game_dictionary"]; |
44 isNetGame = [[gameDictionary objectForKey:@"netgame"] boolValue]; |
45 isNetGame = [[gameDictionary objectForKey:@"netgame"] boolValue]; |
45 NSString *path = [gameDictionary objectForKey:@"savefile"]; |
46 NSString *path = [gameDictionary objectForKey:@"savefile"]; |