aboutsummaryrefslogtreecommitdiff
path: root/src/vga.h
blob: ef183ca20f09c4806d68a52af865f40c5347143f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef _VGA_H
#define _VGA_H

/* palette index to be used as transparent color */
#define TRANSPARENT 16

uint8_t open_framebuffer();
void close_framebuffer();

void set_mode(uint8_t mode);
void wait_vsync();

/* the palette is expected to be 8 bit per color, and will be converted to VGA's 6 bit per color */
void set_palette(const uint8_t *palette);

void blit(const uint8_t *src, uint16_t x, uint16_t y, uint16_t w, uint16_t h);
void blit_erase(uint8_t c);
void blit_update();

#endif /* _VGA_H */