Changeset c2942d8 in mainline for genarch/src/fb/fb.c


Ignore:
Timestamp:
2006-02-21T17:47:02Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
008029d
Parents:
0fad93a
Message:

Added logo for framebuffer (simple bitmap)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • genarch/src/fb/fb.c

    r0fad93a rc2942d8  
    3333#include <panic.h>
    3434
     35#include "helenos.xbm"
     36
    3537SPINLOCK_INITIALIZE(fb_lock);
    3638
     
    4850#define BGCOLOR   0x000080
    4951#define FGCOLOR   0xffff00
     52#define LOGOCOLOR 0x2020b0
    5053
    5154#define RED(x,bits)    ((x >> (16+8-bits)) & ((1<<bits)-1))
     
    230233{
    231234        draw_glyph(chr, position % columns, position/columns);
     235}
     236
     237static void draw_logo(int startx, int starty)
     238{
     239        int x,y;
     240        int byte;
     241        int rowbytes;
     242
     243        rowbytes = (helenos_width-1)/8 + 1;
     244
     245        for (y=0;y < helenos_height;y++)
     246                for (x=0;x < helenos_width; x++ ) {
     247                        byte = helenos_bits[rowbytes*y + x/8];
     248                        byte >>= x % 8;
     249                        if (byte & 1)
     250                                (*putpixel)(startx+x,starty+y,LOGOCOLOR);
     251                }
    232252}
    233253
     
    323343
    324344        clear_screen();
     345        draw_logo(xres-helenos_width, 0);
    325346        invert_cursor();
    326347
Note: See TracChangeset for help on using the changeset viewer.