bigputc.c
1.23 KB
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
#include "libfb.h"
/*---------------------------------------------------------------------
Display Big character on the screen
---------------------------------------------------------------------*/
void
fbBigPutc(u16 color, int curs_x, int curs_y, char c, int xsize, int ysize)
{
int i, j, k, l, x, y;
u16 *p;
x = curs_x*FB_CHAR_WD;
p = (u16 *)osViGetNextFramebuffer();
if ( ysize ) {
y = curs_y*FB_CHAR_HT;
for (j = 0; j < FB_CHAR_HT; j ++) {
for (i = 0; i < 8; i ++) {
if (fb_font[c-0x20][j] & (1 << (8-i))) {
for (k = 0; k < xsize; k ++){
for (l = 0; l < ysize; l ++){
p[x + FB_SCREEN_WD*(y-8+l) + k] = color;
}
}
} else {
#if 0
for (k = 0; k < xsize; k ++){
for (l = 0; l < ysize; l ++){
p[x + SCREEN_WD*(y-8+l) + k] = BGCOLOR;
}
}
#endif
}
x += xsize;
}
x = curs_x*FB_CHAR_WD;
y += ysize;
}
} else {
y = curs_y*FB_CHAR_HT/2;
for (j = 0; j < FB_CHAR_HT; j += 2) {
for (i = FB_CHAR_WD - 1; i >= 0; i --) {
if (fb_font[c-0x20][j] & (1 << i)) {
p[x + FB_SCREEN_WD*(y-8)] = color;
#if 0
} else {
p[x + FB_SCREEN_WD*(y-8)] = FB_BGCOLOR;
#endif
}
x++;
}
x = curs_x*FB_CHAR_WD;
y ++;
}
}
}