| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
* chickadee.scm (run-game): Remove initial iteration over game
controller hash table.
|
|
|
|
|
|
|
|
|
| |
This will allow for lots of controllers to be automatically mapped
correctly without the user having to do anything.
* data/gamecontrollerdb.txt: New file.
* Makefile.am (dist_pkgdata_DATA): Add it.
* chickadee.scm (run-game): Load game controller db file.
|
|
|
|
|
|
|
|
|
| |
I thought this was necessary to process controllers that were already
connected to the computer before a Chickadee-using program was
launched, but that doesn't seem to be the case.
* chickadee.scm (open-all-controllers): Delete.
(run-game): Remove call to open-all-controllers.
|
|
|
|
| |
* chickadee.scm (controller-name): New procedure.
|
|
|
|
|
| |
* chickadee.scm (controller-axis): Fix math so that axis values are
actually in the range [0, 1].
|
|
|
|
|
| |
Forgot to prefix imported procedures since I define procedures with
the same names.
|
|
|
|
|
|
|
| |
Not ready to document them at this time since I have not done full
tests with a USB controller yet.
* chickadee.scm (controller-button-pressed?, controller-axis): New procedures.
|
|
|
|
|
| |
* chickadee.scm (mouse-x, mouse-y, mouse-button-pressed?,
mouse-button-released?): New procedures.
|
|
|
|
|
| |
* chickadee.scm (key-pressed?, key-released?): New procedures.
* examples/grid.scm: Remove (sdl2 input keyboard) import.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I know I'm backpedaling here, but I think it was a mistake to expose
SDL2 as much as I have here. I think it's better for people just
getting started to not have to wonder what SDL means. Making things
as usable as possible for beginners is an important goal, and
abstracting SDL2 + OpenGL things from the core game loop
implementation shouldn't require sacrificing that goal.
* chickadee.scm: Switch code with...
* chickadee/game-loop.scm: ...this! Which is copied straight from...
* chickadee/sdl.scm: ...this! Which is now deleted.
* Makefile.am (SOURCES): Add game-loop.scm, remove sdl.scm.
* examples/grid.scm: Update due to API breakage.
* examples/lines.scm: Ditto.
* examples/nine-patch.scm: Ditto.
* examples/sprite.scm: Ditto.
* examples/text.scm: Ditto.
* examples/tiled.scm: Ditto.
* doc/api.texi (Kernel): Update.
|
| |
|
|
|
|
|
|
|
|
| |
* chickadee.scm (default-error-handler): Delete.
(call-with-error-handling): Don't catch errors if no handler is
specified.
(run-game): Default 'error' arg to #f.
* chickadee/sdl.scm: (run-game/sdl): Likewise.
|
|
|
|
|
|
|
| |
* chickadee.scm (call-with-error-handling): Call the correct error
handler. Return #t if an error occurred, #f otherwise.
(run-game): Reset current-time and buffer after recovering from an
error.
|
|
|
|
|
| |
Always printing a backtrace caused double backtraces to be printed
when using the default error handler that just re-throws the error.
|
|
|
|
|
|
|
| |
* chickadee.scm (default-error-handler): New procedure.
(run-game): Set default value for 'error' arg to
'default-error-handler'.
* chickadee/sdl.scm (run-game/sdl): Ditto.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is really cool! Now users can plug in whatever backend they'd
like and are not forced to use SDL and OpenGL. Thanks to Chris Webber
for showing me the Lux library for Racket that does exactly this.
* chickadee.scm (run-game): Remove all SDL/OpenGL code, replace with
generic render/update keyword arguments.
(run-game/sdl): New procedure.
* examples/lines.scm: Update for API breakage.
* examples/nine-patch.scm: Ditto.
* examples/sprite.scm: Ditto.
* examples/text.scm: Ditto.
* examples/tiled.scm: Ditto.
|
|
|
|
|
| |
* chickadee.scm (call-with-error-handling): Do not catch errors when
the error hook has nothing in it.
|
|
|
|
|
| |
* chickadee.scm (call-with-error-handling): Run hook with error key
and args.
|
|
|
|
|
|
|
| |
* chickadee.scm (error-hook): New variable.
(display-game-loop-error, call-with-error-handling): New procedures.
(run-hook*): New syntax.
(run-game): Wrap all hooks with error handling.
|
|
|
|
|
|
|
| |
Reported-By: Christopher Howard <christopher.howard@qlfiles.net>
* chickadee.scm (run-game): Invert the Y coordinate received from
SDL's mouse motion event.
|
|
|
|
| |
This reverts commit 8cbb7eed56c4b5edd780c2d51aaa0a4c3eab7350.
|
|
|
|
|
|
| |
* chickadee.scm (error-handler): New procedure.
(with-error-handling): New syntax.
(run-game): Handle errors caught when running hooks.
|
|
|
|
| |
* chickadee.scm (run-game): window-height is not a procedure!
|
|
|
|
| |
* chickadee.scm (run-game): Invert all Y coordinates received from SDL.
|
| |
|
|
|
|
|
| |
* chickadee.scm (run-game): Make sure that the recursive calls to the
update loop are in tail position.
|
|
|
|
|
| |
* chickadee.scm (run-game): Switch to the null viewport at the beginning
of each frame to ensure other viewports are cleared.
|
|
|
|
| |
* chickadee.scm (run-game): s/keyboard-event-repeat/keyboard-event-repeat?/
|
|
|
|
|
|
|
| |
* chickadee/audio.scm: New file.
* Makefile.am (SOURCES): Add it.
* chickadee.scm (run-game): Initialize audio.
* doc/api.texi ("Audio"): Document it.
|
| |
|
| |
|
| |
|
| |
|
|
|