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
| import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
import javax.microedition.midlet.*;
public class Application extends MIDlet {
public void startApp() {
Display.getDisplay(this).setCurrent(new SplashScreen());
try {
Thread.sleep(0x1388L);
} catch (InterruptedException exc) {
}
destroyApp(true);
}
public void pauseApp() {}
public void destroyApp(boolean unconditional) {
notifyDestroyed();
}
}
final class SplashScreen extends Canvas {
public static final int c = 0xb1000d;
public static final int[] rgb_data = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
/* ... очень много строк кода ... */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
};
public static final int image_w = 70;
public static final int image_h = 100;
public SplashScreen() {
setFullScreenMode(true);
}
public static Image getImageData() {
return Image.createRGBImage(rgb_data, image_w, image_h, false);
}
public void paint(Graphics g) {
final int cw = g.getClipWidth();
final int ch = g.getClipHeight();
g.setColor(0);
g.fillRect(0, 0, cw, ch);
g.drawImage(getImageData(), cw >> 1, ch >> 1, 0x1 | 0x2);
}
}
|