From 52e5afa344442596463a90ff14887258f48821f1 Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Wed, 25 Mar 2015 16:20:06 +0100 Subject: [PATCH] Add draft for Screen module. --- src/screen.ml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/screen.ml diff --git a/src/screen.ml b/src/screen.ml new file mode 100644 index 0000000..5747e37 --- /dev/null +++ b/src/screen.ml @@ -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 } + }