project_files/HedgewarsMobile/Classes/GameInterfaceBridge.h
changeset 5156 641abe679bf0
parent 5155 f2165724605c
child 5157 a5a6ffc56141
equal deleted inserted replaced
5155:f2165724605c 5156:641abe679bf0
    21 
    21 
    22 #import <Foundation/Foundation.h>
    22 #import <Foundation/Foundation.h>
    23 #import "EngineProtocolNetwork.h"
    23 #import "EngineProtocolNetwork.h"
    24 
    24 
    25 typedef enum {gtNone, gtLocal, gtSave, gtNet} TGameType;
    25 typedef enum {gtNone, gtLocal, gtSave, gtNet} TGameType;
       
    26 typedef enum {gsNone, gsInGame, gsEnded, gsInterrupted} TGameStatus;
    26 
    27 
    27 @class OverlayViewController;
    28 @class OverlayViewController;
    28 
    29 
    29 @interface GameInterfaceBridge : NSObject <EngineProtocolDelegate> {
    30 @interface GameInterfaceBridge : NSObject <EngineProtocolDelegate> {
    30     UIViewController *parentController;
    31     UIViewController *parentController;
    34     NSString *savePath;
    35     NSString *savePath;
    35     EngineProtocolNetwork *engineProtocol;
    36     EngineProtocolNetwork *engineProtocol;
    36 
    37 
    37     NSInteger ipcPort;  // Port on which engine will listen
    38     NSInteger ipcPort;  // Port on which engine will listen
    38     TGameType gameType;
    39     TGameType gameType;
       
    40     TGameStatus gameStatus;
    39 }
    41 }
    40 
    42 
    41 @property (nonatomic,retain) UIViewController *parentController;
    43 @property (nonatomic,retain) UIViewController *parentController;
    42 @property (nonatomic,retain) NSDictionary *systemSettings;
    44 @property (nonatomic,retain) NSDictionary *systemSettings;
    43 @property (nonatomic,retain) NSString *savePath;
    45 @property (nonatomic,retain) NSString *savePath;
    45 @property (nonatomic,retain) OverlayViewController *overlayController;
    47 @property (nonatomic,retain) OverlayViewController *overlayController;
    46 @property (nonatomic,retain) EngineProtocolNetwork *engineProtocol;
    48 @property (nonatomic,retain) EngineProtocolNetwork *engineProtocol;
    47 
    49 
    48 @property (assign) NSInteger ipcPort;
    50 @property (assign) NSInteger ipcPort;
    49 @property (assign) TGameType gameType;
    51 @property (assign) TGameType gameType;
       
    52 @property (assign) TGameStatus gameStatus;
    50 
    53 
    51 
    54 
    52 -(id)   initWithController:(id) viewController;
    55 -(id)   initWithController:(id) viewController;
    53 -(void) startLocalGame:(NSDictionary *)withDictionary;
    56 -(void) startLocalGame:(NSDictionary *)withDictionary;
    54 -(void) startSaveGame:(NSString *)atPath;
    57 -(void) startSaveGame:(NSString *)atPath;