Build 4472
SVN-
General
Fix two Polymer crashes related to corrupted maps.
SVN handles and Git names are merged into one person.
Fix two Polymer crashes related to corrupted maps.
in linking tag determination, handle 'on' switch picnums (+1).
in e.g. F5 "next free tag" display, note object w/ greatest tag.
don't read some variables from mapster32.cfg redundant since r4344.
Mostly, these are rendering-related variables. We keep *writing* them to mapster32.cfg so that older Mapster32 versions can be used side-by-side for now.
make r_usetileshades 2 the default.
This mode does not take a sector's visibility values into account for uniform darkening of a texture. It is more faithful to classic with respect to fog/visibility *distances*, but may be less so as far as the "tint" of the texture due to visibility attenuation is concerned.
engine.c: instead of fogpal post-tweaks (last 2 commits), normalize by numshades-1.
That is, for every for palette (now, even ones created by the user) the last shade is the (or rather, a color close to the) full fog color by construction. In loadpalette(), reject a PALETTE.DAT with only one shade level.
engine.c: extend the last workaround to all four fogpals generated at startup.
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.
engine.c: clean up scansector().
Makefile.common: pass Clang sanitizer flags in release DEBUGANYWAY builds, too.
Also, - add a static assertion to engine.c - gameexec.c: compile out an unused function in Lunatic builds
add getactor[]/sprite[] member 'movflags'.
This is exactly the same as the actor[].movflags member in the Lunatic build: http://lunatic.eduke32.com/lunatic.html#actor
(better) document sector[].visibility, sprite[].clipdist, player[].weapon.
Hack around HOM when passing through a masked wall, but only on Android because the solution isn't very good.
In ext. PALETTE.DAT, store log2 of last alpha table index. Handle alpha in classic.
The extended PALETTE.DAT format can now carry a trailing byte, called 'lognumalphatables'. If it is present, the engine assumes that alpha blending tables are loaded at blend indices 1 to 1<<lognumalphatables and handles rotatesprite's alpha and spriteext[].alpha accordingly. The ability to save this new byte is added to engine.lua:savePaletteDat() and the corresponding convenience functions in shadexfog.lua. Examples test/screentext.con and test/sprite_access.con are updated for demonstration purposes.
Mapster32/Lunatic: add descriptions to [;]+[F] menu entries shown in upper left.
BUILD_LUNATIC.
engine.c: for printext16(), make newlines do what you expect them to.
a.m32: for showpal==1, also show editor colors with printext16.
Mapster32/Lunatic: hook up shadexfog.save() and saveLookupDat() to [;]+[F] menu.
Mapster32/Lunatic: add functionality to connect Lua funcs to s.bar menu [;]+[F].
Hook up those from test/shadexfog.lua and some debugging ones from engine.lua.
factor out [']+[F] common code into "class" StatusBarMenu.
Rename sector[].filler member to '.fogpal'. From CON, keep the '.alignto' alias.
The overall situation is thus as follows: - in C and from Lua, that member is called 'fogpal' - In CON (both C-CON and LunaCON), it's 'fogpal' with 'alignto' being an alias; 'filler' wasn't available before, either. - In m32script, it's 'fogpal' or 'alignto' ('filler' is not available any more)
In non-lookup OpenGL modes, make sector[].filler (rename pending) override fogpal.
That is, if that member has a nonzero value, that one is taken for the color of the GL fog instead of (most of the time) sector[].floorpal. "Sky sectors", that is, skyboxes or simply parallaxed floors/ceilings are *not* handled.
a.m32: add state 'for_sprites_near_picnum'.
The state quries the user for four values: ref. picnum, target picnum, max. ldist and a lotag. Then, for all sprites i (of ref. picnum), for all sprites j (of target picnum), if ldist(i,j)<=maxldist, sprite j's lotag is changed to the provided one. Also add lunatic/test/maputil.lua, containing a similar function but allowing to customize the selection predicates of the ref. and target sprites, as well as the action to carry out.
engine.c: clean up code around wallmost(), owallmost() and grouscan().
Add a second DNCOORDS/cl_showcoords mode, showing some renderer settings.
Also, extend the documentation for r_usenewshading a little. Specifically, note when the different modes were introduced. BUILD_LUNATIC.
disable normal/parallax mapping in rotatesprite.
It was plainly noticeable in the editor's tile info display, for example.
Amend r4394: don't use full brightness (glColor() factor 1) with hightiles.
This is done by factoring out some polymer.c:polymer_getbuildmaterial() code into polymer_eligible_for_artmapping() and using that. The one in polymer.c can still determine to not use ART mapping on some ("rare"?) occasions, so it's not 100% in sync.
Minor Polymost code cleanup.
- factor out eligible_for_tileshades() - remove some rendmode 1 code - move some auto vars further down
add some shade/vis debugging functions.
engine.lua: linearizeBasePal(), mapster32 only test/shadexfog.lua: create_depth_shtab(), create_vismarker_shtab()
provide access to wall[].blend.
Polymer/rotatesprite: don't redundantly apply shade glColor() with ART mapping.
introduce r_usenewshading 3 and make it the default.
With this mode, the near distance of the linear fog is always 0, unlike being negative with r_usenewshading 2.
Factor out approaching val. to target val by half-difference steps into logapproach().
Fix a case in G_MovePlayers(), where the player sprite's shade is approached toward the ceiling/floor's shade. Before, it could stop at one above or below!
engine.c: check (non-)clipping over a floor curb of an upper TROR neighbor.
engine.c: factor out two functions from clipmove().