Build 4965
SVN-
fix underallocation of TILE_TILT and tilting at very small resolutions.
Mostra dettagli
Since TILE_TILT is only allocated once, it must be done with the maximum possible size.
Nickname SVN e nomi Git sono unificati per persona.
fix underallocation of TILE_TILT and tilting at very small resolutions.
Since TILE_TILT is only allocated once, it must be done with the maximum possible size.
fix "windowed" modes (r_size >= 12) by reverting r4920; adapt.
In setview(), we now assert windowx2 < xdim. The only calling places where its non-violation is non-trivial to ascertain are (1) showview from CON and (2) draw-to-tile for look-sideways in game.c. AFAICS case 1 should be fine. Case 2 is adapted; see comments there.
introduce two signed integer types, use in engine.c and a-c.c.
They classify former uses of int64_t into two classes: - coord_t: those that represent coordinates and need 64-bit precision for proper functioning with large values - inthi_t: those that were added for e.g. casts merely to prevent undefined behavior on overflow DONT_BUILD.
fix fog/visibility on ceilings.
prevent visibility overflow on sloped ceilings/floors at large distances.
fix oob read of frame buffer when leftmost vline has a mirror.
In the mirror reversing code, get rid of the padding. This may produce seams, but they appear to be extremely transient and shouldn't be noticeable. In game.c, add a debugging compilation switch DEBUG_MIRRORS_ONLY.
fix drawing tilesizy=512 walls, use non-pow2 routines with pskies.
The former is really only a workaround. Walls/vertical sprites/pskies with ysize 512 (and presumably greater, but this was not tested) are rendered with one shade higher at the borders (1 pixel vlines) because of a certain assumption in the ASM (see comments there). With very dark shades, the palookup[] buffer is accessed oob. We simply allocate 256 bytes more at the end for each. The latter is only for CLASSIC_NONPOW2_YSIZE_WALLS builds, which is not enabled yet. It seems to matter only for the uncommon case where the such pskies repeat in the height. A 1680x1050 window fully covered with such a sky is then rendered at about 60/85 the FPS for me (mostly due to not using the 4 pixel vline routines), so it may be leaning a bit too much on the side of correctness. A compilation switch DEBUG_TILESIZY_512 is introduced in engine.c for demonstration purposes.
fix rotatesprite with no screen scaling and non-widescreen aspects.
Also, enable showing sprites in Mapster32's overhead view again, since that was one (the only?) use of that code path. The uninitialized read was introduced in r2927.
on x86 GCC asm builds, fix crash with floor sprites of (x or y) size 2.
The idiv instruction also signals an FPE when the resulting *signed* quotient overflows, so we simply use div instead.
draw walls with non-pow2 ysizes in the old fashion for the time being.
I'm willing to make this one concession to correctness in the name of backward- compatibility. I think that one reason why this has never cause a crash is that tiles in BUILD are allocated in Ken's big allocache buffer, so oob accesses were dampened by that (though they hit uninitialized data).
fix glitches where stuff would be drawn transiently on sect change.
This was introduced with r2771, which fixed e.g. AMC TC city_si's mirrors, but instructed the base drawrooms inside yax_drawrooms to not correct the passed sectnum. Therefore, stuff would get drawn wrongly when passing sector boundaries, like from the platform to the rails in trueror1.map.
fix drawing mirrors, introduced by nonpow2-ysize wall/mask drawing.
Some more drawing glitches remain.