Game has more event handlers now (still broken).

This commit is contained in:
Glenn Y. Rolland 2008-02-28 18:21:33 +01:00
parent 69126b14dd
commit 50ece7b82b

14
Game.ml
View file

@ -7,6 +7,10 @@ type game_t = {
timeline : Timeline.timeline_t ; timeline : Timeline.timeline_t ;
} }
let handle event ev =
ignore ev
;;
let rec refresh_input () = let rec refresh_input () =
(* poll events *) (* poll events *)
let get_handler_fun ev = let get_handler_fun ev =
@ -25,12 +29,12 @@ let rec refresh_input () =
| Sdlevent.JOYBUTTONDOWN _ -> Joystick.handle_event | Sdlevent.JOYBUTTONDOWN _ -> Joystick.handle_event
| Sdlevent.JOYBUTTONUP _ -> Joystick.handle_event | Sdlevent.JOYBUTTONUP _ -> Joystick.handle_event
(* video events *) (* video events *)
| Sdlevent.VIDEORESIZE _ -> ignore | Sdlevent.VIDEORESIZE _ -> Video.handle_event
| Sdlevent.VIDEOEXPOSE -> ignore | Sdlevent.VIDEOEXPOSE -> Video.handle_event
| Sdlevent.ACTIVE _ -> ignore | Sdlevent.ACTIVE _ -> Video.handle_event
(* system events *) (* system events *)
| Sdlevent.QUIT -> ignore | Sdlevent.QUIT -> Game.handle_event
| Sdlevent.SYSWM -> ignore | Sdlevent.SYSWM -> Game.handle_event
(* user defined events *) (* user defined events *)
| Sdlevent.USER _ -> ignore | Sdlevent.USER _ -> ignore
in in