MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / VideoConsole

Method VideoConsole

Kernel/src/videoconsole.cpp:9–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <video.h>
8
9VideoConsole::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
26void VideoConsole::Update(){
27 Video::DrawRect(x,y,width, height, 32, 32, 32);

Callers

nothing calls this directly

Calls 2

kmallocFunction · 0.85
memsetFunction · 0.85

Tested by

no test coverage detected