1. 13 Feb, 2016 1 commit
  2. 12 Feb, 2016 1 commit
  3. 19 Jan, 2016 1 commit
  4. 10 Jan, 2016 2 commits
  5. 02 Jan, 2016 2 commits
    • John Croisant's avatar
      Renamed many renderer procedures to better match SDL. · ed5b9923
      John Croisant authored
      Previously (see commit 45721401) I had decided to name many renderer
      function bindings to use the word "renderer" instead of "render".
      But after further consideration, I think it is better to have the
      procedure names more closely match the original SDL function names.
      
      The following function bindings were renamed:
      
      - renderer-present!             -> render-present!
      - renderer-clip-rect            -> render-clip-rect
      - renderer-clip-rect-set!       -> render-clip-rect-set!
      - renderer-logical-size         -> render-logical-size
      - renderer-logical-size-set!    -> render-logical-size-set!
      - renderer-scale                -> render-scale
      - renderer-scale-set!           -> render-scale-set!
      - renderer-viewport             -> render-viewport
      - renderer-viewport-set!        -> render-viewport-set!
      - renderer-copy!                -> render-copy!
      - renderer-copy-ex!             -> render-copy-ex!
      - renderer-read-pixels-raw      -> render-read-pixels-raw
      - renderer-draw-blend-mode      -> render-draw-blend-mode
      - renderer-draw-blend-mode-set! -> render-draw-blend-mode-set!
      - renderer-draw-blend-mode-raw  -> render-draw-blend-mode-raw
      - renderer-draw-color           -> render-draw-color
      - renderer-draw-color-set!      -> render-draw-color-set!
      - renderer-draw-colour          -> render-draw-colour
      - renderer-draw-colour-set!     -> render-draw-colour-set!
      - renderer-clear!               -> render-clear!
      - renderer-draw-line!           -> render-draw-line!
      - renderer-draw-lines!          -> render-draw-lines!
      - renderer-draw-point!          -> render-draw-point!
      - renderer-draw-points!         -> render-draw-points!
      - renderer-draw-rect!           -> render-draw-rect!
      - renderer-draw-rects!          -> render-draw-rects!
      - renderer-fill-rect!           -> render-fill-rect!
      - renderer-fill-rects!          -> render-fill-rects!
      ed5b9923
    • John Croisant's avatar
  6. 31 Dec, 2015 1 commit
    • John Croisant's avatar
      Added demos/sea-and-stars.scm. · 11b3050b
      John Croisant authored
      This is a demo which renders a scene of the night sky and ocean
      waves, using SDL's 2D accelerated rendering. It demonstrates many
      concepts and features related to rendering and textures.
      11b3050b
  7. 18 Nov, 2015 1 commit
  8. 14 Nov, 2015 2 commits
  9. 11 Nov, 2015 1 commit
    • John Croisant's avatar
      Changed get-version and get-compiled-version. · 943b206c
      John Croisant authored
      - Renamed get-version to current-version.
      - Renamed get-compiled-version to compiled-version.
      - They both now return a list of fixnums instead of an sdl2:version.
      - Replaced the low-level bindings to SDL_GetVersion and SDL_VERSION
        with foreign lambdas that write to Uint8 pointers.
      943b206c
  10. 04 Nov, 2015 1 commit
    • John Croisant's avatar
      Updated demos/rwops.scm. · 3d75764f
      John Croisant authored
      I think sdl2:rwops created from CHICKEN-managed memory are not
      stable, so to be safe the data should be evicted using object-evict.
      
      The u8vector data is now converted to a blob, because evicted
      u8vectors cannot be used. The u8vector procedures do not recognize
      them as u8vectors.
      
      Also fixed the tongue image, which was accidentally saved in a format
      that SDL cannot load. It was 32-bit, with an alpha channel.
      
      Also added the three original BMP files to the demos directory:
      face-frown.bmp, face-smile.bmp, and face-tongue.bmp.
      3d75764f
  11. 02 Nov, 2015 1 commit
    • John Croisant's avatar
      The Great Unprefixing! · 8c2f3fd9
      John Croisant authored
      Removed the "sdl-" prefix from all procedure names. Users may add
      their own prefix when importing the module. The prefix "sdl2:" is
      recommended, like so:
      
        (use (prefix sdl2 sdl2:))
        (sdl2:init! '(everything))
        (sdl2:create-window! "Test" 0 0 600 400)
        (sdl2:delay! 1000)
        (sdl2:quit!)
      
      Record types have the "sdl2:" prefix built into their names (e.g.
      sdl2:point, sdl2:window) to avoid type name collisions with other
      modules. But, the related procedures do not have a prefix.
      8c2f3fd9
  12. 28 Oct, 2015 1 commit
  13. 24 Oct, 2015 1 commit
    • John Croisant's avatar
      Added demos/rwops.scm. · d1ec56a9
      John Croisant authored
      It demonstrates how to create and use rwops from memory pointers,
      blobs, strings, and SRFI-4 u8vectors. Specifically it loads and saves
      BMP image data.
      d1ec56a9
  14. 23 Oct, 2015 4 commits
    • John Croisant's avatar
      Changed how multiple return values are handled. · 0d02db45
      John Croisant authored
      Some SDL functions "return" multiple values by using output
      parameters. Before, we returned a list of the values, but now we
      return true multiple values, using (values ...). This makes it easier
      for the user to bind the values, e.g. using receive or let-values.
      
      Affected procedures:
      
      - sdl-get-rgb
      - sdl-get-rgba
      - sdl-joystick-get-ball
      - sdl-surface-color-mod
      - sdl-window-maximum-size
      - sdl-window-minimum-size
      - sdl-window-position
      - sdl-window-size
      0d02db45
    • John Croisant's avatar
      Added many joystick-related procedures to sdl2. · fd346ad3
      John Croisant authored
      - sdl-num-joysticks
      - sdl-joystick-open!
      - sdl-joystick-close!
      - sdl-joystick-update!
      - sdl-joystick-event-state
      - sdl-joystick-event-state-set!
      - sdl-joystick-attached?
      
      - sdl-joystick-num-axes
      - sdl-joystick-num-balls
      - sdl-joystick-num-buttons
      - sdl-joystick-num-hats
      
      - sdl-joystick-get-axis
      - sdl-joystick-get-ball
      - sdl-joystick-get-button
      - sdl-joystick-get-hat
      - sdl-joystick-get-hat-raw
      
      - sdl-joystick-instance-id
      - sdl-joystick-name
      - sdl-joystick-name-for-indexe
      fd346ad3
    • John Croisant's avatar
      Added "!" suffixes in demos/basics.scm. · a0555433
      John Croisant authored
      For stylistic consistency.
      a0555433
    • John Croisant's avatar
      Added "!" suffix to many procedure names. · 2b28a8b7
      John Croisant authored
      These are procedures that mutate data, change the state of the
      system, or have other side effects. Some of these are questionable
      judgement calls, but for consistency and ease of remembering, the
      rule of thumb is "if it has a side effect, it ends with !".
      
      - sdl-flush-event!
      - sdl-flush-events!
      - sdl-get-events!
      - sdl-poll-event!
      - sdl-pump-events!
      - sdl-push-event!
      - sdl-wait-event!
      - sdl-wait-event-timeout!
      - sdl-register-events!
      - sdl-record-gesture!
      
      - sdl-init!
      - sdl-init-subsystem!
      - sdl-quit!
      - sdl-quit-subsystem!
      - sdl-clear-error!
      - sdl-set-error!
      
      - sdl-save-bmp!
      - sdl-lock-surface!
      - sdl-unlock-surface!
      - sdl-blit-surface!
      - sdl-blit-scaled!
      - sdl-lower-blit!
      - sdl-lower-blit-scaled!
      - sdl-fill-rect!
      - sdl-fill-rects!
      
      - sdl-create-window!
      - sdl-destroy-window!
      - sdl-update-window-surface!
      - sdl-update-window-surface-rects!
      - sdl-show-window!
      - sdl-hide-window!
      - sdl-maximize-window!
      - sdl-minimize-window!
      - sdl-raise-window!
      - sdl-restore-window!
      2b28a8b7
  15. 22 Oct, 2015 5 commits
  16. 09 Oct, 2015 1 commit
  17. 08 Oct, 2015 3 commits
  18. 06 Oct, 2015 1 commit
    • John Croisant's avatar
      Added shortcuts for keyboard event keysym values. · 905c951e
      John Croisant authored
      sdl-keyboard-event-sym, sdl-keyboard-event-scancode, and
      sdl-keyboard-event-mod (plus setters, and raw getters and setters)
      directly access the values from a keyboard event's keysym structure.
      
      These are more user-convenient and efficient than getting the keysym
      and then getting a value from the keysym.
      905c951e
  19. 05 Oct, 2015 1 commit
  20. 03 Oct, 2015 2 commits
  21. 15 Sep, 2015 1 commit
  22. 12 Sep, 2015 2 commits
    • John Croisant's avatar
      Changed how flags are handled in sdl2 module. · e3196b77
      John Croisant authored
      Before, functions like sdl-init and sdl-create-window had a rest
      argument for the flags, so each flag was passed as a separate
      argument to the function. Now, the functions take a single final
      argument that should be a list of flags. This is better style.
      
      Before:  (sdl-init 'video 'events 'timer)
      Now:     (sdl-init '(video events timer))
      e3196b77
    • John Croisant's avatar
      Use symbols instead of keywords for enums. · 9000ef9c
      John Croisant authored
      Before, certain enums (such as window flags, event types, and
      key/button names) used keywords for their convenient form. Now,
      all the keywords have been changed to symbols.
      
      I used keywords before because I thought that using symbols would
      not work correctly unless all the symbols were exported, because of
      module or compilation unit namespacing issues. But, experimentation
      suggests that symbols will (probably) work correctly after all.
      9000ef9c
  23. 09 Sep, 2015 1 commit
  24. 27 Aug, 2015 1 commit
    • John Croisant's avatar
      Demos do not actually need to be compiled. · 77bf1b4d
      John Croisant authored
      I initially thought that the demo applications would need to be
      compiled to work. But, it turns out that they can also work when
      interpreted. So, I have removed the guard that prevented users
      from running the demos in the interpreter.
      77bf1b4d
  25. 16 Nov, 2013 2 commits