-
Notifications
You must be signed in to change notification settings - Fork 0
/
font8x8.c
136 lines (134 loc) · 7.47 KB
/
font8x8.c
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
#include "font8x8.h"
static unsigned char font8x8[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 00
0x7E, 0x81, 0xA5, 0x81, 0xBD, 0x99, 0x81, 0x7E, // 01 white smiley
0x7E, 0xFF, 0xDB, 0xFF, 0xC3, 0xE7, 0xFF, 0x7E, // 02 black smiley
0x6C, 0xFE, 0xFE, 0xFE, 0x7C, 0x38, 0x10, 0x00, // 03 heart
0x10, 0x38, 0x7C, 0xFE, 0x7C, 0x38, 0x10, 0x00, // 04 diamond
0x38, 0x7C, 0x38, 0xFE, 0xFE, 0x7C, 0x38, 0x7C, // 05 club
0x10, 0x10, 0x38, 0x7C, 0xFE, 0x7C, 0x38, 0x7C, // 06 spade
0x00, 0x00, 0x18, 0x3C, 0x3C, 0x18, 0x00, 0x00,
0xFF, 0xFF, 0xE7, 0xC3, 0xC3, 0xE7, 0xFF, 0xFF,
0x00, 0x3C, 0x66, 0x42, 0x42, 0x66, 0x3C, 0x00,
0xFF, 0xC3, 0x99, 0xBD, 0xBD, 0x99, 0xC3, 0xFF,
0x0F, 0x07, 0x0F, 0x7D, 0xCC, 0xCC, 0xCC, 0x78,
0x3C, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x7E, 0x18,
0x3F, 0x33, 0x3F, 0x30, 0x30, 0x70, 0xF0, 0xE0,
0x7F, 0x63, 0x7F, 0x63, 0x63, 0x67, 0xE6, 0xC0,
0x99, 0x5A, 0x3C, 0xE7, 0xE7, 0x3C, 0x5A, 0x99,
0x80, 0xE0, 0xF8, 0xFE, 0xF8, 0xE0, 0x80, 0x00, // 10
0x02, 0x0E, 0x3E, 0xFE, 0x3E, 0x0E, 0x02, 0x00,
0x18, 0x3C, 0x7E, 0x18, 0x18, 0x7E, 0x3C, 0x18,
0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x00,
0x7F, 0xDB, 0xDB, 0x7B, 0x1B, 0x1B, 0x1B, 0x00,
0x3E, 0x63, 0x38, 0x6C, 0x6C, 0x38, 0xCC, 0x78,
0x00, 0x00, 0x00, 0x00, 0x7E, 0x7E, 0x7E, 0x00,
0x18, 0x3C, 0x7E, 0x18, 0x7E, 0x3C, 0x18, 0xFF,
0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x00,
0x18, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x00,
0x00, 0x18, 0x0C, 0xFE, 0x0C, 0x18, 0x00, 0x00,
0x00, 0x30, 0x60, 0xFE, 0x60, 0x30, 0x00, 0x00,
0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xFE, 0x00, 0x00,
0x00, 0x24, 0x66, 0xFF, 0x66, 0x24, 0x00, 0x00,
0x00, 0x18, 0x3C, 0x7E, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0xFF, 0xFF, 0x7E, 0x3C, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 20 space
0x30, 0x78, 0x78, 0x30, 0x30, 0x00, 0x30, 0x00, // 21 exclamation
0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, // 22 double quote
0x6C, 0x6C, 0xFE, 0x6C, 0xFE, 0x6C, 0x6C, 0x00, // 23 pound
0x30, 0x7C, 0xC0, 0x78, 0x0C, 0xF8, 0x30, 0x00, // 24 dollar
0x00, 0xC6, 0xCC, 0x18, 0x30, 0x66, 0xC6, 0x00, // 25 percent
0x38, 0x6C, 0x38, 0x76, 0xDC, 0xCC, 0x76, 0x00, // 26 ampersand
0x60, 0x60, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, // 27 single quote
0x18, 0x30, 0x60, 0x60, 0x60, 0x30, 0x18, 0x00, // 28 left paren
0x60, 0x30, 0x18, 0x18, 0x18, 0x30, 0x60, 0x00, // 29 right paren
0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66, 0x00, 0x00, // 2a star
0x00, 0x30, 0x30, 0xFC, 0x30, 0x30, 0x00, 0x00, // 2b plus
0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x60, // 2c comma
0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, // 2d minus
0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, // 2e period
0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0x80, 0x00, // 2f slash
0x7C, 0xC6, 0xCE, 0xDE, 0xF6, 0xE6, 0x7C, 0x00, // 30 0
0x30, 0x70, 0x30, 0x30, 0x30, 0x30, 0xFC, 0x00, // 31 1
0x78, 0xCC, 0x0C, 0x38, 0x60, 0xCC, 0xFC, 0x00, // 32 2
0x78, 0xCC, 0x0C, 0x38, 0x0C, 0xCC, 0x78, 0x00, // 33 3
0x1C, 0x3C, 0x6C, 0xCC, 0xFE, 0x0C, 0x1E, 0x00, // 34 4
0xFC, 0xC0, 0xF8, 0x0C, 0x0C, 0xCC, 0x78, 0x00, // 35 5
0x38, 0x60, 0xC0, 0xF8, 0xCC, 0xCC, 0x78, 0x00, // 36 6
0xFC, 0xCC, 0x0C, 0x18, 0x30, 0x30, 0x30, 0x00, // 37 7
0x78, 0xCC, 0xCC, 0x78, 0xCC, 0xCC, 0x78, 0x00, // 38 8
0x78, 0xCC, 0xCC, 0x7C, 0x0C, 0x18, 0x70, 0x00, // 39 9
0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, // 3a colon
0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x60, // 3b semicolon
0x18, 0x30, 0x60, 0xC0, 0x60, 0x30, 0x18, 0x00, // 3c less than
0x00, 0x00, 0xFC, 0x00, 0x00, 0xFC, 0x00, 0x00, // 3d equals
0x60, 0x30, 0x18, 0x0C, 0x18, 0x30, 0x60, 0x00, // 3e greater than
0x78, 0xCC, 0x0C, 0x18, 0x30, 0x00, 0x30, 0x00, // 3f question
0x7C, 0xC6, 0xDE, 0xDE, 0xDE, 0xC0, 0x78, 0x00, // 40 at
0x30, 0x78, 0xCC, 0xCC, 0xFC, 0xCC, 0xCC, 0x00, // 41 A
0xFC, 0x66, 0x66, 0x7C, 0x66, 0x66, 0xFC, 0x00, // 42 B
0x3C, 0x66, 0xC0, 0xC0, 0xC0, 0x66, 0x3C, 0x00, // 43 C
0xF8, 0x6C, 0x66, 0x66, 0x66, 0x6C, 0xF8, 0x00, // 44 D
0xFE, 0x62, 0x68, 0x78, 0x68, 0x62, 0xFE, 0x00, // 45 E
0xFE, 0x62, 0x68, 0x78, 0x68, 0x60, 0xF0, 0x00, // 46 F
0x3C, 0x66, 0xC0, 0xC0, 0xCE, 0x66, 0x3E, 0x00, // 47 G
0xCC, 0xCC, 0xCC, 0xFC, 0xCC, 0xCC, 0xCC, 0x00, // 48 H
0x78, 0x30, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, // 49 I
0x1E, 0x0C, 0x0C, 0x0C, 0xCC, 0xCC, 0x78, 0x00, // 4a J
0xE6, 0x66, 0x6C, 0x78, 0x6C, 0x66, 0xE6, 0x00, // 4b K
0xF0, 0x60, 0x60, 0x60, 0x62, 0x66, 0xFE, 0x00, // 4c L
0xC6, 0xEE, 0xFE, 0xFE, 0xD6, 0xC6, 0xC6, 0x00, // 4d M
0xC6, 0xE6, 0xF6, 0xDE, 0xCE, 0xC6, 0xC6, 0x00, // 4e N
0x38, 0x6C, 0xC6, 0xC6, 0xC6, 0x6C, 0x38, 0x00, // 4f O
0xFC, 0x66, 0x66, 0x7C, 0x60, 0x60, 0xF0, 0x00, // 50 P
0x78, 0xCC, 0xCC, 0xCC, 0xDC, 0x78, 0x1C, 0x00, // 51 Q
0xFC, 0x66, 0x66, 0x7C, 0x6C, 0x66, 0xE6, 0x00, // 52 R
0x78, 0xCC, 0xE0, 0x70, 0x1C, 0xCC, 0x78, 0x00, // 53 S
0xFC, 0xB4, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, // 54 T
0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xFC, 0x00, // 55 U
0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x78, 0x30, 0x00, // 56 V
0xC6, 0xC6, 0xC6, 0xD6, 0xFE, 0xEE, 0xC6, 0x00, // 57 W
0xC6, 0xC6, 0x6C, 0x38, 0x38, 0x6C, 0xC6, 0x00, // 58 X
0xCC, 0xCC, 0xCC, 0x78, 0x30, 0x30, 0x78, 0x00, // 59 Y
0xFE, 0xC6, 0x8C, 0x18, 0x32, 0x66, 0xFE, 0x00, // 5a Z
0x78, 0x60, 0x60, 0x60, 0x60, 0x60, 0x78, 0x00, // 5b left square bracket
0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x02, 0x00, // 5c backslash
0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78, 0x00, // 5d right square bracket
0x10, 0x38, 0x6C, 0xC6, 0x00, 0x00, 0x00, 0x00, // 5e tilde
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, // 5f underline
0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, // 60 single quote
0x00, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0x76, 0x00, // 61 a
0xE0, 0x60, 0x60, 0x7C, 0x66, 0x66, 0xDC, 0x00, // 64 b
0x00, 0x00, 0x78, 0xCC, 0xC0, 0xCC, 0x78, 0x00, // 63 c
0x1C, 0x0C, 0x0C, 0x7C, 0xCC, 0xCC, 0x76, 0x00, // 62 d
0x00, 0x00, 0x78, 0xCC, 0xFC, 0xC0, 0x78, 0x00, // 65 e
0x38, 0x6C, 0x60, 0xF0, 0x60, 0x60, 0xF0, 0x00, // 66 f
0x00, 0x00, 0x76, 0xCC, 0xCC, 0x7C, 0x0C, 0xF8, // 67 g
0xE0, 0x60, 0x6C, 0x76, 0x66, 0x66, 0xE6, 0x00, // 68 h
0x30, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, // 69 i
0x0C, 0x00, 0x0C, 0x0C, 0x0C, 0xCC, 0xCC, 0x78, // 6a j
0xE0, 0x60, 0x66, 0x6C, 0x78, 0x6C, 0xE6, 0x00, // 6b k
0x70, 0x30, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, // 6c l
0x00, 0x00, 0xCC, 0xFE, 0xFE, 0xD6, 0xC6, 0x00, // 6d m
0x00, 0x00, 0xF8, 0xCC, 0xCC, 0xCC, 0xCC, 0x00, // 6e n
0x00, 0x00, 0x78, 0xCC, 0xCC, 0xCC, 0x78, 0x00, // 6f o
0x00, 0x00, 0xDC, 0x66, 0x66, 0x7C, 0x60, 0xF0, // 70 p
0x00, 0x00, 0x76, 0xCC, 0xCC, 0x7C, 0x0C, 0x1E, // 71 q
0x00, 0x00, 0xDC, 0x76, 0x66, 0x60, 0xF0, 0x00, // 72 r
0x00, 0x00, 0x7C, 0xC0, 0x78, 0x0C, 0xF8, 0x00, // 73 s
0x10, 0x30, 0x7C, 0x30, 0x30, 0x34, 0x18, 0x00, // 74 t
0x00, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, // 75 u
0x00, 0x00, 0xCC, 0xCC, 0xCC, 0x78, 0x30, 0x00, // 76 v
0x00, 0x00, 0xC6, 0xD6, 0xFE, 0xFE, 0x6C, 0x00, // 77 w
0x00, 0x00, 0xC6, 0x6C, 0x38, 0x6C, 0xC6, 0x00, // 78 x
0x00, 0x00, 0xCC, 0xCC, 0xCC, 0x7C, 0x0C, 0xF8, // 79 y
0x00, 0x00, 0xFC, 0x98, 0x30, 0x64, 0xFC, 0x00, // 7a z
0x1C, 0x30, 0x30, 0xE0, 0x30, 0x30, 0x1C, 0x00, // 7b left curly bracket
0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00, // 7c or
0xE0, 0x30, 0x30, 0x1C, 0x30, 0x30, 0xE0, 0x00, // 7d right curly bracket
0x76, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 7e tilde
0x00, 0x10, 0x38, 0x6C, 0xC6, 0xC6, 0xFE, 0x00, // 7f pyramid
};
bool f8x8_getPixel(BYTE x, BYTE y, BYTE character){
return ((bool)(font8x8[character*8+y])&(0x01<<(8-x)));
}