aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/include/gfx_operations.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/include/gfx_operations.h')
-rw-r--r--engines/sci/include/gfx_operations.h137
1 files changed, 46 insertions, 91 deletions
diff --git a/engines/sci/include/gfx_operations.h b/engines/sci/include/gfx_operations.h
index 39bcbc97a2..42342334a5 100644
--- a/engines/sci/include/gfx_operations.h
+++ b/engines/sci/include/gfx_operations.h
@@ -154,8 +154,7 @@ typedef struct {
/* Fundamental operations */
/**************************/
-int
-gfxop_init_default(gfx_state_t *state, gfx_options_t *options, void *misc_info);
+int gfxop_init_default(gfx_state_t *state, gfx_options_t *options, void *misc_info);
/* Initializes a graphics mode suggested by the graphics driver
** Parameters: (gfx_state_ t *) state: The state to initialize in that mode
** (gfx_options_t *) options: Rendering options
@@ -164,8 +163,7 @@ gfxop_init_default(gfx_state_t *state, gfx_options_t *options, void *misc_info);
** Returns : (int) GFX_OK on success, GFX_FATAL otherwise
*/
-int
-gfxop_init(gfx_state_t *state, int xfact, int yfact, gfx_color_mode_t bpp,
+int gfxop_init(gfx_state_t *state, int xfact, int yfact, gfx_color_mode_t bpp,
gfx_options_t *options, void *misc_info);
/* Initializes a custom graphics mode
** Parameters: (gfx_state_t *) state: The state to initialize
@@ -180,8 +178,7 @@ gfxop_init(gfx_state_t *state, int xfact, int yfact, gfx_color_mode_t bpp,
** to provide any useful graphics support
*/
-int
-gfxop_set_parameter(gfx_state_t *state, char *attribute, char *value);
+int gfxop_set_parameter(gfx_state_t *state, char *attribute, char *value);
/* Sets a driver-specific parameter
** Parameters: (gfx_state_t *) state: The state, encapsulating the driver object to manipulate
** (char *) attribute: The attribute to set
@@ -190,15 +187,13 @@ gfxop_set_parameter(gfx_state_t *state, char *attribute, char *value);
** by the command
*/
-int
-gfxop_exit(gfx_state_t *state);
+int gfxop_exit(gfx_state_t *state);
/* Deinitializes a currently active driver
** Parameters: (gfx_state_t *) 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(gfx_state_t *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
** (rect_t) area: The area to check
@@ -211,8 +206,7 @@ gfxop_scan_bitmask(gfx_state_t *state, rect_t area, gfx_map_mask_t map);
** (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(gfx_state_t *state, gfx_map_mask_t map);
/* Sets the currently visible map
** Parameters: (gfx_state_t *) state: The state to modify
** (gfx_map_mask_t) map: The GFX_MASK to set
@@ -224,8 +218,7 @@ gfxop_set_visible_map(gfx_state_t *state, gfx_map_mask_t map);
** 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(gfx_state_t *state, rect_t zone);
/* Sets a new clipping zone
** Parameters: (gfx_state_t *) state: The affected state
** (rect_t) zone: The new clipping zone
@@ -236,8 +229,7 @@ gfxop_set_clip_zone(gfx_state_t *state, rect_t zone);
/* Generic drawing operations */
/******************************/
-int
-gfxop_draw_line(gfx_state_t *state,
+int gfxop_draw_line(gfx_state_t *state,
Common::Point start, Common::Point end,
gfx_color_t color, gfx_line_mode_t line_mode,
gfx_line_style_t line_style);
@@ -251,8 +243,7 @@ gfxop_draw_line(gfx_state_t *state,
** 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(gfx_state_t *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
@@ -264,8 +255,7 @@ gfxop_draw_rectangle(gfx_state_t *state, rect_t rect, gfx_color_t color, gfx_lin
** 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(gfx_state_t *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
@@ -278,8 +268,7 @@ gfxop_draw_box(gfx_state_t *state, rect_t box, gfx_color_t color1, gfx_color_t c
** 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(gfx_state_t *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
** (rect_t) box: The box to fill
@@ -288,8 +277,7 @@ gfxop_fill_box(gfx_state_t *state, rect_t box, gfx_color_t color);
** 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(gfx_state_t *state, rect_t box);
/* Copies a box from the static buffer to the back buffer
** Parameters: (gfx_state_t *) state: The affected state
** (rect_t) box: The box to propagate from the static buffer
@@ -297,8 +285,7 @@ gfxop_clear_box(gfx_state_t *state, rect_t box);
*/
-int
-gfxop_update(gfx_state_t *state);
+int gfxop_update(gfx_state_t *state);
/* Updates all dirty rectangles
** Parameters: (gfx_state_t) *state: The relevant state
** Returns : (int) GFX_OK or GFX_FATAL if reported by the driver
@@ -308,8 +295,7 @@ gfxop_update(gfx_state_t *state);
*/
-int
-gfxop_update_box(gfx_state_t *state, rect_t box);
+int gfxop_update_box(gfx_state_t *state, rect_t box);
/* Propagates a box from the back buffer to the front (visible) buffer
** Parameters: (gfx_state_t *) state: The affected state
** (rect_t) box: The box to propagate to the front buffer
@@ -321,16 +307,14 @@ gfxop_update_box(gfx_state_t *state, rect_t box);
** been disabled explicitly.
*/
-int
-gfxop_enable_dirty_frames(gfx_state_t *state);
+int gfxop_enable_dirty_frames(gfx_state_t *state);
/* Enables dirty frame accounting
** Parameters: (gfx_state_t *) 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(gfx_state_t *state);
/* Disables dirty frame accounting
** Parameters: (gfx_state_t *) state: The state dirty frame accounting is to be disabled in
** Returns : (int) GFX_OK or GFX_ERROR if state was invalid
@@ -341,8 +325,7 @@ gfxop_disable_dirty_frames(gfx_state_t *state);
/* 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(gfx_state_t *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
@@ -367,8 +350,7 @@ gfxop_set_color(gfx_state_t *state, gfx_color_t *color, int r, int g, int b, int
** free that color.
*/
-int
-gfxop_set_system_color(gfx_state_t *state, gfx_color_t *color);
+int gfxop_set_system_color(gfx_state_t *state, gfx_color_t *color);
/* Designates a color as a 'system color'
** Parameters: (gfx_state_t *) state: The affected state
** (gfx_color_t *) color: The color to designate as a system color
@@ -377,8 +359,7 @@ gfxop_set_system_color(gfx_state_t *state, gfx_color_t *color);
** with caution.
*/
-int
-gfxop_free_color(gfx_state_t *state, gfx_color_t *color);
+int gfxop_free_color(gfx_state_t *state, gfx_color_t *color);
/* Frees a color allocated by gfxop_set_color()
** Parmaeters: (gfx_state_t *) state: The state affected
** (gfx_color_t *) color: The color to de-allocate
@@ -391,8 +372,7 @@ gfxop_free_color(gfx_state_t *state, gfx_color_t *color);
/* Pointer and IO ops */
/**********************/
-int
-gfxop_usleep(gfx_state_t *state, long usecs);
+int gfxop_usleep(gfx_state_t *state, long usecs);
/* Suspends program execution for the specified amount of microseconds
** Parameters: (gfx_state_t *) state: The state affected
** (long) usecs: The amount of microseconds to wait
@@ -400,8 +380,7 @@ gfxop_usleep(gfx_state_t *state, long usecs);
** 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(gfx_state_t *state, int nr);
/* Sets the mouse pointer to a cursor resource
** Parameters: (gfx_state_t *) state: The affected state
** (int) nr: Number of the cursor resource to use
@@ -411,8 +390,7 @@ gfxop_set_pointer_cursor(gfx_state_t *state, int nr);
** 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(gfx_state_t *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
** (int) nr: Number of the view resource to use
@@ -424,8 +402,7 @@ gfxop_set_pointer_view(gfx_state_t *state, int nr, int loop, int cel, Common::Po
** pointer.
*/
-int
-gfxop_set_pointer_position(gfx_state_t *state, Common::Point pos);
+int gfxop_set_pointer_position(gfx_state_t *state, Common::Point pos);
/* Teleports the mouse pointer to a specific position
** Parameters: (gfx_state_t *) state: The state the pointer is in
** (Common::Point) pos: The position to teleport it to
@@ -434,8 +411,7 @@ gfxop_set_pointer_position(gfx_state_t *state, Common::Point pos);
** any effect
*/
-sci_event_t
-gfxop_get_event(gfx_state_t *state, unsigned int mask);
+sci_event_t gfxop_get_event(gfx_state_t *state, unsigned int mask);
/* Retreives the next input event from the driver
** Parameters: (gfx_state_t *) state: The affected state
** (int) mask: The event mask to poll from (see uinput.h)
@@ -448,16 +424,14 @@ gfxop_get_event(gfx_state_t *state, unsigned int mask);
/* View operations */
/*******************/
-int
-gfxop_lookup_view_get_loops(gfx_state_t *state, int nr);
+int gfxop_lookup_view_get_loops(gfx_state_t *state, int nr);
/* Determines the number of loops associated with a view
** Parameters: (gfx_state_t *) 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(gfx_state_t *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
** (int) nr: Number of the view to look up in
@@ -467,8 +441,7 @@ gfxop_lookup_view_get_cels(gfx_state_t *state, int nr, int loop);
** 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(gfx_state_t *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
** (int) nr: Number of the view to use
@@ -481,8 +454,7 @@ gfxop_check_cel(gfx_state_t *state, int nr, int *loop, int *cel);
** view configuration.
*/
-int
-gfxop_overflow_cel(gfx_state_t *state, int nr, int *loop, int *cel);
+int gfxop_overflow_cel(gfx_state_t *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
** (int) nr: Number of the view to use
@@ -495,8 +467,7 @@ gfxop_overflow_cel(gfx_state_t *state, int nr, int *loop, int *cel);
** view configuration.
*/
-int
-gfxop_get_cel_parameters(gfx_state_t *state, int nr, int loop, int cel,
+int gfxop_get_cel_parameters(gfx_state_t *state, int nr, int loop, int cel,
int *width, int *height, Common::Point *offset);
/* Retreives the width and height of a cel
** Parameters: (gfx_state_t *) state: The state to use
@@ -510,8 +481,7 @@ gfxop_get_cel_parameters(gfx_state_t *state, int nr, int loop, int cel,
** combination was invalid
*/
-int
-gfxop_draw_cel(gfx_state_t *state, int nr, int loop, int cel, Common::Point pos,
+int gfxop_draw_cel(gfx_state_t *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
@@ -525,8 +495,7 @@ gfxop_draw_cel(gfx_state_t *state, int nr, int loop, int cel, Common::Point pos,
*/
-int
-gfxop_draw_cel_static(gfx_state_t *state, int nr, int loop, int cel, Common::Point pos,
+int gfxop_draw_cel_static(gfx_state_t *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
@@ -541,8 +510,7 @@ gfxop_draw_cel_static(gfx_state_t *state, int nr, int loop, int cel, Common::Poi
*/
-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(gfx_state_t *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
@@ -562,8 +530,7 @@ gfxop_draw_cel_static_clipped(gfx_state_t *state, int nr, int loop, int cel, Com
/******************/
/* 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(gfx_state_t *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
** (int) nr: Number of the pic to draw
@@ -574,8 +541,7 @@ gfxop_new_pic(gfx_state_t *state, int nr, int flags, int default_palette);
** See the resource manager tag functions for a full description.
*/
-void *
-gfxop_get_pic_metainfo(gfx_state_t *state);
+void *gfxop_get_pic_metainfo(gfx_state_t *state);
/* Retreives all meta-information assigned to the current pic
** Parameters: (gfx_state_t *) state: The state affected
** Returns : (void *) NULL if the pic doesn't exist or has no meta-information,
@@ -583,8 +549,7 @@ gfxop_get_pic_metainfo(gfx_state_t *state);
** 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(gfx_state_t *state, int nr, int flags, int default_palette);
/* Adds a pic to the static buffer
** Parameters: (gfx_state_t *) state: The state affected
** (int) nr: Number of the pic to add
@@ -601,16 +566,14 @@ gfxop_add_to_pic(gfx_state_t *state, int nr, int flags, int default_palette);
/*******************/
-int
-gfxop_get_font_height(gfx_state_t *state, int font_nr);
+int gfxop_get_font_height(gfx_state_t *state, int font_nr);
/* Returns the fixed line height for one specified font
** Parameters: (gfx_state_t *) 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(gfx_state_t *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
@@ -628,8 +591,7 @@ gfxop_get_text_params(gfx_state_t *state, int font_nr, const char *text,
** 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(gfx_state_t *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);
@@ -651,16 +613,14 @@ gfxop_new_text(gfx_state_t *state, int font_nr, char *text, int maxwidth,
** incorrect colors.
*/
-int
-gfxop_free_text(gfx_state_t *state, gfx_text_handle_t *handle);
+int gfxop_free_text(gfx_state_t *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
** (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(gfx_state_t *state, gfx_text_handle_t *handle, rect_t zone);
/* Draws text stored in a text handle
** Parameters: (gfx_state_t *) state: The target state
** (gfx_text_handle_t *) handle: The text handle to use for drawing
@@ -675,8 +635,7 @@ gfxop_draw_text(gfx_state_t *state, gfx_text_handle_t *handle, rect_t zone);
/* Manual pixmap operations */
/****************************/
-gfx_pixmap_t *
-gfxop_grab_pixmap(gfx_state_t *state, rect_t area);
+gfx_pixmap_t *gfxop_grab_pixmap(gfx_state_t *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
** (rect_t) area: The area to grab
@@ -684,8 +643,7 @@ gfxop_grab_pixmap(gfx_state_t *state, rect_t area);
** 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(gfx_state_t *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
** (gfx_pixmap_t *) pxm: The pixmap to draw
@@ -694,8 +652,7 @@ gfxop_draw_pixmap(gfx_state_t *state, gfx_pixmap_t *pxm, rect_t zone, Common::Po
** Returns : (int) GFX_OK or any error code
*/
-int
-gfxop_free_pixmap(gfx_state_t *state, gfx_pixmap_t *pxm);
+int gfxop_free_pixmap(gfx_state_t *state, gfx_pixmap_t *pxm);
/* Frees a pixmap returned by gfxop_grab_pixmap()
** Parameters: (gfx_state_t *) state: The affected state
** (gfx_pixmap_t *) pxm: The pixmap to free
@@ -706,8 +663,7 @@ gfxop_free_pixmap(gfx_state_t *state, gfx_pixmap_t *pxm);
/* Dirty rectangle operations */
/******************************/
-gfx_dirty_rect_t *
-gfxdr_add_dirty(gfx_dirty_rect_t *base, rect_t box, int strategy);
+gfx_dirty_rect_t *gfxdr_add_dirty(gfx_dirty_rect_t *base, rect_t box, int strategy);
/* Adds a dirty rectangle to 'base' according to a strategy
** Parameters: (gfx_dirty_rect_t *) base: The base rectangle to add to, or NULL
** (rect_t) box: The dirty frame to add
@@ -716,8 +672,7 @@ gfxdr_add_dirty(gfx_dirty_rect_t *base, rect_t box, int strategy);
** result cluster
*/
-int
-_gfxop_clip(rect_t *rect, rect_t clipzone);
+int _gfxop_clip(rect_t *rect, rect_t clipzone);
/* Clips a rectangle against another one
** Parameters: (rect_t *) rect: The rectangle to clip
** (rect_t) clipzone: The outer bounds rect must be in
@@ -726,4 +681,4 @@ _gfxop_clip(rect_t *rect, rect_t clipzone);
} // End of namespace Sci
-#endif /* !_GFX_OPERATIONS_H_ */
+#endif // !_GFX_OPERATIONS_H_