diff --git a/main.ml b/main.ml index 67ae643..ce5cc42 100644 --- a/main.ml +++ b/main.ml @@ -417,11 +417,10 @@ module Display = struct (* the box2 here is cannonically the place the returner drew (the Wall.image extents) *) type image = box2 * Wall.image - type pane = (state -> state * image) Lwt.t + type pane = state -> state * image - let pane_empty = - Lwt.return (fun s -> - (s, (Box2.of_pts (Box2.o s.box) (Box2.o s.box), Image.empty)) ) + let pane_empty s = + (s, (Box2.of_pts (Box2.o s.box) (Box2.o s.box), Image.empty)) type frame = { sdl_win: Sdl.window @@ -484,7 +483,7 @@ module Display = struct let draw_pane frame pane = let width, height = Sdl.gl_get_drawable_size frame.sdl_win in let _, (_, image) = - (Lwt_main.run pane) + pane { box= Box2.v (P2.v 0. 0.) (P2.v (float width) (float height)) ; time= ticks () ; wall= frame.wall } in @@ -639,7 +638,7 @@ module Display = struct List.fold_left (fun (sp, (bp, ip)) (pane : pane) -> (* uses br to hold max extent of boxes *) - let sr, (br, ir) = pane (sp in + let sr, (br, ir) = pane sp in (* draw the pane *) let _, (_, irb) = path_box Color.blue br sr in (* draw the box around the pane *)