chickadee.git
4 months agodoc: Expand API reference for Tiled maps.
David Thompson [Mon, 3 Jun 2019 00:59:34 +0000 (20:59 -0400)] 
doc: Expand API reference for Tiled maps.

* doc/api.texi (Tile Maps): Add more procedure documentation.

4 months agodoc: Remove unnecessary @var markup in argument lists.
David Thompson [Tue, 28 May 2019 22:23:10 +0000 (18:23 -0400)] 
doc: Remove unnecessary @var markup in argument lists.

4 months agoUpdate a couple of examples to use new sprite batch API.
Alex McGrath [Tue, 28 May 2019 20:43:49 +0000 (21:43 +0100)] 
Update a couple of examples to use new sprite batch API.

* examples/game-controller.scm: Use new sprite batch API.
* examples/grid.scm: Ditto.

4 months agorender: sprite: Add draw-sprite-batch* procedure.
David Thompson [Thu, 23 May 2019 02:04:14 +0000 (22:04 -0400)] 
render: sprite: Add draw-sprite-batch* procedure.

* chickadee/render/sprite.scm (draw-sprite-batch*): New procedure.
  (draw-sprite-batch): Rewrite in terms of 'draw-sprite-batch*'.

5 months agoUpdate copyright year on sprite and buffer modules.
David Thompson [Thu, 16 May 2019 11:53:45 +0000 (07:53 -0400)] 
Update copyright year on sprite and buffer modules.

5 months agoIgnore emacs temp files.
David Thompson [Wed, 15 May 2019 00:53:15 +0000 (20:53 -0400)] 
Ignore emacs temp files.

5 months agoFix 'make distcheck'.
David Thompson [Tue, 14 May 2019 00:17:09 +0000 (20:17 -0400)] 
Fix 'make distcheck'.

5 months agodoc: Remove unicode character for pi because it breaks 'make dvi'.
David Thompson [Mon, 13 May 2019 23:00:33 +0000 (19:00 -0400)] 
doc: Remove unicode character for pi because it breaks 'make dvi'.

5 months agoREADME: Update example code.
David Thompson [Mon, 13 May 2019 22:56:35 +0000 (18:56 -0400)] 
README: Update example code.

5 months agorender: Replace broken refs to "typed buffer" with "buffer view".
David Thompson [Mon, 13 May 2019 22:53:26 +0000 (18:53 -0400)] 
render: Replace broken refs to "typed buffer" with "buffer view".

* chickadee/render/asset.scm: s/typed-buffer/buffer-view/
* chickadee/render/particles.scm: Same.

5 months agodoc: Remove reference to old hook system.
David Thompson [Mon, 13 May 2019 22:47:27 +0000 (18:47 -0400)] 
doc: Remove reference to old hook system.

* doc/api.texi (Agendas): Rewrite example code that used obsolete hook
  API.

5 months agorender: Rename "typed buffer" to "buffer view".
David Thompson [Mon, 13 May 2019 22:42:59 +0000 (18:42 -0400)] 
render: Rename "typed buffer" to "buffer view".

* chickadee/render/buffer.scm: s/typed-buffer/buffer-view/
* chickadee/render/shapes.scm: Same.
* chickadee/render/sprite.scm: Same.
* doc/api.texi: Same.

5 months agodoc: Improve texture documentation.
David Thompson [Mon, 13 May 2019 21:59:41 +0000 (17:59 -0400)] 
doc: Improve texture documentation.

* chickadee/render/texture.scm (list->texture-atlas): Tweak docstring.
* doc/api.texi (Textures): Document more procedures.

5 months agorender: texture: Stop exporting texture-id.
David Thompson [Mon, 13 May 2019 21:59:07 +0000 (17:59 -0400)] 
render: texture: Stop exporting texture-id.

* chickadee/render/texture.scm: Remove texture-id from exports list.

5 months agoUpdate SDL2 game controller database file. wip-sprite-batch-rewrite
David Thompson [Fri, 10 May 2019 19:37:36 +0000 (15:37 -0400)] 
Update SDL2 game controller database file.

5 months agorender: sprite: Rewrite sprite batching API.
David Thompson [Fri, 10 May 2019 12:34:53 +0000 (08:34 -0400)] 
render: sprite: Rewrite sprite batching API.

This new version performs better and has a better API. It closely
resembles Love2D's sprite batch API.

* chickadee/render/sprite.scm (with-batched-sprites,
  sprite-batch-reset!, sprite-batch-begin!,
  draw-sprite-batched, *batch?*, %batch): Delete.
  (draw-sprite-unbatched): Rename to 'draw-sprite*'.
  (<sprite-batch>)[index-buffer, position-buffer, texture-buffer]:
  Delete fields.
  [vertex-buffer]: New field.
  (init-sprite-batch, double-sprite-batch-size!, sprite-batch-add!,
  sprite-batch-flush!): Rewrite.
  (make-sprite-batch): Add 'capacity' and 'blend-mode' arguments.
  (draw-sprite-batch): New procedure.
  (draw-nine-patch*): Stop using sprite batches for now.
* chickadee/render/font.scm: (<font>)[sprite-batches]: New field.
  (load-tile-font, load-font): Create a sprite batch for each texture
  loaded.
  (draw-text*): Use sprite batches.
* chickadee/render/tiled.scm: (<tile>)[batch]: New field.
  (<tileset>)[batch]: New field.
  (load-tile-map): Create a sprite batch for each tileset.
  (draw-tile-layer): Use new sprite batch API.
  (draw-tile-map*): Remove reference to deleted macro.

5 months agorender: buffer: Allow specifying read/write mode when mapping buffer.
David Thompson [Fri, 10 May 2019 12:29:28 +0000 (08:29 -0400)] 
render: buffer: Allow specifying read/write mode when mapping buffer.

* chickadee/render/buffer.scm (map-buffer!): Add optional 'mode' argument.

5 months agorender: buffer: Fix buffer orphaning for streaming buffers.
David Thompson [Fri, 10 May 2019 12:25:28 +0000 (08:25 -0400)] 
render: buffer: Fix buffer orphaning for streaming buffers.

* chickadee/render/buffer.scm (map-buffer!): Compare symbols to
  symbols for checking stream usage. -__-

5 months agorender: buffer: Don't attempt to map a buffer that is already mapped.
David Thompson [Thu, 9 May 2019 20:27:44 +0000 (16:27 -0400)] 
render: buffer: Don't attempt to map a buffer that is already mapped.

* chickadee/render/buffer (map-buffer!): Do nothing if buffer is
  already mapped to avoid throwing an error.

5 months agorender: buffer: Add buffer-mapped? procedure.
David Thompson [Thu, 9 May 2019 20:27:18 +0000 (16:27 -0400)] 
render: buffer: Add buffer-mapped? procedure.

* chickadee/render/buffer.scm (buffer-mapped?): New procedure.

5 months agorender: font: Respect newline character when rendering.
David Thompson [Wed, 8 May 2019 21:43:53 +0000 (17:43 -0400)] 
render: font: Respect newline character when rendering.

* chickadee/render/font.scm (draw-text*): Advance to the next line on
  screen when \n is encountered.

5 months agorender: tiled: Parse out tile flip bits.
David Thompson [Wed, 8 May 2019 21:29:24 +0000 (17:29 -0400)] 
render: tiled: Parse out tile flip bits.

* chickadee/render/tiled.scm (load-tile-map): Parse out the 3 flip
  bits from each tile id.

5 months agorender: tiled: Accept map versions 1.1 and 1.2.
David Thompson [Wed, 8 May 2019 21:27:13 +0000 (17:27 -0400)] 
render: tiled: Accept map versions 1.1 and 1.2.

5 months agotexture: tileset: Fix rows/columns calculation.
David Thompson [Wed, 8 May 2019 21:26:20 +0000 (17:26 -0400)] 
texture: tileset: Fix rows/columns calculation.

* chickadee/render/texture.scm (split-texture): Use ceiling instead of
  floor when computing number of rows and columns.

9 months agoRemove obsolete controller handling code.
David Thompson [Wed, 9 Jan 2019 13:46:17 +0000 (08:46 -0500)] 
Remove obsolete controller handling code.

* chickadee.scm (run-game): Remove initial iteration over game
controller hash table.

9 months agorender: sprite: Allow nine patches to be tinted.
David Thompson [Wed, 9 Jan 2019 02:51:16 +0000 (21:51 -0500)] 
render: sprite: Allow nine patches to be tinted.

* chickadee/render/sprite.scm (draw-nine-patch*, draw-nine-patch): Add
tint keyword argument.
* doc/api.texi (Sprites): Document new argument.

9 months agoexamples: Add sprite batch example.
David Thompson [Wed, 9 Jan 2019 02:46:37 +0000 (21:46 -0500)] 
examples: Add sprite batch example.

* examples/sprite-batch.scm: New file.
* examples/images/shot.png: New file.
* Makefile.am (EXTRA_DIST): Add them.

9 months agoAdd SDL2 game controller database file.
David Thompson [Wed, 9 Jan 2019 02:13:36 +0000 (21:13 -0500)] 
Add SDL2 game controller database file.

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.

9 months agoexamples: game-controller: Add left/right trigger rendering.
David Thompson [Mon, 7 Jan 2019 04:19:46 +0000 (23:19 -0500)] 
examples: game-controller: Add left/right trigger rendering.

9 months agorender: sprite: Revamp rendering process.
David Thompson [Mon, 7 Jan 2019 03:50:45 +0000 (22:50 -0500)] 
render: sprite: Revamp rendering process.

Add support for tinting and simplify batch rendering.

9 months agorender: color: Use f32vector under the hood.
David Thompson [Mon, 7 Jan 2019 03:48:14 +0000 (22:48 -0500)] 
render: color: Use f32vector under the hood.

* chickadee/render/color.scm (<color>): Use a single field for storing
bytevector.
(make-color): Wrap f32vector.
(color-r, color-g, color-b, color-a): Fetch channel values from
f32vector.
(color): New procedure.

9 months agomath: matrix: Add transform-x and transform-y procedures.
David Thompson [Mon, 7 Jan 2019 03:47:46 +0000 (22:47 -0500)] 
math: matrix: Add transform-x and transform-y procedures.

* chickadee/math/matrix.scm (transform-x, transform-y): New procedures.

9 months agoexamples: Add game controller test.
David Thompson [Sun, 6 Jan 2019 05:08:13 +0000 (00:08 -0500)] 
examples: Add game controller test.

* examples/game-controller.scm: New file.
* examples/images/controller-buttons.png: New file.
* Makefile.am (EXTRA_DIST): Add them.

9 months agoRemove redundant open-all-controllers procedure.
David Thompson [Sun, 6 Jan 2019 05:06:34 +0000 (00:06 -0500)] 
Remove redundant open-all-controllers procedure.

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.

9 months agoAdd controller-name procedure.
David Thompson [Sun, 6 Jan 2019 05:05:47 +0000 (00:05 -0500)] 
Add controller-name procedure.

* chickadee.scm (controller-name): New procedure.

9 months agoFix normalization of game controller axis values.
David Thompson [Sun, 6 Jan 2019 05:04:54 +0000 (00:04 -0500)] 
Fix normalization of game controller axis values.

* chickadee.scm (controller-axis): Fix math so that axis values are
actually in the range [0, 1].

9 months agorender: texture: Fix error when splitting certain textures.
David Thompson [Sun, 6 Jan 2019 05:00:53 +0000 (00:00 -0500)] 
render: texture: Fix error when splitting certain textures.

The split-texture procedure would throw an exception in the event that
the image width/height could not be divided by tile width/height with
0 remainder.

* chickadee/render/texture.scm (split-texture): Floor the results of
dividing image dimensions by tile dimensions and ensure they are exact
integers.

9 months agoguix: Update to latest guile-sdl2 commit.
David Thompson [Sun, 6 Jan 2019 05:00:40 +0000 (00:00 -0500)] 
guix: Update to latest guile-sdl2 commit.

10 months agoMakefile: Install compiled files in the proper location.
David Thompson [Mon, 17 Dec 2018 01:41:28 +0000 (20:41 -0500)] 
Makefile: Install compiled files in the proper location.

* Makefile.am (godir): Use "site-ccache", not "ccache".

10 months agorender: font: Export a default-font procedure.
David Thompson [Sat, 15 Dec 2018 01:19:55 +0000 (20:19 -0500)] 
render: font: Export a default-font procedure.

* chickadee/render/font.scm (default-font): Change from variable to
procedure.

10 months agoCredit J-Robot for the pixel explosion image.
David Thompson [Fri, 14 Dec 2018 13:42:37 +0000 (08:42 -0500)] 
Credit J-Robot for the pixel explosion image.

10 months agoRename data/CREDITS to data/AUTHORS.
David Thompson [Fri, 14 Dec 2018 13:39:29 +0000 (08:39 -0500)] 
Rename data/CREDITS to data/AUTHORS.

10 months agoAdd particles example.
David Thompson [Fri, 14 Dec 2018 13:37:05 +0000 (08:37 -0500)] 
Add particles example.

* examples/images/explosion.png: New file.
* examples/particles.scm: New file.
* Makefile.am (EXTRA_DIST): Add them.

10 months agoFix game controller stuff.
David Thompson [Fri, 14 Dec 2018 13:34:14 +0000 (08:34 -0500)] 
Fix game controller stuff.

Forgot to prefix imported procedures since I define procedures with
the same names.

10 months agodoc: Improve Fonts section.
David Thompson [Fri, 14 Dec 2018 12:59:08 +0000 (07:59 -0500)] 
doc: Improve Fonts section.

10 months agoAdd controller query procedures.
David Thompson [Fri, 14 Dec 2018 12:48:00 +0000 (07:48 -0500)] 
Add controller query procedures.

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.

10 months agoAdd mouse query procedures.
David Thompson [Fri, 14 Dec 2018 02:37:13 +0000 (21:37 -0500)] 
Add mouse query procedures.

* chickadee.scm (mouse-x, mouse-y, mouse-button-pressed?,
mouse-button-released?): New procedures.

10 months agoRe-add key-pressed? and key-released? procedures.
David Thompson [Fri, 14 Dec 2018 02:32:32 +0000 (21:32 -0500)] 
Re-add key-pressed? and key-released? procedures.

* chickadee.scm (key-pressed?, key-released?): New procedures.
* examples/grid.scm: Remove (sdl2 input keyboard) import.

10 months agoRe-hide SDL2 details.
David Thompson [Fri, 14 Dec 2018 02:20:42 +0000 (21:20 -0500)] 
Re-hide SDL2 details.

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.

10 months agoexamples: Simplify text example.
David Thompson [Fri, 14 Dec 2018 01:50:39 +0000 (20:50 -0500)] 
examples: Simplify text example.

10 months agoFix automake warning.
David Thompson [Fri, 14 Dec 2018 01:50:07 +0000 (20:50 -0500)] 
Fix automake warning.

10 months agorender: font: Include a default font for convenience.
David Thompson [Thu, 13 Dec 2018 22:52:15 +0000 (17:52 -0500)] 
render: font: Include a default font for convenience.

* data/fonts/good-neighbors.fnt: New file.
* data/fonts/good-neighbors.png: New file.
* data/CREDITS: New file.
* examples/fonts/AUTHORS: Delete.
* examples/fonts/good_neighbors_starling.png: Delete.
* examples/fonts/good_neighbors_starling.xml: Delete.
* Makefile.am (dist_pkgdata_DATA, fontsdir, dist_fonts_DATA): New
variables.
(EXTRA_DIST): Remove examples/fonts files.
* chickadee/render/font.scm (draw-text): Make font an optional keyword argument.
* doc/api.texi (Fonts): Document it.
* examples/grid.scm: Update to use new draw-text API.
* examples/nine-patch.scm: Ditto.
* examples/text.scm: Ditto.

squash! render: font: Include a default font for convenience.

10 months agorender: sprite: Use a single buffer for unbatched sprite mesh.
David Thompson [Thu, 13 Dec 2018 22:32:07 +0000 (17:32 -0500)] 
render: sprite: Use a single buffer for unbatched sprite mesh.

* chickadee/render/sprite.scm (draw-sprite-unbatched): Combine
vertices and texcoords into a single packed buffer.

10 months agorender: sprite: batch: Combine vertices and texcoords into one buffer.
David Thompson [Thu, 13 Dec 2018 22:18:16 +0000 (17:18 -0500)] 
render: sprite: batch: Combine vertices and texcoords into one buffer.

Not sure how much of a gain this is, but it's one less buffer to map
each frame.

* chickadee/render/sprite.scm (init-sprite-batch): Create combined
vertex/texcoord buffer.
(double-sprite-batch-size!): Map and copy only a single buffer.
(sprite-batch-begin!): Map just one buffer.
(sprite-batch-add!): Use new packed buffer layout.

10 months agodoc: Mention 'rect' in manual.
David Thompson [Thu, 13 Dec 2018 13:29:32 +0000 (08:29 -0500)] 
doc: Mention 'rect' in manual.

* doc/api.texi (Rectangles): Document 'rect' procedure.

10 months agomath: rect: Add make-rect alias.
David Thompson [Thu, 13 Dec 2018 13:26:50 +0000 (08:26 -0500)] 
math: rect: Add make-rect alias.

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

10 months agorender: font: Use set-vec2! where convenient.
David Thompson [Thu, 13 Dec 2018 13:18:06 +0000 (08:18 -0500)] 
render: font: Use set-vec2! where convenient.

* chickadee/render/font.scm (draw-text*): Use new set-vec2! procedure.

10 months agorender: sprite: Use set-vec2! where convenient.
David Thompson [Thu, 13 Dec 2018 13:17:29 +0000 (08:17 -0500)] 
render: sprite: Use set-vec2! where convenient.

* chickadee/render/sprite (sprite-batch-add!): Use new set-vec2!
procedure.

10 months agomath: vector: Add set-vec2! and set-vec3! procedures.
David Thompson [Thu, 13 Dec 2018 13:14:41 +0000 (08:14 -0500)] 
math: vector: Add set-vec2! and set-vec3! procedures.

* chickadee/math/vector.scm (set-vec2!, set-vec3!): New procedures.
* doc/api.texi (Vectors): Document them.

10 months agodoc: Fix typos.
David Thompson [Wed, 12 Dec 2018 14:00:37 +0000 (09:00 -0500)] 
doc: Fix typos.

10 months agodoc: Rename "GPU Buffers" section to "Buffers".
David Thompson [Wed, 12 Dec 2018 00:31:30 +0000 (19:31 -0500)] 
doc: Rename "GPU Buffers" section to "Buffers".

10 months agodoc: Rename "Blending and Depth Testing" section to just "Blending".
David Thompson [Wed, 12 Dec 2018 00:29:49 +0000 (19:29 -0500)] 
doc: Rename "Blending and Depth Testing" section to just "Blending".

10 months agodoc: Greatly expand public API documentation.
David Thompson [Tue, 11 Dec 2018 22:49:01 +0000 (17:49 -0500)] 
doc: Greatly expand public API documentation.

10 months agorender: shader: Change shader variable naming convention to camel case.
David Thompson [Tue, 11 Dec 2018 22:47:36 +0000 (17:47 -0500)] 
render: shader: Change shader variable naming convention to camel case.

10 months agorender: shader: Improve docstrings.
David Thompson [Tue, 11 Dec 2018 22:47:21 +0000 (17:47 -0500)] 
render: shader: Improve docstrings.

10 months agorender: buffer: Improve docstrings.
David Thompson [Tue, 11 Dec 2018 22:47:12 +0000 (17:47 -0500)] 
render: buffer: Improve docstrings.

10 months agoBump to version 0.4.0.
David Thompson [Mon, 10 Dec 2018 22:11:50 +0000 (17:11 -0500)] 
Bump to version 0.4.0.

10 months agorender: framebuffer: Add default projection matrix for convenience.
David Thompson [Mon, 10 Dec 2018 12:52:41 +0000 (07:52 -0500)] 
render: framebuffer: Add default projection matrix for convenience.

* chickadee/render/framebuffer.scm (<framebuffer>)[projection]: New
field.
(make-framebuffer): Use an orthographic projection the same size as
the framebuffer as the default projection matrix.
* chickadee/render.scm (with-framebuffer): Apply default projection
matrix.

10 months agogame-loop: Sleep thread a bit to avoid 100% CPU usage.
David Thompson [Sun, 9 Dec 2018 19:45:58 +0000 (14:45 -0500)] 
game-loop: Sleep thread a bit to avoid 100% CPU usage.

10 months agomath: grid: Simplify a formula.
David Thompson [Sun, 9 Dec 2018 19:44:59 +0000 (14:44 -0500)] 
math: grid: Simplify a formula.

* chickadee/math/grid.scm (slide): Simplify formula for setting new
goal coordinates.

10 months agoAdd particle rendering module. wip-particles
David Thompson [Wed, 5 Dec 2018 02:50:55 +0000 (21:50 -0500)] 
Add particle rendering module.

* chickadee/render/particles.scm: New file.
* Makefile.am (SOURCES): Add it.
* doc/api.texi (Particles): New subsection.

10 months agorender: buffer: Add support for int and double component types.
David Thompson [Wed, 5 Dec 2018 02:49:38 +0000 (21:49 -0500)] 
render: buffer: Add support for int and double component types.

* chickadee/render/buffer.scm (component-type-size,
typed-buffer-type-gl): Add int and double cases.

10 months agodoc: Fix typo.
David Thompson [Wed, 5 Dec 2018 16:19:29 +0000 (11:19 -0500)] 
doc: Fix typo.

* doc/api.texi (Sprites): s/diving/dividing/

10 months agorender: blend: Fix additive blending mode.
David Thompson [Tue, 4 Dec 2018 01:17:11 +0000 (20:17 -0500)] 
render: blend: Fix additive blending mode.

* chickadee/render/blend.scm (apply-blend-mode): Use the correct
destination blending factor (one, not zero!) for additive blending.

10 months agomath: grid: A couple more optimizations.
David Thompson [Sun, 2 Dec 2018 23:34:10 +0000 (18:34 -0500)] 
math: grid: A couple more optimizations.

* chickadee/math/grid.scm (make-grid): Set a high minimum bucket size
to avoid rehashing.
(grid-move): Use memoized inexact->exact procedure. Fix return value
of check procedure being ignored.

10 months agomath: grid: Refactor to improve performance a little bit.
David Thompson [Sun, 2 Dec 2018 22:15:18 +0000 (17:15 -0500)] 
math: grid: Refactor to improve performance a little bit.

There's still a lot of work needed to make the collision grid scale to
any reasonable number of moving objects, but this is a first step.

* chickadee/math/grid.scm: Big ol' refactor that I can't be bothered
  to list all the changes for.

10 months agoscripting: channel: Update copyright year.
David Thompson [Thu, 29 Nov 2018 21:38:01 +0000 (16:38 -0500)] 
scripting: channel: Update copyright year.

10 months agoscripting: channel: Add channel-get! and channel-put! procedures.
David Thompson [Thu, 29 Nov 2018 21:26:48 +0000 (16:26 -0500)] 
scripting: channel: Add channel-get! and channel-put! procedures.

* chickadee/scripting/channel.scm (channel-get!, channel-put!): New
  procedures.
* doc/api.texi [Channels]: Add docs.

10 months agoqueue: Add queue-length procedure.
David Thompson [Thu, 29 Nov 2018 19:27:00 +0000 (14:27 -0500)] 
queue: Add queue-length procedure.

* chickadee/queue.scm (queue-length): New procedure.

10 months agoscripting: channel: Remove unncessary module imports.
David Thompson [Thu, 29 Nov 2018 19:24:23 +0000 (14:24 -0500)] 
scripting: channel: Remove unncessary module imports.

* chickadee/scripting/channel.scm: Remove (ice-9 format) and
(srfi srfi-11) imports.

11 months agoguix: Update development environment to use Guile 2.9.1.
David Thompson [Thu, 25 Oct 2018 21:12:53 +0000 (17:12 -0400)] 
guix: Update development environment to use Guile 2.9.1.

11 months agorender: Add gpu-apply/instanced syntax.
David Thompson [Thu, 25 Oct 2018 12:46:53 +0000 (08:46 -0400)] 
render: Add gpu-apply/instanced syntax.

* chickadee/render.scm (gpu-apply/instanced*, gpu-apply/instanced): New syntax.

11 months agorender: buffer: Add render-vertices/instanced procedure.
David Thompson [Thu, 25 Oct 2018 12:46:25 +0000 (08:46 -0400)] 
render: buffer: Add render-vertices/instanced procedure.

* chickadee/render/buffer.scm (render-vertices/instanced): New procedure.

11 months agorender: buffer: Add divisor field to typed buffers.
David Thompson [Thu, 25 Oct 2018 12:44:48 +0000 (08:44 -0400)] 
render: buffer: Add divisor field to typed buffers.

* chickadee/render/buffer.scm (<typed-buffer>)[divisor]: New field.
(typed-buffer-divisor): New procedure.
(make-typed-buffer, make-streaming-typed-buffer): Add #:divisor argument.
(apply-typed-buffer): Setup vertex attribute divisor if there is one.

11 months agorender: gl: Add glDrawElementsInstanced binding.
David Thompson [Thu, 25 Oct 2018 12:42:30 +0000 (08:42 -0400)] 
render: gl: Add glDrawElementsInstanced binding.

* chickadee/render/gl.scm (gl-draw-elements-instanced): New procedure.

12 months agoconfigure: Accept Guile 3.0. v0.3.0
David Thompson [Wed, 3 Oct 2018 12:13:18 +0000 (08:13 -0400)] 
configure: Accept Guile 3.0.

12 months agodoc: Document the path finding API.
David Thompson [Wed, 3 Oct 2018 11:45:39 +0000 (07:45 -0400)] 
doc: Document the path finding API.

12 months agoMove pathfinding module to math directory.
David Thompson [Tue, 2 Oct 2018 21:12:44 +0000 (17:12 -0400)] 
Move pathfinding module to math directory.

12 months agodoc: Document collision grid API.
David Thompson [Tue, 2 Oct 2018 12:46:11 +0000 (08:46 -0400)] 
doc: Document collision grid API.

12 months agomath: grid: Fix docstring in grid-move.
David Thompson [Tue, 2 Oct 2018 12:46:01 +0000 (08:46 -0400)] 
math: grid: Fix docstring in grid-move.

12 months agodoc: Document bezier curve API.
David Thompson [Tue, 2 Oct 2018 12:10:53 +0000 (08:10 -0400)] 
doc: Document bezier curve API.

12 months agodoc: Document the rectangle API.
David Thompson [Fri, 28 Sep 2018 12:19:11 +0000 (08:19 -0400)] 
doc: Document the rectangle API.

12 months agodoc: Document vector and matrix math APIs.
David Thompson [Thu, 27 Sep 2018 12:41:05 +0000 (08:41 -0400)] 
doc: Document vector and matrix math APIs.

12 months agomath: matrix: Fix a few docstrings.
David Thompson [Thu, 27 Sep 2018 12:40:24 +0000 (08:40 -0400)] 
math: matrix: Fix a few docstrings.

* chickadee/math/matrix.scm: Fix mistakes in docstrings.

13 months agorender: texture: Fix bug in framebuffer texture coordinates.
David Thompson [Tue, 11 Sep 2018 01:40:56 +0000 (21:40 -0400)] 
render: texture: Fix bug in framebuffer texture coordinates.

* chickadee/render/texture.scm (make-texture): Don't flip texture
horizontally, only vertically.

13 months agorender: framebuffer: Flip UV coordinates.
David Thompson [Tue, 11 Sep 2018 01:27:51 +0000 (21:27 -0400)] 
render: framebuffer: Flip UV coordinates.

* chickadee/render/framebuffer.scm (make-framebuffer): Flip the
texture now that the texture origin is top-left.

13 months agorender: texture: Add flip? argument to make-texture.
David Thompson [Tue, 11 Sep 2018 01:27:25 +0000 (21:27 -0400)] 
render: texture: Add flip? argument to make-texture.

* chickadee/render/texture.scm (make-texture): Add #:flip? keyword argument.

13 months agorender: Change texture origin to top-left.
David Thompson [Mon, 10 Sep 2018 21:42:10 +0000 (17:42 -0400)] 
render: Change texture origin to top-left.

This is a pretty big change, but hopefully for the best as this aligns
with graphics programs and the glTF standard that uses a top-left
origin.  We can keep using a lower-left origin for vertices, though.

* chickadee/render/texture.scm (surface->texture): Stop flipping pixel
rows.
* chickadee/render/sprites.scm (draw-sprite-unbatched,
sprite-batch-add!, draw-nine-patch*): Adjust texture y-coordinates.
* chickadee/render/font.scm (parse-fnt): Stop inverting y coordinates.
* chickadee/render/tiled.scm (load-tile-map): Stop inverting tile ids.

13 months agomath: vector: Fix vec2-normalize and vec3-normalize.
David Thompson [Mon, 10 Sep 2018 21:12:09 +0000 (17:12 -0400)] 
math: vector: Fix vec2-normalize and vec3-normalize.

* chickadee/math/vector.scm: Move vec2-normalize and vec3-normalize
  below the definitions of vec2-normalize! and vec3-normalize! so that
  inlining doesn't screw things up.

13 months agomath: vector: Add vec2*, vec2+, and vec2- procedures.
David Thompson [Mon, 10 Sep 2018 21:09:50 +0000 (17:09 -0400)] 
math: vector: Add vec2*, vec2+, and vec2- procedures.

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