diff --git a/src/net/torvald/terrarum/tileproperties/TilePropCSV.kt b/src/net/torvald/terrarum/tileproperties/TilePropCSV.kt index 6488de078..f33633173 100644 --- a/src/net/torvald/terrarum/tileproperties/TilePropCSV.kt +++ b/src/net/torvald/terrarum/tileproperties/TilePropCSV.kt @@ -58,7 +58,7 @@ object TilePropCSV { "10"; "2";"TILE_PLATFORM_EBONY" ; "8396808"; "1"; "N/A";"wood"; "0"; "0"; "0"; "0"; "10"; "2"; "0"; "0";"16" "10"; "3";"TILE_PLATFORM_BIRCH" ; "8396808"; "1"; "N/A";"wood"; "0"; "0"; "0"; "0"; "10"; "3"; "0"; "0";"16" "10"; "4";"TILE_PLATFORM_BLOODROSE" ; "8396808"; "1"; "N/A";"wood"; "0"; "0"; "0"; "0"; "10"; "4"; "0"; "0";"16" - "11"; "0";"TILE_TORCH" ; "8396808"; "0"; "N/A";"fxtr"; "0"; "0"; "0"; "226629701"; "11"; "0"; "0"; "1";"16" + "11"; "0";"TILE_TORCH" ; "8396808"; "0"; "N/A";"fxtr"; "0"; "0"; "0"; "267553792"; "11"; "0"; "0"; "1";"16" "11"; "1";"TILE_TORCH_FROST" ; "8396808"; "0"; "N/A";"fxtr"; "0"; "0"; "0"; "81916159"; "11"; "1"; "0"; "1";"16" "12"; "0";"TILE_TORCH" ; "8396808"; "0"; "N/A";"fxtr"; "0"; "0"; "0"; "0"; "11"; "0"; "0"; "0";"16" "12"; "1";"TILE_TORCH_FROST" ; "8396808"; "0"; "N/A";"fxtr"; "0"; "0"; "0"; "0"; "11"; "1"; "0"; "0";"16" @@ -159,7 +159,7 @@ object TilePropCSV { ## Illuminators ## # Illuminator white: RGB(228,238,234), simulation of a halophosphate FL lamp (If you want high CRI lamp, collect a daylight!) -# Defalut torch : L 64 a 28 b 48 (Planckian 1 770 K); real candlelight colour taken from Spyder5 colorimeter +# Defalut torch : Y 64 x 0.55183 y 0.40966 (Planckian ~1 770 K); real candlelight colour taken from Spyder5 colorimeter # Sunstone: Artificial sunlight, change colour over time in sync with sunlight. The light is set by game's code. # Sunlight capacitor: daylight at noon. Set by game's code. diff --git a/work_files/Tools/8bcolto10bcol.py b/work_files/Tools/8bcolto10bcol.py new file mode 100644 index 000000000..33b7c7af7 --- /dev/null +++ b/work_files/Tools/8bcolto10bcol.py @@ -0,0 +1,21 @@ +def rawTo10bit(bit): + b = (bit & 0xff) + g = (bit & 0xff00) >> 8 + r = (bit & 0xff0000) >> 16 + return to10bit(r, g, b) + +def to10bit(r, g, b): + return (r << 20 | g << 10 | b) + + +def from10bit(tenbit): + r = (tenbit >> 20) & 0xff + g = (tenbit >> 10) & 0xff + b = tenbit & 0xff + return (r, g, b) + +def to8bit(r, g, b): + return (b << 16 | g << 8 | r) + +print to10bit(255, 163, 0) +print from10bit(226629701) \ No newline at end of file