Commit Graph

42 Commits

Author SHA1 Message Date
Christoph Oelckers adbedd30c4 - consolidated the 4 functions for handling the automap zoom. 2020-09-05 00:58:25 +02:00
Christoph Oelckers 8114309e89 - compat.h cleanup.
* use static_assert directly. Raze is C++17, no need for that macro shit.
* removed CONSTEXPR - I seriously fail to see the use here, many of the functions marked as CONSTEXPR cannot possibly even be constant evaluated so the declaration makes no sense. Removed most of these and replaced the valid ones with the official constexpr keyword.
* got rid of EDUKE_PREDICT_FALSE - this makes zero sense in script parsing code, at best it will save a few microseconds. Clean code wins.
* replaced Blrintf with xs_CRoundToInt. Shitty name is shitty name, even if derived from POSIX.
* replaced Bstr*casecmp with str*icmp. As these get defined in the CMake project based on actual compiler checks they are preferable here.
* removed lots of other stuff that is not needed with a minimum compiler requirement of C++17.
2020-09-04 21:24:48 +02:00
Christoph Oelckers e5e8c02f1d - WIP level transition refactored to a game independent event system. 2020-09-04 19:43:35 +02:00
Christoph Oelckers b49e050baf - transitioned Exhumed to the new main loop.
Fixed #301
2020-09-02 22:55:57 +02:00
Christoph Oelckers 621a1e0b3d - removed the packet averaging code.
This is also part of the backend code and won't be needed here anymore.
2020-09-02 20:57:03 +02:00
Christoph Oelckers 007c6e122d - gameclock abstraction
This may need more work to have a reliable timer
2020-08-31 00:16:43 +02:00
Christoph Oelckers 2f05a93547 Merge branch 'Packet' into back_to_basics2
# Conflicts:
#	source/core/gamestruct.h
#	source/games/duke/src/gameloop.cpp
#	source/games/duke/src/player_d.cpp
2020-08-31 00:09:56 +02:00
Christoph Oelckers 3a7b23f655 remove unused stuff 2020-08-30 20:23:48 +02:00
Christoph Oelckers 765f211e05 - things are mostly working again.
Rendering produces an image again, input gets properly processed, but unsynchronised mouse input isn't properly applied yet.
2020-08-30 19:59:46 +02:00
Christoph Oelckers d59284c96b - transitioned Duke to the new main loop.
Everything compiles, but hasn't been tested. Doing a safety commit first.
2020-08-30 12:02:32 +02:00
Christoph Oelckers 367b4ce051 - this should be all we need from GZDoom to hook up the main loop. 2020-08-30 09:32:34 +02:00
Christoph Oelckers 49106c5b5e - Duke: Do not reset the global ticker.
The new main loop code cannot handle that. Instead set a start value for gameclock so that gameclock can be based on an arbitrary time value instead of directly representing global time.
2020-08-30 08:04:33 +02:00
Christoph Oelckers b76168f673 - moved the main event processing functions into the global main loop.
Now, with all the Build timer stuff removed these calls were all identical between games.
2020-08-26 16:59:41 +02:00
Mitchell Richters ef728429e0 - Core: Remove legacy smoothratio calculator `CalcSmoothRatio()`. 2020-08-26 09:49:47 +10:00
Mitchell Richters e0aaaf1f60 - All Games: Move `gameclock` and `lastTic` to gamecontrol. 2020-08-26 09:49:44 +10:00
Mitchell Richters 76776d24d7 - All Games: Remove use of `ClockTicks` and replace with `int`. 2020-08-26 09:49:42 +10:00
Christoph Oelckers 76811a1881 - InputState cleanup
This removes most of the InputState class because it is no longer used.
The only remaining places still checking scan codes are the modifiers for sizeup and sizedown.
All the rest was remapped to safer methods. The multiplayer taunts are currently inoperable, they will need support of shift-bindings to get proper support.
2020-08-24 20:34:18 +02:00
Christoph Oelckers 7859a29e95 - use global variables to track automap state
So far implemented in Duke/RR.
2020-08-24 19:31:43 +02:00
Christoph Oelckers 85364c2bb6 - let all video players respect the SoundEnabled setting.
Fixes #164.
2020-08-11 19:52:54 +02:00
Christoph Oelckers 3e8ff96e6b - added workaround for DukeDC's ending cutscene which was abusing undefined behavior in the original code. 2020-08-05 22:57:45 +02:00
Mitchell Richters 0c12436092 - change returned value for `CalcSmoothRatio()` from int to double and pass through to `displayrest()` for future use with `displayweapon()`.
* `displayrooms()` ultimately should be adjusted as well. For now, just relying on integer truncation as this is just a proof of concept.

# Conflicts:
#	source/core/gamecontrol.cpp
#	source/core/gamecontrol.h
2020-08-02 21:20:52 +02:00
Christoph Oelckers 18c3d9b240 - get the frame time right at the start of the frame, not when performing interpolations.
This is to factor think time out of the time span between frames and to avoid changes if the smoothratio gets calculated multiple times.
2020-08-02 21:16:01 +02:00
Mitchell Richters 1cf857e788 - create an enum for MaxSmoothRatio and replace multiple hard-coded uses of '65536' constant. 2020-08-02 20:57:08 +02:00
Christoph Oelckers 368298d02d - enable the menu and console everywhere, except on the intro logos. 2020-07-22 00:42:50 +02:00
Christoph Oelckers 902fbf6f5d - got rid of MODE_TYPE since this will be handled in the backend in the future. 2020-07-21 22:59:24 +02:00
Christoph Oelckers 61f5247b71 -let's hope this will solve the pausing problem for good.
The checks for game pause were totally inconsistent, so now there is a utility function that tells whether the game is supposed to run or not.
pause can also take 3 values now - 0 for no pause, 1 for pause from opening the menu or console or 2 for hitting the pause button.
2020-07-21 22:46:26 +02:00
Christoph Oelckers 7d7ae9e463 - fixed gamestartup parser so that it can detect script versions again. 2020-07-20 18:43:50 +02:00
Christoph Oelckers a0cd407632 - cleanup on pausing code. 2020-07-15 18:10:31 +02:00
Christoph Oelckers a9f152c1fe - added JFDuke's label type checker and did some cleanup on the CON init code.
Most importantly: Use dynamic buffers for managing the labels instead of hijacking some other storage space.
2020-07-15 12:34:42 +02:00
Christoph Oelckers 7b75a0683a moveactors plus backing code. 2020-06-21 22:37:29 +02:00
Christoph Oelckers 9104fda1a0 - movestandables - old code not removed yet. Plus some World Tour handling. 2020-06-21 22:36:10 +02:00
Christoph Oelckers 4b235c0771 - ifhitbyweapon and shorter game checks with inline functions. 2020-06-21 22:36:09 +02:00
Christoph Oelckers 68c97e3c25 Merge branch 'master' of https://github.com/coelckers/Raze
# Conflicts:
#	source/core/gamecontrol.h
#	source/duke3d/src/game.cpp
#	source/exhumed/src/exhumed.cpp
#	source/rr/src/game.cpp
2020-05-31 23:30:10 +02:00
Mitchell Richters 7ed9f4fa8c Prepare back-end for updated in-game pausing. 2020-05-31 23:19:54 +02:00
Christoph Oelckers 29db3febb8 - updated the platform code to be mostly identical with GZDoom 2020-05-26 00:08:26 +02:00
Christoph Oelckers 8bd5f12b42 - matching sound backend code with GZDoom.
# Conflicts:
#	source/core/sound/s_soundinternal.h
2020-05-23 12:59:11 +02:00
Christoph Oelckers 6a8efb7520 - update of music code, in particular separating the engine-specific lookup from the backend.
# Conflicts:
#	source/core/music/music.cpp

# Conflicts:
#	source/build/src/palette.cpp
2020-05-23 12:37:47 +02:00
Christoph Oelckers 6a0785bbd4 - manual update of some missed content. 2020-05-22 18:28:03 +02:00
Christoph Oelckers 14cdfa3f3c - more file matching.
- moved c_con to Duke subproject because it's the only one using this stuff.
2020-04-12 08:30:41 +02:00
Christoph Oelckers 2883553ed2 - moved file lookup functions to utilities and matched to GZDoom's version. 2020-04-12 08:30:41 +02:00
Christoph Oelckers 797640c494 - use ZDoom's memory allocation wrapper instead of EDuke's.
This simply plays nicer with the compiler's diagnostics.
2020-04-12 08:30:38 +02:00
Christoph Oelckers e2f5e8fe34 - renamed 'common' to 'core'.
We'll need 'common' for something else.
2020-04-12 08:30:36 +02:00
Renamed from source/common/gamecontrol.h (Browse further)