Commit graph

501 commits

Author SHA1 Message Date
terminx
d5d1f0a0ea Patch from Nuke.YKT to implement q16 angle and horiz in software mode
git-svn-id: https://svn.eduke32.com/eduke32@7713 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 12:07:32 +02:00
terminx
fe2fe0c2cf Patch from Fox:
Polymost visibility: compensate for the classic mode "truncating" the lookup shades by moving the fog ramp by the equivalent of 1/2 shade

Fix some issues with negative shade in GL fog.

git-svn-id: https://svn.eduke32.com/eduke32@7712 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 12:07:29 +02:00
terminx
29b626fc5d Get rid of DYNALLOC_ARRAYS
It's garbage and the "functionality" it provided is something that will be able to be achieved in a better way in a future commit.

git-svn-id: https://svn.eduke32.com/eduke32@7708 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 12:07:20 +02:00
terminx
d2b3691e22 Remove FIXMATH_NO_64BIT
This codebase doesn't work on any platforms where int64_t isn't even a type.

git-svn-id: https://svn.eduke32.com/eduke32@7707 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 12:07:17 +02:00
terminx
ccdba037b5 Added Xfree() function to accompany the Xmalloc() family of functions and change all uses of Bfree() to Xfree()
This was necessary because everything is already allocated with the Xmalloc() functions, but a future commit will make blocks allocated with those functions no longer compatible with the system implementation of free(), which Bfree() wraps.

git-svn-id: https://svn.eduke32.com/eduke32@7705 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/build.cpp
#	source/build/src/mdsprite.cpp
#	source/build/src/polymer.cpp
#	source/build/src/polymost.cpp
#	source/build/src/texcache.cpp
#	source/build/src/voxmodel.cpp
2019-09-20 12:07:10 +02:00
terminx
dc62b986e8 Update miniz from 2.0.8 to 2.1.0--not much of a change
git-svn-id: https://svn.eduke32.com/eduke32@7703 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 12:02:41 +02:00
terminx
2f9ca17507 Fix integer overflows in rintersect() and optimize a bit of the logic
Some of the variable initialization ordering may look counterintuitive at first, but it's intended to avoid read-after-write memory access penalties.

git-svn-id: https://svn.eduke32.com/eduke32@7701 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 12:02:36 +02:00
terminx
d34224a3de "Fix" editor clipping bug allowing movement into null space
This doesn't so much fix the issue as band-aid over it--it appears to be an OG BUILD bug that has happened since long before I ever began improving the clipping, I don't know what causes it, and I don't want to fuck everything up trying to fix it right now.

git-svn-id: https://svn.eduke32.com/eduke32@7698 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 12:02:29 +02:00
terminx
02ef02872a Replace manual casts of sprite and wall pointers to vec2/3_t with use of the anonymous union
git-svn-id: https://svn.eduke32.com/eduke32@7697 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/build.cpp
#	source/build/src/polymost.cpp
2019-09-20 12:02:26 +02:00
terminx
8141fbd692 Fix alpha blending bug when switching from Polymost to software mode
git-svn-id: https://svn.eduke32.com/eduke32@7696 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 12:01:39 +02:00
terminx
26a266dfe5 Rename STRUCT_TRACKERS_ENABLED preprocessor definition to USE_STRUCT_TRACKERS
This may also fix a minor performance regression introduced in Polymer sometime after we switched to building as C++, caused by confusion between STRUCT_TRACKERS_ENABLED and UNTRACKED_STRUCTS. UNTRACKED_STRUCTS is now named UNTRACT_STRUCTS__ to dissuade use outside of buildtypes.h.

git-svn-id: https://svn.eduke32.com/eduke32@7695 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymer.cpp
2019-09-20 12:01:36 +02:00
terminx
9d7e5d9970 Rename vec2s_t to vec2_16_t
git-svn-id: https://svn.eduke32.com/eduke32@7694 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymost.cpp
2019-09-20 11:28:57 +02:00
hendricks266
ff204ff034 Fix macOS -Wdeprecated-declarations warnings
git-svn-id: https://svn.eduke32.com/eduke32@7688 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	.gitignore
2019-09-20 10:15:10 +02:00
hendricks266
ecf990253b Fix OOB access in polymost_spriteHasTranslucency
git-svn-id: https://svn.eduke32.com/eduke32@7686 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:14:37 +02:00
hendricks266
3598e79dc7 Fix OOB access in clipmove
git-svn-id: https://svn.eduke32.com/eduke32@7685 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:14:35 +02:00
pogokeen
f92ec7bb89 polymost.cpp: fix issue where GL_ALPHA_TEST could be enabled in certain instances when executing polymost_drawrooms() and better handle when we are drawing without a texture in polymost_drawpoly()
git-svn-id: https://svn.eduke32.com/eduke32@7682 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymost.cpp
2019-09-20 10:14:28 +02:00
pogokeen
9b621c0ef2 Add GL debugging event annotations for Polymost functions
git-svn-id: https://svn.eduke32.com/eduke32@7681 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/include/polymost.h
#	source/build/src/mdsprite.cpp
#	source/build/src/polymost.cpp
2019-09-20 10:14:12 +02:00
hendricks266
d2609f07a9 Restore file loading
git-svn-id: https://svn.eduke32.com/eduke32@7679 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:05:34 +02:00
hendricks266
dd5f1338c5 Revert "Improve file loading"
This reverts commit bfc6b7589e.

git-svn-id: https://svn.eduke32.com/eduke32@7678 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:05:31 +02:00
terminx
91b9a605fa "horizon offset should not be affected by projection hack"
git-svn-id: https://svn.eduke32.com/eduke32@7675 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymost.cpp
2019-09-20 10:05:22 +02:00
terminx
b0a4b6a1ee Convert loops using unsigned integers as iterators to use regular signed ints instead
https://kristerw.blogspot.com/2016/02/how-undefined-signed-overflow-enables.html

Doing this as cleanly as possible involved demoting several function parameters concerning object sizes and counts from size_t to int--I'm fine with this change as the functions in question are not actually capable of handling input with sizes larger than what can be stored in a signed 32-bit integer, making the use of size_t here misleading at best.

git-svn-id: https://svn.eduke32.com/eduke32@7673 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymost.cpp
#	source/build/src/texcache.cpp
#	source/build/src/tilepacker.cpp
2019-09-20 10:04:24 +02:00
Christoph Oelckers
61d2e31610 - fixed another bad merge 2019-09-20 09:44:58 +02:00
terminx
5e470e8a5b Neat Polymost y-shearing patch from Nuke.YKT
git-svn-id: https://svn.eduke32.com/eduke32@7656 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymost.cpp
2019-09-20 09:43:17 +02:00
Christoph Oelckers
dcc3e2b94e - removed code duplication from last cherry-pick 2019-09-20 09:35:09 +02:00
terminx
410da8a085 Polymost shade table interpolation patch from Nuke.YKT
git-svn-id: https://svn.eduke32.com/eduke32@7650 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymost.cpp
2019-09-20 09:32:22 +02:00
terminx
3db7512c69 Templatize bfirst_search_init() and bfirst_search_try() so they can be used with types other than int16_t
git-svn-id: https://svn.eduke32.com/eduke32@7629 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/build.cpp
2019-09-20 09:20:14 +02:00
pogokeen
78d08b3ac2 engine.cpp: fix sprite sorting/adjustment issue introduced in r7612 that caused sprites with the same y value at the end of the sorted array to not be adjusted properly
git-svn-id: https://svn.eduke32.com/eduke32@7627 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:19:39 +02:00
pogokeen
fc636b53ca polymost.cpp: Fix issue where state would not be reset properly in polymost_drawmaskwall() when rendering translucent maskwalls with no texture
git-svn-id: https://svn.eduke32.com/eduke32@7626 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:19:29 +02:00
pogokeen
40737f44cc polymost.cpp: fix polymost_dorotatesprite() alpha test/blend issue introduced in r7619
git-svn-id: https://svn.eduke32.com/eduke32@7625 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:19:27 +02:00
pogokeen
775a0de6c1 polymost.cpp: fix issue where floors & ceilings with DAMETH_MASKPROPS were not being blended
git-svn-id: https://svn.eduke32.com/eduke32@7624 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:19:25 +02:00
Christoph Oelckers
0254bf82d3 - added NBlood source. 2019-09-20 00:42:45 +02:00
Christoph Oelckers
8074d8251e - can be compiled again but crashes. 2019-09-19 23:02:57 +02:00
Christoph Oelckers
dd7ce38cbb - adjustments for the Blood merge. 2019-09-19 22:26:44 +02:00
Christoph Oelckers
53335f20ec - Blood merge
# Conflicts:
#	source/build/include/polymost.h
#	source/build/src/build.cpp
#	source/build/src/engine.cpp
#	source/build/src/polymost.cpp
#	source/build/src/voxmodel.cpp
2019-09-19 22:06:49 +02:00
pogokeen
5865d96306 engine.cpp: fix bug in killsprite where sprites were not being removed properly after sorting changes
git-svn-id: https://svn.eduke32.com/eduke32@7623 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 15:03:05 +02:00
pogokeen
d2ebc8a29c Reduce state changes and fix translucent maskwall depth buffer issue
git-svn-id: https://svn.eduke32.com/eduke32@7619 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymost.cpp
2019-09-19 15:01:13 +02:00
terminx
968ebdef84 Fix TROR clipping issue
git-svn-id: https://svn.eduke32.com/eduke32@7617 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 15:00:55 +02:00
pogokeen
2228af8658 Fix maskwall array indirection bug and two if conditional oversights from r7612
git-svn-id: https://svn.eduke32.com/eduke32@7615 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:58:14 +02:00
pogokeen
9534bb1578 polymost.cpp: switch from writing gl_FragColor to writing gl_FragData[0] in order to reduce VGPR usage on AMD cards
git-svn-id: https://svn.eduke32.com/eduke32@7613 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymost.cpp
2019-09-19 14:58:09 +02:00
pogokeen
2765ebec87 Fix depth buffer issue causing translucent sprites to not render properly in Polymost.
Use polymost_spriteHasTranslucency() and polymost_maskWallHasTranslucency() to determine if a sprite has translucency.
Optimize sprite rendering when in Polymost by only sorting sprites with translucency.

git-svn-id: https://svn.eduke32.com/eduke32@7612 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymost.cpp
2019-09-19 14:56:47 +02:00
terminx
61b3a65e79 Improve check_floor_curb()
This should fix several remaining clipping bugs.

git-svn-id: https://svn.eduke32.com/eduke32@7611 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:52:41 +02:00
terminx
12eb413f9c Fix SOS check in clipmove()
git-svn-id: https://svn.eduke32.com/eduke32@7610 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:52:40 +02:00
terminx
60ea578a8c Add support for returning the closest point in the sector to getsectordist()
git-svn-id: https://svn.eduke32.com/eduke32@7609 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:52:37 +02:00
terminx
8d85e8d934 Add new findwallbetweensectors() function and change sectoradjacent() to use it
git-svn-id: https://svn.eduke32.com/eduke32@7608 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:52:35 +02:00
terminx
e25a197f3e Piddly fart bullshit changes that don't really do anything
git-svn-id: https://svn.eduke32.com/eduke32@7606 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:52:31 +02:00
terminx
301ac48ccd Utilize the types added in the previous commit
This patch is a bit large.

git-svn-id: https://svn.eduke32.com/eduke32@7603 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/include/mdsprite.h
#	source/build/src/build.cpp
#	source/build/src/polymer.cpp
#	source/build/src/polymost.cpp
#	source/build/src/voxmodel.cpp
2019-09-19 14:46:31 +02:00
terminx
ab857c4e8f This should fix updatesector/updatesectorz performance while retaining the benefits of breadth-first search
git-svn-id: https://svn.eduke32.com/eduke32@7601 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:37:06 +02:00
terminx
a89c260592 Add optional output parameter to getwalldist(), to return the coordinates of the closest point on the wall
git-svn-id: https://svn.eduke32.com/eduke32@7600 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:37:04 +02:00
terminx
879cb550a6 Whitespace
git-svn-id: https://svn.eduke32.com/eduke32@7598 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:37:02 +02:00
terminx
1fae340426 Fix a bunch of improperly defined bitmap arrays
git-svn-id: https://svn.eduke32.com/eduke32@7594 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/build.cpp
2019-09-19 14:36:54 +02:00