Build 4928
SVN-
General
Fix a crash exposed by animating the menu back button.
SVN handles and Git names are merged into one person.
Fix a crash exposed by animating the menu back button.
Fix kplib zip support
MSYS2 build fix. DONT_BUILD.
Fix savemapstate/loadmapstate (fixes a crash at shutdown, among other things)
Fix wildmatch(), resolves errors matching things like "*.zip" with "duke3d.hrp.zip" for example.
MSVC build fix... guess it was upset about the macro expansion
Fix off-by-one error in setview()
Fix aligned screentext with newlines.
Fix tdupsprite in m32script.
Fix Mapster32 sector copying
Fix compiler warnings
Fix undefined behavior in Polymost
Crash fix
fix wall and floor sprites clipping into or z-fighting with surfaces (replaces glDepthRange() hacks for sprites), add r_nofog cvar for debugging, reduce the total number of OpenGL calls by only calling glFogi() to set the fog mode when initializing the renderer or changing r_usenewshading.
Introduce "twalltype" for temporary uses of walltype where using wall_tracker_hook() would be invalid. This is similar to "tspritetype" and fixes a bunch of problems in the editor that cropped up when changing the tracker sanity checks to an assert that only exists in debug builds (branching upon any write to a sprite, sector or wall had an unacceptable impact on performance).
Fix Mapster32 bug where pressing "O" on a sprite twice would corrupt your map due to unchecked use of hitscan results.
Fix distrecip calculation
MSVC C++ build fixes. DONT_BUILD.
Fix up weapon switching deficiencies
engine.c: fix clipmove() against upper part of wall-aligned sprites.
game.c: revert changes of r4861 ("consult g_mirrorCount instead of gotpic[]").
always return non-negative values from 'clipmove' and related.
Previously, the C function clipmove() returned negative values when hit a wall (32768+wallnum) or sprite (49152+spritenum) because internally, these values were encoded into a *signed* 16-bit integer. This made no difference to C code using it, since it always proceeded by bit checks, but was inconsistent with documentation on CON 'clipmove' on the wiki. The following commands are affected too, since they use the value returned by clipmove(): 'clipmovenoslide', 'movesprite'. Also, the value of actor[].movflag ('htmovflag' from CON). Also, fix 'clipmove*' in LunaCON and add lunatic/test/checknearwall.con as an example of how to implement a being-close-to-a-wall checker as requested in http://forums.duke4.net/topic/7869-determining-closeness-to-a-wall/
engine.c: fix clipmove() against floor-aligned sprites.
Introduced in r3207. Oops.
sounds.c: don't crash S_PlayMusic() if passed null pointer for 'fn'.
This may happen if no title/end music is defined from CON. Thanks to Zaxtor for the bug report.
Fix the Screen Size slider so that it works properly after the screen size has been modified in-game with [-]/[+].
Fix selecting "None" for Anisotropy.
Fix opening a MenuEntryOptionList when the option's value is "Custom".
Fix playing end-of-episode ANMs.
fix 'writearraytofile' for 64-bit platforms.
Tweak the behavior of viewscreens to what is more logical IMO.
- At a given time, at most one viewscreen may display TILE_VIEWSCR, namely that one which is g_curViewscreen - sync kinds of distance to compare against VIEWSCREEN_ACTIVE_DISTANCE (was Manhattan vs. dist(), now both the latter) - fix resetting to VIEWSCREEN tile when player is greater from it than that distance. When the player is closer to it again, it is *not* reset to TILE_VIEWSCR. - more sync'd g_curViewscreen and sprite[i].yvel (for 'i' being the viewscreen sprite) Note: in a multiplayer context, this needs to be thought about once more.
In C-CON build, prevent leak of gamevar/gamearray labels on savegame loading.
Also, rewrite the loops in Gv_Free() and Gv_Clear() in the plain fashion so that they are correct even if the number of gamearrays exceeds the number of gamevars.
cache1d.c: Revert changes in r4665 unrelated to unrolling, fixing oob write.
Specifically, we must make sure that dasizeof <= LZWSIZE (or so) in c1d_{read,write}_compressed() (what the assertion in the last commit was about, and is now redundant). This fixes saving of e.g. large gamearrays with the C-CON build. Bump BYTEVERSION. An alternative for setting dasizeof to 1 would be to factor it and keep dividing as long as it's > LZWSIZE.
include wall[].ypanning in wall invalidation logic.
Fixes bug reported here: http://forums.duke4.net/topic/1348-mapster32-problems-and-bugs/page__view__findpost__p__213759
Bump MAXJOYAXES to 9 to avoid menu corruption, and fix _functio.h, CONFIG_FunctionNameToNum, CONFIG_AnalogNameToNum, so that this does not crash.
Fix the MAXJOYBUTTONS discrepancy between _control.h and gamedefs.h.
Fix "bright red" player color.
Add a custom exception handler that saves the crash information to the log and directs the user to submit it to us. DONT_BUILD.
Work around a performance regression caused by r4080. DONT_BUILD.
show on-screen errors even in passive menu; fix '(display)rand*' for large values.
Also, some minor style cleanup in game.c. DONT_BUILD.
fix handling of 'remappal' attribute for 'makepalookup'.
Fix build. DONT_BUILD.
Fix building with `make -B`. (`make veryclean` is now obsolete.) DONT_BUILD.
Fix building the Build Tools. DONT_BUILD.
Fix the previous commit. DONT_BUILD.