summaryrefslogtreecommitdiff
path: root/userspace/xterm/rect.c
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-10-19 02:41:53 +0200
committerMiguel <m.i@gmx.at>2018-10-19 02:41:53 +0200
commit45ce8728224caa44d31dca3117992b193fa3cd98 (patch)
tree8d37cfe273e9feeb8376b6205abe29c995e40ac2 /userspace/xterm/rect.c
parent9bfd9fb6a7c568b56a5ef525a2b76351780bae66 (diff)
window manager continued
Diffstat (limited to 'userspace/xterm/rect.c')
-rw-r--r--userspace/xterm/rect.c22
1 files changed, 13 insertions, 9 deletions
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 <stdlib.h>
#include <stdio.h>
-#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);
}
}