diff options
author | Bendegúz Nagy | 2016-08-18 19:18:14 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | fb14fea01419f43ac56c11d443f98216fc3bd2ae (patch) | |
tree | 9cb1848b45262affe1ab1c5aa854311c70b198f5 /engines/dm/inventory.cpp | |
parent | bcb067698efe6e18be02a23eb48499ed8e0e714f (diff) | |
download | scummvm-rg350-fb14fea01419f43ac56c11d443f98216fc3bd2ae.tar.gz scummvm-rg350-fb14fea01419f43ac56c11d443f98216fc3bd2ae.tar.bz2 scummvm-rg350-fb14fea01419f43ac56c11d443f98216fc3bd2ae.zip |
DM: Make thumbnail capture the dungeon
Diffstat (limited to 'engines/dm/inventory.cpp')
-rw-r--r-- | engines/dm/inventory.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
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 <graphics/surface.h> +#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 |