summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Remove dynamic scoping of agendas.David Thompson2014-02-067-91/+62
| | | | | | | | | | | | | | | | * 2d/agenda.scm: (*global-agenda*, current-agenda, with-agenda): Delete. (agenda?, agenda-time): Export. (schedule-every, schedule-each): Rename schedule-every to schedule-each. (schedule-next): Delete. * 2d/game.scm: (game-agenda): New variable. (update): Tick game-agenda. * 2d/repl.scm: Use new agenda API. * 2d/sprite.scm: Use new agenda API. * 2d/time.scm: (time-every, time-each, time-delay): Change signature and use new agenda API. * examples/coroutine.scm: Use new agenda API. * examples/particles.scm: Use new agenda API.
* Check off TODO item.David Thompson2014-01-261-1/+1
| | | | * TODO.org: Check list item.
* Close example programs when window is closed.David Thompson2014-01-261-0/+4
| | | | * examples/common.scm: Add window close hook.
* Add window-close-hook.David Thompson2014-01-261-1/+9
| | | | * 2d/window.scm: New hook.
* Remove unused import declarations.David Thompson2014-01-261-2/+0
| | | | * 2d/game.scm: Remove (2d coroutine) and (2d vector2) imports.
* Move OpenGL viewport settings to game module.David Thompson2014-01-262-7/+9
| | | | | | * 2d/window.scm (open-window): Remove viewport config. * 2d/game.scm (draw): Add viewport config.
* Move SDL event handling to a separate module.David Thompson2014-01-265-28/+51
| | | | | | | | | | | | * 2d/event.scm: New module. * 2d/game.scm: Remove event handling code. * 2d/keyboard.scm: Import (2d event) instead of (2d game). * 2d/mouse.scm: Import (2d event) instead of (2d game). * 2d/window.scm: Import (2d event) instead of (2d game).
* Add window-resize-hook.David Thompson2014-01-261-1/+6
| | | | * 2d/window.scm (window-resize-hook): New hook.
* Don't export font-ftgl-font procedure.David Thompson2014-01-261-1/+0
| | | | * 2d/font.scm: Remove font-ftgl-font from export list.
* Ignore more stuff in the doc/ directory.David Thompson2014-01-261-0/+2
| | | | * .gitignore: Ignore html docs.
* List all source files explicitly.David Thompson2014-01-241-1/+34
| | | | | * Makefile.am (REPL_SOURCES, WRAPPER_SOURCES): New variables. (SOURCES): Remove wildcard and list modules explicitly.
* Update TODO list.David Thompson2014-01-231-28/+13
|
* Return unspecified value for void audio functions.David Thompson2014-01-231-31/+55
| | | | | | | * 2d/audio.scm (ignore-value): New macro. (set-sample-volume, play-sample, pause-music, resume-music) (rewind-music, stop-music): Ignore return value. (music-playing?, music-paused?): Add docstrings.
* Clean up audio API a bit.David Thompson2014-01-221-31/+31
| | | | * 2d/audio.scm: Clean up procedures.
* Initialize audio in audio module instead of window module.David Thompson2014-01-222-2/+2
| | | | | | | * 2d/window.scm (open-window, close-window): Remove open/close audio calls. * 2d/audio.scm: Open audio when module is imported.
* Remove obsolete examples.David Thompson2014-01-204-233/+0
|
* Update example image authors file.David Thompson2014-01-202-3/+5
|
* Tweak README a bit more.David Thompson2014-01-131-2/+7
| | | | * 2d/README.org: More changes!
* Bring README up-to-date.David Thompson2014-01-131-119/+61
| | | | * README.org: Update examples and remove obsolete stuff.
* Remove commented code.David Thompson2014-01-131-4/+0
| | | | * 2d/texture.scm: Remove commented code.
* Fix docstring.David Thompson2014-01-131-2/+2
| | | | * 2d/repl/repl.scm (add-to-repl-mvar): Fix.
* Run REPL metacommands in the main thread, too.David Thompson2014-01-131-1/+7
| | | | * 2d/repl/repl.scm: Fix bug.
* Fix coroutine example to actually use coroutines.David Thompson2014-01-131-7/+11
|
* Clean up module definition.David Thompson2014-01-121-3/+1
| | | | * 2d/wrappers/gl.scm: Remove unused cruft.
* Replace obsolete procedure call with the correct one.David Thompson2014-01-121-4/+8
| | | | * 2d/texture.scm (draw-texture): Use color module.
* Clean up custom REPL code.David Thompson2014-01-121-15/+12
| | | | * 2d/repl/repl.scm (add-to-repl-mvar, run-repl): Cleanup.
* Remove unused export.David Thompson2014-01-121-2/+1
| | | | * 2d/helpers.scm (rgba->gl-color): Remove export.
* Update particle example.David Thompson2014-01-121-38/+25
| | | | * examples/particles.scm: Update example.
* Remove ghost sprite.David Thompson2014-01-121-0/+0
| | | | * examples/images/ghost.png: Delete it.
* Add example sprite.David Thompson2014-01-111-0/+0
| | | | * examples/images/p1_front.png: New sprite.
* Update animation example.David Thompson2014-01-101-14/+7
| | | | * 2d/examples/animation.scm: Updated.
* Update some of the example programs to use the new API.David Thompson2014-01-105-69/+55
| | | | | | | | | | | | * 2d/examples/common.scm: New file. * 2d/examples/coroutine.scm: Updated. * 2d/examples/font.scm: Updated. * 2d/examples/simple.scm: Updated. * 2d/examples/tilemap.scm: Updated.
* Change tick-agenda! and clear-agenda! to take agenda as arg.David Thompson2014-01-102-13/+4
| | | | | | * 2d/agenda.scm (tick-agenda!, clear-agenda!): Add agenda param. * 2d/game.scm (update, tick): Update usage of tick-agenda!.
* Add mouse move/press/click hooks.David Thompson2014-01-091-3/+20
| | | | | * 2d/mouse.scm (mouse-move-hook, mouse-press-hook) (mouse-click-hook): New hooks.
* Add key press/release hooks.David Thompson2014-01-091-1/+11
| | | | * 2d/keyboard.scm (key-press-hook, key-release-hook): New hooks.
* Fix crash when handling an SDL event.David Thompson2014-01-091-1/+1
| | | | * 2d/game.scm (handle-event): Fix bug.
* Run REPL even when game is paused.David Thompson2014-01-091-17/+20
| | | | | | * 2d/repl/repl.scm (add-to-repl-mvar): New procedure. (poll-interval): New variable. (flush-repl): Schedule in paused-agenda.
* Add paused-agenda.David Thompson2014-01-091-1/+7
| | | | | * 2d/game.scm (paused-agenda): New variable. (tick): Tick paused-agenda.
* Factor REPL out of main loop.David Thompson2014-01-092-34/+34
| | | | | | | | | * 2d/game.scm (start-game-loop): Don't spawn REPL. (update-and-render, tick): Don't run REPL. (run-repl-thunk, run-repl): Move. * 2d/repl/repl.scm: (run-repl-thunk, flush-repl): Add. (flush-repl): Schedule REPL to be run within main loop.
* Forgot to add fps.scm.David Thompson2014-01-091-0/+48
|
* Move FPS to a module and add accumulator parameter.David Thompson2014-01-091-57/+30
| | | | | | | | | * 2d/game.scm (accumulator): New parameter. (draw-hook): Change to arity 2. (current-fps, accumulate-fps!, game-fps): Delete. (game-loop, update-and-render): Drop accumulator formal parameter. * 2d/fps.scm: New module.
* Tweak SDL event handling.David Thompson2014-01-071-11/+10
| | | | | | * 2d/game.scm (handle-events, read-input): Rename it. (event-handlers, register-event-handler, handle-event): Use a hash table instead of an alist.
* Make game loop status parameter.David Thompson2014-01-071-9/+9
| | | | | | | | * 2d/game.scm (%state): Replace with game-loop-status. (game-loop-status): New parameter. (run-game-loop): Set status to running. (game-running?, game-paused?, pause-game, resume-game, quit-game): Use parameter.
* Make tick-interval a parameter.David Thompson2014-01-071-11/+13
| | | | | * 2d/game.scm (run-game-loop): Compute tick-interval. (update, update-and-render, tick): Use tick-interval parameter.
* Add draw-hook.David Thompson2014-01-071-13/+6
| | | | | | | * 2d/game.scm (run-game, run-game-loop): Rename and remove draw callback parameter. (draw-hook): New hook. (draw): Run draw hook.
* Update docstrings.David Thompson2014-01-071-3/+3
| | | | * 2d/agenda.scm (make-time-segment, wait): Change docstrings.
* Use SRFI-26 in agenda module.David Thompson2014-01-071-2/+3
| | | | * 2d/agenda.scm (make-time-segment, wait): Use cut.
* Rename agenda procedures.David Thompson2014-01-071-5/+5
| | | | | * 2d/agenda.scm (update-agenda, tick-agenda!): Rename. (clear-agenda, clear-agenda!): Rename.
* Export agenda variables.David Thompson2014-01-071-0/+2
| | | | * 2d/agenda.scm: Export *global-agenda* and current-agenda.
* Add new scheduling procedures and rename existing ones.David Thompson2014-01-073-14/+25
| | | | | | | | * 2d/agenda.scm (agenda-schedule, schedule): Rename. (agenda-schedule-interval, schedule-interval): Rename. (schedule-next, schedule-every): New procedures. * 2d/sprite.scm: Use schedule-every. * 2d/time.scm (time-every): Use schedule-interval.