Rev 1707 | Rev 1711 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1707 | Rev 1709 | ||
---|---|---|---|
Line 205... | Line 205... | ||
205 | return (((color >> 5) & 0x7) << (16 + 5)) | (((color >> 3) & 0x3) << (8 + 6)) | ((color & 0x7) << 5); |
205 | return (((color >> 5) & 0x7) << (16 + 5)) | (((color >> 3) & 0x3) << (8 + 6)) | ((color & 0x7) << 5); |
206 | } |
206 | } |
207 | 207 | ||
208 | /** Put pixel into viewport |
208 | /** Put pixel into viewport |
209 | * |
209 | * |
210 | * @param vp Viewport identification |
210 | * @param vport Viewport identification |
211 | * @param x X coord relative to viewport |
211 | * @param x X coord relative to viewport |
212 | * @param y Y coord relative to viewport |
212 | * @param y Y coord relative to viewport |
213 | * @param color RGB color |
213 | * @param color RGB color |
214 | */ |
214 | */ |
215 | static void putpixel(viewport_t *vport, unsigned int x, unsigned int y, int color) |
215 | static void putpixel(viewport_t *vport, unsigned int x, unsigned int y, int color) |
Line 281... | Line 281... | ||
281 | draw_rectangle(vport, 0, 0, vport->width, vport->height, vport->style.bg_color); |
281 | draw_rectangle(vport, 0, 0, vport->width, vport->height, vport->style.bg_color); |
282 | } |
282 | } |
283 | 283 | ||
284 | /** Scroll unbuffered viewport up/down |
284 | /** Scroll unbuffered viewport up/down |
285 | * |
285 | * |
286 | * @param vp Viewport to scroll |
286 | * @param vport Viewport to scroll |
287 | * @param rows Positive number - scroll up, negative - scroll down |
287 | * @param lines Positive number - scroll up, negative - scroll down |
288 | */ |
288 | */ |
289 | static void scroll_port_nodb(viewport_t *vport, int lines) |
289 | static void scroll_port_nodb(viewport_t *vport, int lines) |
290 | { |
290 | { |
291 | int y; |
291 | int y; |
292 | int startline; |
292 | int startline; |
Line 371... | Line 371... | ||
371 | /***************************************************************/ |
371 | /***************************************************************/ |
372 | /* Character-console functions */ |
372 | /* Character-console functions */ |
373 | 373 | ||
374 | /** Draw character at given position |
374 | /** Draw character at given position |
375 | * |
375 | * |
376 | * @param vp Viewport where the character is printed |
376 | * @param vport Viewport where the character is printed |
377 | * @param sx Coordinates of top-left of the character |
377 | * @param sx Coordinates of top-left of the character |
378 | * @param sy Coordinates of top-left of the character |
378 | * @param sy Coordinates of top-left of the character |
379 | * @param style Color of the character |
379 | * @param style Color of the character |
380 | * @param transparent If false, print background color |
380 | * @param transparent If false, print background color |
381 | */ |
381 | */ |
Line 456... | Line 456... | ||
456 | 456 | ||
457 | 457 | ||
458 | /** Initialize framebuffer as a chardev output device |
458 | /** Initialize framebuffer as a chardev output device |
459 | * |
459 | * |
460 | * @param addr Address of theframebuffer |
460 | * @param addr Address of theframebuffer |
461 | * @param x Screen width in pixels |
461 | * @param xres Screen width in pixels |
462 | * @param y Screen height in pixels |
462 | * @param yres Screen height in pixels |
463 | * @param bpp Bits per pixel (8, 16, 24, 32) |
463 | * @param bpp Bits per pixel (8, 16, 24, 32) |
464 | * @param scan Bytes per one scanline |
464 | * @param scan Bytes per one scanline |
465 | * |
465 | * |
466 | */ |
466 | */ |
467 | static void screen_init(void *addr, unsigned int xres, unsigned int yres, unsigned int bpp, unsigned int scan) |
467 | static void screen_init(void *addr, unsigned int xres, unsigned int yres, unsigned int bpp, unsigned int scan) |
Line 527... | Line 527... | ||
527 | cursor_print(vport); |
527 | cursor_print(vport); |
528 | } |
528 | } |
529 | 529 | ||
530 | /** Draw character at given position relative to viewport |
530 | /** Draw character at given position relative to viewport |
531 | * |
531 | * |
532 | * @param vp Viewport identification |
532 | * @param vport Viewport identification |
533 | * @param c Character to print |
533 | * @param c Character to print |
534 | * @param row Screen position relative to viewport |
534 | * @param row Screen position relative to viewport |
535 | * @param col Screen position relative to viewport |
535 | * @param col Screen position relative to viewport |
536 | * @param transparent If false, print background color with character |
536 | * @param transparent If false, print background color with character |
537 | */ |
537 | */ |
Line 558... | Line 558... | ||
558 | cursor_print(vport); |
558 | cursor_print(vport); |
559 | } |
559 | } |
560 | 560 | ||
561 | /** Draw text data to viewport |
561 | /** Draw text data to viewport |
562 | * |
562 | * |
563 | * @param vp Viewport id |
563 | * @param vport Viewport id |
564 | * @param data Text data fitting exactly into viewport |
564 | * @param data Text data fitting exactly into viewport |
565 | */ |
565 | */ |
566 | static void draw_text_data(viewport_t *vport, keyfield_t *data) |
566 | static void draw_text_data(viewport_t *vport, keyfield_t *data) |
567 | { |
567 | { |
568 | int i; |
568 | int i; |