aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/sys/vesa/video.h
diff options
context:
space:
mode:
Diffstat (limited to 'com32/lib/sys/vesa/video.h')
-rw-r--r--com32/lib/sys/vesa/video.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/com32/lib/sys/vesa/video.h b/com32/lib/sys/vesa/video.h
index b02b5ae7..0bd1abff 100644
--- a/com32/lib/sys/vesa/video.h
+++ b/com32/lib/sys/vesa/video.h
@@ -29,17 +29,18 @@
#define LIB_SYS_VESA_VIDEO_H
#include <colortbl.h>
+#include "vesa.h"
#define FONT_MAX_CHARS 256
#define FONT_MAX_HEIGHT 32
#define FONT_WIDTH 8
-#define VIDEO_X_SIZE 640
-#define VIDEO_Y_SIZE 480
+#define DEFAULT_VESA_X_SIZE 640
+#define DEFAULT_VESA_Y_SIZE 480
#define VIDEO_BORDER 8
-#define TEXT_PIXEL_ROWS (VIDEO_Y_SIZE-2*VIDEO_BORDER)
-#define TEXT_PIXEL_COLS (VIDEO_X_SIZE-2*VIDEO_BORDER)
+#define TEXT_PIXEL_ROWS (__vesa_info.mi.v_res - 2*VIDEO_BORDER)
+#define TEXT_PIXEL_COLS (__vesa_info.mi.h_res - 2*VIDEO_BORDER)
typedef uint16_t attr_t;
@@ -60,24 +61,26 @@ enum vesa_pixel_format {
};
extern enum vesa_pixel_format __vesacon_pixel_format;
extern unsigned int __vesacon_bytes_per_pixel;
-typedef const void *(*__vesacon_format_pixels_t) (void *, const uint32_t *,
- size_t);
+typedef const void *(*__vesacon_format_pixels_t)
+ (void *, const uint32_t *, size_t);
extern __vesacon_format_pixels_t __vesacon_format_pixels;
extern const __vesacon_format_pixels_t __vesacon_format_pixels_list[PXF_NONE];
extern struct vesa_char *__vesacon_text_display;
-extern int __vesacon_font_height, __vesacon_text_rows;
+extern int __vesacon_font_height;
+extern int __vesacon_text_rows;
+extern int __vesacon_text_cols;
extern uint8_t __vesacon_graphics_font[FONT_MAX_CHARS][FONT_MAX_HEIGHT];
-extern uint32_t __vesacon_background[VIDEO_Y_SIZE][VIDEO_X_SIZE];
-extern uint32_t __vesacon_shadowfb[VIDEO_Y_SIZE][VIDEO_X_SIZE];
+extern uint32_t *__vesacon_background;
+extern uint32_t *__vesacon_shadowfb;
extern const uint16_t __vesacon_srgb_to_linear[256];
extern const uint8_t __vesacon_linear_to_srgb[4080];
int __vesacon_init_background(void);
int vesacon_load_background(const char *);
-int __vesacon_init(void);
+int __vesacon_init(int, int);
void __vesacon_init_cursor(int);
void __vesacon_erase(int, int, int, int, attr_t);
void __vesacon_scroll_up(int, attr_t);