project_files/HedgewarsMobile/Classes/HWUtils.h
author koda
Mon, 26 Mar 2012 03:24:50 +0200
changeset 6822 206db098f8c5
parent 6700 e04da46ee43c
child 6832 fae8fd118da9
permissions -rw-r--r--
ios headers cleanup, with tweaks to +randomPort and grenade timer handling in overlay
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6078
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
     1
/*
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
     2
 * Hedgewars-iOS, a Hedgewars port for iOS devices
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
     3
 * Copyright (c) 2009-2010 Vittorio Giovara <vittorio.giovara@gmail.com>
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
     4
 *
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
     8
 *
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
    12
 * GNU General Public License for more details.
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
    13
 *
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
    17
 *
6700
e04da46ee43c the most important commit of the year
koda
parents: 6409
diff changeset
    18
 * File created on 01/10/2012.
6078
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
    19
 */
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
    20
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
    21
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
    22
#import <Foundation/Foundation.h>
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
    23
6247
6dfad55fd71c unified the objc game state in a single place, which allowed some optimization to ObjcExport class (and more)
koda
parents: 6246
diff changeset
    24
typedef enum {gtNone, gtLocal, gtSave, gtMission, gtNet} TGameType;
6353
d8f62c805619 restore displaying statistics at the end of a game and restore warning lower views that they are going to appear
koda
parents: 6247
diff changeset
    25
typedef enum {gsNone, gsLoading, gsInGame, gsInterrupted, gsEnded} TGameStatus;
6247
6dfad55fd71c unified the objc game state in a single place, which allowed some optimization to ObjcExport class (and more)
koda
parents: 6246
diff changeset
    26
6078
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
    27
@interface HWUtils : NSObject {
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
    28
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
    29
}
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
    30
6247
6dfad55fd71c unified the objc game state in a single place, which allowed some optimization to ObjcExport class (and more)
koda
parents: 6246
diff changeset
    31
+(TGameType) gameType;
6dfad55fd71c unified the objc game state in a single place, which allowed some optimization to ObjcExport class (and more)
koda
parents: 6246
diff changeset
    32
+(void) setGameType:(TGameType) type;
6dfad55fd71c unified the objc game state in a single place, which allowed some optimization to ObjcExport class (and more)
koda
parents: 6246
diff changeset
    33
+(TGameStatus) gameStatus;
6dfad55fd71c unified the objc game state in a single place, which allowed some optimization to ObjcExport class (and more)
koda
parents: 6246
diff changeset
    34
+(void) setGameStatus:(TGameStatus) status;
6dfad55fd71c unified the objc game state in a single place, which allowed some optimization to ObjcExport class (and more)
koda
parents: 6246
diff changeset
    35
+(BOOL) isGameLaunched;
6dfad55fd71c unified the objc game state in a single place, which allowed some optimization to ObjcExport class (and more)
koda
parents: 6246
diff changeset
    36
+(BOOL) isGameRunning;
6dfad55fd71c unified the objc game state in a single place, which allowed some optimization to ObjcExport class (and more)
koda
parents: 6246
diff changeset
    37
6078
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
    38
+(NSString *)modelType;
8c0cc07731e5 headers cleanup, converted some function-only sources into proper class method files, more use of OOP power, removed some 'respondsToSelector' calls, moved defines into their own header, more use of objc categories
koda
parents:
diff changeset
    39
+(NSArray *)teamColors;
6409
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6353
diff changeset
    40
+(void) releaseCache;
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6353
diff changeset
    41
6246
6b2d19ed521a just moving ios server stuff around
koda
parents: 6208
diff changeset
    42
+(NSInteger) randomPort;
6822
206db098f8c5 ios headers cleanup, with tweaks to +randomPort and grenade timer handling in overlay
koda
parents: 6700
diff changeset
    43
+(void) freePort:(NSInteger) port;
6246
6b2d19ed521a just moving ios server stuff around
koda
parents: 6208
diff changeset
    44
+(BOOL) isNetworkReachable;
6409
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6353
diff changeset
    45
+(UIView *)mainSDLViewInstance;
6108
7a8da11a6144 refreshed the ipad interface with some white
koda
parents: 6078
diff changeset
    46
7a8da11a6144 refreshed the ipad interface with some white
koda
parents: 6078
diff changeset
    47
@end
7a8da11a6144 refreshed the ipad interface with some white
koda
parents: 6078
diff changeset
    48