From 104d941ab7809ea70b86cd09b85548d86104ec0d Mon Sep 17 00:00:00 2001 From: tali Date: Fri, 19 Jan 2024 15:24:04 -0500 Subject: [PATCH] add s2.mli --- src/s2/s2.mli | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/s2/s2.mli diff --git a/src/s2/s2.mli b/src/s2/s2.mli new file mode 100644 index 0000000..5e608dc --- /dev/null +++ b/src/s2/s2.mli @@ -0,0 +1,37 @@ +module Gl : sig + exception Error of string * string +end + +module Sdl : sig + exception Error of string +end + +module Window : sig + type t + val make : title:string -> t + val destroy : t -> unit + + val event_loop : t -> render:(float -> unit) -> unit +end + +module Renderer : sig + open Adam + + type t + val make : window:Window.t -> t + val destroy : t -> unit + + val pre_draw : t -> unit + val post_draw : t -> unit + val clear : t -> color -> unit + val draw_rect : t -> tf:mat2a -> bb:aabb -> fill:color -> unit +end + +module Asset : sig + open Sexplib + + exception Error of string * string + + val load_file : string -> string + val load_sexp_conv : string -> (Sexp.t -> 'a) -> 'a +end