luanti-org/luanti

Bad documentation on color palettes

开放

#11,927 创建于 2022年1月3日

 (3 条评论) (0 个反应) (0 位负责人)C++ (2,395 个派生)auto 404
@ DocumentationLow priorityRequest / Suggestiongood first issue

仓库指标

星标
 (13,341 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Problem

I'm using param2 = 'color' and param2 = 'colorfacedir' for blocks and stairs/slab combos. Per the api,

If the palette has less than 256 pixels, then it is stretched to contain exactly 256 pixels (after arranging the pixels to one line). The indexing starts from 0.

I read this as stretching and blurring the pixels, not as stretching and keeping the same pixels and duplicating them.

Solutions

The api should say whether the pixels are scaled with or without interpolation.

Alternatives

If the scaling should have interpolation consider this a bug report I guess. 0.o

Additional context

Numbers up top are the param2 values. In a 1x8 palette there is no difference between 110 and 96, but when I scale the palette up in GIMP it works as I would expect it too. param2

贡献者指南