Changeset edf5774 in mainline for kernel/genarch/src/fb/fb.c


Ignore:
Timestamp:
2008-12-25T17:08:23Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
68a4442
Parents:
c484842
Message:

cstyle

File:
1 edited

Legend:

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

    rc484842 redf5774  
    235235                        unsigned int col;
    236236                       
    237                         for (col = 0, x = 0; col < cols; col++, x += FONT_WIDTH) {
     237                        for (col = 0, x = 0; col < cols; col++,
     238                            x += FONT_WIDTH) {
    238239                                uint8_t glyph;
    239240                               
    240241                                if (row < rows - 1) {
    241                                         if (backbuf[BB_POS(col, row)] == backbuf[BB_POS(col, row + 1)])
     242                                        if (backbuf[BB_POS(col, row)] ==
     243                                            backbuf[BB_POS(col, row + 1)])
    242244                                                continue;
    243245                                       
     
    247249                               
    248250                                memcpy(&fb_addr[FB_POS(x, y + yd)],
    249                                     &glyphs[GLYPH_POS(glyph, yd)], glyphscanline);
     251                                    &glyphs[GLYPH_POS(glyph, yd)],
     252                                    glyphscanline);
    250253                        }
    251254                }
     
    296299                cursor_remove();
    297300                do {
    298                         glyph_draw((uint8_t) ' ', position % cols, position / cols);
     301                        glyph_draw((uint8_t) ' ', position % cols,
     302                            position / cols);
    299303                        position++;
    300304                } while ((position % 8) && (position < cols * rows));
     
    338342                        unsigned int x;
    339343                       
    340                         for (x = 0; x < FONT_WIDTH; x++)
    341                                 rgb_conv(&glyphs[GLYPH_POS(glyph, y) + x * pixelbytes],
    342                                     (fb_font[ROW2Y(glyph) + y] & (1 << (7 - x))) ? FG_COLOR : BG_COLOR);
     344                        for (x = 0; x < FONT_WIDTH; x++) {
     345                                void *dst = &glyphs[GLYPH_POS(glyph, y) +
     346                                    x * pixelbytes];
     347                                uint32_t rgb = (fb_font[ROW2Y(glyph) + y] &
     348                                    (1 << (7 - x))) ? FG_COLOR : BG_COLOR;
     349                                rgb_conv(dst, rgb);
     350                        }
    343351                }
    344352        }
     
    365373                        for (x = 0; x < xres; x++)
    366374                                rgb_conv(&fb_addr[FB_POS(x, y)],
    367                                     (x < LOGO_WIDTH) ? fb_logo[y * LOGO_WIDTH + x] : LOGO_COLOR);
     375                                    (x < LOGO_WIDTH) ?
     376                                    fb_logo[y * LOGO_WIDTH + x] :
     377                                    LOGO_COLOR);
    368378                }
    369379        }
     
    379389                        unsigned int col;
    380390                       
    381                         for (col = 0, x = 0; col < cols; col++, x += FONT_WIDTH)
    382                                 memcpy(&fb_addr[FB_POS(x, y + yd)],
    383                             &glyphs[GLYPH_POS(backbuf[BB_POS(col, row)], yd)],
    384                             glyphscanline);
     391                        for (col = 0, x = 0; col < cols;
     392                            col++, x += FONT_WIDTH) {
     393                                void *d = &fb_addr[FB_POS(x, y + yd)];
     394                                void *s = &glyphs[GLYPH_POS(backbuf[BB_POS(col,
     395                                    row)], yd)];
     396                                memcpy(d, s, glyphscanline);
     397                        }
    385398                }
    386399        }
Note: See TracChangeset for help on using the changeset viewer.