Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion gml/lib/gfxbuffer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ local debugPrint=function() end


local function convColor_8toh(hex)
local r,g,b=bit32.rshift(hex,16),bit32.rshift(hex,8)%256,hex%256
local r, g, b
if bit32
then
r,g,b=bit32.rshift(hex,16),bit32.rshift(hex,8)%256,hex%256
else
r,g,b=hex>>16,(hex>>8)%256,hex%256
end
r=round(r*7/255)
g=round(g*7/255)
b=round(b*3/255)
Expand Down