All pastes #385360 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-03-07 20:38 UTC
rendered paste body
  open Sdlmouse;;

  init [`EVERYTHING];;

  let (bpp, w, h) = (16, 400, 300);;
  let screen = set_video_mode ~w ~h ~bpp [];;

  fill_rect screen (map_RGB screen cyan);;
  put_pixel_color screen ~x:160 ~y:100 red;;

  let x = Array.make 20 (0,0,[]);;

  for i = 1 to 10 do
    Array.set x i ( get_state () );
      let (y, z, zz) = x.(i) in
        Printf.printf "%d %d\n" y z;

    show_cursor false;
    show_cursor true;
    flip screen;
    flush_all ();
    delay 100
  done;;

  quit();;