Commit graph

447 commits

Author SHA1 Message Date
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
00cac93851 Bump MAXCLIPNUM to 2048
git-svn-id: https://svn.eduke32.com/eduke32@7397 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-19 17:07:41 +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
2b3be31fa2 As if you couldn't already tell from Ion Maiden, I like shitty one liners
git-svn-id: https://svn.eduke32.com/eduke32@7383 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-03 11:15:08 +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
61b89491c6 Lower MAXWALLSB
git-svn-id: https://svn.eduke32.com/eduke32@7373 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-02 23:21:48 +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
f7d4209084 Use lowercase when computing hashes in hash_getcode()
It turns out hash_findcase() has never worked properly because the correct bucket would never have been searched.

git-svn-id: https://svn.eduke32.com/eduke32@7364 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-02 23:21:13 +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
terminx
360ee42e0e Fix system memory check
git-svn-id: https://svn.eduke32.com/eduke32@7333 1a8010ca-5511-0410-912e-c29ae57300e0
2019-02-18 22:02:50 +00:00
terminx
180c73d8ca Fix the automap glitch in the region around the full status bar in Polymost
git-svn-id: https://svn.eduke32.com/eduke32@7331 1a8010ca-5511-0410-912e-c29ae57300e0
2019-02-18 22:02:42 +00:00
terminx
8433d133b4 Patch from Fox:
Add a FOV option in the menu. Range from 75 to 120 degrees (at 4:3 resolution), default is 90.

New userdef "fov". Equals the FOV in 360 degrees.

Update Polymost projection hack, so it compensates for the FOV or height of the game view.

Fix FOV in Polymer when the full status bar is visible. Now the FOV depends of the width of the game view instead of the height.

git-svn-id: https://svn.eduke32.com/eduke32@7329 1a8010ca-5511-0410-912e-c29ae57300e0
2019-02-18 22:02:33 +00:00
terminx
4cf5a9c31a Mapster32: fix use of uninitialized values
git-svn-id: https://svn.eduke32.com/eduke32@7326 1a8010ca-5511-0410-912e-c29ae57300e0
2019-02-02 23:24:36 +00:00
terminx
975126edf4 Fix a couple minor issues with 90 degree wall texture rotation
git-svn-id: https://svn.eduke32.com/eduke32@7325 1a8010ca-5511-0410-912e-c29ae57300e0
2019-02-02 23:24:32 +00:00
terminx
8e50f47aa4 rotatesprite hack from Fox
git-svn-id: https://svn.eduke32.com/eduke32@7321 1a8010ca-5511-0410-912e-c29ae57300e0
2019-01-30 00:19:56 +00:00
terminx
61c74f25aa Work around weird issue with Bgetsysmemsize() that occurs on exactly one system we've tested
git-svn-id: https://svn.eduke32.com/eduke32@7319 1a8010ca-5511-0410-912e-c29ae57300e0
2019-01-30 00:13:00 +00:00
terminx
0a3b840d4e Add error message for SDL_SetGammaRamp() failures in videoSetGamma()
git-svn-id: https://svn.eduke32.com/eduke32@7316 1a8010ca-5511-0410-912e-c29ae57300e0
2019-01-22 22:51:08 +00:00