cocoaTouch/GameSetup.m
changeset 3221 3e6586c1ab4f
parent 3199 1a9938a27677
child 3312 6d8f1c76756d
equal deleted inserted replaced
3220:109f11de64b6 3221:3e6586c1ab4f
    12 #import "PascalImports.h"
    12 #import "PascalImports.h"
    13 #include <sys/types.h>
    13 #include <sys/types.h>
    14 #include <sys/sysctl.h>
    14 #include <sys/sysctl.h>
    15 
    15 
    16 #define BUFFER_SIZE 256
    16 #define BUFFER_SIZE 256
       
    17 #define debug(format, ...) CFShow([NSString stringWithFormat:format, ## __VA_ARGS__]);
    17 
    18 
    18 @implementation GameSetup
    19 @implementation GameSetup
    19 
    20 
    20 @synthesize systemSettings, teams;
    21 @synthesize systemSettings, teams;
    21 
    22 
    27         NSString *filePath = [[SDLUIKitDelegate sharedAppDelegate] dataFilePath:@"settings.plist"];
    28         NSString *filePath = [[SDLUIKitDelegate sharedAppDelegate] dataFilePath:@"settings.plist"];
    28         systemSettings = [[NSDictionary alloc] initWithContentsOfFile:filePath]; //should check it exists
    29         systemSettings = [[NSDictionary alloc] initWithContentsOfFile:filePath]; //should check it exists
    29         return self;
    30         return self;
    30     } else
    31     } else
    31         return nil;
    32         return nil;
       
    33 }
       
    34 
       
    35 -(NSString *)description {
       
    36     return [NSString stringWithFormat:@"ipcport: %d\nsockets: %d,%d\n teams: %@\n systemSettings: %@",ipcPort,sd,csd,teams,systemSettings];
    32 }
    37 }
    33 
    38 
    34 -(void) dealloc {
    39 -(void) dealloc {
    35     [teams release];
    40     [teams release];
    36     [systemSettings release];
    41     [systemSettings release];