forked from mahsu/MariOCaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
draw.mli
24 lines (16 loc) · 771 Bytes
/
draw.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
(* Renders a given object on the canvas *)
val render : Sprite.sprite -> float * float -> unit
(* Clears the canvas *)
val clear_canvas : Dom_html.canvasElement Js.t -> unit
(* Draw the given sprite as a background *)
val draw_bgd : Sprite.sprite -> float -> unit
(* Draws the axis aligned bounding box of the sprite at the position *)
val render_bbox : Sprite.sprite -> float * float -> unit
(* Draws the fps on the canvas *)
val fps : Dom_html.canvasElement Js.t -> float -> unit
(* Draw the heads up display *)
val hud : Dom_html.canvasElement Js.t -> int -> int -> unit
(* Draw the game win screen *)
val game_win : Dom_html.canvasRenderingContext2D Js.t -> unit
(* Draw the game loss screen *)
val game_loss : Dom_html.canvasRenderingContext2D Js.t -> unit