Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4296 → Rev 4295

/branches/dd/kernel/genarch/src/fb/fb.c
47,7 → 47,6
#include <config.h>
#include <bitops.h>
#include <print.h>
#include <string.h>
#include <ddi/ddi.h>
#include <arch/types.h>
 
80,6 → 79,8
#define FG_COLOR 0xffff00
#define INV_COLOR 0xaaaaaa
 
#define CURSOR 0x2588
 
#define RED(x, bits) ((x >> (8 + 8 + 8 - bits)) & ((1 << bits) - 1))
#define GREEN(x, bits) ((x >> (8 + 8 - bits)) & ((1 << bits) - 1))
#define BLUE(x, bits) ((x >> (8 - bits)) & ((1 << bits) - 1))
199,7 → 200,7
/** Draw character at given position
*
*/
static void glyph_draw(uint16_t glyph, unsigned int col, unsigned int row, bool silent, bool overlay)
static void glyph_draw(uint16_t glyph, unsigned int col, unsigned int row, bool silent)
{
unsigned int x = COL2X(col);
unsigned int y = ROW2Y(row);
208,8 → 209,7
if (y >= ytrim)
logo_hide(silent);
if (!overlay)
backbuf[BB_POS(col, row)] = glyph;
backbuf[BB_POS(col, row)] = glyph;
if (!silent) {
for (yd = 0; yd < FONT_SCANLINES; yd++)
269,19 → 269,13
 
static void cursor_put(bool silent)
{
unsigned int col = position % cols;
unsigned int row = position / cols;
glyph_draw(fb_font_glyph(U_CURSOR), col, row, silent, true);
glyph_draw(fb_font_glyph(CURSOR), position % cols, position / cols, silent);
}
 
 
static void cursor_remove(bool silent)
{
unsigned int col = position % cols;
unsigned int row = position / cols;
glyph_draw(backbuf[BB_POS(col, row)], col, row, silent, true);
glyph_draw(fb_font_glyph(0), position % cols, position / cols, silent);
}
 
 
313,13 → 307,13
cursor_remove(silent);
do {
glyph_draw(fb_font_glyph(' '), position % cols,
position / cols, silent, false);
position / cols, silent);
position++;
} while ((position % 8) && (position < cols * rows));
break;
default:
glyph_draw(fb_font_glyph(ch), position % cols,
position / cols, silent, false);
position / cols, silent);
position++;
}