DM: Fix incorrect thumbnails
This commit is contained in:
parent
22a79ac965
commit
2199f879bd
3 changed files with 9 additions and 8 deletions
|
@ -16,6 +16,5 @@ Todo:
|
||||||
Code stuff todo:
|
Code stuff todo:
|
||||||
Complete stub methods(blitShrink, blitmask, scroller)
|
Complete stub methods(blitShrink, blitmask, scroller)
|
||||||
Add proper save header, add error handling to it
|
Add proper save header, add error handling to it
|
||||||
Fix incorrect thumbnail
|
|
||||||
Add translations to f433_processCommand140_saveGame 'LOAD'
|
Add translations to f433_processCommand140_saveGame 'LOAD'
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include "group.h"
|
#include "group.h"
|
||||||
#include "dialog.h"
|
#include "dialog.h"
|
||||||
#include "sounds.h"
|
#include "sounds.h"
|
||||||
|
#include <mortevielle/saveload.h>
|
||||||
|
|
||||||
|
|
||||||
namespace DM {
|
namespace DM {
|
||||||
|
@ -769,6 +770,14 @@ void EventManager::f380_processCommandQueue() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((cmdType >= k7_CommandToggleInventoryChampion_0) && (cmdType <= k11_CommandCloseInventory)) {
|
if ((cmdType >= k7_CommandToggleInventoryChampion_0) && (cmdType <= k11_CommandCloseInventory)) {
|
||||||
|
if (cmdType == k11_CommandCloseInventory) {
|
||||||
|
delete _vm->_saveThumbnail;
|
||||||
|
_vm->_saveThumbnail = nullptr;
|
||||||
|
} else if (!_vm->_saveThumbnail) {
|
||||||
|
_vm->_saveThumbnail = new Common::MemoryWriteStreamDynamic();
|
||||||
|
Graphics::saveThumbnail(*_vm->_saveThumbnail);
|
||||||
|
}
|
||||||
|
|
||||||
int16 championIndex = cmdType - k7_CommandToggleInventoryChampion_0;
|
int16 championIndex = cmdType - k7_CommandToggleInventoryChampion_0;
|
||||||
if (((championIndex == k4_ChampionCloseInventory) || (championIndex < _vm->_championMan->_g305_partyChampionCount)) && !_vm->_championMan->_g299_candidateChampionOrdinal)
|
if (((championIndex == k4_ChampionCloseInventory) || (championIndex < _vm->_championMan->_g305_partyChampionCount)) && !_vm->_championMan->_g299_candidateChampionOrdinal)
|
||||||
_vm->_inventoryMan->f355_toggleInventory((ChampionIndex)championIndex);
|
_vm->_inventoryMan->f355_toggleInventory((ChampionIndex)championIndex);
|
||||||
|
|
|
@ -86,13 +86,6 @@ InventoryMan::InventoryMan(DMEngine *vm) : _vm(vm) {
|
||||||
void InventoryMan::f355_toggleInventory(ChampionIndex championIndex) {
|
void InventoryMan::f355_toggleInventory(ChampionIndex championIndex) {
|
||||||
static Box g41_BoxFloppyZzzCross(174, 218, 2, 12); // @ G0041_s_Graphic562_Box_ViewportFloppyZzzCross
|
static Box g41_BoxFloppyZzzCross(174, 218, 2, 12); // @ G0041_s_Graphic562_Box_ViewportFloppyZzzCross
|
||||||
|
|
||||||
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;
|
uint16 L1102_ui_Multiple;
|
||||||
#define AL1102_ui_InventoryChampionOrdinal L1102_ui_Multiple
|
#define AL1102_ui_InventoryChampionOrdinal L1102_ui_Multiple
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue