Commit graph

574 commits

Author SHA1 Message Date
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
terminx
a628b8d9f7 Add bounds checking for renderSetTarget()
I'm not aware of this problem actually occurring anywhere, but too many consecutive calls to renderSetTarget() without the appropriate calls to renderRestoreTarget() between them would overflow 5 different arrays.

git-svn-id: https://svn.eduke32.com/eduke32@7593 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:36:44 +02:00
terminx
80d77f64cf This version of equation() compiles into fewer instructions
git-svn-id: https://svn.eduke32.com/eduke32@7592 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:36:42 +02:00
terminx
413d68f1f8 Replace yax_getclosestpointonwall() with getclosestpointonwall_internal() and use it in both yax_walldist() and getwalldist()
This commit also adds a getsectordist() but we aren't using it anywhere yet.

git-svn-id: https://svn.eduke32.com/eduke32@7591 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:36:40 +02:00
terminx
ea826fb117 Move NEXTWALL and POINT2 macros into build.h
git-svn-id: https://svn.eduke32.com/eduke32@7590 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:30:26 +02:00
terminx
e59f8e3b71 Use FORCE_INLINE and CONSTEXPR where appropriate in the Q16 fixed point math library
git-svn-id: https://svn.eduke32.com/eduke32@7588 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	platform/Windows/build.vcxproj.filters
2019-09-19 14:30:22 +02:00
terminx
e5bd221746 auto/const/constexpr bullshit
git-svn-id: https://svn.eduke32.com/eduke32@7587 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:49 +02:00
terminx
f9e866d32d Rename clipwalldist() to getwalldist() and move both it and sectoradjacent() to engine.cpp
git-svn-id: https://svn.eduke32.com/eduke32@7586 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:48 +02:00
terminx
bb517b73e3 clip.cpp usectortype cleanup
git-svn-id: https://svn.eduke32.com/eduke32@7585 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:45 +02:00
terminx
d04c4203c5 Fix a really stupid bug in r7574
git-svn-id: https://svn.eduke32.com/eduke32@7584 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:43 +02:00
terminx
5a814eb261 Make getceilzofslopeptr/getflorzofslopeptr/getzsofslopeptr not invoke the structure trackers
git-svn-id: https://svn.eduke32.com/eduke32@7583 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:41 +02:00
terminx
b46bc73322 Add a distance check to clipupdatesector() to prevent traversing through portals that are outside the wall distance passed to clipmove()
git-svn-id: https://svn.eduke32.com/eduke32@7582 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:40 +02:00
terminx
76d7fec2ff Expose yax_getclosestpointonwall() for use outside of engine.cpp
git-svn-id: https://svn.eduke32.com/eduke32@7581 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:38 +02:00
terminx
e2be7183b4 Fix addclipsect() accidentally being nested under #ifdef HAVE_CLIPSHAPE_FEATURE
git-svn-id: https://svn.eduke32.com/eduke32@7580 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:36 +02:00
terminx
a32597464f Use uwalltype in inside() to avoid invoking the struct trackers
git-svn-id: https://svn.eduke32.com/eduke32@7578 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:32 +02:00
terminx
bcf8ae4d84 Revert "Clean up clip.cpp struct casting including but not limited to r7466 changes"
git-svn-id: https://svn.eduke32.com/eduke32@7577 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:30 +02:00
hendricks266
f96e1c8e24 Clean up clip.cpp struct casting including but not limited to r7466 changes
git-svn-id: https://svn.eduke32.com/eduke32@7576 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:29 +02:00
hendricks266
cd499b2089 Fix clipshape regression in r7466
git-svn-id: https://svn.eduke32.com/eduke32@7575 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:27 +02:00
terminx
9af816af52 Replace manual search of clipsectorlist[] in clipmove() and friends with a bitmap
git-svn-id: https://svn.eduke32.com/eduke32@7574 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:25 +02:00
terminx
74944c9ed0 Fix clipupdatesector()
git-svn-id: https://svn.eduke32.com/eduke32@7573 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:23 +02:00
terminx
ad59875fa3 Improve warnings spewed by clipmove() when attempting to consider too many things for clipping
git-svn-id: https://svn.eduke32.com/eduke32@7572 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:21 +02:00
terminx
8a68bffdb0 Clean up clip.h and declare a bunch of stuff in clip.cpp static
git-svn-id: https://svn.eduke32.com/eduke32@7571 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:19 +02:00
terminx
c754ac6e62 Limit lastwall() to 'numwalls' iterations instead of MAXWALLS
git-svn-id: https://svn.eduke32.com/eduke32@7569 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:15 +02:00
terminx
c8eb1d0368 Simplify conditions in bfirst_search_try()
git-svn-id: https://svn.eduke32.com/eduke32@7568 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:14 +02:00
terminx
b7d06c0bd8 clipmove/pushmove parameter const correctness
git-svn-id: https://svn.eduke32.com/eduke32@7567 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:12 +02:00
hendricks266
0d277a6210 Fix newly exposed -Wtautological-constant-out-of-range-compare in kplib
git-svn-id: https://svn.eduke32.com/eduke32@7558 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:23:31 +02:00
pogokeen
71847ec0f1 polymost.cpp: fix fragment shader issue where fullbrights in a texture could affect rendering when u_useColorOnly was enabled
git-svn-id: https://svn.eduke32.com/eduke32@7552 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:23:23 +02:00
terminx
030f0b7013 Fix crash when passing updatesectorz() an invalid sector number > numsectors and < MAXSECTORS
git-svn-id: https://svn.eduke32.com/eduke32@7549 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:20:53 +02:00
terminx
7abfcd28be Add clipupdatesector(), a special version of updatesector() that only searches and returns results that are already in clipsectorlist[]
git-svn-id: https://svn.eduke32.com/eduke32@7546 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:20:47 +02:00
terminx
52ccd82c17 Fucking tabs
git-svn-id: https://svn.eduke32.com/eduke32@7544 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:20:42 +02:00
hendricks266
2081eff083 Patch from Nuke.YKT to fix TROR rendering in mirrors in Polymost
Includes "Fix screen tilt regression on mirror rendering"

git-svn-id: https://svn.eduke32.com/eduke32@7493 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:56:42 +02:00
hendricks266
eb5a90b1ef Patch from Nuke.YKT to fix a TROR in Polymost issue
Report by oasiz: It only occurs when you try to sandwich surfaces and kind of punch through. It seems similar to the kind of behavior that the pre-TROR fixes did (where you had to stand on the TROR sector for things to work). This seems to work if the weird wall is punching IN on your sector but not OUT to another.

git-svn-id: https://svn.eduke32.com/eduke32@7492 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:56:40 +02:00
terminx
fd5ee7c561 Fix dumbass problem with r7463 that screwed up projectiles
git-svn-id: https://svn.eduke32.com/eduke32@7490 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:56:35 +02:00
terminx
303d0048ea We probably don't want to be bailing out here when handling a clipshape
git-svn-id: https://svn.eduke32.com/eduke32@7486 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:52:35 +02:00
terminx
0edbd45145 Retire the original naive updatesector() and updatesectorz() in favor of the breadth-first versions
git-svn-id: https://svn.eduke32.com/eduke32@7484 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/build.cpp
#	source/build/src/polymer.cpp
2019-09-19 13:52:32 +02:00
terminx
2591c69b44 Add updatesectorbreadthz(), change pushmove() to use updatesectorbreadth(), and modify updatesectorbreadth() to include the early inside_p() return regular updatesector() has
git-svn-id: https://svn.eduke32.com/eduke32@7482 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:51:55 +02:00
terminx
ae59a46c8b Use updatesectorbreadth() in clipmove()
git-svn-id: https://svn.eduke32.com/eduke32@7480 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:51:50 +02:00
terminx
8c6ddcc137 Minor cleanup for updatesectorbreadth()
git-svn-id: https://svn.eduke32.com/eduke32@7479 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:51:48 +02:00
terminx
631863ab67 const correctness for parameters passed to the updatesector family of functions
git-svn-id: https://svn.eduke32.com/eduke32@7478 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:51:46 +02:00
terminx
83999ee6e4 Minor cleanup of breadth-first search functions
git-svn-id: https://svn.eduke32.com/eduke32@7476 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:51:41 +02:00
pogokeen
9b0573f0f2 engine.cpp: lintersect(): use klabs() instead of abs()
git-svn-id: https://svn.eduke32.com/eduke32@7474 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:51:37 +02:00
pogokeen
0bfde1c4d3 Fix issue where swingdoors would refuse to open or close if an enemy was in front of the door in an overlapping but unrelated/disjoint sector
git-svn-id: https://svn.eduke32.com/eduke32@7473 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:51:35 +02:00
pogokeen
f7f62c4466 engine.cpp: lintersect(): fix integer overflow and negative case issue
git-svn-id: https://svn.eduke32.com/eduke32@7472 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:51:33 +02:00
pogokeen
a82eb1d6fe Re-introduce earlier lintersect() work that was reverted.
engine.cpp/.h: clean up & fix lintersect().  Additionally, add support for finding intersections of collinear line segments.

This reverts r7290.

git-svn-id: https://svn.eduke32.com/eduke32@7471 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:51:32 +02:00
terminx
1ea1f525d9 Fix editor clipping issue
git-svn-id: https://svn.eduke32.com/eduke32@7467 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:24:23 +02:00
terminx
25236d3d74 usectortype/uwalltype cleanup in clip.cpp
git-svn-id: https://svn.eduke32.com/eduke32@7466 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:24:17 +02:00
terminx
8cbada19cf Fix crash in editor tile selector
git-svn-id: https://svn.eduke32.com/eduke32@7465 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:24:10 +02:00
terminx
c2e0000b11 Add bounds checking for populating clipsectorlist[], use preprocessor labels for sprite cstats
git-svn-id: https://svn.eduke32.com/eduke32@7464 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:24:04 +02:00
terminx
393e97beec Partially refactor clipmove()
git-svn-id: https://svn.eduke32.com/eduke32@7463 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:23:59 +02:00
terminx
ceaaaf9c0d Reduce MAXCLIPNUM to 2048 again and introduce MAXCLIPSECTORS, with a value of 1024
git-svn-id: https://svn.eduke32.com/eduke32@7459 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:23:36 +02:00
terminx
ddd1d34973 clipmove() improvements
This reverts some of the previous clipmove() changes in favor of implementing explicit rejection of movement in cases where clipping has somehow failed.

git-svn-id: https://svn.eduke32.com/eduke32@7457 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 12:27:27 +02:00
terminx
decce5bc70 Make updatesectorz() fall back to updatesector() in cases where it would have returned -1
Note that both functions will still return -1 when x or y coordinates are out of bounds.

git-svn-id: https://svn.eduke32.com/eduke32@7456 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 12:27:25 +02:00
terminx
c8bd436cf8 Additional TROR patch from Nuke
git-svn-id: https://svn.eduke32.com/eduke32@7452 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 12:25:52 +02:00
terminx
66734e34bf Further clipmove() improvements to better deal with sector-over-sector
There's still something wrong here, but this at least fixes Duke3D E1L2.

git-svn-id: https://svn.eduke32.com/eduke32@7450 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 12:24:16 +02:00
terminx
5986dbf6e1 Fix crash in situations where rendering a scene would overrun all of the MAXBUNCHES sized arrays in both classic and polymost
git-svn-id: https://svn.eduke32.com/eduke32@7447 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 12:24:11 +02:00
terminx
3b271fb7bb Fix issue where controls intentionally bound to no keys would be reset to default at startup
git-svn-id: https://svn.eduke32.com/eduke32@7442 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 12:14:50 +02:00
terminx
fb36b256de Fix "spriteshadow" on voxels in Polymost
git-svn-id: https://svn.eduke32.com/eduke32@7441 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 12:14:48 +02:00
terminx
37a8c98c2c Replace some individual assignments of structure members with whole structure assignments
git-svn-id: https://svn.eduke32.com/eduke32@7434 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymost.cpp
2019-09-19 12:12:41 +02:00
terminx
dba335c7dd Adjust projection matrix depending on SCISDIST
git-svn-id: https://svn.eduke32.com/eduke32@7432 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 12:09:13 +02:00
terminx
3220b1e4f9 Hoist comparison of const variable outside of loop in getzrange()
git-svn-id: https://svn.eduke32.com/eduke32@7427 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 12:06:38 +02:00
Christoph Oelckers
95c9dba9df - deactivated the no-fog-calculation checks again.
The high level code should have no business deciding that - this must later be done in the backend.
Performance-wise this is really a non-issue so in the end this constitutes an optimization that only creates mess but np gain.
The commit was only cherry-picked for the remaining changes.
2019-09-19 12:04:06 +02:00
terminx
8a6ce26b57 Don't bother with fog calculations for things without hightile replacements
git-svn-id: https://svn.eduke32.com/eduke32@7424 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymer.cpp
2019-09-19 11:56:04 +02:00
terminx
35efbccfa3 Fix r_polygonmode cvar
git-svn-id: https://svn.eduke32.com/eduke32@7422 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 11:48:58 +02:00
terminx
bf7ee94a2d Clean up polymost.cpp includes
git-svn-id: https://svn.eduke32.com/eduke32@7421 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymost.cpp
2019-09-19 11:48:56 +02:00
Christoph Oelckers
e1e8b835db - make it compile again. 2019-09-19 11:43:11 +02:00
Christoph Oelckers
8f6f979fa5 - do not force the tile shades mode for now without re_adding the removed variable.
Much of this needs to be abstracted out but until that part is done this still needs to work properly.
2019-09-19 11:02:05 +02:00
terminx
a5965e2562 Remove r_usetileshades--GLOBAL_NO_GL_TILESHADES flag for DN64 not affected
This also locks the texture filtering options in the menu behind ifdef guards until they're fixed.

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

# Conflicts:
#	source/build/src/polymost.cpp
#	source/duke3d/src/menus.cpp
2019-09-19 10:50:18 +02:00
Christoph Oelckers
412f3a0b32 - proper npot checks for RedNukem's sky calculations. 2019-09-19 00:37:12 +02:00
Christoph Oelckers
51dc82b6a6 - merged in the changes RedNukem made to the Build code. 2019-09-19 00:19:02 +02:00
Christoph Oelckers
3a90d21661 - consolidated the redundant texture coordinates.
They were all the same, so no point recalculating them, the copies weren't even correct.
2019-09-19 00:06:12 +02:00
Christoph Oelckers
30dac6be74 - deleted the tilepacker. 2019-09-18 22:16:56 +02:00
Christoph Oelckers
e0f823a492 - refactored texture setup to use an intermediate layer. 2019-09-18 22:16:15 +02:00
Christoph Oelckers
155f093bd5 - stuff 2019-09-17 20:57:45 +02:00
Christoph Oelckers
13832eebc2 - removed assembly files. 2019-09-17 20:22:12 +02:00
Christoph Oelckers
1ad3b39e70 - removed the editor code. 2019-09-17 20:19:11 +02:00
Christoph Oelckers
d63cf04e06 - removed the compressed texture cache.
This is a pointless relic from the past and makes zero sense with modern graphics hardware.
2019-09-17 20:18:18 +02:00
Christoph Oelckers
b1763a8f4a - hooked up the texture management.
Not in active use yet!
2019-09-17 19:03:42 +02:00
Christoph Oelckers
cb2e2cc222 - count correctly. 2019-09-16 22:14:44 +02:00
Christoph Oelckers
0359602159 - some missed parts. 2019-09-16 21:27:07 +02:00
Christoph Oelckers
6536d910b3 - all drawing is being routed through the interface layer, all vertex buffers are gone.
No big loss here, none of them made much sense performance wise.
2019-09-16 21:08:42 +02:00
Christoph Oelckers
318009fd69 - added a centralized drawer and converted the main geometry drawer to use it. 2019-09-16 19:35:04 +02:00
Christoph Oelckers
2a20eb9287 - deleted vertex buffer drawing and used immediate mode instead.
This served no benefit and made cleanup harder than necessary.
2019-09-16 18:12:16 +02:00
Christoph Oelckers
20ab1289fd - deletion of unused code. 2019-09-16 18:10:28 +02:00
Christoph Oelckers
d2e34ef18e - this time the texture upload is working. 2019-09-16 18:00:19 +02:00
Christoph Oelckers
a85f9f4848 - this is good enough. 2019-09-13 22:27:20 +02:00
Christoph Oelckers
524f6cf5e5 - crap 2019-09-13 22:18:37 +02:00
Christoph Oelckers
aecdd9b4c5 - this is the state I want to build. 2019-09-13 21:43:05 +02:00
terminx
4506b8490f Minor cleanup of some Polymost shader program support functions
git-svn-id: https://svn.eduke32.com/eduke32@7419 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-19 17:09:06 +00:00
terminx
ff8e54432b "This adds masked texture rendering support for slopes in classic renderer"
git-svn-id: https://svn.eduke32.com/eduke32@7418 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-19 17:09:03 +00:00
terminx
7ccbd22013 Move some clipping related stuff out of engine.cpp and into clip.cpp
git-svn-id: https://svn.eduke32.com/eduke32@7417 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-19 17:08:59 +00:00
terminx
483fbe4cd6 Polymost sky Z buffer hack from Nuke.YKT
git-svn-id: https://svn.eduke32.com/eduke32@7415 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-19 17:08:51 +00:00
terminx
4522a8902b Limit Polymost tile sheet size to 8192 when building with MSVC
git-svn-id: https://svn.eduke32.com/eduke32@7414 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-19 17:08:47 +00:00
terminx
5e97fc5f51 Polymost NPOT texture patch from Nuke.YKT
git-svn-id: https://svn.eduke32.com/eduke32@7413 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-19 17:08:43 +00:00
terminx
25cd73d99a Patch from Nuke.YKT to use the shade tables for distance shading in Polymost
This makes the shading in Polymost more or less 1:1 with classic mode.

git-svn-id: https://svn.eduke32.com/eduke32@7412 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-19 17:08:39 +00:00
terminx
1a0ee0f4c3 Polymost relative texture alignment patch from Nuke
This "fixes" relative texture alignment for floors and ceilings in Polymost to match classic mode. "Fix" is in quotes because this actually means the alignment is less correct in terms of proper scaling than before, but more correct in terms of accuracy to classic mode.

git-svn-id: https://svn.eduke32.com/eduke32@7411 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-19 17:08:35 +00:00
terminx
b61027086c Fix Polymost HOM
git-svn-id: https://svn.eduke32.com/eduke32@7408 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-19 17:08:23 +00:00
terminx
798eaeb980 Allow passing a null pointer to spriteheightofsptr() for the height return value
git-svn-id: https://svn.eduke32.com/eduke32@7405 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-19 17:08:12 +00:00
terminx
76863607e3 This fixes a bug in clipmove() where clipping against sprites above you was wrong
Because this is a check for sprites above the sprite being moved and not a check for sprites below, the height of the sprite should not be taken into account at all here and the base of the sprite should be used instead.

git-svn-id: https://svn.eduke32.com/eduke32@7404 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-19 17:08:08 +00:00
terminx
770b255bff Calculate texture coordinates as double since we're storing them that way anyway
This isn't really intended to fix any specific issue, but to shut up Visual Studio whining about arithmetic overflows.

git-svn-id: https://svn.eduke32.com/eduke32@7403 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-19 17:08:05 +00:00
terminx
c8b161704b Patch from Nuke.YKT to work around a Polymost glitch with slopes
git-svn-id: https://svn.eduke32.com/eduke32@7401 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-19 17:07:57 +00:00
terminx
f1ea04e7da Another Polymost TROR patch from Nuke.YKT
This one should bring Polymost TROR into parity with classic mode.

git-svn-id: https://svn.eduke32.com/eduke32@7400 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-19 17:07:53 +00:00
terminx
6190fbb4f2 clipmove() improvements
This fixes an issue with clipmove() caused by sectors behind walls which were candidates for clipping not being added to the list of sectors that definitely clip the player, forcing the function to fall back to a slow, sector-by-sector brute force approach. This brute force approach has also been removed in favor of something more efficient.

git-svn-id: https://svn.eduke32.com/eduke32@7398 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-19 17:07:45 +00:00
terminx
0e01b45227 Revert r7388 because it just wasn't working out
git-svn-id: https://svn.eduke32.com/eduke32@7396 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-19 17:07:37 +00:00
hendricks266
5258e10271 Fix some GL ES compilation issues in polymost.cpp
git-svn-id: https://svn.eduke32.com/eduke32@7395 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-11 06:06:51 +00:00
hendricks266
6ba0b64de6 Add buildvfs_fopen_write_text
Long-term we will need to replace all uses of "\n" in string literals printed to disk.

git-svn-id: https://svn.eduke32.com/eduke32@7394 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-11 06:06:47 +00:00
hendricks266
381517ffa0 Add CLEAR and KP_CLEAR to the SDL key translation table as synonyms for KP_5
git-svn-id: https://svn.eduke32.com/eduke32@7393 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-11 06:06:43 +00:00
terminx
f54f35a067 Polymost TROR patch from Nuke.YKT--nice!
git-svn-id: https://svn.eduke32.com/eduke32@7392 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-04 23:49:11 +00:00
terminx
c6261b9f45 It looks like this is OK to remove now!
git-svn-id: https://svn.eduke32.com/eduke32@7391 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-04 23:49:07 +00:00
terminx
0e6dd28573 Patch from Nuke.YKT to clip Polymost spans to screen borders
git-svn-id: https://svn.eduke32.com/eduke32@7390 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-04 23:49:03 +00:00
terminx
a206a83020 This seems to help with some polygon drawing issues in Polymost for now
git-svn-id: https://svn.eduke32.com/eduke32@7388 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-04 23:48:55 +00:00
terminx
b72dec2940 Fix compilation with winlayer
There are still a bunch of warnings, but fixing warnings in deprecated code that only one guy uses anymore isn't an efficient use of time.

git-svn-id: https://svn.eduke32.com/eduke32@7387 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-04 23:48:50 +00:00
terminx
ea66c0a682 Well, that didn't take long :D
git-svn-id: https://svn.eduke32.com/eduke32@7386 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-03 11:15:20 +00:00
terminx
33a3e9fbca Fix compilation error in texcache
git-svn-id: https://svn.eduke32.com/eduke32@7380 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-02 23:35:43 +00:00
terminx
a050281006 A curious Polymost optimization from Nuke.YKT
This bails out of drawing any domost spans that seem to be entirely outside of the range of the screen coordinates. Since this seems so obvious, I have to wonder if Polymost is supposed to be doing this elsewhere already...

git-svn-id: https://svn.eduke32.com/eduke32@7379 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-02 23:22:12 +00:00
terminx
23e53c17fc This might not be needed anymore after the previous commit
git-svn-id: https://svn.eduke32.com/eduke32@7375 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-02 23:21:56 +00:00
terminx
0e107acd39 Work around floating point precision issues in Polymost causing problems when rendering certain geometry from particular angles
git-svn-id: https://svn.eduke32.com/eduke32@7374 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-02 23:21:52 +00:00
terminx
e84d62416d Patch from Striker to allow selective tile redefinition in .def files based on the crc of the original tile
This only works for "tilefromtexture" for now.

git-svn-id: https://svn.eduke32.com/eduke32@7370 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-02 23:21:37 +00:00
terminx
f31f31a17e Rework previous commit to use a little less floating point math
git-svn-id: https://svn.eduke32.com/eduke32@7369 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-02 23:21:32 +00:00
terminx
17fa3ea5ff Patch from Nuke.YKT to fix voxel rotation in Polymost
git-svn-id: https://svn.eduke32.com/eduke32@7368 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-02 23:21:29 +00:00
terminx
3775bce3d7 Fix a crash when trying to access cvars through typing the name into the console with the wrong case
git-svn-id: https://svn.eduke32.com/eduke32@7365 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-02 23:21:16 +00:00
terminx
e9d53fce0a Optimize nonpow2_mhline and nonpow2_thline by replacing divide operation by cheaper multiplication
Patch from Nuke.YKT.

git-svn-id: https://svn.eduke32.com/eduke32@7362 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-02 23:21:05 +00:00
hendricks266
7414f29348 Add buildvfs, abstraction layer for file I/O.
Currently it passes calls through to the system libraries as before.

Also adds an incomplete implementation on PhysFS.

git-svn-id: https://svn.eduke32.com/eduke32@7359 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-01 08:51:50 +00:00
hendricks266
789d9bd8e6 Rename "textures" to "texturecache" and "textures.cache" to "texturecache.index"
This avoids conflicts with folders named "textures", such as in World Tour. Thanks to enderandrew for the observation.

git-svn-id: https://svn.eduke32.com/eduke32@7347 1a8010ca-5511-0410-912e-c29ae57300e0
2019-02-22 03:40:49 +00:00
terminx
e253f2e0a8 Fixes an issue with the automap
git-svn-id: https://svn.eduke32.com/eduke32@7346 1a8010ca-5511-0410-912e-c29ae57300e0
2019-02-21 19:36:47 +00:00
terminx
10757aa836 PI -> fPI
git-svn-id: https://svn.eduke32.com/eduke32@7343 1a8010ca-5511-0410-912e-c29ae57300e0
2019-02-20 21:33:04 +00:00
terminx
7b06ec9a6a atan2 -> atan2f
git-svn-id: https://svn.eduke32.com/eduke32@7339 1a8010ca-5511-0410-912e-c29ae57300e0
2019-02-20 21:32:48 +00:00
terminx
a85b9e8259 Change scope of sdlayer lastSwapTime variable
git-svn-id: https://svn.eduke32.com/eduke32@7338 1a8010ca-5511-0410-912e-c29ae57300e0
2019-02-20 21:32:44 +00:00
terminx
22ec4599b0 Fix typo
git-svn-id: https://svn.eduke32.com/eduke32@7336 1a8010ca-5511-0410-912e-c29ae57300e0
2019-02-20 21:30:11 +00:00