Add draft for Screen module.
This commit is contained in:
parent
5789fe145f
commit
52e5afa344
19
src/screen.ml
Normal file
19
src/screen.ml
Normal file
|
@ -0,0 +1,19 @@
|
|||
type pixel = {
|
||||
r : char;
|
||||
g : char;
|
||||
b : char;
|
||||
a : char;
|
||||
}
|
||||
|
||||
type t = {
|
||||
width : int;
|
||||
height : int;
|
||||
data : pixel array;
|
||||
}
|
||||
|
||||
let init_screen w h =
|
||||
{
|
||||
width = w;
|
||||
height = h;
|
||||
data = Array.make_matrix h w { r = 255; g = 255; b = 255; a = 255 }
|
||||
}
|
Loading…
Reference in a new issue