aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorathrxx2018-10-29 22:54:23 +0100
committerathrxx2018-11-14 17:22:21 +0100
commit61bd730bcf4ee311e79ab2fc49e3eca21018cdfe (patch)
treefb9b6da4ba8eca7a8313635fa1d163253fa93067
parent16ead6f58a041adaa7fedb9f08d8435fff24f3ae (diff)
downloadscummvm-rg350-61bd730bcf4ee311e79ab2fc49e3eca21018cdfe.tar.gz
scummvm-rg350-61bd730bcf4ee311e79ab2fc49e3eca21018cdfe.tar.bz2
scummvm-rg350-61bd730bcf4ee311e79ab2fc49e3eca21018cdfe.zip
KYRA: (EOB) - fix thumbnails for special cases
(EGA dithering, 16bit mode, Japanese font rendering)
-rw-r--r--engines/kyra/eobcommon.h2
-rw-r--r--engines/kyra/gui_eob.cpp20
2 files changed, 11 insertions, 11 deletions
diff --git a/engines/kyra/eobcommon.h b/engines/kyra/eobcommon.h
index 810b792eb2..8d740f1f4d 100644
--- a/engines/kyra/eobcommon.h
+++ b/engines/kyra/eobcommon.h
@@ -765,6 +765,8 @@ protected:
uint8 _charExchangeSwap;
bool _configHpBarGraphs;
+ Graphics::Surface _thumbNail;
+
// text
void setupDialogueButtons(int presetfirst, int numStr, va_list &args);
void initDialogueSequence();
diff --git a/engines/kyra/gui_eob.cpp b/engines/kyra/gui_eob.cpp
index cdc5fba5c1..eaefa50c1e 100644
--- a/engines/kyra/gui_eob.cpp
+++ b/engines/kyra/gui_eob.cpp
@@ -777,12 +777,20 @@ int EoBCoreEngine::clickedCamp(Button *button) {
}
_screen->copyPage(0, 7);
+
+ // Create a thumbnail from the screen for a possible savegame.
+ // This ensures that all special rendering (EGA dithering, 16bit rendering, Japanese font rendering) will be visible on the thumbnail.
+ ::createThumbnailFromScreen(&_thumbNail);
+
_screen->copyRegion(0, 120, 0, 0, 176, 24, 0, 12, Screen::CR_NO_P_CHECK);
_gui->runCampMenu();
_screen->copyRegion(0, 0, 0, 120, 176, 24, 12, 2, Screen::CR_NO_P_CHECK);
_screen->setScreenDim(cd);
+
+ _thumbNail.free();
+
drawScene(0);
for (int i = 0; i < 6; i++)
@@ -2645,17 +2653,7 @@ bool GUI_EoB::transferFileMenu(Common::String &targetName, Common::String &selec
}
void GUI_EoB::createScreenThumbnail(Graphics::Surface &dst) {
- uint8 *screenPal = new uint8[768];
- _screen->getRealPalette(0, screenPal);
- uint16 width = Screen::SCREEN_W;
- uint16 height = Screen::SCREEN_H;
- if (_vm->gameFlags().useHiRes) {
- width <<= 1;
- height <<= 1;
- }
-
- ::createThumbnail(&dst, _screen->getCPagePtr(7), width, height, screenPal);
- delete[] screenPal;
+ dst.copyFrom(_vm->_thumbNail);
}
void GUI_EoB::simpleMenu_initMenuItemsMask(int menuId, int maxItem, int32 menuItemsMask, int itemOffset) {