project_files/HedgewarsMobile/Classes/GameSetup.m
changeset 3935 5ca27a0e9a63
parent 3930 8b00b4f93242
child 3941 017b2b31e1c6
equal deleted inserted replaced
3933:1a873262f5dd 3935:5ca27a0e9a63
    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"];