mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2026-01-07 19:52:40 +01:00
Мяу, ох уж эта Яна
This commit is contained in:
parent
c646ef037e
commit
8bdb3d3010
@ -17,7 +17,9 @@ if computer.getArchitecture and computer.getArchitecture() == "Lua 5.3" then
|
||||
]])()
|
||||
else
|
||||
IntegerToRGB = function(IntegerColor)
|
||||
return bit32Rshift(IntegerColor, 16), bit32Band(bit32Rshift(IntegerColor, 8), 0xFF), bit32Band(IntegerColor, 0xFF)
|
||||
local r = mathFloor(IntegerColor / 0x10000)
|
||||
local g = mathFloor((IntegerColor - r * 0x10000) / 0x100)
|
||||
return r, g, IntegerColor - r * 0x10000 - g * 0x100
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user