Commit graph

432 commits

Author SHA1 Message Date
Christoph Oelckers
f36ac1dc90 - fixed issues with console on top of intermissions not appearing. 2020-09-05 18:41:18 +02:00
Christoph Oelckers
443ddf670b - let the ANM player wait until the sound has finished if it has reached the last frame before the sound ends.
In Shadow Warrior there's a few where the sound plays a bit longer than the video.
Fixes #341
2020-09-05 18:14:50 +02:00
Christoph Oelckers
27acd430aa - reset the screen job clock when advancing.
Fixes #347
2020-09-05 17:37:37 +02:00
Christoph Oelckers
fa50cde93f - fixed skill selection in Duke.
Screw these old shadowing menu variables. Well, the one for skill is gone now.
Fixes #344
2020-09-05 16:31:01 +02:00
Christoph Oelckers
9af093b818 - fixed screen job timer when paused
Fixes #343
2020-09-05 16:21:53 +02:00
Christoph Oelckers
e0b4dde3cd - fixed: A screen job that fades out was not rendering its final (black) frame which could result in visual glitches.
Fixes #320
2020-09-05 15:59:32 +02:00
Christoph Oelckers
c1786001b2 - route all game state changes through game actions.
This is to avoid problems with the main loop not calling Ticker and Render in sync.
2020-09-05 15:43:34 +02:00
Christoph Oelckers
7a5dca7d5d - renamed startgame CCMD to levelstart. 2020-09-05 14:02:07 +02:00
Christoph Oelckers
32ec9ff369 - consolidated crosshair drawing and added ZDoom's crosshair code.
For Exhumed this is the default, for the other games it is an option.
Fixes #269.
2020-09-05 13:57:26 +02:00
Christoph Oelckers
b23424485a - re-implemented VP8 support.
Since the decoder cannot handle sound, there's two options:

1: Use the same sounds as the video it replaces.
2: If an identifiable streamable sound with the same base name is found, it will be played along with the video.
Fixes #133
2020-09-05 11:58:19 +02:00
Christoph Oelckers
80cea90854 - implemented zoom by mouse wheel for the automap.
Fixes #121
2020-09-05 09:10:24 +02:00
Christoph Oelckers
adbedd30c4 - consolidated the 4 functions for handling the automap zoom. 2020-09-05 00:58:25 +02:00
Christoph Oelckers
cdd2329b63 - fixed levelwarp for games with linear level counting.
Fixes #337
2020-09-05 00:00:55 +02:00
Christoph Oelckers
d2de11cd99 - hide the message display on intermission screens.
Fixes #336
2020-09-04 23:56:04 +02:00
Christoph Oelckers
2e8b808683 - added a C_ClearMessages function for the console and fixed game restart after death.
Fixes #322
2020-09-04 22:23:38 +02:00
Christoph Oelckers
1eb99f69c2 - transitioned Exhumed to level change events. 2020-09-04 21:59:38 +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
5bc80d2468 - macro cleanup 2020-09-04 21:17:24 +02:00
Christoph Oelckers
3eef0db6f6 - check if a map file exists before starting it. 2020-09-04 20:47:40 +02:00
Christoph Oelckers
97f395bd72 - transitioned Blood to the new level change messaging system 2020-09-04 20:46:44 +02:00
Christoph Oelckers
77f96a1c75 - fixing some issues. Level transitions in Duke are working now. 2020-09-04 19:43:36 +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
b253ae123f - run screen jobs with uncapped frame rate.
Fixes #325
2020-09-03 18:36:37 +02:00
Christoph Oelckers
fb334e7f1a - transitioned Blood's give command and changed SW's not to call the cheat handler. 2020-09-03 16:31:31 +02:00
Christoph Oelckers
3e5e956b72 - run most cheats through the network.
The remaining excpetions are the "give" CCMD and any level change action.
Unfortunately the implementation of most cheats is not multiplayer safe so right now it'd only be useful for demo recording (assuming that worked to begin with... ;))
2020-09-03 01:32:51 +02:00
Christoph Oelckers
a0874a26a7 - noclip cheat and splitting of Exhumed's cheat code into its own file. 2020-09-03 00:41:32 +02:00
Christoph Oelckers
66bf8113b8 - implemented the 'god' cheat as a network command.
This was mainly chosen as something simple to get the basics set up.
2020-09-03 00:29:17 +02:00
Christoph Oelckers
66d8eae8e1 - implemented the framework for freeform network commands.
Unlike ZDoom this uses callbacks for implementation to keep game specific parts encapsulated to the game code.
2020-09-02 23:27:02 +02:00
Christoph Oelckers
b3d89a6a0b - removed the old main loop. 2020-09-02 23:03:48 +02:00
Christoph Oelckers
b49e050baf - transitioned Exhumed to the new main loop.
Fixed #301
2020-09-02 22:55:57 +02:00
Christoph Oelckers
b1a3080671 - migrated Exhumed to a local ticker as well.
gameclock is history - all games now run on a timer that increments once per tick under their own control and not independently of the ticker routine.
2020-09-02 21:42:12 +02:00
Christoph Oelckers
a222a7d7c9 - transitioned Shadow Warrior to new main loop.
Problem: Does not work yet with cl_syncinput = 0. Something about those angle and horizon settings is not right yet.
2020-09-02 20:58:37 +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
aabbbcb2ff - reset the network timer after lengthy operations.
This includes loading a level and busy-waiting for a sound to play.
Also block these loops and the sounds they wait for in network games to avoid problems from longer delays here.
The problem seems to be directly inherited from ZDoom which shows the same issue with screen wipes.

Fixes #297
2020-09-02 10:00:07 +02:00
Christoph Oelckers
e5612b82c7 - fixed: The tile manager created its backup arrays before loading .def files.
This could let such textures disappear with the new main loop.
2020-09-02 00:36:49 +02:00
Christoph Oelckers
8d63e735d0 - transitioned Blood to the new main loop.
Mostly working but interpolation is not correct yet and for some strange reason the numbers on the HUD are gone.
2020-09-01 23:34:04 +02:00
Mitchell Richters
1354d52c05 - Major cleanup of Q16.16 utilisation within games and engine.
* Remove fix16.h/cpp and utilise library from m_fixed.h.
* Extend m_fixed.h with two inline functions for int to/from float operations.
* Replace fix16_floor operations with those from xs_Float.h
* Replace multiple Q16.16 conversions from 0 to just be 0.
* Replaced all found in-game bit-shifts and multiplications/divisions with inline functions from m_fixed.h
* Replaced many casts of FRACUNIT as double in SW's panel.cpp as it is converted to double by way of type promotion.
* Fixed missed precision fixes in SW's panel.cpp where some types weren't declared correctly.
* Replaced 100+ `Cos()/Sin() >> 16` operations for Blood with inline functions `CosScale16()/SinScale16()`.
2020-09-01 23:00:47 +10:00
Christoph Oelckers
3204a3e5fc - negated the meaning of SB_AIMMODE.
This is because 'classic' aim mode will reset the view if the mouseaim key is not pressed.
The problem with this is that an empty input packet will trigger a view reset. If the meaning is inverted the default aim mode is free mouse view which doesn't try to alter any view state and is therefore preferable for an empty packet.

Fixes #292
2020-08-31 20:51:22 +02:00
Christoph Oelckers
923833ccec - animated menus without frame rate cap
The frame rate cap is only deactivated if there's actual animations running so that leaving the game in the menu won't make the engine run at high frame rates.
Fixes #288.
2020-08-31 19:56:13 +02:00
Christoph Oelckers
54d65bfcfc - fixed some warnings 2020-08-31 19:28:05 +02:00
Christoph Oelckers
2bf368d49b - redid the timer for the automap zoom
Add more precision and uncouple from the game timer
2020-08-31 19:18:53 +02:00
Christoph Oelckers
03aad6559b - added a global leveltimer variable to Duke.
This timer only gets incremented by the main game ticker when the playsim is running.

This timer gets used for all playsim-related timing and animations so that these are decoupled from imprecisions in the global timer.
2020-08-31 00:33:41 +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
7684f9e3e6 - fixed duplicate symbol error on macOS 2020-08-31 00:15:48 +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
b8258da997 - cleaning out some trash from compat.h.
The header from hell...
2020-08-30 23:34:40 +02:00
Christoph Oelckers
98557947da - gameclock must also be set before calling gi->Render.
This runs at the display's frame rate so the timer value from the Ticker call is not precise enough to do all the work.
2020-08-30 22:52:20 +02:00
Mitchell Richters
5daaa1fc06 - fix issues with cl_syncinput 0. 2020-08-31 05:24:29 +10:00
Mitchell Richters
6f653da0fc - DBaseStatusBar: Create function DBaseStatusBar::CalcMagazineAmount() for use with calculating magazine values when drawing the HUD. 2020-08-30 20:24:37 +02:00
Mitchell Richters
aeb807bea1 - gamecvars.cpp: Create CVAR cl_showmagamt. 2020-08-30 20:24:37 +02:00