Commit graph

5582 commits

Author SHA1 Message Date
Christoph Oelckers
71c3441b1e - transitioned cloudclock.
This timer runs at 60 Hz in the render code, so it needs to take smoothratio into account.
2020-08-31 19:22:21 +02:00
Christoph Oelckers
9a208185d6 - levelclock increment after tick.
This ensures that the first tick always gets a value of 0.
2020-08-31 19:21:02 +02:00
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