1. 08 Feb, 2019 1 commit
  2. 02 Jan, 2016 1 commit
  3. 14 Nov, 2015 1 commit
  4. 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
  5. 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
  6. 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
  7. 22 Oct, 2015 5 commits
  8. 09 Oct, 2015 1 commit
  9. 08 Oct, 2015 3 commits
  10. 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
  11. 05 Oct, 2015 1 commit
  12. 03 Oct, 2015 2 commits
  13. 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
  14. 09 Sep, 2015 1 commit
  15. 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
  16. 16 Nov, 2013 2 commits
  17. 14 Nov, 2013 2 commits
  18. 13 Nov, 2013 1 commit
  19. 10 Nov, 2013 2 commits