Commit Graph

167 Commits

Author SHA1 Message Date
pogokeen 19c2c690d3 Fix latency issue introduced by G_FPSLimit() handling of videoNextPage() that was causing frames to be delayed presentation until after the next frame is prepared.
videoNextPage() is now called immediately after preparing the frame for drawing, outside of G_FPSLimit() but on the condition that its return value is true.

git-svn-id: https://svn.eduke32.com/eduke32@7730 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 13:32:27 +02:00
pogokeen 281ee3358b Add benchmarkmode cvar which allows putting demo cameras in the map which can be used for automatic benchmarking of performance & correctness testing
git-svn-id: https://svn.eduke32.com/eduke32@7729 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 13:32:24 +02:00
pogokeen 87d3af7204 game.cpp: change camera sprite yvel limits to clamp to min/max angle when beyond the min/max rather than when beyond 0 and 199
git-svn-id: https://svn.eduke32.com/eduke32@7728 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 13:32:21 +02:00
terminx a7d4df8072 Use default argument values of -1 for the sprite and player indexes passed to VM_OnEvent()
git-svn-id: https://svn.eduke32.com/eduke32@7721 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 13:08:36 +02:00
terminx 2114abcedd Don't force APLAYER to have the default action when shown through a viewscreen in EDUKE32_STANDALONE builds
git-svn-id: https://svn.eduke32.com/eduke32@7710 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 12:07:24 +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 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
hendricks266 5cd7f18dab !
git-svn-id: https://svn.eduke32.com/eduke32@7680 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:05:37 +02:00
hendricks266 a9e0c9afe1 Allow CON-specified actions to override hardcoded tsprpicnum behavior of PLAYERONWATER, CAMERA1, and RAT
git-svn-id: https://svn.eduke32.com/eduke32@7677 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:05:29 +02:00
terminx a4b30b5b90 Move S_Update() out of game loop and into Net_GetPackets()
This improves, but doesn't fix, the issue with sound popping when the player angle changes.

git-svn-id: https://svn.eduke32.com/eduke32@7676 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:05:26 +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
terminx 79752ee168 Move call to S_Update() to after G_MoveLoop()
git-svn-id: https://svn.eduke32.com/eduke32@7672 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:53 +02:00
terminx 562e6f419c Use function overloading to clean up some of the CON event execution function names
git-svn-id: https://svn.eduke32.com/eduke32@7636 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:21:37 +02:00
Christoph Oelckers dd7ce38cbb - adjustments for the Blood merge. 2019-09-19 22:26:44 +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 0dcceb9147 Fix EDUKE32_STANDALONE crash when calling G_DeleteOldSaves() at startup in debug builds
git-svn-id: https://svn.eduke32.com/eduke32@7599 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:37:03 +02:00
Christoph Oelckers ea631cb6ac - fixed some warnings 2019-09-19 14:18:44 +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 ac8dabb0fb Rename net.* to network.*
git-svn-id: https://svn.eduke32.com/eduke32@7443 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 12:20:45 +02:00
terminx 2ec041b10e Use correct type in range-based loop
git-svn-id: https://svn.eduke32.com/eduke32@7407 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-19 17:08:19 +00:00
terminx db51740d3d Clean up a few uses of the hash table functions to account for hash_findcase() working properly now
git-svn-id: https://svn.eduke32.com/eduke32@7366 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-02 23:21:21 +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
terminx e0b5e32be2 Clean up a little bit of yxaspect and viewingrange variable cruft in G_DrawRooms()
git-svn-id: https://svn.eduke32.com/eduke32@7349 1a8010ca-5511-0410-912e-c29ae57300e0
2019-02-22 18:35:33 +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 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
hendricks266 9b17be7f3e CON: Add EVENT_DISPLAYROOMSCAMERATILE
git-svn-id: https://svn.eduke32.com/eduke32@7313 1a8010ca-5511-0410-912e-c29ae57300e0
2019-01-22 17:56:34 +00:00
terminx 6ca492918e Slightly revise framerate limiter and r_showfps 2 display
git-svn-id: https://svn.eduke32.com/eduke32@7304 1a8010ca-5511-0410-912e-c29ae57300e0
2019-01-12 00:21:53 +00:00
terminx 9a23ea148e Expand the list of options available for the framerate limiter, and add a separate option that controls an offset added to the limiter. This should allow the menu to cover all of the important use cases involving G-SYNC, FreeSync, and "Fast Sync".
git-svn-id: https://svn.eduke32.com/eduke32@7287 1a8010ca-5511-0410-912e-c29ae57300e0
2018-12-15 01:40:14 +00:00
terminx 06ac4f88b9 This fixes S_CheckSoundPlaying() and makes CON_IFSOUND work correctly in scripts that run during menus. These changes together fix the exchange between Duke and Lani at the end of episode 3 of Duke3D.
git-svn-id: https://svn.eduke32.com/eduke32@7279 1a8010ca-5511-0410-912e-c29ae57300e0
2018-12-15 01:39:25 +00:00
seventyfive 87cf4495bf - Packet code implementation (merge from private c/s repo), world updates are now synced through snapshots. See tag SVN_SyncPoint_Dec2018 on master of the other repo.
- "Scratch pad" sprites implementation, to avoid desyncs in sprite indexes, clients will insert temporary sprites which are cleared out when they receive the next snapshot from the server.
- Patches from Striker which fix player stomping frag counts, the accept button when hosting a game through the menu, and a "noffire" command line parameter.
- Patches from NY00123: t_data sync optimizations to improve some jittery behavior on the client side.

git-svn-id: https://svn.eduke32.com/eduke32@7242 1a8010ca-5511-0410-912e-c29ae57300e0
2018-12-08 00:40:39 +00:00
terminx c29ffec9cb Clean up A_InsertSprite() and the beginning of A_Spawn()
git-svn-id: https://svn.eduke32.com/eduke32@7234 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:14:33 +00:00
terminx 592ee52d2b Improve selection of a failsafe video mode if videoSetGameMode() fails at game startup
git-svn-id: https://svn.eduke32.com/eduke32@7221 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:13:14 +00:00
terminx 21958bc110 Minor start window cleanup. This ended up touching a bunch of other files due to variable renaming, but there are zero functional changes to anything but the startup window in this commit.
git-svn-id: https://svn.eduke32.com/eduke32@7219 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:13:02 +00:00
terminx 073987fa42 After parsing the cfg, fill in the default bindings for any control functions that are completely missing, with function unbound and key unused by anything else.
git-svn-id: https://svn.eduke32.com/eduke32@7212 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:12:21 +00:00
terminx ca1494262c Convert some unwieldly g_player[myconnectindex].ps->gm crap to references
git-svn-id: https://svn.eduke32.com/eduke32@7211 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:12:16 +00:00
terminx 0d652ae063 Switch VM_EventCommon to use references
git-svn-id: https://svn.eduke32.com/eduke32@7205 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:11:44 +00:00
terminx 9c0ee3d557 Use references in G_UpdatePlayerFromMenu() and G_BackToMenu() for readability
git-svn-id: https://svn.eduke32.com/eduke32@7184 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:09:09 +00:00
terminx 89fe17e673 This does nothing but fix indentation of a single block of code
git-svn-id: https://svn.eduke32.com/eduke32@7183 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:09:04 +00:00
terminx 52eed46aa9 Remove dead code that once opened a browser to the store page for Duke Nukem 3D: Megaton Edition on Steam
git-svn-id: https://svn.eduke32.com/eduke32@7182 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:08:59 +00:00
terminx a4182305d0 Clean up some of the remaining stuff in duke3d/src/config.cpp a bit. Not very meaningful changes... just things I saw when trying to decide how to tackle some of this mess.
git-svn-id: https://svn.eduke32.com/eduke32@7180 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:08:44 +00:00
terminx 86496a8126 CON structure member access readability cleanup
git-svn-id: https://svn.eduke32.com/eduke32@7169 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:07:38 +00:00
terminx e6955694e2 Fix a null pointer dereference in G_GameExit() so we don't crash while we're crashing
git-svn-id: https://svn.eduke32.com/eduke32@7162 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:06:58 +00:00
terminx 7c4ba73bfd Move CONTROL_ProcessBinds() call to P_GetInput()
git-svn-id: https://svn.eduke32.com/eduke32@7135 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-25 23:34:08 +00:00
terminx ad7d61baa1 Use range-based loops for simplicity
git-svn-id: https://svn.eduke32.com/eduke32@7130 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-25 23:33:40 +00:00
terminx ed2f9f247b Rework volume control to not completely suck
git-svn-id: https://svn.eduke32.com/eduke32@7122 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-25 23:32:50 +00:00
terminx 1c007c56c5 More sound work
git-svn-id: https://svn.eduke32.com/eduke32@7119 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-25 23:32:29 +00:00
terminx 374a09536d Add per-sound volume support to audiolib. This allows you to control the volume of sounds independently from the distance-based system exposed through CON. To use this, you must define your sounds via the .def syntax and set the "volume" property--default is 1.0.
git-svn-id: https://svn.eduke32.com/eduke32@7117 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-25 23:32:14 +00:00
terminx 98f42cba6f Add support for defining all sound parameters through the .def syntax, instead of just the filename
git-svn-id: https://svn.eduke32.com/eduke32@7116 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-25 23:32:05 +00:00
terminx 9613bbac33 Use std::min and std::max instead of min and max macros.
git-svn-id: https://svn.eduke32.com/eduke32@7078 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-16 06:09:54 +00:00
terminx e77325f2a4 Remove redundant assignments
git-svn-id: https://svn.eduke32.com/eduke32@7077 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-16 06:09:42 +00:00