summaryrefslogtreecommitdiffstats
path: root/src/table/linedraw.h
blob: c7a3e2180ba7dc7243053485e88e2e29788c2187 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
static uint32_t linedraw_command[] = {
 0x00000aaa, 0x0000aa8a, // 2500
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000a989, 0x0000aa8a, 0x0000ab8b, // 2501
 0x0000a0aa, 0x0000aaa8, // 2502
 0x0000909a, 0x0000a0aa, 0x0000b0ba, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 2503
 0x01000a1a, 0x01003a5a, 0x01007a8a, // 2504
 0x0100091b, 0x0100395b, 0x0100798b, // 2505
 0x0100a0a1, 0x0100a3a5, 0x0100a7a8, // 2506
 0x010090b1, 0x010093b5, 0x010097b8, // 2507
 0x01000a1a, 0x01002a3a, 0x01004a5a, 0x01006a7a, // 2508
 0x0100091b, 0x0100293b, 0x0100495b, 0x0100697b, // 2509
 0x0100a0a1, 0x0100a2a3, 0x0100a4a5, 0x0100a6a7, // 250a
 0x010090b1, 0x010092b3, 0x010094b5, 0x010096b7, // 250b
 0x0000aa8a, 0x0000aaa8, // 250c
 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000aaa8, // 250d
 0x0000aa8a, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 250e
 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 250f
 0x00000aaa, 0x0000aaa8, // 2510
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000aaa8, // 2511
 0x00000aaa, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 2512
 0x000009a9, 0x00000aaa, 0x00000bab, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 2513
 0x0000aa8a, 0x0000a0aa, // 2514
 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000a0aa, // 2515
 0x0000aa8a, 0x0000909a, 0x0000a0aa, 0x0000b0ba, // 2516
 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000909a, 0x0000a0aa, 0x0000b0ba, // 2517
 0x00000aaa, 0x0000a0aa, // 2518
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000a0aa, // 2519
 0x00000aaa, 0x0000909a, 0x0000a0aa, 0x0000b0ba, // 251a
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000909a, 0x0000a0aa, 0x0000b0ba, // 251b
 0x0000aa8a, 0x0000a0aa, 0x0000aaa8, // 251c
 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000a0aa, 0x0000aaa8, // 251d
 0x0000aa8a, 0x0000909a, 0x0000a0aa, 0x0000b0ba, 0x0000aaa8, // 251e
 0x0000aa8a, 0x0000a0aa, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 251f
 0x0000aa8a, 0x0000909a, 0x0000a0aa, 0x0000b0ba, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 2520
 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000909a, 0x0000a0aa, 0x0000b0ba, 0x0000aaa8, // 2521
 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000a0aa, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 2522
 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000909a, 0x0000a0aa, 0x0000b0ba, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 2523
 0x00000aaa, 0x0000a0aa, 0x0000aaa8, // 2524
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000a0aa, 0x0000aaa8, // 2525
 0x00000aaa, 0x0000909a, 0x0000a0aa, 0x0000b0ba, 0x0000aaa8, // 2526
 0x00000aaa, 0x0000a0aa, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 2527
 0x00000aaa, 0x0000909a, 0x0000a0aa, 0x0000b0ba, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 2528
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000909a, 0x0000a0aa, 0x0000b0ba, 0x0000aaa8, // 2529
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000a0aa, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 252a
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000909a, 0x0000a0aa, 0x0000b0ba, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 252b
 0x00000aaa, 0x0000aa8a, 0x0000aaa8, // 252c
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000aa8a, 0x0000aaa8, // 252d
 0x00000aaa, 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000aaa8, // 252e
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000aaa8, // 252f
 0x00000aaa, 0x0000aa8a, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 2530
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000aa8a, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 2531
 0x00000aaa, 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 2532
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 2533
 0x00000aaa, 0x0000aa8a, 0x0000a0aa, // 2534
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000aa8a, 0x0000a0aa, // 2535
 0x00000aaa, 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000a0aa, // 2536
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000a0aa, // 2537
 0x00000aaa, 0x0000aa8a, 0x0000909a, 0x0000a0aa, 0x0000b0ba, // 2538
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000aa8a, 0x0000909a, 0x0000a0aa, 0x0000b0ba, // 2539
 0x00000aaa, 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000909a, 0x0000a0aa, 0x0000b0ba, // 253a
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000909a, 0x0000a0aa, 0x0000b0ba, // 253b
 0x00000aaa, 0x0000aa8a, 0x0000a0aa, 0x0000aaa8, // 253c
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000aa8a, 0x0000a0aa, 0x0000aaa8, // 253d
 0x00000aaa, 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000a0aa, 0x0000aaa8, // 253e
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000a0aa, 0x0000aaa8, // 253f
 0x00000aaa, 0x0000aa8a, 0x0000909a, 0x0000a0aa, 0x0000b0ba, 0x0000aaa8, // 2540
 0x00000aaa, 0x0000aa8a, 0x0000a0aa, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 2541
 0x00000aaa, 0x0000aa8a, 0x0000909a, 0x0000a0aa, 0x0000b0ba, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 2542
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000aa8a, 0x0000909a, 0x0000a0aa, 0x0000b0ba, 0x0000aaa8, // 2543
 0x00000aaa, 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000909a, 0x0000a0aa, 0x0000b0ba, 0x0000aaa8, // 2544
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000aa8a, 0x0000a0aa, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 2545
 0x00000aaa, 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000a0aa, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 2546
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000909a, 0x0000a0aa, 0x0000b0ba, 0x0000aaa8, // 2547
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000a0aa, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 2548
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000aa8a, 0x0000909a, 0x0000a0aa, 0x0000b0ba, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 2549
 0x00000aaa, 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000909a, 0x0000a0aa, 0x0000b0ba, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 254a
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000a989, 0x0000aa8a, 0x0000ab8b, 0x0000909a, 0x0000a0aa, 0x0000b0ba, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 254b
 0x01000a3a, 0x01005a8a, // 254c
 0x0100093b, 0x0100598b, // 254d
 0x0100a0a3, 0x0100a5a8, // 254e
 0x010090b3, 0x010095b8, // 254f
 0x000009a9, 0x00000bab, 0x0000a989, 0x0000ab8b, // 2550
 0x0000909a, 0x0000b0ba, 0x00009a98, 0x0000bab8, // 2551
 0x0000a989, 0x0000ab8b, 0x0000aaa8, // 2552
 0x0000aa8a, 0x00009a98, 0x0000bab8, // 2553
 0x0000a989, 0x0000ab8b, 0x00009a98, 0x0000bab8, // 2554
 0x000009a9, 0x00000bab, 0x0000aaa8, // 2555
 0x00000aaa, 0x00009a98, 0x0000bab8, // 2556
 0x000009a9, 0x00000bab, 0x00009a98, 0x0000bab8, // 2557
 0x0000a989, 0x0000ab8b, 0x0000a0aa, // 2558
 0x0000aa8a, 0x0000909a, 0x0000b0ba, // 2559
 0x0000a989, 0x0000ab8b, 0x0000909a, 0x0000b0ba, // 255a
 0x000009a9, 0x00000bab, 0x0000a0aa, // 255b
 0x00000aaa, 0x0000909a, 0x0000b0ba, // 255c
 0x000009a9, 0x00000bab, 0x0000909a, 0x0000b0ba, // 255d
 0x0000a989, 0x0000ab8b, 0x0000a0aa, 0x0000aaa8, // 255e
 0x0000aa8a, 0x0000909a, 0x0000b0ba, 0x00009a98, 0x0000bab8, // 255f
 0x0000a989, 0x0000ab8b, 0x0000909a, 0x0000b0ba, 0x00009a98, 0x0000bab8, // 2560
 0x000009a9, 0x00000bab, 0x0000a0aa, 0x0000aaa8, // 2561
 0x00000aaa, 0x0000909a, 0x0000b0ba, 0x00009a98, 0x0000bab8, // 2562
 0x000009a9, 0x00000bab, 0x0000909a, 0x0000b0ba, 0x00009a98, 0x0000bab8, // 2563
 0x000009a9, 0x00000bab, 0x0000a989, 0x0000ab8b, 0x0000aaa8, // 2564
 0x00000aaa, 0x0000aa8a, 0x00009a98, 0x0000bab8, // 2565
 0x000009a9, 0x00000bab, 0x0000a989, 0x0000ab8b, 0x00009a98, 0x0000bab8, // 2566
 0x000009a9, 0x00000bab, 0x0000a989, 0x0000ab8b, 0x0000a0aa, // 2567
 0x00000aaa, 0x0000aa8a, 0x0000909a, 0x0000b0ba, // 2568
 0x000009a9, 0x00000bab, 0x0000a989, 0x0000ab8b, 0x0000909a, 0x0000b0ba, // 2569
 0x000009a9, 0x00000bab, 0x0000a989, 0x0000ab8b, 0x0000a0aa, 0x0000aaa8, // 256a
 0x00000aaa, 0x0000aa8a, 0x0000909a, 0x0000b0ba, 0x00009a98, 0x0000bab8, // 256b
 0x000009a9, 0x00000bab, 0x0000a989, 0x0000ab8b, 0x0000909a, 0x0000b0ba, 0x00009a98, 0x0000bab8, // 256c
 0x02228800, // 256d
 0x02120800, // 256e
 0x02100000, // 256f
 0x02008000, // 2570
 0x00000880, // 2571
 0x00000088, // 2572
 0x00000880, 0x00000088, // 2573
 0x00000aaa, // 2574
 0x0000a0aa, // 2575
 0x0000aa8a, // 2576
 0x0000aaa8, // 2577
 0x000009a9, 0x00000aaa, 0x00000bab, // 2578
 0x0000909a, 0x0000a0aa, 0x0000b0ba, // 2579
 0x0000a989, 0x0000aa8a, 0x0000ab8b, // 257a
 0x00009a98, 0x0000aaa8, 0x0000bab8, // 257b
 0x00000aaa, 0x0000a989, 0x0000aa8a, 0x0000ab8b, // 257c
 0x0000a0aa, 0x00009a98, 0x0000aaa8, 0x0000bab8, // 257d
 0x000009a9, 0x00000aaa, 0x00000bab, 0x0000aa8a, // 257e
 0x0000909a, 0x0000a0aa, 0x0000b0ba, 0x0000aaa8, // 257f
 0x01000084, // 2580
 0x01000788, // 2581
 0x01000688, // 2582
 0x01000588, // 2583
 0x01000488, // 2584
 0x01000388, // 2585
 0x01000288, // 2586
 0x01000188, // 2587
 0x01000088, // 2588
 0x01000078, // 2589
 0x01000068, // 258a
 0x01000058, // 258b
 0x01000048, // 258c
 0x01000038, // 258d
 0x01000028, // 258e
 0x01000018, // 258f
 0x01004088, // 2590
 0x01300088, // 2591
 0x01200088, // 2592
 0x01100088, // 2593
 0x01000081, // 2594
 0x01007088, // 2595
 0x01000448, // 2596
 0x01004488, // 2597
 0x01000044, // 2598
 0x01000044, 0x01000448, 0x01004488, // 2599
 0x01000044, 0x01004488, // 259a
 0x01000044, 0x01004084, 0x01000448, // 259b
 0x01000044, 0x01004084, 0x01004488, // 259c
 0x01004084, // 259d
 0x01004084, 0x01000448, // 259e
 0x01004084, 0x01000448, 0x01004488, // 259f
};

static uint16_t linedraw_offs[] = {
 0x0002, 0x0026, 0x0082, 0x00a6, 0x0103,
 0x0133, 0x0163, 0x0193, 0x01c4, 0x0204,
 0x0244, 0x0284, 0x02c2, 0x02e4, 0x0324,
 0x0366, 0x03c2, 0x03e4, 0x0424, 0x0466,
 0x04c2, 0x04e4, 0x0524, 0x0566, 0x05c2,
 0x05e4, 0x0624, 0x0666, 0x06c3, 0x06f5,
 0x0745, 0x0795, 0x07e7, 0x0857, 0x08c7,
 0x0939, 0x09c3, 0x09f5, 0x0a45, 0x0a95,
 0x0ae7, 0x0b57, 0x0bc7, 0x0c39, 0x0cc3,
 0x0cf5, 0x0d45, 0x0d97, 0x0e05, 0x0e57,
 0x0ec7, 0x0f39, 0x0fc3, 0x0ff5, 0x1045,
 0x1097, 0x1105, 0x1157, 0x11c7, 0x1239,
 0x12c4, 0x1306, 0x1366, 0x13c8, 0x1446,
 0x14a6, 0x1508, 0x1588, 0x1608, 0x1688,
 0x1708, 0x178a, 0x182a, 0x18ca, 0x196a,
 0x1a0c, 0x1ac2, 0x1ae2, 0x1b02, 0x1b22,
 0x1b44, 0x1b84, 0x1bc3, 0x1bf3, 0x1c24,
 0x1c63, 0x1c93, 0x1cc4, 0x1d03, 0x1d33,
 0x1d64, 0x1da3, 0x1dd3, 0x1e04, 0x1e44,
 0x1e85, 0x1ed6, 0x1f34, 0x1f75, 0x1fc6,
 0x2025, 0x2074, 0x20b6, 0x2115, 0x2164,
 0x21a6, 0x2206, 0x2266, 0x22c8, 0x2341,
 0x2351, 0x2361, 0x2371, 0x2381, 0x2391,
 0x23a2, 0x23c1, 0x23d1, 0x23e1, 0x23f1,
 0x2403, 0x2433, 0x2463, 0x2493, 0x24c4,
 0x2504, 0x2544, 0x2584, 0x25c1, 0x25d1,
 0x25e1, 0x25f1, 0x2601, 0x2611, 0x2621,
 0x2631, 0x2641, 0x2651, 0x2661, 0x2671,
 0x2681, 0x2691, 0x26a1, 0x26b1, 0x26c1,
 0x26d1, 0x26e1, 0x26f1, 0x2701, 0x2711,
 0x2721, 0x2731, 0x2741, 0x2753, 0x2782,
 0x27a3, 0x27d3, 0x2801, 0x2812, 0x2833,
};