Subversion Repositories eduke32

Rev

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

Filtering Options

Rev Age Author Path Log message Diff
5075 2125d 2h terminx /polymer/eduke32/build/include/polymost.h 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
 
5056 2139d 6h hendricks266 /polymer/eduke32/build/include/polymost.h 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.  
4768 2240d 18h hendricks266 /polymer/eduke32/build/include/polymost.h Some minor fixes. DONT_BUILD.  
4764 2243d 3h helixhorned /polymer/eduke32/build/include/polymost.h Fix POLYMER=0 build and a couple of unused-variable warnings with it. DONT_BUILD.  
4747 2246d 14h terminx /polymer/eduke32/build/include/polymost.h Part 1 of attempting to adhere to C standard section 7.1.3. It turns out it's illegal to use identifiers that begin with _ or have __ anywhere in them. DONT_BUILD.  
4667 2274d 23h terminx /polymer/eduke32/build/include/polymost.h set_globalpos(), updates both integer (globalposx/y/z) and float (fglobalposx/y/z) representations of the current camera view position. Storing the float representation pre-converted saves us from the delay incurred on ARM when converting an integer and transferring it to the FPU, though this delay is mostly negated already by using the hardfp ABI.  
4656 2274d 23h terminx /polymer/eduke32/build/include/polymost.h Additional Polymost cleanup, attempt to fix enemy shadows (they are still not right)  
4636 2299d 22h terminx /polymer/eduke32/build/include/polymost.h polymost_invsqrt(), reorganize pthtyp for better member alignment  
4623 2299d 22h terminx /polymer/eduke32/build/include/polymost.h More Polymost cleanup, also consolidate tilesizx and tilesizy into a single tilesiz vec2_t to ensure both x and y are always in the same cache line. I may add a new vec2_16t later. Still need to take care of emulating the old flat array for the sake of CON access.  
4605 2299d 22h terminx /polymer/eduke32/build/include/polymost.h First commit for "Polymost.f", the single precision floating point conversion and optimization of Polymost. This work was primarily done for ARM but it also doubled the framerate on "Clear the Coast" on my i7.  
4498 2420d 14h helixhorned /polymer/eduke32/build/include/polymost.h Polymost: r_npotwallmode, emulating 8-bit for walls w/ nonpow2 height textures.

When that mode is enabled (see below for caveats), wall textures that have a
non-power-of-two height (call it 'h') will be modified to look like in classic:
Let 'H' be the next power of two greater than 'h'. The texture will be uploaded
with height 'H', made up from 'h' hlines of the original texture, followed by
'H'-'h' first hlines of the same.
No panning "corrections" will take place. The mode is disabled by default.

Caveats/notes:
* the mode requires that r_hightile is disabled
* it is not implemented in Polymer
* in the Lunatic build, it is ineffective when a VX map is loaded, as those
display walls with NPOT height textures correctly
 
4491 2423d 2h helixhorned /polymer/eduke32/build/include/polymost.h Bye, bye, B*alloc(), all hail X*alloc()! Replace large portion of the calls...

... and cull code that is dead with the X*alloc() versions since they never
return NULL on requesting memory.

Use something like
git grep '[^Xx]\(m\|c\|re\)alloc *('
and
git grep '[^Xx]strdup *('
to see places where I left the B*alloc() calls intact.

BUILD_LUNATIC.
 
4488 2424d 4h helixhorned /polymer/eduke32/build/include/polymost.h Miscellaneous cleanup, still with the same suspects...

- in mdloadskin() and gloadtile_hi(), use new function check_nonpow2()
(bit-twiddling) instead of loop
- Replace a couple of missed literals with CACHEAD_* enum labels
 
4486 2424d 4h helixhorned /polymer/eduke32/build/include/polymost.h Replace various GL rendering related literal flags with enum labels.

- pthtyp pth->flags bits
- Flags of the <dameth> argument of various functions
- hictinting[].f / gloadtile_hi() and daskinloader() <effect> arg bits
- hicreplctyp hicr->flags bits
- texcacheheader cachead.flags bits
 
4460 2451d 4h helixhorned /polymer/eduke32/build/include/polymost.h In non-lookup GL modes, if fog is due to fogpal, make fog params indep. of shade.  
4416 2477d 15h helixhorned /polymer/eduke32/build/include/polymost.h Rename sector[].filler member to '.fogpal'. From CON, keep the '.alignto' alias.

The overall situation is thus as follows:
- in C and from Lua, that member is called 'fogpal'
- In CON (both C-CON and LunaCON), it's 'fogpal' with 'alignto' being an alias;
'filler' wasn't available before, either.
- In m32script, it's 'fogpal' or 'alignto' ('filler' is not available any more)
 
4415 2477d 15h helixhorned /polymer/eduke32/build/include/polymost.h In non-lookup OpenGL modes, make sector[].filler (rename pending) override fogpal.

That is, if that member has a nonzero value, that one is taken for the color of
the GL fog instead of (most of the time) sector[].floorpal. "Sky sectors", that
is, skyboxes or simply parallaxed floors/ceilings are *not* handled.
 
4407 2483d 12h helixhorned /polymer/eduke32/build/include/polymost.h Amend r4394: don't use full brightness (glColor() factor 1) with hightiles.

This is done by factoring out some polymer.c:polymer_getbuildmaterial() code
into polymer_eligible_for_artmapping() and using that. The one in polymer.c
can still determine to not use ART mapping on some ("rare"?) occasions, so
it's not 100% in sync.
 
4406 2483d 12h helixhorned /polymer/eduke32/build/include/polymost.h Minor Polymost code cleanup.

- factor out eligible_for_tileshades()
- remove some rendmode 1 code
- move some auto vars further down
 
4395 2488d 5h helixhorned /polymer/eduke32/build/include/polymost.h Really minor accumulated readability tweaks.  

Show All