summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* Make the current agenda a parameter.David Thompson2014-01-071-18/+15
| | | | | | * 2d/agenda.scm (*current-agenda*, current-agenda): Rename and make parameter. (*global-agenda*, global-agenda): Rename it.
* Allow signals to be redefined at the REPL and "just work."David Thompson2013-12-292-72/+91
|
* Turn signal objects into doubly-linked list nodes.David Thompson2013-12-251-22/+35
| | | | | * 2d/signals.scm (signal-connections): Delete it. (signal-inputs, signal-outputs): New procedures.
* Restructure game callbacks and signals.David Thompson2013-12-151-11/+7
| | | | | | | | * 2d/game.scm (game-draw): Add signal. (run-game): Remove update callback. (draw): Use alpha value. (update): Remove call to obsolete update callback. (update-and-render): Pass alpha value.
* Update time module to use new signals API.David Thompson2013-12-151-15/+20
| | | | | | | * 2d/time.scm (time-interval): Rename to time-every. (time-every): Use make-root-signal. (time-each): New name for the old time-every. (time-delay): Rewrite it.
* Update keyboard module to use new signals API.David Thompson2013-12-151-19/+23
| | | | | * 2d/keyboard.scm (key-last-down, key-last-up, key-down?) (key-directions): Rewrite signals.
* Update mouse module to use new signal API.David Thompson2013-12-151-14/+19
| | | | | * 2d/mouse.scm (mouse-x, mouse-y): New signals. (mouse-position): Define in terms of signal-map.
* Update window module to use new signals API.David Thompson2013-12-151-4/+7
| | | | | * 2d/window.scm (window-width, window-height): New signals. (window-position): Define in terms of signal-map.
* Remove duplicate export of signal-fold.David Thompson2013-12-151-1/+0
| | | | * 2d/signals.scm: Remove duplicate export.
* Fix signal-do not connection to input signal.David Thompson2013-12-151-1/+2
| | | | * 2d/signals.scm (signal-do): Fix bug.
* Reverse arguments to signal-fold proc.David Thompson2013-12-151-1/+1
| | | | * 2d/signals.scm (signal-fold): Reverse callback args.
* Fix signal-map not connecting to all input signals.David Thompson2013-12-151-4/+6
| | | | * 2d/signals.scm (signal-map): Fix bug.
* Rewrite signals module.David Thompson2013-12-151-193/+134
| | | | * 2d/signals.scm: Rewrite module.
* Remove signal-and and signal-or.David Thompson2013-12-121-31/+0
| | | | * 2d/signals.scm (signal-and, signal-or): Remove them.
* Add signal-liftn procedure.David Thompson2013-12-121-0/+9
| | | | * 2d/signals.scm (signal-liftn): New procedure.
* Make init a non-keyword argument in make-signal procedure.David Thompson2013-12-124-9/+8
| | | | | | | * 2d/signals.scm (make-signal): Change parameter list. * 2d/mouse.scm (mouse-position): Remove #:init keyword. * 2d/time.scm (time-interval, time-delay): Remove #:init keyword. * 2d/window.scm (window-size): Remove #:init keyword.
* Add signal-do procedure.David Thompson2013-12-111-1/+13
| | | | * 2d/signals.scm (signal-do): New procedure.
* Open window when (2d window) is imported.David Thompson2013-12-031-0/+7
| | | | * 2d/window.scm: Open window on import.
* Change signal-merge to accept an arbitrary amount of signals.David Thompson2013-12-031-8/+5
| | | | * 2d/signals.scm (signal-merge): Accept many signals.
* Add signal-when and signal-unless.David Thompson2013-12-021-1/+27
| | | | * 2d/signals.scm (signal-when, signal-unless): New procedures.
* Explicitly set initial value for time-delay signal.David Thompson2013-12-021-0/+1
| | | | * 2d/time.scm (time-delay): Set initial signal value.
* Use signal-receive! instead of signal-set! in signal-connect!David Thompson2013-12-021-1/+1
| | | | * 2d/signals.scm (signal-connect!): Use signal-receive!
* Start working on pong example.David Thompson2013-12-023-0/+82
| | | | Doesn't work yet. Just committing what I have so far.
* Use signal-fold in example.David Thompson2013-12-021-7/+6
|
* Add clamp procedure.David Thompson2013-12-021-1/+9
| | | | * 2d/math.scm (clamp): New procedure.
* Define signal-count in terms of signal-fold.David Thompson2013-12-021-4/+3
| | | | * 2d/signals.scm (signal-count): Rewrite.
* Define signal-constant in terms of signal-lift.David Thompson2013-12-021-7/+5
| | | | * 2d/signals.scm (signal-constant): Rewrite.
* Change parameters for time-interval and time-every.David Thompson2013-12-021-9/+9
| | | | * 2d/time.scm (time-interval, time-every): Add signal parameter.