Add graphics window
This commit is contained in:
parent
54def17c26
commit
fb5eeed6ba
2 changed files with 18 additions and 14 deletions
|
@ -1,14 +1,15 @@
|
|||
let width = 160
|
||||
let height = 144
|
||||
|
||||
type pixel = {
|
||||
r : char;
|
||||
g : char;
|
||||
b : char;
|
||||
a : char;
|
||||
r : int;
|
||||
g : int;
|
||||
b : int;
|
||||
a : int;
|
||||
}
|
||||
|
||||
type t = {
|
||||
width : int;
|
||||
height : int;
|
||||
data : pixel array;
|
||||
data : pixel array array;
|
||||
}
|
||||
|
||||
type control = {
|
||||
|
@ -45,11 +46,9 @@ let get_lcd_control mem =
|
|||
bg_display;
|
||||
}
|
||||
|
||||
let init_screen w h =
|
||||
let init =
|
||||
{
|
||||
width = w;
|
||||
height = h;
|
||||
data = Array.make_matrix h w { r = 255; g = 255; b = 255; a = 255 }
|
||||
data = Array.make_matrix width height { r = 255; g = 255; b = 255; a = 255 }
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue