From 45ce8728224caa44d31dca3117992b193fa3cd98 Mon Sep 17 00:00:00 2001 From: Miguel Date: Fri, 19 Oct 2018 02:41:53 +0200 Subject: window manager continued --- userspace/xterm/rect.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'userspace/xterm/rect.c') diff --git a/userspace/xterm/rect.c b/userspace/xterm/rect.c index 35711f0..57cea62 100644 --- a/userspace/xterm/rect.c +++ b/userspace/xterm/rect.c @@ -1,25 +1,29 @@ #include #include -#include "../put_pixel.h" +#include "vesa.h" extern char**environ; int main(int argc, char **argv) { // we need a window - _gui_win(); + _gui_win(0|0,300<<16|300,0); + uint8_t *fb=malloc(4*300*300); // basically loads font and sets a few constants - vesa_init(NULL); + vesa_init(300,300,fb,NULL); while(1) { - int x = rand()%600; + int x = rand()%300; int y = rand()%300; - int width=10; - int height=10; - int col = rand()% 0x00ffff; - put_rect( x, y, width,height,col); - _gui_inval((x<<16)|(y),(width<<16)|height); + int col = rand()% 0x0000ff; + + int width=1; + int height=1; + + //put_rect( x, y, width,height,col); + PutPixel(x,y,col|0xff<<24); + _gui_inval((x<<16)|(y),(width<<16)|height,fb); } } -- cgit v1.2.3