project_files/HedgewarsMobile/Classes/GameInterfaceBridge.h
author koda
Sun, 17 Apr 2011 20:52:56 +0200
changeset 5154 851f36579ed4
child 5155 f2165724605c
permissions -rw-r--r--
initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5154
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
     1
/*
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
     2
 * Hedgewars-iOS, a Hedgewars port for iOS devices
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
     3
 * Copyright (c) 2009-2011 Vittorio Giovara <vittorio.giovara@gmail.com>
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
     4
 *
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
     8
 *
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    12
 * GNU General Public License for more details.
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    13
 *
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    17
 *
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    18
 * File created on 18/04/2011.
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    19
 */
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    20
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    21
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    22
#import <Foundation/Foundation.h>
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    23
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    24
typedef enum {gtNone, gtLocal, gtSave, gtNet} TGameType;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    25
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    26
@class OverlayViewController;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    27
@class EngineProtocolNetwork;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    28
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    29
@interface GameInterfaceBridge : NSObject {
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    30
    UIViewController *parentController;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    31
    OverlayViewController *overlayController;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    32
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    33
    NSDictionary *systemSettings;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    34
    NSString *savePath;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    35
    EngineProtocolNetwork *engineProtocol;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    36
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    37
    NSInteger ipcPort;  // Port on which engine will listen
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    38
    TGameType gameType;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    39
}
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    40
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    41
@property (nonatomic,retain) UIViewController *parentController;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    42
@property (nonatomic,retain) NSDictionary *systemSettings;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    43
@property (nonatomic,retain) NSString *savePath;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    44
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    45
@property (nonatomic,retain) OverlayViewController *overlayController;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    46
@property (nonatomic,retain) EngineProtocolNetwork *engineProtocol;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    47
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    48
@property (assign) NSInteger ipcPort;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    49
@property (assign) TGameType gameType;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    50
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    51
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    52
-(id) initWithController:(id) viewController;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    53
-(void) startLocalGame:(NSDictionary *)withDictionary;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    54
-(void) startSaveGame:(NSString *)atPath;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    55
-(const char **)gatherGameSettings;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    56
-(void) startGameEngine;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    57
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    58
/*
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    59
@property (nonatomic, retain) NSDictionary *systemSettings;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    60
@property (nonatomic, retain) NSMutableArray *statsArray;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    61
@property (assign) BOOL menuStyle;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    62
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    63
-(id) initWithDictionary:(NSDictionary *)gameDictionary;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    64
-(void) engineProtocol;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    65
-(int) sendToEngine:(NSString *)string;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    66
-(int) sendToEngineNoSave:(NSString *)string;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    67
-(void) provideTeamData:(NSString *)teamName forHogs:(NSInteger) numberOfPlayingHogs withHealth:(NSInteger) initialHealth ofColor:(NSNumber *)teamColor;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    68
-(void) provideAmmoData:(NSString *)ammostoreName forPlayingTeams:(NSInteger) numberOfTeams;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    69
-(NSInteger) provideScheme:(NSString *)schemeName;
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    70
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    71
-(const char **)getGameSettings:(NSString *)recordFile;*/
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    72
851f36579ed4 initial refactoring for interfacing the game engine from the ios frontend (game doesn't run yet)
koda
parents:
diff changeset
    73
@end