engine.c: after creating gray fog palookup, make its greatest shade map to same color.

Concretely, for all 1 <= i <= 255, make graypalookup[31][i] := graypalookup[31][0].
Also document 'fogpal' in the Lunatic doc.

git-svn-id: https://svn.eduke32.com/eduke32@4456 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2014-04-29 19:34:25 +00:00
parent b7910b1bcf
commit fc77a8aa3d
3 changed files with 13 additions and 1 deletions

View File

@ -8254,11 +8254,16 @@ int32_t loadlookups(int32_t fp, uint8_t **basepaltabptr)
for (j=1; j<=255-3; j++)
if (!palookup[j] && !palookup[j+1] && !palookup[j+2] && !palookup[j+3])
{
int32_t i;
makepalookup(j, NULL, 15, 15, 15, 1);
makepalookup(j+1, NULL, 15, 0, 0, 1);
makepalookup(j+2, NULL, 0, 15, 0, 1);
makepalookup(j+3, NULL, 0, 0, 15, 1);
for (i=1; i<255; i++)
palookup[j][((numshades-1)<<8) + i] = palookup[j][((numshades-1)<<8)];
firstfogpal = j;
break;
}

View File

@ -608,6 +608,12 @@ correspond to a steeper ``darkening'' (or fogging) attenuation with
distance. Linear visibility 0 -- corresponding to `sector[].visibility` of 240
-- means no attenuation with distance.
_`u8`_ `fogpal`::
In the OpenGL modes that don't use per-pixel shade table lookups, setting
`fogpal` to a non-zero value overrides the fog color of the sector to that of
the corresponding pal number. These are either expected to have been defined
using DEF tokens `fogpal` or `makepalookup`, or created by EDuke32 at startup.
_`i16`_ `lotag`, `hitag`, `extra`::
General-purpose ``tags'' provided for game programming. They may be used by
various EDuke32 sector effects, so it is not recommended to use them in

View File

@ -57,7 +57,8 @@ onevent EVENT_ENTERLEVEL
addvar j 1
userquote 500
break // while is inner: "continue"
} // 3x "==="
userquote 400
} // 3x "===", no quote 400
setvar j 0
whilevarn j 1