[Scummvm-cvs-logs] SF.net SVN: scummvm:[40057] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Tue Apr 21 21:57:11 CEST 2009


Revision: 40057
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40057&view=rev
Author:   thebluegr
Date:     2009-04-21 19:57:11 +0000 (Tue, 21 Apr 2009)

Log Message:
-----------
Restored the ability to change the active port bound, by moving it inside gfx_state_t (it makes much more sense for it to be there, instead of inside user-defined settings). Placed notes inside gfxr_draw_pic01() and gfxr_draw_pic11() for the usage of the current titlebar size in there

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/game.cpp
    scummvm/trunk/engines/sci/engine/kgraphics.cpp
    scummvm/trunk/engines/sci/gfx/gfx_options.h
    scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp
    scummvm/trunk/engines/sci/gfx/gfx_resource.h
    scummvm/trunk/engines/sci/gfx/operations.cpp
    scummvm/trunk/engines/sci/gfx/operations.h
    scummvm/trunk/engines/sci/gfx/res_pic.cpp
    scummvm/trunk/engines/sci/sci.cpp

Modified: scummvm/trunk/engines/sci/engine/game.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/game.cpp	2009-04-21 19:49:47 UTC (rev 40056)
+++ scummvm/trunk/engines/sci/engine/game.cpp	2009-04-21 19:57:11 UTC (rev 40057)
@@ -163,11 +163,8 @@
 
 	s->visual = gfxw_new_visual(s->gfx_state, font_nr);
 
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-	s->wm_port = gfxw_new_port(s->visual, NULL, s->gfx_state->options->pic_port_bounds, s->ega_colors[0], transparent);	
-#else
-	s->wm_port = gfxw_new_port(s->visual, NULL, gfx_rect(0, 10, 320, 190), s->ega_colors[0], transparent);
-#endif
+	s->wm_port = gfxw_new_port(s->visual, NULL, s->gfx_state->pic_port_bounds, s->ega_colors[0], transparent);	
+
 	s->iconbar_port = gfxw_new_port(s->visual, NULL, gfx_rect(0, 0, 320, 200), s->ega_colors[0], transparent);
 	s->iconbar_port->flags |= GFXW_FLAG_NO_IMPLICIT_SWITCH;
 
@@ -195,11 +192,7 @@
 	s->titlebar_port->flags |= GFXW_FLAG_NO_IMPLICIT_SWITCH;
 
 	// but this is correct
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-	s->picture_port = gfxw_new_port(s->visual, NULL, s->gfx_state->options->pic_port_bounds, s->ega_colors[0], transparent);
-#else
-	s->picture_port = gfxw_new_port(s->visual, NULL, gfx_rect(0, 10, 320, 190), s->ega_colors[0], transparent);
-#endif
+	s->picture_port = gfxw_new_port(s->visual, NULL, s->gfx_state->pic_port_bounds, s->ega_colors[0], transparent);
 
 	s->pics_drawn_nr = 0;
 

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-04-21 19:49:47 UTC (rev 40056)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-04-21 19:57:11 UTC (rev 40057)
@@ -1030,13 +1030,8 @@
 	s->picture_port->widfree(GFXW(s->picture_port));
 	s->iconbar_port->widfree(GFXW(s->iconbar_port));
 
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-	s->wm_port = gfxw_new_port(s->visual, NULL, s->gfx_state->options->pic_port_bounds, s->ega_colors[0], transparent);
-	s->picture_port = gfxw_new_port(s->visual, NULL, s->gfx_state->options->pic_port_bounds, s->ega_colors[0], transparent);
-#else
-	s->wm_port = gfxw_new_port(s->visual, NULL, gfx_rect(0, 10, 320, 190), s->ega_colors[0], transparent);
-	s->picture_port = gfxw_new_port(s->visual, NULL, gfx_rect(0, 10, 320, 190), s->ega_colors[0], transparent);
-#endif
+	s->wm_port = gfxw_new_port(s->visual, NULL, s->gfx_state->pic_port_bounds, s->ega_colors[0], transparent);
+	s->picture_port = gfxw_new_port(s->visual, NULL, s->gfx_state->pic_port_bounds, s->ega_colors[0], transparent);
 
 	s->iconbar_port = gfxw_new_port(s->visual, NULL, gfx_rect(0, 0, 320, 200), s->ega_colors[0], transparent);
 	s->iconbar_port->flags |= GFXW_FLAG_NO_IMPLICIT_SWITCH;
@@ -2386,13 +2381,8 @@
 			return s->r_acc;
 		}
 
-		// This should never occur. This case happens when the port is supplied via command line parameters
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-		s->gfx_state->options->pic_port_bounds = gfx_rect(UKPV(5), UKPV(4),
+		s->gfx_state->pic_port_bounds = gfx_rect(UKPV(5), UKPV(4),
 		        UKPV(3), UKPV(2));
-#else
-		warning("kSetPort() was called to change the picture port bounds, but custom graphics options are not enabled, so it has been ignored");
-#endif
 
 		// FIXME: Should really only invalidate all loaded pic resources here;
 		// this is overkill

Modified: scummvm/trunk/engines/sci/gfx/gfx_options.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_options.h	2009-04-21 19:49:47 UTC (rev 40056)
+++ scummvm/trunk/engines/sci/gfx/gfx_options.h	2009-04-21 19:57:11 UTC (rev 40057)
@@ -76,7 +76,6 @@
 	int dirty_frames;
 
 	int workarounds;	// Workaround flags - see below
-	rect_t pic_port_bounds;
 #endif
 };
 

Modified: scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp	2009-04-21 19:49:47 UTC (rev 40056)
+++ scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp	2009-04-21 19:57:11 UTC (rev 40057)
@@ -148,7 +148,9 @@
 	case GFX_RESOURCE_TYPE_PIC:
 #ifdef CUSTOM_GRAPHICS_OPTIONS
 		if (_version >= SCI_VERSION_01_VGA)
-			return _options->pic_port_bounds.y;
+			// NOTE: here, it is assumed that the upper port bound is always 10, but this doesn't seem to matter for the
+			// generated options hash anyway
+			return 10;
 		else
 			return (_options->pic0_unscaled) ? 0x10000 : (_options->pic0_dither_mode << 12)
 			       | (_options->pic0_dither_pattern << 8) | (_options->pic0_brush_mode << 4) 

Modified: scummvm/trunk/engines/sci/gfx/gfx_resource.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_resource.h	2009-04-21 19:49:47 UTC (rev 40056)
+++ scummvm/trunk/engines/sci/gfx/gfx_resource.h	2009-04-21 19:57:11 UTC (rev 40057)
@@ -159,10 +159,10 @@
 /*********************/
 
 
-void gfxr_clear_pic0(gfxr_pic_t *pic, int sci_titlebar_size);
+void gfxr_clear_pic0(gfxr_pic_t *pic, int titlebar_size);
 /* Clears all pic buffers of one pic
 ** Parameters: (gfxr_pic_t) pic: The picture to clear
-**             (int) sci_titlebar_size: How much space to reserve for the title bar
+**             (int) titlebar_size: How much space to reserve for the title bar
 ** Returns   : (void)
 ** This function should be called before gfxr_draw_pic0, unless cumulative
 ** drawing is intended

Modified: scummvm/trunk/engines/sci/gfx/operations.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/operations.cpp	2009-04-21 19:49:47 UTC (rev 40056)
+++ scummvm/trunk/engines/sci/gfx/operations.cpp	2009-04-21 19:57:11 UTC (rev 40057)
@@ -434,6 +434,7 @@
 	state->pic = state->pic_unscaled = NULL;
 	state->pic_nr = -1; // Set background pic number to an invalid value
 	state->tag_mode = 0;
+	state->pic_port_bounds = gfx_rect(0, 10, 320, 190);
 	state->dirty_rects = NULL;
 
 	do {

Modified: scummvm/trunk/engines/sci/gfx/operations.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/operations.h	2009-04-21 19:49:47 UTC (rev 40056)
+++ scummvm/trunk/engines/sci/gfx/operations.h	2009-04-21 19:57:11 UTC (rev 40057)
@@ -127,6 +127,7 @@
 					   ** which is generally slow */
 
 	gfxr_pic_t *pic, *pic_unscaled; /* The background picture and its unscaled equivalent */
+	rect_t pic_port_bounds;  /* Picture port bounds */
 
 	gfx_dirty_rect_t *dirty_rects; /* Dirty rectangles */
 };

Modified: scummvm/trunk/engines/sci/gfx/res_pic.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/res_pic.cpp	2009-04-21 19:49:47 UTC (rev 40056)
+++ scummvm/trunk/engines/sci/gfx/res_pic.cpp	2009-04-21 19:57:11 UTC (rev 40057)
@@ -190,13 +190,13 @@
 
 // Pic rendering operations
 
-void gfxr_clear_pic0(gfxr_pic_t *pic, int sci_titlebar_size) {
-	memset(pic->visual_map->index_data, 0x00, (320 * pic->mode->xfact * sci_titlebar_size * pic->mode->yfact));
-	memset(pic->visual_map->index_data + (320 * pic->mode->xfact * sci_titlebar_size * pic->mode->yfact),
-	       0xff, pic->mode->xfact * 320 * pic->mode->yfact * (200 - sci_titlebar_size)); // white
-	memset(pic->priority_map->index_data + (320 * pic->mode->xfact * sci_titlebar_size * pic->mode->yfact),
-	       0x0, pic->mode->xfact * 320 * pic->mode->yfact * (200 - sci_titlebar_size));
-	memset(pic->priority_map->index_data, 0x0a, sci_titlebar_size * (pic->mode->yfact * 320 * pic->mode->xfact));
+void gfxr_clear_pic0(gfxr_pic_t *pic, int titlebar_size) {
+	memset(pic->visual_map->index_data, 0x00, (320 * pic->mode->xfact * titlebar_size * pic->mode->yfact));
+	memset(pic->visual_map->index_data + (320 * pic->mode->xfact * titlebar_size * pic->mode->yfact),
+	       0xff, pic->mode->xfact * 320 * pic->mode->yfact * (200 - titlebar_size)); // white
+	memset(pic->priority_map->index_data + (320 * pic->mode->xfact * titlebar_size * pic->mode->yfact),
+	       0x0, pic->mode->xfact * 320 * pic->mode->yfact * (200 - titlebar_size));
+	memset(pic->priority_map->index_data, 0x0a, titlebar_size * (pic->mode->yfact * 320 * pic->mode->xfact));
 	memset(pic->control_map->index_data, 0, GFXR_AUX_MAP_SIZE);
 	memset(pic->aux_map, 0, GFXR_AUX_MAP_SIZE);
 }
@@ -226,10 +226,10 @@
 	}; \
 	buffer[linewidth * y + x] operation color;
 
-static void _gfxr_auxbuf_line_draw(gfxr_pic_t *pic, rect_t line, int color, int color2, int sci_titlebar_size) {
+static void _gfxr_auxbuf_line_draw(gfxr_pic_t *pic, rect_t line, int color, int color2, int titlebar_size) {
 	int dx, dy, incrE, incrNE, d, finalx, finaly;
 	int x = line.x;
-	int y = line.y + sci_titlebar_size;
+	int y = line.y + titlebar_size;
 	unsigned char *buffer = pic->aux_map;
 	int linewidth = 320;
 
@@ -272,10 +272,10 @@
 	}
 }
 
-static void _gfxr_auxbuf_line_clear(gfxr_pic_t *pic, rect_t line, int color, int sci_titlebar_size) {
+static void _gfxr_auxbuf_line_clear(gfxr_pic_t *pic, rect_t line, int color, int titlebar_size) {
 	int dx, dy, incrE, incrNE, d, finalx, finaly;
 	int x = line.x;
-	int y = line.y + sci_titlebar_size;
+	int y = line.y + titlebar_size;
 	unsigned char *buffer = pic->aux_map;
 	int linewidth = 320;
 
@@ -819,7 +819,7 @@
 }
 
 static void _gfxr_draw_pattern(gfxr_pic_t *pic, int x, int y, int color, int priority, int control, int drawenable,
-	int pattern_code, int pattern_size, int pattern_nr, gfx_brush_mode_t brush_mode, int sci_titlebar_size) {
+	int pattern_code, int pattern_size, int pattern_nr, gfx_brush_mode_t brush_mode, int titlebar_size) {
 	int xsize = (pattern_size + 1) * pic->mode->xfact - 1;
 	int ysize = (pattern_size + 1) * pic->mode->yfact - 1;
 	int scaled_x, scaled_y;
@@ -828,13 +828,13 @@
 
 	p0printf(stderr, "Pattern at (%d,%d) size %d, rand=%d, code=%02x\n", x, y, pattern_size, pattern_nr, pattern_code);
 
-	y += sci_titlebar_size;
+	y += titlebar_size;
 
 	if (x - pattern_size < 0)
 		x = pattern_size;
 
-	if (y - pattern_size < sci_titlebar_size)
-		y = sci_titlebar_size + pattern_size;
+	if (y - pattern_size < titlebar_size)
+		y = titlebar_size + pattern_size;
 
 	if (x + pattern_size > max_x)
 		x = max_x - pattern_size;
@@ -848,8 +848,8 @@
 	if (scaled_x < xsize)
 		scaled_x = xsize;
 
-	if (scaled_y < ysize + sci_titlebar_size * pic->mode->yfact)
-		scaled_y = ysize + sci_titlebar_size * pic->mode->yfact;
+	if (scaled_y < ysize + titlebar_size * pic->mode->yfact)
+		scaled_y = ysize + titlebar_size * pic->mode->yfact;
 
 	if (scaled_x > (320 * pic->mode->xfact) - 1 - xsize)
 		scaled_x = (320 * pic->mode->xfact) - 1 - xsize;
@@ -934,7 +934,7 @@
 }
 
 static void _gfxr_draw_line(gfxr_pic_t *pic, int x, int y, int ex, int ey, int color,
-	int priority, int control, int drawenable, int line_mode, int cmd, int sci_titlebar_size) {
+	int priority, int control, int drawenable, int line_mode, int cmd, int titlebar_size) {
 	int scale_x = pic->mode->xfact;
 	int scale_y = pic->mode->yfact;
 	int xc, yc;
@@ -952,8 +952,8 @@
 		return;
 	}
 
-	y += sci_titlebar_size;
-	ey += sci_titlebar_size;
+	y += titlebar_size;
+	ey += titlebar_size;
 
 	if (drawenable & GFX_MASK_CONTROL) {
 		p0printf(" ctl:%x", control);
@@ -967,14 +967,14 @@
 		int mask2 = mask;
 		if (partially_white)
 			mask2 = mask &= ~GFX_MASK_VISUAL;
-		_gfxr_auxbuf_line_draw(pic, line, mask, mask2, sci_titlebar_size);
+		_gfxr_auxbuf_line_draw(pic, line, mask, mask2, titlebar_size);
 	}
 
 	// Calculate everything that is changed to TRANSPARENT
 	mask = drawenable & (((color == 0xff) ? 1 : 0) | ((!priority) ? 2 : 0) | ((!control) ? 4 : 0));
 
 	if (mask)
-		_gfxr_auxbuf_line_clear(pic, line, ~mask, sci_titlebar_size);
+		_gfxr_auxbuf_line_clear(pic, line, ~mask, titlebar_size);
 
 	x *= scale_x;
 	y *= scale_y;
@@ -1314,12 +1314,10 @@
 	int pal, index;
 	int temp;
 	int line_mode = style->line_mode;
-	int sci_titlebar_size;
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-	sci_titlebar_size = _options->pic_port_bounds.y;	
-#else
-	sci_titlebar_size = 10;
-#endif
+	// NOTE: here, it is assumed that the titlebar size is always 10. This may differ depending on
+	// the port bounds y starting point, but we haven't come across a case where this actually occurs.
+	// Also, there is a check further down which sets the titlebar size to 0 if the picture port goes off screen.
+	int titlebar_size = 10;
 	byte op, opx;
 
 #ifdef FILL_RECURSIVE_DEBUG
@@ -1396,7 +1394,7 @@
 			GET_ABS_COORDS(x, y);
 
 			_gfxr_draw_pattern(pic, x, y, color, priority, control, drawenable, pattern_code,
-			                   pattern_size, pattern_nr, style->brush_mode, sci_titlebar_size);
+			                   pattern_size, pattern_nr, style->brush_mode, titlebar_size);
 
 			while (*(resource + pos) < PIC_OP_FIRST) {
 				if (pattern_code & PATTERN_FLAG_USE_PATTERN) {
@@ -1407,7 +1405,7 @@
 				GET_REL_COORDS(x, y);
 
 				_gfxr_draw_pattern(pic, x, y, color, priority, control, drawenable, pattern_code,
-				                   pattern_size, pattern_nr, style->brush_mode, sci_titlebar_size);
+				                   pattern_size, pattern_nr, style->brush_mode, titlebar_size);
 			}
 			goto end_op_loop;
 
@@ -1424,7 +1422,7 @@
 				fprintf(stderr, " to %d,%d\n", x, y);
 #endif
 				_gfxr_draw_line(pic, oldx, oldy, x, y, color, priority, control, drawenable, line_mode,
-				                PIC_OP_MEDIUM_LINES, sci_titlebar_size);
+				                PIC_OP_MEDIUM_LINES, titlebar_size);
 				oldx = x;
 				oldy = y;
 			}
@@ -1436,7 +1434,7 @@
 			while (*(resource + pos) < PIC_OP_FIRST) {
 				GET_ABS_COORDS(x, y);
 				_gfxr_draw_line(pic, oldx, oldy, x, y, color, priority, control, drawenable, line_mode,
-				                PIC_OP_LONG_LINES, sci_titlebar_size);
+				                PIC_OP_LONG_LINES, titlebar_size);
 				oldx = x;
 				oldy = y;
 			}
@@ -1450,7 +1448,7 @@
 			while (*(resource + pos) < PIC_OP_FIRST) {
 				GET_REL_COORDS(x, y);
 				_gfxr_draw_line(pic, oldx, oldy, x, y, color, priority, control, drawenable, line_mode,
-				                PIC_OP_SHORT_LINES, sci_titlebar_size);
+				                PIC_OP_SHORT_LINES, titlebar_size);
 				oldx = x;
 				oldy = y;
 			}
@@ -1462,16 +1460,16 @@
 				//fprintf(stderr,"####################\n");
 				GET_ABS_COORDS(x, y);
 				p0printf("Abs coords %d,%d\n", x, y);
-				//fprintf(stderr,"C=(%d,%d)\n", x, y + sci_titlebar_size);
+				//fprintf(stderr,"C=(%d,%d)\n", x, y + titlebar_size);
 #ifdef WITH_PIC_SCALING
 				if (pic->mode->xfact > 1 || pic->mode->yfact > 1)
-					_gfxr_fill_any(pic, x, y + sci_titlebar_size, (flags & DRAWPIC01_FLAG_FILL_NORMALLY) ?
-					               color : 0, priority, control, drawenable, sci_titlebar_size);
+					_gfxr_fill_any(pic, x, y + titlebar_size, (flags & DRAWPIC01_FLAG_FILL_NORMALLY) ?
+					               color : 0, priority, control, drawenable, titlebar_size);
 
 				else
 #endif
-					_gfxr_fill_1(pic, x, y + sci_titlebar_size, (flags & DRAWPIC01_FLAG_FILL_NORMALLY) ?
-					             color : 0, priority, control, drawenable, sci_titlebar_size);
+					_gfxr_fill_1(pic, x, y + titlebar_size, (flags & DRAWPIC01_FLAG_FILL_NORMALLY) ?
+					             color : 0, priority, control, drawenable, titlebar_size);
 
 #ifdef FILL_RECURSIVE_DEBUG
 				if (!fillmagc) {
@@ -1530,7 +1528,7 @@
 				GET_ABS_COORDS(x, y);
 
 				_gfxr_draw_pattern(pic, x, y, color, priority, control, drawenable, pattern_code,
-				                   pattern_size, pattern_nr, style->brush_mode, sci_titlebar_size);
+				                   pattern_size, pattern_nr, style->brush_mode, titlebar_size);
 			}
 			goto end_op_loop;
 
@@ -1557,7 +1555,7 @@
 			GET_ABS_COORDS(oldx, oldy);
 
 			_gfxr_draw_pattern(pic, oldx, oldy, color, priority, control, drawenable, pattern_code,
-			                   pattern_size, pattern_nr, style->brush_mode, sci_titlebar_size);
+			                   pattern_size, pattern_nr, style->brush_mode, titlebar_size);
 
 			x = oldx;
 			y = oldy;
@@ -1570,7 +1568,7 @@
 				GET_MEDREL_COORDS(x, y);
 
 				_gfxr_draw_pattern(pic, x, y, color, priority, control, drawenable, pattern_code,
-				                   pattern_size, pattern_nr, style->brush_mode, sci_titlebar_size);
+				                   pattern_size, pattern_nr, style->brush_mode, titlebar_size);
 			}
 			goto end_op_loop;
 
@@ -1693,8 +1691,8 @@
 
 				// Hack to prevent overflowing the visual map buffer.
 				// Yes, this does happen otherwise.
-				if (view->index_height + sci_titlebar_size > 200)
-					sci_titlebar_size = 0;
+				if (view->index_height + titlebar_size > 200)
+					titlebar_size = 0;
 
 				// Set up mode structure for resizing the view
 				Graphics::PixelFormat format = { 1, 0, 0, 0, 0, 0, 0, 0, 0 }; // 1byte/p, which handles masks and the rest for us
@@ -1708,10 +1706,10 @@
 				view->palette = NULL;
 
 				if (flags & DRAWPIC01_FLAG_OVERLAID_PIC)
-					view_transparentize(view, pic->visual_map, posx, sci_titlebar_size + posy,
+					view_transparentize(view, pic->visual_map, posx, titlebar_size + posy,
 					                    view->index_width, view->index_height);
 
-				_gfx_crossblit_simple(pic->visual_map->index_data + (sci_titlebar_size * 320) + posy * 320 + posx,
+				_gfx_crossblit_simple(pic->visual_map->index_data + (titlebar_size * 320) + posy * 320 + posx,
 				                      view->index_data, pic->visual_map->index_width, view->index_width,
 				                      view->index_width, view->index_height, 1);
 
@@ -1789,13 +1787,11 @@
 	int vector_data_ptr = READ_LE_UINT16(resource + 16);
 	int palette_data_ptr = READ_LE_UINT16(resource + 28);
 	int bitmap_data_ptr = READ_LE_UINT16(resource + 32);
-	int sci_titlebar_size;
-#ifdef CUSTOM_GRAPHICS_OPTIONS
-	sci_titlebar_size = _options->pic_port_bounds.y;	
-#else
-	sci_titlebar_size = 10;
-#endif
 	gfx_pixmap_t *view = NULL;
+	// NOTE: here, it is assumed that the titlebar size is always 10. This may differ depending on
+	// the port bounds y starting point, but we haven't come across a case where this actually occurs.
+	// Also, there is a check further down which sets the titlebar size to 0 if the picture port goes off screen.
+	int titlebar_size = 10;
 
 	if (pic->visual_map->palette) pic->visual_map->palette->free();
 	pic->visual_map->palette = gfxr_read_pal11(-1, resource + palette_data_ptr, 1284);
@@ -1818,10 +1814,10 @@
 
 		// Hack to prevent overflowing the visual map buffer.
 		// Yes, this does happen otherwise.
-		if (view->index_height + sci_titlebar_size > 200)
-			sci_titlebar_size = 0;
+		if (view->index_height + titlebar_size > 200)
+			titlebar_size = 0;
 
-		_gfx_crossblit_simple(pic->visual_map->index_data + sci_titlebar_size*view->index_width,
+		_gfx_crossblit_simple(pic->visual_map->index_data + titlebar_size*view->index_width,
 		                      view->index_data,
 		                      pic->visual_map->index_width, view->index_width,
 		                      view->index_width,

Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp	2009-04-21 19:49:47 UTC (rev 40056)
+++ scummvm/trunk/engines/sci/sci.cpp	2009-04-21 19:57:11 UTC (rev 40057)
@@ -266,8 +266,6 @@
 		gfx_options.res_conf.mod[i] = NULL;
 	}
 	gfx_options.workarounds = 0;
-	gfx_options.pic_port_bounds = gfx_rect(0, 10, 320, 190);
-
 	// Default config ends
 #endif
 


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