remove half done lwt stuff while we continue just working on the editor dammit
This commit is contained in:
11
main.ml
11
main.ml
@ -417,11 +417,10 @@ module Display = struct
|
|||||||
(* the box2 here is cannonically the place the returner drew
|
(* the box2 here is cannonically the place the returner drew
|
||||||
(the Wall.image extents) *)
|
(the Wall.image extents) *)
|
||||||
type image = box2 * Wall.image
|
type image = box2 * Wall.image
|
||||||
type pane = (state -> state * image) Lwt.t
|
type pane = state -> state * image
|
||||||
|
|
||||||
let pane_empty =
|
let pane_empty s =
|
||||||
Lwt.return (fun s ->
|
(s, (Box2.of_pts (Box2.o s.box) (Box2.o s.box), Image.empty))
|
||||||
(s, (Box2.of_pts (Box2.o s.box) (Box2.o s.box), Image.empty)) )
|
|
||||||
|
|
||||||
type frame =
|
type frame =
|
||||||
{ sdl_win: Sdl.window
|
{ sdl_win: Sdl.window
|
||||||
@ -484,7 +483,7 @@ module Display = struct
|
|||||||
let draw_pane frame pane =
|
let draw_pane frame pane =
|
||||||
let width, height = Sdl.gl_get_drawable_size frame.sdl_win in
|
let width, height = Sdl.gl_get_drawable_size frame.sdl_win in
|
||||||
let _, (_, image) =
|
let _, (_, image) =
|
||||||
(Lwt_main.run pane)
|
pane
|
||||||
{ box= Box2.v (P2.v 0. 0.) (P2.v (float width) (float height))
|
{ box= Box2.v (P2.v 0. 0.) (P2.v (float width) (float height))
|
||||||
; time= ticks ()
|
; time= ticks ()
|
||||||
; wall= frame.wall } in
|
; wall= frame.wall } in
|
||||||
@ -639,7 +638,7 @@ module Display = struct
|
|||||||
List.fold_left
|
List.fold_left
|
||||||
(fun (sp, (bp, ip)) (pane : pane) ->
|
(fun (sp, (bp, ip)) (pane : pane) ->
|
||||||
(* uses br to hold max extent of boxes *)
|
(* 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 *)
|
(* draw the pane *)
|
||||||
let _, (_, irb) = path_box Color.blue br sr in
|
let _, (_, irb) = path_box Color.blue br sr in
|
||||||
(* draw the box around the pane *)
|
(* draw the box around the pane *)
|
||||||
|
|||||||
Reference in New Issue
Block a user