longcurrent_color is assigned per vertex, but it is not saved on each
vertex on creation (unlike their "color" attribute, used when lighting
is enabled).
As a consequence, and because rendering happens asynchronously (rather,
following the draw call queue managed by zdirtyrect.cpp when requested
to flip current buffer), longcurrent_color at clipping time can be
different to the one at vertex declaration time, causing color artifacts.
The effect is most noticeable in EMI set shi, in the grog dispenser +
shipyard manager closeup angle, when Guybrush exits the screen by
crossing its right border: dark triangles become visible on his face.
Instead, always use the color attribute, which is already properly
initialised on vertex creation.
I based ARGB scaling on ST scaling without giving it enough thought.
It accidentally uncovered an older bug in glopClear, which made me recheck
these formulas.
ST scaling maps [0.0, 1.0] to [0x01.0000, 0xff.0000], meaning the first and
last texture rows and columns are never shown.
Treating s and t as proportions of ST_MAX fixes this by mapping to
[0x00.0000, 0xff.fffc] (last two fractional bits being off-precision, as
there are only 14 bits), covering the whole available range.
Linking TinyGL and OpenGL into the same binary could cause conflicts
because both have a glColor3fv function.
It is currently not used in ResidualVM, so it is safe to change this.