BS1/BS2: Video simplification/rewrite & MPEG2 removal
|Reported by:||bluegr||Owned by:||bluegr|
|Game:||Broken Sword 1|
I'm attaching 2 patches, one by me, and one by eriktorbjorn. These overlap each other somewhat, so I've included them both.
eriktorbjorn's patch removes support for MPEG2 movies
The removal of MPEG2 support simplifies the overall code a LOT, and it means that libmpeg2 is no longer necessary.
My patch removes MPEG2 support like what eriktorbjorn's patch does, with some extras. In particular, it removes support for version 1 cutscenes of BS1. From what I understood, the original plan was to have 1 language add-on instead of a separate addon for each language. This is accomplished by having OGG files with multiple substreams, which can be read by the SplittedAudioStream class. Since we don't have such a pack in our downloads page for BS1, I removed support for version 1 cutscenes, which simplifies code a lot as well, together with the whole SplittedAudioStream class and the inbuilt credits player. From what I understood, the plan was to remove the credits video file altogether and replace it with a text file, which would be read by the credits player class. Also, the credits in the original MPEG2 cutscenes were too hard to read because of the MPEG artifacts.
Moreover, I've removed the unneeded implementation of setPalette, since both the DXA and the SMK players have a default implementation for that. Also, I've rewritten the BS1 video player to use the new VideoPlayer() class. This further simplifies the code a lot.
Finally, I've added support for the original Smacker movies of both games as well. This is currently disabled, and can be enabled by defining USE_SWORD_SMACKS in the sword1 and sword2 engines. I've set BS1 to use the high-resolution Smacker movies (in the SMACKSHI folder)
The only thing I don't really like is the inclusion of readSoundHeader() in video_player.h, which is not really pretty
Ticket imported from: #2524272. Ticket imported from: patches/1053.