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
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
Christoph Oelckers
c1b1182f90
- fix weapon selection in Exhumed.
...
Like Blood it looks like the request isn't processed immediately so it needs to stick around.
2020-08-26 16:59:42 +02:00
Christoph Oelckers
d0655a1068
- renamed the fields in Blood's packet structure to match Duke's.
2020-08-26 16:59:41 +02:00
Christoph Oelckers
3fc79940f2
- merged the bit fields in Blood's packet structure.
...
Whatever this was for it made that thing extremely unwieldy.
With these merged the resulting structure doesn't look much different from Duke's anymore.
2020-08-26 16:59:41 +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
a9f556c1bd
- SW: Restore random element to player's weapon left/right bobbing behind a CVAR.
...
# Conflicts:
# source/core/gamecvars.cpp
# source/core/gamecvars.h
2020-08-26 16:45:42 +02:00
Mitchell Richters
50793184ee
- SW: Remove random element from player's weapon left/right bobbing causing bob value to be between 24-48 and lock to 36.
2020-08-26 16:45:42 +02:00
Mitchell Richters
88a49b0d22
- Duke: Restore RPG harsh recoil behind a CVAR.
...
# Conflicts:
# source/core/gamecvars.cpp
# source/core/gamecvars.h
2020-08-26 16:45:41 +02:00
Mitchell Richters
839a7bcbe4
- subjective fix to Duke 3D's RPG harsh recoil.
2020-08-26 16:45:41 +02:00
Mitchell Richters
60f334f57c
- Exhumed: Partially restore sound issues following cc5e6d19c3
.
...
* Restored call of `UpdateSounds()` to `GameLoop()` and not `DrawView()` like previously.
Partially addresses #253 .
2020-08-26 23:22:44 +10:00
Mitchell Richters
62388e30be
- fix C_SetNotifyFontScale()
for RR.
...
Fixes #264 .
2020-08-26 22:33:19 +10:00
Mitchell Richters
5bfd4069ef
- Blood: Cleanup some timing variables following timing uplift.
...
* Remove cast of int on `gFrameClock` since gFrameClock is now just an int.
* Remove unused `gFrameTicks`.
* Remove unused `gFrameRate`.
* Rename `gFrame` to `gFrameCount` so it's easier to search and distinguish from `gFrameClock` without relying on regex.
2020-08-26 20:55:46 +10:00
Christoph Oelckers
ddd6a300ab
- added UpdateSounds calls to the blocking loops in Duke's and SW's StartGame functions.
2020-08-26 04:15:33 +02:00
Christoph Oelckers
cc5e6d19c3
- fixed sound updating by moving the engine's UpdateSound call into the main loop.
...
This needs to be called unconditionally for every frame being rendered, not all of the game modules did that.
Placing this call here ensures that it is independent of anything the games do.
2020-08-26 04:10:16 +02:00
Christoph Oelckers
de871c9ab9
- use the game timer, not the Build timer for the sound eviction delay.
...
This is supposed to wait for two game frames to be on the safe side.
2020-08-26 03:50:07 +02:00
Mitchell Richters
e1424d454f
- Duke: Clean out some left over stub code during initial testing.
2020-08-26 11:23:57 +10:00
Mitchell Richters
4eec9dca63
- Duke/SW: Use I_GetBuildTime()
instead of gameclock
in game-side sound code.
...
* Code is called where `gameclock` might not be set.
2020-08-26 10:09:02 +10: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
Mitchell Richters
1c8b0a20fb
- Build: Remove all timer code.
2020-08-26 09:49:40 +10:00
Mitchell Richters
2bf11ad378
- All Games: Remove use of timerGetTicks()
.
2020-08-26 09:49:38 +10:00
Mitchell Richters
aba5c4c134
- All Games: Remove use of timerGetHiTicks()
.
2020-08-26 09:49:36 +10:00
Mitchell Richters
b883204f6a
- All Games: Remove remaining use of totalclock
and associated timing code.
2020-08-26 09:49:34 +10:00
Mitchell Richters
c207437a57
- Duke: Rename cloudtotalclock
to cloudclock
.
...
* Mostly so it doesn't come up on searches for `totalclock`.
2020-08-26 09:49:32 +10:00
Mitchell Richters
d358c71f82
- Blood: Migrate to GZDoom time code like Duke, SW and Exhumed.
2020-08-26 09:49:23 +10:00
Mitchell Richters
39541408f2
- Exhumed: Fix what I believe is a typo.
2020-08-26 09:49:02 +10:00
Mitchell Richters
2748d6dc64
- Exhumed: Rename remaining use of totalclock
locally in screenjobs to currentclock
like Duke.
2020-08-26 09:48:59 +10:00
Mitchell Richters
a6cc3c4128
- Exhumed: Migrate to GZDoom time code like Duke and SW.
2020-08-26 09:48:57 +10:00
Mitchell Richters
76b05dbcd6
- Build (and games): Remove totalclocklock
.
2020-08-26 09:48:56 +10:00
Mitchell Richters
576b13248e
- Build: Use I_GetBuildTime()
in place of totalclocklock
in animateoffs()
. This makes the SW menu work pre-game.
2020-08-26 09:48:54 +10:00
Mitchell Richters
40739d9176
- SW: Add ogameclock
and use in places where ototalclock
was used.
...
* Duke used `ototalclock` only to keep track of when the game ticked. SW uses it in the rendering code for differentials between tics so we should preserve that to prevent issues down the track.
2020-08-26 09:48:51 +10:00
Christoph Oelckers
d38a3a1fb1
- added autoaim switch for Exhumed.
...
Pointers for the needed change taken from GDX.
This applies only to hitscan weapons the rest do not appear to autoaim.
Fixes #260
2020-08-26 00:22:11 +02:00
Christoph Oelckers
9440ddb68f
- thinned out Blood's network code.
2020-08-25 23:04:08 +02:00
Christoph Oelckers
84b6af24d3
- renamed the fields in SW's packet structure to match Duke's.
...
Preparation for moving the packet management into public code.
2020-08-25 22:06:01 +02:00
Christoph Oelckers
70cac1db54
- removed unused parts from timer.cpp.
2020-08-25 21:47:03 +02:00
Christoph Oelckers
5af71c0af2
- Exhumed: Implement "Quit to title".
...
Fixes #252
2020-08-25 21:34:12 +02:00
Christoph Oelckers
efc83e1a5f
- Exhumed: properly terminate the "Ramses" save block.
...
Fixes #258
2020-08-25 21:30:00 +02:00
Christoph Oelckers
6b0e1baf02
- added a timerUpdateClock call to the main loop so that Blood and Exhumed work again.
...
This may only be removed when nothing uses totalclock anymore. We're not there yet.
2020-08-25 21:24:45 +02:00
Christoph Oelckers
a323591d5a
- call C_RunDelayedCommands() from a centralized place.
2020-08-25 21:16:37 +02:00
Christoph Oelckers
fd12ad382f
- add shadows to the statistics display.
...
Fixes #256
2020-08-25 20:58:32 +02:00
Christoph Oelckers
5df0a7241f
- disabled a few menu options for unsupported features in Exhumed.
...
Fixes #255
2020-08-25 20:40:30 +02:00
Christoph Oelckers
e97fb2ab7f
- reduce message spam in the notification display.
2020-08-25 20:21:18 +02:00
Christoph Oelckers
8256b54005
- applied a few fixes:
...
* removed the timer callback stuff that came back through the backdoor.
* do not use gameclock in the UI code - use the underlying timer directly.
* UpdateSounds must still use totalclock, until this can be refactored in its entirety.
2020-08-25 20:20:35 +02:00
Mitchell Richters
c888bc802d
- SW: Make a bit more use of the calculated smooth ratio.
2020-08-25 19:51:32 +02:00
Mitchell Richters
386661f1ba
- SW: Migrate to GZDoom time code like Duke.
2020-08-25 19:51:32 +02:00
Mitchell Richters
d04aa603dd
Revert "Revert "- Duke: Remove left-over line." and re-do as a multiplier of TICSPERFRAME
for better clarity as to what's happening rather than a bit-shift."
...
This reverts commit 0cdd27b61534219a0d00b794a45a09f26a95afaa.
2020-08-25 19:51:12 +02:00
Mitchell Richters
d3b506eb2b
- Duke (and Engine): Eliminate use of totalclock for game.
...
* Breaks every other game except Duke unless/until they get migrated. Done for the purpose of demonstrating PR #244 .
# Conflicts:
# source/build/src/timer.cpp
# source/games/duke/src/game.cpp
2020-08-25 19:51:12 +02:00
Mitchell Richters
c5f523fb3c
- Duke: Make a bit more use of the calculated smooth ratio.
2020-08-25 19:48:52 +02:00
Mitchell Richters
e9c0831ccc
Revert "- Duke: Remove left-over line." and re-do as a multiplier of TICSPERFRAME
for better clarity as to what's happening rather than a bit-shift.
...
* It's also better that everything be based off the one tic clock and not call `I_GetBuildTime()` to set `gameclock`. This also ensures that `gameclock` always increases in intervals of 4.
This reverts commit 63eac13d6442357fdab57067ec913a2ce8ce72db.
2020-08-25 19:48:38 +02:00
Mitchell Richters
be5419e77c
- i_time: Add I_GetBuildTimeFrac()
.
...
* Currently not needed, but adding for feature parity.
2020-08-25 19:48:26 +02:00
Mitchell Richters
2231386830
- Duke: Create function to reset timer and apply in game where timer restarts are needed.
2020-08-25 19:48:15 +02:00
Mitchell Richters
7d1f021fcd
- Duke: Remove left-over line.
2020-08-25 19:47:45 +02:00
Mitchell Richters
afb09456e0
- Duke: Migrate away from using totalclock
and use new game-specific gameclock
with underlying timer code in common.
...
* Build timer still requires initialisation due to multiple `timerSetCallback()` that still need to work.
# Conflicts:
# source/core/menu/menu.cpp
# source/games/duke/src/game.cpp
2020-08-25 19:47:31 +02:00
Mitchell Richters
ab06235971
- Duke: Demonstration of a re-timed game and associated interpolation improvements that come from it.
...
# Conflicts:
# source/games/duke/src/game.cpp
2020-08-25 19:43:28 +02:00
Christoph Oelckers
435e13dfa4
cleanup of the timer interface.
...
* rewrote all uses of timerSetCallback. Most were unnecessary or long obsolete, the sound updates need to run per frame, not per tic and the UI tickers need to be handled in the main loop anyway.
* Use a more precise timer to animate the menu transition.
* uncouple other menu animations from the game timer.
2020-08-25 19:42:11 +02:00
Christoph Oelckers
a55da24277
- hooked up the chat display.
...
Currently not really useful, aside from being usable to enter cheats. For this the cheat must be prefixed with a '#' to be recognized.
2020-08-25 18:51:56 +02:00
Christoph Oelckers
cf36e7d770
- SW: stop cutscene sound before going to the summary screen.
2020-08-25 18:28:50 +02:00
Christoph Oelckers
7d30218d8e
- fixed: In SW the automap follow mode blocked all game input, even when the automap was off.
2020-08-25 18:09:57 +02:00
Christoph Oelckers
ce853c5376
- Blood does not restart the intro sequence.
...
Fixes #247
2020-08-25 18:06:16 +02:00
Christoph Oelckers
a0e4d6f62c
- implemented proper scaling support for the notify display - both the classic and advanced variant.
2020-08-25 18:03:15 +02:00
Christoph Oelckers
1a633ce6a6
- give Exhumed some automap labels as well.
...
This game didn't have them originally so here the 'native' mode does not exist.
2020-08-25 00:27:14 +02:00
Christoph Oelckers
7c1e64757a
- use generalized automap label code for Shadow Warrior, too.
2020-08-25 00:16:02 +02:00
Christoph Oelckers
faf23d8ff0
- proper defaults for Blood.
2020-08-25 00:01:33 +02:00
Christoph Oelckers
777bbd4bd8
- use the generalized code to display automap labels in Blood.
2020-08-24 23:59:09 +02:00
Christoph Oelckers
6672b8af99
- generalized the automap label code.
...
Using proper scaling and should be reusable from all games now.
2020-08-24 23:14:55 +02:00
Christoph Oelckers
25ade79b90
- stat display fine tuning.
2020-08-24 22:18:45 +02:00
Christoph Oelckers
fef7608705
- made a few fixes for the fullscreen HUD in Nam:
...
* the font was placed too low
* the Duke health icon is not a health icon in this game so it had to be exchanged for something proper.
2020-08-24 22:12:56 +02:00
Christoph Oelckers
88bcaf37ab
- changed the scale range of hud_statscale so that 1 is for fullscreen 320x200.
2020-08-24 22:02:49 +02:00
Christoph Oelckers
e7c58a5b29
- make hud_scale a floating point CVAR.
2020-08-24 21:48:47 +02:00
Christoph Oelckers
3a6ccac8ea
- fixed bad offset with vertically mirrored sprites.
...
Fixes #239
2020-08-24 21:15:22 +02:00
Christoph Oelckers
6d1e3e77fc
- fixed item percentage display on SW's status bar.
...
Fixes #242
2020-08-24 20:46:14 +02: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
b88a279a57
- removed the mouse wheel up event hackery
...
With the weapon cycling commands being done as CCMDs this is no longer needed.
2020-08-24 20:26:32 +02:00
Christoph Oelckers
c09a5150a9
- added some predefined fullscreen modes
...
This is to cut down on boilerplate code because these encode the virtual screen size in the mode parameter, making it unnecessary to specify a virtual size separately.
2020-08-24 20:25:53 +02:00
Christoph Oelckers
f1a988b221
- make use of map bindings
...
All automap controls have been moved there, and sizeup/sizedown have been made CCMDs, taking screen size management entirely out of the game modules
2020-08-24 20:20:15 +02:00
Christoph Oelckers
092fb55db3
- hooked up the automap bindings.
...
Now, with centralized state management these can finally work.
2020-08-24 19:55:21 +02:00
Christoph Oelckers
e158775e67
- … and for Exhumed
...
This game does not implement follow mode.
Note: Follow mode needs to be simplified across games!
2020-08-24 19:54:26 +02:00
Christoph Oelckers
0ee042fb60
- same procedure for Blood
2020-08-24 19:47:09 +02:00
Christoph Oelckers
debb4b17b6
- transitioned SW's automap to the global variables
...
Also copied the automap label output to the status bar for proper ordering.
2020-08-24 19:36:17 +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
Mitchell Richters
89a15335df
- Exhumed: Clear the screen in the 2D drawer prior to drawing in menu_DoPlasma()
.
...
Fixes #237 .
2020-08-24 17:44:39 +10:00
Mitchell Richters
e8057cd871
- Exhumed: Fix menu scaling upon opening following changes in 979cc63835
.
...
Fixes #238 .
2020-08-24 17:11:51 +10:00
Mitchell Richters
6cbd607f31
- Exhumed: Stop playing kSoundJonLaugh2
in DLobotomyScreen
screenjob if skiprequest
is true.
2020-08-24 16:51:38 +10:00
Mitchell Richters
b5823385e1
- Exhumed: Fix if statement in DrawWeapons()
following changes in e225e85ae1
.
2020-08-24 16:02:12 +10:00
Mitchell Richters
e225e85ae1
- Exhumed: Perform weapon bobbing with maximum precision and implement cl_weaponsway
.
2020-08-24 13:22:52 +10:00
Christoph Oelckers
fed70e6df7
- make Exhumed's intro block the UI.
...
Fixes #235 .
2020-08-24 00:36:47 +02:00
Christoph Oelckers
c60acd7af4
- fixed RR's HUD positioning when the weapon bar is active.
2020-08-24 00:35:04 +02:00
Christoph Oelckers
e25d1c4cda
- improvements for automap labels.
...
* use a CVAR to decide whether to show them at the top or bottom
* draw them on top of the screen border so that they don't get overdrawn on smaller windows.
2020-08-24 00:25:42 +02:00
Christoph Oelckers
e7c1595531
- allow using a better font for the map name on the automap.
...
- allow displaying the map label on the automap.
So far only for Duke and related games, the rest will follow.
2020-08-24 00:05:36 +02:00
Christoph Oelckers
f6417f5876
- fixed bad texture validation in Duke automap.
2020-08-23 23:02:15 +02:00
Christoph Oelckers
91b31cec39
- fixed: hud_messages completely blocked the messages, even from going to the console.
...
It should only block the on-screen notification display, which the backend already implements. The game code should not check this CVAR again.
2020-08-23 22:46:53 +02:00
Christoph Oelckers
41a1120033
- added a native style display mode to the notification message display.
...
Fixes #9
2020-08-23 22:39:53 +02:00