summaryrefslogtreecommitdiff
path: root/sdl2/surface.scm
Commit message (Collapse)AuthorAgeFilesLines
* surface: Add SDL_CreateRGBSurfaceFrom binding.David Thompson2016-12-161-0/+20
|
* surface: Add SDL_CreateRGBSurface binding.David Thompson2016-12-161-1/+18
|
* surface: Fix SDL_Surface struct parsing.David Thompson2016-01-011-19/+22
| | | | | | | | | | | | | | | | The code worked fine on Guile 2.0.11, but Guile master revealed how bad it was to use 'sizeof' to calculate byte offsets into structs due to the padding calculations it does. On Guile master, the offset for surface height and pitch were the same, and that lead to bad news when trying to use that incorrectly parsed data to inspect the pixel buffer. * sdl2/surface.scm (%width-offset, %height-offset, %pitch-offset) (%pixels-offset): Delete. (%surface-types): New variable. (surface-parse-match): New syntax. (surface-width, surface-height, surface-pitch, surface-pixels): Use new struct parsing method. * .dirlocals.el: Add new indenting rule.
* surface: Fix convert-surface-format.David Thompson2015-12-221-1/+1
| | | | | | | Was trying to wrap the wrong thing. -_- * sdl2/surface.scm (convert-surface-format): Wrap the new pointer, not the old surface object. Oops.
* surface: Add binding for SDL_ConvertSurfaceFormat.David Thompson2015-12-221-1/+89
| | | | | | * sdl2/bindings.scm: Add a ton of pixel format constants. * sdl2/surface.scm: (symbol->sdl-pixel-format, convert-surface-format): New procedures.
* surface: Add useful selectors.David Thompson2015-12-201-1/+45
| | | | | | | * sdl2/surface.scm (pointer-int-ref, surface-width, surface-height) (surface-pitch, surface-pixels): New procedures. (%int-size, %pointer-size, %width-offset, %height-offset, %pitch-offset) (%pixels-offset): New variables.
* surface: Fix argument name in record type printer.David Thompson2015-12-171-2/+2
| | | | | * sdl2/surface.scm (<surface>): s/context/surface/ in record type printer.
* Add a few surface bindings.David Thompson2015-12-131-0/+66
* sdl2/bindings.scm (sdl-rw-from-file, sdl-free-surface, sdl-load-bmp-rw): New procedures. * sdl2/surface.scm: New file. * Makefile.am (SOURCES): Add it.