[Scummvm-cvs-logs] SF.net SVN: scummvm:[40106] scummvm/trunk/engines/sci
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Apr 24 12:47:39 CEST 2009
Revision: 40106
http://scummvm.svn.sourceforge.net/scummvm/?rev=40106&view=rev
Author: fingolfin
Date: 2009-04-24 10:47:38 +0000 (Fri, 24 Apr 2009)
Log Message:
-----------
SCI: font_nr -> _font
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kgraphics.cpp
scummvm/trunk/engines/sci/engine/kmenu.cpp
scummvm/trunk/engines/sci/gfx/gfx_gui.cpp
scummvm/trunk/engines/sci/gfx/gfx_state_internal.h
scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp
Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-04-24 10:46:46 UTC (rev 40105)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-04-24 10:47:38 UTC (rev 40106)
@@ -457,8 +457,8 @@
GfxPort *port = s->port;
GfxPort *newport;
- newport = sciw_new_window(s, port->zone, port->font_nr, port->_color, newbgcolor,
- s->titlebar_port->font_nr, s->ega_colors[15], s->ega_colors[8],
+ newport = sciw_new_window(s, port->zone, port->_font, port->_color, newbgcolor,
+ s->titlebar_port->_font, s->ega_colors[15], s->ega_colors[8],
port->title_text, port->port_flags & ~kWindowTransparent);
if (s->dyn_views) {
@@ -2529,8 +2529,8 @@
lWhite.priority = -1;
lWhite.control = -1;
- window = sciw_new_window(s, gfx_rect(x, y, xl, yl), s->titlebar_port->font_nr, fgcolor, bgcolor,
- s->titlebar_port->font_nr, lWhite, black, argv[4 + argextra].segment ?
+ window = sciw_new_window(s, gfx_rect(x, y, xl, yl), s->titlebar_port->_font, fgcolor, bgcolor,
+ s->titlebar_port->_font, lWhite, black, argv[4 + argextra].segment ?
kernel_dereference_char_pointer(s, argv[4 + argextra], 0) : NULL, flags);
// PQ3 has the interpreter store underBits implicitly.
@@ -3143,7 +3143,7 @@
gfx_alignment_t halign = ALIGN_LEFT;
rect_t area = gfx_rect(port->draw_pos.x, port->draw_pos.y, 320 - port->draw_pos.x, 200 - port->draw_pos.y);
int gray = port->gray_text;
- int font_nr = port->font_nr;
+ int font_nr = port->_font;
GfxText *text_handle;
color0 = port->_color;
Modified: scummvm/trunk/engines/sci/engine/kmenu.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmenu.cpp 2009-04-24 10:46:46 UTC (rev 40105)
+++ scummvm/trunk/engines/sci/engine/kmenu.cpp 2009-04-24 10:47:38 UTC (rev 40106)
@@ -37,7 +37,7 @@
char *contents = kernel_dereference_char_pointer(s, argv[1], 0);
s->_menubar->addMenu(s->gfx_state, name,
- contents, s->titlebar_port->font_nr, argv[1]);
+ contents, s->titlebar_port->_font, argv[1]);
return s->r_acc;
Modified: scummvm/trunk/engines/sci/gfx/gfx_gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_gui.cpp 2009-04-24 10:46:46 UTC (rev 40105)
+++ scummvm/trunk/engines/sci/gfx/gfx_gui.cpp 2009-04-24 10:47:38 UTC (rev 40106)
@@ -95,7 +95,7 @@
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 @@
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 @@
// 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 @@
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 @@
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 @@
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)));
}
Modified: scummvm/trunk/engines/sci/gfx/gfx_state_internal.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_state_internal.h 2009-04-24 10:46:46 UTC (rev 40105)
+++ scummvm/trunk/engines/sci/gfx/gfx_state_internal.h 2009-04-24 10:47:38 UTC (rev 40106)
@@ -167,7 +167,7 @@
#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 @@
#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 @@
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 */
Modified: scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp 2009-04-24 10:46:46 UTC (rev 40105)
+++ scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp 2009-04-24 10:47:38 UTC (rev 40106)
@@ -917,7 +917,7 @@
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 @@
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 @@
: 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::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 @@
_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 @@
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;
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