Commit graph

60 commits

Author SHA1 Message Date
Christoph Oelckers
51c4c47183 - block manual advancing of intermission screens when already fading out.
This seems to cause some serious stability issues with how they handle the 2D drawer.
2021-04-08 18:01:42 +02:00
Christoph Oelckers
58fb938aa7 - block opening of the menu in the fade out phase of a screenjob and in Exhumed's map/intermission screens.
At these places there's some inteference that can bring the engine into an unstable state.
This is not a real fix, just a quick workaround. The actual problem requires closer examination why these are the only places where this happens.
2021-04-07 19:39:48 +02:00
Mitchell Richters
b36bea7c69 - Replace scale() calls with Scale() from common. 2021-01-05 07:31:34 +11:00
Christoph Oelckers
570897005c - added sound playback to the Smacker video player.
Thanks to Blood's weird setup and the resulting lack of sound support in NBlood's player I never realized that this is a fully featured movie format that actually has sound support.
Now the soundtrack will play if present.
2020-10-25 00:46:39 +02:00
Christoph Oelckers
129aa864dd - do not accept any input in the first 0.1 seconds of running a screen job.
This is to avoid accidental skipping by pending game input.
2020-10-13 23:36:27 +02:00
Christoph Oelckers
df86a11d23 - fixed palette of Exhumed's game over screen. 2020-10-13 23:29:12 +02:00
Christoph Oelckers
82612a1330 - it compiles again (with lots of code commented out.) 2020-10-04 20:11:02 +02:00
Christoph Oelckers
49642c3b3c - removed the slowdown killswitch from the ANM player.
This did not play well with SW and is generally not needed.
2020-09-30 00:28:17 +02:00
Christoph Oelckers
005f8feceb - properly use the correct delay for an ANM's final frame. 2020-09-18 22:49:51 +02:00
Christoph Oelckers
b0090b07fc - do not fade screen jobs in when in the menu.
This doesn't work properly because the timer is stopped, leading to visual artifacts with the fading.
2020-09-16 19:13:21 +02:00
Christoph Oelckers
807dd17165 - forgotten debug output removed. 2020-09-11 21:20:44 +02:00
Christoph Oelckers
1646e302d2 - fixed screenjob fadeout. 2020-09-11 20:55:58 +02:00
Christoph Oelckers
41a2a63efd - moved the VP8 decoding loop into the movie player class and got rid of animvpx.
This allowed significant simplification of code data and many of the error checks could also be simplified because this player doesn't really need it all.
Also use nanoseconds to count frame delays, not milliseconds, as milliseconds can cause timing anomalies with common frame rates very easily.
2020-09-10 17:54:27 +02:00
Christoph Oelckers
8dfb7967e2 - use a more precise timer for Exhumed's text scroller. 2020-09-05 20:31:45 +02:00
Christoph Oelckers
443ddf670b - let the ANM player wait until the sound has finished if it has reached the last frame before the sound ends.
In Shadow Warrior there's a few where the sound plays a bit longer than the video.
Fixes #341
2020-09-05 18:14:50 +02:00
Christoph Oelckers
27acd430aa - reset the screen job clock when advancing.
Fixes #347
2020-09-05 17:37:37 +02:00
Christoph Oelckers
9af093b818 - fixed screen job timer when paused
Fixes #343
2020-09-05 16:21:53 +02:00
Christoph Oelckers
e0b4dde3cd - fixed: A screen job that fades out was not rendering its final (black) frame which could result in visual glitches.
Fixes #320
2020-09-05 15:59:32 +02:00
Christoph Oelckers
c1786001b2 - route all game state changes through game actions.
This is to avoid problems with the main loop not calling Ticker and Render in sync.
2020-09-05 15:43:34 +02:00
Christoph Oelckers
b23424485a - re-implemented VP8 support.
Since the decoder cannot handle sound, there's two options:

1: Use the same sounds as the video it replaces.
2: If an identifiable streamable sound with the same base name is found, it will be played along with the video.
Fixes #133
2020-09-05 11:58:19 +02:00
Christoph Oelckers
5bc80d2468 - macro cleanup 2020-09-04 21:17:24 +02:00
Christoph Oelckers
97f395bd72 - transitioned Blood to the new level change messaging system 2020-09-04 20:46:44 +02:00
Christoph Oelckers
77f96a1c75 - fixing some issues. Level transitions in Duke are working now. 2020-09-04 19:43:36 +02:00
Christoph Oelckers
ca943317e7 - ported Exhumed's map to the ScreenJob interface. 2020-08-21 22:30:51 +02:00
Christoph Oelckers
5cfd427e42 - renamed local totalclock variables to reduce noise for the forthcoming timer cleanup. 2020-08-19 17:23:18 +02:00
Christoph Oelckers
a535f62d4a - fixed: SW's intro cutscene must not terminate its sound.
Fixes #201.
2020-08-18 00:04:48 +02:00
Christoph Oelckers
7bb6b6a1ee - do not call handleEvents outside the main loop.
In other places I_GetEvent should be used to call the system's message pump and keep the app responsive, but all game side processing should be skipped.
2020-08-16 10:00:13 +02:00
Christoph Oelckers
8595b9fa47 -play SW's intro through the screen job framework. 2020-08-15 13:04:15 +02:00
Christoph Oelckers
2403e8cb2c - fixed RRRA summary screens. 2020-08-14 22:31:54 +02:00
Christoph Oelckers
66cb7f61a4 - fixed rendering on narrow screens with an aspect ratio less than 4:3 and removed some parts that are no longer needed. 2020-08-14 21:01:27 +02:00
Christoph Oelckers
2d545767ef - completely clear all texture data when setting a frame size.
SMK tries to draw a texture from it before the first frame has been rendered. This ensures that it gets a fully black frame.
Fixes #167.
2020-08-12 01:32:05 +02:00
Christoph Oelckers
85364c2bb6 - let all video players respect the SoundEnabled setting.
Fixes #164.
2020-08-11 19:52:54 +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
596367f10f - Screenblend fixes. 2020-08-07 22:00:43 +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
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
af970b091e - set proper game state after ending the level summary screen.
Fixes #20.
2020-07-26 12:43:32 +02:00
Christoph Oelckers
654391a278 - fixed layout for classic Duke fullscreen HUD. 2020-07-25 15:41:11 +02:00
Christoph Oelckers
9043123aab - set proper engine compatibility mode. 2020-07-25 10:03:13 +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
25d383ac73 - re-enabled skipping of MVE movies which was disabled for easier debugging. 2020-07-24 19:05:34 +02:00
Christoph Oelckers
75e8a71905 - some progress with sound. Still glitchy. 2020-07-23 23:22:09 +02:00
Christoph Oelckers
928a16983d - adapted the MVE player.
Video appears to work, but has quite severe artifacting  I cannot tell if it's the video or the decoder which causes it.
2020-07-23 22:26:07 +02:00
Christoph Oelckers
be9094cb97 Silenced lots of warnings pointed out by XCode. 2020-07-23 17:02:59 +02:00
Christoph Oelckers
368298d02d - enable the menu and console everywhere, except on the intro logos. 2020-07-22 00:42:50 +02:00
Christoph Oelckers
f9842fc4a8 - implemented running screen jobs from the main loop.
The entire game now has only one single place where videoNextPage gets called.
2020-07-20 18:43:48 +02:00
Christoph Oelckers
e2e9c8ad01 - fixed the timer. 2020-07-20 18:43:48 +02:00
Christoph Oelckers
31b9995406 - rewrote the ScreenJob player as a class that can be called by an asynchronous dispatcher.
Works, except for timing issues with ANMs.
2020-07-20 18:43:48 +02:00