diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2017-07-10 21:04:18 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2017-07-10 21:04:18 +0200 |
commit | 573b82fd2d46ebca7f98e5323e9f18e593a7996f (patch) | |
tree | 643d480130d1a6ac2639d63b384f43ca9cd82d83 /src/drivers/video/vga.h | |
parent | ea3afaaf2e1926328ca94fa1227c49631adaf5e7 (diff) | |
download | abaos-573b82fd2d46ebca7f98e5323e9f18e593a7996f.tar.gz abaos-573b82fd2d46ebca7f98e5323e9f18e593a7996f.tar.bz2 |
VGA Z-buffer is now dynamically allocated and freed
memory management can reuse the last pointer malloced if freed again
Diffstat (limited to 'src/drivers/video/vga.h')
-rw-r--r-- | src/drivers/video/vga.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/drivers/video/vga.h b/src/drivers/video/vga.h index bdc15cf..aa842dc 100644 --- a/src/drivers/video/vga.h +++ b/src/drivers/video/vga.h @@ -42,11 +42,7 @@ typedef struct { port8_t attribute_controller_reset_port; vga_mode_t mode; bool use_z_buffer; - // TODO: the Z-buffer should actually be allocated dynamically - // depending on the current mode, for now it's a static buffer - // able to store the biggest resolution, being planar - // 320x200x8 aka 64k - uint8_t zbuffer[65535]; + uint8_t *zbuffer; // stores either the address to the beginning of the segment // (real mapped I/O memory or the beginning of the Z buffer uint8_t *base_addr; |