cocoaTouch/MapConfigViewController.h
author nemo
Mon, 10 May 2010 00:56:16 +0000
changeset 3453 d65657c94bb9
parent 3373 c1ff724a5c34
child 3490 016b3172b645
permissions -rw-r--r--
tweak
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3365
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
     1
//
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
     2
//  MapConfigViewController.h
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
     3
//  HedgewarsMobile
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
     4
//
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
     5
//  Created by Vittorio on 22/04/10.
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
     6
//  Copyright 2010 __MyCompanyName__. All rights reserved.
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
     7
//
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
     8
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
     9
#import <UIKit/UIKit.h>
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
    10
#import "SDL_net.h"
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
    11
3369
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    12
@interface MapConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
3365
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
    13
    TCPsocket sd, csd;
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
    14
    unsigned char map[128*32];
3373
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    15
    NSInteger oldValue;  //slider
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    16
    NSInteger oldPage;   //segmented control
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    17
    BOOL busy;
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    18
    
3369
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    19
    // objects read (mostly) by parent view
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    20
    NSInteger maxHogs;
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    21
    NSString *seedCommand;
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    22
    NSString *templateFilterCommand;
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    23
    NSString *mapGenCommand;
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    24
    NSString *mazeSizeCommand;
3373
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    25
    NSString *themeCommand;
3369
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    26
   
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    27
    // various widgets in the view
3365
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
    28
    UIButton *previewButton;
3369
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    29
    UITableView *tableView;
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    30
    UILabel *maxLabel;
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    31
    UILabel *sizeLabel;
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    32
    UISegmentedControl *segmentedControl;
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    33
    UISlider *slider;
3373
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    34
    
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    35
    // internal objects
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    36
    NSIndexPath *lastIndexPath;
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    37
    NSArray *themeArray;
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    38
    NSArray *mapArray;
3365
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
    39
}
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
    40
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
    41
@property (nonatomic) NSInteger maxHogs;
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
    42
@property (nonatomic,retain) NSString *seedCommand;
3369
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    43
@property (nonatomic,retain) NSString *templateFilterCommand;
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    44
@property (nonatomic,retain) NSString *mapGenCommand;
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    45
@property (nonatomic,retain) NSString *mazeSizeCommand;
3373
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    46
@property (nonatomic,retain) NSString *themeCommand;
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    47
3369
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    48
@property (nonatomic,retain) IBOutlet UIButton *previewButton;
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    49
@property (nonatomic,retain) IBOutlet UITableView *tableView;
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    50
@property (nonatomic,retain) IBOutlet UILabel *maxLabel;
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    51
@property (nonatomic,retain) IBOutlet UILabel *sizeLabel;
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    52
@property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl;
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    53
@property (nonatomic,retain) IBOutlet UISlider *slider;
3365
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
    54
3373
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    55
@property (nonatomic,retain) NSIndexPath *lastIndexPath;
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    56
@property (nonatomic,retain) NSArray *themeArray;
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    57
@property (nonatomic,retain) NSArray *mapArray;
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    58
3365
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
    59
-(IBAction) updatePreview;
3369
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    60
-(IBAction) sliderChanged:(id) sender;
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    61
-(IBAction) sliderEndedChanging:(id) sender;
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    62
-(IBAction) segmentedControlChanged:(id) sender;
3373
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    63
-(void) turnOnWidgets;
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    64
-(void) turnOffWidgets;
3369
c7289e42f0ee add other controls for map preview, also fix a bug in digest
koda
parents: 3365
diff changeset
    65
3365
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
    66
-(void) engineProtocol:(NSInteger) port;
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
    67
37ac593e9027 wow all these files only for land preview and seed generation
koda
parents:
diff changeset
    68
@end