-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgui.mli
39 lines (28 loc) · 1.6 KB
/
gui.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
(* A [gui] opens screens and updates the graphics accordingly. Along with
* tracking for user keyboard inputs. Provides the functions for the user to
* interface with the game graphics and interface. *)
(* [create_disp ()] initializes the screen for the game. Hard coded to be
* 800*600 pixels *)
val create_disp : unit -> Sdlvideo.surface
(* [update_disp oldIm newIm window] takes in the name of the room
* [roomname], the image name [new_image], initialized screen [screen],
* an int representing the hours [hours], battery, and doors. *)
val update_disp : string -> string -> Sdlvideo.surface -> string -> string -> bool * bool -> unit
(* [poll_event ()] Initializes the functions to gather keyboard input from the
* user. returns event of type [Sdlevent.event option]*)
val poll_event : unit -> Sdlevent.event option
(* [collect_commands ()] Launches the Sdlevent function pump to collect user
* keyboard inputs. *)
val collect_commands : unit -> unit
(* [menu ()] Begins the menu loop. It ends with producing the user keyboard
* requests. *)
val menu : unit -> string
(*[interim ()] Provides the project end and final screens, outputs the user
* pressed command. *)
val interim : int -> Sdlvideo.surface -> string
(* [kill_screen screen monster] updates the screen with the death screen from
* the monster and then presents the game over window. *)
val kill_screen : Sdlvideo.surface -> string -> string
(* [read_string ?default event] read_string to handle the keyboard events.
* Mappings are found in the instructions.jpg in the menu folder. *)
val read_string : ?default:string -> Sdlevent.event -> string