Build 8642
SVN-
General
polymost.cpp: In gloadtile_art_indexed(), reallocate a texture when the tile changes dimensions even if it is shrinking
SVN handles and Git names are merged into one person.
polymost.cpp: In gloadtile_art_indexed(), reallocate a texture when the tile changes dimensions even if it is shrinking
game.h: fix calc_smoothratio_demo() to take into account differences between timerGetClockRate() and TICRATE when calculating the refresh frequency to interpolate between
polymost.cpp: fix buffer overflow issue in uploadpalswap() & correct the code to initialize an extra row of black pixels
clockticks.hpp: Fix issue where higher precision comparisons would cause unexpected behaviour with game loop code due to ototalclock being incremented rather than set to totalclock (causing a lack of subtick precision and potential doubled up/dropped game updates).
Provide compareHighPrecision() for any code that needs higher precision comparisons.
kenbuild/src/game.cpp: Fix compilation issue due to removal of sqr() from pragmas.h in r7597
Change some clocks to support sub-tick precision using a new class, ClockTicks.
Using that higher precision, interpolate at a higher granularity. Further, truncate the target interpolation time to vertical blank boundaries to avoid producing temporal artifacts. Fix issues caused by interpolation calculations being handled differently in multiple places (and fix cases where smoothratios were being thrown away only to be redone without checking all proper conditions). Ensure ClockTicks changes do not break other targets (EKenBuild, VoidSW), but note any interpolation there is not similarly updated.
timer.cpp: fix order of operations issue with timerUpdate()
timer.cpp: avoid using floating point arithmetic in timerUpdate()
sdlayer.cpp: use glFinish() to synchronize with the buffer swap
timer.cpp: improve cross-platform & cross-compiler issues relating to precision & period.
Handle timerlastsample such that we don't throw away time & run slow in certain cases. Ensure when calculating n, we do the double division first before multiplying for sake of floating point precision.
sounds.cpp: fix infinite loop caused by removal of "else" in r7939
Fix issue with indexed colour textures where in the case that tiles entered the texcache while !waloff[picnum] & were later (re)loaded, the earlier pth pointing to the tilesheet containing the blank tile would never be properly replaced with an updated gl texture.
game.cpp: move check for quitevent during start-up so that if start-up is cancelled during definitions parsing, the game won't continue to play in a half-loaded state.
gameexec.cpp: allow G_ShowView() to execute regardless of the state of g_screenCapture.
This fixes skyboxes not rendering in TILE_SAVESHOT.
tiles.cpp: backup & restore picsiz, walock, & waloff alongside other per tile arrays in artClearMapArt() and artSetupMapArt()
This fixes an issue with viewscreens as tiles that are setup game-side after a map is loaded could have their sizes reset to 0 while not being properly cleared from walock/waloff
sector.cpp: ensure that if scripts have told us not to render normally to the tile, that we still handle restoring our target & setting up the tile appropriately for what the script may have rendered
engine.cpp: make renderSetTarget() more robust so that passing an xsiz or ysiz <= 0 is not accepted and can't cause a segmentation fault
polymer.cpp: fix issue where assert could fail due to HUD model sprites having an owner >= MAXSPRITES
polymost.cpp: Fix issue where tiles whose dimensions had grown would not have their sizes updated in GL and could fail to update their texture data
polymost.cpp: If a tile in the tilesheet is large enough to fit a redefined tile, use that space rather than allocating a new texture
polymost.cpp: if an indexed colour tile is being reloaded, changed dimensions, and no longer matches the calculated tilesheets, generate a separate texture for it.
Similarly, if the tile does match the calculated tilesheets but was a separate texture, delete the texture and load the tile back into the tilesheet.
build.vcxproj: Execute custom build tools & step before BuildGenerateSources
polymost_scansector(): avoid using a culling method not designed for voxels when handling 1-sided wall aligned sprites that have voxel replacements
Fix mixing offscreenrendering (render targets) and mirrors. Don't allow recursing beyond 1 level of mirroring through multiple levels of render targets.
Fix rendering skyboxes to a tile by altering renderSetTarget() & renderRestoreTarget() to set & reset xdim & ydim so that G_ShowView() can render while a render target is set,
and additionally modifying G_SetupCamTile() to call EVENT_DISPLAYROOMSCAMERATILE after calling renderSetTarget()
tilepacker.cpp: enclose macro substituted values in parenthesis
Add updatesectorneighbour() and updatesectorneighbourz() and make them accessible to CON to allow searching for nearby neighbouring sectors from a known sector.
These updatesector counterparts are more performant for tasks that require determining whether nearby sectors exist at a point as they will not exhaustively search the map. This also leads to more correct behaviour when sectors are disjoint, as queries will breadth-first search neighbouring sectors rather than risk accidentally stumbling first across accomodating disjoint sectors.
Fix edge case where mirrors & TROR could interact and render over skyboxes in the classic software renderer
Fix parallel build by switching to generating .obj files from .glsl files and treat the shader source as an externed global resolved at link time.
Additionally, remove the no longer necessary shader generated headers folder from .gitignore