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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Apr 27 13:12:08 CEST 2009


Revision: 40155
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40155&view=rev
Author:   fingolfin
Date:     2009-04-27 11:12:08 +0000 (Mon, 27 Apr 2009)

Log Message:
-----------
SCI: Renamed gfx_state_t -> GfxState

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/state.h
    scummvm/trunk/engines/sci/gfx/gfx_gui.cpp
    scummvm/trunk/engines/sci/gfx/gfx_state_internal.h
    scummvm/trunk/engines/sci/gfx/gfx_test.cpp
    scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp
    scummvm/trunk/engines/sci/gfx/gfx_widgets.h
    scummvm/trunk/engines/sci/gfx/menubar.cpp
    scummvm/trunk/engines/sci/gfx/menubar.h
    scummvm/trunk/engines/sci/gfx/operations.cpp
    scummvm/trunk/engines/sci/gfx/operations.h
    scummvm/trunk/engines/sci/sci.cpp

Modified: scummvm/trunk/engines/sci/engine/state.h
===================================================================
--- scummvm/trunk/engines/sci/engine/state.h	2009-04-27 11:11:42 UTC (rev 40154)
+++ scummvm/trunk/engines/sci/engine/state.h	2009-04-27 11:12:08 UTC (rev 40155)
@@ -50,7 +50,7 @@
 class Menubar;
 struct kfunct_sig_pair_t;	// from kernel.h
 
-struct gfx_state_t;
+struct GfxState;
 struct GfxPort;
 struct GfxVisual;
 struct GfxContainer;	
@@ -124,7 +124,7 @@
 
 	/* Non-VM information */
 
-	gfx_state_t *gfx_state; /* Graphics state and driver */
+	GfxState *gfx_state; /* Graphics state and driver */
 	gfx_pixmap_t *old_screen; /* Old screen content: Stored during kDrawPic() for kAnimate() */
 
 	sfx_state_t sound; /* sound subsystem */

Modified: scummvm/trunk/engines/sci/gfx/gfx_gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_gui.cpp	2009-04-27 11:11:42 UTC (rev 40154)
+++ scummvm/trunk/engines/sci/gfx/gfx_gui.cpp	2009-04-27 11:12:08 UTC (rev 40155)
@@ -73,7 +73,7 @@
 }
 
 void sciw_set_status_bar(EngineState *s, GfxPort *status_bar, const Common::String &text, int fgcolor, int bgcolor) {
-	gfx_state_t *state;
+	GfxState *state;
 	GfxList *list;
 	gfx_color_t bg = status_bar->_bgcolor;
 	gfx_color_t fg = status_bar->_color;
@@ -135,7 +135,7 @@
 		int title_font, gfx_color_t title_color, gfx_color_t title_bgcolor,
 		const char *title, int flags) {
 	GfxVisual *visual = s->visual;
-	gfx_state_t *state = s->gfx_state;
+	GfxState *state = s->gfx_state;
 	int shadow_offset = 2;
 	rect_t frame;
 	gfx_color_t black;

Modified: scummvm/trunk/engines/sci/gfx/gfx_state_internal.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_state_internal.h	2009-04-27 11:11:42 UTC (rev 40154)
+++ scummvm/trunk/engines/sci/gfx/gfx_state_internal.h	2009-04-27 11:12:08 UTC (rev 40155)
@@ -205,7 +205,7 @@
 	gfx_box_shade_t _shadeType;
 
 public:
-	GfxBox(gfx_state_t *state, rect_t area, gfx_color_t color1, gfx_color_t color2, gfx_box_shade_t shade_type);
+	GfxBox(GfxState *state, rect_t area, gfx_color_t color1, gfx_color_t color2, gfx_box_shade_t shade_type);
 
 	virtual int draw(const Common::Point &pos);
 	virtual void print(int indentation) const;
@@ -234,7 +234,7 @@
 	int _palette;
 
 public:
-	GfxView(gfx_state_t *state, Common::Point pos, int view_nr, int loop, int cel, int palette, int priority, int control,
+	GfxView(GfxState *state, Common::Point pos, int view_nr, int loop, int cel, int palette, int priority, int control,
 		gfx_alignment_t halign, gfx_alignment_t valign, int flags);
 
 	virtual int draw(const Common::Point &pos);
@@ -254,7 +254,7 @@
 	bool _isDrawn;	// FIXME: This is specific to GFXW_PIC_VIEW
 
 public:
-	GfxDynView(gfx_state_t *state, Common::Point pos, int z, int view, int loop, int cel, int palette, int priority, int control,
+	GfxDynView(GfxState *state, Common::Point pos, int z, int view, int loop, int cel, int palette, int priority, int control,
 		gfx_alignment_t halign, gfx_alignment_t valign, int sequence);
 
 	virtual int draw(const Common::Point &pos);
@@ -275,7 +275,7 @@
 	gfx_text_handle_t *_textHandle;
 
 public:
-	GfxText(gfx_state_t *state, rect_t area, int font, const char *text, gfx_alignment_t halign,
+	GfxText(GfxState *state, rect_t area, int font, const char *text, gfx_alignment_t halign,
 		gfx_alignment_t valign, gfx_color_t color1, gfx_color_t color2, gfx_color_t bgcolor, int text_flags);
 
 	~GfxText();
@@ -335,10 +335,10 @@
 struct GfxVisual : public GfxContainer {
 	Common::Array<GfxPort *> _portRefs; /* References to ports */
 	int _font; /* Default font */
-	gfx_state_t *_gfxState;
+	GfxState *_gfxState;
 
 public:
-	GfxVisual(gfx_state_t *state, int font);
+	GfxVisual(GfxState *state, int font);
 
 	virtual int draw(const Common::Point &pos);
 	virtual void print(int indentation) const;

Modified: scummvm/trunk/engines/sci/gfx/gfx_test.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_test.cpp	2009-04-27 11:11:42 UTC (rev 40154)
+++ scummvm/trunk/engines/sci/gfx/gfx_test.cpp	2009-04-27 11:12:08 UTC (rev 40155)
@@ -101,8 +101,8 @@
 #define ALL_TESTS "abcdefghijkl"
 static char tests[256];
 
-gfx_state_t graphics_state;
-gfx_state_t *state = &graphics_state;
+GfxState graphics_state;
+GfxState *state = &graphics_state;
 
 gfx_options_t graphics_options;
 gfx_options_t *options = &graphics_options;

Modified: scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp	2009-04-27 11:11:42 UTC (rev 40154)
+++ scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp	2009-04-27 11:12:08 UTC (rev 40155)
@@ -404,11 +404,11 @@
 	return (color.mask & GFX_MASK_PRIORITY) ? color.priority : -1;
 }
 
-GfxBox *gfxw_new_box(gfx_state_t *state, rect_t area, gfx_color_t color1, gfx_color_t color2, gfx_box_shade_t shade_type) {
+GfxBox *gfxw_new_box(GfxState *state, rect_t area, gfx_color_t color1, gfx_color_t color2, gfx_box_shade_t shade_type) {
 	return new GfxBox(state, area, color1, color2, shade_type);
 }
 
-GfxBox::GfxBox(gfx_state_t *state, rect_t area, gfx_color_t color1, gfx_color_t color2, gfx_box_shade_t shade_type)
+GfxBox::GfxBox(GfxState *state, rect_t area, gfx_color_t color1, gfx_color_t color2, gfx_box_shade_t shade_type)
 	: GfxWidget(GFXW_BOX) {
 
 	_widgetPriority = _gfxw_color_get_priority(color1);
@@ -548,7 +548,7 @@
 //*** Views and static views ***
 
 
-GfxView::GfxView(gfx_state_t *state, Common::Point pos_, int view_, int loop_, int cel_, int palette_, int priority, int control,
+GfxView::GfxView(GfxState *state, Common::Point pos_, int view_, int loop_, int cel_, int palette_, int priority, int control,
 	gfx_alignment_t halign, gfx_alignment_t valign, int flags_)
 	: GfxWidget((flags_ & GFXW_VIEW_FLAG_STATIC) ? GFXW_STATIC_VIEW : GFXW_VIEW) {
 
@@ -623,7 +623,7 @@
 	_gfxw_set_ops(view, _gfxwop_basic_compare_to, _gfxwop_basic_equals, _gfxwop_basic_superarea_of);
 }
 
-GfxView *gfxw_new_view(gfx_state_t *state, Common::Point pos, int view_nr, int loop, int cel, int palette, int priority, int control,
+GfxView *gfxw_new_view(GfxState *state, Common::Point pos, int view_nr, int loop, int cel, int palette, int priority, int control,
 	gfx_alignment_t halign, gfx_alignment_t valign, int flags) {
 	GfxView *view;
 
@@ -750,13 +750,13 @@
 	_gfxw_set_ops_DYNVIEW(widget);
 }
 
-GfxDynView *gfxw_new_dyn_view(gfx_state_t *state, Common::Point pos, int z, int view, int loop, int cel, int palette, int priority, int control,
+GfxDynView *gfxw_new_dyn_view(GfxState *state, Common::Point pos, int z, int view, int loop, int cel, int palette, int priority, int control,
 	gfx_alignment_t halign, gfx_alignment_t valign, int sequence) {
 
 	return new GfxDynView(state, pos, z, view, loop, cel, palette, priority, control, halign, valign, sequence);
 }
 
-GfxDynView::GfxDynView(gfx_state_t *state, Common::Point pos_, int z_, int view_, int loop_, int cel_, int palette_, int priority, int control,
+GfxDynView::GfxDynView(GfxState *state, Common::Point pos_, int z_, int view_, int loop_, int cel_, int palette_, int priority, int control,
 	gfx_alignment_t halign, gfx_alignment_t valign, int sequence_)
 	: GfxView(state, pos_, view_, loop_, cel_, palette_, priority, control, halign, valign, 0) {
 	int width, height;
@@ -826,7 +826,7 @@
 	text = NULL;
 
 	if (_textHandle) {
-		gfx_state_t *state = _visual ? _visual->_gfxState : NULL;
+		GfxState *state = _visual ? _visual->_gfxState : NULL;
 		if (!state) {
 			GFXERROR("Attempt to free text without supplying mode to free it from!\n");
 			BREAKPOINT();
@@ -902,12 +902,12 @@
 	widget->should_replace = _gfxwop_text_should_replace;
 }
 
-GfxText *gfxw_new_text(gfx_state_t *state, rect_t area, int font, const char *text, gfx_alignment_t halign,
+GfxText *gfxw_new_text(GfxState *state, rect_t area, int font, const char *text, gfx_alignment_t halign,
 	gfx_alignment_t valign, gfx_color_t color1, gfx_color_t color2, gfx_color_t bgcolor, int text_flags) {
 	return new GfxText(state, area, font, text, halign, valign, color1, color2, bgcolor, text_flags);
 }
 
-GfxText::GfxText(gfx_state_t *state, rect_t area, int font, const char *text_, gfx_alignment_t halign_,
+GfxText::GfxText(GfxState *state, rect_t area, int font, const char *text_, gfx_alignment_t halign_,
 	gfx_alignment_t valign_, gfx_color_t color1_, gfx_color_t color2_, gfx_color_t bgcolor_, int text_flags_)
 	: GfxWidget(GFXW_TEXT) {
 
@@ -944,7 +944,7 @@
 	_gfxw_set_ops_TEXT(this);
 }
 
-void gfxw_text_info(gfx_state_t *state, GfxText *text, int *lines, int *lineheight, int *offset) {
+void gfxw_text_info(GfxState *state, GfxText *text, int *lines, int *lineheight, int *offset) {
 	if (lines)
 		*lines = text->lines_nr;
 	if (lineheight)
@@ -1042,7 +1042,7 @@
 static int _gfxwop_container_draw_contents(GfxWidget *widget, GfxWidget *contents) {
 	GfxContainer *container = (GfxContainer *)widget;
 	gfx_dirty_rect_t *dirty = container->_dirty;
-	gfx_state_t *gfx_state = (widget->_visual) ? widget->_visual->_gfxState : ((GfxVisual *) widget)->_gfxState;
+	GfxState *gfx_state = (widget->_visual) ? widget->_visual->_gfxState : ((GfxVisual *) widget)->_gfxState;
 	int draw_ports;
 	rect_t nullzone = {0, 0, 0, 0};
 
@@ -1473,11 +1473,11 @@
 	                        _gfxwop_container_add_dirty, _gfxwop_container_add);
 }
 
-GfxVisual *gfxw_new_visual(gfx_state_t *state, int font) {
+GfxVisual *gfxw_new_visual(GfxState *state, int font) {
 	return new GfxVisual(state, font);
 }
 
-GfxVisual::GfxVisual(gfx_state_t *state, int font)
+GfxVisual::GfxVisual(GfxState *state, int font)
 	: GfxContainer(gfx_rect(0, 0, 320, 200), GFXW_VISUAL) {
 
 	_font = font;

Modified: scummvm/trunk/engines/sci/gfx/gfx_widgets.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_widgets.h	2009-04-27 11:11:42 UTC (rev 40154)
+++ scummvm/trunk/engines/sci/gfx/gfx_widgets.h	2009-04-27 11:12:08 UTC (rev 40155)
@@ -35,7 +35,7 @@
 
 namespace Sci {
 
-struct gfx_state_t;
+struct GfxState;
 struct GfxBox;
 struct GfxDynView;
 struct GfxContainer;
@@ -158,9 +158,9 @@
 
 /*-- Primitive types --*/
 
-GfxBox *gfxw_new_box(gfx_state_t *state, rect_t area, gfx_color_t color1, gfx_color_t color2, gfx_box_shade_t shade_type);
+GfxBox *gfxw_new_box(GfxState *state, rect_t area, gfx_color_t color1, gfx_color_t color2, gfx_box_shade_t shade_type);
 /* Creates a new box
-** Parameters: (gfx_state_t *) state: The (optional) state
+** Parameters: (GfxState *) state: The (optional) state
 **             (rect_t) area: The box's dimensions, relative to its container widget
 **             (gfx_color_t) color1: The primary color
 **             (gfx_color_t) color1: The secondary color (ignored if shading is disabled)
@@ -194,10 +194,10 @@
 /* Whether the view should _not_ apply its x/y offset modifyers */
 #define GFXW_VIEW_FLAG_DONT_MODIFY_OFFSET (1 << 1)
 
-GfxView *gfxw_new_view(gfx_state_t *state, Common::Point pos, int view, int loop, int cel, int palette, int priority, int control,
+GfxView *gfxw_new_view(GfxState *state, Common::Point pos, int view, int loop, int cel, int palette, int priority, int control,
 	gfx_alignment_t halign, gfx_alignment_t valign, int flags);
 /* Creates a new view (a cel, actually)
-** Parameters: (gfx_state_t *) state: The graphics state
+** Parameters: (GfxState *) state: The graphics state
 **             (Common::Point) pos: The position to place the view at
 **             (int x int x int) view, loop, cel: The global cel ID
 **             (int) priority: The priority to use for drawing, or -1 for none
@@ -208,10 +208,10 @@
 ** Returns   : (gfxw_cel_t *) A newly allocated cel according to the specs
 */
 
-GfxDynView *gfxw_new_dyn_view(gfx_state_t *state, Common::Point pos, int z, int view, int loop, int cel, int palette,
+GfxDynView *gfxw_new_dyn_view(GfxState *state, Common::Point pos, int z, int view, int loop, int cel, int palette,
 	int priority, int control, gfx_alignment_t halign, gfx_alignment_t valign, int sequence);
 /* Creates a new dyn view
-** Parameters: (gfx_state_t *) state: The graphics state
+** Parameters: (GfxState *) state: The graphics state
 **             (Common::Point) pos: The position to place the dynamic view at
 **             (int) z: The z coordinate
 **             (int x int x int) view, loop, cel: The global cel ID
@@ -226,11 +226,11 @@
 ** optimizations when they move or change shape.
 */
 
-GfxText *gfxw_new_text(gfx_state_t *state, rect_t area, int font, const char *text, gfx_alignment_t halign,
+GfxText *gfxw_new_text(GfxState *state, rect_t area, int font, const char *text, gfx_alignment_t halign,
 	gfx_alignment_t valign, gfx_color_t color1, gfx_color_t color2,
 	gfx_color_t bgcolor, int flags);
 /* Creates a new text widget
-** Parameters: (gfx_state_t *) state: The state the text is to be calculated from
+** Parameters: (GfxState *) state: The state the text is to be calculated from
 **             (rect_t) area: The area the text is to be confined to (the yl value is only
 **                            relevant for text aligment, though)
 **             (int) font: The number of the font to use
@@ -243,10 +243,10 @@
 ** Returns   : (GfxText *) The resulting text widget
 */
 
-void gfxw_text_info(gfx_state_t *state, GfxText *text, int *lines_nr,
+void gfxw_text_info(GfxState *state, GfxText *text, int *lines_nr,
 	int *lineheight, int *offset);
 /* Determines text widget meta-information
-** Parameters: (gfx_state_t *) state: The state to operate on
+** Parameters: (GfxState *) state: The state to operate on
 **             (gfx_text_t *) text: The widget to query
 ** Returns   : (int) lines_nr: Number of lines used in the text
 **             (int) lineheight: Pixel height (SCI scale) of each text line
@@ -314,9 +314,9 @@
 ** List widgets are also referred to as Display Lists.
 */
 
-GfxVisual *gfxw_new_visual(gfx_state_t *state, int font);
+GfxVisual *gfxw_new_visual(GfxState *state, int font);
 /* Creates a new visual widget
-** Parameters: (gfx_state_t *) state: The graphics state
+** Parameters: (GfxState *) state: The graphics state
 **             (int) font: The default font number for contained ports
 ** Returns   : (GfxList *) A newly allocated visual widget
 ** Visual widgets are containers for port widgets.

Modified: scummvm/trunk/engines/sci/gfx/menubar.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/menubar.cpp	2009-04-27 11:11:42 UTC (rev 40154)
+++ scummvm/trunk/engines/sci/gfx/menubar.cpp	2009-04-27 11:12:08 UTC (rev 40155)
@@ -79,7 +79,7 @@
 }
 
 
-int Menu::addMenuItem(gfx_state_t *state, MenuType type, const char *left, const char *right,
+int Menu::addMenuItem(GfxState *state, MenuType type, const char *left, const char *right,
 						   int font, int key, int modifiers, int tag, reg_t text_pos) {
 // Returns the total text size, plus MENU_BOX_CENTER_PADDING if (right != NULL)
 	MenuItem newItem;
@@ -122,7 +122,7 @@
 	return total_left_size + width;
 }
 
-void Menubar::addMenu(gfx_state_t *state, const char *title, const char *entries, int font, reg_t entries_base) {
+void Menubar::addMenu(GfxState *state, const char *title, const char *entries, int font, reg_t entries_base) {
 	char tracker;
 	char *left = NULL;
 	reg_t left_origin = entries_base;

Modified: scummvm/trunk/engines/sci/gfx/menubar.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/menubar.h	2009-04-27 11:11:42 UTC (rev 40154)
+++ scummvm/trunk/engines/sci/gfx/menubar.h	2009-04-27 11:12:08 UTC (rev 40155)
@@ -139,7 +139,7 @@
 
 //protected:
 	// FIXME: This should be (partially) turned into a MenuItem constructor
-	int addMenuItem(gfx_state_t *state, MenuType type, const char *left, const char *right,
+	int addMenuItem(GfxState *state, MenuType type, const char *left, const char *right,
 	                int font, int key, int modifiers, int tag, reg_t text_pos);
 };
 
@@ -156,7 +156,7 @@
 
 	/**
 	 * Adds a menu to the menubar.
-	 * Parameters: (gfx_state_t *) state: The state the fonts are stored in
+	 * Parameters: (GfxState *) state: The state the fonts are stored in
 	 *             (char *) title: The menu title
 	 *             (char *) entries: A string of menu entries
 	 *             (int) font: The font which is to be used for drawing
@@ -170,7 +170,7 @@
 	 * '=' : Initial tag value
 	 * and the special string "--!", which represents a horizontal bar in the menu.
 	 */
-	void addMenu(gfx_state_t *state, const char *title, const char *entries, int font, reg_t entries_base);
+	void addMenu(GfxState *state, const char *title, const char *entries, int font, reg_t entries_base);
 
 
 	/**

Modified: scummvm/trunk/engines/sci/gfx/operations.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/operations.cpp	2009-04-27 11:11:42 UTC (rev 40154)
+++ scummvm/trunk/engines/sci/gfx/operations.cpp	2009-04-27 11:12:08 UTC (rev 40155)
@@ -121,7 +121,7 @@
 	return (rect->width <= 0 || rect->height <= 0);
 }
 
-static int _gfxop_grab_pixmap(gfx_state_t *state, gfx_pixmap_t **pxmp, int x, int y,
+static int _gfxop_grab_pixmap(GfxState *state, gfx_pixmap_t **pxmp, int x, int y,
 							  int xl, int yl, int priority, rect_t *zone) {
 	// Returns 1 if the resulting data size was zero, GFX_OK or an error code otherwise */
 	int xfact = state->driver->mode->xfact;
@@ -254,14 +254,14 @@
 	return GFX_OK;
 }
 
-static void _gfxop_full_pointer_refresh(gfx_state_t *state) {
+static void _gfxop_full_pointer_refresh(GfxState *state) {
 	state->pointer_pos.x = state->driver->pointer_x / state->driver->mode->xfact;
 	state->pointer_pos.y = state->driver->pointer_y / state->driver->mode->yfact;
 }
 
-static int _gfxop_buffer_propagate_box(gfx_state_t *state, rect_t box, gfx_buffer_t buffer);
+static int _gfxop_buffer_propagate_box(GfxState *state, rect_t box, gfx_buffer_t buffer);
 
-gfx_pixmap_t *_gfxr_get_cel(gfx_state_t *state, int nr, int *loop, int *cel, int palette) {
+gfx_pixmap_t *_gfxr_get_cel(GfxState *state, int nr, int *loop, int *cel, int palette) {
 	gfxr_view_t *view = state->gfxResMan->getView(nr, loop, cel, palette);
 
 	gfxr_loop_t *indexed_loop;
@@ -285,7 +285,7 @@
 
 //** Dirty rectangle operations **
 
-static int _gfxop_update_box(gfx_state_t *state, rect_t box) {
+static int _gfxop_update_box(GfxState *state, rect_t box) {
 	int retval;
 	_gfxop_scale_rect(&box, state->driver->mode);
 
@@ -363,7 +363,7 @@
 	return base;
 }
 
-static void _gfxop_add_dirty(gfx_state_t *state, rect_t box) {
+static void _gfxop_add_dirty(GfxState *state, rect_t box) {
 	if (state->disable_dirty)
 		return;
 
@@ -374,7 +374,7 @@
 #endif
 }
 
-static void _gfxop_add_dirty_x(gfx_state_t *state, rect_t box) {
+static void _gfxop_add_dirty_x(GfxState *state, rect_t box) {
 	// Extends the box size by one before adding (used for lines)
 	if (box.width < 0)
 		box.width--;
@@ -389,7 +389,7 @@
 	_gfxop_add_dirty(state, box);
 }
 
-static int _gfxop_clear_dirty_rec(gfx_state_t *state, gfx_dirty_rect_t *rect) {
+static int _gfxop_clear_dirty_rec(GfxState *state, gfx_dirty_rect_t *rect) {
 	int retval;
 
 	if (!rect)
@@ -418,7 +418,7 @@
 	(*pixmap)->palette = new Palette(default_colors, DEFAULT_COLORS_NR);
 }
 
-int gfxop_init(int version, gfx_state_t *state, gfx_options_t *options, ResourceManager *resManager, 
+int gfxop_init(int version, GfxState *state, gfx_options_t *options, ResourceManager *resManager, 
 			   int xfact, int yfact, gfx_color_mode_t bpp) {
 	int color_depth = bpp ? bpp : 1;
 	int initialized = 0;
@@ -458,13 +458,13 @@
 	return GFX_OK;
 }
 
-int gfxop_set_parameter(gfx_state_t *state, char *attribute, char *value) {
+int gfxop_set_parameter(GfxState *state, char *attribute, char *value) {
 	BASIC_CHECKS(GFX_FATAL);
 
 	return state->driver->set_parameter(state->driver, attribute, value);
 }
 
-int gfxop_exit(gfx_state_t *state) {
+int gfxop_exit(GfxState *state) {
 	BASIC_CHECKS(GFX_ERROR);
 
 	state->gfxResMan->freeResManager();
@@ -513,7 +513,7 @@
 	return retval;
 }
 
-int gfxop_scan_bitmask(gfx_state_t *state, rect_t area, gfx_map_mask_t map) {
+int gfxop_scan_bitmask(GfxState *state, rect_t area, gfx_map_mask_t map) {
 	gfxr_pic_t *pic = (state->pic_unscaled) ? state->pic_unscaled : state->pic;
 	int retval = 0;
 
@@ -539,7 +539,7 @@
 #define MAX_X 319
 #define MAX_Y 199
 
-int gfxop_set_clip_zone(gfx_state_t *state, rect_t zone) {
+int gfxop_set_clip_zone(GfxState *state, rect_t zone) {
 	int xfact, yfact;
 	BASIC_CHECKS(GFX_ERROR);
 
@@ -574,7 +574,7 @@
 	return GFX_OK;
 }
 
-int gfxop_set_color(gfx_state_t *state, gfx_color_t *color, int r, int g, int b, int a, int priority, int control) {
+int gfxop_set_color(GfxState *state, gfx_color_t *color, int r, int g, int b, int a, int priority, int control) {
 	int mask = ((r >= 0 && g >= 0 && b >= 0) ? GFX_MASK_VISUAL : 0) | ((priority >= 0) ? GFX_MASK_PRIORITY : 0)
 	           | ((control >= 0) ? GFX_MASK_CONTROL : 0);
 
@@ -603,7 +603,7 @@
 }
 
 // Wrapper for gfxop_set_color
-int gfxop_set_color(gfx_state_t *state, gfx_color_t *colorOut, gfx_color_t &colorIn) {
+int gfxop_set_color(GfxState *state, gfx_color_t *colorOut, gfx_color_t &colorIn) {
 	if (colorIn.mask & GFX_MASK_VISUAL)
 		return gfxop_set_color(state, colorOut, colorIn.visual.r, colorIn.visual.g, colorIn.visual.b,
 			colorIn.alpha, colorIn.priority, colorIn.control);
@@ -612,7 +612,7 @@
 			colorIn.priority, colorIn.control);
 }
 
-int gfxop_set_system_color(gfx_state_t *state, unsigned int index, gfx_color_t *color) {
+int gfxop_set_system_color(GfxState *state, unsigned int index, gfx_color_t *color) {
 	BASIC_CHECKS(GFX_FATAL);
 
 	if (!PALETTE_MODE)
@@ -628,7 +628,7 @@
 	return GFX_OK;
 }
 
-int gfxop_free_color(gfx_state_t *state, gfx_color_t *color) {
+int gfxop_free_color(GfxState *state, gfx_color_t *color) {
 	// FIXME: implement. (And call in the appropriate places!)
 	return GFX_OK;
 }
@@ -722,7 +722,7 @@
 	return retval;
 }
 
-static void draw_line_to_control_map(gfx_state_t *state, Common::Point start, Common::Point end, gfx_color_t color) {
+static void draw_line_to_control_map(GfxState *state, Common::Point start, Common::Point end, gfx_color_t color) {
 	if (color.mask & GFX_MASK_CONTROL)
 		if (!point_clip(&start, &end, state->clip_zone_unscaled, 0, 0))
 			gfx_draw_line_pixmap_i(state->control_map, start, end, color.control);
@@ -802,7 +802,7 @@
 	return GFX_OK;
 }
 
-static int _gfxop_draw_line_clipped(gfx_state_t *state, Common::Point start, Common::Point end, gfx_color_t color, gfx_line_mode_t line_mode,
+static int _gfxop_draw_line_clipped(GfxState *state, Common::Point start, Common::Point end, gfx_color_t color, gfx_line_mode_t line_mode,
 	gfx_line_style_t line_style) {
 	int retval;
 	int skipone = (start.x ^ end.y) & 1; // Used for simulated line stippling
@@ -841,7 +841,7 @@
 	return GFX_OK;
 }
 
-int gfxop_draw_line(gfx_state_t *state, Common::Point start, Common::Point end,
+int gfxop_draw_line(GfxState *state, Common::Point start, Common::Point end,
 	gfx_color_t color, gfx_line_mode_t line_mode, gfx_line_style_t line_style) {
 	int xfact, yfact;
 
@@ -869,7 +869,7 @@
 	return _gfxop_draw_line_clipped(state, start, end, color, line_mode, line_style);
 }
 
-int gfxop_draw_rectangle(gfx_state_t *state, rect_t rect, gfx_color_t color, gfx_line_mode_t line_mode, gfx_line_style_t line_style) {
+int gfxop_draw_rectangle(GfxState *state, rect_t rect, gfx_color_t color, gfx_line_mode_t line_mode, gfx_line_style_t line_style) {
 	int retval = 0;
 	int xfact, yfact;
 	int x, y, xl, yl;
@@ -920,7 +920,7 @@
 
 #define COLOR_MIX(type, dist) ((color1.type * dist) + (color2.type * (1.0 - dist)))
 
-int gfxop_draw_box(gfx_state_t *state, rect_t box, gfx_color_t color1, gfx_color_t color2, gfx_box_shade_t shade_type) {
+int gfxop_draw_box(GfxState *state, rect_t box, gfx_color_t color1, gfx_color_t color2, gfx_box_shade_t shade_type) {
 	gfx_driver_t *drv = state->driver;
 	int reverse = 0; // switch color1 and color2
 	float mod_offset = 0.0, mod_breadth = 1.0; // 0.0 to 1.0: Color adjustment
@@ -1031,11 +1031,11 @@
 }
 #undef COLOR_MIX
 
-int gfxop_fill_box(gfx_state_t *state, rect_t box, gfx_color_t color) {
+int gfxop_fill_box(GfxState *state, rect_t box, gfx_color_t color) {
 	return gfxop_draw_box(state, box, color, color, GFX_BOX_SHADE_FLAT);
 }
 
-static int _gfxop_buffer_propagate_box(gfx_state_t *state, rect_t box, gfx_buffer_t buffer) {
+static int _gfxop_buffer_propagate_box(GfxState *state, rect_t box, gfx_buffer_t buffer) {
 	int err;
 
 	if (_gfxop_clip(&box, gfx_rect(0, 0, 320 * state->driver->mode->xfact, 200 * state->driver->mode->yfact)))
@@ -1051,7 +1051,7 @@
 
 extern int sci0_palette;
 
-int gfxop_clear_box(gfx_state_t *state, rect_t box) {
+int gfxop_clear_box(GfxState *state, rect_t box) {
 	BASIC_CHECKS(GFX_FATAL);
 	_gfxop_full_pointer_refresh(state);
 	_gfxop_add_dirty(state, box);
@@ -1071,7 +1071,7 @@
 	return _gfxop_buffer_propagate_box(state, box, GFX_BUFFER_BACK);
 }
 
-int gfxop_set_visible_map(gfx_state_t *state, gfx_map_mask_t visible_map) {
+int gfxop_set_visible_map(GfxState *state, gfx_map_mask_t visible_map) {
 	switch (visible_map) {
 
 	case GFX_MASK_VISUAL:
@@ -1101,7 +1101,7 @@
 	return GFX_OK;
 }
 
-int gfxop_update(gfx_state_t *state) {
+int gfxop_update(GfxState *state) {
 	int retval;
 
 	BASIC_CHECKS(GFX_FATAL);
@@ -1133,7 +1133,7 @@
 	return retval;
 }
 
-int gfxop_update_box(gfx_state_t *state, rect_t box) {
+int gfxop_update_box(GfxState *state, rect_t box) {
 	BASIC_CHECKS(GFX_FATAL);
 
 	if (state->disable_dirty)
@@ -1144,14 +1144,14 @@
 	return gfxop_update(state);
 }
 
-int gfxop_enable_dirty_frames(gfx_state_t *state) {
+int gfxop_enable_dirty_frames(GfxState *state) {
 	BASIC_CHECKS(GFX_ERROR);
 	state->disable_dirty = 0;
 
 	return GFX_OK;
 }
 
-int gfxop_disable_dirty_frames(gfx_state_t *state) {
+int gfxop_disable_dirty_frames(GfxState *state) {
 	BASIC_CHECKS(GFX_ERROR);
 
 	state->disable_dirty = 1;
@@ -1161,7 +1161,7 @@
 
 
 // Pointer and IO ops
-int gfxop_sleep(gfx_state_t *state, uint32 msecs) {
+int gfxop_sleep(GfxState *state, uint32 msecs) {
 	BASIC_CHECKS(GFX_FATAL);
 
 	uint32 time;
@@ -1185,7 +1185,7 @@
 	return GFX_OK;
 }
 
-static int _gfxop_set_pointer(gfx_state_t *state, gfx_pixmap_t *pxm, Common::Point *hotspot) {
+static int _gfxop_set_pointer(GfxState *state, gfx_pixmap_t *pxm, Common::Point *hotspot) {
 	BASIC_CHECKS(GFX_FATAL);
 
 	state->driver->set_pointer(state->driver, pxm, hotspot);
@@ -1193,7 +1193,7 @@
 	return GFX_OK;
 }
 
-int gfxop_set_pointer_cursor(gfx_state_t *state, int nr) {
+int gfxop_set_pointer_cursor(GfxState *state, int nr) {
 	BASIC_CHECKS(GFX_FATAL);
 
 	if (nr == GFXOP_NO_POINTER)
@@ -1210,7 +1210,7 @@
 	return _gfxop_set_pointer(state, new_pointer, &p);
 }
 
-int gfxop_set_pointer_view(gfx_state_t *state, int nr, int loop, int cel, Common::Point *hotspot) {
+int gfxop_set_pointer_view(GfxState *state, int nr, int loop, int cel, Common::Point *hotspot) {
 	int real_loop = loop;
 	int real_cel = cel;
 	gfx_pixmap_t *new_pointer = NULL;
@@ -1241,7 +1241,7 @@
 	}
 }
 
-int gfxop_set_pointer_position(gfx_state_t *state, Common::Point pos) {
+int gfxop_set_pointer_position(GfxState *state, Common::Point pos) {
 	BASIC_CHECKS(GFX_ERROR);
 
 	state->pointer_pos = pos;
@@ -1600,7 +1600,7 @@
 	return input;
 }
 
-sci_event_t gfxop_get_event(gfx_state_t *state, unsigned int mask) {
+sci_event_t gfxop_get_event(GfxState *state, unsigned int mask) {
 	sci_event_t error_event = { SCI_EVT_ERROR, 0, 0, 0 };
 	sci_event_t event = { 0, 0, 0, 0 };
 
@@ -1663,7 +1663,7 @@
 
 // View operations
 
-int gfxop_lookup_view_get_loops(gfx_state_t *state, int nr) {
+int gfxop_lookup_view_get_loops(GfxState *state, int nr) {
 	int loop = 0, cel = 0;
 	gfxr_view_t *view = NULL;
 
@@ -1679,7 +1679,7 @@
 	return view->loops_nr;
 }
 
-int gfxop_lookup_view_get_cels(gfx_state_t *state, int nr, int loop) {
+int gfxop_lookup_view_get_cels(GfxState *state, int nr, int loop) {
 	int real_loop = loop, cel = 0;
 	gfxr_view_t *view = NULL;
 
@@ -1697,7 +1697,7 @@
 	return view->loops[real_loop].cels_nr;
 }
 
-int gfxop_check_cel(gfx_state_t *state, int nr, int *loop, int *cel) {
+int gfxop_check_cel(GfxState *state, int nr, int *loop, int *cel) {
 	BASIC_CHECKS(GFX_ERROR);
 
 	gfxr_view_t *testView = state->gfxResMan->getView(nr, loop, cel, 0);
@@ -1710,7 +1710,7 @@
 	return GFX_OK;
 }
 
-int gfxop_overflow_cel(gfx_state_t *state, int nr, int *loop, int *cel) {
+int gfxop_overflow_cel(GfxState *state, int nr, int *loop, int *cel) {
 	int loop_v = *loop;
 	int cel_v = *cel;
 	BASIC_CHECKS(GFX_ERROR);
@@ -1732,7 +1732,7 @@
 	return GFX_OK;
 }
 
-int gfxop_get_cel_parameters(gfx_state_t *state, int nr, int loop, int cel, int *width, int *height, Common::Point *offset) {
+int gfxop_get_cel_parameters(GfxState *state, int nr, int loop, int cel, int *width, int *height, Common::Point *offset) {
 	gfxr_view_t *view = NULL;
 	gfx_pixmap_t *pxm = NULL;
 	BASIC_CHECKS(GFX_ERROR);
@@ -1753,7 +1753,7 @@
 	return GFX_OK;
 }
 
-static int _gfxop_draw_cel_buffer(gfx_state_t *state, int nr, int loop, int cel, Common::Point pos, gfx_color_t color, int static_buf, int palette) {
+static int _gfxop_draw_cel_buffer(GfxState *state, int nr, int loop, int cel, Common::Point pos, gfx_color_t color, int static_buf, int palette) {
 	int priority = (color.mask & GFX_MASK_PRIORITY) ? color.priority : -1;
 	int control = (color.mask & GFX_MASK_CONTROL) ? color.control : -1;
 	gfxr_view_t *view = NULL;
@@ -1783,11 +1783,11 @@
 	                          static_buf ? state->static_priority_map : state->priority_map);
 }
 
-int gfxop_draw_cel(gfx_state_t *state, int nr, int loop, int cel, Common::Point pos, gfx_color_t color, int palette) {
+int gfxop_draw_cel(GfxState *state, int nr, int loop, int cel, Common::Point pos, gfx_color_t color, int palette) {
 	return _gfxop_draw_cel_buffer(state, nr, loop, cel, pos, color, 0, palette);
 }
 
-int gfxop_draw_cel_static(gfx_state_t *state, int nr, int loop, int cel, Common::Point pos, gfx_color_t color, int palette) {
+int gfxop_draw_cel_static(GfxState *state, int nr, int loop, int cel, Common::Point pos, gfx_color_t color, int palette) {
 	int retval;
 	rect_t oldclip = state->clip_zone;
 
@@ -1800,13 +1800,13 @@
 	return retval;
 }
 
-int gfxop_draw_cel_static_clipped(gfx_state_t *state, int nr, int loop, int cel, Common::Point pos, gfx_color_t color, int palette) {
+int gfxop_draw_cel_static_clipped(GfxState *state, int nr, int loop, int cel, Common::Point pos, gfx_color_t color, int palette) {
 	return _gfxop_draw_cel_buffer(state, nr, loop, cel, pos, color, 1, palette);
 }
 
 // Pic operations
 
-static int _gfxop_set_pic(gfx_state_t *state) {
+static int _gfxop_set_pic(GfxState *state) {
 	gfx_copy_pixmap_box_i(state->control_map, state->pic->control_map, gfx_rect(0, 0, 320, 200));
 	gfx_copy_pixmap_box_i(state->priority_map, state->pic_unscaled->priority_map, gfx_rect(0, 0, 320, 200));
 	gfx_copy_pixmap_box_i(state->static_priority_map, state->pic_unscaled->priority_map, gfx_rect(0, 0, 320, 200));
@@ -1820,11 +1820,11 @@
 	return state->driver->set_static_buffer(state->driver, state->pic->visual_map, state->pic->priority_map);
 }
 
-int *gfxop_get_pic_metainfo(gfx_state_t *state) {
+int *gfxop_get_pic_metainfo(GfxState *state) {
 	return (state->pic) ? state->pic->priorityTable : NULL;
 }
 
-int gfxop_new_pic(gfx_state_t *state, int nr, int flags, int default_palette) {
+int gfxop_new_pic(GfxState *state, int nr, int flags, int default_palette) {
 	BASIC_CHECKS(GFX_FATAL);
 
 	state->gfxResMan->tagResources();
@@ -1857,7 +1857,7 @@
 	return _gfxop_set_pic(state);
 }
 
-int gfxop_add_to_pic(gfx_state_t *state, int nr, int flags, int default_palette) {
+int gfxop_add_to_pic(GfxState *state, int nr, int flags, int default_palette) {
 	BASIC_CHECKS(GFX_FATAL);
 
 	if (!state->pic) {
@@ -1880,8 +1880,8 @@
 // Text operations
 
 // FIXME: only the resstate member of state is used -- inline the reference by:
-// replacing gfx_state_t* state parameter with gfx_resstate_t* gfxResourceState and adjust callers accordingly
-int gfxop_get_font_height(gfx_state_t *state, int font_nr) {
+// replacing GfxState* state parameter with gfx_resstate_t* gfxResourceState and adjust callers accordingly
+int gfxop_get_font_height(GfxState *state, int font_nr) {
 	gfx_bitmap_font_t *font;
 	BASIC_CHECKS(GFX_FATAL);
 
@@ -1893,7 +1893,7 @@
 	return font->line_height;
 }
 
-int gfxop_get_text_params(gfx_state_t *state, int font_nr, const char *text, int maxwidth, int *width, int *height, int text_flags,
+int gfxop_get_text_params(GfxState *state, int font_nr, const char *text, int maxwidth, int *width, int *height, int text_flags,
 						  int *lines_nr, int *lineheight, int *lastline_width) {
 	text_fragment_t *textsplits;
 	gfx_bitmap_font_t *font;
@@ -1926,7 +1926,7 @@
 	return GFX_OK;
 }
 
-gfx_text_handle_t *gfxop_new_text(gfx_state_t *state, int font_nr, char *text, int maxwidth, gfx_alignment_t halign,
+gfx_text_handle_t *gfxop_new_text(GfxState *state, int font_nr, char *text, int maxwidth, gfx_alignment_t halign,
 								  gfx_alignment_t valign, gfx_color_t color1, gfx_color_t color2, gfx_color_t bg_color, int flags) {
 	gfx_text_handle_t *handle;
 	gfx_bitmap_font_t *font;
@@ -2011,7 +2011,7 @@
 	return handle;
 }
 
-int gfxop_free_text(gfx_state_t *state, gfx_text_handle_t *handle) {
+int gfxop_free_text(GfxState *state, gfx_text_handle_t *handle) {
 	int j;
 
 	BASIC_CHECKS(GFX_ERROR);
@@ -2029,7 +2029,7 @@
 	return GFX_OK;
 }
 
-int gfxop_draw_text(gfx_state_t *state, gfx_text_handle_t *handle, rect_t zone) {
+int gfxop_draw_text(GfxState *state, gfx_text_handle_t *handle, rect_t zone) {
 	int line_height;
 	rect_t pos;
 	int i;
@@ -2120,7 +2120,7 @@
 	return GFX_OK;
 }
 
-gfx_pixmap_t *gfxop_grab_pixmap(gfx_state_t *state, rect_t area) {
+gfx_pixmap_t *gfxop_grab_pixmap(GfxState *state, rect_t area) {
 	gfx_pixmap_t *pixmap = NULL;
 	rect_t resultzone; // Ignored for this application
 	BASIC_CHECKS(NULL);
@@ -2133,7 +2133,7 @@
 	return pixmap;
 }
 
-int gfxop_draw_pixmap(gfx_state_t *state, gfx_pixmap_t *pxm, rect_t zone, Common::Point pos) {
+int gfxop_draw_pixmap(GfxState *state, gfx_pixmap_t *pxm, rect_t zone, Common::Point pos) {
 	rect_t target;
 	BASIC_CHECKS(GFX_ERROR);
 
@@ -2160,7 +2160,7 @@
 	                                   200*state->driver->mode->yfact), 0, NULL, NULL);
 }
 
-int gfxop_free_pixmap(gfx_state_t *state, gfx_pixmap_t *pxm) {
+int gfxop_free_pixmap(GfxState *state, gfx_pixmap_t *pxm) {
 	BASIC_CHECKS(GFX_ERROR);
 	gfx_free_pixmap(pxm);
 	return GFX_OK;

Modified: scummvm/trunk/engines/sci/gfx/operations.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/operations.h	2009-04-27 11:11:42 UTC (rev 40154)
+++ scummvm/trunk/engines/sci/gfx/operations.h	2009-04-27 11:12:08 UTC (rev 40155)
@@ -91,7 +91,7 @@
 };
 
 
-struct gfx_state_t {
+struct GfxState {
 	gfx_options_t *options;
 
 	Common::Point pointer_pos; /* Mouse pointer coordinates */
@@ -137,11 +137,11 @@
 /* Fundamental operations */
 /**************************/
 
-int gfxop_init(int version, gfx_state_t *state, gfx_options_t *options, ResourceManager *resManager,
+int gfxop_init(int version, GfxState *state, gfx_options_t *options, ResourceManager *resManager,
 			   int xfact = 1, int yfact = 1, gfx_color_mode_t bpp = GFX_COLOR_MODE_INDEX);
 /* Initializes a graphics mode
 ** Parameters: (int) version: The interpreter version
-**             (gfx_state_t *) state: The state to initialize
+**             (GfxState *) state: The state to initialize
 **             (int x int) xfact, yfact: Horizontal and vertical scale factors
 **             (gfx_color_mode_t) bpp: Bytes per pixel to initialize with, or
 **                                     0 (GFX_COLOR_MODE_AUTO) to auto-detect
@@ -153,24 +153,24 @@
 **                   to provide any useful graphics support
 */
 
-int gfxop_set_parameter(gfx_state_t *state, char *attribute, char *value);
+int gfxop_set_parameter(GfxState *state, char *attribute, char *value);
 /* Sets a driver-specific parameter
-** Parameters: (gfx_state_t *) state: The state, encapsulating the driver object to manipulate
+** Parameters: (GfxState *) state: The state, encapsulating the driver object to manipulate
 **             (char *) attribute: The attribute to set
 **             (char *) value: The value the attribute should be set to
 ** Returns   : (int) GFX_OK on success, GFX_FATAL on fatal error conditions triggered
 **                   by the command
 */
 
-int gfxop_exit(gfx_state_t *state);
+int gfxop_exit(GfxState *state);
 /* Deinitializes a currently active driver
-** Parameters: (gfx_state_t *) state: The state encapsulating the driver in question
+** Parameters: (GfxState *) state: The state encapsulating the driver in question
 ** Returns   : (int) GFX_OK
 */
 
-int gfxop_scan_bitmask(gfx_state_t *state, rect_t area, gfx_map_mask_t map);
+int gfxop_scan_bitmask(GfxState *state, rect_t area, gfx_map_mask_t map);
 /* Calculates a bit mask calculated from some pixels on the specified map
-** Parameters: (gfx_state_t *) state: The state containing the pixels to scan
+** Parameters: (GfxState *) state: The state containing the pixels to scan
 **             (rect_t) area: The area to check
 **             (gfx_map_mask_t) map: The GFX_MASKed map(s) to test
 ** Returns   : (int) An integer value where, for each 0<=i<=15, bit #i is set
@@ -181,9 +181,9 @@
 ** (Short version: This is an implementation of "on_control()").
 */
 
-int gfxop_set_visible_map(gfx_state_t *state, gfx_map_mask_t map);
+int gfxop_set_visible_map(GfxState *state, gfx_map_mask_t map);
 /* Sets the currently visible map
-** Parameters: (gfx_state_t *) state: The state to modify
+** Parameters: (GfxState *) state: The state to modify
 **             (gfx_map_mask_t) map: The GFX_MASK to set
 ** Returns   : (int) GFX_OK, or GFX_ERROR if map was invalid
 ** 'visible_map' can be any of GFX_MASK_VISUAL, GFX_MASK_PRIORITY and GFX_MASK_CONTROL; the appropriate
@@ -193,9 +193,9 @@
 ** The screen needs to be updated for the changes to take effect.
 */
 
-int gfxop_set_clip_zone(gfx_state_t *state, rect_t zone);
+int gfxop_set_clip_zone(GfxState *state, rect_t zone);
 /* Sets a new clipping zone
-** Parameters: (gfx_state_t *) state: The affected state
+** Parameters: (GfxState *) state: The affected state
 **             (rect_t) zone: The new clipping zone
 ** Returns   : (int) GFX_OK
 */
@@ -204,11 +204,11 @@
 /* Generic drawing operations */
 /******************************/
 
-int gfxop_draw_line(gfx_state_t *state,
+int gfxop_draw_line(GfxState *state,
 	Common::Point start, Common::Point end, gfx_color_t color,
 	gfx_line_mode_t line_mode, gfx_line_style_t line_style);
 /* Renders a clipped line to the back buffer
-** Parameters: (gfx_state_t *) state: The state affected
+** Parameters: (GfxState *) state: The state affected
 **             (Common::Point) start: Starting point of the line
 **	       (Common::Point) end: End point of the line
 **             (gfx_color_t) color: The color to use for drawing
@@ -217,10 +217,10 @@
 ** Returns   : (int) GFX_OK or GFX_FATAL
 */
 
-int gfxop_draw_rectangle(gfx_state_t *state, rect_t rect, gfx_color_t color, gfx_line_mode_t line_mode,
+int gfxop_draw_rectangle(GfxState *state, rect_t rect, gfx_color_t color, gfx_line_mode_t line_mode,
 	gfx_line_style_t line_style);
 /* Draws a non-filled rectangular box to the back buffer
-** Parameters: (gfx_state_t *) state: The affected state
+** Parameters: (GfxState *) state: The affected state
 **             (rect_t) rect: The rectangular area the box is drawn to
 **             (gfx_color_t) color: The color the box is to be drawn in
 **             (gfx_line_mode_t) line_mode: The line mode to use
@@ -229,10 +229,10 @@
 ** Boxes drawn in thin lines will surround the minimal area described by rect.
 */
 
-int gfxop_draw_box(gfx_state_t *state, rect_t box, gfx_color_t color1, gfx_color_t color2,
+int gfxop_draw_box(GfxState *state, rect_t box, gfx_color_t color1, gfx_color_t color2,
 	gfx_box_shade_t shade_type);
 /* Draws a filled box to the back buffer
-** Parameters: (gfx_state_t *) state: The affected state
+** Parameters: (GfxState *) state: The affected state
 **             (rect_t) box: The area to draw to
 **             (gfx_color_t) color1: The primary color to use for drawing
 **             (gfx_color_t) color2: The secondary color to draw in
@@ -242,26 +242,26 @@
 ** The draw mask, control, and priority values are derived from color1.
 */
 
-int gfxop_fill_box(gfx_state_t *state, rect_t box, gfx_color_t color);
+int gfxop_fill_box(GfxState *state, rect_t box, gfx_color_t color);
 /* Fills a box in the back buffer with a specific color
-** Parameters: (gfx_state_t *) state: The state to draw to
+** Parameters: (GfxState *) state: The state to draw to
 **             (rect_t) box: The box to fill
 **             (gfx_color_t) color: The color to use for filling
 ** Returns   : (int) GFX_OK or GFX_FATAL
 ** This is a simple wrapper function for gfxop_draw_box
 */
 
-int gfxop_clear_box(gfx_state_t *state, rect_t box);
+int gfxop_clear_box(GfxState *state, rect_t box);
 /* Copies a box from the static buffer to the back buffer
-** Parameters: (gfx_state_t *) state: The affected state
+** Parameters: (GfxState *) state: The affected state
 **             (rect_t) box: The box to propagate from the static buffer
 ** Returns   : (int) GFX_OK or GFX_FATAL
 */
 
 
-int gfxop_update(gfx_state_t *state);
+int gfxop_update(GfxState *state);
 /* Updates all dirty rectangles
-** Parameters: (gfx_state_t) *state: The relevant state
+** Parameters: (GfxState) *state: The relevant state
 ** Returns   : (int) GFX_OK or GFX_FATAL if reported by the driver
 ** In order to track dirty rectangles, they must be enabled in the options.
 ** This function instructs the resource manager to free all tagged data
@@ -269,9 +269,9 @@
 */
 
 
-int gfxop_update_box(gfx_state_t *state, rect_t box);
+int gfxop_update_box(GfxState *state, rect_t box);
 /* Propagates a box from the back buffer to the front (visible) buffer
-** Parameters: (gfx_state_t *) state: The affected state
+** Parameters: (GfxState *) state: The affected state
 **             (rect_t) box: The box to propagate to the front buffer
 ** Returns   : (int) GFX_OK or GFX_FATAL
 ** This function instructs the resource manager to free all tagged data
@@ -281,16 +281,16 @@
 ** been disabled explicitly.
 */
 
-int gfxop_enable_dirty_frames(gfx_state_t *state);
+int gfxop_enable_dirty_frames(GfxState *state);
 /* Enables dirty frame accounting
-** Parameters: (gfx_state_t *) state: The state dirty frame accounting is to be enabled in
+** Parameters: (GfxState *) state: The state dirty frame accounting is to be enabled in
 ** Returns   : (int) GFX_OK or GFX_ERROR if state was invalid
 ** Dirty frame accounting is enabled by default.
 */
 
-int gfxop_disable_dirty_frames(gfx_state_t *state);
+int gfxop_disable_dirty_frames(GfxState *state);
 /* Disables dirty frame accounting
-** Parameters: (gfx_state_t *) state: The state dirty frame accounting is to be disabled in
+** Parameters: (GfxState *) state: The state dirty frame accounting is to be disabled in
 ** Returns   : (int) GFX_OK or GFX_ERROR if state was invalid
 */
 
@@ -299,10 +299,10 @@
 /* Color operations */
 /********************/
 
-int gfxop_set_color(gfx_state_t *state, gfx_color_t *color, int r, int g, int b, int a,
+int gfxop_set_color(GfxState *state, gfx_color_t *color, int r, int g, int b, int a,
 	int priority, int control);
 /* Maps an r/g/b value to a color and sets a gfx_color_t structure
-** Parameters: (gfx_state_t *) state: The current state
+** Parameters: (GfxState *) state: The current state
 **             (gfx_color_t *) color: Pointer to the structure to write to
 **             (int x int x int) r,g,b: The red/green/blue color intensity values
 **                               of the result color (0x00 (minimum) to 0xff (max))
@@ -324,9 +324,9 @@
 ** free that color.
 */
 
-int gfxop_set_system_color(gfx_state_t *state, unsigned int index, gfx_color_t *color);
+int gfxop_set_system_color(GfxState *state, unsigned int index, gfx_color_t *color);
 /* Designates a color as a 'system color'
-** Parameters: (gfx_state_t *) state: The affected state
+** Parameters: (GfxState *) state: The affected state
 **             (unsigned int) index: The index for the new system color
 **             (gfx_color_t *) color: The color to designate as a system color
 ** Returns   : (int) GFX_OK or GFX_ERROR if state is invalid
@@ -334,9 +334,9 @@
 ** with caution.
 */
 
-int gfxop_free_color(gfx_state_t *state, gfx_color_t *color);
+int gfxop_free_color(GfxState *state, gfx_color_t *color);
 /* Frees a color allocated by gfxop_set_color()
-** Parmaeters: (gfx_state_t *) state: The state affected
+** Parmaeters: (GfxState *) state: The state affected
 **             (gfx_color_t *) color: The color to de-allocate
 ** Returns   : (int) GFX_OK or GFX_ERROR if state is invalid
 ** This function is a no-op in non-index mode, or if color is a system color.
@@ -347,17 +347,17 @@
 /* Pointer and IO ops */
 /**********************/
 
-int gfxop_sleep(gfx_state_t *state, uint32 msecs);
+int gfxop_sleep(GfxState *state, uint32 msecs);
 /* Suspends program execution for the specified amount of milliseconds
-** Parameters: (gfx_state_t *) state: The state affected
+** Parameters: (GfxState *) state: The state affected
 **             (uint32) usecs: The amount of milliseconds to wait
 ** Returns   : (int) GFX_OK or GFX_ERROR
 ** The mouse pointer will be redrawn continually, if applicable
 */
 
-int gfxop_set_pointer_cursor(gfx_state_t *state, int nr);
+int gfxop_set_pointer_cursor(GfxState *state, int nr);
 /* Sets the mouse pointer to a cursor resource
-** Parameters: (gfx_state_t *) state: The affected state
+** Parameters: (GfxState *) state: The affected state
 **             (int) nr: Number of the cursor resource to use
 ** Returns   : (int) GFX_OK, GFX_ERROR if the resource did not
 **                   exist and was not GFXOP_NO_POINTER, or GFX_FATAL on
@@ -365,9 +365,9 @@
 ** Use nr = GFX_NO_POINTER to disable the mouse pointer (default).
 */
 
-int gfxop_set_pointer_view(gfx_state_t *state, int nr, int loop, int cel, Common::Point *hotspot);
+int gfxop_set_pointer_view(GfxState *state, int nr, int loop, int cel, Common::Point *hotspot);
 /* Sets the mouse pointer to a view resource
-** Parameters: (gfx_state_t *) state: The affected state
+** Parameters: (GfxState *) state: The affected state
 **             (int) nr: Number of the view resource to use
 **             (int) loop: View loop to use
 **             (int) cel: View cel to use
@@ -377,18 +377,18 @@
 ** pointer.
 */
 
-int gfxop_set_pointer_position(gfx_state_t *state, Common::Point pos);
+int gfxop_set_pointer_position(GfxState *state, Common::Point pos);
 /* Teleports the mouse pointer to a specific position
-** Parameters: (gfx_state_t *) state: The state the pointer is in
+** Parameters: (GfxState *) state: The state the pointer is in
 **             (Common::Point) pos: The position to teleport it to
 ** Returns   : (int) Any error code or GFX_OK
 ** Depending on the graphics driver, this operation may be without
 ** any effect
 */
 
-sci_event_t gfxop_get_event(gfx_state_t *state, unsigned int mask);
+sci_event_t gfxop_get_event(GfxState *state, unsigned int mask);
 /* Retrieves the next input event from the driver
-** Parameters: (gfx_state_t *) state: The affected state
+** Parameters: (GfxState *) state: The affected state
 **             (int) mask: The event mask to poll from (see uinput.h)
 ** Returns   : (sci_event_t) The next event in the driver's event queue, or
 **             a NONE event if no event matching the mask was found.
@@ -399,16 +399,16 @@
 /* View operations */
 /*******************/
 
-int gfxop_lookup_view_get_loops(gfx_state_t *state, int nr);
+int gfxop_lookup_view_get_loops(GfxState *state, int nr);
 /* Determines the number of loops associated with a view
-** Parameters: (gfx_state_t *) state: The state to use
+** Parameters: (GfxState *) state: The state to use
 **             (int) nr: Number of the view to investigate
 ** Returns   : (int) The number of loops, or GFX_ERROR if the view didn't exist
 */
 
-int gfxop_lookup_view_get_cels(gfx_state_t *state, int nr, int loop);
+int gfxop_lookup_view_get_cels(GfxState *state, int nr, int loop);
 /* Determines the number of cels associated stored in a loop
-** Parameters: (gfx_state_t *) state: The state to look up in
+** Parameters: (GfxState *) state: The state to look up in
 **             (int) nr: Number of the view to look up in
 **             (int) loop: Number of the loop the number of cels of
 **                         are to  be investigated
@@ -416,9 +416,9 @@
 **                   the view or the loop didn't exist
 */
 
-int gfxop_check_cel(gfx_state_t *state, int nr, int *loop, int *cel);
+int gfxop_check_cel(GfxState *state, int nr, int *loop, int *cel);
 /* Clips the view/loop/cel position of a cel
-** Parameters: (gfx_state_t *) state: The state to use
+** Parameters: (GfxState *) state: The state to use
 **             (int) nr: Number of the view to use
 **             (int *) loop: Pointer to the variable storing the loop
 **                           number to verify
@@ -429,9 +429,9 @@
 ** view configuration.
 */
 
-int gfxop_overflow_cel(gfx_state_t *state, int nr, int *loop, int *cel);
+int gfxop_overflow_cel(GfxState *state, int nr, int *loop, int *cel);
 /* Resets loop/cel values to zero if they have become invalid
-** Parameters: (gfx_state_t *) state: The state to use
+** Parameters: (GfxState *) state: The state to use
 **             (int) nr: Number of the view to use
 **             (int *) loop: Pointer to the variable storing the loop
 **                           number to verify
@@ -442,10 +442,10 @@
 ** view configuration.
 */
 
-int gfxop_get_cel_parameters(gfx_state_t *state, int nr, int loop, int cel,
+int gfxop_get_cel_parameters(GfxState *state, int nr, int loop, int cel,
 	int *width, int *height, Common::Point *offset);
 /* Retrieves the width and height of a cel
-** Parameters: (gfx_state_t *) state: The state to use
+** Parameters: (GfxState *) state: The state to use
 **             (int) nr: Number of the view
 **             (int) loop: Loop number to examine
 **             (int) cel: The cel (inside the loop) to look up
@@ -456,10 +456,10 @@
 **             combination was invalid
 */
 
-int gfxop_draw_cel(gfx_state_t *state, int nr, int loop, int cel, Common::Point pos,
+int gfxop_draw_cel(GfxState *state, int nr, int loop, int cel, Common::Point pos,
 	gfx_color_t color, int palette);
 /* Draws (part of) a cel to the back buffer
-** Parameters: (gfx_state_t *) state: The state encapsulating the driver to draw with
+** Parameters: (GfxState *) state: The state encapsulating the driver to draw with
 **             (int) nr: Number of the view to draw
 **             (int) loop: Loop of the cel to draw
 **             (int) cel: The cel number of the cel to draw
@@ -470,10 +470,10 @@
 */
 
 
-int gfxop_draw_cel_static(gfx_state_t *state, int nr, int loop, int cel, Common::Point pos,
+int gfxop_draw_cel_static(GfxState *state, int nr, int loop, int cel, Common::Point pos,
 	gfx_color_t color, int palette);
 /* Draws a cel to the static buffer; no clipping is performed
-** Parameters: (gfx_state_t *) state: The state encapsulating the driver to draw with
+** Parameters: (GfxState *) state: The state encapsulating the driver to draw with
 **             (int) nr: Number of the view to draw
 **             (int) loop: Loop of the cel to draw
 **             (int) cel: The cel number of the cel to draw
@@ -485,10 +485,10 @@
 */
 
 
-int gfxop_draw_cel_static_clipped(gfx_state_t *state, int nr, int loop, int cel, Common::Point pos,
+int gfxop_draw_cel_static_clipped(GfxState *state, int nr, int loop, int cel, Common::Point pos,
 	gfx_color_t color, int palette);
 /* Draws (part of) a clipped cel to the static buffer
-** Parameters: (gfx_state_t *) state: The state encapsulating the driver to draw with
+** Parameters: (GfxState *) state: The state encapsulating the driver to draw with
 **             (int) nr: Number of the view to draw
 **             (int) loop: Loop of the cel to draw
 **             (int) cel: The cel number of the cel to draw
@@ -505,9 +505,9 @@
 /******************/
 /* These operations are exempt from clipping */
 
-int gfxop_new_pic(gfx_state_t *state, int nr, int flags, int default_palette);
+int gfxop_new_pic(GfxState *state, int nr, int flags, int default_palette);
 /* Draws a pic and writes it over the static buffer
-** Parameters: (gfx_state_t *) state: The state affected
+** Parameters: (GfxState *) state: The state affected
 **             (int) nr: Number of the pic to draw
 **             (int) flags: Interpreter-dependant flags to use for drawing
 **             (int) default_palette: The default palette for drawing
@@ -516,17 +516,17 @@
 ** See the resource manager tag functions for a full description.
 */
 
-int *gfxop_get_pic_metainfo(gfx_state_t *state);
+int *gfxop_get_pic_metainfo(GfxState *state);
 /* Retrieves all meta-information assigned to the current pic
-** Parameters: (gfx_state_t *) state: The state affected
+** Parameters: (GfxState *) state: The state affected
 ** Returns   : (int *) NULL if the pic doesn't exist or has no meta-information,
 **             the meta-info otherwise
 ** This meta-information is referred to as 'internal data' in the pic code
 */
 
-int gfxop_add_to_pic(gfx_state_t *state, int nr, int flags, int default_palette);
+int gfxop_add_to_pic(GfxState *state, int nr, int flags, int default_palette);
 /* Adds a pic to the static buffer
-** Parameters: (gfx_state_t *) state: The state affected
+** Parameters: (GfxState *) state: The state affected
 **             (int) nr: Number of the pic to add
 **             (int) flags: Interpreter-dependant flags to use for drawing
 **             (int) default_palette: The default palette for drawing
@@ -541,18 +541,18 @@
 /*******************/
 
 
-int gfxop_get_font_height(gfx_state_t *state, int font_nr);
+int gfxop_get_font_height(GfxState *state, int font_nr);
 /* Returns the fixed line height for one specified font
-** Parameters: (gfx_state_t *) state: The state to work on
+** Parameters: (GfxState *) state: The state to work on
 **             (int) font_nr: Number of the font to inspect
 ** Returns   : (int) GFX_ERROR, GFX_FATAL, or the font line height
 */
 
-int gfxop_get_text_params(gfx_state_t *state, int font_nr, const char *text,
+int gfxop_get_text_params(GfxState *state, int font_nr, const char *text,
 	int maxwidth, int *width, int *height, int flags,
 	int *lines_nr, int *lineheight, int *lastline_width);
 /* Calculates the width and height of a specified text in a specified font
-** Parameters: (gfx_state_t *) state: The state to use
+** Parameters: (GfxState *) state: The state to use
 **             (int) font_nr: Font number to use for the calculation
 **             (const char *) text: The text to examine
 **             (int) flags: ORred GFXR_FONT_FLAGs
@@ -566,11 +566,11 @@
 **                   after the last character in the last line
 */
 
-gfx_text_handle_t *gfxop_new_text(gfx_state_t *state, int font_nr, char *text, int maxwidth,
+gfx_text_handle_t *gfxop_new_text(GfxState *state, int font_nr, char *text, int maxwidth,
 	gfx_alignment_t halign, gfx_alignment_t valign, gfx_color_t color1,
 	gfx_color_t color2, gfx_color_t bg_color, int flags);
 /* Generates a new text handle that can be used to draw any text
-** Parameters: (gfx_state_t *) state: The state to use
+** Parameters: (GfxState *) state: The state to use
 **             (int) font_nr: Font number to use for the calculation
 **             (char *) text: The text to examine
 **             (int) maxwidth: The maximum pixel width to allow for the text
@@ -587,16 +587,16 @@
 ** incorrect colors.
 */
 
-int gfxop_free_text(gfx_state_t *state, gfx_text_handle_t *handle);
+int gfxop_free_text(GfxState *state, gfx_text_handle_t *handle);
 /* Frees a previously allocated text handle and all related resources
-** Parameters: (gfx_state_t *) state: The state to use
+** Parameters: (GfxState *) state: The state to use
 **             (gfx_text_handle_t *) handle: The handle to free
 ** Returns   : (int) GFX_OK
 */
 
-int gfxop_draw_text(gfx_state_t *state, gfx_text_handle_t *handle, rect_t zone);
+int gfxop_draw_text(GfxState *state, gfx_text_handle_t *handle, rect_t zone);
 /* Draws text stored in a text handle
-** Parameters: (gfx_state_t *) state: The target state
+** Parameters: (GfxState *) state: The target state
 **             (gfx_text_handle_t *) handle: The text handle to use for drawing
 **             (rect_t) zone: The rectangular box to draw to. In combination with
 **                            halign and valign, this defines where the text is
@@ -609,26 +609,26 @@
 /* Manual pixmap operations */
 /****************************/
 
-gfx_pixmap_t *gfxop_grab_pixmap(gfx_state_t *state, rect_t area);
+gfx_pixmap_t *gfxop_grab_pixmap(GfxState *state, rect_t area);
 /* Grabs a screen section from the back buffer and stores it in a pixmap
-** Parameters: (gfx_state_t *) state: The affected state
+** Parameters: (GfxState *) state: The affected state
 **             (rect_t) area: The area to grab
 ** Returns   : (gfx_pixmap_t *) A result pixmap, or NULL on error
 ** Obviously, this only affects the visual map
 */
 
-int gfxop_draw_pixmap(gfx_state_t *state, gfx_pixmap_t *pxm, rect_t zone, Common::Point pos);
+int gfxop_draw_pixmap(GfxState *state, gfx_pixmap_t *pxm, rect_t zone, Common::Point pos);
 /* Draws part of a pixmap to the screen
-** Parameters: (gfx_state_t *) state: The affected state
+** Parameters: (GfxState *) state: The affected state
 **             (gfx_pixmap_t *) pxm: The pixmap to draw
 **             (rect_t) zone: The segment of the pixmap to draw
 **             (Common::Point) pos: The position the pixmap should be drawn to
 ** Returns   : (int) GFX_OK or any error code
 */
 
-int gfxop_free_pixmap(gfx_state_t *state, gfx_pixmap_t *pxm);
+int gfxop_free_pixmap(GfxState *state, gfx_pixmap_t *pxm);
 /* Frees a pixmap returned by gfxop_grab_pixmap()
-** Parameters: (gfx_state_t *) state: The affected state
+** Parameters: (GfxState *) state: The affected state
 **             (gfx_pixmap_t *) pxm: The pixmap to free
 ** Returns   : (int) GFX_OK, or GFX_ERROR if the state was invalid
 */

Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp	2009-04-27 11:11:42 UTC (rev 40154)
+++ scummvm/trunk/engines/sci/sci.cpp	2009-04-27 11:12:08 UTC (rev 40155)
@@ -237,7 +237,7 @@
 	script_set_gamestate_save_dir(gamestate, ConfMan.get("savepath").c_str());
 
 	gfx_crossblit_alpha_threshold = 0x90;
-	gfx_state_t gfx_state;
+	GfxState gfx_state;
 	gfx_state.driver = &gfx_driver_scummvm;
 
 	gamestate->port_serial = 0;


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