diff options
author | Max Horn | 2009-02-15 21:12:21 +0000 |
---|---|---|
committer | Max Horn | 2009-02-15 21:12:21 +0000 |
commit | e29d90be3e2213313c2884d80656198d8fed65ef (patch) | |
tree | 69804f0b0cb62507d9d23b2b0e3f0cf2271814f1 | |
parent | 0641af5d1c3c83d319c090c22a9d14ce4252e1a2 (diff) | |
download | scummvm-rg350-e29d90be3e2213313c2884d80656198d8fed65ef.tar.gz scummvm-rg350-e29d90be3e2213313c2884d80656198d8fed65ef.tar.bz2 scummvm-rg350-e29d90be3e2213313c2884d80656198d8fed65ef.zip |
SCI: Fixed more warnings
svn-id: r38303
-rw-r--r-- | engines/sci/engine/scriptdebug.cpp | 19 | ||||
-rw-r--r-- | engines/sci/gfx/sci_widgets.cpp | 12 |
2 files changed, 12 insertions, 19 deletions
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index 9014ca20d6..76cc9d1302 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -819,10 +819,8 @@ c_step(state_t *s) 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 @@ disassemble(state_t *s, reg_t pos, int print_bw_tag, int print_bytecode) 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 @@ disassemble(state_t *s, reg_t pos, int print_bw_tag, int print_bytecode) 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 @@ script_debug(state_t *s, reg_t *pc, stack_ptr_t *sp, stack_ptr_t *pp, reg_t *obj 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 @@ script_debug(state_t *s, reg_t *pc, stack_ptr_t *sp, stack_ptr_t *pp, reg_t *obj 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 diff --git a/engines/sci/gfx/sci_widgets.cpp b/engines/sci/gfx/sci_widgets.cpp index 0df88236d1..d840962503 100644 --- a/engines/sci/gfx/sci_widgets.cpp +++ b/engines/sci/gfx/sci_widgets.cpp @@ -146,18 +146,18 @@ sciw_new_window(state_t *s, rect_t area, int font, gfx_color_t color, gfx_color_ 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 @@ _sciw_add_text_to_list(gfxw_list_t *list, gfxw_port_t *port, rect_t zone, char * 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 @@ _make_menu_entry(menu_item_t *item, int offset, int width, gfxw_port_t *port, gf 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); |