From fb14fea01419f43ac56c11d443f98216fc3bd2ae Mon Sep 17 00:00:00 2001 From: Bendegúz Nagy Date: Thu, 18 Aug 2016 19:18:14 +0200 Subject: DM: Make thumbnail capture the dungeon --- engines/dm/inventory.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'engines/dm/inventory.cpp') diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp index 638fba2bf0..d19f47c7b4 100644 --- a/engines/dm/inventory.cpp +++ b/engines/dm/inventory.cpp @@ -25,6 +25,9 @@ * maintainer of the Dungeon Master Encyclopaedia (http://dmweb.free.fr/) */ +#include +#include "graphics/thumbnail.h" + #include "inventory.h" #include "dungeonman.h" #include "eventman.h" @@ -53,7 +56,7 @@ void InventoryMan::initConstants() { "ARTISAN", "ADEPT", "EXPERT", "` MASTER", "a MASTER","b MASTER", "c MASTER", "d MASTER", "e MASTER", "ARCHMASTER"}; static const char* G0428_apc_SkillLevelNames_DE_DEU[15] = {"ANFAENGER", "NEULING", "LEHRLING", "ARBEITER", "GESELLE", "HANDWERKR", "FACHMANN", "EXPERTE", "` MEISTER", "a MEISTER", "b MEISTER", "c MEISTER", "d MEISTER", "e MEISTER", "ERZMEISTR"}; - static const char* G0428_apc_SkillLevelNames_FR_FRA[15] = { "NEOPHYTE", "NOVICE", "APPRENTI", "COMPAGNON", "ARTISAN", "PATRON", + static const char* G0428_apc_SkillLevelNames_FR_FRA[15] = {"NEOPHYTE", "NOVICE", "APPRENTI", "COMPAGNON", "ARTISAN", "PATRON", "ADEPTE", "EXPERT", "MAITRE '", "MAITRE a", "MAITRE b", "MAITRE c", "MAITRE d", "MAITRE e", "SUR-MAITRE"}; const char **g428_byLanguage; switch (_vm->getGameLanguage()) { // localized @@ -80,6 +83,14 @@ InventoryMan::InventoryMan(DMEngine *vm) : _vm(vm) { } void InventoryMan::f355_toggleInventory(ChampionIndex championIndex) { + if (championIndex == kM1_ChampionNone) { + delete _vm->_saveThumbnail; + _vm->_saveThumbnail = nullptr; + } else if (!_vm->_saveThumbnail) { + _vm->_saveThumbnail = new Common::MemoryWriteStreamDynamic(); + Graphics::saveThumbnail(*_vm->_saveThumbnail); + } + uint16 L1102_ui_Multiple; #define AL1102_ui_InventoryChampionOrdinal L1102_ui_Multiple #define AL1102_ui_SlotIndex L1102_ui_Multiple -- cgit v1.2.3