1. 30 May, 2016 2 commits
  2. 29 May, 2016 2 commits
    • John Croisant's avatar
      Fixed potential security issue in SDL_SetError binding. · 03586fa1
      John Croisant authored
      This addresses the following warning during compile:
        sdl2-internals.c:3757:14: warning: format string is not a string literal
              (potentially insecure) [-Wformat-security]
      Besides, there is no benefit to treating the user string as a format
      string, because the binding does not allow passing any other args.
      The new SDL_SetError binding now uses up to 1024 chars of the
      user-provided string as verbatim content.
    • John Croisant's avatar
      Added support for compiling with frameworks on Mac. · 885d0803
      John Croisant authored
      Pass the "-D sdl2-use-mac-framework" flag to chicken-install.
      See README for more details.
  3. 28 May, 2016 1 commit
    • John Croisant's avatar
      Improved auto-detection of SDL2 compiler flags. · f834c684
      John Croisant authored
      - Instead of a single SDL2_FLAGS env var, there are now two:
        SDL2_CFLAGS and SDL2_LIBS. This allows users to specify the
        compiler and linker flags separately. These flags are further
        processed to prefix "-C" or "-L" before passing them to csc.
        This builds on the work of Christian Kellermann in 9f1dd7bc.
      - If the flags cannot be determined from the env vars or sdl2-config,
        the install script will abort with a helpful error message.
        Before, it would try (and fail) to compile the egg, resulting in
        a compiler error message, which users might not know how to fix.
      - Updated installation instructions in the README.
  4. 27 May, 2016 2 commits
    • John Croisant's avatar
    • John Croisant's avatar
      Fixed some structs' hash values changing after GC. · 91b30e2f
      John Croisant authored
      Since 0.2, managed color, keysym, point, and rect instances have
      internally held a locative to a blob. But when the GC runs, the
      locative changes, which causes the hash value of the instance to
      change. This causes problems when using these instances, or any
      user-defined record holding these instances, as hash table keys.
      This has been fixed by having those records hold a blob directly,
      then creating a locative during unwrapping. This is somewhat less
      efficient, because a new locative is created and discarded each time
      the struct is used. But that seems to be the necessary price for
      stable hash values.
      Related: CHICKEN issue 1293
  5. 20 May, 2016 1 commit
    • John Croisant's avatar
      Updated docs/using-sdl2-internals.md. · 3d23607f
      John Croisant authored
      - Added renderer and renderer-info (un)wrappers to the list.
      - Mentioned that records might hold locatives.
      - Linked to docs about how to check SDL version.
  6. 04 Mar, 2016 1 commit
    • Christian Kellermann's avatar
      Prefix linker and compiler flags for csc to pass through · 9f1dd7bc
      Christian Kellermann authored
      With this the output of sdl2-config gets prefixed properly, as some
      linker flags (e.g. "-R") are not recognised as such by csc.
      Note that if the user provides her own flags via environment
      variables, the prefixing needs to be done manually there. The setup
      script cannot guess which flag is a compiler and which is a linker
  7. 13 Feb, 2016 10 commits
  8. 12 Feb, 2016 4 commits
  9. 10 Feb, 2016 1 commit
    • John Croisant's avatar
      Changed sdl2:grabbed-window test. · 36516969
      John Croisant authored
      Before, it created a very small window in the corner of the screen.
      But, this resulted in the mouse cursor being moved to that location
      when the test ran, which was annoying. Now it creates a larger window
      in the center of the screen, so it is less likely to move the cursor.
  10. 08 Feb, 2016 2 commits
  11. 07 Feb, 2016 1 commit
    • John Croisant's avatar
      Added point and rect lerp functions. · 99354873
      John Croisant authored
      Lerp stands for "linear interpolation", i.e. simple blending between
      two points or two rects. The functions also support extrapolation.
      - point-lerp   / point-lerp!
      - rect-lerp    / rect-lerp!
      - rect-lerp-xy / rect-lerp-xy!
  12. 30 Jan, 2016 1 commit
    • John Croisant's avatar
      Added overflow prevention to point and rect operations. · 59e3f70a
      John Croisant authored
      The point and rect operations now clamp the results to the Sint32
      range (-2147483648 to 2147483647), so they don't overflow.
      Also, moved the point and rect operation C implementations to their
      own C files, instead of embedding them in the Scheme files.
  13. 28 Jan, 2016 7 commits
  14. 27 Jan, 2016 1 commit
    • John Croisant's avatar
      Added various color math operations. · 6cb5e30d
      John Croisant authored
      - color-scale! / colour-scale!
      - color-mult!  / colour-mult!
      - color-add!   / colour-add!
      - color-sub!   / colour-sub!
      These are common operations that are much more efficient if
      implemented in C.
  15. 25 Jan, 2016 4 commits
    • John Croisant's avatar
    • John Croisant's avatar
      Renamed and deprecated some old copy procedures. · 9a01f908
      John Croisant authored
      The following procedures have new names, for consistency with Scheme
      naming conventions. The old names still exist for backward
      compatibility, but will be removed in a future version.
      - copy-color   ->  color-copy
      - copy-colour  ->  colour-copy
      - copy-point   ->  point-copy
      - copy-rect    ->  rect-copy
      The following procedures are deprecated and will be removed in a future
      - copy-color*
      - copy-colour*
      - copy-point*
      - copy-rect*
    • John Croisant's avatar
      Renamed some new copy procedures. · 29b951e3
      John Croisant authored
      - copy-color!  ->  color-copy!
      - copy-colour! ->  colour-copy!
      - copy-point!  ->  point-copy!
      - copy-rect!   ->  rect-copy!
      These are new procedures added in 0.2.0, I just changed my mind about
      the names. These names are more consistent with Scheme conventions.
    • John Croisant's avatar
      Added various rect math operations. · aa1bd627
      John Croisant authored
      - rect-scale!
      - rect-move!
      - rect-add-point!
      - rect-sub-point!
      - rect-grow!
      - rect-grow/center!
      These are common operations that are much more efficient if
      implemented in C.