Build 5177
SVN-
Generale
Restructure and expand some ART loading functionality in the engine.
Nickname SVN e nomi Git sono unificati per persona.
Restructure and expand some ART loading functionality in the engine.
polymost.c: fix display of floor-aligned sprites ornameted to the ceiling.
polymost.c: split three overlong lines into three each.
This was formerly "fix multi-tile ceiling skies.", but TX beat me to it and Git automatically figured out how to merge while keeping a linear history. (Our fixes were identical.) Nice!
Double the size of clouds[] (holding sectors with CLOUDYSKIES ceilings).
Also, make cloudx[] and cloudy[] scalars, as the per-sector values were always identical. In prelevel(), warn if some CLOUDYSKIES-ceiling sectors could not be set up due to reaching the new 256 sector limit.
actors.c: fix 3 incorrect '/' -> tabledivide32_noinline rewrites in r4658.
Division has higher precedence than bitwise-OR. The cases concerned SE3, SE4 and NEON* sprites. Incidental info: the blinking of NEON* sprites can be controlled via their lotag, similarly to how you how you give a "random flash number" as SE4 hitag.
Polymost parallax sky fix.
Make all the hictinting_apply blocks consistent. This should fix certain tints types being applied incorrectly in Polymer and the global tints (underwater and nightvision) not being applied to tints and models with certain flags.
Correct the HICTINT_GRAYSCALE calculation for hightile.
Complete the necessary infrastructure so that more than one precomputed tint on a hightile texture will display.
Eliminate a check that a model's sector's floorpal is nonzero before applying a tint.
Account for HICTINT_APPLYOVERALTPAL and HICTINT_USEONART.
Implement "renamefile" during game-side def parsing (normally for "loadgrp" et al.) in addition to engine-side def parsing.
Mapster32/C++ build/non-Lua: probably fix a crash in showsectordata().
Reported in http://forums.duke4.net/topic/1348-mapster32-problems-and-bugs/page__view__findpost__p__220722 I could not reproduce it, but it is thinkable that 'searchsector' could have been out-of-sync with the 'sectnum' local. (For example, the former one could have been -1, triggering the crash.)
polymost.c: fix an out-of-bounds access in polymost_dorotatesprite().
To reproduce, lower the OSD, for example.
Add token "forcefilter" to textures, skyboxes, and model skins. It forces the use of GL filtering for the resource in question.
Fix Polymost issue reported at http://forums.duke4.net/topic/775-eduke32-20-and-polymer/page__view__findpost__p__220265
Engine memory reductions/optimizations:
-faketilesiz[MAXTILES] removed in favor of simple faketile[(MAXTILES+7)>>3] bitfield -h_xsize/h_ysize (tile size overrides from .def) are now uint16_t instead of int32_t -hudmem[2][MAXTILES] removed in favor of adding a hudmem ptr to mdmodel_t -tilefromtexture performance improvements -more tsectortype/twalltype usage in various engine functions that read but never write -continued Polymost cleanups and refactors. Please report any odd rendering errors.
Large batch of Polymost changes, including:
-lots of stylistic rewrites -further improvements to anti-fighting code for wall and floor sprites (introduces three new cvars, r_wspr_offset, r_wspr_offset_variance, and r_fspr_offset) -fixed brief HOM when traversing through a one-way masked wall -seldomly used "alphahack" feature for hightile textures now represents alpha cutoff internally as a single byte instead of a float -fixes a handful of issues where geometry failed to draw at certain coordinates from certain angles in certain resolutions -renames a couple of cvars
Polymer tsectortype usage. DONT_BUILD.
Minor stylistic changes, fix FPS counter and other 2D drawing in Polymer.
Further gamevar changes/optimizations. This also fixes a bug Fox reported with the "shortcut" access to structure members that's tacked on to GetVar, where if the value of the index you're trying to access happened to equal the ID of the current sprite, it would act as if the variable passed was THISACTOR.
Add "globalflags" def token. Flag 1 is a kill switch for the tileshades and artmapping features. Flag 2 is kill switch for the GL fullbright rendering pass.
Change HICTINT_USEONART so that it applies tints to pal 0 of 8-bit tiles instead of their palswapped selves. Add HICTINT_APPLYOVERPALSWAP which applies tints to palswapped 8-bit tiles. Add HICTINT_APPLYOVERALTPAL, which applies tints to alt-pals of hightile textures.
engine.c: style-cleanup getzrange(). DONT_BUILD.
Classic/Polymost: factor out update of starting sectnum, use updatesectorbreadth().
The latter means that running perpendicular thin sector is handled better if there are e.g. TROR sectors in the same x/y space.
actors.c: make Enforcers and Troopers avoid ST1 sectors as in Duke3D.
That is, resurrect the stayput condition for LIZMAN and non-flying LIZTROOP, but only if changing from a non-ST1 sector. DONT_BUILD.
Stick update of 'totalclocklock' at beginning of G_DrawRooms() instead of drawrooms().
This fixes engine-side sprite animation in the following scenario: CON code wants to draw a scene from EVENT_DISPLAYREST, but since it covers the whole screen, disables the drawing of the 3D scene beforehand (RETURN set to 1 from EVENT_DISPLAYROOMS). DONT_BUILD.
in 'for i drawnsprites' handling, back up and restore sprite MAXSPRITES-1.
This fixes the level 5 corruption encountered when issuing that iteration. (Because the last sprite would be changed from e.g. statnum MAXSTATUS to 0.) It is also mandatory anyhow since the last sprite may be contained in the map.
style-cleanup check_spritelist_consistency() and VM_Execute(): 'for'.
DONT_BUILD.
Under conditions of CLASSIC_Z_DIFF_64 (r4960), make some drawvox() vars 64-bit.
- In drawvox(), make view-relative x and y high-precision on desktops. To a large extent (but not completely), this fixes "stray" fake floor shadow sprites for voxels. - In the mouse picking code for voxels, fix a possible integer overflow. A new engine.c-private function mulscale_triple30() is added. DONT_BUILD.
Fix Mapster32 mouse cursor in GL
Fix Polymer when switching from Polymost
Nocompress and nodownsize for skyboxes
Polymost changes to better support running under GL ES. Still need to investigate GL_LINES and GL_QUADS... neither work under either GL -> GL ES wrapper we've tried, so we must be doing something wrong.
Minor engine cleanup
Rename "Polymost.f" string back to "Polymost" because it only confused users.
in build.c, prevent oob of wall[] if joining non-adjacent sectors.
Also, some minor stylistic cleanup.
Remove some conditional disabling of spriteext features when !defined USE_OPENGL.