beyond-all-reason / spring

A powerful free cross-platform RTS game engine
https://beyond-all-reason.github.io/spring/
Other
182 stars 95 forks source link

QTPFS path drawer: get rid of useless multiplication #1468

Closed sprunk closed 2 months ago

lhog commented 2 months ago

These are compile time evaluated and were probably done like that to iterate on colors faster.

sprunk commented 2 months ago

My main motivation is to prevent seeing 1 * 255, 1 * 127, 0 * 255 and being misled into thinking you're supposed to look for yellow because it's 1, 1, 0. And then seeing orange (which is 1, 0.5, 0 in fractions), trying to find its meaning in the code and being unable to because you're looking for 1 * 255, 0.5 * 255, 0 * 255 which is not there.