annotate window/button.cc @ 21:d1bb7b365816

Fixed dynamic strings in selections (Fuko Pranks for instance)
author thib
date Fri, 31 Oct 2008 14:30:37 +0000
parents 4d7486cb20a9
children 15a18fbe6f21
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) {
223b71206888 Initial import
thib
parents:
diff changeset
351 case 0: data = buttonleft; size = buttonleft_cnt; width = 164; height = 110; break;
223b71206888 Initial import
thib
parents:
diff changeset
352 case 1: data = buttonright; size = buttonright_cnt; width = 164; height = 110; break;
223b71206888 Initial import
thib
parents:
diff changeset
353 case 2: data = buttonup; size = buttonup_cnt; width = 110; height = 164; break;
223b71206888 Initial import
thib
parents:
diff changeset
354 case 3: data = buttondown; size = buttondown_cnt; width = 110; height = 164; break;
223b71206888 Initial import
thib
parents:
diff changeset
355 default: return 0;
223b71206888 Initial import
thib
parents:
diff changeset
356 }
223b71206888 Initial import
thib
parents:
diff changeset
357
223b71206888 Initial import
thib
parents:
diff changeset
358 char* out = new char[width*height];
223b71206888 Initial import
thib
parents:
diff changeset
359 int outc = 0;
223b71206888 Initial import
thib
parents:
diff changeset
360 int i;
223b71206888 Initial import
thib
parents:
diff changeset
361 // ランレングスの展開
223b71206888 Initial import
thib
parents:
diff changeset
362 for (i=0; i<size; i++) {
223b71206888 Initial import
thib
parents:
diff changeset
363 int c = *(unsigned char*)(data+i);
223b71206888 Initial import
thib
parents:
diff changeset
364 int s = 0;
223b71206888 Initial import
thib
parents:
diff changeset
365 if (c == 0xff) break;
223b71206888 Initial import
thib
parents:
diff changeset
366 if (c&0x08) {
223b71206888 Initial import
thib
parents:
diff changeset
367 s = c>>4;
223b71206888 Initial import
thib
parents:
diff changeset
368 c &= 7;
223b71206888 Initial import
thib
parents:
diff changeset
369 } else {
223b71206888 Initial import
thib
parents:
diff changeset
370 i++;
223b71206888 Initial import
thib
parents:
diff changeset
371 s = *(unsigned char*)(data + i);
223b71206888 Initial import
thib
parents:
diff changeset
372 }
223b71206888 Initial import
thib
parents:
diff changeset
373 int j; for (j=0; j<s; j++) out[outc++] = c;
223b71206888 Initial import
thib
parents:
diff changeset
374 }
223b71206888 Initial import
thib
parents:
diff changeset
375 return out;
223b71206888 Initial import
thib
parents:
diff changeset
376 }
223b71206888 Initial import
thib
parents:
diff changeset
377
223b71206888 Initial import
thib
parents:
diff changeset
378 // R,G,B の指定色を基底色に、明るさを変えた色を RGB -> HLS -> RGB 変換で作成する
223b71206888 Initial import
thib
parents:
diff changeset
379 struct ButtonColor {
223b71206888 Initial import
thib
parents:
diff changeset
380 int rs[8];
223b71206888 Initial import
thib
parents:
diff changeset
381 int gs[8];
223b71206888 Initial import
thib
parents:
diff changeset
382 int bs[8];
223b71206888 Initial import
thib
parents:
diff changeset
383 int as[8];
223b71206888 Initial import
thib
parents:
diff changeset
384 int* c_min, *c_mid, *c_max; // rgb->hls->rgb変換用。r,g,b を高い順にmax,mid,minに割り当てる
223b71206888 Initial import
thib
parents:
diff changeset
385 bool is_gray;
223b71206888 Initial import
thib
parents:
diff changeset
386 int hc, hd, l, s; // h,l,s 系。h 要素は上の c_min|mid|maxにも入る
223b71206888 Initial import
thib
parents:
diff changeset
387 ButtonColor(int _r, int _g, int _b);
223b71206888 Initial import
thib
parents:
diff changeset
388 void SetBrightness1(int n, int c1);
223b71206888 Initial import
thib
parents:
diff changeset
389 void SetBrightness(int c1, int c2, int c3, int c4, int c5);
223b71206888 Initial import
thib
parents:
diff changeset
390 };
223b71206888 Initial import
thib
parents:
diff changeset
391 ButtonColor::ButtonColor(int r, int g, int b) {
223b71206888 Initial import
thib
parents:
diff changeset
392 is_gray = false;
223b71206888 Initial import
thib
parents:
diff changeset
393 if (r == g && r == b) {
223b71206888 Initial import
thib
parents:
diff changeset
394 is_gray = true;
223b71206888 Initial import
thib
parents:
diff changeset
395 l = r;
223b71206888 Initial import
thib
parents:
diff changeset
396 return;
223b71206888 Initial import
thib
parents:
diff changeset
397 }
223b71206888 Initial import
thib
parents:
diff changeset
398 *rs = r; *bs = b; *gs = g;
223b71206888 Initial import
thib
parents:
diff changeset
399
223b71206888 Initial import
thib
parents:
diff changeset
400 // r,g,b の昇順にmax,mid,minをrs,gs,bsに割り当てる
223b71206888 Initial import
thib
parents:
diff changeset
401 if (r > g) {
223b71206888 Initial import
thib
parents:
diff changeset
402 if (r > b) { // r = max
223b71206888 Initial import
thib
parents:
diff changeset
403 c_max = rs;
223b71206888 Initial import
thib
parents:
diff changeset
404 if (b > g) { // r>b>g
223b71206888 Initial import
thib
parents:
diff changeset
405 c_mid = bs;
223b71206888 Initial import
thib
parents:
diff changeset
406 c_min = gs;
223b71206888 Initial import
thib
parents:
diff changeset
407 } else { // r>g>b
223b71206888 Initial import
thib
parents:
diff changeset
408 c_mid = gs;
223b71206888 Initial import
thib
parents:
diff changeset
409 c_min = bs;
223b71206888 Initial import
thib
parents:
diff changeset
410 }
223b71206888 Initial import
thib
parents:
diff changeset
411 } else { // b>r>g
223b71206888 Initial import
thib
parents:
diff changeset
412 c_max = bs;
223b71206888 Initial import
thib
parents:
diff changeset
413 c_mid = rs;
223b71206888 Initial import
thib
parents:
diff changeset
414 c_min = gs;
223b71206888 Initial import
thib
parents:
diff changeset
415 }
223b71206888 Initial import
thib
parents:
diff changeset
416 } else if (g > b) { // g = max
223b71206888 Initial import
thib
parents:
diff changeset
417 c_max = gs;
223b71206888 Initial import
thib
parents:
diff changeset
418 if (r > b) { // g > r > b
223b71206888 Initial import
thib
parents:
diff changeset
419 c_mid = rs;
223b71206888 Initial import
thib
parents:
diff changeset
420 c_min = bs;
223b71206888 Initial import
thib
parents:
diff changeset
421 } else { // g > b > r
223b71206888 Initial import
thib
parents:
diff changeset
422 c_mid = bs;
223b71206888 Initial import
thib
parents:
diff changeset
423 c_min = rs;
223b71206888 Initial import
thib
parents:
diff changeset
424 }
223b71206888 Initial import
thib
parents:
diff changeset
425 } else { // b > g > r
223b71206888 Initial import
thib
parents:
diff changeset
426 c_max = bs;
223b71206888 Initial import
thib
parents:
diff changeset
427 c_mid = gs;
223b71206888 Initial import
thib
parents:
diff changeset
428 c_min = rs;
223b71206888 Initial import
thib
parents:
diff changeset
429 }
223b71206888 Initial import
thib
parents:
diff changeset
430 int min = *c_min;
223b71206888 Initial import
thib
parents:
diff changeset
431 int mid = *c_mid;
223b71206888 Initial import
thib
parents:
diff changeset
432 int max = *c_max;
223b71206888 Initial import
thib
parents:
diff changeset
433 l = (max+min)/2;
223b71206888 Initial import
thib
parents:
diff changeset
434 hd = max-min;
223b71206888 Initial import
thib
parents:
diff changeset
435 hc = mid - min;
223b71206888 Initial import
thib
parents:
diff changeset
436 if (l < 128) s = (hd*255)/(max+min);
223b71206888 Initial import
thib
parents:
diff changeset
437 else s = (hd*255) / (510-(max+min));
223b71206888 Initial import
thib
parents:
diff changeset
438 }
223b71206888 Initial import
thib
parents:
diff changeset
439 void ButtonColor::SetBrightness1(int n, int c1) {
223b71206888 Initial import
thib
parents:
diff changeset
440 if (n < 1 || n > 7) return;
223b71206888 Initial import
thib
parents:
diff changeset
441 as[n] = 255;
223b71206888 Initial import
thib
parents:
diff changeset
442 if (is_gray) {
223b71206888 Initial import
thib
parents:
diff changeset
443 rs[n] = c1 * l / 256;
223b71206888 Initial import
thib
parents:
diff changeset
444 gs[n] = c1 * l / 256;
223b71206888 Initial import
thib
parents:
diff changeset
445 bs[n] = c1 * l / 256;
223b71206888 Initial import
thib
parents:
diff changeset
446 return;
223b71206888 Initial import
thib
parents:
diff changeset
447 }
223b71206888 Initial import
thib
parents:
diff changeset
448 int m1, m2;
223b71206888 Initial import
thib
parents:
diff changeset
449
223b71206888 Initial import
thib
parents:
diff changeset
450 int light = (l * c1 * 2) / 256;
223b71206888 Initial import
thib
parents:
diff changeset
451 if (light > 255) light = 255;
223b71206888 Initial import
thib
parents:
diff changeset
452
223b71206888 Initial import
thib
parents:
diff changeset
453 if (light < 128) m2 = light*(255+s)/255;
223b71206888 Initial import
thib
parents:
diff changeset
454 else m2 = light+s-(light*s/255);
223b71206888 Initial import
thib
parents:
diff changeset
455 m1 = light*2 - m2;
223b71206888 Initial import
thib
parents:
diff changeset
456
223b71206888 Initial import
thib
parents:
diff changeset
457 c_max[n] = m2;
223b71206888 Initial import
thib
parents:
diff changeset
458 c_mid[n] = (hc*m2 + (hd-hc)*m1) / hd;
223b71206888 Initial import
thib
parents:
diff changeset
459 c_min[n] = m1;
223b71206888 Initial import
thib
parents:
diff changeset
460
223b71206888 Initial import
thib
parents:
diff changeset
461 return;
223b71206888 Initial import
thib
parents:
diff changeset
462 }
223b71206888 Initial import
thib
parents:
diff changeset
463 void ButtonColor::SetBrightness(int c1, int c2, int c3, int c4, int c5) {
223b71206888 Initial import
thib
parents:
diff changeset
464 rs[0] = bs[0] = gs[0] = as[0] = 0;
223b71206888 Initial import
thib
parents:
diff changeset
465 SetBrightness1(1, c1);
223b71206888 Initial import
thib
parents:
diff changeset
466 SetBrightness1(2, c2);
223b71206888 Initial import
thib
parents:
diff changeset
467 SetBrightness1(3, c3);
223b71206888 Initial import
thib
parents:
diff changeset
468 SetBrightness1(4, c4);
223b71206888 Initial import
thib
parents:
diff changeset
469 SetBrightness1(5, c5);
223b71206888 Initial import
thib
parents:
diff changeset
470 }
223b71206888 Initial import
thib
parents:
diff changeset
471
223b71206888 Initial import
thib
parents:
diff changeset
472 #include"rect.h"
1
b753afeb3f34 Does build under debian testing
thib
parents: 0
diff changeset
473 #include<stdlib.h>
0
223b71206888 Initial import
thib
parents:
diff changeset
474 #include<string.h>
223b71206888 Initial import
thib
parents:
diff changeset
475
223b71206888 Initial import
thib
parents:
diff changeset
476 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
477 const int* rs = color.rs;
223b71206888 Initial import
thib
parents:
diff changeset
478 const int* gs = color.gs;
223b71206888 Initial import
thib
parents:
diff changeset
479 const int* bs = color.bs;
223b71206888 Initial import
thib
parents:
diff changeset
480 const int* as = color.as;
223b71206888 Initial import
thib
parents:
diff changeset
481
223b71206888 Initial import
thib
parents:
diff changeset
482 struct ScaleData {int r,g,b,a,c;};
223b71206888 Initial import
thib
parents:
diff changeset
483 ScaleData* data = new ScaleData[width*height];
223b71206888 Initial import
thib
parents:
diff changeset
484 memset(data, 0, sizeof(ScaleData)*width*height);
223b71206888 Initial import
thib
parents:
diff changeset
485
223b71206888 Initial import
thib
parents:
diff changeset
486 int bx,by;
223b71206888 Initial import
thib
parents:
diff changeset
487 int x=0, y=0;
223b71206888 Initial import
thib
parents:
diff changeset
488 int x2 = 0, y2 = 0;
223b71206888 Initial import
thib
parents:
diff changeset
489 int xadd = width*65536/bwidth;
223b71206888 Initial import
thib
parents:
diff changeset
490 int yadd = height*65536/bheight;
223b71206888 Initial import
thib
parents:
diff changeset
491
223b71206888 Initial import
thib
parents:
diff changeset
492 // 元のビットマップに着色しながら縮小する
223b71206888 Initial import
thib
parents:
diff changeset
493 for (by=0; by<bheight; by++) {
223b71206888 Initial import
thib
parents:
diff changeset
494 ScaleData* d = data + y*width;
223b71206888 Initial import
thib
parents:
diff changeset
495 char* s = bdata + by*bwidth;
223b71206888 Initial import
thib
parents:
diff changeset
496 x = 0; x2 = 0;
223b71206888 Initial import
thib
parents:
diff changeset
497 for (bx=0; bx<bwidth; bx++) {
223b71206888 Initial import
thib
parents:
diff changeset
498 int c = *s++;
223b71206888 Initial import
thib
parents:
diff changeset
499 d[x].r += rs[c];
223b71206888 Initial import
thib
parents:
diff changeset
500 d[x].g += gs[c];
223b71206888 Initial import
thib
parents:
diff changeset
501 d[x].b += bs[c];
223b71206888 Initial import
thib
parents:
diff changeset
502 d[x].a += as[c];
223b71206888 Initial import
thib
parents:
diff changeset
503 d[x].c++;
223b71206888 Initial import
thib
parents:
diff changeset
504 x2 += xadd;
223b71206888 Initial import
thib
parents:
diff changeset
505 x += x2>>16;
223b71206888 Initial import
thib
parents:
diff changeset
506 x2 &= 0xffff;
223b71206888 Initial import
thib
parents:
diff changeset
507 }
223b71206888 Initial import
thib
parents:
diff changeset
508
223b71206888 Initial import
thib
parents:
diff changeset
509 y2 += yadd;
223b71206888 Initial import
thib
parents:
diff changeset
510 y += y2>>16;
223b71206888 Initial import
thib
parents:
diff changeset
511 y2 &= 0xffff;
223b71206888 Initial import
thib
parents:
diff changeset
512 }
223b71206888 Initial import
thib
parents:
diff changeset
513
223b71206888 Initial import
thib
parents:
diff changeset
514 for (y=0; y<height; y++) {
223b71206888 Initial import
thib
parents:
diff changeset
515 ScaleData* d = data + y*width;
223b71206888 Initial import
thib
parents:
diff changeset
516 char* rd = rdata + y*width*4;
223b71206888 Initial import
thib
parents:
diff changeset
517 for (x=0; x<width; x++) {
223b71206888 Initial import
thib
parents:
diff changeset
518 if (d->c == 0) *(int*)rd = 0;
223b71206888 Initial import
thib
parents:
diff changeset
519 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
520 rd += 4;
223b71206888 Initial import
thib
parents:
diff changeset
521 d++;
223b71206888 Initial import
thib
parents:
diff changeset
522 }
223b71206888 Initial import
thib
parents:
diff changeset
523 }
223b71206888 Initial import
thib
parents:
diff changeset
524 delete[] data;
223b71206888 Initial import
thib
parents:
diff changeset
525 return;
223b71206888 Initial import
thib
parents:
diff changeset
526 }
223b71206888 Initial import
thib
parents:
diff changeset
527 char* create_button(int number, int& width, int& height, int r, int g, int b) {
223b71206888 Initial import
thib
parents:
diff changeset
528 int bwidth, bheight;
223b71206888 Initial import
thib
parents:
diff changeset
529 char* bdata = extract_button(number, bwidth, bheight);
223b71206888 Initial import
thib
parents:
diff changeset
530 if (bdata == 0) return 0;
223b71206888 Initial import
thib
parents:
diff changeset
531 // 拡大率に合わせてwidth,heightをセット
223b71206888 Initial import
thib
parents:
diff changeset
532 if (width == -1 && height == -1) width = bwidth, height = bheight;
223b71206888 Initial import
thib
parents:
diff changeset
533 else if (width == -1) width = bwidth * height / bheight;
223b71206888 Initial import
thib
parents:
diff changeset
534 else if (height == -1) height = bheight * width / bwidth;
223b71206888 Initial import
thib
parents:
diff changeset
535 if (width > bwidth) width = bwidth;
223b71206888 Initial import
thib
parents:
diff changeset
536 if (height > bheight) height = bheight;
223b71206888 Initial import
thib
parents:
diff changeset
537
223b71206888 Initial import
thib
parents:
diff changeset
538 // 色を設定する
223b71206888 Initial import
thib
parents:
diff changeset
539 ButtonColor color(r,g,b);
223b71206888 Initial import
thib
parents:
diff changeset
540 // 描画
223b71206888 Initial import
thib
parents:
diff changeset
541 char* rdata = (char*)malloc(width*height*4*3);
223b71206888 Initial import
thib
parents:
diff changeset
542 color.SetBrightness(0x60, 0xa0, 0xc0, 0xe0, 0xe0);
223b71206888 Initial import
thib
parents:
diff changeset
543 draw_button(rdata, width, height, bdata, bwidth, bheight, color);
223b71206888 Initial import
thib
parents:
diff changeset
544 color.SetBrightness(0x60, 0xa0, 0xe0, 0xe0, 0xe0);
223b71206888 Initial import
thib
parents:
diff changeset
545 draw_button(rdata+width*height*4, width, height, bdata, bwidth, bheight, color);
223b71206888 Initial import
thib
parents:
diff changeset
546 color.SetBrightness(0xe0, 0xc0, 0xa0, 0x60, 0xa0);
223b71206888 Initial import
thib
parents:
diff changeset
547 draw_button(rdata+width*height*8, width, height, bdata, bwidth, bheight, color);
223b71206888 Initial import
thib
parents:
diff changeset
548 return rdata;
223b71206888 Initial import
thib
parents:
diff changeset
549 }
223b71206888 Initial import
thib
parents:
diff changeset
550
223b71206888 Initial import
thib
parents:
diff changeset
551 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
552 buf += region.ty*width*4 + region.lx*4;
223b71206888 Initial import
thib
parents:
diff changeset
553 int i,j;
223b71206888 Initial import
thib
parents:
diff changeset
554 int h = region.height();
223b71206888 Initial import
thib
parents:
diff changeset
555 int w = region.width();
223b71206888 Initial import
thib
parents:
diff changeset
556 int col = (b&0xff) | ((g&0xff)<<8)| ((r&0xff)<<16)| ((a&0xff)<<24);
223b71206888 Initial import
thib
parents:
diff changeset
557 for (i=0; i<h; i++) {
223b71206888 Initial import
thib
parents:
diff changeset
558 char* c = buf;
223b71206888 Initial import
thib
parents:
diff changeset
559 for (j=0; j<w; j++) {
223b71206888 Initial import
thib
parents:
diff changeset
560 *(int*)c = col;
223b71206888 Initial import
thib
parents:
diff changeset
561 c += 4;
223b71206888 Initial import
thib
parents:
diff changeset
562 }
223b71206888 Initial import
thib
parents:
diff changeset
563 buf += width*4;
223b71206888 Initial import
thib
parents:
diff changeset
564 }
223b71206888 Initial import
thib
parents:
diff changeset
565 return;
223b71206888 Initial import
thib
parents:
diff changeset
566 }
223b71206888 Initial import
thib
parents:
diff changeset
567 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
568 const int* rs = color.rs;
223b71206888 Initial import
thib
parents:
diff changeset
569 const int* gs = color.gs;
223b71206888 Initial import
thib
parents:
diff changeset
570 const int* bs = color.bs;
223b71206888 Initial import
thib
parents:
diff changeset
571 const int* as = color.as;
223b71206888 Initial import
thib
parents:
diff changeset
572 // まず、豆腐を書く
223b71206888 Initial import
thib
parents:
diff changeset
573 drawbox(buf, Rect(0,0,width,height), width, rs[3],gs[3],bs[3],as[3]);
223b71206888 Initial import
thib
parents:
diff changeset
574 // 影
223b71206888 Initial import
thib
parents:
diff changeset
575 if (height > 2) {
223b71206888 Initial import
thib
parents:
diff changeset
576 drawbox(buf, Rect(0,0,width,kage_w1), width, rs[4], gs[4], bs[4],as[4]);
223b71206888 Initial import
thib
parents:
diff changeset
577 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
578 }
223b71206888 Initial import
thib
parents:
diff changeset
579 if (width > 2) {
223b71206888 Initial import
thib
parents:
diff changeset
580 drawbox(buf, Rect(0,0,kage_w1, height), width, rs[4], gs[4], bs[4],as[4]);
223b71206888 Initial import
thib
parents:
diff changeset
581 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
582 }
223b71206888 Initial import
thib
parents:
diff changeset
583 if (height > 4) {
223b71206888 Initial import
thib
parents:
diff changeset
584 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
585 }
223b71206888 Initial import
thib
parents:
diff changeset
586 if (width > 4) {
223b71206888 Initial import
thib
parents:
diff changeset
587 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
588 }
223b71206888 Initial import
thib
parents:
diff changeset
589 }
223b71206888 Initial import
thib
parents:
diff changeset
590 char* create_box(int& width, int& height, int r, int g, int b) {
223b71206888 Initial import
thib
parents:
diff changeset
591 ButtonColor color(r,g,b);
223b71206888 Initial import
thib
parents:
diff changeset
592 // scale のカーソル
223b71206888 Initial import
thib
parents:
diff changeset
593 if (width == -1 && height == -1) width = 32, height = 48;
223b71206888 Initial import
thib
parents:
diff changeset
594 else if (width == -1) width = height*3/2;
223b71206888 Initial import
thib
parents:
diff changeset
595 else if (height == -1) height = width * 3/2;
223b71206888 Initial import
thib
parents:
diff changeset
596 int kage_w1 = (width<height ? width : height)/14;
223b71206888 Initial import
thib
parents:
diff changeset
597 int kage_w2 = (width<height ? width : height)*2/14;
223b71206888 Initial import
thib
parents:
diff changeset
598 if (kage_w1 <= 0) kage_w1 = 1;
223b71206888 Initial import
thib
parents:
diff changeset
599 if (kage_w2 <= 1) kage_w2 = 2;
223b71206888 Initial import
thib
parents:
diff changeset
600
223b71206888 Initial import
thib
parents:
diff changeset
601 char* buf = (char*)malloc(width*height*4*3);
223b71206888 Initial import
thib
parents:
diff changeset
602 // 描画
223b71206888 Initial import
thib
parents:
diff changeset
603 color.SetBrightness(0x60, 0xa0, 0xc0, 0xe0, 0xe0);
223b71206888 Initial import
thib
parents:
diff changeset
604 draw_box(buf, width, height, kage_w1, kage_w2, color);
223b71206888 Initial import
thib
parents:
diff changeset
605 color.SetBrightness(0x60, 0xa0, 0xe0, 0xe0, 0xe0);
223b71206888 Initial import
thib
parents:
diff changeset
606 draw_box(buf+width*height*4, width, height, kage_w1, kage_w2, color);
223b71206888 Initial import
thib
parents:
diff changeset
607 color.SetBrightness(0xe0, 0xc0, 0xa0, 0x60, 0xa0);
223b71206888 Initial import
thib
parents:
diff changeset
608 draw_box(buf+width*height*8, width, height, kage_w1, kage_w2, color);
223b71206888 Initial import
thib
parents:
diff changeset
609 return buf;
223b71206888 Initial import
thib
parents:
diff changeset
610 }
223b71206888 Initial import
thib
parents:
diff changeset
611
223b71206888 Initial import
thib
parents:
diff changeset
612 #if 0
223b71206888 Initial import
thib
parents:
diff changeset
613 #include<stdio.h>
223b71206888 Initial import
thib
parents:
diff changeset
614 #include <png.h>
223b71206888 Initial import
thib
parents:
diff changeset
615
223b71206888 Initial import
thib
parents:
diff changeset
616 void create_png(FILE* stream,int width, int height, char* data) {
223b71206888 Initial import
thib
parents:
diff changeset
617 png_structp png_ptr;
223b71206888 Initial import
thib
parents:
diff changeset
618 png_infop info_ptr;
223b71206888 Initial import
thib
parents:
diff changeset
619
223b71206888 Initial import
thib
parents:
diff changeset
620 /* create struct */
223b71206888 Initial import
thib
parents:
diff changeset
621 png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
223b71206888 Initial import
thib
parents:
diff changeset
622 if (png_ptr == NULL) return;
223b71206888 Initial import
thib
parents:
diff changeset
623
223b71206888 Initial import
thib
parents:
diff changeset
624 /* initialize information */
223b71206888 Initial import
thib
parents:
diff changeset
625 info_ptr = png_create_info_struct(png_ptr);
223b71206888 Initial import
thib
parents:
diff changeset
626 if (info_ptr == NULL) {
223b71206888 Initial import
thib
parents:
diff changeset
627 png_destroy_write_struct(&png_ptr, (png_infop*)NULL);
223b71206888 Initial import
thib
parents:
diff changeset
628 return;
223b71206888 Initial import
thib
parents:
diff changeset
629 }
223b71206888 Initial import
thib
parents:
diff changeset
630
223b71206888 Initial import
thib
parents:
diff changeset
631 if (setjmp(png_jmpbuf(png_ptr))) {
223b71206888 Initial import
thib
parents:
diff changeset
632 /* error occured !! */
223b71206888 Initial import
thib
parents:
diff changeset
633 png_destroy_write_struct(&png_ptr,&info_ptr);
223b71206888 Initial import
thib
parents:
diff changeset
634 return;
223b71206888 Initial import
thib
parents:
diff changeset
635 }
223b71206888 Initial import
thib
parents:
diff changeset
636
223b71206888 Initial import
thib
parents:
diff changeset
637 /* initialize I/O (for stream) */
223b71206888 Initial import
thib
parents:
diff changeset
638 png_init_io(png_ptr, stream);
223b71206888 Initial import
thib
parents:
diff changeset
639
223b71206888 Initial import
thib
parents:
diff changeset
640 /* initialize headers */
223b71206888 Initial import
thib
parents:
diff changeset
641 png_set_IHDR(png_ptr, info_ptr,
223b71206888 Initial import
thib
parents:
diff changeset
642 width, height, 8 /* bit_dept */,
223b71206888 Initial import
thib
parents:
diff changeset
643 PNG_COLOR_TYPE_RGB_ALPHA,
223b71206888 Initial import
thib
parents:
diff changeset
644 PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
223b71206888 Initial import
thib
parents:
diff changeset
645 /* create text information */
223b71206888 Initial import
thib
parents:
diff changeset
646 png_text info_text[3];
223b71206888 Initial import
thib
parents:
diff changeset
647 info_text[0].key = "Title";
223b71206888 Initial import
thib
parents:
diff changeset
648 info_text[0].text= "file";
223b71206888 Initial import
thib
parents:
diff changeset
649 info_text[0].compression = PNG_TEXT_COMPRESSION_NONE;
223b71206888 Initial import
thib
parents:
diff changeset
650 info_text[1].key = "Author";
223b71206888 Initial import
thib
parents:
diff changeset
651 info_text[1].text="";
223b71206888 Initial import
thib
parents:
diff changeset
652 info_text[1].compression = PNG_TEXT_COMPRESSION_NONE;
223b71206888 Initial import
thib
parents:
diff changeset
653 info_text[2].key = "Description";
223b71206888 Initial import
thib
parents:
diff changeset
654 info_text[2].text= "";
223b71206888 Initial import
thib
parents:
diff changeset
655 info_text[2].compression = PNG_TEXT_COMPRESSION_NONE;
223b71206888 Initial import
thib
parents:
diff changeset
656 png_set_text(png_ptr, info_ptr, info_text, 3);
223b71206888 Initial import
thib
parents:
diff changeset
657
223b71206888 Initial import
thib
parents:
diff changeset
658 /* write information */
223b71206888 Initial import
thib
parents:
diff changeset
659 png_write_info(png_ptr, info_ptr);
223b71206888 Initial import
thib
parents:
diff changeset
660
223b71206888 Initial import
thib
parents:
diff changeset
661 /* write body */
223b71206888 Initial import
thib
parents:
diff changeset
662 /* rgba image ; input/output is 32bpp.*/
223b71206888 Initial import
thib
parents:
diff changeset
663 char* row = new char[width*4];
223b71206888 Initial import
thib
parents:
diff changeset
664 int i; for (i=0; i<height; i++) {
223b71206888 Initial import
thib
parents:
diff changeset
665 char* row_ptr = row;
223b71206888 Initial import
thib
parents:
diff changeset
666 int j; for (j=0; j<width; j++) {
223b71206888 Initial import
thib
parents:
diff changeset
667 row_ptr[0] = data[2];
223b71206888 Initial import
thib
parents:
diff changeset
668 row_ptr[1] = data[1];
223b71206888 Initial import
thib
parents:
diff changeset
669 row_ptr[2] = data[0];
223b71206888 Initial import
thib
parents:
diff changeset
670 row_ptr[3] = data[3];
223b71206888 Initial import
thib
parents:
diff changeset
671 row_ptr += 4; data += 4;
223b71206888 Initial import
thib
parents:
diff changeset
672 }
223b71206888 Initial import
thib
parents:
diff changeset
673 png_write_rows(png_ptr, (png_byte**)&row, 1);
223b71206888 Initial import
thib
parents:
diff changeset
674 }
223b71206888 Initial import
thib
parents:
diff changeset
675 png_write_end(png_ptr, info_ptr);
223b71206888 Initial import
thib
parents:
diff changeset
676 png_destroy_write_struct(&png_ptr, &info_ptr);
223b71206888 Initial import
thib
parents:
diff changeset
677 return;
223b71206888 Initial import
thib
parents:
diff changeset
678 }
223b71206888 Initial import
thib
parents:
diff changeset
679 int main(void) {
223b71206888 Initial import
thib
parents:
diff changeset
680 int w=128,h=-1;
223b71206888 Initial import
thib
parents:
diff changeset
681 char* c = create_button(2, w,h,0x20,0x60,0xc0);
223b71206888 Initial import
thib
parents:
diff changeset
682 // char* c = create_box(w,h,0xff,0xff,0xff);
223b71206888 Initial import
thib
parents:
diff changeset
683 int i;
223b71206888 Initial import
thib
parents:
diff changeset
684 FILE* f=fopen("bt.png","wb");
223b71206888 Initial import
thib
parents:
diff changeset
685 if(f==0)return 0;
223b71206888 Initial import
thib
parents:
diff changeset
686 create_png(f,w,h*3,c);
223b71206888 Initial import
thib
parents:
diff changeset
687 for (i=0;i<w*h;i++) {
223b71206888 Initial import
thib
parents:
diff changeset
688 printf("%08x,",*(int*)(c+i*4));
223b71206888 Initial import
thib
parents:
diff changeset
689 if ( (i&7)==7) printf("\n");
223b71206888 Initial import
thib
parents:
diff changeset
690 }
223b71206888 Initial import
thib
parents:
diff changeset
691 return 0;
223b71206888 Initial import
thib
parents:
diff changeset
692 }
223b71206888 Initial import
thib
parents:
diff changeset
693
223b71206888 Initial import
thib
parents:
diff changeset
694 #endif