| 7 | #include <video.h> |
| 8 | |
| 9 | VideoConsole::VideoConsole(int x, int y, int width, int height){ |
| 10 | this->x = x; |
| 11 | this->y = y; |
| 12 | this->width = width; |
| 13 | this->height = height; |
| 14 | |
| 15 | cursorX = 0; |
| 16 | cursorY = 0; |
| 17 | |
| 18 | widthInCharacters = width / 8 - 1; |
| 19 | heightInCharacters = height / 8 - 1; |
| 20 | |
| 21 | characterBuffer = (ConsoleCharacter*)kmalloc(widthInCharacters*(heightInCharacters + 1)*sizeof(ConsoleCharacter)); // One ConsoleCharacter is 4 bytes (char, r, g, b) |
| 22 | memset(characterBuffer, 0, widthInCharacters*heightInCharacters*sizeof(ConsoleCharacter)); |
| 23 | |
| 24 | } |
| 25 | |
| 26 | void VideoConsole::Update(){ |
| 27 | Video::DrawRect(x,y,width, height, 32, 32, 32); |