Fox, on 17 March 2012 - 03:49 PM, said:
I am a little confused, but why
fogpal overwrite my lookup palettes?
Essentially I am trying to make this:
Looks like this:
However the second picture is a mock-up, I can't actually make the fog work in conjunction with a pallette.
DEF's fogpal is just a wrapper around makepalookup(), which creates palette lookups that can either be remap-only (black "visibility fog"), or ones that blend to a particular color with increasing distance. Note though, that the 256 colors of the currently active base palette is all you have with palookups; creating a fogpal with a color that isn't well represented by the palette will be accompanied with ugly quantization and/or hue artifacts. You're overwriting old pals because that's how the system works: there's no real distinction between colored and black-fogged ones.
What you'd want instead is to create a new
base palette like those used for the other full-screen tinting effects (goggles, underwater, under-slime). Currently, this involves editing lookup.dat and replacing one of the non-game palettes: for the title, 3D Realms logo, or ending. I'm sure Lezing has some experience with this.
While I'm on the subject, this post shows that there's room to allow for more user-friendly modding: one thing is that it should be possible to specify base palettes more easily. Another is that a while ago, the question of different blending modes came up. With classic, it should be possible to have an arbitrary blending table in the place of the translucency one, since all it does is to take two color indices and return the result index. This would even be a somewhat exclusive features to 8-bit lovers, since OpenGL only has a couple of hard-specified blending modes (not counting anything you could do with shaders, of course).
edit: don't mind the horrible Ynglish.