[Scummvm-git-logs] scummvm master -> ffa4c7040074ef36d51da0499b62812ea70982d8
dreammaster
noreply at scummvm.org
Thu Feb 22 03:52:49 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ffa4c70400 VOYEUR: Add Interplay logo animation sequence (logo8.exe)
Commit: ffa4c7040074ef36d51da0499b62812ea70982d8
https://github.com/scummvm/scummvm/commit/ffa4c7040074ef36d51da0499b62812ea70982d8
Author: Eric Fry (yuv422 at reversedgames.com)
Date: 2024-02-21T17:52:46-10:00
Commit Message:
VOYEUR: Add Interplay logo animation sequence (logo8.exe)
Changed paths:
engines/voyeur/voyeur.cpp
engines/voyeur/voyeur.h
video/mve_decoder.h
diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index e0fc1872a7a..a4efc381f26 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -26,9 +26,11 @@
#include "common/scummsys.h"
#include "common/config-manager.h"
#include "common/debug-channels.h"
+#include "common/events.h"
#include "graphics/palette.h"
#include "graphics/scaler.h"
#include "graphics/thumbnail.h"
+#include "video/mve_decoder.h"
namespace Voyeur {
@@ -158,6 +160,9 @@ bool VoyeurEngine::doHeadTitle() {
_eventsManager->startMainClockInt();
if (_loadGameSlot == -1) {
+ // show interplay logo animation
+ showLogo8Intro();
+
// Show starting screen
if (!getIsDemo() && _bVoy->getBoltGroup(0x500)) {
showConversionScreen();
@@ -854,6 +859,68 @@ void VoyeurEngine::synchronize(Common::Serializer &s) {
_controlPtr->_state->synchronize(s);
}
+void VoyeurEngine::showLogo8Intro() {
+ Common::File file;
+ if(!file.open("logo8.exe")) {
+ return;
+ }
+ file.seek(2);
+ int lastPageLength = file.readUint16LE();
+ int numPages = file.readUint16LE();
+ int exeLength = (numPages - 1) * 512 + lastPageLength;
+
+ // The MVE movie data is appended to the end of the EXE
+ file.seek(exeLength, SEEK_SET);
+
+ Video::MveDecoder *decoder = new Video::MveDecoder();
+ if (decoder->loadStream(&file)) {
+ decoder->setAudioTrack(0);
+ decoder->start();
+
+ bool skipMovie = false;
+ while (!decoder->endOfVideo() && !skipMovie && !shouldQuit()) {
+ unsigned int delay = MIN<uint32>(decoder->getTimeToNextFrame(), 10u);
+ g_system->delayMillis(delay);
+
+ const Graphics::Surface *frame = nullptr;
+
+ if (decoder->needsUpdate()) {
+ frame = decoder->decodeNextFrame();
+ }
+
+ if (frame) {
+ g_system->copyRectToScreen(frame->getPixels(), frame->pitch, 0, 0, frame->w, frame->h);
+
+ if (decoder->hasDirtyPalette()) {
+ PaletteManager *paletteManager = g_system->getPaletteManager();
+ decoder->applyPalette(paletteManager);
+ }
+
+ g_system->updateScreen();
+ }
+
+ Common::Event event;
+ while (g_system->getEventManager()->pollEvent(event)) {
+ switch (event.type) {
+ case Common::EVENT_KEYDOWN:
+ if (event.kbd.keycode == Common::KEYCODE_ESCAPE || event.kbd.keycode == Common::KEYCODE_SPACE) {
+ skipMovie = true;
+ }
+ break;
+ case Common::EVENT_LBUTTONDOWN:
+ skipMovie = true;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+
+ file.close();
+ delete decoder;
+}
+
/*------------------------------------------------------------------------*/
bool VoyeurSavegameHeader::read(Common::InSaveFile *f, bool skipThumbnail) {
diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h
index 86d5630a614..67db70e50d4 100644
--- a/engines/voyeur/voyeur.h
+++ b/engines/voyeur/voyeur.h
@@ -94,6 +94,8 @@ private:
void initStamp();
void closeStamp();
+ void showLogo8Intro();
+
/**
* Shows the game ending title animation
*/
diff --git a/video/mve_decoder.h b/video/mve_decoder.h
index 979df08a7f6..eccdff18857 100644
--- a/video/mve_decoder.h
+++ b/video/mve_decoder.h
@@ -46,6 +46,7 @@ namespace Video {
*
* Video decoder used in engines:
* - kingdom
+ * - voyeur
*/
class MveDecoder : public VideoDecoder {
bool _done;
More information about the Scummvm-git-logs
mailing list