From e5a3f5b7e16ca63b3d8d3ea6a5d00b8476eed4e6 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 23 Feb 2018 20:19:09 -0500 Subject: [PATCH] XEEN: Add custom minimap logo for Swords of Xeen --- engines/xeen/dialogs_party.cpp | 3 +++ engines/xeen/interface.cpp | 7 +++++-- engines/xeen/interface_minimap.cpp | 5 ++++- engines/xeen/resources.cpp | 2 ++ engines/xeen/resources.h | 1 + 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/engines/xeen/dialogs_party.cpp b/engines/xeen/dialogs_party.cpp index c0c58ccd1ebc..b0c638243d62 100644 --- a/engines/xeen/dialogs_party.cpp +++ b/engines/xeen/dialogs_party.cpp @@ -83,6 +83,9 @@ void PartyDialog::execute() { _uiSprites.draw(w, 6, Common::Point(122, 100)); _uiSprites.draw(w, 8, Common::Point(157, 100)); _uiSprites.draw(w, 10, Common::Point(192, 100)); + if (g_vm->getGameID() == GType_Swords) + Res._logoSprites.draw(1, 0, Common::Point(232, 9)); + screen.loadPalette("mm4.pal"); if (modeFlag) { diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp index 9ce25531e37a..3e1dd67e78cb 100644 --- a/engines/xeen/interface.cpp +++ b/engines/xeen/interface.cpp @@ -175,7 +175,6 @@ void Interface::setup() { void Interface::startup() { Resources &res = *_vm->_resources; - Windows &windows = *_vm->_windows; animate3d(); if (_vm->_map->_isOutdoors) { @@ -187,7 +186,11 @@ void Interface::startup() { } draw3d(false); - res._globalSprites.draw(windows[1], 5, Common::Point(232, 9)); + if (g_vm->getGameID() == GType_Swords) + res._logoSprites.draw(1, 0, Common::Point(232, 9)); + else + res._globalSprites.draw(1, 5, Common::Point(232, 9)); + drawParty(false); setMainButtons(); diff --git a/engines/xeen/interface_minimap.cpp b/engines/xeen/interface_minimap.cpp index 4eb02fb29832..5ab10696bc1a 100644 --- a/engines/xeen/interface_minimap.cpp +++ b/engines/xeen/interface_minimap.cpp @@ -42,7 +42,10 @@ void InterfaceMinimap::drawMinimap() { return; if (!party._automapOn && !party._wizardEyeActive) { // Draw the Might & Magic logo - res._globalSprites.draw(1, 5, Common::Point(MINIMAP_XSTART - (TILE_WIDTH / 2), 9)); + if (g_vm->getGameID() == GType_Swords) + res._logoSprites.draw(1, 0, Common::Point(MINIMAP_XSTART - (TILE_WIDTH / 2), 9)); + else + res._globalSprites.draw(1, 5, Common::Point(MINIMAP_XSTART - (TILE_WIDTH / 2), 9)); return; } diff --git a/engines/xeen/resources.cpp b/engines/xeen/resources.cpp index bed8a1a9b7f9..7f9e1df13449 100644 --- a/engines/xeen/resources.cpp +++ b/engines/xeen/resources.cpp @@ -35,6 +35,8 @@ Resources::Resources() { g_vm->_files->setGameCc(1); _globalSprites.load("global.icn"); + if (g_vm->getGameID() == GType_Swords) + _logoSprites.load("logo.int"); File f((g_vm->getGameID() == GType_Clouds) ? "mae.cld" : "mae.xen"); while (f.pos() < f.size()) diff --git a/engines/xeen/resources.h b/engines/xeen/resources.h index 2761f401fc9e..09f720280138 100644 --- a/engines/xeen/resources.h +++ b/engines/xeen/resources.h @@ -110,6 +110,7 @@ class Resources { void loadData(); public: SpriteResource _globalSprites; + SpriteResource _logoSprites; Common::StringArray _maeNames; // Magic and equipment names Common::StringArray _cloudsMapNames; // Clouds of Xeen map names const char **ITEM_NAMES[4];