Commit Graph

757 Commits

Author SHA1 Message Date
terminx cef3c33e5f clockticks header fix
git-svn-id: https://svn.eduke32.com/eduke32@8056 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 21:09:17 +02:00
pogokeen 222e593437 Change some clocks to support sub-tick precision using a new class, ClockTicks.
Using that higher precision, interpolate at a higher granularity.
Further, truncate the target interpolation time to vertical blank boundaries to avoid producing temporal artifacts.
Fix issues caused by interpolation calculations being handled differently in multiple places (and fix cases where smoothratios were being thrown away only to be redone without checking all proper conditions).
Ensure ClockTicks changes do not break other targets (EKenBuild, VoidSW), but note any interpolation there is not similarly updated.

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

# Conflicts:
#	source/build/src/build.cpp
#	source/build/src/sdlayer.cpp
2019-09-20 21:09:14 +02:00
terminx ec7fce9ff2 Ultra minor clipping stuff
git-svn-id: https://svn.eduke32.com/eduke32@8048 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 20:19:11 +02:00
terminx 8a01335c26 Don't consider CLIPCURBHEIGHT for ceiling clipping
git-svn-id: https://svn.eduke32.com/eduke32@8047 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 20:19:10 +02:00
terminx 1f5866295c This should be MAXSECTORS
git-svn-id: https://svn.eduke32.com/eduke32@8046 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 20:19:10 +02:00
terminx 6acf3a958e Remove EDUKE32_PREDICT_ macro usage in clip.cpp so the game doesn't stall if a weird clipping malfunction occurs
git-svn-id: https://svn.eduke32.com/eduke32@8045 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 20:19:09 +02:00
hendricks266 3b419e9d04 Fix mouse buttons 4 and 5 on Linux with SDL2, at least for 2.0.9 and up
git-svn-id: https://svn.eduke32.com/eduke32@8043 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 20:19:08 +02:00
terminx cbec65be68 Reduce stencil buffer size
Revert if it causes issues in anything.

git-svn-id: https://svn.eduke32.com/eduke32@8035 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 20:15:54 +02:00
terminx 78004b17de Ignore cstat 32768 sprites in map view
git-svn-id: https://svn.eduke32.com/eduke32@8034 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 20:15:53 +02:00
terminx 12cb46d94e Fix borderless windowed fullscreen mode
git-svn-id: https://svn.eduke32.com/eduke32@8020 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 20:14:07 +02:00
pogokeen fd41554ad7 timer.cpp: fix order of operations issue with timerUpdate()
git-svn-id: https://svn.eduke32.com/eduke32@8018 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 20:12:22 +02:00
pogokeen 0855428a0c timer.cpp: avoid using floating point arithmetic in timerUpdate()
git-svn-id: https://svn.eduke32.com/eduke32@8011 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 20:12:18 +02:00
Christoph Oelckers 20f5972b9b - fixed everything to compile again. 2019-09-20 19:37:29 +02:00
pogokeen 021e1358c7 timer.cpp: improve cross-platform & cross-compiler issues relating to precision & period.
Handle timerlastsample such that we don't throw away time & run slow in certain cases.
Ensure when calculating n, we do the double division first before multiplying for sake of floating point precision.

git-svn-id: https://svn.eduke32.com/eduke32@8009 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 16:12:31 +02:00
hendricks266 108a71cadb Update md3_vox_calcmat_common to solve a sporadic voxel flickering issue
Patch by Nuke.YKT.

git-svn-id: https://svn.eduke32.com/eduke32@8007 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 16:12:27 +02:00
terminx 7ea2e4de54 Revert "This should be enough for SDL controller hotplug support but I haven't tested it"
git-svn-id: https://svn.eduke32.com/eduke32@8005 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 16:12:23 +02:00
terminx 7ec6a6beca This should be enough for SDL controller hotplug support but I haven't tested it
git-svn-id: https://svn.eduke32.com/eduke32@8003 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 16:12:19 +02:00
terminx c72a69ff6f This timing stuff actually works
It doesn't help when it turns out the compiler is broken and implementing std::chrono::high_resolution_clock as something that only counts in ms instead of properly aliasing it to std::chrono::steady_clock!

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

# Conflicts:
#	source/build/src/sdlayer.cpp
2019-09-20 16:12:16 +02:00
hendricks266 25bdd9f6d5 Apply the BUILDART patch at long last.
git-svn-id: https://svn.eduke32.com/eduke32@8000 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 16:11:07 +02:00
hendricks266 1bbd251bff Rescan for controllers when toggling gamepads back on
git-svn-id: https://svn.eduke32.com/eduke32@7985 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 16:10:37 +02:00
terminx 04811f21f4 Replace separate timer implementations in SDL and Winlayer with a shared implementation based on std::chrono
git-svn-id: https://svn.eduke32.com/eduke32@7976 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	platform/Windows/build.vcxproj
#	platform/Windows/build.vcxproj.filters
#	source/build/src/mdsprite.cpp
2019-09-20 16:09:24 +02:00
terminx 55e3188afb There's no way this is correct.
git-svn-id: https://svn.eduke32.com/eduke32@7975 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/sdlayer.cpp
2019-09-20 16:08:12 +02:00
terminx f76ca0a361 Fix remaining casts to vec2_t/vec3_t
git-svn-id: https://svn.eduke32.com/eduke32@7973 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/build.cpp
2019-09-20 16:07:36 +02:00
hendricks266 b4362aa6a9 Implement controller defaults
git-svn-id: https://svn.eduke32.com/eduke32@7968 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 16:07:14 +02:00
hendricks266 3bfed33608 Add voxels option to menu, if at least one has been defined
git-svn-id: https://svn.eduke32.com/eduke32@7961 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/engine.cpp
2019-09-20 16:04:57 +02:00
hendricks266 284af9f5d9 Fix RENDERTYPE=WIN build
git-svn-id: https://svn.eduke32.com/eduke32@7960 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 16:04:43 +02:00
hendricks266 01fa02e1c0 Make use of SDL2's Game Controller API.
Thanks to JonoF for his take on this.

git-svn-id: https://svn.eduke32.com/eduke32@7958 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 16:03:49 +02:00
hendricks266 56998c4840 Report 16-bit analog axis precision to the game instead of arbitrarily truncating it to ~14.3 bits.
git-svn-id: https://svn.eduke32.com/eduke32@7956 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 16:03:45 +02:00
terminx 2ef83e4a71 This can overflow
git-svn-id: https://svn.eduke32.com/eduke32@7949 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 16:03:31 +02:00
hendricks266 e7723efcf4 Fix skipping to the end of def blocks
git-svn-id: https://svn.eduke32.com/eduke32@7938 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 16:03:06 +02:00
terminx 41ff733fcd Happier try_facespr_intersect()
I'm prejudiced against 30-line functions with statements nested 5 levels deep.

git-svn-id: https://svn.eduke32.com/eduke32@7933 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 16:02:56 +02:00
hendricks266 67b7d2408b newgamechoices
git-svn-id: https://svn.eduke32.com/eduke32@7930 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/defs.cpp
2019-09-20 16:02:49 +02:00
pogokeen 284adb6ac6 Fix issue with indexed colour textures where in the case that tiles entered the texcache while !waloff[picnum] & were later (re)loaded, the earlier pth pointing to the tilesheet containing the blank tile would never be properly replaced with an updated gl texture.
git-svn-id: https://svn.eduke32.com/eduke32@7929 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymost.cpp
2019-09-20 16:01:54 +02:00
hendricks266 ea79d74953 Revert r7908 because it introduces a race on dabuf
git-svn-id: https://svn.eduke32.com/eduke32@7928 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 16:01:27 +02:00
terminx 0d431a390f Reverse the order video modes are sorted in
git-svn-id: https://svn.eduke32.com/eduke32@7922 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 16:01:14 +02:00
terminx 32cd1ae4dd Tweak the fatal engine initialization error and game already running dialog boxes a bit
git-svn-id: https://svn.eduke32.com/eduke32@7921 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/build.cpp
2019-09-20 16:01:11 +02:00
terminx b8f668aa9b Polymost projection changes to correct the perspective in widescreen and ultrawide resolutions.
Patch from Nuke.YKT and Fox.

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

# Conflicts:
#	source/build/include/polymost.h
#	source/build/src/polymost.cpp
2019-09-20 15:48:55 +02:00
terminx 40e54fdbbb Tweak how the semaphore used to detect multiple running copies of the game is utilized
git-svn-id: https://svn.eduke32.com/eduke32@7912 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 15:46:43 +02:00
terminx c1aff49e4c Improve usage of initprintf mutex
git-svn-id: https://svn.eduke32.com/eduke32@7908 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 15:46:35 +02:00
terminx 064516c050 Re-implement our mutex_lock() family of functions using SDL's atomic spinlocks
git-svn-id: https://svn.eduke32.com/eduke32@7907 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 15:46:32 +02:00
terminx 9021b885d6 Eliminate pos_as_vec2 from anything that had it
git-svn-id: https://svn.eduke32.com/eduke32@7905 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/build.cpp
#	source/build/src/polymost.cpp
2019-09-20 15:46:28 +02:00
terminx 81882aa1a3 Fix issue clipping against sloped ceilings
git-svn-id: https://svn.eduke32.com/eduke32@7903 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 15:44:21 +02:00
pogokeen 4d22a44a5d tiles.cpp: backup & restore picsiz, walock, & waloff alongside other per tile arrays in artClearMapArt() and artSetupMapArt()
This fixes an issue with viewscreens as tiles that are setup game-side after a map is loaded could have their sizes reset to 0 while not being properly cleared from walock/waloff

git-svn-id: https://svn.eduke32.com/eduke32@7892 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 15:43:58 +02:00
pogokeen 5fad944ed1 engine.cpp: make renderSetTarget() more robust so that passing an xsiz or ysiz <= 0 is not accepted and can't cause a segmentation fault
git-svn-id: https://svn.eduke32.com/eduke32@7890 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 15:43:55 +02:00
pogokeen a844fd4b13 polymost.cpp: Fix issue where tiles whose dimensions had grown would not have their sizes updated in GL and could fail to update their texture data
git-svn-id: https://svn.eduke32.com/eduke32@7888 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymost.cpp
2019-09-20 15:42:29 +02:00
terminx 6931d448ff Oops
git-svn-id: https://svn.eduke32.com/eduke32@7884 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 15:34:30 +02:00
terminx 7553bb043f Skip drawing invalid polygons in polymost_drawpoly()
git-svn-id: https://svn.eduke32.com/eduke32@7880 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 15:34:18 +02:00
terminx 95598e08f9 getwalldist() tweak
git-svn-id: https://svn.eduke32.com/eduke32@7878 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 15:34:14 +02:00
terminx 9f9a158946 Replace runtime pow2 calculations with pow2char LUT usage
I don't know that this is any faster, but there's something to be said for standardization and consistency. I will be making most of this stuff use bitmap_set/test/clear() soon.

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

# Conflicts:
#	source/build/src/build.cpp
#	source/build/src/polymost.cpp
2019-09-20 15:34:08 +02:00
terminx 2a3c80f95d Fix issue with sounds being expired from cache
git-svn-id: https://svn.eduke32.com/eduke32@7874 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 15:33:05 +02:00