@@ -18,35 +18,6 @@ - (void)viewDidLoad {
18
18
[label setFont: [UIFont fontWithName: @" Coda-Regular" size: 20 ]];
19
19
}
20
20
21
- // function $e(a) { //8823, 5510
22
- // for(var b = [], c = ZOOM_LEVEL;c > 0;c--) {
23
- // var d = 0, e = 1 << c - 1;
24
- // (a.x & e) != 0 && d++;
25
- // (a.y & e) != 0 && (d++, d++);
26
- // b.push(d)
27
- // }
28
- // return b.join("")
29
- // }
30
-
31
- // - (NSString *)e:(CLLocationCoordinate2D)a {
32
- //
33
- // NSMutableArray *b = [NSMutableArray array];
34
- //
35
- // for (int c = 16; c > 0; c--) {
36
- //
37
- // int d = 0;
38
- // int e = 1 << c - 1;
39
- // ((int)a.latitude & e) != 0 && d++;
40
- // ((int)a.longitude & e) != 0 && (d++, d++);
41
- //
42
- // [b addObject:@(d)];
43
- //
44
- // }
45
- //
46
- // return [b componentsJoinedByString:@""];
47
- //
48
- // }
49
-
50
21
- (void )viewWillAppear : (BOOL )animated {
51
22
[super viewWillAppear: animated];
52
23
@@ -59,105 +30,6 @@ - (void)viewWillAppear:(BOOL)animated {
59
30
[[SoundManager sharedManager ] playMusic: @" Sound/sfx_throbbing_wheels.aif" looping: YES ];
60
31
61
32
[self performHandshake ];
62
-
63
- // dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC));
64
- // dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
65
- // [self performSegueWithIdentifier:@"LoadingCompletedSegue" sender:self];
66
- // });
67
-
68
- // return;
69
- //
70
- // UIWebView *webView = [[UIWebView alloc] initWithFrame:self.view.bounds];
71
- // [webView setDelegate:self];
72
- // [webView setUserInteractionEnabled:NO];
73
- // [webView setAlpha:0];
74
- // [self.view addSubview:webView];
75
- // NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]];
76
- // [webView loadRequest:request];
77
- //
78
- // CLLocationCoordinate2D neLoc = CLLocationCoordinate2DMake(50.64601929058625, 13.84268054053473);
79
- // CLLocationCoordinate2D swLoc = CLLocationCoordinate2DMake(50.63809963027642, 13.809120741340394);
80
- //
81
- // float x = round(256 * 0.9999 * fabsf(1 / cos(neLoc.latitude * (M_PI / 180)))); //404
82
- //
83
- // CLLocationCoordinate2D Ob = CLLocationCoordinate2DMake(x/2, x/2); // {202, 202}
84
- // float Pb = x / 360; //1.1222222222222222
85
- // float Qb = x / (2 * M_PI); //64.29859700912571
86
- // float R = (float)(1 << (int)(16 - (x / 256 - 1))); //32768
87
- //
88
- // /////////////////////////
89
- //
90
- // // NSLog(@"1: %@", [webView stringByEvaluatingJavaScriptFromString:@"function T(a,b){this.x=a;this.y=b}"]);
91
- // // NSLog(@"1: %@", [webView stringByEvaluatingJavaScriptFromString:@"var d = new T((202+13.84268054053473*1.1222222222222222),0)"]);
92
- // // NSLog(@"1: %@", [webView stringByEvaluatingJavaScriptFromString:@"d"]);
93
- // // NSLog(@"1: %@", [webView stringByEvaluatingJavaScriptFromString:@"d.x"]);
94
- //
95
- // CLLocationCoordinate2D d;
96
- // d.longitude = Ob.longitude + neLoc.longitude * Pb;
97
- // float e = sinf(neLoc.latitude * (M_PI / 180));
98
- // e = MAX(e, -0.9999);
99
- // e = MIN(e, 0.9999);
100
- // d.latitude = Ob.latitude + 0.5 * logf((1 + e) / (1 - e)) * -Qb;
101
- // NSLog(@"d.lat: %f, d.lng: %f", d.latitude, d.longitude); // = { x: 217.57375160467728, y: 135.87756580181085 }
102
- //
103
- // d = CLLocationCoordinate2DMake(d.longitude * R, d.latitude * R);
104
- // NSLog(@"d.lat: %f, d.lng: %f", d.latitude, d.longitude); //= { x: 7128167.06046446, y: 4452537.590702042 }
105
- //
106
- // d = CLLocationCoordinate2DMake(floor(d.longitude / x), floor(d.latitude / x));
107
- // NSLog(@"d.lat: %f, d.lng: %f", d.latitude, d.longitude); //= { x: 17643, y: 11021 }
108
- //
109
- // /////////////////////////
110
- //
111
- // CLLocationCoordinate2D c;
112
- // c.longitude = Ob.longitude + swLoc.longitude * Pb;
113
- // e = sinf(swLoc.latitude * (M_PI / 180));
114
- // e = MAX(e, -0.9999);
115
- // e = MIN(e, 0.9999);
116
- // c.latitude = Ob.latitude + 0.5 * logf((1 + e) / (1 - e)) * -Qb;
117
- // NSLog(@"c.lat: %f, c.lng: %f", c.latitude, c.longitude); //= { x: 217.496902165282, y: 135.89296880003485 }
118
- //
119
- // c = CLLocationCoordinate2DMake(c.longitude * R, c.latitude * R);
120
- // NSLog(@"c.lat: %f, c.lng: %f", c.latitude, c.longitude); //= { x: 7126938.49015196, y: 4452940.801639542 }
121
- //
122
- // c = CLLocationCoordinate2DMake(floor(c.longitude / x), floor(c.latitude / x));
123
- // NSLog(@"c.lat: %f, c.lng: %f", c.latitude, c.longitude); //= { x: 17640, y: 11022 }
124
- //
125
- // /////////////////////////
126
- //
127
- // float i = fabsf(c.longitude - d.longitude);
128
- // float j = fabsf(c.latitude - d.latitude);
129
- //
130
- // NSLog(@"i: %f", i); //3
131
- // NSLog(@"j: %f", j); //1
132
- //
133
- // NSMutableArray *f = [NSMutableArray array];
134
- //
135
- // for (int g = 0; g <= i; g++) {
136
- //
137
- // float k = fabsf(d.longitude - g);
138
- // float l = d.latitude;
139
- // CLLocationCoordinate2D m = CLLocationCoordinate2DMake(k, l);
140
- //
141
- // NSLog(@"m.lat: %f, m.lng: %f", m.latitude, m.longitude); //= { 17643, y: 11021 }
142
- //
143
- // NSString *q = [self e:m];
144
- //
145
- // [f addObject:@{@"bounds": @"bf({Ob,Qb,Pb,R}, m)", @"quadkey": q}];
146
- //
147
- // for(int o = 1; o <= j; o++) {
148
- //
149
- // float g = d.latitude + o;
150
- // CLLocationCoordinate2D h = CLLocationCoordinate2DMake(k, g);
151
- //
152
- // NSString *z = [self e:h];
153
- //
154
- // [f addObject:@{@"bounds": @"bf({Ob,Qb,Pb,R}, h)", @"quadkey": z}];
155
- //
156
- // }
157
- //
158
- // }
159
- //
160
- // NSLog(@"f: %@", f);
161
33
162
34
}
163
35
@@ -180,7 +52,7 @@ - (void)performHandshake {
180
52
// @"nemesisSoftwareVersion": @"2013-03-13T22:49:05Z 40d223faeed9 opt", // 1.21.3
181
53
@" nemesisSoftwareVersion" : @" 2013-04-08T20:23:14Z 10b76085f06d opt" , // 1.23.1
182
54
@" deviceSoftwareVersion" : @" 4.1.1" ,
183
- // @"activationCode": @"B3XDFBAP ",
55
+ // @"activationCode": @"XXXXXXXX ",
184
56
// @"tosAccepted": @"1",
185
57
};
186
58
@@ -244,8 +116,7 @@ - (void)webViewDidFinishLoad:(UIWebView *)webView {
244
116
NSArray *cookies = [sharedHTTPCookieStorage cookiesForURL: handshakeURL];
245
117
for (NSHTTPCookie *cookie in cookies) {
246
118
if ([cookie.name isEqualToString: @" SACSID" ]) {
247
-
248
- // NSLog(@"Got SACSID");
119
+
249
120
// NSLog(@"SACSID: %@", cookie.value);
250
121
[[API sharedInstance ] setSACSID: cookie.value];
251
122
@@ -285,8 +156,8 @@ - (void)tabBarController:(UITabBarController *)theTabBarController didSelectView
285
156
286
157
}
287
158
288
- #pragma mark - Animated Tab Bar
289
-
159
+ // #pragma mark - Animated Tab Bar
160
+ //
290
161
// - (CGFloat)horizontalLocationFor:(NSUInteger)tabIndex {
291
162
// // A single tab item's width is the entire width of the tab bar divided by number of items
292
163
// CGFloat tabItemWidth = _tabBarController.tabBar.frame.size.width / _tabBarController.tabBar.items.count;
0 commit comments