Commit Graph

274 Commits

Author SHA1 Message Date
Christoph Oelckers b1c8046470 - fixed dimming checks for menu.
Now with proper game state management this can be done better.
2020-08-10 20:43:51 +02:00
Mitchell Richters 4c74c172e3 - fix screenjob.cpp `PlayVideo()` returning after stripping drive letter without checking whether it was able to re-open the file thereafter successfully.
Fixes #128.
2020-08-10 21:15:17 +10:00
Christoph Oelckers d3df4e580c - do not restart one-page image scrollers with Enter
Instead go back one menu level.

Fixed #129
2020-08-10 01:12:53 +02:00
Christoph Oelckers 0492c5f4d3 - optimized reverb settings.
Fixes #124
2020-08-09 13:26:48 +02:00
Christoph Oelckers 596367f10f - Screenblend fixes. 2020-08-07 22:00:43 +02:00
Christoph Oelckers 3e8ff96e6b - added workaround for DukeDC's ending cutscene which was abusing undefined behavior in the original code. 2020-08-05 22:57:45 +02:00
Christoph Oelckers 454e0e36c9 - added a sound for advancing multi-screen menus.
Fixes #100.
2020-08-05 00:32:29 +02:00
Christoph Oelckers d526c6401f - use the generic cheat system for Blood. 2020-08-03 20:51:31 +02:00
Christoph Oelckers 724c811de3 - Moved message storage to the map records. 2020-08-03 20:16:32 +02:00
Christoph Oelckers 35a5c4e23c - undid hardcoded coupling of Mapinfo slots with episode/level pairs in Blood.
This both lifts the imposed limit of 16 levels and will allow dynamic management of global mapinfo data.
2020-08-03 20:11:30 +02:00
Christoph Oelckers 0036402be8 - removed most of the network code in Blood.
Mainly to expose the parts that still get used in single player because there's some problems here that need addressing.
ENet is also gone now.
2020-08-03 20:06:27 +02:00
Christoph Oelckers dea0804f9a - how could this compile? 2020-08-03 19:14:33 +02:00
Mitchell Richters 348acf95e0 - change division of delta between currentTime and lastTime from 8 to 72 to ensure smoothratio doesn't clip at 65536.
* Divisor of delta is there so smoothratio always starts off with some kind of value. After 10 minutes at 1100 fps, closest final result to 65536 was:

ototalclk: 4573
totalclk: 4576
gametics: 33.333 ms
elapsedTime: 33.331 ms
ratio: 0.999938
result: 65531.941356
2020-08-03 10:00:06 +10:00
Christoph Oelckers e434df5328 - always play menu sounds by calling M_MenuSound to check the menu_sounds CVAR. 2020-08-02 22:16:26 +02:00
Christoph Oelckers 6a305748ff - removed some C cruft from compat.h. 2020-08-02 21:25:03 +02:00
Mitchell Richters 0c12436092 - change returned value for `CalcSmoothRatio()` from int to double and pass through to `displayrest()` for future use with `displayweapon()`.
* `displayrooms()` ultimately should be adjusted as well. For now, just relying on integer truncation as this is just a proof of concept.

# Conflicts:
#	source/core/gamecontrol.cpp
#	source/core/gamecontrol.h
2020-08-02 21:20:52 +02:00
Christoph Oelckers 18c3d9b240 - get the frame time right at the start of the frame, not when performing interpolations.
This is to factor think time out of the time span between frames and to avoid changes if the smoothratio gets calculated multiple times.
2020-08-02 21:16:01 +02:00
Mitchell Richters 3861064f62 - use 1/8 of delta time as initial elapsed time when calculating smoothratio on a new ototalclk.
* Pushes final result closer to 65536 and always ensures smoothratio never starts at 0.
2020-08-02 20:57:09 +02:00
Mitchell Richters 5000fde281 - restore legacy interpolation path behind CVAR `cl_legacyintrpl`.
* Hoping the old path being available will allow the new code to be merged.
* Applied offset to sum of `(totalclk - ototalclk)` of 0.5 to ensure calculated smoothratio under legacy path always returns a value.
* For the above, consider Duke 3D with 4 game tics per ticrate, the returned values would be:
0
16384
32768
49152
* With offset of 0.5, the following values are returned depending on how far advanced `totalclk` is from `ototalclk`:
8192
24576
40960
57344
2020-08-02 20:57:08 +02:00
Mitchell Richters 52d9fd4cda - add `cl_debugintrpl` CVAR to print interpolation information to the console.
* Also revert back to use of `xs_CRoundToInt()` that was accidentally removed previously.
2020-08-02 20:57:08 +02:00
Mitchell Richters 1cf857e788 - create an enum for MaxSmoothRatio and replace multiple hard-coded uses of '65536' constant. 2020-08-02 20:57:08 +02:00
Mitchell Richters 733f3aa490 - increase granularity of `CalcSmoothRatio()`. 2020-08-02 20:57:07 +02:00
Christoph Oelckers 3a32e8840f - ported Blood's status bar to the Status bar class.
Now it allows downscaling just like Duke's.
2020-08-02 13:35:34 +02:00
Christoph Oelckers cc8798f6e2 - preparations for rendering Blood's status bar through the Statusbar class. 2020-08-02 08:39:51 +02:00
Christoph Oelckers 347ed51036 - refactored Blood's main loop.
* moved Smacker video playing code into the backend, so now all games can play all supported video formats
* logos and level intro/exit videos use ScreenJob
2020-07-29 23:18:08 +02:00
Christoph Oelckers b49d04fd6e - fixed: The video player did not check the sound CVARs.
Fixes #58
2020-07-28 21:05:14 +02:00
Mitchell Richters 158fd46581 - change Duke's `synchronized_input` to CVAR `cl_syncinput`. 2020-07-28 21:38:28 +10:00
Christoph Oelckers 371a808d9e - set MP taunt texts as CVAR defaults to ensure they won't get deleted by user actions. 2020-07-27 18:12:24 +02:00
Christoph Oelckers 4836744d26 - language update. 2020-07-26 23:27:39 +02:00
Christoph Oelckers c0d46f6a69 - implemented proper scaling for the status bar.
Addresses #2.
2020-07-26 23:06:27 +02:00
Christoph Oelckers 102f473821 - clear the input state before starting a cutscene to ensure that it won't get skipped by residual input data. 2020-07-26 19:55:06 +02:00
Christoph Oelckers c8cde7fb3b - stop sound in all paths of the ANM player.
Fixes #36.
2020-07-26 18:02:24 +02:00
Christoph Oelckers 775eabcd3d - fixed incorrect 'twodonly' flag set for the base palettes.
This let the palette creator skip all translations for the water and slime palette. Fixes #28.
2020-07-26 17:56:33 +02:00
Christoph Oelckers af970b091e - set proper game state after ending the level summary screen.
Fixes #20.
2020-07-26 12:43:32 +02:00
Christoph Oelckers 6e276545cd - fixed typo in savegame metadata reader and an issue with code execution order when exiting a level. 2020-07-26 12:15:24 +02:00
Christoph Oelckers 342b90c8f9 - fixed: With hud_messages == 1 no messages were printed. 2020-07-26 10:31:12 +02:00
Mitchell Richters f67a53a7c0 - fix sound and music pausing with tweaks to `updatePauseStatus()`. Also removed unneeded game-side function. Fixes #11. 2020-07-26 17:20:53 +10:00
Christoph Oelckers 8a5427abed - fixed the cheat handler. 2020-07-25 17:25:21 +02:00
Christoph Oelckers 6df64f4ee3 - fixed RR status bar layout. 2020-07-25 16:43:03 +02:00
Christoph Oelckers 654391a278 - fixed layout for classic Duke fullscreen HUD. 2020-07-25 15:41:11 +02:00
Christoph Oelckers f9d48e1f68 - removed all the intermediate variables for the status bar size.
hud_size now gets used directly by the status bar code.
2020-07-25 13:26:56 +02:00
Christoph Oelckers 9043123aab - set proper engine compatibility mode. 2020-07-25 10:03:13 +02:00
Christoph Oelckers 1e8b8443b0 - implemented 2D rotation and fixed offset calculation for drawing scaled sprites on the status bar. 2020-07-24 23:08:48 +02:00
Christoph Oelckers e2de6d9dc3 - changed status bar drawer to pass the texture offsets to the low level code instead of adding them itself.
This is needed for rotating around the pivot point, if the offset is applied here the low level code cannot do the rotation properly anymore.
2020-07-24 21:08:33 +02:00
Christoph Oelckers b56f74bf32 - actually call the postAction callback for the screen job.
Fixes missing title music.
2020-07-24 20:11:50 +02:00
Christoph Oelckers d10bf41b03 - removed some obsolete stuff. 2020-07-24 19:44:05 +02:00
Christoph Oelckers 25d383ac73 - re-enabled skipping of MVE movies which was disabled for easier debugging. 2020-07-24 19:05:34 +02:00
Christoph Oelckers 940413524b - tweaks to synchronize video and audio with MVE. 2020-07-24 00:01:50 +02:00
Christoph Oelckers 200db367ec - fixed MVE audio by simplifying the audio buffer to a simple ring buffer of sufficient size. 2020-07-23 23:48:26 +02:00
Christoph Oelckers 75e8a71905 - some progress with sound. Still glitchy. 2020-07-23 23:22:09 +02:00