lispgames / cl-sdl2

Common Lisp bindings for SDL2 using C2FFI.
MIT License
304 stars 82 forks source link

Add Constructor and Accessors for `SDL_Color` #139

Closed Halfwake closed 2 years ago

Halfwake commented 3 years ago

This patch adds the constructor make-color and the accessors color-r, color-g, color-b, and color-a.

This will be useful when calling fill-rect or any other functions that take SDL_Color as an argument.

The SDL_Color documentation: https://wiki.libsdl.org/SDL_Color

Halfwake commented 3 years ago

Actually, I cannot get this to work with fill-rect. Am I misunderstanding something simple?