annotate window/button.cc @ 16:92765a5661f7

added "new" label on last savegame and corrected StatSaveFile
author thib
date Mon, 11 Aug 2008 16:23:17 +0000
parents b753afeb3f34
children 4d7486cb20a9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
223b71206888 Initial import
thib
parents:
diff changeset
1 /*
223b71206888 Initial import
thib
parents:
diff changeset
2 * Copyright (c) 2004-2006 Kazunori "jagarl" Ueno
223b71206888 Initial import
thib
parents:
diff changeset
3 * All rights reserved.
223b71206888 Initial import
thib
parents:
diff changeset
4 *
223b71206888 Initial import
thib
parents:
diff changeset
5 * Redistribution and use in source and binary forms, with or without
223b71206888 Initial import
thib
parents:
diff changeset
6 * modification, are permitted provided that the following conditions
223b71206888 Initial import
thib
parents:
diff changeset
7 * are met:
223b71206888 Initial import
thib
parents:
diff changeset
8 * 1. Redistributions of source code must retain the above copyright
223b71206888 Initial import
thib
parents:
diff changeset
9 * notice, this list of conditions and the following disclaimer.
223b71206888 Initial import
thib
parents:
diff changeset
10 * 2. Redistributions in binary form must reproduce the above copyright
223b71206888 Initial import
thib
parents:
diff changeset
11 * notice, this list of conditions and the following disclaimer in the
223b71206888 Initial import
thib
parents:
diff changeset
12 * documentation and/or other materials provided with the distribution.
223b71206888 Initial import
thib
parents:
diff changeset
13 * 3. The name of the author may not be used to endorse or promote products
223b71206888 Initial import
thib
parents:
diff changeset
14 * derived from this software without specific prior written permission.
223b71206888 Initial import
thib
parents:
diff changeset
15 *
223b71206888 Initial import
thib
parents:
diff changeset
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
223b71206888 Initial import
thib
parents:
diff changeset
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
223b71206888 Initial import
thib
parents:
diff changeset
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
223b71206888 Initial import
thib
parents:
diff changeset
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
223b71206888 Initial import
thib
parents:
diff changeset
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
223b71206888 Initial import
thib
parents:
diff changeset
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
223b71206888 Initial import
thib
parents:
diff changeset
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
223b71206888 Initial import
thib
parents:
diff changeset
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
223b71206888 Initial import
thib
parents:
diff changeset
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
223b71206888 Initial import
thib
parents:
diff changeset
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
223b71206888 Initial import
thib
parents:
diff changeset
26 */
223b71206888 Initial import
thib
parents:
diff changeset
27
223b71206888 Initial import
thib
parents:
diff changeset
28 /* r,g,b の基本色で number (0:left 1:right 2:up 3:down)の矢印のビットマップを作成する
223b71206888 Initial import
thib
parents:
diff changeset
29 ** width/heightのどちらかを-1にすると、それにあわせてスケール
223b71206888 Initial import
thib
parents:
diff changeset
30 */
223b71206888 Initial import
thib
parents:
diff changeset
31 extern char* create_button(int number, int& width, int& height, int r, int g, int b);
223b71206888 Initial import
thib
parents:
diff changeset
32 extern char* create_box(int& width, int& height, int r, int g, int b);
223b71206888 Initial import
thib
parents:
diff changeset
33
223b71206888 Initial import
thib
parents:
diff changeset
34 // ボタンのbitmap
223b71206888 Initial import
thib
parents:
diff changeset
35 // ランレングスで簡易圧縮
223b71206888 Initial import
thib
parents:
diff changeset
36 static int buttonleft_cnt = 990;
223b71206888 Initial import
thib
parents:
diff changeset
37 static char buttonleft[991] = {
223b71206888 Initial import
thib
parents:
diff changeset
38 0x00,0x10,0x04,0x7e,0x39,0x00,0x22,0x04,0x7f,0x59,0x00,0x1e,0x04,0x81,0x79,0x00,
223b71206888 Initial import
thib
parents:
diff changeset
39 0x1a,0x04,0x83,0x99,0x00,0x17,0x04,0x84,0xb9,0x00,0x14,0x04,0x85,0xc9,0x00,0x11,
223b71206888 Initial import
thib
parents:
diff changeset
40 0x04,0x87,0xd9,0xf8,0x04,0x88,0xe9,0xd8,0x04,0x89,0xf9,0xc8,0x04,0x89,0x01,0x10,
223b71206888 Initial import
thib
parents:
diff changeset
41 0xa8,0x04,0x10,0x02,0x7a,0x01,0x11,0x88,0xfc,0x02,0x7e,0x01,0x10,0x78,0xdc,0x02,
223b71206888 Initial import
thib
parents:
diff changeset
42 0x83,0xd9,0x68,0xdc,0x02,0x85,0xd9,0x48,0xdc,0x02,0x87,0xd9,0x38,0xcc,0x02,0x89,
223b71206888 Initial import
thib
parents:
diff changeset
43 0xc9,0x28,0xcc,0x02,0x11,0x03,0x69,0x02,0x11,0xb9,0x28,0xbc,0xea,0x03,0x70,0xea,
223b71206888 Initial import
thib
parents:
diff changeset
44 0xc9,0x18,0xbc,0xca,0x03,0x75,0xca,0xb9,0x18,0xac,0xca,0x03,0x77,0xca,0xa9,0x18,
223b71206888 Initial import
thib
parents:
diff changeset
45 0xac,0xba,0x03,0x79,0xba,0xb9,0x9c,0xba,0x03,0x7b,0xaa,0xb9,0x9c,0xaa,0x03,0x7c,
223b71206888 Initial import
thib
parents:
diff changeset
46 0xba,0xa9,0x9c,0xaa,0x03,0x7d,0xaa,0xa9,0x9c,0x9a,0x03,0x7e,0xba,0x99,0x9c,0x9a,
223b71206888 Initial import
thib
parents:
diff changeset
47 0x03,0x4e,0x39,0x03,0x2e,0xaa,0x99,0x9c,0x9a,0x03,0x4c,0x69,0x03,0x2d,0xaa,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
48 0x9c,0x9a,0x03,0x49,0xb9,0x03,0x2b,0xaa,0x99,0x9c,0x8a,0x03,0x48,0xe9,0x03,0x2a,
223b71206888 Initial import
thib
parents:
diff changeset
49 0xaa,0x99,0x9c,0x8a,0x03,0x45,0x01,0x13,0x03,0x28,0xaa,0x99,0x9c,0x8a,0x03,0x43,
223b71206888 Initial import
thib
parents:
diff changeset
50 0x01,0x16,0x03,0x27,0xaa,0x99,0x9c,0x8a,0x03,0x40,0x01,0x1b,0x03,0x25,0xaa,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
51 0x9c,0x8a,0x03,0x3e,0x01,0x1b,0x3a,0x03,0x24,0xaa,0x99,0x9c,0x8a,0x03,0x3b,0x01,
223b71206888 Initial import
thib
parents:
diff changeset
52 0x1b,0x8a,0x03,0x22,0xaa,0x99,0x9c,0x8a,0x03,0x39,0x01,0x1b,0x1d,0xaa,0x03,0x21,
223b71206888 Initial import
thib
parents:
diff changeset
53 0xaa,0x99,0x9c,0x8a,0x03,0x37,0x01,0x1a,0x4d,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,
223b71206888 Initial import
thib
parents:
diff changeset
54 0x03,0x34,0x01,0x1b,0x6d,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x32,0x01,0x1a,
223b71206888 Initial import
thib
parents:
diff changeset
55 0x9d,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x2f,0x01,0x1b,0xbd,0xaa,0x03,0x21,
223b71206888 Initial import
thib
parents:
diff changeset
56 0xaa,0x99,0x9c,0x8a,0x03,0x2d,0x01,0x1b,0xdd,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,
223b71206888 Initial import
thib
parents:
diff changeset
57 0x03,0x2a,0x01,0x1b,0x05,0x10,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x28,0x01,
223b71206888 Initial import
thib
parents:
diff changeset
58 0x1b,0x05,0x12,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x25,0x01,0x1b,0x05,0x15,
223b71206888 Initial import
thib
parents:
diff changeset
59 0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x23,0x01,0x1b,0x05,0x17,0xaa,0x03,0x21,
223b71206888 Initial import
thib
parents:
diff changeset
60 0xaa,0x99,0x9c,0x8a,0x03,0x20,0x01,0x1b,0x05,0x1a,0xaa,0x03,0x21,0xaa,0x99,0x9c,
223b71206888 Initial import
thib
parents:
diff changeset
61 0x8a,0x03,0x1e,0x01,0x1b,0x05,0x1c,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x1c,
223b71206888 Initial import
thib
parents:
diff changeset
62 0x01,0x1a,0x05,0x1f,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x19,0x01,0x1b,0x05,
223b71206888 Initial import
thib
parents:
diff changeset
63 0x21,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x17,0x01,0x1a,0x05,0x24,0xaa,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
64 0x21,0xaa,0x99,0x9c,0x8a,0x03,0x14,0x01,0x1b,0x05,0x26,0xaa,0x03,0x21,0xaa,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
65 0x9c,0x8a,0x03,0x12,0x01,0x1b,0x05,0x28,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0xfb,
223b71206888 Initial import
thib
parents:
diff changeset
66 0x01,0x1b,0x05,0x2b,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0xdb,0x01,0x1b,0x05,0x2d,
223b71206888 Initial import
thib
parents:
diff changeset
67 0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0xcb,0x01,0x19,0x05,0x30,0xaa,0x03,0x21,0xaa,
223b71206888 Initial import
thib
parents:
diff changeset
68 0x99,0x9c,0x8a,0xcb,0x01,0x17,0x05,0x32,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0xcb,
223b71206888 Initial import
thib
parents:
diff changeset
69 0x01,0x14,0x4a,0x05,0x31,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0xcb,0x01,0x12,0x9a,
223b71206888 Initial import
thib
parents:
diff changeset
70 0x05,0x2e,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0xcb,0xf9,0xea,0x05,0x2c,0xaa,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
71 0x21,0xaa,0x99,0x9c,0x8a,0xfb,0xa9,0x02,0x13,0x05,0x29,0xaa,0x03,0x21,0xaa,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
72 0x9c,0x8a,0x03,0x12,0x69,0x02,0x16,0x05,0x27,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,
223b71206888 Initial import
thib
parents:
diff changeset
73 0x03,0x16,0x19,0x02,0x19,0x05,0x25,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x18,
223b71206888 Initial import
thib
parents:
diff changeset
74 0x02,0x1b,0x05,0x22,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x1b,0x02,0x1a,0x05,
223b71206888 Initial import
thib
parents:
diff changeset
75 0x20,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x1d,0x02,0x1b,0x05,0x1d,0xaa,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
76 0x21,0xaa,0x99,0x9c,0x8a,0x03,0x20,0x02,0x1a,0x05,0x1b,0xaa,0x03,0x21,0xaa,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
77 0x9c,0x8a,0x03,0x22,0x02,0x1a,0x05,0x19,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
78 0x24,0x02,0x1b,0x05,0x16,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x27,0x02,0x1a,
223b71206888 Initial import
thib
parents:
diff changeset
79 0x05,0x14,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x29,0x02,0x1b,0x05,0x11,0xaa,
223b71206888 Initial import
thib
parents:
diff changeset
80 0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x2c,0x02,0x1a,0xfd,0xaa,0x03,0x21,0xaa,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
81 0x9c,0x8a,0x03,0x2e,0x02,0x1b,0xcd,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x31,
223b71206888 Initial import
thib
parents:
diff changeset
82 0x02,0x1a,0xad,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x33,0x02,0x1a,0x8d,0xaa,
223b71206888 Initial import
thib
parents:
diff changeset
83 0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x35,0x02,0x1b,0x5d,0xaa,0x03,0x21,0xaa,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
84 0x9c,0x8a,0x03,0x38,0x02,0x1a,0x3d,0xaa,0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x3a,
223b71206888 Initial import
thib
parents:
diff changeset
85 0x02,0x25,0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x3d,0x02,0x22,0x03,0x21,0xaa,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
86 0x9c,0x8a,0x03,0x3f,0x02,0x20,0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x41,0x02,0x1e,
223b71206888 Initial import
thib
parents:
diff changeset
87 0x03,0x21,0xaa,0x99,0x9c,0x8a,0x03,0x44,0x02,0x1b,0x03,0x21,0xaa,0x99,0x9c,0x8a,
223b71206888 Initial import
thib
parents:
diff changeset
88 0x03,0x46,0x02,0x19,0x03,0x21,0xaa,0x99,0x9c,0x9a,0x03,0x48,0x02,0x16,0x03,0x21,
223b71206888 Initial import
thib
parents:
diff changeset
89 0xaa,0x99,0x9c,0x9a,0x03,0x4a,0x02,0x14,0x03,0x21,0xaa,0x99,0x9c,0x9a,0x03,0x4d,
223b71206888 Initial import
thib
parents:
diff changeset
90 0x02,0x10,0x03,0x22,0xaa,0x99,0x9c,0x9a,0x03,0x4f,0xca,0x03,0x24,0xaa,0x99,0x9c,
223b71206888 Initial import
thib
parents:
diff changeset
91 0x9a,0x03,0x51,0x8a,0x03,0x25,0xba,0x99,0x9c,0xaa,0x03,0x53,0x3a,0x03,0x27,0xaa,
223b71206888 Initial import
thib
parents:
diff changeset
92 0xa9,0x9c,0xaa,0x03,0x7c,0xba,0xa9,0x9c,0xba,0x03,0x7b,0xba,0xa9,0x9c,0xca,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
93 0x79,0xba,0xb9,0xac,0xca,0x03,0x77,0xca,0xb9,0xbc,0xda,0x03,0x73,0xea,0xa9,0x28,
223b71206888 Initial import
thib
parents:
diff changeset
94 0xac,0x02,0x10,0x03,0x6d,0x02,0x10,0xb9,0x28,0xac,0x02,0x8c,0xb9,0x38,0xbc,0x02,
223b71206888 Initial import
thib
parents:
diff changeset
95 0x8a,0xc9,0x38,0xcc,0x02,0x89,0xc9,0x48,0xcc,0x02,0x86,0xd9,0x58,0xdc,0x02,0x84,
223b71206888 Initial import
thib
parents:
diff changeset
96 0xe9,0x68,0xdc,0x02,0x82,0xe9,0x78,0xfc,0x02,0x7d,0x01,0x10,0x98,0x04,0x10,0x02,
223b71206888 Initial import
thib
parents:
diff changeset
97 0x78,0x01,0x12,0xb8,0xfc,0x01,0x8a,0xb8,0xfc,0x01,0x89,0xd8,0xec,0x01,0x88,0xf8,
223b71206888 Initial import
thib
parents:
diff changeset
98 0xdc,0x01,0x86,0x00,0x13,0xbc,0x01,0x85,0x00,0x15,0xac,0x01,0x84,0x00,0x17,0x9c,
223b71206888 Initial import
thib
parents:
diff changeset
99 0x01,0x82,0x00,0x1b,0x7c,0x01,0x7f,0x00,0x1f,0x6c,0x01,0x7d,0x00,0x13,
223b71206888 Initial import
thib
parents:
diff changeset
100 0xff};
223b71206888 Initial import
thib
parents:
diff changeset
101 static int buttonright_cnt = 978;
223b71206888 Initial import
thib
parents:
diff changeset
102 static char buttonright[979] = {
223b71206888 Initial import
thib
parents:
diff changeset
103 0x00,0x13,0x04,0x81,0x00,0x21,0x04,0x84,0x00,0x1e,0x04,0x88,0x00,0x19,0x04,0x8c,
223b71206888 Initial import
thib
parents:
diff changeset
104 0x00,0x17,0x04,0x8f,0x00,0x14,0x04,0x91,0x00,0x11,0x04,0x94,0xf8,0x04,0x96,0xd8,
223b71206888 Initial import
thib
parents:
diff changeset
105 0x04,0x98,0xb8,0x04,0x9a,0xa8,0x04,0x11,0x02,0x7a,0x04,0x10,0x88,0xfc,0x02,0x7f,
223b71206888 Initial import
thib
parents:
diff changeset
106 0xfc,0x68,0xec,0x02,0x83,0xdc,0x68,0xdc,0x02,0x85,0xdc,0x48,0xdc,0x02,0x87,0xcc,
223b71206888 Initial import
thib
parents:
diff changeset
107 0x48,0xcc,0x02,0x89,0xcc,0x28,0xcc,0x02,0x11,0x03,0x11,0x02,0x11,0x03,0x47,0x02,
223b71206888 Initial import
thib
parents:
diff changeset
108 0x11,0xbc,0x28,0xbc,0xea,0x03,0x71,0xea,0xbc,0x18,0xbc,0xca,0x03,0x75,0xca,0x04,
223b71206888 Initial import
thib
parents:
diff changeset
109 0x16,0xca,0x03,0x77,0xca,0x04,0x15,0xba,0x03,0x79,0xba,0x04,0x14,0xba,0x03,0x7b,
223b71206888 Initial import
thib
parents:
diff changeset
110 0xba,0x99,0xac,0xaa,0x03,0x7d,0xaa,0x99,0xac,0xaa,0x03,0x7d,0xaa,0x99,0x9c,0xaa,
223b71206888 Initial import
thib
parents:
diff changeset
111 0x03,0x7f,0x9a,0x99,0x9c,0xaa,0x03,0x7f,0x9a,0x99,0x9c,0xaa,0x03,0x2c,0x4a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
112 0x4f,0x9a,0x99,0x9c,0xaa,0x03,0x2b,0x8a,0x03,0x4c,0x9a,0x99,0x9c,0x9a,0x03,0x2a,
223b71206888 Initial import
thib
parents:
diff changeset
113 0x29,0xba,0x03,0x4a,0x8a,0x99,0x9c,0x9a,0x03,0x29,0x39,0xda,0x03,0x48,0x8a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
114 0x9c,0x9a,0x03,0x27,0x59,0x02,0x10,0x03,0x45,0x8a,0x99,0x9c,0x9a,0x03,0x26,0x69,
223b71206888 Initial import
thib
parents:
diff changeset
115 0x02,0x12,0x03,0x43,0x8a,0x99,0x9c,0x9a,0x03,0x24,0x89,0x02,0x15,0x03,0x40,0x8a,
223b71206888 Initial import
thib
parents:
diff changeset
116 0x99,0x9c,0x9a,0x03,0x23,0x99,0x02,0x17,0x03,0x3e,0x8a,0x99,0x9c,0x9a,0x03,0x23,
223b71206888 Initial import
thib
parents:
diff changeset
117 0x99,0x02,0x1a,0x03,0x3b,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0x1d,0x02,0x1b,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
118 0x39,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0x3d,0x02,0x1c,0x03,0x36,0x8a,0x99,0x9c,
223b71206888 Initial import
thib
parents:
diff changeset
119 0x9a,0x03,0x23,0x99,0x6d,0x02,0x1c,0x03,0x33,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
120 0x8d,0x02,0x1c,0x03,0x31,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0xbd,0x02,0x1c,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
121 0x2e,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0xed,0x02,0x1b,0x03,0x2c,0x8a,0x99,0x9c,
223b71206888 Initial import
thib
parents:
diff changeset
122 0x9a,0x03,0x23,0x99,0x05,0x10,0x02,0x1c,0x03,0x29,0x8a,0x99,0x9c,0x9a,0x03,0x23,
223b71206888 Initial import
thib
parents:
diff changeset
123 0x99,0x05,0x13,0x02,0x1b,0x03,0x27,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0x05,0x15,
223b71206888 Initial import
thib
parents:
diff changeset
124 0x02,0x1c,0x03,0x24,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0x05,0x18,0x02,0x1b,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
125 0x22,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0x05,0x1a,0x02,0x1c,0x03,0x1f,0x8a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
126 0x9c,0x9a,0x03,0x23,0x99,0x05,0x1d,0x02,0x1c,0x03,0x1c,0x8a,0x99,0x9c,0x9a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
127 0x23,0x99,0x05,0x1f,0x02,0x1c,0x03,0x1a,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0x05,
223b71206888 Initial import
thib
parents:
diff changeset
128 0x22,0x02,0x1c,0x03,0x17,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0x05,0x25,0x02,0x1a,
223b71206888 Initial import
thib
parents:
diff changeset
129 0x03,0x16,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0x05,0x27,0x02,0x18,0x03,0x16,0x8a,
223b71206888 Initial import
thib
parents:
diff changeset
130 0x99,0x9c,0x9a,0x03,0x23,0x99,0x05,0x2a,0x02,0x15,0x03,0x16,0x8a,0x99,0x9c,0x9a,
223b71206888 Initial import
thib
parents:
diff changeset
131 0x03,0x23,0x99,0x05,0x2c,0x02,0x13,0x03,0x16,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
132 0x05,0x2f,0x02,0x10,0x03,0x16,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0x05,0x31,0xea,
223b71206888 Initial import
thib
parents:
diff changeset
133 0x03,0x16,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0x05,0x30,0xfa,0x03,0x16,0x8a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
134 0x9c,0x9a,0x03,0x23,0x99,0x05,0x2e,0x02,0x11,0x03,0x16,0x8a,0x99,0x9c,0x9a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
135 0x23,0x99,0x05,0x2b,0x02,0x14,0x03,0x16,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0x05,
223b71206888 Initial import
thib
parents:
diff changeset
136 0x29,0x02,0x16,0x03,0x16,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0x05,0x27,0x02,0x17,
223b71206888 Initial import
thib
parents:
diff changeset
137 0x03,0x17,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0x05,0x24,0x02,0x1a,0x03,0x17,0x8a,
223b71206888 Initial import
thib
parents:
diff changeset
138 0x99,0x9c,0x9a,0x03,0x23,0x99,0x05,0x22,0x02,0x1a,0x03,0x19,0x8a,0x99,0x9c,0x9a,
223b71206888 Initial import
thib
parents:
diff changeset
139 0x03,0x23,0x99,0x05,0x1f,0x02,0x1b,0x03,0x1b,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
140 0x05,0x1d,0x02,0x1a,0x03,0x1e,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0x05,0x1b,0x02,
223b71206888 Initial import
thib
parents:
diff changeset
141 0x1a,0x03,0x20,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0x05,0x18,0x02,0x1b,0x03,0x22,
223b71206888 Initial import
thib
parents:
diff changeset
142 0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0x05,0x16,0x02,0x1a,0x03,0x25,0x8a,0x99,0x9c,
223b71206888 Initial import
thib
parents:
diff changeset
143 0x9a,0x03,0x23,0x99,0x05,0x13,0x02,0x1b,0x03,0x27,0x8a,0x99,0x9c,0x9a,0x03,0x23,
223b71206888 Initial import
thib
parents:
diff changeset
144 0x99,0x05,0x11,0x02,0x1a,0x03,0x2a,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0xed,0x02,
223b71206888 Initial import
thib
parents:
diff changeset
145 0x1b,0x03,0x2c,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0xcd,0x02,0x1a,0x03,0x2f,0x8a,
223b71206888 Initial import
thib
parents:
diff changeset
146 0x99,0x9c,0x9a,0x03,0x23,0x99,0xad,0x02,0x1a,0x03,0x31,0x8a,0x99,0x9c,0x9a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
147 0x23,0x99,0x7d,0x02,0x1b,0x03,0x33,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0x5d,0x02,
223b71206888 Initial import
thib
parents:
diff changeset
148 0x1a,0x03,0x36,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0x2d,0x02,0x1b,0x03,0x38,0x8a,
223b71206888 Initial import
thib
parents:
diff changeset
149 0x99,0x9c,0x9a,0x03,0x23,0x99,0x02,0x1a,0x03,0x3b,0x8a,0x99,0x9c,0x9a,0x03,0x23,
223b71206888 Initial import
thib
parents:
diff changeset
150 0x99,0x02,0x18,0x03,0x3d,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0x02,0x16,0x03,0x3f,
223b71206888 Initial import
thib
parents:
diff changeset
151 0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0x02,0x13,0x03,0x42,0x8a,0x99,0x9c,0x9a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
152 0x23,0x99,0x02,0x11,0x03,0x44,0x8a,0x99,0x9c,0x9a,0x03,0x23,0x99,0xea,0x03,0x47,
223b71206888 Initial import
thib
parents:
diff changeset
153 0x8a,0x99,0x9c,0xaa,0x03,0x22,0x99,0xca,0x03,0x48,0x9a,0x99,0x9c,0xaa,0x03,0x22,
223b71206888 Initial import
thib
parents:
diff changeset
154 0x99,0x9a,0x03,0x4b,0x9a,0x99,0x9c,0xaa,0x03,0x22,0x99,0x7a,0x03,0x4d,0x9a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
155 0x9c,0xaa,0x03,0x24,0x79,0x5a,0x03,0x4f,0x9a,0x99,0x9c,0xaa,0x03,0x26,0x59,0x2a,
223b71206888 Initial import
thib
parents:
diff changeset
156 0x03,0x51,0xaa,0x01,0x13,0xaa,0x03,0x27,0x39,0x03,0x53,0xaa,0x01,0x13,0xaa,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
157 0x7c,0xba,0x01,0x13,0xba,0x03,0x7b,0xba,0x01,0x14,0xba,0x03,0x79,0xca,0x01,0x14,
223b71206888 Initial import
thib
parents:
diff changeset
158 0xca,0x03,0x77,0xba,0xb9,0x18,0xa9,0xea,0x03,0x73,0xda,0xb9,0x18,0xb9,0x02,0x10,
223b71206888 Initial import
thib
parents:
diff changeset
159 0x03,0x6d,0x02,0x10,0xa9,0x28,0xc9,0x02,0x8b,0xb9,0x38,0xb9,0x02,0x8b,0xb9,0x38,
223b71206888 Initial import
thib
parents:
diff changeset
160 0xc9,0x02,0x89,0xb9,0x48,0xe9,0x02,0x86,0xc9,0x58,0xe9,0x02,0x84,0xd9,0x68,0xe9,
223b71206888 Initial import
thib
parents:
diff changeset
161 0x02,0x82,0xd9,0x88,0x01,0x10,0x02,0x7d,0xe9,0x98,0x01,0x13,0x02,0x78,0x01,0x10,
223b71206888 Initial import
thib
parents:
diff changeset
162 0xa8,0x01,0x99,0xc8,0x01,0x97,0xe8,0x01,0x95,0x00,0x10,0x01,0x93,0x00,0x13,0x01,
223b71206888 Initial import
thib
parents:
diff changeset
163 0x90,0x00,0x15,0x01,0x8e,0x00,0x18,0x01,0x8a,0x00,0x1d,0x01,0x86,0x00,0x20,0x01,
223b71206888 Initial import
thib
parents:
diff changeset
164 0x83,0xe8,
223b71206888 Initial import
thib
parents:
diff changeset
165 0xff};
223b71206888 Initial import
thib
parents:
diff changeset
166 static int buttonup_cnt = 1288;
223b71206888 Initial import
thib
parents:
diff changeset
167 static char buttonup[1289] = {
223b71206888 Initial import
thib
parents:
diff changeset
168 0x00,0x10,0x04,0x4c,0x00,0x20,0x04,0x52,0x00,0x1a,0x04,0x56,0x00,0x17,0x04,0x59,
223b71206888 Initial import
thib
parents:
diff changeset
169 0x00,0x14,0x04,0x5b,0x00,0x12,0x04,0x5e,0xe8,0x04,0x61,0xd8,0x04,0x62,0xb8,0x04,
223b71206888 Initial import
thib
parents:
diff changeset
170 0x64,0x98,0x04,0x10,0x02,0x45,0x04,0x10,0x88,0xfc,0x02,0x48,0x04,0x10,0x78,0xdc,
223b71206888 Initial import
thib
parents:
diff changeset
171 0x02,0x4c,0xfc,0x58,0xdc,0x02,0x4f,0xdc,0x48,0xdc,0x02,0x51,0xdc,0x38,0xcc,0x02,
223b71206888 Initial import
thib
parents:
diff changeset
172 0x53,0xcc,0x38,0xbc,0x02,0x55,0x04,0x18,0x02,0x57,0x04,0x17,0x02,0x10,0x03,0x35,
223b71206888 Initial import
thib
parents:
diff changeset
173 0x02,0x12,0x04,0x16,0xda,0x03,0x3e,0xea,0x04,0x15,0xba,0x03,0x42,0xca,0x04,0x14,
223b71206888 Initial import
thib
parents:
diff changeset
174 0xba,0x03,0x44,0xca,0x99,0xac,0xaa,0x03,0x46,0xba,0x99,0xac,0x9a,0x03,0x48,0xaa,
223b71206888 Initial import
thib
parents:
diff changeset
175 0x99,0xac,0x8a,0x03,0x49,0xaa,0x99,0xac,0x8a,0x03,0x4a,0x9a,0x99,0xac,0x8a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
176 0x4a,0x9a,0x99,0xac,0x7a,0x03,0x4c,0x8a,0x99,0xac,0x7a,0x03,0x4c,0x8a,0x99,0xac,
223b71206888 Initial import
thib
parents:
diff changeset
177 0x7a,0x03,0x4c,0x8a,0x99,0xac,0x6a,0x03,0x25,0x59,0x03,0x23,0x8a,0x99,0xac,0x6a,
223b71206888 Initial import
thib
parents:
diff changeset
178 0x03,0x24,0x69,0x03,0x23,0x8a,0x99,0xac,0x6a,0x03,0x24,0x69,0x03,0x23,0x8a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
179 0xac,0x6a,0x03,0x23,0x89,0x03,0x22,0x8a,0x99,0xac,0x6a,0x03,0x23,0x89,0x03,0x22,
223b71206888 Initial import
thib
parents:
diff changeset
180 0x8a,0x99,0xac,0x6a,0x03,0x23,0x89,0x03,0x22,0x8a,0x99,0xac,0x6a,0x03,0x22,0xa9,
223b71206888 Initial import
thib
parents:
diff changeset
181 0x03,0x21,0x8a,0x99,0xac,0x6a,0x03,0x22,0xa9,0x03,0x21,0x8a,0x99,0xac,0x6a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
182 0x21,0xb9,0x03,0x21,0x8a,0x99,0xac,0x6a,0x03,0x21,0xb9,0x03,0x21,0x8a,0x99,0xac,
223b71206888 Initial import
thib
parents:
diff changeset
183 0x6a,0x03,0x21,0xc9,0x03,0x20,0x8a,0x99,0xac,0x6a,0x03,0x20,0xd9,0x03,0x20,0x8a,
223b71206888 Initial import
thib
parents:
diff changeset
184 0x99,0xac,0x6a,0x03,0x20,0xb9,0x3a,0x03,0x1f,0x8a,0x99,0xac,0x6a,0x03,0x1f,0xb9,
223b71206888 Initial import
thib
parents:
diff changeset
185 0x4a,0x03,0x1f,0x8a,0x99,0xac,0x6a,0x03,0x1f,0xb9,0x4a,0x03,0x1f,0x8a,0x99,0xac,
223b71206888 Initial import
thib
parents:
diff changeset
186 0x6a,0x03,0x1f,0xa9,0x6a,0x03,0x1e,0x8a,0x99,0xac,0x6a,0x03,0x1e,0xb9,0x6a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
187 0x1e,0x8a,0x99,0xac,0x6a,0x03,0x1e,0xb9,0x7a,0x03,0x1d,0x8a,0x99,0xac,0x6a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
188 0x1d,0xb9,0x8a,0x03,0x1d,0x8a,0x99,0xac,0x6a,0x03,0x1d,0xb9,0x8a,0x03,0x1d,0x8a,
223b71206888 Initial import
thib
parents:
diff changeset
189 0x99,0xac,0x6a,0x03,0x1d,0xa9,0xaa,0x03,0x1c,0x8a,0x99,0xac,0x6a,0x03,0x1c,0xb9,
223b71206888 Initial import
thib
parents:
diff changeset
190 0xaa,0x03,0x1c,0x8a,0x99,0xac,0x6a,0x03,0x1c,0xb9,0xba,0x03,0x1b,0x8a,0x99,0xac,
223b71206888 Initial import
thib
parents:
diff changeset
191 0x6a,0x03,0x1b,0xb9,0x1d,0xba,0x03,0x1b,0x8a,0x99,0xac,0x6a,0x03,0x1b,0xb9,0x2d,
223b71206888 Initial import
thib
parents:
diff changeset
192 0xba,0x03,0x1a,0x8a,0x99,0xac,0x6a,0x03,0x1b,0xa9,0x3d,0xba,0x03,0x1a,0x8a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
193 0xac,0x6a,0x03,0x1a,0xb9,0x3d,0xba,0x03,0x1a,0x8a,0x99,0xac,0x6a,0x03,0x1a,0xb9,
223b71206888 Initial import
thib
parents:
diff changeset
194 0x4d,0xba,0x03,0x19,0x8a,0x99,0xac,0x6a,0x03,0x19,0xb9,0x5d,0xba,0x03,0x19,0x8a,
223b71206888 Initial import
thib
parents:
diff changeset
195 0x99,0xac,0x6a,0x03,0x19,0xb9,0x6d,0xba,0x03,0x18,0x8a,0x99,0xac,0x6a,0x03,0x18,
223b71206888 Initial import
thib
parents:
diff changeset
196 0xb9,0x7d,0xba,0x03,0x18,0x8a,0x99,0xac,0x6a,0x03,0x18,0xb9,0x7d,0xba,0x03,0x18,
223b71206888 Initial import
thib
parents:
diff changeset
197 0x8a,0x99,0xac,0x6a,0x03,0x18,0xb9,0x8d,0xba,0x03,0x17,0x8a,0x99,0xac,0x6a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
198 0x17,0xb9,0x9d,0xba,0x03,0x17,0x8a,0x99,0xac,0x6a,0x03,0x17,0xb9,0xad,0xba,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
199 0x16,0x8a,0x99,0xac,0x6a,0x03,0x16,0xb9,0xbd,0xba,0x03,0x16,0x8a,0x99,0xac,0x6a,
223b71206888 Initial import
thib
parents:
diff changeset
200 0x03,0x16,0xb9,0xcd,0xaa,0x03,0x16,0x8a,0x99,0xac,0x6a,0x03,0x16,0xb9,0xcd,0xba,
223b71206888 Initial import
thib
parents:
diff changeset
201 0x03,0x15,0x8a,0x99,0xac,0x6a,0x03,0x15,0xb9,0xdd,0xba,0x03,0x15,0x8a,0x99,0xac,
223b71206888 Initial import
thib
parents:
diff changeset
202 0x6a,0x03,0x15,0xb9,0xed,0xba,0x03,0x14,0x8a,0x99,0xac,0x6a,0x03,0x14,0xb9,0xfd,
223b71206888 Initial import
thib
parents:
diff changeset
203 0xba,0x03,0x14,0x8a,0x99,0xac,0x6a,0x03,0x14,0xb9,0x05,0x10,0xba,0x03,0x13,0x8a,
223b71206888 Initial import
thib
parents:
diff changeset
204 0x99,0xac,0x6a,0x03,0x14,0xa9,0x05,0x11,0xba,0x03,0x13,0x8a,0x99,0xac,0x6a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
205 0x13,0xb9,0x05,0x11,0xba,0x03,0x13,0x8a,0x99,0xac,0x6a,0x03,0x13,0xb9,0x05,0x12,
223b71206888 Initial import
thib
parents:
diff changeset
206 0xba,0x03,0x12,0x8a,0x99,0xac,0x6a,0x03,0x12,0xb9,0x05,0x13,0xba,0x03,0x12,0x8a,
223b71206888 Initial import
thib
parents:
diff changeset
207 0x99,0xac,0x6a,0x03,0x12,0xb9,0x05,0x14,0xba,0x03,0x11,0x8a,0x99,0xac,0x6a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
208 0x12,0xa9,0x05,0x15,0xba,0x03,0x11,0x8a,0x99,0xac,0x6a,0x03,0x11,0xb9,0x05,0x16,
223b71206888 Initial import
thib
parents:
diff changeset
209 0xaa,0x03,0x11,0x8a,0x99,0xac,0x6a,0x03,0x11,0xb9,0x05,0x16,0xba,0x03,0x10,0x8a,
223b71206888 Initial import
thib
parents:
diff changeset
210 0x99,0xac,0x6a,0x03,0x10,0xb9,0x05,0x17,0xba,0x03,0x10,0x8a,0x99,0xac,0x6a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
211 0x10,0xb9,0x05,0x18,0xba,0xfb,0x8a,0x99,0xac,0x6a,0xfb,0xb9,0x05,0x19,0xba,0xfb,
223b71206888 Initial import
thib
parents:
diff changeset
212 0x8a,0x99,0xac,0x6a,0xfb,0xb9,0x05,0x1a,0xba,0xeb,0x8a,0x99,0xac,0x6a,0xfb,0xb9,
223b71206888 Initial import
thib
parents:
diff changeset
213 0x05,0x1a,0xba,0xeb,0x8a,0x99,0xac,0x6a,0xeb,0xb9,0x05,0x1b,0xba,0xeb,0x8a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
214 0xac,0x6a,0xeb,0xb9,0x05,0x1c,0xba,0xdb,0x8a,0x99,0xac,0x6a,0xdb,0xb9,0x05,0x1d,
223b71206888 Initial import
thib
parents:
diff changeset
215 0xba,0xdb,0x8a,0x99,0xac,0x6a,0xdb,0xb9,0x05,0x1e,0xba,0xcb,0x8a,0x99,0xac,0x6a,
223b71206888 Initial import
thib
parents:
diff changeset
216 0xdb,0xb9,0x05,0x1e,0xba,0xcb,0x8a,0x99,0xac,0x6a,0xcb,0xb9,0x05,0x1f,0xba,0xcb,
223b71206888 Initial import
thib
parents:
diff changeset
217 0x8a,0x99,0xac,0x6a,0xcb,0xb9,0x05,0x20,0xba,0xbb,0x8a,0x99,0xac,0x6a,0xbb,0xb9,
223b71206888 Initial import
thib
parents:
diff changeset
218 0x05,0x21,0xba,0xbb,0x8a,0x99,0xac,0x6a,0xbb,0xb9,0x05,0x22,0xba,0xab,0x8a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
219 0xac,0x6a,0xbb,0xb9,0x05,0x22,0xba,0xab,0x8a,0x99,0xac,0x6a,0xab,0xb9,0x05,0x24,
223b71206888 Initial import
thib
parents:
diff changeset
220 0xaa,0xab,0x8a,0x99,0xac,0x6a,0xab,0xb9,0x05,0x24,0xba,0x9b,0x8a,0x99,0xac,0x6a,
223b71206888 Initial import
thib
parents:
diff changeset
221 0x9b,0xb9,0x05,0x25,0xba,0x9b,0x8a,0x99,0xac,0x6a,0x9b,0xb9,0x05,0x26,0xba,0x8b,
223b71206888 Initial import
thib
parents:
diff changeset
222 0x8a,0x99,0xac,0x6a,0x9b,0xa9,0x05,0x27,0xba,0x8b,0x8a,0x99,0xac,0x6a,0xab,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
223 0x05,0x28,0xba,0x7b,0x8a,0x99,0xac,0x6a,0xab,0x99,0x05,0x28,0xba,0x7b,0x8a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
224 0xac,0x6a,0xbb,0x79,0x05,0x29,0xba,0x7b,0x8a,0x99,0xac,0x6a,0xcb,0x69,0x02,0x35,
223b71206888 Initial import
thib
parents:
diff changeset
225 0x6b,0x8a,0x99,0xac,0x6a,0xcb,0x59,0x02,0x36,0x6b,0x8a,0x99,0xac,0x6a,0xdb,0x49,
223b71206888 Initial import
thib
parents:
diff changeset
226 0x02,0x36,0x6b,0x8a,0x99,0xac,0x6a,0xeb,0x39,0x02,0x35,0x7b,0x8a,0x99,0xac,0x6a,
223b71206888 Initial import
thib
parents:
diff changeset
227 0xeb,0x29,0x02,0x36,0x7b,0x8a,0x99,0xac,0x6a,0xfb,0x19,0x02,0x35,0x8b,0x8a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
228 0xac,0x6a,0x03,0x10,0x02,0x35,0x8b,0x8a,0x99,0xac,0x6a,0x03,0x10,0x02,0x34,0x9b,
223b71206888 Initial import
thib
parents:
diff changeset
229 0x8a,0x99,0xac,0x6a,0x03,0x11,0x02,0x33,0x9b,0x8a,0x99,0xac,0x6a,0x03,0x12,0x02,
223b71206888 Initial import
thib
parents:
diff changeset
230 0x31,0xab,0x8a,0x99,0xac,0x6a,0x03,0x4d,0x8a,0x99,0xac,0x6a,0x03,0x4d,0x8a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
231 0xac,0x6a,0x03,0x4d,0x8a,0x99,0xac,0x6a,0x03,0x4d,0x8a,0x99,0xac,0x6a,0x03,0x4d,
223b71206888 Initial import
thib
parents:
diff changeset
232 0x8a,0x99,0xac,0x6a,0x03,0x4d,0x8a,0x99,0xac,0x6a,0x03,0x4d,0x8a,0x99,0xac,0x6a,
223b71206888 Initial import
thib
parents:
diff changeset
233 0x03,0x4d,0x8a,0x99,0xac,0x6a,0x03,0x4d,0x8a,0x99,0xac,0x6a,0x03,0x4d,0x8a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
234 0xac,0x6a,0x03,0x4d,0x8a,0x99,0xac,0x6a,0x03,0x4d,0x8a,0x99,0xac,0x6a,0x03,0x4d,
223b71206888 Initial import
thib
parents:
diff changeset
235 0x8a,0x99,0xac,0x6a,0x03,0x4d,0x8a,0x99,0xac,0x6a,0x03,0x4d,0x8a,0x99,0xac,0x6a,
223b71206888 Initial import
thib
parents:
diff changeset
236 0x03,0x4d,0x8a,0x99,0xac,0x6a,0x03,0x4d,0x8a,0x99,0xac,0x6a,0x03,0x4d,0x8a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
237 0xac,0x6a,0x03,0x4d,0x8a,0x99,0xac,0x6a,0x03,0x4d,0x8a,0x99,0xac,0x6a,0x03,0x4d,
223b71206888 Initial import
thib
parents:
diff changeset
238 0x8a,0x99,0xac,0x6a,0x03,0x4d,0x8a,0x99,0xac,0x7a,0x03,0x4c,0x8a,0x99,0xac,0x7a,
223b71206888 Initial import
thib
parents:
diff changeset
239 0x03,0x4c,0x8a,0x99,0xac,0x7a,0x03,0x4b,0x9a,0x99,0xac,0x8a,0x03,0x4a,0x9a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
240 0xac,0x8a,0x03,0x4a,0x9a,0x99,0xac,0x8a,0x03,0x49,0xaa,0x99,0xac,0x9a,0x03,0x48,
223b71206888 Initial import
thib
parents:
diff changeset
241 0x9a,0xa9,0xac,0xaa,0x03,0x46,0xaa,0x01,0x15,0xaa,0x03,0x44,0xba,0x01,0x15,0xba,
223b71206888 Initial import
thib
parents:
diff changeset
242 0x03,0x41,0xca,0x01,0x17,0xda,0x03,0x3c,0xea,0xb9,0x18,0xb9,0x02,0x10,0x03,0x35,
223b71206888 Initial import
thib
parents:
diff changeset
243 0x02,0x12,0xa9,0x28,0xb9,0x02,0x56,0xb9,0x38,0xb9,0x02,0x54,0xc9,0x38,0xc9,0x02,
223b71206888 Initial import
thib
parents:
diff changeset
244 0x52,0xc9,0x58,0xc9,0x02,0x51,0xc9,0x58,0xd9,0x02,0x4e,0xd9,0x78,0xe9,0x02,0x4b,
223b71206888 Initial import
thib
parents:
diff changeset
245 0xe9,0x78,0xf9,0x02,0x49,0xe9,0x98,0x01,0x11,0x02,0x43,0x01,0x10,0xb8,0x01,0x12,
223b71206888 Initial import
thib
parents:
diff changeset
246 0x02,0x3e,0x01,0x13,0xc8,0x01,0x61,0xe8,0x01,0x5f,0x00,0x10,0x01,0x5d,0x00,0x12,
223b71206888 Initial import
thib
parents:
diff changeset
247 0x01,0x5b,0x00,0x14,0x01,0x58,0x00,0x18,0x01,0x55,0x00,0x1b,0x01,0x51,0x00,0x1f,
223b71206888 Initial import
thib
parents:
diff changeset
248 0x01,0x4d,0x00,0x22,0x01,0x49,0x00,0x13,
223b71206888 Initial import
thib
parents:
diff changeset
249 0xff};
223b71206888 Initial import
thib
parents:
diff changeset
250 static int buttondown_cnt = 1445;
223b71206888 Initial import
thib
parents:
diff changeset
251 static char buttondown[1446] = {
223b71206888 Initial import
thib
parents:
diff changeset
252 0x1e,0x00,0x12,0x04,0x45,0x59,0x00,0x11,0x1e,0xf8,0x04,0x48,0x89,0xe8,0x1e,0xd8,
223b71206888 Initial import
thib
parents:
diff changeset
253 0x04,0x4a,0xa9,0xc8,0x1e,0xb8,0x04,0x4c,0xb9,0xb8,0x1e,0xa8,0x04,0x4d,0xc9,0xa8,
223b71206888 Initial import
thib
parents:
diff changeset
254 0x1e,0x88,0x04,0x4f,0xe9,0x88,0x1e,0x78,0x04,0x50,0xf9,0x78,0x1e,0x68,0x04,0x51,
223b71206888 Initial import
thib
parents:
diff changeset
255 0x01,0x10,0x68,0x1e,0x68,0x04,0x51,0x01,0x11,0x58,0x1e,0x58,0x04,0x12,0x02,0x40,
223b71206888 Initial import
thib
parents:
diff changeset
256 0x01,0x11,0x58,0x1e,0x48,0x04,0x10,0x02,0x46,0xf9,0x48,0x1e,0x38,0xec,0x02,0x4b,
223b71206888 Initial import
thib
parents:
diff changeset
257 0xe9,0x38,0x1e,0x38,0xdc,0x02,0x4d,0xd9,0x38,0x1e,0x28,0xdc,0x02,0x4f,0xd9,0x28,
223b71206888 Initial import
thib
parents:
diff changeset
258 0x1e,0x28,0xcc,0x02,0x51,0xc9,0x28,0x1e,0x18,0xcc,0x02,0x53,0xc9,0x18,0x1e,0x18,
223b71206888 Initial import
thib
parents:
diff changeset
259 0xbc,0x02,0x55,0xb9,0x18,0x1e,0x18,0xbc,0x02,0x56,0xa9,0x18,0x1e,0x18,0xac,0xfa,
223b71206888 Initial import
thib
parents:
diff changeset
260 0x03,0x39,0xfa,0xb9,0x1e,0xbc,0xca,0x03,0x3f,0xca,0xb9,0x1e,0xac,0xba,0x03,0x42,
223b71206888 Initial import
thib
parents:
diff changeset
261 0xca,0xa9,0x1e,0xac,0xaa,0x03,0x45,0xaa,0xa9,0x1e,0x9c,0xaa,0x03,0x47,0x9a,0xa9,
223b71206888 Initial import
thib
parents:
diff changeset
262 0x1e,0x9c,0x9a,0x03,0x48,0xaa,0x99,0x1e,0x9c,0x9a,0x03,0x49,0x9a,0x99,0x1e,0x9c,
223b71206888 Initial import
thib
parents:
diff changeset
263 0x8a,0x03,0x4a,0x9a,0x99,0x1e,0x9c,0x8a,0x03,0x4b,0x8a,0x99,0x1e,0x9c,0x8a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
264 0x4b,0x8a,0x99,0x1e,0x9c,0x7a,0x03,0x4c,0x8a,0x99,0x1e,0x9c,0x7a,0x03,0x4c,0x8a,
223b71206888 Initial import
thib
parents:
diff changeset
265 0x99,0x1e,0x9c,0x7a,0x03,0x4d,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x4d,0x7a,0x99,0x1e,
223b71206888 Initial import
thib
parents:
diff changeset
266 0x9c,0x7a,0x03,0x4d,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x4d,0x7a,0x99,0x1e,0x9c,0x7a,
223b71206888 Initial import
thib
parents:
diff changeset
267 0x03,0x4d,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x4d,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x4d,
223b71206888 Initial import
thib
parents:
diff changeset
268 0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x4d,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x4d,0x7a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
269 0x1e,0x9c,0x7a,0x03,0x4d,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x4d,0x7a,0x99,0x1e,0x9c,
223b71206888 Initial import
thib
parents:
diff changeset
270 0x7a,0x03,0x4d,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x4d,0x7a,0x99,0x1e,0x9c,0x7a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
271 0x4d,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x4d,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x4d,0x7a,
223b71206888 Initial import
thib
parents:
diff changeset
272 0x99,0x1e,0x9c,0x7a,0x03,0x4d,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x4d,0x7a,0x99,0x1e,
223b71206888 Initial import
thib
parents:
diff changeset
273 0x9c,0x7a,0x03,0x4d,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x4d,0x7a,0x99,0x1e,0x9c,0x7a,
223b71206888 Initial import
thib
parents:
diff changeset
274 0x03,0x4d,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x4d,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x11,
223b71206888 Initial import
thib
parents:
diff changeset
275 0x01,0x32,0xab,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x10,0x01,0x33,0xab,0x7a,0x99,0x1e,
223b71206888 Initial import
thib
parents:
diff changeset
276 0x9c,0x7a,0xfb,0x01,0x35,0x9b,0x7a,0x99,0x1e,0x9c,0x7a,0xfb,0x01,0x35,0x9b,0x7a,
223b71206888 Initial import
thib
parents:
diff changeset
277 0x99,0x1e,0x9c,0x7a,0xeb,0x01,0x37,0x8b,0x7a,0x99,0x1e,0x9c,0x7a,0xdb,0x01,0x38,
223b71206888 Initial import
thib
parents:
diff changeset
278 0x8b,0x7a,0x99,0x1e,0x9c,0x7a,0xdb,0x01,0x39,0x7b,0x7a,0x99,0x1e,0x9c,0x7a,0xcb,
223b71206888 Initial import
thib
parents:
diff changeset
279 0x01,0x3a,0x7b,0x7a,0x99,0x1e,0x9c,0x7a,0xbb,0x01,0x3b,0x7b,0x7a,0x99,0x1e,0x9c,
223b71206888 Initial import
thib
parents:
diff changeset
280 0x7a,0xbb,0x89,0x05,0x28,0xba,0x7b,0x7a,0x99,0x1e,0x9c,0x7a,0xab,0x99,0x05,0x28,
223b71206888 Initial import
thib
parents:
diff changeset
281 0xaa,0x8b,0x7a,0x99,0x1e,0x9c,0x7a,0x9b,0xa9,0x05,0x27,0xba,0x8b,0x7a,0x99,0x1e,
223b71206888 Initial import
thib
parents:
diff changeset
282 0x9c,0x7a,0x9b,0xb9,0x05,0x26,0xba,0x8b,0x7a,0x99,0x1e,0x9c,0x7a,0x9b,0xb9,0x05,
223b71206888 Initial import
thib
parents:
diff changeset
283 0x25,0xba,0x9b,0x7a,0x99,0x1e,0x9c,0x7a,0x9b,0xc9,0x05,0x24,0xba,0x9b,0x7a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
284 0x1e,0x9c,0x7a,0xab,0xb9,0x05,0x23,0xba,0xab,0x7a,0x99,0x1e,0x9c,0x7a,0xab,0xb9,
223b71206888 Initial import
thib
parents:
diff changeset
285 0x05,0x23,0xba,0xab,0x7a,0x99,0x1e,0x9c,0x7a,0xbb,0xb9,0x05,0x22,0xba,0xab,0x7a,
223b71206888 Initial import
thib
parents:
diff changeset
286 0x99,0x1e,0x9c,0x7a,0xbb,0xb9,0x05,0x21,0xba,0xbb,0x7a,0x99,0x1e,0x9c,0x7a,0xcb,
223b71206888 Initial import
thib
parents:
diff changeset
287 0xa9,0x05,0x21,0xba,0xbb,0x7a,0x99,0x1e,0x9c,0x7a,0xcb,0xb9,0x05,0x1f,0xba,0xcb,
223b71206888 Initial import
thib
parents:
diff changeset
288 0x7a,0x99,0x1e,0x9c,0x7a,0xcb,0xb9,0x05,0x1f,0xba,0xcb,0x7a,0x99,0x1e,0x9c,0x7a,
223b71206888 Initial import
thib
parents:
diff changeset
289 0xdb,0xb9,0x05,0x1e,0xba,0xcb,0x7a,0x99,0x1e,0x9c,0x7a,0xdb,0xb9,0x05,0x1d,0xba,
223b71206888 Initial import
thib
parents:
diff changeset
290 0xdb,0x7a,0x99,0x1e,0x9c,0x7a,0xeb,0xa9,0x05,0x1d,0xba,0xdb,0x7a,0x99,0x1e,0x9c,
223b71206888 Initial import
thib
parents:
diff changeset
291 0x7a,0xeb,0xb9,0x05,0x1b,0xba,0xeb,0x7a,0x99,0x1e,0x9c,0x7a,0xeb,0xb9,0x05,0x1b,
223b71206888 Initial import
thib
parents:
diff changeset
292 0xba,0xeb,0x7a,0x99,0x1e,0x9c,0x7a,0xfb,0xb9,0x05,0x1a,0xaa,0xfb,0x7a,0x99,0x1e,
223b71206888 Initial import
thib
parents:
diff changeset
293 0x9c,0x7a,0xfb,0xb9,0x05,0x19,0xba,0xfb,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x10,0xa9,
223b71206888 Initial import
thib
parents:
diff changeset
294 0x05,0x19,0xba,0xfb,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x10,0xb9,0x05,0x17,0xba,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
295 0x10,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x10,0xb9,0x05,0x17,0xba,0x03,0x10,0x7a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
296 0x1e,0x9c,0x7a,0x03,0x11,0xb9,0x05,0x15,0xba,0x03,0x11,0x7a,0x99,0x1e,0x9c,0x7a,
223b71206888 Initial import
thib
parents:
diff changeset
297 0x03,0x11,0xb9,0x05,0x15,0xba,0x03,0x11,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x12,0xa9,
223b71206888 Initial import
thib
parents:
diff changeset
298 0x05,0x15,0xba,0x03,0x11,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x12,0xb9,0x05,0x13,0xba,
223b71206888 Initial import
thib
parents:
diff changeset
299 0x03,0x12,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x12,0xb9,0x05,0x13,0xba,0x03,0x12,0x7a,
223b71206888 Initial import
thib
parents:
diff changeset
300 0x99,0x1e,0x9c,0x7a,0x03,0x13,0xb9,0x05,0x11,0xba,0x03,0x13,0x7a,0x99,0x1e,0x9c,
223b71206888 Initial import
thib
parents:
diff changeset
301 0x7a,0x03,0x13,0xb9,0x05,0x11,0xba,0x03,0x13,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x13,
223b71206888 Initial import
thib
parents:
diff changeset
302 0xb9,0x05,0x11,0xaa,0x03,0x14,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x14,0xb9,0xfd,0xba,
223b71206888 Initial import
thib
parents:
diff changeset
303 0x03,0x14,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x14,0xb9,0xfd,0xba,0x03,0x14,0x7a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
304 0x1e,0x9c,0x7a,0x03,0x15,0xa9,0xed,0xba,0x03,0x15,0x7a,0x99,0x1e,0x9c,0x7a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
305 0x15,0xb9,0xdd,0xba,0x03,0x15,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x15,0xb9,0xcd,0xba,
223b71206888 Initial import
thib
parents:
diff changeset
306 0x03,0x16,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x16,0xb9,0xbd,0xba,0x03,0x16,0x7a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
307 0x1e,0x9c,0x7a,0x03,0x16,0xb9,0xbd,0xba,0x03,0x16,0x7a,0x99,0x1e,0x9c,0x7a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
308 0x17,0xa9,0xad,0xba,0x03,0x17,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x17,0xb9,0x9d,0xba,
223b71206888 Initial import
thib
parents:
diff changeset
309 0x03,0x17,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x17,0xb9,0x8d,0xba,0x03,0x18,0x7a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
310 0x1e,0x9c,0x7a,0x03,0x18,0xb9,0x7d,0xba,0x03,0x18,0x7a,0x99,0x1e,0x9c,0x7a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
311 0x18,0xb9,0x7d,0xba,0x03,0x18,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x18,0xb9,0x6d,0xba,
223b71206888 Initial import
thib
parents:
diff changeset
312 0x03,0x19,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x18,0xc9,0x5d,0xba,0x03,0x19,0x7a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
313 0x1e,0x9c,0x7a,0x03,0x19,0xb9,0x4d,0xba,0x03,0x1a,0x7a,0x99,0x1e,0x9c,0x7a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
314 0x19,0xc9,0x3d,0xba,0x03,0x1a,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x1a,0xb9,0x3d,0xaa,
223b71206888 Initial import
thib
parents:
diff changeset
315 0x03,0x1b,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x1a,0xb9,0x2d,0xba,0x03,0x1b,0x7a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
316 0x1e,0x9c,0x7a,0x03,0x1b,0xb9,0x1d,0xba,0x03,0x1b,0x7a,0x99,0x1e,0x9c,0x7a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
317 0x1b,0xb9,0xba,0x03,0x1c,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x1c,0xa9,0xba,0x03,0x1c,
223b71206888 Initial import
thib
parents:
diff changeset
318 0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x1c,0x99,0xba,0x03,0x1d,0x7a,0x99,0x1e,0x9c,0x7a,
223b71206888 Initial import
thib
parents:
diff changeset
319 0x03,0x1c,0x99,0xba,0x03,0x1d,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x1d,0x89,0xba,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
320 0x1d,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x1d,0x89,0xaa,0x03,0x1e,0x7a,0x99,0x1e,0x9c,
223b71206888 Initial import
thib
parents:
diff changeset
321 0x7a,0x03,0x1e,0x69,0xba,0x03,0x1e,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x1e,0x59,0xba,
223b71206888 Initial import
thib
parents:
diff changeset
322 0x03,0x1f,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x1e,0x59,0xba,0x03,0x1f,0x7a,0x99,0x1e,
223b71206888 Initial import
thib
parents:
diff changeset
323 0x9c,0x7a,0x03,0x1f,0x39,0xca,0x03,0x1f,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x1f,0x39,
223b71206888 Initial import
thib
parents:
diff changeset
324 0xba,0x03,0x20,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x20,0x29,0xba,0x03,0x20,0x7a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
325 0x1e,0x9c,0x7a,0x03,0x20,0x19,0xba,0x03,0x21,0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x4d,
223b71206888 Initial import
thib
parents:
diff changeset
326 0x7a,0x99,0x1e,0x9c,0x7a,0x03,0x4d,0x7a,0x99,0x1e,0xac,0x6a,0x03,0x4d,0x7a,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
327 0x1e,0xac,0x6a,0x03,0x4d,0x7a,0x99,0x1e,0xac,0x6a,0x03,0x4d,0x7a,0x99,0x1e,0xac,
223b71206888 Initial import
thib
parents:
diff changeset
328 0x6a,0x03,0x4d,0x7a,0x99,0x1e,0xac,0x6a,0x03,0x4d,0x7a,0x99,0x1e,0xac,0x6a,0x03,
223b71206888 Initial import
thib
parents:
diff changeset
329 0x4d,0x7a,0x99,0x1e,0xac,0x6a,0x03,0x4d,0x7a,0x99,0x1e,0xac,0x6a,0x03,0x4d,0x7a,
223b71206888 Initial import
thib
parents:
diff changeset
330 0x99,0x1e,0xac,0x6a,0x03,0x4d,0x7a,0x99,0x1e,0xac,0x6a,0x03,0x4c,0x8a,0x99,0x1e,
223b71206888 Initial import
thib
parents:
diff changeset
331 0xac,0x7a,0x03,0x4b,0x8a,0x99,0x1e,0xac,0x7a,0x03,0x4b,0x8a,0x99,0x1e,0xac,0x7a,
223b71206888 Initial import
thib
parents:
diff changeset
332 0x03,0x4a,0x9a,0x99,0x1e,0xac,0x7a,0x03,0x4a,0x9a,0x99,0x1e,0xac,0x8a,0x03,0x48,
223b71206888 Initial import
thib
parents:
diff changeset
333 0xaa,0x99,0x1e,0xac,0x9a,0x03,0x47,0xaa,0x99,0x1e,0xac,0xaa,0x03,0x45,0xba,0x99,
223b71206888 Initial import
thib
parents:
diff changeset
334 0x1e,0xac,0xba,0x03,0x43,0xca,0x99,0x1e,0xac,0xca,0x03,0x40,0xda,0xa9,0x1e,0xbc,
223b71206888 Initial import
thib
parents:
diff changeset
335 0xea,0x03,0x3a,0x02,0x10,0xa9,0x1e,0xbc,0x02,0x57,0xb9,0x1e,0x18,0xbc,0x02,0x56,
223b71206888 Initial import
thib
parents:
diff changeset
336 0xb9,0x1e,0x18,0xcc,0x02,0x54,0xc9,0x1e,0x28,0xcc,0x02,0x52,0xc9,0x18,0x1e,0x28,
223b71206888 Initial import
thib
parents:
diff changeset
337 0xdc,0x02,0x50,0xd9,0x18,0x1e,0x38,0xdc,0x02,0x4e,0xd9,0x28,0x1e,0x38,0xfc,0x02,
223b71206888 Initial import
thib
parents:
diff changeset
338 0x4a,0xf9,0x28,0x1e,0x48,0xfc,0x02,0x46,0x01,0x11,0x38,0x1e,0x58,0xec,0x01,0x56,
223b71206888 Initial import
thib
parents:
diff changeset
339 0x48,0x1e,0x68,0xdc,0x01,0x55,0x58,0x1e,0x78,0xcc,0x01,0x55,0x58,0x1e,0x78,0xcc,
223b71206888 Initial import
thib
parents:
diff changeset
340 0x01,0x53,0x78,0x1e,0x98,0xac,0x01,0x52,0x88,0x1e,0xa8,0x9c,0x01,0x51,0x98,0x1e,
223b71206888 Initial import
thib
parents:
diff changeset
341 0xb8,0x8c,0x01,0x4f,0xb8,0x1e,0xd8,0x6c,0x01,0x4d,0xd8,0x1e,0xf8,0x4c,0x01,0x4a,
223b71206888 Initial import
thib
parents:
diff changeset
342 0x00,0x10,0x1e,0x00,0x6d,
223b71206888 Initial import
thib
parents:
diff changeset
343 0xff};
223b71206888 Initial import
thib
parents:
diff changeset
344
223b71206888 Initial import
thib
parents:
diff changeset
345 static char* extract_button(int number, int& width, int& height) {
223b71206888 Initial import
thib
parents:
diff changeset
346 int size;
223b71206888 Initial import
thib
parents:
diff changeset
347 char* data;
223b71206888 Initial import
thib
parents:
diff changeset
348
223b71206888 Initial import
thib
parents:
diff changeset
349 switch(number) {
223b71206888 Initial import
thib
parents:
diff changeset
350 case 0: data = buttonleft; size = buttonleft_cnt; width = 164; height = 110; break;
223b71206888 Initial import
thib
parents:
diff changeset
351 case 1: data = buttonright; size = buttonright_cnt; width = 164; height = 110; break;
223b71206888 Initial import
thib
parents:
diff changeset
352 case 2: data = buttonup; size = buttonup_cnt; width = 110; height = 164; break;
223b71206888 Initial import
thib
parents:
diff changeset
353 case 3: data = buttondown; size = buttondown_cnt; width = 110; height = 164; break;
223b71206888 Initial import
thib
parents:
diff changeset
354 default: return 0;
223b71206888 Initial import
thib
parents:
diff changeset
355 }
223b71206888 Initial import
thib
parents:
diff changeset
356
223b71206888 Initial import
thib
parents:
diff changeset
357 char* out = new char[width*height];
223b71206888 Initial import
thib
parents:
diff changeset
358 int outc = 0;
223b71206888 Initial import
thib
parents:
diff changeset
359 int i;
223b71206888 Initial import
thib
parents:
diff changeset
360 // ランレングスの展開
223b71206888 Initial import
thib
parents:
diff changeset
361 for (i=0; i<size; i++) {
223b71206888 Initial import
thib
parents:
diff changeset
362 int c = *(unsigned char*)(data+i);
223b71206888 Initial import
thib
parents:
diff changeset
363 int s = 0;
223b71206888 Initial import
thib
parents:
diff changeset
364 if (c == 0xff) break;
223b71206888 Initial import
thib
parents:
diff changeset
365 if (c&0x08) {
223b71206888 Initial import
thib
parents:
diff changeset
366 s = c>>4;
223b71206888 Initial import
thib
parents:
diff changeset
367 c &= 7;
223b71206888 Initial import
thib
parents:
diff changeset
368 } else {
223b71206888 Initial import
thib
parents:
diff changeset
369 i++;
223b71206888 Initial import
thib
parents:
diff changeset
370 s = *(unsigned char*)(data + i);
223b71206888 Initial import
thib
parents:
diff changeset
371 }
223b71206888 Initial import
thib
parents:
diff changeset
372 int j; for (j=0; j<s; j++) out[outc++] = c;
223b71206888 Initial import
thib
parents:
diff changeset
373 }
223b71206888 Initial import
thib
parents:
diff changeset
374 return out;
223b71206888 Initial import
thib
parents:
diff changeset
375 }
223b71206888 Initial import
thib
parents:
diff changeset
376
223b71206888 Initial import
thib
parents:
diff changeset
377 // R,G,B の指定色を基底色に、明るさを変えた色を RGB -> HLS -> RGB 変換で作成する
223b71206888 Initial import
thib
parents:
diff changeset
378 struct ButtonColor {
223b71206888 Initial import
thib
parents:
diff changeset
379 int rs[8];
223b71206888 Initial import
thib
parents:
diff changeset
380 int gs[8];
223b71206888 Initial import
thib
parents:
diff changeset
381 int bs[8];
223b71206888 Initial import
thib
parents:
diff changeset
382 int as[8];
223b71206888 Initial import
thib
parents:
diff changeset
383 int* c_min, *c_mid, *c_max; // rgb->hls->rgb変換用。r,g,b を高い順にmax,mid,minに割り当てる
223b71206888 Initial import
thib
parents:
diff changeset
384 bool is_gray;
223b71206888 Initial import
thib
parents:
diff changeset
385 int hc, hd, l, s; // h,l,s 系。h 要素は上の c_min|mid|maxにも入る
223b71206888 Initial import
thib
parents:
diff changeset
386 ButtonColor(int _r, int _g, int _b);
223b71206888 Initial import
thib
parents:
diff changeset
387 void SetBrightness1(int n, int c1);
223b71206888 Initial import
thib
parents:
diff changeset
388 void SetBrightness(int c1, int c2, int c3, int c4, int c5);
223b71206888 Initial import
thib
parents:
diff changeset
389 };
223b71206888 Initial import
thib
parents:
diff changeset
390 ButtonColor::ButtonColor(int r, int g, int b) {
223b71206888 Initial import
thib
parents:
diff changeset
391 is_gray = false;
223b71206888 Initial import
thib
parents:
diff changeset
392 if (r == g && r == b) {
223b71206888 Initial import
thib
parents:
diff changeset
393 is_gray = true;
223b71206888 Initial import
thib
parents:
diff changeset
394 l = r;
223b71206888 Initial import
thib
parents:
diff changeset
395 return;
223b71206888 Initial import
thib
parents:
diff changeset
396 }
223b71206888 Initial import
thib
parents:
diff changeset
397 *rs = r; *bs = b; *gs = g;
223b71206888 Initial import
thib
parents:
diff changeset
398
223b71206888 Initial import
thib
parents:
diff changeset
399 // r,g,b の昇順にmax,mid,minをrs,gs,bsに割り当てる
223b71206888 Initial import
thib
parents:
diff changeset
400 if (r > g) {
223b71206888 Initial import
thib
parents:
diff changeset
401 if (r > b) { // r = max
223b71206888 Initial import
thib
parents:
diff changeset
402 c_max = rs;
223b71206888 Initial import
thib
parents:
diff changeset
403 if (b > g) { // r>b>g
223b71206888 Initial import
thib
parents:
diff changeset
404 c_mid = bs;
223b71206888 Initial import
thib
parents:
diff changeset
405 c_min = gs;
223b71206888 Initial import
thib
parents:
diff changeset
406 } else { // r>g>b
223b71206888 Initial import
thib
parents:
diff changeset
407 c_mid = gs;
223b71206888 Initial import
thib
parents:
diff changeset
408 c_min = bs;
223b71206888 Initial import
thib
parents:
diff changeset
409 }
223b71206888 Initial import
thib
parents:
diff changeset
410 } else { // b>r>g
223b71206888 Initial import
thib
parents:
diff changeset
411 c_max = bs;
223b71206888 Initial import
thib
parents:
diff changeset
412 c_mid = rs;
223b71206888 Initial import
thib
parents:
diff changeset
413 c_min = gs;
223b71206888 Initial import
thib
parents:
diff changeset
414 }
223b71206888 Initial import
thib
parents:
diff changeset
415 } else if (g > b) { // g = max
223b71206888 Initial import
thib
parents:
diff changeset
416 c_max = gs;
223b71206888 Initial import
thib
parents:
diff changeset
417 if (r > b) { // g > r > b
223b71206888 Initial import
thib
parents:
diff changeset
418 c_mid = rs;
223b71206888 Initial import
thib
parents:
diff changeset
419 c_min = bs;
223b71206888 Initial import
thib
parents:
diff changeset
420 } else { // g > b > r
223b71206888 Initial import
thib
parents:
diff changeset
421 c_mid = bs;
223b71206888 Initial import
thib
parents:
diff changeset
422 c_min = rs;
223b71206888 Initial import
thib
parents:
diff changeset
423 }
223b71206888 Initial import
thib
parents:
diff changeset
424 } else { // b > g > r
223b71206888 Initial import
thib
parents:
diff changeset
425 c_max = bs;
223b71206888 Initial import
thib
parents:
diff changeset
426 c_mid = gs;
223b71206888 Initial import
thib
parents:
diff changeset
427 c_min = rs;
223b71206888 Initial import
thib
parents:
diff changeset
428 }
223b71206888 Initial import
thib
parents:
diff changeset
429 int min = *c_min;
223b71206888 Initial import
thib
parents:
diff changeset
430 int mid = *c_mid;
223b71206888 Initial import
thib
parents:
diff changeset
431 int max = *c_max;
223b71206888 Initial import
thib
parents:
diff changeset
432 l = (max+min)/2;
223b71206888 Initial import
thib
parents:
diff changeset
433 hd = max-min;
223b71206888 Initial import
thib
parents:
diff changeset
434 hc = mid - min;
223b71206888 Initial import
thib
parents:
diff changeset
435 if (l < 128) s = (hd*255)/(max+min);
223b71206888 Initial import
thib
parents:
diff changeset
436 else s = (hd*255) / (510-(max+min));
223b71206888 Initial import
thib
parents:
diff changeset
437 }
223b71206888 Initial import
thib
parents:
diff changeset
438 void ButtonColor::SetBrightness1(int n, int c1) {
223b71206888 Initial import
thib
parents:
diff changeset
439 if (n < 1 || n > 7) return;
223b71206888 Initial import
thib
parents:
diff changeset
440 as[n] = 255;
223b71206888 Initial import
thib
parents:
diff changeset
441 if (is_gray) {
223b71206888 Initial import
thib
parents:
diff changeset
442 rs[n] = c1 * l / 256;
223b71206888 Initial import
thib
parents:
diff changeset
443 gs[n] = c1 * l / 256;
223b71206888 Initial import
thib
parents:
diff changeset
444 bs[n] = c1 * l / 256;
223b71206888 Initial import
thib
parents:
diff changeset
445 return;
223b71206888 Initial import
thib
parents:
diff changeset
446 }
223b71206888 Initial import
thib
parents:
diff changeset
447 int m1, m2;
223b71206888 Initial import
thib
parents:
diff changeset
448
223b71206888 Initial import
thib
parents:
diff changeset
449 int light = (l * c1 * 2) / 256;
223b71206888 Initial import
thib
parents:
diff changeset
450 if (light > 255) light = 255;
223b71206888 Initial import
thib
parents:
diff changeset
451
223b71206888 Initial import
thib
parents:
diff changeset
452 if (light < 128) m2 = light*(255+s)/255;
223b71206888 Initial import
thib
parents:
diff changeset
453 else m2 = light+s-(light*s/255);
223b71206888 Initial import
thib
parents:
diff changeset
454 m1 = light*2 - m2;
223b71206888 Initial import
thib
parents:
diff changeset
455
223b71206888 Initial import
thib
parents:
diff changeset
456 c_max[n] = m2;
223b71206888 Initial import
thib
parents:
diff changeset
457 c_mid[n] = (hc*m2 + (hd-hc)*m1) / hd;
223b71206888 Initial import
thib
parents:
diff changeset
458 c_min[n] = m1;
223b71206888 Initial import
thib
parents:
diff changeset
459
223b71206888 Initial import
thib
parents:
diff changeset
460 return;
223b71206888 Initial import
thib
parents:
diff changeset
461 }
223b71206888 Initial import
thib
parents:
diff changeset
462 void ButtonColor::SetBrightness(int c1, int c2, int c3, int c4, int c5) {
223b71206888 Initial import
thib
parents:
diff changeset
463 rs[0] = bs[0] = gs[0] = as[0] = 0;
223b71206888 Initial import
thib
parents:
diff changeset
464 SetBrightness1(1, c1);
223b71206888 Initial import
thib
parents:
diff changeset
465 SetBrightness1(2, c2);
223b71206888 Initial import
thib
parents:
diff changeset
466 SetBrightness1(3, c3);
223b71206888 Initial import
thib
parents:
diff changeset
467 SetBrightness1(4, c4);
223b71206888 Initial import
thib
parents:
diff changeset
468 SetBrightness1(5, c5);
223b71206888 Initial import
thib
parents:
diff changeset
469 }
223b71206888 Initial import
thib
parents:
diff changeset
470
223b71206888 Initial import
thib
parents:
diff changeset
471 #include"rect.h"
1
b753afeb3f34 Does build under debian testing
thib
parents: 0
diff changeset
472 #include<stdlib.h>
0
223b71206888 Initial import
thib
parents:
diff changeset
473 #include<string.h>
223b71206888 Initial import
thib
parents:
diff changeset
474
223b71206888 Initial import
thib
parents:
diff changeset
475 static void draw_button(char* rdata, int width, int height, char* bdata, int bwidth, int bheight, const ButtonColor& color) {
223b71206888 Initial import
thib
parents:
diff changeset
476 const int* rs = color.rs;
223b71206888 Initial import
thib
parents:
diff changeset
477 const int* gs = color.gs;
223b71206888 Initial import
thib
parents:
diff changeset
478 const int* bs = color.bs;
223b71206888 Initial import
thib
parents:
diff changeset
479 const int* as = color.as;
223b71206888 Initial import
thib
parents:
diff changeset
480
223b71206888 Initial import
thib
parents:
diff changeset
481 struct ScaleData {int r,g,b,a,c;};
223b71206888 Initial import
thib
parents:
diff changeset
482 ScaleData* data = new ScaleData[width*height];
223b71206888 Initial import
thib
parents:
diff changeset
483 memset(data, 0, sizeof(ScaleData)*width*height);
223b71206888 Initial import
thib
parents:
diff changeset
484
223b71206888 Initial import
thib
parents:
diff changeset
485 int bx,by;
223b71206888 Initial import
thib
parents:
diff changeset
486 int x=0, y=0;
223b71206888 Initial import
thib
parents:
diff changeset
487 int x2 = 0, y2 = 0;
223b71206888 Initial import
thib
parents:
diff changeset
488 int xadd = width*65536/bwidth;
223b71206888 Initial import
thib
parents:
diff changeset
489 int yadd = height*65536/bheight;
223b71206888 Initial import
thib
parents:
diff changeset
490
223b71206888 Initial import
thib
parents:
diff changeset
491 // 元のビットマップに着色しながら縮小する
223b71206888 Initial import
thib
parents:
diff changeset
492 for (by=0; by<bheight; by++) {
223b71206888 Initial import
thib
parents:
diff changeset
493 ScaleData* d = data + y*width;
223b71206888 Initial import
thib
parents:
diff changeset
494 char* s = bdata + by*bwidth;
223b71206888 Initial import
thib
parents:
diff changeset
495 x = 0; x2 = 0;
223b71206888 Initial import
thib
parents:
diff changeset
496 for (bx=0; bx<bwidth; bx++) {
223b71206888 Initial import
thib
parents:
diff changeset
497 int c = *s++;
223b71206888 Initial import
thib
parents:
diff changeset
498 d[x].r += rs[c];
223b71206888 Initial import
thib
parents:
diff changeset
499 d[x].g += gs[c];
223b71206888 Initial import
thib
parents:
diff changeset
500 d[x].b += bs[c];
223b71206888 Initial import
thib
parents:
diff changeset
501 d[x].a += as[c];
223b71206888 Initial import
thib
parents:
diff changeset
502 d[x].c++;
223b71206888 Initial import
thib
parents:
diff changeset
503 x2 += xadd;
223b71206888 Initial import
thib
parents:
diff changeset
504 x += x2>>16;
223b71206888 Initial import
thib
parents:
diff changeset
505 x2 &= 0xffff;
223b71206888 Initial import
thib
parents:
diff changeset
506 }
223b71206888 Initial import
thib
parents:
diff changeset
507
223b71206888 Initial import
thib
parents:
diff changeset
508 y2 += yadd;
223b71206888 Initial import
thib
parents:
diff changeset
509 y += y2>>16;
223b71206888 Initial import
thib
parents:
diff changeset
510 y2 &= 0xffff;
223b71206888 Initial import
thib
parents:
diff changeset
511 }
223b71206888 Initial import
thib
parents:
diff changeset
512
223b71206888 Initial import
thib
parents:
diff changeset
513 for (y=0; y<height; y++) {
223b71206888 Initial import
thib
parents:
diff changeset
514 ScaleData* d = data + y*width;
223b71206888 Initial import
thib
parents:
diff changeset
515 char* rd = rdata + y*width*4;
223b71206888 Initial import
thib
parents:
diff changeset
516 for (x=0; x<width; x++) {
223b71206888 Initial import
thib
parents:
diff changeset
517 if (d->c == 0) *(int*)rd = 0;
223b71206888 Initial import
thib
parents:
diff changeset
518 else *(int*)rd = (int(d->b / d->c)&0xff)| ((int(d->g / d->c)&0xff)<<8)| ((int(d->r / d->c)&0xff)<<16)| ((int(d->a / d->c)&0xff)<<24);
223b71206888 Initial import
thib
parents:
diff changeset
519 rd += 4;
223b71206888 Initial import
thib
parents:
diff changeset
520 d++;
223b71206888 Initial import
thib
parents:
diff changeset
521 }
223b71206888 Initial import
thib
parents:
diff changeset
522 }
223b71206888 Initial import
thib
parents:
diff changeset
523 delete[] data;
223b71206888 Initial import
thib
parents:
diff changeset
524 return;
223b71206888 Initial import
thib
parents:
diff changeset
525 }
223b71206888 Initial import
thib
parents:
diff changeset
526 char* create_button(int number, int& width, int& height, int r, int g, int b) {
223b71206888 Initial import
thib
parents:
diff changeset
527 int bwidth, bheight;
223b71206888 Initial import
thib
parents:
diff changeset
528 char* bdata = extract_button(number, bwidth, bheight);
223b71206888 Initial import
thib
parents:
diff changeset
529 if (bdata == 0) return 0;
223b71206888 Initial import
thib
parents:
diff changeset
530 // 拡大率に合わせてwidth,heightをセット
223b71206888 Initial import
thib
parents:
diff changeset
531 if (width == -1 && height == -1) width = bwidth, height = bheight;
223b71206888 Initial import
thib
parents:
diff changeset
532 else if (width == -1) width = bwidth * height / bheight;
223b71206888 Initial import
thib
parents:
diff changeset
533 else if (height == -1) height = bheight * width / bwidth;
223b71206888 Initial import
thib
parents:
diff changeset
534 if (width > bwidth) width = bwidth;
223b71206888 Initial import
thib
parents:
diff changeset
535 if (height > bheight) height = bheight;
223b71206888 Initial import
thib
parents:
diff changeset
536
223b71206888 Initial import
thib
parents:
diff changeset
537 // 色を設定する
223b71206888 Initial import
thib
parents:
diff changeset
538 ButtonColor color(r,g,b);
223b71206888 Initial import
thib
parents:
diff changeset
539 // 描画
223b71206888 Initial import
thib
parents:
diff changeset
540 char* rdata = (char*)malloc(width*height*4*3);
223b71206888 Initial import
thib
parents:
diff changeset
541 color.SetBrightness(0x60, 0xa0, 0xc0, 0xe0, 0xe0);
223b71206888 Initial import
thib
parents:
diff changeset
542 draw_button(rdata, width, height, bdata, bwidth, bheight, color);
223b71206888 Initial import
thib
parents:
diff changeset
543 color.SetBrightness(0x60, 0xa0, 0xe0, 0xe0, 0xe0);
223b71206888 Initial import
thib
parents:
diff changeset
544 draw_button(rdata+width*height*4, width, height, bdata, bwidth, bheight, color);
223b71206888 Initial import
thib
parents:
diff changeset
545 color.SetBrightness(0xe0, 0xc0, 0xa0, 0x60, 0xa0);
223b71206888 Initial import
thib
parents:
diff changeset
546 draw_button(rdata+width*height*8, width, height, bdata, bwidth, bheight, color);
223b71206888 Initial import
thib
parents:
diff changeset
547 return rdata;
223b71206888 Initial import
thib
parents:
diff changeset
548 }
223b71206888 Initial import
thib
parents:
diff changeset
549
223b71206888 Initial import
thib
parents:
diff changeset
550 static void drawbox(char* buf, const Rect& region, int width, int r, int g, int b, int a) {
223b71206888 Initial import
thib
parents:
diff changeset
551 buf += region.ty*width*4 + region.lx*4;
223b71206888 Initial import
thib
parents:
diff changeset
552 int i,j;
223b71206888 Initial import
thib
parents:
diff changeset
553 int h = region.height();
223b71206888 Initial import
thib
parents:
diff changeset
554 int w = region.width();
223b71206888 Initial import
thib
parents:
diff changeset
555 int col = (b&0xff) | ((g&0xff)<<8)| ((r&0xff)<<16)| ((a&0xff)<<24);
223b71206888 Initial import
thib
parents:
diff changeset
556 for (i=0; i<h; i++) {
223b71206888 Initial import
thib
parents:
diff changeset
557 char* c = buf;
223b71206888 Initial import
thib
parents:
diff changeset
558 for (j=0; j<w; j++) {
223b71206888 Initial import
thib
parents:
diff changeset
559 *(int*)c = col;
223b71206888 Initial import
thib
parents:
diff changeset
560 c += 4;
223b71206888 Initial import
thib
parents:
diff changeset
561 }
223b71206888 Initial import
thib
parents:
diff changeset
562 buf += width*4;
223b71206888 Initial import
thib
parents:
diff changeset
563 }
223b71206888 Initial import
thib
parents:
diff changeset
564 return;
223b71206888 Initial import
thib
parents:
diff changeset
565 }
223b71206888 Initial import
thib
parents:
diff changeset
566 static void draw_box(char* buf, int width, int height, int kage_w1, int kage_w2, const ButtonColor& color) {
223b71206888 Initial import
thib
parents:
diff changeset
567 const int* rs = color.rs;
223b71206888 Initial import
thib
parents:
diff changeset
568 const int* gs = color.gs;
223b71206888 Initial import
thib
parents:
diff changeset
569 const int* bs = color.bs;
223b71206888 Initial import
thib
parents:
diff changeset
570 const int* as = color.as;
223b71206888 Initial import
thib
parents:
diff changeset
571 // まず、豆腐を書く
223b71206888 Initial import
thib
parents:
diff changeset
572 drawbox(buf, Rect(0,0,width,height), width, rs[3],gs[3],bs[3],as[3]);
223b71206888 Initial import
thib
parents:
diff changeset
573 // 影
223b71206888 Initial import
thib
parents:
diff changeset
574 if (height > 2) {
223b71206888 Initial import
thib
parents:
diff changeset
575 drawbox(buf, Rect(0,0,width,kage_w1), width, rs[4], gs[4], bs[4],as[4]);
223b71206888 Initial import
thib
parents:
diff changeset
576 drawbox(buf, Rect(0,height-kage_w1,width,height), width, rs[1], gs[1], bs[1],as[1]);
223b71206888 Initial import
thib
parents:
diff changeset
577 }
223b71206888 Initial import
thib
parents:
diff changeset
578 if (width > 2) {
223b71206888 Initial import
thib
parents:
diff changeset
579 drawbox(buf, Rect(0,0,kage_w1, height), width, rs[4], gs[4], bs[4],as[4]);
223b71206888 Initial import
thib
parents:
diff changeset
580 drawbox(buf, Rect(width-kage_w1,0,width,height), width, rs[1], gs[1], bs[1],as[1]);
223b71206888 Initial import
thib
parents:
diff changeset
581 }
223b71206888 Initial import
thib
parents:
diff changeset
582 if (height > 4) {
223b71206888 Initial import
thib
parents:
diff changeset
583 drawbox(buf, Rect(kage_w2, height-kage_w2, width-kage_w1, height-kage_w1), width, rs[2], gs[2], bs[2], as[2]);
223b71206888 Initial import
thib
parents:
diff changeset
584 }
223b71206888 Initial import
thib
parents:
diff changeset
585 if (width > 4) {
223b71206888 Initial import
thib
parents:
diff changeset
586 drawbox(buf, Rect(width-kage_w2, kage_w2, width-kage_w1, height-kage_w1), width, rs[2], gs[2], bs[2], as[2]);
223b71206888 Initial import
thib
parents:
diff changeset
587 }
223b71206888 Initial import
thib
parents:
diff changeset
588 }
223b71206888 Initial import
thib
parents:
diff changeset
589 char* create_box(int& width, int& height, int r, int g, int b) {
223b71206888 Initial import
thib
parents:
diff changeset
590 ButtonColor color(r,g,b);
223b71206888 Initial import
thib
parents:
diff changeset
591 // scale のカーソル
223b71206888 Initial import
thib
parents:
diff changeset
592 if (width == -1 && height == -1) width = 32, height = 48;
223b71206888 Initial import
thib
parents:
diff changeset
593 else if (width == -1) width = height*3/2;
223b71206888 Initial import
thib
parents:
diff changeset
594 else if (height == -1) height = width * 3/2;
223b71206888 Initial import
thib
parents:
diff changeset
595 int kage_w1 = (width<height ? width : height)/14;
223b71206888 Initial import
thib
parents:
diff changeset
596 int kage_w2 = (width<height ? width : height)*2/14;
223b71206888 Initial import
thib
parents:
diff changeset
597 if (kage_w1 <= 0) kage_w1 = 1;
223b71206888 Initial import
thib
parents:
diff changeset
598 if (kage_w2 <= 1) kage_w2 = 2;
223b71206888 Initial import
thib
parents:
diff changeset
599
223b71206888 Initial import
thib
parents:
diff changeset
600 char* buf = (char*)malloc(width*height*4*3);
223b71206888 Initial import
thib
parents:
diff changeset
601 // 描画
223b71206888 Initial import
thib
parents:
diff changeset
602 color.SetBrightness(0x60, 0xa0, 0xc0, 0xe0, 0xe0);
223b71206888 Initial import
thib
parents:
diff changeset
603 draw_box(buf, width, height, kage_w1, kage_w2, color);
223b71206888 Initial import
thib
parents:
diff changeset
604 color.SetBrightness(0x60, 0xa0, 0xe0, 0xe0, 0xe0);
223b71206888 Initial import
thib
parents:
diff changeset
605 draw_box(buf+width*height*4, width, height, kage_w1, kage_w2, color);
223b71206888 Initial import
thib
parents:
diff changeset
606 color.SetBrightness(0xe0, 0xc0, 0xa0, 0x60, 0xa0);
223b71206888 Initial import
thib
parents:
diff changeset
607 draw_box(buf+width*height*8, width, height, kage_w1, kage_w2, color);
223b71206888 Initial import
thib
parents:
diff changeset
608 return buf;
223b71206888 Initial import
thib
parents:
diff changeset
609 }
223b71206888 Initial import
thib
parents:
diff changeset
610
223b71206888 Initial import
thib
parents:
diff changeset
611 #if 0
223b71206888 Initial import
thib
parents:
diff changeset
612 #include<stdio.h>
223b71206888 Initial import
thib
parents:
diff changeset
613 #include <png.h>
223b71206888 Initial import
thib
parents:
diff changeset
614
223b71206888 Initial import
thib
parents:
diff changeset
615 void create_png(FILE* stream,int width, int height, char* data) {
223b71206888 Initial import
thib
parents:
diff changeset
616 png_structp png_ptr;
223b71206888 Initial import
thib
parents:
diff changeset
617 png_infop info_ptr;
223b71206888 Initial import
thib
parents:
diff changeset
618
223b71206888 Initial import
thib
parents:
diff changeset
619 /* create struct */
223b71206888 Initial import
thib
parents:
diff changeset
620 png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
223b71206888 Initial import
thib
parents:
diff changeset
621 if (png_ptr == NULL) return;
223b71206888 Initial import
thib
parents:
diff changeset
622
223b71206888 Initial import
thib
parents:
diff changeset
623 /* initialize information */
223b71206888 Initial import
thib
parents:
diff changeset
624 info_ptr = png_create_info_struct(png_ptr);
223b71206888 Initial import
thib
parents:
diff changeset
625 if (info_ptr == NULL) {
223b71206888 Initial import
thib
parents:
diff changeset
626 png_destroy_write_struct(&png_ptr, (png_infop*)NULL);
223b71206888 Initial import
thib
parents:
diff changeset
627 return;
223b71206888 Initial import
thib
parents:
diff changeset
628 }
223b71206888 Initial import
thib
parents:
diff changeset
629
223b71206888 Initial import
thib
parents:
diff changeset
630 if (setjmp(png_jmpbuf(png_ptr))) {
223b71206888 Initial import
thib
parents:
diff changeset
631 /* error occured !! */
223b71206888 Initial import
thib
parents:
diff changeset
632 png_destroy_write_struct(&png_ptr,&info_ptr);
223b71206888 Initial import
thib
parents:
diff changeset
633 return;
223b71206888 Initial import
thib
parents:
diff changeset
634 }
223b71206888 Initial import
thib
parents:
diff changeset
635
223b71206888 Initial import
thib
parents:
diff changeset
636 /* initialize I/O (for stream) */
223b71206888 Initial import
thib
parents:
diff changeset
637 png_init_io(png_ptr, stream);
223b71206888 Initial import
thib
parents:
diff changeset
638
223b71206888 Initial import
thib
parents:
diff changeset
639 /* initialize headers */
223b71206888 Initial import
thib
parents:
diff changeset
640 png_set_IHDR(png_ptr, info_ptr,
223b71206888 Initial import
thib
parents:
diff changeset
641 width, height, 8 /* bit_dept */,
223b71206888 Initial import
thib
parents:
diff changeset
642 PNG_COLOR_TYPE_RGB_ALPHA,
223b71206888 Initial import
thib
parents:
diff changeset
643 PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
223b71206888 Initial import
thib
parents:
diff changeset
644 /* create text information */
223b71206888 Initial import
thib
parents:
diff changeset
645 png_text info_text[3];
223b71206888 Initial import
thib
parents:
diff changeset
646 info_text[0].key = "Title";
223b71206888 Initial import
thib
parents:
diff changeset
647 info_text[0].text= "file";
223b71206888 Initial import
thib
parents:
diff changeset
648 info_text[0].compression = PNG_TEXT_COMPRESSION_NONE;
223b71206888 Initial import
thib
parents:
diff changeset
649 info_text[1].key = "Author";
223b71206888 Initial import
thib
parents:
diff changeset
650 info_text[1].text="";
223b71206888 Initial import
thib
parents:
diff changeset
651 info_text[1].compression = PNG_TEXT_COMPRESSION_NONE;
223b71206888 Initial import
thib
parents:
diff changeset
652 info_text[2].key = "Description";
223b71206888 Initial import
thib
parents:
diff changeset
653 info_text[2].text= "";
223b71206888 Initial import
thib
parents:
diff changeset
654 info_text[2].compression = PNG_TEXT_COMPRESSION_NONE;
223b71206888 Initial import
thib
parents:
diff changeset
655 png_set_text(png_ptr, info_ptr, info_text, 3);
223b71206888 Initial import
thib
parents:
diff changeset
656
223b71206888 Initial import
thib
parents:
diff changeset
657 /* write information */
223b71206888 Initial import
thib
parents:
diff changeset
658 png_write_info(png_ptr, info_ptr);
223b71206888 Initial import
thib
parents:
diff changeset
659
223b71206888 Initial import
thib
parents:
diff changeset
660 /* write body */
223b71206888 Initial import
thib
parents:
diff changeset
661 /* rgba image ; input/output is 32bpp.*/
223b71206888 Initial import
thib
parents:
diff changeset
662 char* row = new char[width*4];
223b71206888 Initial import
thib
parents:
diff changeset
663 int i; for (i=0; i<height; i++) {
223b71206888 Initial import
thib
parents:
diff changeset
664 char* row_ptr = row;
223b71206888 Initial import
thib
parents:
diff changeset
665 int j; for (j=0; j<width; j++) {
223b71206888 Initial import
thib
parents:
diff changeset
666 row_ptr[0] = data[2];
223b71206888 Initial import
thib
parents:
diff changeset
667 row_ptr[1] = data[1];
223b71206888 Initial import
thib
parents:
diff changeset
668 row_ptr[2] = data[0];
223b71206888 Initial import
thib
parents:
diff changeset
669 row_ptr[3] = data[3];
223b71206888 Initial import
thib
parents:
diff changeset
670 row_ptr += 4; data += 4;
223b71206888 Initial import
thib
parents:
diff changeset
671 }
223b71206888 Initial import
thib
parents:
diff changeset
672 png_write_rows(png_ptr, (png_byte**)&row, 1);
223b71206888 Initial import
thib
parents:
diff changeset
673 }
223b71206888 Initial import
thib
parents:
diff changeset
674 png_write_end(png_ptr, info_ptr);
223b71206888 Initial import
thib
parents:
diff changeset
675 png_destroy_write_struct(&png_ptr, &info_ptr);
223b71206888 Initial import
thib
parents:
diff changeset
676 return;
223b71206888 Initial import
thib
parents:
diff changeset
677 }
223b71206888 Initial import
thib
parents:
diff changeset
678 int main(void) {
223b71206888 Initial import
thib
parents:
diff changeset
679 int w=128,h=-1;
223b71206888 Initial import
thib
parents:
diff changeset
680 char* c = create_button(2, w,h,0x20,0x60,0xc0);
223b71206888 Initial import
thib
parents:
diff changeset
681 // char* c = create_box(w,h,0xff,0xff,0xff);
223b71206888 Initial import
thib
parents:
diff changeset
682 int i;
223b71206888 Initial import
thib
parents:
diff changeset
683 FILE* f=fopen("bt.png","wb");
223b71206888 Initial import
thib
parents:
diff changeset
684 if(f==0)return 0;
223b71206888 Initial import
thib
parents:
diff changeset
685 create_png(f,w,h*3,c);
223b71206888 Initial import
thib
parents:
diff changeset
686 for (i=0;i<w*h;i++) {
223b71206888 Initial import
thib
parents:
diff changeset
687 printf("%08x,",*(int*)(c+i*4));
223b71206888 Initial import
thib
parents:
diff changeset
688 if ( (i&7)==7) printf("\n");
223b71206888 Initial import
thib
parents:
diff changeset
689 }
223b71206888 Initial import
thib
parents:
diff changeset
690 return 0;
223b71206888 Initial import
thib
parents:
diff changeset
691 }
223b71206888 Initial import
thib
parents:
diff changeset
692
223b71206888 Initial import
thib
parents:
diff changeset
693 #endif