Commit graph

529 commits

Author SHA1 Message Date
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
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
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
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
d40e53eb53 - more Exhumed pitch change fixes. 2020-08-31 21:48:17 +02:00
Christoph Oelckers
6b1fa22aed - fixed view centering in Exhumed.
Switched to GDX's code because the one present here looked quite weird.
This still does not feature interpolation.
Fixes #296
2020-08-31 21:41:39 +02: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
54d65bfcfc - fixed some warnings 2020-08-31 19:28:05 +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
ba8dc788fe - hotfixing some Exhumed map transition issues.
This avoids crashing on LEV20, but the whole thing is simply too poorly implemented to actually work - this needs to be redone so that the map transition does not occur in the middle of the game ticker.
2020-08-30 21:45:21 +02:00
Christoph Oelckers
511cb51e7f - these 2 variables no longer exist. 2020-08-30 21:20:05 +02:00
Christoph Oelckers
26f6bac060 - Exhumed: save the status variables to savegames again.
Since this status bar depends on explicit updates, this data needs to be restored after loading, and just saving it out is the easiest way to ensure that.
Fixes #274
Fixes #276
2020-08-30 21:16:37 +02:00
Christoph Oelckers
a9bf1ab4bc - Exhumed: Renamed changelevel CCMD to Levelwarp for consistency.
Fixes #278
2020-08-30 21:07:00 +02:00
Mitchell Richters
e32cd81cc7 - Unify stat fps for all games. 2020-08-30 20:24:36 +02:00
Christoph Oelckers
747dac6c41 - Exhumed: Mark unused function arguments in standard C++ fashion. 2020-08-30 20:24:36 +02:00
Christoph Oelckers
ffe5b114f3 - the engine starts on the new main loop and is capable of running the intros and the menu, but not the game yet. 2020-08-30 12:49:21 +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
d49aedacea - continued work on main loop - added a few new entry points to the game interface. 2020-08-30 00:55:49 +02:00
Christoph Oelckers
56d0647412 - migrated the last 3 remaining UI controls to CCMDs. 2020-08-29 17:49:15 +02:00
Christoph Oelckers
694444b62a - converted the remaining input bits.
Looks like it is working in all games except Blood (not that it surprises me that it's Blood again which has issues...)
2020-08-29 13:32:55 +02:00
Christoph Oelckers
3a9bcb0b64 - moved Exhumed's cheat bits back into the game module.
They are no longer part of the packet interface.
2020-08-29 02:17:28 +02:00
Christoph Oelckers
dc1f56e8f9 Merge remote-tracking branch 'remotes/Github_private/back_to_basics2' into Packet
# Conflicts:
#	source/core/inputstate.cpp
#	source/exhumed/src/exhumed.h
2020-08-29 01:19:48 +02:00
Christoph Oelckers
fe7f3a2f9e - handle the run key. 2020-08-29 00:57:07 +02:00
Christoph Oelckers
b9e0f493b2 - transitioned the 5 primary action keys: Open, Jump, Crouch and Fire/AltFire. 2020-08-28 23:25:08 +02:00
Christoph Oelckers
847fa48724 - cleaned out the remaining parts of baselayer.h
In particular this means to remove the option to disable widescreen aspect ratios. The way this was handled makes no sense with the current render backend.

The aspect ratio code will have to be redone entirely to properly obey the backend's settings.
2020-08-28 09:06:49 +02:00
Christoph Oelckers
536e7455f2 - moved I_StartFrame to the top of the loop and cleaned up baselayer.hj 2020-08-28 08:44:44 +02:00
Christoph Oelckers
d62d2eaec7 - processed all remaining local input CCMDs and removed some bits only needed for multiplayer.
These MP bits should be reimplemented as network commands later, they only take up valuable space in the bit field.
2020-08-28 00:03:35 +02:00
Christoph Oelckers
ee7d558282 - removed the remains of sending pause with the input packets.
None of this was really working anymore, but will have to be rethought once a network stream exists again.
But even then, this is better sent as a separate command, and in MP only.
2020-08-27 22:38:52 +02:00
Christoph Oelckers
447573aa36 - consolidation of invprev, invnext and invuse. 2020-08-27 22:19:24 +02:00
Christoph Oelckers
43de0d8312 - consolidation of inventory item activation through hotkeys.
This also adds hotkeys for Exhumed which never implemented them.
2020-08-27 21:25:09 +02:00
Christoph Oelckers
10df3e094a - rework of weapon input to use common features in shared code.
This also adds stubs for all unimplemented features in the games for easier addition.
2020-08-27 00:53:35 +02:00
Christoph Oelckers
f597f7c265 - made the GameFunc constants global again.
With most of the more specific features being migrated to CCMDs the list is relatively clean now, with merely 2 buttons that are game specific.
2020-08-27 00:25:59 +02:00
Christoph Oelckers
4b299fa412 - Exhumed also handled. 2020-08-27 00:58:21 +02:00
Christoph Oelckers
78a024a50c - fixed: Exhumed's sound module did not check the 'sound disabled' CVAR. 2020-08-26 22:26:28 +02:00
Christoph Oelckers
b4df1fd662 - fixed Ramses text display.
Fixes #265.
2020-08-26 22:22:46 +02:00
Christoph Oelckers
1a25504d02 - looks like the nAngle field in the PLayerInput struct isn't used for anything anymore. 2020-08-26 21:32:18 +02:00
Christoph Oelckers
83c8770d02 - fixed Ramsed head display and not freezing the input when it is active. 2020-08-26 21:28:57 +02:00
Christoph Oelckers
096a2bd4e9 - fixed some of the sound issues in Exhumed
* ambient sounds were constantly restarted resulting in garbled sound.
* sound priorities were not checked. This was used to limit some sounds to one instance per actor or to allow terminating other sounds playing on the same actor.
2020-08-26 20:22:11 +02:00
Christoph Oelckers
e5a4276a5a - fixed infinite loop. 2020-08-26 20:20:36 +02:00
Christoph Oelckers
4e846f8d66 - do not print game init messages to the notify display. 2020-08-26 20:19:54 +02:00
Mitchell Richters
e3fe1b2b60 - Exhumed: Correctly transform player velocities when running on single 30Hz timer.
Thanks, Graf :)

# Conflicts:
#	source/exhumed/src/exhumed.cpp
2020-08-26 17:27:15 +02:00
Mitchell Richters
0c300c181f - Exhumed: Unify game with single timer instead of getting forward/side velocity at 120Hz.
* Player movement is close, but not exactly as it was. Requires more work if it is to be considered.

# Conflicts:
#	source/exhumed/src/exhumed.cpp
#	source/exhumed/src/ps_input.h
2020-08-26 17:26:42 +02:00
Christoph Oelckers
abf715eace - unified the packet structures of all games.
Currently the bit fields are still separate and they have to be merged, but for now the added memory does not matter.
Having this structure in the common parts will allow work on consolidating the input code, though.
2020-08-26 17:12:48 +02:00
Christoph Oelckers
2ae5f960c5 - renamed fields in Exhumed's packed struct.
One step closer to getting these merged.
2020-08-26 17:09:47 +02:00
Christoph Oelckers
5a77aace2f - strip the structure for local input off the fields not needed here.
Now it's basically the same as Dukes.
2020-08-26 16:59:42 +02:00