Build 5650
SVN-
Add one-bit alpha detection for hightile and model skins.
SVN handles and Git names are merged into one person.
Add one-bit alpha detection for hightile and model skins.
Move daskinloader into mdloadskin and clean up it and gloadtile_hi against one another.
Rename HICR_NOCOMPRESS to HICR_NODOWNSIZE, CACHEAD_NOCOMPRESS to CACHEAD_NODOWNSIZE, DAMETH_NOCOMPRESS to DAMETH_NODOWNSIZE, and HICR_NOSAVE to HICR_NOTEXCOMPRESS.
Add E_PostInit, called from the game after loaddefinitionsfile().
fix unbalanced begindrawing()/enddrawing() pair in printext16().
misc cleanups, support for drawing transparent lines in 2d mode. DONT_BUILD.
Remove some conditional disabling of spriteext features when !defined USE_OPENGL.
consider a point inside() a sector in all border cases (literally).
In other words, for a test rectangular sector, a sprite would be inside the sector in on all 4 edges and all 4 corners. Previously, it would have been the lower right portion only (*excluding* LL and UR corners), which led to map editing issues.
remove preceding assertion failure, continue loop then instead.
Interestingly, that test case then appears to be drawn fully. Heh. Also, move one clamp from r1874 one up in the data flow chain. Doesn't seem to break textured overhead map view with Last Pissed Time.
make fillpolygon() more readable with the usual code transformations.
Also add an assertion that currently sometimes fails when zooming in too much in Mapster32 textured 2D mode. Example: DNF's LADYKILLR.MAP at (46000,-14000).
don't extern 'clipmovetraceboxnum', add a new func. clipmovex() instead.
The 'x' is for "extended", since its last arg is a switch of whether to disable sliding. Use that from gameexec.c.
auto-detect LameDuke's PALETTE.DAT and read tables accordingly.
LameDuke's shade table has 32 gradients of shade, like Duke3D. For the translucency table though, only the diagonal + one half is stored because it's symmetric (50/50 translucency).
stricter map load time checking for sprites with oob sectnums.
Sprites are now considered to have out of bounds sector numbers if it is < 0 or >= numsectors (not merely >= MAXSECTORS). If such a sprite is now encountered during post-load, an attempt is made first to assign it a sector number (using updatesector()). If that fails, the sprite is removed from the map. The background is that a dozen of maps do come with such sprites and could previously corrupt the sprite list when loaded.
in hitscan and getzrange, skip sprites if sprite part of clipmask is 0.
... like was done with clipmove() previously. Also, do some code clean up. There are no changes of functionality.
fix assertion failure with overlong walls in rintersect().
return early with 0 from cansee() if either sector is >= MAXSECTORS.
Previously, only the <0 condition was checked. However, the passed sectnums could be >= MAXSECTORS (at least in C-CON), for example when issuing 'canseespr' on a sprite not in the game world.
give sprite cstat 1024 a marco name, CSTAT_SPRITE_MDHACK.
in texel-hitscan wall-aligned sprites, consider engine-side animation.
Whether a sprite is considered for texel-hitscan is determined on the base tile number, not the individual animated tile numbers.
fix a possible crash with texel-hitscan.
Reproduced as follows (assuming all tiles have texel-hitscan for simplicity): In E2L5, shoot the opening switch with the shotgun, aiming for the border. The crash occurs because the *other*, depressed switch tile isn't yet loaded when we index into its tile storage. Dereferencing 0+small number == BAD!
in setaspect_new, determine the aspect with {x,y}dimen instead of {x,y}dim.
That is, use the view boundries instead of the whole screen.
fix unused variable permanentlock
make neartag accept a sprite-blacklist function and use it in sector.c.
Internally, the last argument to neartag is now a pointer to a function int32_t (*blacklist_sprite_func)(int32_t i), which is supposed to return 1 if sprite[i] should NOT be considered for hitting. This is now used in the hard-coded neartag() calls in sector.c, but not in any way in CON (there's neither a C blacklist function provided, nor is there a possibility to define one in CON). There, all sprites with picnums >=1 and <=10 (i.e. the effectors) will be blacklisted. This remedies problems where such sprites would get in the way of switches. Note that a whitelist approach (only consider a predefined set, namely those picnums which will be checked afterwards) has back-compatibility implications since people may have used e.g. lotagged window sprites to cover a switch. Also, the >=1 to <=10 range is [sic] (the static, not dynamic values are used), since anyone redefining effector picnums is clearly out of their mind.