annotate window/button.cc @ 56:c7bcc0ec2267

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