[Scummvm-cvs-logs] scummvm master -> bff515a2d936e5291c4bef3a7ee6ddfe605be3e6

bluegr bluegr at gmail.com
Thu Oct 22 10:09:34 CEST 2015


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
61b14539c4 CINE: Show splash screen in CD version of Future Wars
bff515a2d9 Merge pull request #616 from eriktorbjorn/fw-splash


Commit: 61b14539c4f5c2ff366c9f6d07893808959f31be
    https://github.com/scummvm/scummvm/commit/61b14539c4f5c2ff366c9f6d07893808959f31be
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2015-09-17T22:19:36+02:00

Commit Message:
CINE: Show splash screen in CD version of Future Wars

Changed paths:
    engines/cine/cine.cpp
    engines/cine/cine.h



diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp
index 5fed920..d2f088d 100644
--- a/engines/cine/cine.cpp
+++ b/engines/cine/cine.cpp
@@ -22,10 +22,14 @@
 
 #include "common/config-manager.h"
 #include "common/debug-channels.h"
+#include "common/events.h"
 
 #include "engines/util.h"
 
 #include "graphics/cursorman.h"
+#include "graphics/palette.h"
+
+#include "image/iff.h"
 
 #include "cine/cine.h"
 #include "cine/bg_list.h"
@@ -89,6 +93,10 @@ void CineEngine::syncSoundSettings() {
 }
 
 Common::Error CineEngine::run() {
+	if (g_cine->getGameType() == GType_FW && (g_cine->getFeatures() & GF_CD)) {
+		showSplashScreen();
+	}
+
 	// Initialize backend
 	initGraphics(320, 200, false);
 
@@ -239,4 +247,45 @@ void CineEngine::initialize() {
 	}
 }
 
+void CineEngine::showSplashScreen() {
+	Common::File file;
+	if (!file.open("sony.lbm"))
+		return;
+
+	Image::IFFDecoder decoder;
+	if (!decoder.loadStream(file))
+		return;
+
+	const Graphics::Surface *surface = decoder.getSurface();
+	if (surface->w == 640 && surface->h == 480) {
+		initGraphics(640, 480, true);
+
+		const byte *palette = decoder.getPalette();
+		int paletteColorCount = decoder.getPaletteColorCount();
+		g_system->getPaletteManager()->setPalette(palette, 0, paletteColorCount);
+
+		g_system->copyRectToScreen(surface->getPixels(), 640, 0, 0, 640, 480);
+		g_system->updateScreen();
+
+		Common::EventManager *eventMan = g_system->getEventManager();
+
+		bool done = false;
+		uint32 now = g_system->getMillis();
+
+		while (!done && g_system->getMillis() - now < 2000) {
+			Common::Event event;
+			while (eventMan->pollEvent(event)) {
+				if (event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) {
+					done = true;
+					break;
+				}
+				if (shouldQuit())
+					done = true;
+			}
+		}
+	}
+
+	decoder.destroy();
+}
+
 } // End of namespace Cine
diff --git a/engines/cine/cine.h b/engines/cine/cine.h
index e620d2f..71a0c24 100644
--- a/engines/cine/cine.h
+++ b/engines/cine/cine.h
@@ -145,6 +145,7 @@ public:
 
 private:
 	void initialize();
+	void showSplashScreen();
 	void resetEngine();
 	bool loadPlainSaveFW(Common::SeekableReadStream &in, CineSaveGameFormat saveGameFormat);
 	bool loadTempSaveOS(Common::SeekableReadStream &in);


Commit: bff515a2d936e5291c4bef3a7ee6ddfe605be3e6
    https://github.com/scummvm/scummvm/commit/bff515a2d936e5291c4bef3a7ee6ddfe605be3e6
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-10-22T11:03:35+03:00

Commit Message:
Merge pull request #616 from eriktorbjorn/fw-splash

CINE: Show splash screen in CD version of Future Wars

Changed paths:
    engines/cine/cine.cpp
    engines/cine/cine.h









More information about the Scummvm-git-logs mailing list