27 lines
759 B
C
27 lines
759 B
C
#pragma once
|
|
|
|
#include "cvideo.h"
|
|
|
|
// Text mode config
|
|
#define CHARS_PER_LINE 60
|
|
#define CHAR_LINES 24
|
|
#define CHAR_SCALE 2
|
|
|
|
// Text origin in framebuffer pixels. Set both to 0 for the top-left corner.
|
|
#define TEXT_MARGIN_LEFT (30)
|
|
#define TEXT_MARGIN_TOP (42)
|
|
|
|
// Crop glyph pixels before scaling. Padding is split across both sides; for
|
|
// odd values, the extra pixel is removed from the right or bottom.
|
|
#define GLYPH_PADDING_X 1
|
|
#define GLYPH_PADDING_Y 4
|
|
|
|
// Set to 1 for a white background with black text, or 0 for the default
|
|
// black background with white text.
|
|
#define TEXT_INVERT_COLOURS 0
|
|
|
|
typedef char text_mode_buffer_t[CHAR_LINES][CHARS_PER_LINE];
|
|
|
|
void init_font_cache();
|
|
void draw_text_mode(video_framebuffer_t fb, text_mode_buffer_t buffer);
|