summaryrefslogtreecommitdiff
path: root/userspace/xterm/rect.c
diff options
context:
space:
mode:
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);
}
}