Fix: framebuffer draw_char
This commit is contained in:
@@ -1,9 +1,30 @@
|
||||
#ifndef FRAMEBUFFER_H
|
||||
#define FRAMEBUFFER_H
|
||||
|
||||
#define PSF1_FONT_MAGIC 0x0436
|
||||
|
||||
extern const unsigned char font[512][64];
|
||||
typedef struct {
|
||||
uint16_t magic; // Magic bytes for identification.
|
||||
uint8_t fontMode; // PSF font mode.
|
||||
uint8_t characterSize; // PSF character size.
|
||||
} PSF1_Header;
|
||||
|
||||
|
||||
#define PSF_FONT_MAGIC 0x864ab572
|
||||
|
||||
typedef struct {
|
||||
uint32_t magic; /* magic bytes to identify PSF */
|
||||
uint32_t version; /* zero */
|
||||
uint32_t headersize; /* offset of bitmaps in file, 32 */
|
||||
uint32_t flags; /* 0 if there's no unicode table */
|
||||
uint32_t numglyph; /* number of glyphs */
|
||||
uint32_t bytesperglyph; /* size of each glyph */
|
||||
uint32_t height; /* height in pixels */
|
||||
uint32_t width; /* width in pixels */
|
||||
} PSF_font;
|
||||
|
||||
//extern const unsigned char font[512][64];
|
||||
void putpixel(uint32_t* fb, int pitch, int bpp, int x, int y, uint32_t color);
|
||||
void draw_char(uint32_t* fb, int pitch, int bpp, int x, int y, char c, uint32_t fg_color, uint32_t bg_color);
|
||||
void draw_char(unsigned short int c, int cx, int cy, uint32_t fg, uint32_t bg);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user