chickadee.git
2 years agorender: texture: Define custom record type printer for texture atlas.
David Thompson [Sun, 28 Jan 2018 15:31:32 +0000 (10:31 -0500)] 
render: texture: Define custom record type printer for texture atlas.

* chickadee/render/texture.scm (display-texture): New procedure.

2 years agoguix: Switch back to Guile 2.2.2.
David Thompson [Sun, 28 Jan 2018 15:40:32 +0000 (10:40 -0500)] 
guix: Switch back to Guile 2.2.2.

2.2.3 has a bad performance regression. :(

2 years agowindow: Display warning when vsync is not supported.
David Thompson [Sun, 28 Jan 2018 00:53:20 +0000 (19:53 -0500)] 
window: Display warning when vsync is not supported.

A lot better than crashing, I'd say. :)

Reported-By: Christopher Howard <christopher.howard@qlfiles.net>
* chickadee/window.scm (open-window): Catch errors thrown by
set-gl-swap-interval! and emit warning.

2 years agomath: matrix: Fix typos in matrix4-2d-transform!
David Thompson [Wed, 17 Jan 2018 19:43:31 +0000 (14:43 -0500)] 
math: matrix: Fix typos in matrix4-2d-transform!

* chickadee/math/matrix.scm (matrix4-2d-transform!): Fix bad typos!

2 years agorender: texture: Keep a rect for use with draw-sprite and friends.
David Thompson [Wed, 17 Jan 2018 19:20:14 +0000 (14:20 -0500)] 
render: texture: Keep a rect for use with draw-sprite and friends.

Easier to calculate it once and hang onto it than to generate it each
time draw-sprite is called.

* chickadee/render/texture.scm (<texture>)[rect]: Delete field.
[x y width height gl-tex-rect]: New fields.
* chickadee/render/sprite.scm (draw-sprite*, draw-sprite,
draw-nine-patch*): Use proper accessors for texture rects.

2 years agorender: font: Fix typo.
David Thompson [Wed, 17 Jan 2018 19:18:14 +0000 (14:18 -0500)] 
render: font: Fix typo.

* chickadee/render/font.scm (%null-vec): Rename to...
(%null-vec2): ...this.

2 years agorender: sprite: Fix bug in rendering texture regions.
David Thompson [Wed, 17 Jan 2018 18:33:10 +0000 (13:33 -0500)] 
render: sprite: Fix bug in rendering texture regions.

The texture-rect procedure contains the pixel location of the texture
region, so if you use that rect to render a sprite the result is a
sprite offset by its location in the greater texture, which is very
very very wrong.

* chickadee/render/sprite.scm (draw-sprite): Dynamically configure
rendering rect based on the texture region's width and height.

2 years agorender: texture: Fix split-texture.
David Thompson [Wed, 17 Jan 2018 18:32:00 +0000 (13:32 -0500)] 
render: texture: Fix split-texture.

* chickadee/render/texture.scm (split-texture): Width and height
variables need to contain exact numbers.

2 years agoRevert "Add error handling to game loop."
David Thompson [Wed, 17 Jan 2018 17:10:38 +0000 (12:10 -0500)] 
Revert "Add error handling to game loop."

This reverts commit 8cbb7eed56c4b5edd780c2d51aaa0a4c3eab7350.

2 years agorender: Refactor sprite rendering.
David Thompson [Wed, 17 Jan 2018 17:01:41 +0000 (12:01 -0500)] 
render: Refactor sprite rendering.

* chickadee/render/texture.scm (<texture-region>): Delete type.
(<texture>)[width, height, gl-size]: Delete fields.
[parent, rect, gl-rect]: Add fields.
(texture-region?): Rewrite.
(make-texture, null-texture): Use new texture constructor.
(make-texture-region): Rewrite in terms of <texture> type.
(list->texture-atlas, split-texture): Use new texture region
constructor.
* chickadee/render/sprite.scm (draw-sprite*): New procedure.
(draw-sprite): Rewrite in terms of draw-sprite*.
(draw-nine-patch*): New procedure.
(draw-nine-patch): Rewrite in terms of draw-nine-patch*.
* chickadee/render/font.scm (draw-text*): New procedure.
(draw-text): Rewrite in terms of draw-text*.
* doc/api.texi: Update draw-sprite, draw-nine-patch, and draw-text
docs.

2 years agomath: matrix: Add matrix4-2d-transform! procedure.
David Thompson [Wed, 17 Jan 2018 17:00:29 +0000 (12:00 -0500)] 
math: matrix: Add matrix4-2d-transform! procedure.

* chickadee/math/matrix.scm (matrix4-2d-transform): New procedure.

2 years agoAdd error handling to game loop.
David Thompson [Sat, 13 Jan 2018 01:42:37 +0000 (20:42 -0500)] 
Add error handling to game loop.

* chickadee.scm (error-handler): New procedure.
(with-error-handling): New syntax.
(run-game): Handle errors caught when running hooks.

2 years agoFix broken mouse Y coordinate inversion.
David Thompson [Tue, 9 Jan 2018 14:03:06 +0000 (09:03 -0500)] 
Fix broken mouse Y coordinate inversion.

* chickadee.scm (run-game): window-height is not a procedure!

2 years agoaudio: Use values between 0 and 1 for volume.
David Thompson [Tue, 9 Jan 2018 13:42:46 +0000 (08:42 -0500)] 
audio: Use values between 0 and 1 for volume.

Hide the weird SDL usage of 0 to 128.

* chickadee/audio.scm (set-sample-volume!, music-volume,
set-music-volume!): Translate to/from SDL's volume range.

2 years agorender: shapes: Add draw-filled-rect procedure.
David Thompson [Tue, 9 Jan 2018 02:46:21 +0000 (21:46 -0500)] 
render: shapes: Add draw-filled-rect procedure.

* chickadee/render/shapes.scm (draw-filled-rect): New procedure.

2 years agorender: color: Add color-lerp procedure.
David Thompson [Tue, 9 Jan 2018 02:45:16 +0000 (21:45 -0500)] 
render: color: Add color-lerp procedure.

* chickadee/render/color.scm (color-lerp): New procedure.

2 years agorender: sprite: Allow passing custom transformation matrices.
David Thompson [Fri, 5 Jan 2018 20:56:26 +0000 (15:56 -0500)] 
render: sprite: Allow passing custom transformation matrices.

* chickadee/render/sprite.scm (draw-sprite-unbatched,
draw-sprite-batched): Replace 'scale' and 'rotation' arguments with a
'matrix' argument.
(sprite-batch-add!): Ditto. Also, correctly transform sprite
vertices.  This was previously not handling rotations properly.
(%default-offset): New variable.
(draw-sprite, draw-nine-patch): Change default values for 'rotation'
and 'scale'.  Add 'matrix' and 'offset' arguments.
* chickadee/render/font.scm (%default-offset): New variable.
(draw-text): Change default values for 'rotation' and 'scale'.  Add
'offset' and 'matrix' arguments.

2 years agoFix inverted Y coordinates in mouse events.
David Thompson [Fri, 5 Jan 2018 19:57:15 +0000 (14:57 -0500)] 
Fix inverted Y coordinates in mouse events.

* chickadee.scm (run-game): Invert all Y coordinates received from SDL.

2 years agomath: matrix: Allow translation by rect as if it were a vector.
David Thompson [Fri, 5 Jan 2018 19:49:27 +0000 (14:49 -0500)] 
math: matrix: Allow translation by rect as if it were a vector.

* chickadee/math/matrix.scm (matrix4-translate!): Add rect support.

2 years agoguix: Use Guile 2.2.3.
David Thompson [Fri, 5 Jan 2018 19:48:57 +0000 (14:48 -0500)] 
guix: Use Guile 2.2.3.

2 years agowindow: Remove problematic GL attribute.
David Thompson [Wed, 15 Nov 2017 02:44:48 +0000 (21:44 -0500)] 
window: Remove problematic GL attribute.

I found that the 'framebuffer-srgb-capable' setting does not work with
Mesa 17.2.1.  Best to just get rid of it.

* chickadee/window.scm (open-window): Remove setting for
'framebuffer-srgb-capable'.

2 years agomath: matrix: Allow translation with 3D vectors.
David Thompson [Mon, 13 Nov 2017 02:48:15 +0000 (21:48 -0500)] 
math: matrix: Allow translation with 3D vectors.

* chickadee/math/matrix.scm (matrix4-translate!): Add support for
the vec3 type.

2 years agomath: vector: Export vec3-z.
David Thompson [Mon, 13 Nov 2017 02:47:52 +0000 (21:47 -0500)] 
math: vector: Export vec3-z.

2 years agomath: quaternion: Add custom record type printer.
David Thompson [Mon, 13 Nov 2017 02:41:10 +0000 (21:41 -0500)] 
math: quaternion: Add custom record type printer.

* chickadee/math/quaternion.scm (display-quaternion): New procedure.

2 years agomath: quaternion: Stop referncing inline procedure before it's defined.
David Thompson [Mon, 13 Nov 2017 02:37:48 +0000 (21:37 -0500)] 
math: quaternion: Stop referncing inline procedure before it's defined.

* chickadee/math/quaternion.scm (with-new-quaternion): Build
  quaternion manually instead of using make-null-quaternion.

2 years agomath: matrix: Support converting a quaternion into a rotation matrix.
David Thompson [Mon, 13 Nov 2017 02:21:50 +0000 (21:21 -0500)] 
math: matrix: Support converting a quaternion into a rotation matrix.

* chickadee/math/matrix.scm (matrix4-rotate!, matrix4-rotate): New
  procedures.

2 years agorender: font: Add support for .fnt formatted fonts.
David Thompson [Sat, 11 Nov 2017 21:02:37 +0000 (16:02 -0500)] 
render: font: Add support for .fnt formatted fonts.

* chickadee/render/font.scm (load-font): Check for .xml and .fnt file
extensions and DTRT.
(parse-fnt, parse-bmfont-sxml): New procedure.

2 years agoguix: Update to latest guile-sdl2 commit.
David Thompson [Sat, 11 Nov 2017 04:19:14 +0000 (23:19 -0500)] 
guix: Update to latest guile-sdl2 commit.

2 years agorender: font: Add support for tile fonts.
David Thompson [Sat, 11 Nov 2017 04:17:36 +0000 (23:17 -0500)] 
render: font: Add support for tile fonts.

* chickadee/render/font.scm (load-tile-font): New procedure.

2 years agorender: font: Simplify implementation with texture regions.
David Thompson [Sat, 11 Nov 2017 04:15:07 +0000 (23:15 -0500)] 
render: font: Simplify implementation with texture regions.

* chickadee/render/font.scm (<font-char>) [texture, region]: Remove.
[texture-region]: New field.
(load-font): Use texture regions.
(draw-text): Render using texture regions.

2 years agodoc: scripting: Replace references to "wait" with "sleep".
David Thompson [Fri, 27 Oct 2017 16:07:09 +0000 (12:07 -0400)] 
doc: scripting: Replace references to "wait" with "sleep".

2 years agoscripting: agenda: Add reset-agenda procedure.
David Thompson [Thu, 19 Oct 2017 15:33:57 +0000 (11:33 -0400)] 
scripting: agenda: Add reset-agenda procedure.

* chickadee/scripting/agenda.scm (reset-agenda): New procedure.

2 years agorender: texture: Fix bug in texture region coordinate calculation.
David Thompson [Wed, 18 Oct 2017 03:05:58 +0000 (23:05 -0400)] 
render: texture: Fix bug in texture region coordinate calculation.

* chickadee/render/texture.scm (make-texture-region): Fix broken
  texcoord width/height calculation.

2 years agoThird time's the charm for a bug fix?
David Thompson [Wed, 18 Oct 2017 02:42:26 +0000 (22:42 -0400)] 
Third time's the charm for a bug fix?

2 years agoFix build bug for real this time.
David Thompson [Wed, 18 Oct 2017 02:34:33 +0000 (22:34 -0400)] 
Fix build bug for real this time.

2 years agorender: texture: Fix strange parallel compilation issue.
David Thompson [Wed, 18 Oct 2017 02:14:14 +0000 (22:14 -0400)] 
render: texture: Fix strange parallel compilation issue.

I have no damn clue why #:select causes this problem, but simply not
using it fixes things!

2 years agoAdd generalized A* path finding algorithm.
David Thompson [Wed, 18 Oct 2017 02:05:47 +0000 (22:05 -0400)] 
Add generalized A* path finding algorithm.

* chickadee/path-finding.scm: New file.
* Makefile.am (SOURCES): Add it.

2 years agorender: sprite: Add support for drawing texture regions.
David Thompson [Wed, 18 Oct 2017 01:44:31 +0000 (21:44 -0400)] 
render: sprite: Add support for drawing texture regions.

* chickadee/render/sprite.scm (%default-texture-region): Rename to...
(%default-texcoords): ...this.
(draw-sprite): Replace #:texture-region arg with #:texcoords.  Add
support for texture regions.  Update docstring.
(draw-nine-patch): Add support for texture regions.
* chickadee/render/font.scm (draw-text): Change #:texture-region to
 #:texcoords in draw-sprite call.

2 years agorender: texture: Use texture regions in texture atlas.
David Thompson [Wed, 18 Oct 2017 01:41:40 +0000 (21:41 -0400)] 
render: texture: Use texture regions in texture atlas.

* chickadee/render/texture.scm (list->texture-atlas): Create texture
regions.  Switch from rects to 4-tuples.
(texture-atlas, texture-atlas-ref): Update docstring.
(split-texture): Create texture regions.

2 years agorender: texture: Add private gl-size field.
David Thompson [Wed, 18 Oct 2017 01:39:57 +0000 (21:39 -0400)] 
render: texture: Add private gl-size field.

* chickadee/render/texture.scm (<texture>)[gl-size]: New field.
(null-texture, make-texture): Add gl-size argument.

2 years agorender: texture: Add texture region data type.
David Thompson [Wed, 18 Oct 2017 01:38:06 +0000 (21:38 -0400)] 
render: texture: Add texture region data type.

* chickadee/render/texture.scm (<texture-region>): New record type.

2 years agorender: sprite: Fix sprite batch resizing.
David Thompson [Sun, 15 Oct 2017 02:13:22 +0000 (22:13 -0400)] 
render: sprite: Fix sprite batch resizing.

* chickadee/render/sprite.scm (double-sprite-batch-size!): Get
  reference to bytevectors before unmapping old buffers.

2 years agoscripting: Cancelling a script cancels all nested scripts.
David Thompson [Sun, 15 Oct 2017 02:01:01 +0000 (22:01 -0400)] 
scripting: Cancelling a script cancels all nested scripts.

* chickadee/scripting/script.scm (<script>)[children]: New field.
(current-script): New variable.
(cancel-script): Cancel all child scripts, too.
(spawn-script): Register new script as a child of the current script.

2 years agoscripting: Fix bugs in script-running? and script-complete?
David Thompson [Sun, 15 Oct 2017 01:46:45 +0000 (21:46 -0400)] 
scripting: Fix bugs in script-running? and script-complete?

* chickadee/scripting/script.scm (script-running?, script-complete?):
  Test for the correct status instead of 'cancelled'.

2 years agoscripting: Rename coroutine to script.
David Thompson [Sun, 15 Oct 2017 01:42:15 +0000 (21:42 -0400)] 
scripting: Rename coroutine to script.

* chickadee/scripting/coroutine.scm: Move to...
* chickadee/scripting/script.scm: ...here, and s/coroutine/script.
* chickadee/scripting/channel.scm (channel-get, channel-put): Update
  docstring to say "script" instead of "coroutine".
* chickadee/scripting.scm: s/coroutine/script/
* Makefile.am (SOURCES): Replace coroutine.scm with script.scm.
* doc/api.texi: s/coroutine/script/

2 years agoscripting: Rename wait to sleep.
David Thompson [Sun, 15 Oct 2017 01:27:47 +0000 (21:27 -0400)] 
scripting: Rename wait to sleep.

* chickadee/scripting.scm (wait): Rename to...
(sleep): ...this.

2 years agoscripting: Fix bug where dynamic state wasn't being respected.
David Thompson [Sat, 14 Oct 2017 17:48:18 +0000 (13:48 -0400)] 
scripting: Fix bug where dynamic state wasn't being respected.

* chickadee/scripting/coroutine.scm (spawn-coroutine): Save dynamic
  state during coroutine execution.
* chickadee/scripting.scm (wait): Schedule continuation in the
  coroutine's current agenda.

2 years agomath: vector: Fix a couple docstrings.
David Thompson [Sat, 14 Oct 2017 17:31:00 +0000 (13:31 -0400)] 
math: vector: Fix a couple docstrings.

2 years agoguix: Update to latest guile-sdl2 commit. wip-gltf
David Thompson [Thu, 14 Sep 2017 01:03:01 +0000 (21:03 -0400)] 
guix: Update to latest guile-sdl2 commit.

2 years agoAdd beginnings of glTF parser and loader.
David Thompson [Thu, 14 Sep 2017 01:42:21 +0000 (21:42 -0400)] 
Add beginnings of glTF parser and loader.

* chickadee/render/asset.scm: New file.
* chickadee/render/scene.scm: New file.
* data/shaders/pbr/pbr-frag.glsl: New file.
* data/shaders/pbr/pbr-vert.glsl: New file.

2 years agoAdd JSON parser.
David Thompson [Thu, 14 Sep 2017 01:41:26 +0000 (21:41 -0400)] 
Add JSON parser.

2 years agorender: shader: Export more procedures.
David Thompson [Thu, 14 Sep 2017 01:29:11 +0000 (21:29 -0400)] 
render: shader: Export more procedures.

* chickadee/render/shader.scm: Export shader-attributes, attribute?,
  attribute-name, attribute-location, and attribute-type.

2 years agoMajor rewrite of vertex buffer and vertex array abstractions.
David Thompson [Sun, 13 Aug 2017 17:23:01 +0000 (13:23 -0400)] 
Major rewrite of vertex buffer and vertex array abstractions.

2 years agogl: Export gl-buffer-sub-data.
David Thompson [Tue, 8 Aug 2017 22:21:30 +0000 (18:21 -0400)] 
gl: Export gl-buffer-sub-data.

2 years agoFix datadir.
David Thompson [Tue, 8 Aug 2017 22:21:08 +0000 (18:21 -0400)] 
Fix datadir.

2 years agotexture: Export texture-atlas-texture.
David Thompson [Sun, 13 Aug 2017 17:14:38 +0000 (13:14 -0400)] 
texture: Export texture-atlas-texture.

2 years agomath: Add cotangent function.
David Thompson [Sun, 13 Aug 2017 17:32:18 +0000 (13:32 -0400)] 
math: Add cotangent function.

* chickadee/math.scm (cotan): New procedure.

2 years agomath: vector: Add custom record type printers for vectors.
David Thompson [Tue, 15 Aug 2017 14:21:39 +0000 (10:21 -0400)] 
math: vector: Add custom record type printers for vectors.

* chickadee/math/vector.scm (display-vec2, display-vec3): New
  procedures.

2 years agomath: matrix: Fix docstring.
David Thompson [Sun, 13 Aug 2017 17:56:03 +0000 (13:56 -0400)] 
math: matrix: Fix docstring.

* chickadee/math/matrix.scm (orthographic-projection): s/transform/matrix/

2 years agomath: matrix: Add perspective-projection function.
David Thompson [Sun, 13 Aug 2017 17:55:21 +0000 (13:55 -0400)] 
math: matrix: Add perspective-projection function.

* chickadee/math/matrix.scm (perspective-projection): New procedure.

2 years agomath: matrix: Add custom record type printer.
David Thompson [Sun, 13 Aug 2017 17:54:17 +0000 (13:54 -0400)] 
math: matrix: Add custom record type printer.

* chickadee/math/matrix.scm (display-matrix4): New procedure.

2 years agomath: vector: Add 3-dimensional vector type.
David Thompson [Tue, 8 Aug 2017 12:21:36 +0000 (08:21 -0400)] 
math: vector: Add 3-dimensional vector type.

2 years agomath: Add quaternion module.
David Thompson [Tue, 8 Aug 2017 12:21:13 +0000 (08:21 -0400)] 
math: Add quaternion module.

2 years agoMove color module into render namespace.
David Thompson [Tue, 8 Aug 2017 11:47:49 +0000 (07:47 -0400)] 
Move color module into render namespace.

3 years agobuffer: Add docstrings to procedures.
David Thompson [Thu, 4 May 2017 01:59:00 +0000 (21:59 -0400)] 
buffer: Add docstrings to procedures.

* chickadee/buffer.scm: Add docstrings.

3 years agodoc: Remove redundant "Scheme Procedure", etc. things.
David Thompson [Wed, 3 May 2017 02:42:58 +0000 (22:42 -0400)] 
doc: Remove redundant "Scheme Procedure", etc. things.

Everything is Scheme here, no need to say so over and over!

* doc/api.texi: Remove "Scheme " from the defvr and deffn commands.

3 years agoAdd buffer module.
David Thompson [Wed, 3 May 2017 02:38:25 +0000 (22:38 -0400)] 
Add buffer module.

* chickadee/buffer.scm: New file.
* Makefile.am (SOURCES): Add it.
* .dir-locals.el: Add indent rules for with-buffer and
with-current-buffer.
* examples/buffer.scm: New file.
* doc/api.texi (Buffers): Add docs.

3 years agoscripting: Add a tweening procedure.
David Thompson [Fri, 28 Apr 2017 02:47:46 +0000 (22:47 -0400)] 
scripting: Add a tweening procedure.

* chickadee/scripting.scm (tween): Reimplement procedure.
* chickadee/math/easings.scm: New file.
* Makefile.am (SOURCES): Add it.
* doc/api.text (Easings, Tweening): New subsections.

3 years agoscripting: agenda: Add 'every' scheduling option.
David Thompson [Fri, 28 Apr 2017 02:26:06 +0000 (22:26 -0400)] 
scripting: agenda: Add 'every' scheduling option.

* chickadee/scripting/agenda.scm (schedule-every): New procedure.
(every): New syntax.
* doc/api.texi (Agendas): Document it.

3 years agomath: Add lerp procedure.
David Thompson [Fri, 28 Apr 2017 02:17:50 +0000 (22:17 -0400)] 
math: Add lerp procedure.

* chickadee/math.scm (lerp): New procedure.

3 years agoFix unbounded heap growth in game loop.
David Thompson [Tue, 25 Apr 2017 22:25:11 +0000 (18:25 -0400)] 
Fix unbounded heap growth in game loop.

* chickadee.scm (run-game): Make sure that the recursive calls to the
update loop are in tail position.

3 years agomath: Add pi constant.
David Thompson [Thu, 6 Apr 2017 14:29:32 +0000 (10:29 -0400)] 
math: Add pi constant.

* chickadee/math.scm (pi): New variable.
* doc/api.texi (Math): Add "Basics" subsection.

3 years agoAdd simple scripting system.
David Thompson [Sat, 1 Apr 2017 16:02:17 +0000 (12:02 -0400)] 
Add simple scripting system.

* chickadee/scripting.scm: New file.
* chickadee/scripting/agenda.scm: New file.
* chickadee/scripting/coroutine.scm: New file.
* Makefile.am (SOURCES): Add them.

3 years agoAdd queue module.
David Thompson [Tue, 4 Apr 2017 01:51:18 +0000 (21:51 -0400)] 
Add queue module.

* chickadee/queue.scm: New file.
* Makefile.am (SOURCES): Add it.

3 years agoAdd array list module.
David Thompson [Sat, 1 Apr 2017 18:28:29 +0000 (14:28 -0400)] 
Add array list module.

* chickadee/array-list.scm: New file.
* Makefile.am (SOURCES): Add it.

3 years agoAdd binary heap implementation.
David Thompson [Sat, 1 Apr 2017 16:01:36 +0000 (12:01 -0400)] 
Add binary heap implementation.

* chickadee/heap.scm: New file.
* Makefile.am (SOURCES): Add it.

3 years agoinput: Add keyboard module.
David Thompson [Sat, 1 Apr 2017 16:00:44 +0000 (12:00 -0400)] 
input: Add keyboard module.

* chickadee/input/keyboard.scm: New file.
* Makefile.am (SOURCES): Add it.
* doc/api.texi (Keyboard): New section.

3 years agoguix: Update to latest guile-sdl2 Git snapshot.
David Thompson [Sat, 1 Apr 2017 15:54:19 +0000 (11:54 -0400)] 
guix: Update to latest guile-sdl2 Git snapshot.

3 years agoguix: Use latest Git version of guile-sdl2.
David Thompson [Fri, 31 Mar 2017 19:20:59 +0000 (15:20 -0400)] 
guix: Use latest Git version of guile-sdl2.

3 years agorender: texture: Support using 32 texture units.
David Thompson [Fri, 31 Mar 2017 19:14:30 +0000 (15:14 -0400)] 
render: texture: Support using 32 texture units.

* chickadee/render/texture.scm (make-apply-texture, texture-ref,
texture-set!): New procedures.
(*texture-states*): New variable.
(apply-texture, *texture-state*): Delete.
(make-texture): Use 'vector-set!'
* chickadee/render/shader.scm: Export 'uniform-type'.
(default-uniform-value): Remove 'sampler-2d' case.
(extract-uniforms): Handle sampler-2d uniforms specially.
* chickadee/render.scm (current-texture): Add 'i' argument.
(with-texture): Add 'n' argument.
(gpu-apply*): Set textures for all texture units.
* .dir-locals.el: Update indentation rules for 'with-texture'.

3 years agoguix: Use new Guile 2.2 package.
David Thompson [Fri, 31 Mar 2017 01:20:36 +0000 (21:20 -0400)] 
guix: Use new Guile 2.2 package.

3 years agorender: sprite: Add fast path for non-rotated/scaled batched sprites.
David Thompson [Thu, 23 Mar 2017 02:21:00 +0000 (22:21 -0400)] 
render: sprite: Add fast path for non-rotated/scaled batched sprites.

* chickadee/render/sprite.scm (sprite-batch-add!): Speed up rendering of
non-rotated, non-scaled sprites by avoid matrix multiplication.

3 years agodoc: html: Use dthompson.us stylesheet to make manual more attractive.
David Thompson [Fri, 27 Jan 2017 23:13:15 +0000 (18:13 -0500)] 
doc: html: Use dthompson.us stylesheet to make manual more attractive.

* Makefile.am (AM_MAKEINFOHTMLFLAGS): New variable.
* doc/manual.css: New file.

3 years agoAdd full GPLv3 text.
David Thompson [Fri, 27 Jan 2017 02:06:30 +0000 (21:06 -0500)] 
Add full GPLv3 text.

3 years agoIgnore generated tarballs and signatures.
David Thompson [Fri, 27 Jan 2017 00:42:02 +0000 (19:42 -0500)] 
Ignore generated tarballs and signatures.

3 years agoDistribute examples in release tarballs.
David Thompson [Fri, 27 Jan 2017 00:38:50 +0000 (19:38 -0500)] 
Distribute examples in release tarballs.

3 years agoexamples: Add nine-patch example.
David Thompson [Fri, 27 Jan 2017 00:37:55 +0000 (19:37 -0500)] 
examples: Add nine-patch example.

* examples/nine-patch.scm: New file.
* examples/images/dialog-box.png: New file.
* examples/AUTHORS: New file.

3 years agoconfigure: Drop Guile 2.0 support. v0.2.0
David Thompson [Thu, 26 Jan 2017 12:44:56 +0000 (07:44 -0500)] 
configure: Drop Guile 2.0 support.

3 years agoBump version to 0.2.0.
David Thompson [Thu, 26 Jan 2017 03:30:28 +0000 (22:30 -0500)] 
Bump version to 0.2.0.

3 years agodoc: Mention that signed distance field rendering is not implemented.
David Thompson [Thu, 26 Jan 2017 03:28:59 +0000 (22:28 -0500)] 
doc: Mention that signed distance field rendering is not implemented.

3 years agodoc: Document draw-line.
David Thompson [Thu, 26 Jan 2017 03:28:49 +0000 (22:28 -0500)] 
doc: Document draw-line.

3 years agodoc: Fix multi-line @deffn commands.
David Thompson [Thu, 26 Jan 2017 03:28:00 +0000 (22:28 -0500)] 
doc: Fix multi-line @deffn commands.

3 years agoexamples: Add line segment example.
David Thompson [Thu, 26 Jan 2017 03:26:58 +0000 (22:26 -0500)] 
examples: Add line segment example.

* examples/lines.scm: New file.

3 years agorender: shapes: Add docstring to draw-line.
David Thompson [Thu, 26 Jan 2017 03:25:57 +0000 (22:25 -0500)] 
render: shapes: Add docstring to draw-line.

* chickadee/render/shapes.scm (draw-line): Add docstring.

3 years agorender: shapes: Change draw-line to accept vector arguments.
David Thompson [Thu, 26 Jan 2017 03:16:19 +0000 (22:16 -0500)] 
render: shapes: Change draw-line to accept vector arguments.

* chickadee/render/shapes.scm (draw-line): Replace x1, y1, x2, y2
arguments with start and end arguments that are vec2s.

3 years agorender: shapes: Delete draw-rectangle-outline procedure.
David Thompson [Thu, 26 Jan 2017 03:15:53 +0000 (22:15 -0500)] 
render: shapes: Delete draw-rectangle-outline procedure.

* chickadee/render/shapes.scm (draw-rectangle-outline): Delete.

3 years agorender: viewport: Make applying the null viewport a no-op.
David Thompson [Thu, 26 Jan 2017 03:14:25 +0000 (22:14 -0500)] 
render: viewport: Make applying the null viewport a no-op.

* chickadee/render/viewport.scm (apply-viewport): Don't do anything if
the viewport being applied is the null viewport.

3 years agoEnsure that the viewport is cleared at the beginning of each frame.
David Thompson [Thu, 26 Jan 2017 03:09:26 +0000 (22:09 -0500)] 
Ensure that the viewport is cleared at the beginning of each frame.

* chickadee.scm (run-game): Switch to the null viewport at the beginning
of each frame to ensure other viewports are cleared.

3 years agoFix guile-sdl2 procedure name.
David Thompson [Thu, 26 Jan 2017 01:31:28 +0000 (20:31 -0500)] 
Fix guile-sdl2 procedure name.

* chickadee.scm (run-game): s/keyboard-event-repeat/keyboard-event-repeat?/

3 years agoguix: Update guile-sdl2 recipe to 0.2.0.
David Thompson [Thu, 26 Jan 2017 01:30:57 +0000 (20:30 -0500)] 
guix: Update guile-sdl2 recipe to 0.2.0.