luanti-org/luanti

Bad documentation on color palettes

Open

#11,927 opened on Jan 3, 2022

View on GitHub
 (3 comments) (0 reactions) (0 assignees)C++ (2,395 forks)auto 404
@ DocumentationLow priorityRequest / Suggestiongood first issue

Repository metrics

Stars
 (13,341 stars)
PR merge metrics
 (PR metrics pending)

Description

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

Contributor guide