Lines Matching +full:3 +full:base +full:- +full:x
1 // SPDX-License-Identifier: GPL-2.0
24 static void draw_byte_32(const unsigned char *bits, unsigned int *base, int rb);
25 static void draw_byte_16(const unsigned char *bits, unsigned int *base, int rb);
26 static void draw_byte_8(const unsigned char *bits, unsigned int *base, int rb);
47 return -EINVAL; in btext_initialize()
49 return -EINVAL; in btext_initialize()
51 return -EINVAL; in btext_initialize()
68 return -EINVAL; in btext_initialize()
79 dispDeviceRect[3] = height; in btext_initialize()
84 /* Calc the base address of a given point (x,y) */
85 static unsigned char * calc_base(int x, int y) in calc_base() argument
87 unsigned char *base = dispDeviceBase; in calc_base() local
89 base += (x + dispDeviceRect[0]) * (dispDeviceDepth >> 3); in calc_base()
90 base += (y + dispDeviceRect[1]) * dispDeviceRowBytes; in calc_base()
91 return base; in calc_base()
96 unsigned int *base = (unsigned int *)calc_base(0, 0); in btext_clearscreen() local
97 unsigned long width = ((dispDeviceRect[2] - dispDeviceRect[0]) * in btext_clearscreen()
98 (dispDeviceDepth >> 3)) >> 2; in btext_clearscreen()
101 for (i=0; i<(dispDeviceRect[3] - dispDeviceRect[1]); i++) in btext_clearscreen()
103 unsigned int *ptr = base; in btext_clearscreen()
104 for(j=width; j; --j) in btext_clearscreen()
106 base += (dispDeviceRowBytes >> 2); in btext_clearscreen()
115 unsigned long width = ((dispDeviceRect[2] - dispDeviceRect[0]) * in scrollscreen()
116 (dispDeviceDepth >> 3)) >> 2; in scrollscreen()
119 for (i=0; i<(dispDeviceRect[3] - dispDeviceRect[1] - 16); i++) in scrollscreen()
123 for(j=width; j; --j) in scrollscreen()
131 for(j=width; j; --j) in scrollscreen()
142 int x; in btext_drawchar() local
147 --g_loc_X; in btext_drawchar()
150 g_loc_X = (g_loc_X & -8) + 8; in btext_drawchar()
171 g_loc_Y--; in btext_drawchar()
175 waste time scrolling each line. -- paulus. */ in btext_drawchar()
179 for (x = 0; x < g_max_loc_X; ++x) in btext_drawchar()
180 draw_byte(' ', x, g_loc_Y); in btext_drawchar()
187 while (len--) in btext_drawtext()
193 unsigned char *base = calc_base(locX << 3, locY << 4); in draw_byte() local
201 draw_byte_32(font, (unsigned int *)base, rb); in draw_byte()
205 draw_byte_16(font, (unsigned int *)base, rb); in draw_byte()
208 draw_byte_8(font, (unsigned int *)base, rb); in draw_byte()
240 static void draw_byte_32(const unsigned char *font, unsigned int *base, int rb) in draw_byte_32() argument
249 base[0] = (-(bits >> 7) & fg) ^ bg; in draw_byte_32()
250 base[1] = (-((bits >> 6) & 1) & fg) ^ bg; in draw_byte_32()
251 base[2] = (-((bits >> 5) & 1) & fg) ^ bg; in draw_byte_32()
252 base[3] = (-((bits >> 4) & 1) & fg) ^ bg; in draw_byte_32()
253 base[4] = (-((bits >> 3) & 1) & fg) ^ bg; in draw_byte_32()
254 base[5] = (-((bits >> 2) & 1) & fg) ^ bg; in draw_byte_32()
255 base[6] = (-((bits >> 1) & 1) & fg) ^ bg; in draw_byte_32()
256 base[7] = (-(bits & 1) & fg) ^ bg; in draw_byte_32()
257 base = (unsigned int *) ((char *)base + rb); in draw_byte_32()
261 static void draw_byte_16(const unsigned char *font, unsigned int *base, int rb) in draw_byte_16() argument
271 base[0] = (eb[bits >> 6] & fg) ^ bg; in draw_byte_16()
272 base[1] = (eb[(bits >> 4) & 3] & fg) ^ bg; in draw_byte_16()
273 base[2] = (eb[(bits >> 2) & 3] & fg) ^ bg; in draw_byte_16()
274 base[3] = (eb[bits & 3] & fg) ^ bg; in draw_byte_16()
275 base = (unsigned int *) ((char *)base + rb); in draw_byte_16()
279 static void draw_byte_8(const unsigned char *font, unsigned int *base, int rb) in draw_byte_8() argument
289 base[0] = (eb[bits >> 4] & fg) ^ bg; in draw_byte_8()
290 base[1] = (eb[bits & 0xf] & fg) ^ bg; in draw_byte_8()
291 base = (unsigned int *) ((char *)base + rb); in draw_byte_8()
316 return -ENODEV; in btext_find_display()
318 return -ENODEV; in btext_find_display()