diff options
author | Max Horn | 2009-04-24 10:47:38 +0000 |
---|---|---|
committer | Max Horn | 2009-04-24 10:47:38 +0000 |
commit | 80794a6b5aa02be8a8c0e7879c5e3f48ee8a2646 (patch) | |
tree | ba72c683ce83a9db2116ff0aef5b1d7918d03908 /engines/sci/gfx | |
parent | 22a803cc692a8040770806b2d0a27e1b2693e289 (diff) | |
download | scummvm-rg350-80794a6b5aa02be8a8c0e7879c5e3f48ee8a2646.tar.gz scummvm-rg350-80794a6b5aa02be8a8c0e7879c5e3f48ee8a2646.tar.bz2 scummvm-rg350-80794a6b5aa02be8a8c0e7879c5e3f48ee8a2646.zip |
SCI: font_nr -> _font
svn-id: r40106
Diffstat (limited to 'engines/sci/gfx')
-rw-r--r-- | engines/sci/gfx/gfx_gui.cpp | 18 | ||||
-rw-r--r-- | engines/sci/gfx/gfx_state_internal.h | 6 | ||||
-rw-r--r-- | engines/sci/gfx/gfx_widgets.cpp | 12 |
3 files changed, 18 insertions, 18 deletions
diff --git a/engines/sci/gfx/gfx_gui.cpp b/engines/sci/gfx/gfx_gui.cpp index 81845602a5..da85878281 100644 --- a/engines/sci/gfx/gfx_gui.cpp +++ b/engines/sci/gfx/gfx_gui.cpp @@ -95,7 +95,7 @@ void sciw_set_status_bar(EngineState *s, GfxPort *status_bar, const Common::Stri if (!text.empty()) { GfxText *textw = gfxw_new_text(state, gfx_rect(0, 0, status_bar->_bounds.width, status_bar->_bounds.height), - status_bar->font_nr, text.c_str(), ALIGN_LEFT, ALIGN_CENTER, + status_bar->_font, text.c_str(), ALIGN_LEFT, ALIGN_CENTER, fg, fg, bg, kFontNoNewlines); list = make_titlebar_list(s, status_bar->_bounds, status_bar); @@ -172,7 +172,7 @@ GfxPort *sciw_new_window(EngineState *s, sciw_make_window_fit(&area, s->wm_port); win = gfxw_new_port(visual, s->wm_port, area, color, bgcolor); - win->font_nr = font; + win->_font = font; win->title_text = title; win->port_flags = flags; @@ -502,12 +502,12 @@ GfxList *sciw_new_list_control(GfxPort *port, reg_t ID, rect_t zone, int font_nr // Add up arrow list->add(GFXWC(list), GFXW(gfxw_new_text(port->_visual->gfx_state, gfx_rect(1, 0, zone.width - 2, 8), - port->font_nr, arr_up, ALIGN_CENTER, ALIGN_CENTER, + port->_font, arr_up, ALIGN_CENTER, ALIGN_CENTER, port->_color, port->_color, port->_bgcolor, 0))); // Add down arrow list->add(GFXWC(list), GFXW(gfxw_new_text(port->_visual->gfx_state, gfx_rect(1, zone.height - 9, zone.width - 2, 8), - port->font_nr, arr_down, ALIGN_CENTER, ALIGN_CENTER, + port->_font, arr_down, ALIGN_CENTER, ALIGN_CENTER, port->_color, port->_color, port->_bgcolor, 0))); if (list_top & 1) { // Hack to work around aggressive caching @@ -541,11 +541,11 @@ void sciw_set_menubar(EngineState *s, GfxPort *status_bar, Menubar *menubar, int list->add(GFXWC(list), GFXW(gfxw_new_box(status_bar->_visual->gfx_state, gfx_rect(offset, 0, width, MENU_BAR_HEIGHT), status_bar->_color, status_bar->_color, GFX_BOX_SHADE_FLAT))); list->add(GFXWC(list), GFXW(gfxw_new_text(s->gfx_state, gfx_rect(offset, 0, width, MENU_BAR_HEIGHT), - status_bar->font_nr, menu->_title.c_str(), ALIGN_CENTER, ALIGN_CENTER, + status_bar->_font, menu->_title.c_str(), ALIGN_CENTER, ALIGN_CENTER, status_bar->_bgcolor, status_bar->_bgcolor, status_bar->_color, kFontNoNewlines))); } else list->add(GFXWC(list), GFXW(gfxw_new_text(s->gfx_state, gfx_rect(offset, 0, width, MENU_BAR_HEIGHT), - status_bar->font_nr, menu->_title.c_str(), ALIGN_CENTER, ALIGN_CENTER, + status_bar->_font, menu->_title.c_str(), ALIGN_CENTER, ALIGN_CENTER, status_bar->_color, status_bar->_color, status_bar->_bgcolor, kFontNoNewlines))); offset += width; } @@ -574,7 +574,7 @@ GfxPort *sciw_new_menu(EngineState *s, GfxPort *status_bar, Menubar *menubar, in area.width = menu->_width - 1; area.height = menu->_items.size() * 10; - retval = sciw_new_window(s, area, status_bar->font_nr, status_bar->_color, status_bar->_bgcolor, + retval = sciw_new_window(s, area, status_bar->_font, status_bar->_color, status_bar->_bgcolor, 0, status_bar->_color, status_bar->_bgcolor, NULL, kWindowNoDropShadow | kWindowTransparent); retval->set_visual(GFXW(retval), s->visual); @@ -606,12 +606,12 @@ GfxWidget *_make_menu_entry(MenuItem *item, int offset, int width, GfxPort *port xcolor = gray ? color : bgcolor; list->add(GFXWC(list), GFXW(gfxw_new_box(port->_visual->gfx_state, area, bgcolor, bgcolor, GFX_BOX_SHADE_FLAT))); - list->add(GFXWC(list), GFXW(gfxw_new_text(port->_visual->gfx_state, area, port->font_nr, item->_text.c_str(), ALIGN_LEFT, ALIGN_CENTER, + list->add(GFXWC(list), GFXW(gfxw_new_text(port->_visual->gfx_state, area, port->_font, item->_text.c_str(), ALIGN_LEFT, ALIGN_CENTER, color, xcolor, bgcolor, kFontNoNewlines))); if (!item->_keytext.empty()) { area.width -= MENU_BOX_RIGHT_PADDING; - list->add(GFXWC(list), GFXW(gfxw_new_text(port->_visual->gfx_state, area, port->font_nr, item->_keytext.c_str(), ALIGN_RIGHT, ALIGN_CENTER, + list->add(GFXWC(list), GFXW(gfxw_new_text(port->_visual->gfx_state, area, port->_font, item->_keytext.c_str(), ALIGN_RIGHT, ALIGN_CENTER, color, xcolor, bgcolor, kFontNoNewlines))); } diff --git a/engines/sci/gfx/gfx_state_internal.h b/engines/sci/gfx/gfx_state_internal.h index c064cf7028..6794c13cb4 100644 --- a/engines/sci/gfx/gfx_state_internal.h +++ b/engines/sci/gfx/gfx_state_internal.h @@ -167,7 +167,7 @@ struct GfxDynView : public GfxView { #define GFXW_IS_TEXT(widget) ((widget)->_type == GFXW_TEXT) struct GfxText : public GfxWidget { - int font_nr; + int _font; int lines_nr, lineheight, lastline_width; char *text; gfx_alignment_t halign, valign; @@ -219,7 +219,7 @@ struct GfxList : public GfxContainer { #define GFXW_IS_VISUAL(widget) ((widget)->_type == GFXW_VISUAL) struct GfxVisual : public GfxContainer { Common::Array<GfxPort *> _portRefs; /* References to ports */ - int font_nr; /* Default font */ + int _font; /* Default font */ gfx_state_t *gfx_state; GfxVisual(gfx_state_t *state, int font); @@ -230,7 +230,7 @@ struct GfxPort : public GfxContainer { GfxList *decorations; /* optional window decorations- drawn before the contents */ GfxWidget *port_bg; /* Port background widget or NULL */ gfx_color_t _color, _bgcolor; - int font_nr; + int _font; Common::Point draw_pos; /* Drawing position */ gfxw_snapshot_t *restore_snap; /* Snapshot to be restored automagically, experimental feature used in the PQ3 interpreter */ diff --git a/engines/sci/gfx/gfx_widgets.cpp b/engines/sci/gfx/gfx_widgets.cpp index 9d0ba2545f..8be8077c88 100644 --- a/engines/sci/gfx/gfx_widgets.cpp +++ b/engines/sci/gfx/gfx_widgets.cpp @@ -917,7 +917,7 @@ static int _gfxwop_text_alloc_and_draw(GfxWidget *widget, Common::Point pos) { GfxText *text = (GfxText *)widget; DRAW_ASSERT(widget, GFXW_TEXT); - text->text_handle = gfxop_new_text(widget->_visual->gfx_state, text->font_nr, text->text, text->_bounds.width, + text->text_handle = gfxop_new_text(widget->_visual->gfx_state, text->_font, text->text, text->_bounds.width, text->halign, text->valign, text->_color1, text->_color2, text->_bgcolor, text->text_flags); text->draw = _gfxwop_text_draw; @@ -948,7 +948,7 @@ static int _gfxwop_text_equals(GfxWidget *widget, GfxWidget *other) { if (wtext->text_flags != otext->text_flags) return 0; - if (wtext->font_nr != otext->font_nr) + if (wtext->_font != otext->_font) return 0; /* if (!(_color_equals(wtext->_color1, otext->_color1) && _color_equals(wtext->_color2, otext->_color2) @@ -990,7 +990,7 @@ GfxText::GfxText(gfx_state_t *state, rect_t area, int font, const char *text_, g : GfxWidget(GFXW_TEXT) { _widgetPriority = _gfxw_color_get_priority(color1_); - font_nr = font; + _font = font; text = (char *)sci_malloc(strlen(text_) + 1); halign = halign_; valign = valign_; @@ -1612,7 +1612,7 @@ GfxVisual *gfxw_new_visual(gfx_state_t *state, int font) { GfxVisual::GfxVisual(gfx_state_t *state, int font) : GfxContainer(gfx_rect(0, 0, 320, 200), GFXW_VISUAL) { - font_nr = font; + _font = font; gfx_state = state; _gfxw_set_ops_VISUAL(this); @@ -1696,7 +1696,7 @@ static int _gfxwop_port_print(GfxWidget *widget, int indentation) { _gfxw_print_widget(widget, indentation); sciprintf("PORT"); - sciprintf(" font=%d drawpos=(%d,%d)", port->font_nr, port->draw_pos.x, port->draw_pos.y); + sciprintf(" font=%d drawpos=(%d,%d)", port->_font, port->draw_pos.x, port->draw_pos.y); if (port->gray_text) sciprintf(" (gray)"); _w_gfxwop_container_print(GFXW(port), indentation); @@ -1794,7 +1794,7 @@ GfxPort::GfxPort(GfxVisual *visual_, rect_t area, gfx_color_t fgcolor, gfx_color gray_text = 0; _color = fgcolor; _bgcolor = bgcolor_; - font_nr = visual_->font_nr; + _font = visual_->_font; _ID = _visual_find_free_ID(visual_); visual_->_portRefs[_ID] = this; |