Christoph Oelckers
bf4f538c61
- a few more places where gameclock could be substituted.
...
Nothing here needs higher precision.
2020-08-31 19:20:04 +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
45a22eb3cd
- do proper interpolation of the snorkel in RR.
2020-08-31 19:06: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
34104a74d8
reduce dependency of code on global gameclock variable
...
passing it as parameter to operateweapon*
2020-08-31 00:17:40 +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
00d35bc42c
- fixed the number pulsing on Duke's and RR's HUD.
2020-08-30 22:52:50 +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
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
Mitchell Richters
5daaa1fc06
- fix issues with cl_syncinput 0
.
2020-08-31 05:24:29 +10: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
Christoph Oelckers
5136e7dc2d
- SW: Moved the key display on the fullscreen HUD above the ammo display.
...
Space is a bit too tight when activating the clip display otherwise, especially on 4:3 screens.
2020-08-30 21:01:29 +02:00
Mitchell Richters
d0e390c554
- Blood: Don't treat akimbo shotguns as a reloading weapon. It doesn't go through the reload sequence like when the player doesn't have the power-up.
2020-08-30 20:24:39 +02:00
Mitchell Richters
c0374cf890
- SW: Move static function DoReloadStatus()
into the class as private function
2020-08-30 20:24:38 +02:00
Mitchell Richters
26ffc82cc0
- SW: Remove duplicated code from dd832aaea3f688b375c74643606f299c76d92f3b.
2020-08-30 20:24:38 +02:00
Mitchell Richters
c555540e24
- Blood: Implement cl_showmagamt
for the game's shotgun.
...
* Tile set for `kSBarNumberAmmo` does not include a slash. Hack put in place to get me a slash from a specific tile of a different font. It "works" and I don't think it looks too bad.
2020-08-30 20:24:38 +02:00
Mitchell Richters
1617938d4f
- Duke: When using cl_showmagamt 1
, increase pistol maximum by 4 so that when you have full ammunition, you have a full clip.
...
* On the fence about this. Lower makes the game harder, and higher could mean the difference between life and death. I do think that if we're showing amounts in the magazine, full ammo should constitute a full magazine. I think the max of 200 is an oversight from the original devs as all other games have proper defaults that reflect the magazine or cylinder capacity.
2020-08-30 20:24:38 +02:00
Mitchell Richters
10962e2193
- SW: Implement cl_showmagamt
for the game's shotgun and uzi.
...
* SW does not have any special characters in its BigFont, so currently there's no divider between ammunition amounts. This is to be discussed on the PR.
2020-08-30 20:24:37 +02:00
Mitchell Richters
eb3a21e677
- Duke: Implement cl_showmagamt
for the RR's pistol and shotgun.
2020-08-30 20:24:37 +02:00
Mitchell Richters
161647ed5b
- Duke: Implement cl_showmagamt
for the game's pistol.
2020-08-30 20:24:37 +02: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
Mitchell Richters
e32cd81cc7
- Unify stat fps
for all games.
2020-08-30 20:24:36 +02:00
Christoph Oelckers
59a964bb83
- same for SW
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
84e54e4fdb
- deleted several unused local variables
...
None of the initializers here is modifying gamestate, this looks like overcautious preservation for demo compatibility.
2020-08-30 20:24:23 +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
c3fa9b76c4
- fixed: The render style must be set to a defined value at the start of rendering a scene.
2020-08-30 17:40:04 +02:00
Christoph Oelckers
38d10cc591
- game input works, but still no 3D scene rendered.
2020-08-30 13:04:07 +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
0c455acaa2
- more work to switch over to the new loop.
...
Mainly separation of ticker and render calls
2020-08-30 10:42:44 +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
1e0b8038e5
- removed I_ResetTime entirely and refactored SW's use of it.
2020-08-30 08:13: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
34510ae9b3
- added ticker stub to the game interface.
2020-08-30 08:03:03 +02:00
Christoph Oelckers
cc04d41903
- Duke: moved the clock reset to a separate function and deleted the unused lockclock variable.
2020-08-30 07:53:20 +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
c0ebe3e08b
- hooked up ZDoom's d_net.cpp file.
...
Still not active but this contains some code needed to do a proper main loop that can work with the networker.
2020-08-29 23:24:18 +02:00
Christoph Oelckers
15adf1f6e5
- hooked up ZDoom's i_net.cpp to compile within the project.
...
Note about the license: This file was available from GZDoom 2.4.x under the Doom source license which is compatible with Build.
This isn't used yet.
2020-08-29 22:07:47 +02:00
Christoph Oelckers
fab561d757
- cleaned up Duke's main GameTicker function.
...
* moved the part that alters the input before queuing it to GetInput
* moved moveloop into the main function
* reshuffled a few things for better grouping by task.
2020-08-29 21:20:10 +02:00
Christoph Oelckers
20426a5a4f
Revert "- pass loc as a parameter to Duke's GetInput function to uncouple it from the global variable."
...
This reverts commit a03b6cf57c
.
Turns out this wasn't really useful.
2020-08-29 21:09:04 +02:00
Christoph Oelckers
e3839b01bc
- removed in_mousesmoothing.
...
This not only was redundant with m_filter, even worse, it was in the wrong place.
Control_GetInput is used to read the current input state from the backend and can get called at uneven intervals, or even multiple times during the same frame, so smoothing the movement here can lead to erratic behavior.
With this change CONTROL_GetInput will return the same data unless it gets updated between calls.
2020-08-29 18:37:22 +02:00
Christoph Oelckers
a03b6cf57c
- pass loc as a parameter to Duke's GetInput function to uncouple it from the global variable.
2020-08-29 18:07: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
eb34b41716
- fixed keyboard look in Blood.
2020-08-29 17:07:25 +02:00
Mitchell Richters
be33872b42
- Blood: Implement WeaponSel_Alt
for game.
2020-08-29 22:51:20 +10:00
Mitchell Richters
7ff73ae2f1
- Duke: Add missing World Tour flamethrower from alt weapon mode implementation completed in 51a08fbaf3
.
2020-08-29 22:30:45 +10: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
Mitchell Richters
51a08fbaf3
- Duke: Implement WeaponSel_Alt
for Duke and RR.
2020-08-29 21:27:58 +10:00
Christoph Oelckers
7659107b75
- removed SW's SK_AUTO_AIM for good.
...
When networking becomes a thing again this can be done as a server CVAR without such a messy approach.
2020-08-29 02:19:41 +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
Mitchell Richters
c47b60e193
- Fix compile regression from 847fa48724
.
...
Fixes #283 .
2020-08-29 08:16:05 +10: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
d73bf62465
Revert "- Set frame-time as close to the buffer swap as possible, and calculate smoothratio for Duke/SW as late as possible."
...
This reverts commit 97feb483ab
.
2020-08-28 08:25:51 +02:00
Mitchell Richters
ea2790ce08
- Duke: Switch game tic back to a while loop. I didn't mean to commit it this way in ab06235971
.
...
* I doubt anyone will be running this on a system where computing a tic might take longer than a tic, but it's more consistent with the other games and is what it was.
2020-08-28 15:29:41 +10:00
Mitchell Richters
97feb483ab
- Set frame-time as close to the buffer swap as possible, and calculate smoothratio for Duke/SW as late as possible.
...
* Micro-optimisation, but was getting a very occasional jitter in Duke 3D that seems to have gone with this.
2020-08-28 15:27:16 +10: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
e0ca98602d
- made Blood's inventory cycle-able.
...
IMO it's a totally annoying limitations to block wraparound of the cursor.
2020-08-27 22:29:45 +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
Mitchell Richters
0c55c3983c
- Duke: Fix potential interpolation issues for RR's shotgun observed while working on something else.
2020-08-27 22:47:18 +10:00
Mitchell Richters
8bb13bc4c2
- InputState: Exclude volume keys from setting AnyKeyStatus
to true.
2020-08-27 13:05:05 +02:00
Mitchell Richters
a2b51edcdb
- Duke: Delete enum created in 3e79e7b63f
and move CRACK_TIME
to miscConstants
.
...
* Didn't have a very good look, apparently...
2020-08-27 16:09:18 +10:00
Mitchell Richters
65a54361b4
- Duke: Apply same fix in 3e79e7b63f
for RR, accidentally missed.
2020-08-27 15:55:32 +10:00
Mitchell Richters
3e79e7b63f
- Duke: Fix bug where player wasn't cracking knuckles after 777 idle tics while cl_syncinput
was 1.
...
* Use opportunity to replace the literal constant of `777` with an enum.
2020-08-27 15:54:49 +10: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
89f5b26988
- fixed badly placed include.
2020-08-27 00:27:10 +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
99486cba7e
- gave Blood the same treatment.
2020-08-27 00:21:11 +02:00
Christoph Oelckers
c7e667a17a
- transition weapon selection in SW.
...
Thanks to the macro insanity for trivial operations in this code base this turned out to be a lot more troublesome than Duke...
2020-08-27 00:06:59 +02:00
Mitchell Richters
55f688b13f
- SW: Rename q16horz
to q16horiz
and q16aimvel
to q16horz
for consistency and to avoid confusion down the track.
2020-08-27 08:00:50 +10:00
Christoph Oelckers
e768a2bf24
- use new bitmask for weapon selection in Duke.
2020-08-26 23:02:55 +02:00
Christoph Oelckers
36d676ca20
- renamed ESyncBits so that the replacement can take that name later.
2020-08-26 22:39:15 +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
f90d953ab5
default cl_smoothsway to false.
2020-08-26 17:23:08 +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
c7f5f05e14
- cleaned up gamecvars.cpp and deleted a large amount of unused ones.
2020-08-26 17:05:17 +02:00
Mitchell Richters
4fcec5f6d3
- SW: Alt implementation for preparing a nuke.
...
* Given the original code in `pNukeAction()` (poorly named), the intent appeared to be that the weapon should go off-screen for preparation, returning once weapon initialised.
* Commit restores that behaviour behind a CVAR.
# Conflicts:
# source/core/gamecvars.cpp
# source/core/gamecvars.h
2020-08-26 17:00:19 +02:00