-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcd.java
677 lines (645 loc) · 13.7 KB
/
cd.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
public final class cd {
private Image a;
private short[] a;
private short[] b;
private byte[] a;
private byte a;
private byte b;
private byte c;
private static Graphics a;
private byte d;
private byte e = 0;
public cd(String var1, Graphics var2, int var3, int var4, int var5) {
a = var2;
try {
this.a = Image.createImage(var1);
this.a = new short[var4 * var5];
this.b = new short[this.a.length];
this.a = new byte[this.a.length];
this.b = this.a = (byte)(this.a.getHeight() / var4);
this.c = (byte)(this.a.getWidth() / var5);
int[] var7 = new int[this.a.getWidth() * this.a.getHeight()];
this.a.getRGB(var7, 0, this.a.getWidth(), 0, 0, this.a.getWidth(), this.a.getHeight());
for(int var8 = 0; var8 < var5; ++var8) {
for(var3 = 0; var3 < var4; ++var3) {
this.a[var8 + var5 * var3] = (short)(var8 * this.c);
this.b[var8 + var5 * var3] = (short)(var3 * this.a);
this.a[var8 + var5 * var3] = this.a(var8 * this.c, var3 * this.a, var7);
}
}
this.a[a('1')] = this.a[a('0')];
this.d = 1;
this.a[0] = 4;
} catch (Exception var6) {
this.a = null;
}
System.gc();
}
public static void a(Graphics var0) {
a = var0;
}
public final void a(int var1) {
this.d = (byte)var1;
}
private byte a(int var1, int var2, int[] var3) {
byte var4 = (byte)(this.c - 1);
for(byte var5 = 0; var5 < this.c; ++var5) {
for(byte var6 = 0; var6 < this.a; ++var6) {
if (var3[var5 + var1 + (var6 + var2) * this.a.getWidth()] >>> 24 > 0) {
var4 = var5;
break;
}
}
}
return (byte)(var4 + 1);
}
public final int a(String var1) {
int var2 = 0;
boolean var3 = false;
for(int var4 = 0; var4 < var1.length(); ++var4) {
int var6;
if ((var6 = a(var1.charAt(var4))) == -1) {
var6 = a('.');
for(int var5 = 0; var5 < 3; ++var5) {
var2 += this.a[var6] + this.d;
}
} else {
var2 += this.a[var6] + this.d;
}
}
return var2;
}
public final int a(String var1, int var2, int var3) {
int var4 = 0;
boolean var5 = false;
var2 = var2 >= 0 ? var2 : 0;
var3 = var3 <= var1.length() ? var3 : var1.length();
for(var2 = var2; var2 < var3; ++var2) {
int var7;
if ((var7 = a(var1.charAt(var2))) == -1) {
var7 = a('.');
for(int var6 = 0; var6 < 3; ++var6) {
var4 += this.a[var7] + this.d;
}
} else {
var4 += this.a[var7] + this.d;
}
}
return var4;
}
private static int a(char var0) {
switch(var0) {
case ' ':
return 0;
case '!':
return 1;
case '"':
return 2;
case '#':
return 3;
case '$':
return 4;
case '%':
return 5;
case '&':
return 6;
case '\'':
case '`':
case '’':
return 7;
case '(':
return 8;
case ')':
return 9;
case '*':
return 10;
case '+':
return 11;
case ',':
return 12;
case '-':
return 13;
case '.':
return 14;
case '/':
return 15;
case '0':
return 16;
case '1':
return 17;
case '2':
return 18;
case '3':
return 19;
case '4':
return 20;
case '5':
return 21;
case '6':
return 22;
case '7':
return 23;
case '8':
return 24;
case '9':
return 25;
case ':':
return 26;
case ';':
return 27;
case '<':
return 28;
case '=':
return 29;
case '>':
return 30;
case '?':
return 31;
case '@':
return 32;
case 'A':
case 'А':
return 33;
case 'B':
case 'В':
return 34;
case 'C':
case 'С':
return 35;
case 'D':
return 36;
case 'E':
case 'Е':
return 37;
case 'F':
return 38;
case 'G':
return 39;
case 'H':
case 'Н':
return 40;
case 'I':
return 41;
case 'J':
return 42;
case 'K':
case 'К':
return 43;
case 'L':
return 44;
case 'M':
case 'М':
return 45;
case 'N':
return 46;
case 'O':
case 'О':
return 47;
case 'P':
case 'Р':
return 48;
case 'Q':
return 49;
case 'R':
return 50;
case 'S':
return 51;
case 'T':
case 'Т':
return 52;
case 'U':
return 53;
case 'V':
return 54;
case 'W':
return 55;
case 'X':
case 'Х':
return 56;
case 'Y':
return 57;
case 'Z':
return 58;
case '[':
return 59;
case '\\':
return 60;
case ']':
return 61;
case '^':
return 62;
case '_':
return 63;
case 'a':
case 'ª':
case 'а':
return 64;
case 'b':
return 65;
case 'c':
case 'с':
return 66;
case 'd':
return 67;
case 'e':
case 'е':
return 68;
case 'f':
return 69;
case 'g':
return 70;
case 'h':
return 71;
case 'i':
return 72;
case 'j':
return 73;
case 'k':
return 74;
case 'l':
return 75;
case 'm':
return 76;
case 'n':
return 77;
case 'o':
case 'º':
case 'о':
return 78;
case 'p':
case 'р':
return 79;
case 'q':
return 80;
case 'r':
return 81;
case 's':
return 82;
case 't':
return 83;
case 'u':
return 84;
case 'v':
return 85;
case 'w':
return 86;
case 'x':
case 'х':
return 87;
case 'y':
return 88;
case 'z':
return 89;
case '{':
return 90;
case '|':
return 91;
case '}':
return 92;
case '~':
return 93;
case '\u0099':
return 96;
case '¡':
return 97;
case '©':
return 95;
case '«':
return 98;
case '®':
return 94;
case '»':
return 99;
case '¿':
return 100;
case 'À':
return 101;
case 'Á':
return 102;
case 'Â':
return 103;
case 'Ã':
return 104;
case 'Ä':
return 105;
case 'Æ':
return 106;
case 'Ç':
return 107;
case 'È':
return 108;
case 'É':
return 109;
case 'Ê':
return 110;
case 'Ë':
return 111;
case 'Ì':
return 112;
case 'Í':
return 113;
case 'Î':
return 114;
case 'Ï':
return 115;
case 'Ñ':
return 116;
case 'Ò':
return 117;
case 'Ó':
return 118;
case 'Ô':
return 119;
case 'Õ':
return 120;
case 'Ö':
return 121;
case 'Ù':
return 122;
case 'Ú':
return 123;
case 'Û':
return 124;
case 'Ü':
return 125;
case 'Ý':
return 203;
case 'ß':
return 126;
case 'à':
return 128;
case 'á':
return 129;
case 'â':
return 130;
case 'ã':
return 131;
case 'ä':
return 132;
case 'æ':
return 133;
case 'ç':
return 134;
case 'è':
return 135;
case 'é':
return 136;
case 'ê':
return 137;
case 'ë':
return 138;
case 'ì':
return 139;
case 'í':
return 140;
case 'î':
return 141;
case 'ï':
return 142;
case 'ñ':
return 143;
case 'ò':
return 144;
case 'ó':
return 145;
case 'ô':
return 146;
case 'õ':
return 147;
case 'ö':
return 148;
case 'ù':
return 149;
case 'ú':
return 150;
case 'û':
return 151;
case 'ü':
return 152;
case 'ý':
return 213;
case 'ÿ':
return 153;
case 'Ą':
return 223;
case 'ą':
return 231;
case 'Ć':
return 224;
case 'ć':
return 232;
case 'Č':
return 204;
case 'č':
return 214;
case 'Ď':
return 205;
case 'ď':
return 215;
case 'Ę':
return 225;
case 'ę':
return 233;
case 'Ě':
return 206;
case 'ě':
return 216;
case 'Ł':
return 226;
case 'ł':
return 234;
case 'Ń':
return 227;
case 'ń':
return 235;
case 'Ň':
return 207;
case 'ň':
return 217;
case 'Œ':
return 154;
case 'œ':
return 155;
case 'Ř':
return 208;
case 'ř':
return 218;
case 'Ś':
return 228;
case 'ś':
return 236;
case 'Š':
return 209;
case 'š':
return 219;
case 'Ť':
return 210;
case 'ť':
return 220;
case 'Ů':
return 211;
case 'ů':
return 221;
case 'Ÿ':
return 127;
case 'Ź':
return 229;
case 'ź':
return 237;
case 'Ż':
return 230;
case 'ż':
return 238;
case 'Ž':
return 212;
case 'ž':
return 222;
case 'Б':
return 156;
case 'Г':
return 157;
case 'Д':
return 158;
case 'Ж':
return 159;
case 'З':
return 160;
case 'И':
return 161;
case 'Й':
return 162;
case 'Л':
return 163;
case 'П':
return 164;
case 'У':
return 165;
case 'Ф':
return 166;
case 'Ц':
return 167;
case 'Ч':
return 168;
case 'Ш':
return 169;
case 'Щ':
return 170;
case 'Ъ':
return 171;
case 'Ы':
return 172;
case 'Ь':
return 173;
case 'Э':
return 174;
case 'Ю':
return 175;
case 'Я':
return 176;
case 'б':
return 177;
case 'в':
return 178;
case 'г':
return 179;
case 'д':
return 180;
case 'ж':
return 181;
case 'з':
return 182;
case 'и':
return 183;
case 'й':
return 184;
case 'к':
return 185;
case 'л':
return 186;
case 'м':
return 187;
case 'н':
return 188;
case 'п':
return 189;
case 'т':
return 190;
case 'у':
return 191;
case 'ф':
return 192;
case 'ц':
return 193;
case 'ч':
return 194;
case 'ш':
return 195;
case 'щ':
return 196;
case 'ъ':
return 197;
case 'ы':
return 198;
case 'ь':
return 199;
case 'э':
return 200;
case 'ю':
return 201;
case 'я':
return 202;
default:
return 0;
}
}
public final void b(int var1) {
this.e = (byte)var1;
}
public final void a(String var1, int var2, int var3) {
int var4 = 0;
boolean var5 = false;
for(int var6 = 0; var6 < var1.length(); ++var6) {
int var8;
if ((var8 = a(var1.charAt(var6))) == -1) {
var8 = a('.');
for(int var7 = 0; var7 < 3; ++var7) {
a.drawRegion(this.a, this.a[var8], this.b[var8], this.a[var8], this.b, 0, var2 + var4, var3 + this.e, 0);
var4 += this.a[var8] + this.d;
}
} else {
a.drawRegion(this.a, this.a[var8], this.b[var8], this.a[var8], this.b, 0, var2 + var4, var3 + this.e, 0);
var4 += this.a[var8] + this.d;
}
}
}
public final void b(String var1, int var2, int var3) {
int var4 = 0;
boolean var5 = false;
for(int var6 = var1.length() - 1; var6 >= 0; --var6) {
int var8;
if ((var8 = a(var1.charAt(var6))) == -1) {
var8 = a('.');
for(int var7 = 0; var7 < 3; ++var7) {
var4 += this.a[var8];
a.drawRegion(this.a, this.a[var8], this.b[var8], this.a[var8], this.b, 0, var2 - var4, var3 + this.e, 0);
var4 += this.d;
}
} else {
var4 += this.a[var8];
a.drawRegion(this.a, this.a[var8], this.b[var8], this.a[var8], this.b, 0, var2 - var4, var3 + this.e, 0);
var4 += this.d;
}
}
}
public final int a() {
return this.a;
}
public final int b() {
return this.b;
}
public final void c(int var1) {
this.a = (byte)var1;
}
}