Closed Web-eWorks closed 7 years ago
And done. Incidentally, I tested this on a couple of different surface types (BGRA4444, BGR565, BGR888, ABGR/BGRA/ARGB/RGBA8888), and color handling stayed the same (with the obvious difference in alpha channel presence, of course).
Couple of fixes / minor features:
videoPushColorHex
I unified how the library takes colors from Lua code, and deprecated
videoGetColorHex
. In theory, all hex-encoded values taken from Lua are interpreted as ARGB8888, without user code having to do anything.The only place where
videoGetColorHex
was being used was insurface:fillRect
/surface:fillRects
, and there's handy access toSDL_MapRGBA()
and the needed pixel format pointer there.