Subversion Repositories eduke32


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

Filtering Options

Rev Age Author Path Log message Diff
4980 2442d 3h helixhorned /polymer/eduke32/build/src/mdsprite.c mdsprite.c: in md3load(), allocate m->head.surfs with Xcalloc, amending r4952.

And preventing enormous corruption due to a free() called on a garbage (malloc'd)
pointer values this time. DO_BUILD_VERY_FAST_PLEASE!
4952 2447d 6h helixhorned /polymer/eduke32/build/src/mdsprite.c mdsprite.c: in md3free(), also free s->geometry for each surface. DONT_BUILD.

This prevents a enormous leak being reported by LeakSanitizer. Not that it
matters much, since we most frequently free models only at exit. (Sometimes one
may be freed earlier though -- if there was an error loading it, AFAICS.)
4898 2472d 18h terminx /polymer/eduke32/build/src/mdsprite.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.  
4889 2472d 18h terminx /polymer/eduke32/build/src/mdsprite.c Replace hightile grayscale method (usually combined with tints to produce
replacements for the first handful of palette lookups) w8th superior
"luma" method. DONT_BUILD.
4771 2515d 23h hendricks266 /polymer/eduke32/build/src/mdsprite.c Eliminate -Wno-narrowing. DONT_BUILD.  
4764 2518d 23h helixhorned /polymer/eduke32/build/src/mdsprite.c Fix POLYMER=0 build and a couple of unused-variable warnings with it. DONT_BUILD.  
4680 2550d 19h terminx /polymer/eduke32/build/src/mdsprite.c Another 5000 lines of pain and tears. DONT_BUILD.  
4658 2550d 19h terminx /polymer/eduke32/build/src/mdsprite.c Various additional optimizations: add CLASSIC_SLICE_BY_4 mode to unroll some of the loops in a-c, replace integer divisions by a divisor unknown at compile time with usage of libdivide, clean up pragmas further by removing more old stuff that wasn't used anywhere. This is another one of those nasty commits that make people cry. DONT_BUILD.  
4656 2550d 19h terminx /polymer/eduke32/build/src/mdsprite.c Additional Polymost cleanup, attempt to fix enemy shadows (they are still not right)  
4653 2550d 19h terminx /polymer/eduke32/build/src/mdsprite.c Nuke MFLAGS_NOCONV, hoist a few conditions out of loops in Polymost model drawing  
4652 2550d 19h terminx /polymer/eduke32/build/src/mdsprite.c Fix z fighting issues with wall and floor sprites. This isn't perfect, and somebody like Plgman or Helixhorned who better understands how the depth buffer positions are calculated will be able to do a much better determination of how much to offset the glDepthRange values based on distance to the sprite.  
4639 2575d 18h terminx /polymer/eduke32/build/src/mdsprite.c Misc additional optimizations, mostly to polymost/mdsprite. Also separate voxmodel into its own source file and object. This commit is pretty large because I was hitting the limit of what could realistically be carved up into smaller patches. DONT_BUILD.  
4623 2575d 18h terminx /polymer/eduke32/build/src/mdsprite.c 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.  
4607 2575d 19h terminx /polymer/eduke32/build/src/mdsprite.c Extra files for previous commits  
4502 2684d 14h hendricks266 /polymer/eduke32/build/src/mdsprite.c Wrap most calls to exit() with a macro that will print the exit status, file name, line number, and function name to the log when using a debug build.  
4498 2696d 11h helixhorned /polymer/eduke32/build/src/mdsprite.c 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.

* 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 2698d 23h helixhorned /polymer/eduke32/build/src/mdsprite.c 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 *('
git grep '[^Xx]strdup *('
to see places where I left the B*alloc() calls intact.

4488 2700d 0h helixhorned /polymer/eduke32/build/src/mdsprite.c 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
4487 2700d 0h helixhorned /polymer/eduke32/build/src/mdsprite.c Factor out commonly occuring hictinting[]-accessing code into three functions.

Note: in polymer.c, this was buggy (but harmless) because .r is a char:
if ((uint32_t)hictinting[MAXPALOOKUPS-1].r & 0xFFFFFF00) != 0xFFFFFF00)
4486 2700d 0h helixhorned /polymer/eduke32/build/src/mdsprite.c 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

Show All