[Scummvm-cvs-logs] SF.net SVN: scummvm:[38973] scummvm/trunk/engines/sci/gfx/resource/ sci_pic_0.cpp
wjpalenstijn at users.sourceforge.net
wjpalenstijn at users.sourceforge.net
Sat Feb 28 17:11:02 CET 2009
Revision: 38973
http://scummvm.svn.sourceforge.net/scummvm/?rev=38973&view=rev
Author: wjpalenstijn
Date: 2009-02-28 16:11:02 +0000 (Sat, 28 Feb 2009)
Log Message:
-----------
Disable xfact/yfact scaling in embedded views.
This inadvertently broke colours in KQ5 as a side effect.
Modified Paths:
--------------
scummvm/trunk/engines/sci/gfx/resource/sci_pic_0.cpp
Modified: scummvm/trunk/engines/sci/gfx/resource/sci_pic_0.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_pic_0.cpp 2009-02-28 16:06:32 UTC (rev 38972)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_pic_0.cpp 2009-02-28 16:11:02 UTC (rev 38973)
@@ -1644,10 +1644,12 @@
p0printf("Embedded view @%d\n", pos);
+#if 0
// Set up mode structure for resizing the view
Graphics::PixelFormat format = { 1, 0, 0, 0, 0, 0, 0, 0, 0 }; // 1bpp, which handles masks and the rest for us
mode = gfx_new_mode(pic->visual_map->index_xl / 320,
pic->visual_map->index_yl / 200, format, 16, 0);
+#endif
GET_ABS_COORDS(posx, posy);
bytesize = (*(resource + pos)) + (*(resource + pos + 1) << 8);
@@ -1689,7 +1691,12 @@
if (view->index_yl + sci_titlebar_size > 200)
sci_titlebar_size = 0;
+#if 0
+ // FIXME: This doesn't just scale the image, but also
+ // tries to fit the colours into the palette in 'mode',
+ // breaking colours in e.g., KQ5 floppy.
gfx_xlate_pixmap(view, mode, GFX_XLATE_FILTER_NONE);
+#endif
if (flags & DRAWPIC01_FLAG_OVERLAID_PIC)
view_transparentize(view, pic->visual_map->index_data, posx, sci_titlebar_size + posy,
@@ -1699,7 +1706,9 @@
view->index_data, pic->visual_map->index_xl, view->index_xl,
view->index_xl, view->index_yl, 1);
+#if 0
gfx_free_mode(mode);
+#endif
gfx_free_pixmap(NULL, view);
}
goto end_op_loop;
@@ -1776,10 +1785,12 @@
int sci_titlebar_size = style->pic_port_bounds.y;
gfx_mode_t *mode;
gfx_pixmap_t *view = NULL;
+#if 0
// Set up mode structure for resizing the view
Graphics::PixelFormat format = { 1, 0, 0, 0, 0, 0, 0, 0, 0 }; // 1bpp, which handles masks and the rest for us
mode = gfx_new_mode(pic->visual_map->index_xl / 320, pic->visual_map->index_yl / 200,
format, 16, 0);
+#endif
pic->visual_map->colors = gfxr_read_pal11(-1, &(pic->visual_map->colors_nr), resource + palette_data_ptr, 1284);
@@ -1790,7 +1801,9 @@
view->colors = pic->visual_map->colors;
view->colors_nr = pic->visual_map->colors_nr;
+#if 0
gfx_xlate_pixmap(view, mode, GFX_XLATE_FILTER_NONE);
+#endif
if (flags & DRAWPIC01_FLAG_OVERLAID_PIC)
view_transparentize(view, pic->visual_map->index_data, 0, 0, view->index_xl, view->index_yl);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list