diff options
author | Eugene Sandulenko | 2015-12-24 00:07:22 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2015-12-24 00:07:22 +0100 |
commit | 1ed0a645795a40b437848674f58aa4a5c2630754 (patch) | |
tree | adf668034f1e88ccc1ed6471505b404d6d7e6632 | |
parent | 9c50ffda33d7abf88f9a7e2dc78c549755d0c4f7 (diff) | |
download | scummvm-rg350-1ed0a645795a40b437848674f58aa4a5c2630754.tar.gz scummvm-rg350-1ed0a645795a40b437848674f58aa4a5c2630754.tar.bz2 scummvm-rg350-1ed0a645795a40b437848674f58aa4a5c2630754.zip |
ENGINES: Print version information
-rw-r--r-- | engines/engine.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/engines/engine.cpp b/engines/engine.cpp index 5bf1416e5a..1a143e17b4 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -49,6 +49,7 @@ #include "common/singleton.h" #include "backends/keymapper/keymapper.h" +#include "base/version.h" #include "gui/gui-manager.h" #include "gui/debugger.h" @@ -58,6 +59,7 @@ #include "audio/mixer.h" #include "graphics/cursorman.h" +#include "graphics/fontman.h" #include "graphics/pixelformat.h" #include "image/bmp.h" @@ -265,13 +267,23 @@ void splashScreen() { Graphics::Surface screen; screen.create(g_system->getOverlayWidth(), g_system->getOverlayHeight(), g_system->getOverlayFormat()); screen.fillRect(Common::Rect(screen.w, screen.h), screen.format.ARGBToColor(0xff, 0xd4, 0x75, 0x0b)); + + // Load logo + Graphics::Surface *logo = bitmap.getSurface()->convertTo(g_system->getOverlayFormat(), bitmap.getPalette()); + int lx = (g_system->getOverlayWidth() - logo->w) / 2; + int ly = (g_system->getOverlayHeight() - logo->h) / 2; + + // Print version information + const Graphics::Font *font = FontMan.getFontByUsage(Graphics::FontManager::kConsoleFont); + int w = font->getStringWidth(gScummVMVersionDate); + int x = g_system->getOverlayWidth() - w - 5; // lx + logo->w - w + 5; + int y = g_system->getOverlayHeight() - font->getFontHeight() - 5; //ly + logo->h + 5; + font->drawString(&screen, gScummVMVersionDate, x, y, w, screen.format.ARGBToColor(0xff, 0, 0, 0)); + g_system->copyRectToOverlay(screen.getPixels(), screen.pitch, 0, 0, screen.w, screen.h); // Draw logo - Graphics::Surface *logo = bitmap.getSurface()->convertTo(g_system->getOverlayFormat(), bitmap.getPalette()); - int x = (g_system->getOverlayWidth() - logo->w) / 2; - int y = (g_system->getOverlayHeight() - logo->h) / 2; - g_system->copyRectToOverlay(logo->getPixels(), logo->pitch, x, y, logo->w, logo->h); + g_system->copyRectToOverlay(logo->getPixels(), logo->pitch, lx, ly, logo->w, logo->h); // Delay 0.6 secs uint time0 = g_system->getMillis(); |