author | koda |
Sun, 25 Apr 2010 02:30:42 +0000 | |
changeset 3365 | 37ac593e9027 |
child 3366 | f0e5ff24fb72 |
permissions | -rw-r--r-- |
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.m |
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 "MapConfigViewController.h" |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
10 |
#import "PascalImports.h" |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
11 |
#import "CommodityFunctions.h" |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
12 |
#import "UIImageExtra.h" |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
13 |
#import "SDL_net.h" |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
14 |
#import <pthread.h> |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
15 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
16 |
@implementation MapConfigViewController |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
17 |
@synthesize previewButton, maxHogs, seedCommand; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
18 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
19 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
20 |
-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
21 |
return rotationManager(interfaceOrientation); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
22 |
} |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
23 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
24 |
#pragma mark - |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
25 |
#pragma mark Preview Handling |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
26 |
-(int) sendToEngine: (NSString *)string { |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
27 |
unsigned char length = [string length]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
28 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
29 |
SDLNet_TCP_Send(csd, &length , 1); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
30 |
return SDLNet_TCP_Send(csd, [string UTF8String], length); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
31 |
} |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
32 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
33 |
-(void) engineProtocol:(NSInteger) port { |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
34 |
IPaddress ip; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
35 |
BOOL clientQuit, serverQuit; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
36 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
37 |
serverQuit = NO; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
38 |
clientQuit =NO; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
39 |
if (SDLNet_Init() < 0) { |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
40 |
NSLog(@"SDLNet_Init: %s", SDLNet_GetError()); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
41 |
serverQuit = YES; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
42 |
} |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
43 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
44 |
/* Resolving the host using NULL make network interface to listen */ |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
45 |
if (SDLNet_ResolveHost(&ip, NULL, port) < 0) { |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
46 |
NSLog(@"SDLNet_ResolveHost: %s\n", SDLNet_GetError()); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
47 |
serverQuit = YES; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
48 |
} |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
49 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
50 |
/* Open a connection with the IP provided (listen on the host's port) */ |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
51 |
if (!(sd = SDLNet_TCP_Open(&ip))) { |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
52 |
NSLog(@"SDLNet_TCP_Open: %s %\n", SDLNet_GetError(), port); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
53 |
serverQuit = YES; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
54 |
} |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
55 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
56 |
NSLog(@"engineProtocol - Waiting for a client on port %d", port); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
57 |
while (!serverQuit) { |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
58 |
/* This check the sd if there is a pending connection. |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
59 |
* If there is one, accept that, and open a new socket for communicating */ |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
60 |
csd = SDLNet_TCP_Accept(sd); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
61 |
if (NULL != csd) { |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
62 |
NSLog(@"engineProtocol - Client found"); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
63 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
64 |
[self sendToEngine:self.seedCommand]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
65 |
[self sendToEngine:@"e$template_filter 1"]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
66 |
[self sendToEngine:@"e$mapgen 0"]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
67 |
[self sendToEngine:@"e$maze_size 1"]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
68 |
[self sendToEngine:@"!"]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
69 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
70 |
memset(map, 0, 128*32); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
71 |
SDLNet_TCP_Recv(csd, map, 128*32); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
72 |
SDLNet_TCP_Recv(csd, &maxHogs, sizeof(Uint8)); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
73 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
74 |
SDLNet_TCP_Close(csd); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
75 |
serverQuit = YES; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
76 |
} |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
77 |
} |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
78 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
79 |
SDLNet_TCP_Close(sd); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
80 |
SDLNet_Quit(); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
81 |
} |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
82 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
83 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
84 |
-(void) updatePreview { |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
85 |
pthread_t thread_id; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
86 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
87 |
// generate a seed |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
88 |
char randomStr[36]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
89 |
for (int i = 0; i<36; i++) { |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
90 |
randomStr[i] = random()%255; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
91 |
} |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
92 |
NSString *seedCmd = [[NSString alloc] initWithFormat:@"eseed {%s}", randomStr]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
93 |
self.seedCommand = seedCmd; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
94 |
[seedCmd release]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
95 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
96 |
// select the port for IPC |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
97 |
int port = randomPort(); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
98 |
pthread_create(&thread_id, NULL, (void *)GenLandPreview, (void *)port); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
99 |
[self engineProtocol:port]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
100 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
101 |
// draw the buffer (1 pixel per component, 0= transparent 1= color) |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
102 |
int xc = 0; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
103 |
int yc = 0; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
104 |
UIGraphicsBeginImageContext(CGSizeMake(256,128)); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
105 |
CGContextRef context = UIGraphicsGetCurrentContext(); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
106 |
UIGraphicsPushContext(context); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
107 |
for (int x = 0; x < 32*128; x++) { |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
108 |
unsigned char byte = map[x]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
109 |
for (int z = 0; z < 8; z++) { |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
110 |
// select the color |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
111 |
if ((byte & 0x00000001) != 0) |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
112 |
CGContextSetRGBFillColor(context, 0.5, 0.5, 0.7, 1.0); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
113 |
else |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
114 |
CGContextSetRGBFillColor(context, 0.0, 0.0, 0.0, 0.0); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
115 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
116 |
// draw pixel |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
117 |
CGContextFillRect(context,CGRectMake(xc,yc,1,1)); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
118 |
// move coordinates |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
119 |
xc = (xc+1)%256; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
120 |
if (xc == 0) yc++; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
121 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
122 |
// shift to next bit |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
123 |
byte = byte >> 1; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
124 |
} |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
125 |
} |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
126 |
UIGraphicsPopContext(); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
127 |
UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
128 |
UIGraphicsEndImageContext(); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
129 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
130 |
/* |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
131 |
CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceGray(); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
132 |
CGContextRef bitmapImage = CGBitmapContextCreate(mapExp, 128, 32, 8, 128, colorspace, kCGImageAlphaNone); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
133 |
CGColorSpaceRelease(colorspace); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
134 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
135 |
CGImageRef previewCGImage = CGBitmapContextCreateImage(bitmapImage); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
136 |
UIImage *previewImage = [[UIImage alloc] initWithCGImage:previewCGImage]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
137 |
CGImageRelease(previewCGImage); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
138 |
*/ |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
139 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
140 |
// set the image in the button |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
141 |
[self.previewButton setImage:image forState:UIControlStateNormal]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
142 |
} |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
143 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
144 |
#pragma mark - |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
145 |
#pragma mark view management |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
146 |
-(void) viewDidLoad { |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
147 |
srandom(time(NULL)); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
148 |
[super viewDidLoad]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
149 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
150 |
CGSize screenSize = [[UIScreen mainScreen] bounds].size; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
151 |
self.view.frame = CGRectMake(0, 0, screenSize.height, screenSize.width - 44); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
152 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
153 |
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
154 |
button.frame = CGRectMake(32, 32, 256, 128); |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
155 |
[button addTarget:self action:@selector(updatePreview) forControlEvents:UIControlEventTouchUpInside]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
156 |
self.previewButton = button; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
157 |
[button release]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
158 |
[self.view addSubview:self.previewButton]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
159 |
} |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
160 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
161 |
-(void) viewWillAppear:(BOOL)animated { |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
162 |
[super viewWillAppear:animated]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
163 |
[self updatePreview]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
164 |
} |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
165 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
166 |
-(void) didReceiveMemoryWarning { |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
167 |
// Releases the view if it doesn't have a superview. |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
168 |
[super didReceiveMemoryWarning]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
169 |
// Release any cached data, images, etc that aren't in use. |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
170 |
} |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
171 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
172 |
#pragma mark - |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
173 |
#pragma mark memory |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
174 |
-(void) viewDidUnload { |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
175 |
self.previewButton = nil; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
176 |
self.seedCommand = nil; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
177 |
[super viewDidUnload]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
178 |
// Release any retained subviews of the main view. |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
179 |
// e.g. self.myOutlet = nil; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
180 |
} |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
181 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
182 |
-(void) dealloc { |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
183 |
[previewButton release]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
184 |
[seedCommand release]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
185 |
[super dealloc]; |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
186 |
} |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
187 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
188 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
189 |
@end |