summaryrefslogtreecommitdiff
path: root/2d/sprite.scm
Commit message (Collapse)AuthorAgeFilesLines
* Replace figl with the new guile-opengl official release.David Thompson2014-03-231-2/+2
|
* Change license to GPLv3+.David Thompson2014-03-081-8/+8
|
* Import new signal moduleDavid Thompson2014-02-171-1/+1
| | | | | | * 2d/font.scm: Import (2d signal). * 2d/game.scm: Import (2d signal). * 2d/sprite.scm: Import (2d signal).
* Move texture anchor procedure.David Thompson2014-02-161-14/+2
| | | | | * 2d/sprite.scm (make-anchor): Delete it. * 2d/texture.scm (anchor-texture): New procedure.
* Formatting cleanup.David Thompson2014-02-161-15/+15
| | | | * 2d/sprite.scm: Reindent file.
* Change sprite-vertex to texture-vertex.David Thompson2014-02-161-46/+3
| | | | | | | | | | * 2d/sprite.scm (sprite-vertex, sprite-vertex-size, x-offset, s-offset, pack-sprite-vertices, draw-sprite-vertices): Delete. (update-sprite-vertices!): Use 'pack-texture-vertices'. (make-sprite): Use 'texture-vertex'. (draw-sprite): Use 'draw-texture-vertices'. * 2d/texture.scm (texture-vertex, texture-vertex-size, x-offset, s-offset, pack-texture-vertices, draw-texture-vertices): New variables.
* Use GLSL shaders for sprites.David Thompson2014-02-161-278/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2d/sprite.scm: (sprite-vertex): Remove color vertex. (r-offset): Delete it. (pack-sprite-vertices): Remove logic moved to shader. (draw-sprite-vertices): Remove color vertex array rendering. (sprite-shader): New variable. (<sprite>): Remove dirty field and adjust setters. (make-anchor): New procedure. (update-sprite-vertices!): Use new 'pack-sprite-vertices'. (make-sprite): Use 'make-anchor' and 'update-sprite-vertices!'. (dirty-sprite-setter): Delete it. (load-sprite): Formatting. (sprite-animation-texture): Delete it. (drawable-texture): New procedure. (sprite-texture): Extract body to 'drawable-texture'. (sprite-anchor-vector): Delete it. (set-sprite-anchor!): Reimplemented. (update-sprite-animator!): Update vertices. (draw-sprite): Use shader program. (<sprite-batch>, make-sprite-batch, sprite-batch?, sprite-batch-max-size, sprite-batch-size, set-sprite-batch-size!, sprite-batch-texture, set-sprite-batch-texture!, sprite-batch-vertices, sprite-batch-draw, with-sprite-batch): Delete all sprite batch code. * data/Makefile.am (shadersdir, shaders_DATA): New variables. * data/shaders/sprite-fragment.glsl: New shader. * data/shaders/sprite-vertex.glsl: New shader.
* Remove dynamic scoping of agendas.David Thompson2014-02-061-1/+2
| | | | | | | | | | | | | | | | * 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.
* Add new scheduling procedures and rename existing ones.David Thompson2014-01-071-1/+1
| | | | | | | | * 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.
* Allow signals to be used for certain sprite properties.David Thompson2013-11-301-6/+7
| | | | | * 2d/sprite.scm (update-sprite-vertices!) (draw-sprite-batched): Use signals.
* Clean up docstrings for sprite module.David Thompson2013-09-181-13/+29
|
* Animate sprites during game updates instead of on render.David Thompson2013-09-151-2/+26
| | | | | Frame rate is independent of the update rate, so the old way didn't make sense.
* Change animation API.David Thompson2013-09-151-21/+19
| | | | | | | | This should have been broken into more commits, but here we are: Rename <animation-state> to <animator>. Better name, less verbose. Make animators mutable because it makes more sense than when animation-states where immutable. Update sprite module to reflect the animation API changes.
* Clean up lines longer than 80 characters.David Thompson2013-08-291-3/+6
|
* Fix issue #9.David Thompson2013-08-291-3/+1
| | | | | draw-sprite-vertices was drawing the entire vertex array rather than only drawing the amount specified in the size argument.
* Replace old vector module with new vector2 module.David Thompson2013-08-271-6/+8
|
* Fix typo.David Thompson2013-08-251-1/+1
|
* Use new color module.David Thompson2013-08-171-7/+7
|
* Move gl.scm to wrappers subdirectory.David Thompson2013-08-141-1/+1
|
* Whitespace.David Thompson2013-08-021-2/+0
|
* Refactor pack-sprite-vertices.David Thompson2013-08-021-52/+36
|
* Refactor sprite vertex array rendering procedures.David Thompson2013-08-021-65/+38
|
* Simplify sprite module now that textures and texture regions are a unified type.David Thompson2013-08-021-69/+27
|
* Only perform sprite rotation math when necessary.David Thompson2013-07-301-28/+57
|
* Refactor sprite vertex packing.David Thompson2013-07-291-121/+109
|
* Only update sprite vertex list when the sprite is dirty.David Thompson2013-07-291-7/+23
|
* Fix figl enum.David Thompson2013-07-281-2/+2
|
* Add rotation and scaling support to sprite batch.David Thompson2013-07-221-17/+36
|
* Split sprite module into 3 modules.David Thompson2013-07-221-251/+38
|
* Add support for colors in a sprite batch.David Thompson2013-07-211-9/+16
|
* Use sprite color when rendering without a batch.David Thompson2013-07-211-6/+10
|
* Update sprite module to reflect changes in figl API.David Thompson2013-07-211-6/+7
|
* Change animation-state type to be immutable.David Thompson2013-07-181-20/+27
|
* Create animation type.David Thompson2013-07-171-25/+122
|
* Use rgba->gl-color in sprite module.David Thompson2013-07-171-3/+5
|
* Add support for sprites that use texture regions and automatic drawing to a ↵David Thompson2013-07-061-32/+104
| | | | batch.
* Update TODO list.David Thompson2013-07-061-3/+0
|
* Add dynamic state to track the current sprite batch.David Thompson2013-07-061-2/+12
|
* Change sprite-batch-draw parameter list to use optional keyword arguments.David Thompson2013-07-061-3/+4
|
* Deleted texture module and moved contents into sprite module.David Thompson2013-07-061-7/+159
|
* Add optional texture coordinate parameters to texture-quad and ↵David Thompson2013-07-061-6/+7
| | | | sprite-batch-draw.
* Fix sprite batch not rendering the correct number of vertices.David Thompson2013-07-061-1/+1
|
* Create simple sprite batch renderer.David Thompson2013-06-271-1/+116
|
* Draw sprites using vertex arrays.David Thompson2013-06-261-19/+84
|
* Add anchor property to sprite object.David Thompson2013-06-231-10/+21
|
* Use a vector for sprite scale.David Thompson2013-06-231-19/+11
|
* Use a vector for sprite position.David Thompson2013-06-231-13/+12
|
* Use keyword arguments in make-sprite and load-sprite.David Thompson2013-06-231-5/+7
|
* Add default sprite arguments to load-sprite.David Thompson2013-06-231-7/+9
|
* Fix sprite default scale values.David Thompson2013-06-161-1/+1
|