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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sun Feb 15 22:12:21 CET 2009


Revision: 38303
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38303&view=rev
Author:   fingolfin
Date:     2009-02-15 21:12:21 +0000 (Sun, 15 Feb 2009)

Log Message:
-----------
SCI: Fixed more warnings

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/scriptdebug.cpp
    scummvm/trunk/engines/sci/gfx/sci_widgets.cpp

Modified: scummvm/trunk/engines/sci/engine/scriptdebug.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-02-15 21:11:25 UTC (rev 38302)
+++ scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-02-15 21:12:21 UTC (rev 38303)
@@ -819,10 +819,8 @@
 	return 0;
 }
 
-#ifdef __GNUC__
-#warning "Re-implement con:so"
-#endif
 #if 0
+// TODO Re-implement con:so
 int
 c_stepover(state_t *s)
 {
@@ -1545,7 +1543,6 @@
 			int stackframe = (scr[pos.offset + 2] >> 1)
 				+ (*p_restadjust);
 			int argc = ((*p_sp)[- stackframe - 1]).offset;
-			int i;
 
 			if (s->version >= SCI_VERSION_FTU_NEW_SCRIPT_HEADER)
 				argc += (*p_restadjust);
@@ -1554,9 +1551,9 @@
 
 			sciprintf(" Kernel params: (");
 
-			for (i = 0; i < argc; i++) {
-				sciprintf(PREG, PRINT_REG((*p_sp)[i - stackframe]));
-				if (i+1 < argc)
+			for (int j = 0; j < argc; j++) {
+				sciprintf(PREG, PRINT_REG((*p_sp)[j - stackframe]));
+				if (j+1 < argc)
 					sciprintf(", ");
 			}
 			sciprintf(")\n");
@@ -3556,10 +3553,8 @@
 			con_hook_command(c_vmvarlist, "vmvarlist", "!", "Displays the addresses of variables in the VM");
 			con_hook_command(c_step, "s", "i*", "Executes one or several operations\n\nEXAMPLES\n\n"
 					 "    s 4\n\n  Execute 4 commands\n\n    s\n\n  Execute next command");
-#ifdef __GNUC__
-#warning "Re-enable con:so hook"
-#endif
 #if 0
+			// TODO Re-implement con:so
 			con_hook_command(c_stepover, "so", "", "Executes one operation skipping over sends");
 #endif
 			con_hook_command(c_disasm_addr, "disasm-addr", "!as*", "Disassembles one or more commands\n\n"
@@ -3701,10 +3696,8 @@
 			con_hook_command(c_gfx_update_zone, "gfx_update_zone", "iiii", "Propagates a rectangular area from\n  the back buffer to the front buffer"
 					 "\n\nUSAGE\n\n"
 					 "  gfx_update_zone <x> <y> <xl> <yl>");
-#ifdef __GNUC__
-#warning "Re-enable con:draw_viewobj"
-#endif
 #if 0
+			// TODO: Re-enable con:draw_viewobj
 			con_hook_command(c_gfx_draw_viewobj, "draw_viewobj", "i", "Draws the nsRect and brRect of a\n  dynview object.\n\n  nsRect is green, brRect\n"
 					 "  is blue.\n");
 #endif

Modified: scummvm/trunk/engines/sci/gfx/sci_widgets.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/sci_widgets.cpp	2009-02-15 21:11:25 UTC (rev 38302)
+++ scummvm/trunk/engines/sci/gfx/sci_widgets.cpp	2009-02-15 21:12:21 UTC (rev 38303)
@@ -146,18 +146,18 @@
 	gfx_state_t *state = s->gfx_state;
 	int shadow_offset = 2;
 	rect_t frame;
-	gfx_color_t black	= {0};
+	gfx_color_t black	= {{0, 0, 0, 0}, 0, 0, 0, 0};
 	gfxw_port_t *win;
 	gfxw_list_t *decorations;
-	int xextra = !(flags & WINDOW_FLAG_NOFRAME) ? 1 : 0;
-	int yextra = !(flags & WINDOW_FLAG_NOFRAME) ? 2 : 0;
+//	int xextra = !(flags & WINDOW_FLAG_NOFRAME) ? 1 : 0;
+//	int yextra = !(flags & WINDOW_FLAG_NOFRAME) ? 2 : 0;
 
 	if (area.xl == 319 && area.yl == 189)
 	{
 		flags |= WINDOW_FLAG_NOFRAME;
 		/* The below line makes the points bar in QfG2 work, but breaks
 		   the one in QfG1. Hm. */
-		if (bgcolor.priority == 255) /* Yep, QfG2 */
+		if ((byte)bgcolor.priority == 255) /* Yep, QfG2 */
 			area.y += 3;
 	}
 
@@ -297,7 +297,7 @@
 		       int font, gfx_alignment_t align, char framed, char inverse, int flags,
 		       char gray_text)
 {
-	gfx_color_t *color1, *color2, *bgcolor	= {0};
+	gfx_color_t *color1, *color2, *bgcolor;
 
 	if (inverse) {
 		color1 = color2 = &(port->bgcolor);
@@ -683,7 +683,7 @@
 	rect_t area		= gfx_rect(MENU_BOX_LEFT_PADDING, 0, width - MENU_BOX_LEFT_PADDING, 10);
 	rect_t list_area	= gfx_rect(port->zone.x, area.y + offset + port->zone.y, width, area.yl);
 	gfxw_list_t *list	= (gfxw_list_t *) gfxw_set_id(GFXW(gfxw_new_list(list_area, 0)), ID, GFXW_NO_ID);
-	gfx_color_t xcolor	= {0};
+	gfx_color_t xcolor	= {{0, 0, 0, 0}, 0, 0, 0, 0};
 
 	color = un_prioritize(color);
 	bgcolor = un_prioritize(bgcolor);


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