Subversion Repositories eduke32

Rev

Show changed files | Details | Compare with Previous | Blame | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
5071 2212d 12h terminx /polymer/eduke32/build/src/engine.c Minor stylistic changes, fix FPS counter and other 2D drawing in Polymer.  
5056 2226d 16h hendricks266 /polymer/eduke32/build/src/engine.c 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.  
5051 2227d 13h hendricks266 /polymer/eduke32/build/src/engine.c Partially revert r5020. It's okay to update totalclocklock in G_DrawRooms(), but we must continue updating it in drawrooms() so as to not break the editor and every other BUILD game.

¿Por qué no los dos?
 
5035 2234d 23h helixhorned /polymer/eduke32/build/src/engine.c engine.c: style-cleanup getzrange(). DONT_BUILD.  
5024 2242d 0h helixhorned /polymer/eduke32/build/src/engine.c 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.
 
5020 2244d 15h helixhorned /polymer/eduke32/build/src/engine.c 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.
 
5017 2244d 19h helixhorned /polymer/eduke32/build/src/engine.c 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.
 
5001 2253d 8h terminx /polymer/eduke32/build/src/engine.c 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.  
4984 2253d 8h terminx /polymer/eduke32/build/src/engine.c Minor engine cleanup  
4981 2253d 8h terminx /polymer/eduke32/build/src/engine.c More twalltype  
4971 2256d 5h hendricks266 /polymer/eduke32/build/src/engine.c Engine: Remove some conditional disabling of spriteext features when !defined USE_OPENGL.  
4965 2256d 19h helixhorned /polymer/eduke32/build/src/engine.c Classic: 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.
 
4961 2256d 19h helixhorned /polymer/eduke32/build/src/engine.c Make g_player a +1 offset pointer into 'static g_player_s[1 + MAXPLAYER]'.

This fixes the out-of-bounds read of former g_player[] in VM_EventCommon_().
 
4960 2256d 19h helixhorned /polymer/eduke32/build/src/engine.c Classic: on desktops, handle abs. z diff. of floor/ceiling to camera >= 1<<24.  
4959 2256d 19h helixhorned /polymer/eduke32/build/src/engine.c engine.c: style-cleanup owallmost() and wallmost(). DONT_BUILD.  
4938 2276d 11h helixhorned /polymer/eduke32/build/src/engine.c engine.c: in qsetmodeany(), call initsmost() after setting xdim and ydim.

This makes sure that the engine arrays have sufficient space allocated for usage
in Mapster32's 2D mode, for example from drawmapview().
 
4935 2276d 14h helixhorned /polymer/eduke32/build/src/engine.c Classic: 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.
 
4933 2276d 16h helixhorned /polymer/eduke32/build/src/engine.c Fix bsearch() call for user G_LoadMapHack(): don't access nonexistent storage. DONT_BUILD.  
4931 2276d 17h helixhorned /polymer/eduke32/build/src/engine.c engine.c: fix memory leak. DONT_BUILD.  
4927 2278d 12h hendricks266 /polymer/eduke32/build/src/engine.c Fix a crash exposed by animating the menu back button.  
4920 2280d 6h terminx /polymer/eduke32/build/src/engine.c Fix off-by-one error in setview()  
4904 2284d 8h terminx /polymer/eduke32/build/src/engine.c Polymost: 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.  
4899 2284d 8h terminx /polymer/eduke32/build/src/engine.c Fix distrecip calculation  
4898 2284d 8h terminx /polymer/eduke32/build/src/engine.c Revise C++ structure trackers for performance and introduce "tspritetype", for temporary sprites or other usages where using the trackers would be invalid or undesired. DONT_BUILD.  
4890 2284d 8h terminx /polymer/eduke32/build/src/engine.c MSVC C++ build fixes. DONT_BUILD.  
4884 2286d 22h hendricks266 /polymer/eduke32/build/src/engine.c Implement UserMapHacks.  
4882 2288d 16h helixhorned /polymer/eduke32/build/src/engine.c engine.c: fix clipmove() against upper part of wall-aligned sprites.  
4881 2288d 17h helixhorned /polymer/eduke32/build/src/engine.c engine.c: on non-touch devices, roughly double maximum voxel drawing distance.

By setting DISTRECIPSIZ to 131072, as far as I can see the absolute maximum
that's possible with the integer scaling convention of the voxel drawing code.

BUILD_LUNATIC.
 
4877 2290d 18h helixhorned /polymer/eduke32/build/src/engine.c engine.c: prevent multiple collection of same sector in scansector().

Also for polymost_scansector(). These were likely of little consequence
because collection in scansector() is the exception than the rule (see
added comments), and because the redundant drawwalls() would find the
x range done the second and following times.

Also, add a bound check for sectorborder[] (the limit was probably rarely
hit in practice, but the check is mandatory nontheless) and add functions
printscans() and printbunches() in the DEBUGGINGAIDS=2 build.
 
4876 2290d 18h helixhorned /polymer/eduke32/build/src/engine.c engine.c: in drawmasks(), remove sorting sprites by statnum.

There were various issues with that code.
- It does not seem to be very meaningful to do so.
- It was carried out on the same range as the sprites sorted by z coordinate
(those with equal x/y) just a few lines away, effectively overriding it.
The former is very meaningful, though.
- It led to inconsistencies between editor and game, see
http://forums.duke4.net/topic/775-eduke32-20-and-polymer/page__view__findpost__p__214873
 
4875 2290d 18h helixhorned /polymer/eduke32/build/src/engine.c Cleanup of various engine functions.

- factor out calculation of player-relative and screen+clipped-player-relative
coordinates into get_rel_coords() and get_screen_coords(), respectively
- the usual beautification stuff, especially since we're now on C99
 
4874 2290d 18h helixhorned /polymer/eduke32/build/src/engine.c CON: 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/
 
4873 2295d 17h helixhorned /polymer/eduke32/build/src/engine.c engine.c: fix clipmove() against floor-aligned sprites.

Introduced in r3207. Oops.
 
4872 2295d 17h helixhorned /polymer/eduke32/build/src/engine.c engine.c: prevent an oob read of spriteext[] in drawsprite_classic().  
4862 2297d 17h helixhorned /polymer/eduke32/build/src/engine.c Menus: disable mouse pointer if CROSSHAIR is void. DONT_BUILD.  
4846 2298d 20h helixhorned /polymer/eduke32/build/src/engine.c Minor cleanup, mostly in engine.c:drawalls().  
4842 2299d 19h helixhorned /polymer/eduke32/build/src/engine.c engine.c: clamp all indices for distrecip[] access, as more OOBs were observed.  
4836 2299d 19h helixhorned /polymer/eduke32/build/src/engine.c Convert voxels to models only when starting or changing to Polymost.

Analogously to the way models are processed in a deferred manner for Polymer.
 
4835 2299d 19h helixhorned /polymer/eduke32/build/src/engine.c A couple of miscellaneous cleanups.

defs.c: sync some dup'd code for 'definevoxel' and 'voxel' DEF tokens.
engine.c: factor out PolymerProcessModels().
 
4834 2299d 19h helixhorned /polymer/eduke32/build/src/engine.c engine.c: style-cleanup drawvox(). Also clean up ALL of voxmodel.c.

No deliberate semantic changes here.