diff options
author | Paweł Kołodziejski | 2009-02-21 16:08:04 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2009-02-21 16:08:04 +0000 |
commit | 1ee65390cd634ba9b432843f11d51cdff0401320 (patch) | |
tree | 1dfb39378a6c5b6e6b2c261e3b7420958ec142ee /engines/sci/include | |
parent | 709d98be7c1d800c9102a28dee937670521f206f (diff) | |
download | scummvm-rg350-1ee65390cd634ba9b432843f11d51cdff0401320.tar.gz scummvm-rg350-1ee65390cd634ba9b432843f11d51cdff0401320.tar.bz2 scummvm-rg350-1ee65390cd634ba9b432843f11d51cdff0401320.zip |
formating
svn-id: r38705
Diffstat (limited to 'engines/sci/include')
32 files changed, 335 insertions, 675 deletions
diff --git a/engines/sci/include/aatree.h b/engines/sci/include/aatree.h index 6d84f62062..f40c9e0935 100644 --- a/engines/sci/include/aatree.h +++ b/engines/sci/include/aatree.h @@ -35,9 +35,9 @@ namespace Sci { typedef struct aatree aatree_t; -/* Left child */ +// Left child #define AATREE_WALK_LEFT 0 -/* Right child */ +// Right child #define AATREE_WALK_RIGHT 1 aatree_t *aatree_new(); @@ -84,4 +84,4 @@ void *aatree_get_data(aatree_t *t); } // End of namespace Sci -#endif /* !_SCI_AATREE_H */ +#endif // !_SCI_AATREE_H diff --git a/engines/sci/include/console.h b/engines/sci/include/console.h index 4bba2edc23..a12cfcdf2a 100644 --- a/engines/sci/include/console.h +++ b/engines/sci/include/console.h @@ -69,8 +69,7 @@ extern struct EngineState *con_gamestate; /*** FUNCTION DEFINITIONS ***/ -void -con_set_string_callback(void(*callback)(char *)); +void con_set_string_callback(void(*callback)(char *)); /* Sets the console string callback ** Parameters: (void -> char *) callback: The closure to invoke after ** a string for sciprintf() has been generated @@ -78,8 +77,7 @@ con_set_string_callback(void(*callback)(char *)); ** is used. */ -void -con_set_pixmap_callback(void(*callback)(gfx_pixmap_t *)); +void con_set_pixmap_callback(void(*callback)(gfx_pixmap_t *)); /* Sets the console pixmap callback ** Parameters: (void -> gfx_pixmap_t *) callback: The closure to invoke after ** a pixmap has been provided to be @@ -88,8 +86,7 @@ con_set_pixmap_callback(void(*callback)(gfx_pixmap_t *)); ** is used. */ -void -con_init(void); +void con_init(); /* Initializes the command parser ** Parameters: (void) ** Returns : (void) @@ -98,8 +95,7 @@ con_init(void); */ -void -con_parse(EngineState *s, const char *command); +void con_parse(EngineState *s, const char *command); /* Parses a command and summons appropriate facilities to handle it ** Parameters: (EngineState *) s: The EngineState to use ** command: The command to execute @@ -107,8 +103,7 @@ con_parse(EngineState *s, const char *command); */ -int -con_hook_command(int command(EngineState *s), const char *name, const char *param, const char *description); +int con_hook_command(int command(EngineState *s), const char *name, const char *param, const char *description); /* Adds a command to the parser's command list ** Parameters: command: The command to add ** name: The command's name @@ -144,8 +139,7 @@ con_hook_command(int command(EngineState *s), const char *name, const char *para ** as no element beyond strlen(cmd_params[x].str)+1 is accessed. */ -cmd_param_t -con_getopt(char *opt); +cmd_param_t con_getopt(char *opt); /* Retreives the specified optional parameter ** -- for use within console functions only -- ** Parameters: (char *) opt: The optional parameter to retrieve @@ -153,22 +147,19 @@ con_getopt(char *opt); ** Should only be used if con_hasopt() reports its presence. */ -int -con_hasopt(char *opt); +int con_hasopt(char *opt); /* Checks whether an optional parameter was specified ** -- for use within console functions only -- ** Parameters: (char *) opt: The optional parameter to check for ** Returns : (int) non-zero iff the parameter was specified */ -int -con_can_handle_pixmaps(void); +int con_can_handle_pixmaps(); /* Determines whether the console supports pixmap inserts ** Returns : (int) non-zero iff pixmap inserts are supported */ -int -con_insert_pixmap(gfx_pixmap_t *pixmap); +int con_insert_pixmap(gfx_pixmap_t *pixmap); /* Inserts a pixmap into the console history buffer ** Parameters: (gfx_pixmap_t *) pixmap: The pixmap to insert ** Returns : (int) 0 on success, non-zero if no receiver for @@ -178,16 +169,14 @@ con_insert_pixmap(gfx_pixmap_t *pixmap); ** If the pixmap could not be inserted, the called must destroy it */ -int -con_hook_page(const char *topic, const char *body); +int con_hook_page(const char *topic, const char *body); /* Hooks a general information page to the manual page system ** Parameters: (const char *) topic: The topic name ** (const char *) body: The text body to assign to the topic ** Returns : (int) 0 on success */ -int -con_hook_int(int *pointer, const char *name, const char *description); +int con_hook_int(int *pointer, const char *name, const char *description); /* Adds an int to the list of modifyable ints. ** Parameters: pointer: Pointer to the int to add to the list ** name: Name for this value @@ -198,46 +187,39 @@ con_hook_int(int *pointer, const char *name, const char *description); */ -void -con_gfx_init(void); +void con_gfx_init(); /* Initializes the gfx console */ -void -con_gfx_show(gfx_state_t *state); +void con_gfx_show(gfx_state_t *state); /* Enters on-screen console mode ** Parameters: (gfx_state_t *state): The graphics state to use for interaction ** Returns : (void) */ -char * -con_gfx_read(gfx_state_t *state); +char *con_gfx_read(gfx_state_t *state); /* Reads a single line from the on-screen console, if it is open ** Parameters: (gfx_state_t *state): The graphics state to use for interaction ** Returns : (char *) The input, in a static buffer */ -void -con_gfx_hide(gfx_state_t *stae); +void con_gfx_hide(gfx_state_t *stae); /* Closes the on-screen console ** Parameters: (gfx_state_t *state): The graphics state to use for interaction ** Returns : (void) */ -int -sci_hexdump(byte *data, int length, int offsetplus); +int sci_hexdump(byte *data, int length, int offsetplus); -void -open_console_file(char *filename); +void open_console_file(char *filename); /* Opens the file to which the console output is echoed. If a file was opened ** before, closes it. ** Parameters: filename - name of the file ** Returns : (void) */ -void -close_console_file(void); +void close_console_file(); /* Closes the console output file. ** Parameters: (void) ** Returns : (void) diff --git a/engines/sci/include/engine.h b/engines/sci/include/engine.h index 44204e7c90..b4fbc62817 100644 --- a/engines/sci/include/engine.h +++ b/engines/sci/include/engine.h @@ -306,7 +306,7 @@ gfx_pixmap_color_t *get_pic_color(EngineState *s, int color); ** Returns : (gfx_pixmap_color_t *) The requested color. */ -void other_libs_exit(void); +void other_libs_exit(); /* Called directly before FreeSCI ends to allow libraries to clean up */ @@ -319,4 +319,4 @@ static inline reg_t not_register(EngineState *s, reg_t r) { } // End of namespace Sci -#endif /* !_SCI_ENGINE_H */ +#endif // !_SCI_ENGINE_H diff --git a/engines/sci/include/gfx_driver.h b/engines/sci/include/gfx_driver.h index 8319c6ee14..21355eec6b 100644 --- a/engines/sci/include/gfx_driver.h +++ b/engines/sci/include/gfx_driver.h @@ -319,4 +319,4 @@ typedef struct _gfx_driver { /* Graphics driver */ } // End of namespace Sci -#endif /* !_SCI_GFX_DRIVER_H_ */ +#endif // !_SCI_GFX_DRIVER_H_ 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_ diff --git a/engines/sci/include/gfx_options.h b/engines/sci/include/gfx_options.h index c2586b0566..45c5efdd5c 100644 --- a/engines/sci/include/gfx_options.h +++ b/engines/sci/include/gfx_options.h @@ -79,9 +79,9 @@ typedef struct _gfx_options { } gfx_options_t; /* SQ3 counts whitespaces towards the total text size, as does gfxop_get_text_params() if this is set: */ -#define GFX_WORKAROUND_WHITESPACE_COUNT (1<<0) +#define GFX_WORKAROUND_WHITESPACE_COUNT (1 << 0) } // End of namespace Sci -#endif /* !_GFX_OPTIONS_H_ */ +#endif // !_GFX_OPTIONS_H_ diff --git a/engines/sci/include/gfx_res_options.h b/engines/sci/include/gfx_res_options.h index 774243bbaf..7882cc9322 100644 --- a/engines/sci/include/gfx_res_options.h +++ b/engines/sci/include/gfx_res_options.h @@ -94,8 +94,7 @@ typedef struct { struct _gfx_options; -int -gfx_get_res_config(struct _gfx_options *options, +int gfx_get_res_config(struct _gfx_options *options, gfx_pixmap_t *pxm); /* Configures a graphical pixmap according to config options ** Parameters: (gfx_options_t *) options: The options according to which diff --git a/engines/sci/include/gfx_resmgr.h b/engines/sci/include/gfx_resmgr.h index 0a53ecc7b4..7794800db8 100644 --- a/engines/sci/include/gfx_resmgr.h +++ b/engines/sci/include/gfx_resmgr.h @@ -95,8 +95,7 @@ typedef struct { -gfx_resstate_t * -gfxr_new_resource_manager(int version, struct _gfx_options *options, +gfx_resstate_t *gfxr_new_resource_manager(int version, struct _gfx_options *options, gfx_driver_t *driver, void *misc_payload); /* Allocates and initializes a new resource manager ** Parameters: (int) version: Interpreter version @@ -109,8 +108,7 @@ gfxr_new_resource_manager(int version, struct _gfx_options *options, ** The options are considered to be read-only, as they belong to the overlying state object. */ -void -gfxr_free_resource_manager(gfx_driver_t *driver, gfx_resstate_t *state); +void gfxr_free_resource_manager(gfx_driver_t *driver, gfx_resstate_t *state); /* Frees a previously allocated resource manager, and all allocated resources. ** Parameters: (gfx_driver_t *) driver: The graphics driver; used to free pixmaps that ** are installed in a driver-specific registry @@ -118,8 +116,7 @@ gfxr_free_resource_manager(gfx_driver_t *driver, gfx_resstate_t *state); ** Return : (void) */ -void -gfxr_free_all_resources(gfx_driver_t *driver, gfx_resstate_t *state); +void gfxr_free_all_resources(gfx_driver_t *driver, gfx_resstate_t *state); /* Frees all resources currently allocated ** Parameter: (gfx_driver_t *) driver: The driver to free with ** (gfx_resstate_t *) state: The state to do this on @@ -127,16 +124,14 @@ gfxr_free_all_resources(gfx_driver_t *driver, gfx_resstate_t *state); ** This function is intended to be used primarily for debugging. */ -void -gfxr_tag_resources(gfx_resstate_t *state); +void gfxr_tag_resources(gfx_resstate_t *state); /* 'Tags' all resources for deletion ** Paramters: (gfx_resstate_t *) state: The resource state to modify ** Returns : (void) ** Tagged resources are untagged if they are referenced. */ -void -gfxr_free_tagged_resources(gfx_driver_t *driver, gfx_resstate_t *state); +void gfxr_free_tagged_resources(gfx_driver_t *driver, gfx_resstate_t *state); /* Frees all tagged resources. ** Parameters: (gfx_driver_t *) driver: The graphics driver the pixmaps are potentially ** registered in @@ -149,8 +144,7 @@ gfxr_free_tagged_resources(gfx_driver_t *driver, gfx_resstate_t *state); */ -gfxr_pic_t * -gfxr_get_pic(gfx_resstate_t *state, int nr, int maps, int flags, +gfxr_pic_t *gfxr_get_pic(gfx_resstate_t *state, int nr, int maps, int flags, int default_palette, int scaled); /* Retreives a displayable (translated) pic resource ** Parameters: (gfx_resstate_t *) state: The resource state @@ -164,8 +158,7 @@ gfxr_get_pic(gfx_resstate_t *state, int nr, int maps, int flags, ** neccessarily translated) data. */ -gfxr_pic_t * -gfxr_add_to_pic(gfx_resstate_t *state, int old_nr, int new_nr, int maps, int flags, +gfxr_pic_t *gfxr_add_to_pic(gfx_resstate_t *state, int old_nr, int new_nr, int maps, int flags, int old_default_palette, int default_palette, int scaled); /* Retreives a displayable (translated) pic resource written ontop of an existing pic ** Parameters: (gfx_resstate_t *) state: The resource state @@ -183,8 +176,7 @@ gfxr_add_to_pic(gfx_resstate_t *state, int old_nr, int new_nr, int maps, int fla ** cause it to be removed from the cache and to be replaced by a clean version. */ -gfxr_view_t * -gfxr_get_view(gfx_resstate_t *state, int nr, int *loop, int *cel, int palette); +gfxr_view_t *gfxr_get_view(gfx_resstate_t *state, int nr, int *loop, int *cel, int palette); /* Retreives a translated view cel ** Parameters: (gfx_resstate_t *) state: The resource state ** (int) nr: The view number @@ -197,8 +189,7 @@ gfxr_get_view(gfx_resstate_t *state, int nr, int *loop, int *cel, int palette); ** loop and cel numbers have to be interpreted as 'maximum' or 'minimum' by the interpreter) */ -gfx_bitmap_font_t * -gfxr_get_font(gfx_resstate_t *state, int nr, int scaled); +gfx_bitmap_font_t *gfxr_get_font(gfx_resstate_t *state, int nr, int scaled); /* Retreives a font ** Parameters: (gfx_resstate_t *) state: The relevant resource state ** (int) nr: The font number @@ -206,16 +197,14 @@ gfxr_get_font(gfx_resstate_t *state, int nr, int scaled); ** Returns : (gfx_font_t *) The appropriate font, or NULL on error */ -gfx_pixmap_t * -gfxr_get_cursor(gfx_resstate_t *state, int nr); +gfx_pixmap_t *gfxr_get_cursor(gfx_resstate_t *state, int nr); /* Retreives an SCI0/SCI01 mouse cursor ** Parameters: (gfx_resstate_t *) state: The resource state ** (int) nr: The cursour number ** Returns : (gfx_font_t *) The approprate cursor as a pixmap, or NULL on error */ -gfx_pixmap_color_t * -gfxr_get_palette(gfx_resstate_t *state, int nr); +gfx_pixmap_color_t *gfxr_get_palette(gfx_resstate_t *state, int nr); /* Retreives a palette ** Parameters: (gfx_resstate_t *) state: The resource state ** (int) nr: The cursour number @@ -228,8 +217,7 @@ gfxr_get_palette(gfx_resstate_t *state, int nr); /* =========================== */ -int -gfxr_interpreter_options_hash(gfx_resource_type_t type, int version, +int gfxr_interpreter_options_hash(gfx_resource_type_t type, int version, struct _gfx_options *options, void *internal, int palette); /* Calculates a unique hash value for the specified options/type setup ** Parameters: (gfx_resource_type_t) type: The type the hash is to be generated for @@ -247,8 +235,7 @@ gfxr_interpreter_options_hash(gfx_resource_type_t type, int version, ** (Yes, this isn't really a "hash" in the traditional sense...) */ -int * -gfxr_interpreter_get_resources(gfx_resstate_t *state, gfx_resource_type_t type, +int *gfxr_interpreter_get_resources(gfx_resstate_t *state, gfx_resource_type_t type, int version, int *entries_nr, void *internal); /* Retreives all resources of a specified type that are available from the interpreter ** Parameters: (gfx_resstate_t *) state: The relevant resource state @@ -262,8 +249,7 @@ gfxr_interpreter_get_resources(gfx_resstate_t *state, gfx_resource_type_t type, ** The returned structure (if non-zero) must be freed by the querying code (the resource manager). */ -gfxr_pic_t * -gfxr_interpreter_init_pic(int version, gfx_mode_t *mode, int ID, void *internal); +gfxr_pic_t *gfxr_interpreter_init_pic(int version, gfx_mode_t *mode, int ID, void *internal); /* Initializes a pic ** Parameters: (int) version: Interpreter version to use ** (gfx_mode_t *) mode: The graphics mode the pic will be using @@ -274,8 +260,7 @@ gfxr_interpreter_init_pic(int version, gfx_mode_t *mode, int ID, void *internal) ** Must remember to initialize 'internal' to NULL or a malloc()'d area. */ -void -gfxr_interpreter_clear_pic(int version, gfxr_pic_t *pic, void *internal); +void gfxr_interpreter_clear_pic(int version, gfxr_pic_t *pic, void *internal); /* Clears a previously allocated pic ** Parameters: (int) version: Interpreter version ** (gfxr_pic_t *) pic: The pic to clear @@ -284,8 +269,7 @@ gfxr_interpreter_clear_pic(int version, gfxr_pic_t *pic, void *internal); ** This function is called in preparation for the pic to be drawn with gfxr_interpreter_calculate_pic. */ -int -gfxr_interpreter_calculate_pic(gfx_resstate_t *state, gfxr_pic_t *scaled_pic, gfxr_pic_t *unscaled_pic, +int gfxr_interpreter_calculate_pic(gfx_resstate_t *state, gfxr_pic_t *scaled_pic, gfxr_pic_t *unscaled_pic, int flags, int default_palette, int nr, void *internal); /* Instructs the interpreter-specific code to calculate a picture ** Parameters: (gfx_resstate_t *) state: The resource state, containing options and version information @@ -299,8 +283,7 @@ gfxr_interpreter_calculate_pic(gfx_resstate_t *state, gfxr_pic_t *scaled_pic, gf ** Returns : (int) GFX_ERROR if the resource could not be found, GFX_OK otherwise */ -gfxr_view_t * -gfxr_interpreter_get_view(gfx_resstate_t *state, int nr, void *internal, int palette); +gfxr_view_t *gfxr_interpreter_get_view(gfx_resstate_t *state, int nr, void *internal, int palette); /* Instructs the interpreter-specific code to calculate a view ** Parameters: (gfx_resstate_t *) state: The resource manager state ** (int) nr: The view resource number @@ -308,8 +291,7 @@ gfxr_interpreter_get_view(gfx_resstate_t *state, int nr, void *internal, int pal ** Returns : (gfx_view_t *) The appropriate view, or NULL on error */ -gfx_bitmap_font_t * -gfxr_interpreter_get_font(gfx_resstate_t *state, int nr, void *internal); +gfx_bitmap_font_t *gfxr_interpreter_get_font(gfx_resstate_t *state, int nr, void *internal); /* Instructs the interpreter-specific code to calculate a font ** Parameters: (gfx_resstate_t *) state: The resource manager state ** (int) nr: The font resource number @@ -317,8 +299,7 @@ gfxr_interpreter_get_font(gfx_resstate_t *state, int nr, void *internal); ** Returns : (gfx_font_t *) The newly calculated font, or NULL on error */ -gfx_pixmap_t * -gfxr_interpreter_get_cursor(gfx_resstate_t *state, int nr, void *internal); +gfx_pixmap_t *gfxr_interpreter_get_cursor(gfx_resstate_t *state, int nr, void *internal); /* Instructs the interpreter-specific code to calculate a cursor ** Paramaters: (gfx_resstate_t *) state: The resource manager state ** (int nr): The cursor resource number @@ -326,8 +307,7 @@ gfxr_interpreter_get_cursor(gfx_resstate_t *state, int nr, void *internal); ** Returns : (gfx_pixmap_t *) The cursor pixmap, or NULL on error */ -gfx_pixmap_color_t * -gfxr_interpreter_get_static_palette(gfx_resstate_t *state, int version, int *colors_nr, void *internal); +gfx_pixmap_color_t *gfxr_interpreter_get_static_palette(gfx_resstate_t *state, int version, int *colors_nr, void *internal); /* Retreives the static palette from the interpreter-specific code ** Parameters: (int) version: Interpreter version to use ** (int *) colors_nr: Number of colors to use @@ -336,8 +316,7 @@ gfxr_interpreter_get_static_palette(gfx_resstate_t *state, int version, int *col ** if a static palette must be used, NULL otherwise */ -gfx_pixmap_color_t * -gfxr_interpreter_get_palette(gfx_resstate_t *state, int version, int *colors_nr, void *internal, int nr); +gfx_pixmap_color_t *gfxr_interpreter_get_palette(gfx_resstate_t *state, int version, int *colors_nr, void *internal, int nr); /* Retreives the static palette from the interpreter-specific code ** Parameters: (int) version: Interpreter version to use ** (int *) colors_nr: Number of colors to use @@ -346,8 +325,7 @@ gfxr_interpreter_get_palette(gfx_resstate_t *state, int version, int *colors_nr, ** if a static palette must be used, NULL otherwise */ -int -gfxr_interpreter_needs_multicolored_pointers(int version, void *internal); +int gfxr_interpreter_needs_multicolored_pointers(int version, void *internal); /* Determines whether support for pointers with more than two colors is required ** Parameters: (int) version: Interpreter version to test for ** (void *) internal: Internal information provided by the interpreter diff --git a/engines/sci/include/gfx_resource.h b/engines/sci/include/gfx_resource.h index eb2ead54b2..d83e06b9c5 100644 --- a/engines/sci/include/gfx_resource.h +++ b/engines/sci/include/gfx_resource.h @@ -134,15 +134,13 @@ typedef struct { */ extern gfx_mode_t mode_1x1_color_index; -void -gfxr_init_static_palette(void); +void gfxr_init_static_palette(); /* Initializes the static 256 color palette ** Parameters: (void) ** Returns : (void) */ -gfxr_pic_t * -gfxr_init_pic(gfx_mode_t *mode, int ID, int sci1); +gfxr_pic_t *gfxr_init_pic(gfx_mode_t *mode, int ID, int sci1); /* Initializes a gfxr_pic_t for a specific mode ** Parameters: (gfx_mode_t *) mode: The specific graphics mode ** (int) ID: The ID to assign to the resulting pixmaps @@ -150,16 +148,14 @@ gfxr_init_pic(gfx_mode_t *mode, int ID, int sci1); ** This function allocates memory for use by resource drawer functions. */ -void -gfxr_free_pic(gfx_driver_t *driver, gfxr_pic_t *pic); +void gfxr_free_pic(gfx_driver_t *driver, gfxr_pic_t *pic); /* Uninitializes a pic resource ** Parameters: (gfx_driver_t *) driver: The driver the pic should be removed from ** (gfxr_pic_t *) pic: The pic to free ** Returns : (void) */ -void -gfxr_free_view(gfx_driver_t *driver, gfxr_view_t *view); +void gfxr_free_view(gfx_driver_t *driver, gfxr_view_t *view); /* Frees all memory associated with a view ** Paremeters: (gfx_driver_t *) driver: The driver the view should be removed from ** (gfxr_view_t *) view: The view to free @@ -181,8 +177,7 @@ gfxr_free_view(gfx_driver_t *driver, gfxr_view_t *view); #define GFXR_FONT_FLAG_EAT_TRAILING_LF (1<<2) -gfx_bitmap_font_t * -gfxr_read_font(int id, byte *resource, int size); +gfx_bitmap_font_t *gfxr_read_font(int id, byte *resource, int size); /* Geneartes a bitmap font data structure from a resource ** Parameters: (int) id: Resource ID of the resulting font ** (byte *) resource: Pointer to the resource data @@ -191,15 +186,13 @@ gfxr_read_font(int id, byte *resource, int size); ** NULL on error */ -void -gfxr_free_font(gfx_bitmap_font_t *font); +void gfxr_free_font(gfx_bitmap_font_t *font); /* Frees a previously allocated font structure ** Parameters: (gfx_bitmap_font_t *) font: The font to free ** Returns : (void) */ -gfx_bitmap_font_t * -gfxr_scale_font(gfx_bitmap_font_t *font, gfx_mode_t *mode, gfxr_font_scale_filter_t filter); +gfx_bitmap_font_t *gfxr_scale_font(gfx_bitmap_font_t *font, gfx_mode_t *mode, gfxr_font_scale_filter_t filter); /* Scales a font resource ** Parameters: (gfx_bitmap_font_t *) font: The font to scale ** (gfx_mode_t *) mode: The graphics mode to scale it for @@ -207,8 +200,7 @@ gfxr_scale_font(gfx_bitmap_font_t *font, gfx_mode_t *mode, gfxr_font_scale_filte ** Returns : (gfx_bitmap_font_t *) A scaled font, or NULL on error */ -text_fragment_t * -gfxr_font_calculate_size(gfx_bitmap_font_t *font, int max_width, const char *text, +text_fragment_t *gfxr_font_calculate_size(gfx_bitmap_font_t *font, int max_width, const char *text, int *width, int *height, int *lines, int *line_height, int *last_offset, int flags); @@ -228,8 +220,7 @@ gfxr_font_calculate_size(gfx_bitmap_font_t *font, int max_width, const char *tex ** This function assumes 320x200 mode. */ -gfx_pixmap_t * -gfxr_draw_font(gfx_bitmap_font_t *font, const char *text, int characters, +gfx_pixmap_t *gfxr_draw_font(gfx_bitmap_font_t *font, const char *text, int characters, gfx_pixmap_color_t *fg0, gfx_pixmap_color_t *fg1, gfx_pixmap_color_t *bg); /* Draws text in a specific font to a pixmap ** Parameters: (gfx_bitmap_font_t *) font: The font to use for drawing @@ -252,8 +243,7 @@ gfxr_draw_font(gfx_bitmap_font_t *font, const char *text, int characters, /*********************/ -void -gfxr_clear_pic0(gfxr_pic_t *pic, int sci_titlebar_size); +void gfxr_clear_pic0(gfxr_pic_t *pic, int sci_titlebar_size); /* Clears all pic buffers of one pic ** Parameters: (gfxr_pic_t) pic: The picture to clear ** (int) sci_titlebar_size: How much space to reserve for the title bar @@ -263,8 +253,7 @@ gfxr_clear_pic0(gfxr_pic_t *pic, int sci_titlebar_size); */ -void -gfxr_draw_pic01(gfxr_pic_t *pic, int fill_normally, int default_palette, +void gfxr_draw_pic01(gfxr_pic_t *pic, int fill_normally, int default_palette, int size, byte *resource, gfxr_pic0_params_t *style, int resid, int sci1, gfx_pixmap_color_t *static_pal, int static_pal_nr); /* Draws a pic resource (all formats prior to SCI1.1) @@ -285,8 +274,7 @@ gfxr_draw_pic01(gfxr_pic_t *pic, int fill_normally, int default_palette, ** Note that the picture will not be drawn dithered; use gfxr_dither_pic0 for that. */ -void -gfxr_draw_pic11(gfxr_pic_t *pic, int fill_normally, int default_palette, +void gfxr_draw_pic11(gfxr_pic_t *pic, int fill_normally, int default_palette, int size, byte *resource, gfxr_pic0_params_t *style, int resid, gfx_pixmap_color_t *static_pal, int static_pal_nr); /* Draws a pic resource (SCI1.1) @@ -306,8 +294,7 @@ gfxr_draw_pic11(gfxr_pic_t *pic, int fill_normally, int default_palette, ** Note that the picture will not be drawn dithered; use gfxr_dither_pic0 for that. */ -void -gfxr_remove_artifacts_pic0(gfxr_pic_t *dest, gfxr_pic_t *src); +void gfxr_remove_artifacts_pic0(gfxr_pic_t *dest, gfxr_pic_t *src); /* Removes artifacts from a scaled pic ** Parameters: (gfxr_pic_t *) dest: The scaled pic ** (gfxr_pic_t *) src: An unscaled pic @@ -317,8 +304,7 @@ gfxr_remove_artifacts_pic0(gfxr_pic_t *dest, gfxr_pic_t *src); ** called, because it operates on the index buffer. */ -void -gfxr_dither_pic0(gfxr_pic_t *pic, int mode, int pattern); +void gfxr_dither_pic0(gfxr_pic_t *pic, int mode, int pattern); /* Dithers a gfxr_visual_map ** Parameters: (gfxr_pic_t *) pic: The pic to dither ** (int) mode: One of GFXR_DITHER_MODE @@ -326,8 +312,7 @@ gfxr_dither_pic0(gfxr_pic_t *pic, int mode, int pattern); ** Returns : (void) */ -gfxr_view_t * -gfxr_draw_view0(int id, byte *resource, int size, int palette); +gfxr_view_t *gfxr_draw_view0(int id, byte *resource, int size, int palette); /* Calculates an SCI0 view ** Parameters: (int) id: Resource ID of the view ** (byte *) resource: Pointer to the resource to read @@ -336,8 +321,7 @@ gfxr_draw_view0(int id, byte *resource, int size, int palette); ** Returns : (gfxr_view_t *) The resulting view */ -gfx_pixmap_t * -gfxr_draw_cursor0(int id, byte *resource, int size); +gfx_pixmap_t *gfxr_draw_cursor0(int id, byte *resource, int size); /* Calculates an SCI0 cursor ** Parameters: (int) id: The cursor's resource ID ** (byte *) resource: Pointer to the resource data @@ -349,8 +333,7 @@ gfxr_draw_cursor0(int id, byte *resource, int size); /* SCI01 operations */ /**********************/ -gfx_pixmap_t * -gfxr_draw_cursor01(int id, byte *resource, int size); +gfx_pixmap_t *gfxr_draw_cursor01(int id, byte *resource, int size); /* Calculates an SCI01 cursor ** Parameters: (int) id: The cursor's resource ID ** (byte *) resource: Pointer to the resource data @@ -364,8 +347,7 @@ gfxr_draw_cursor01(int id, byte *resource, int size); /* SCI1 operations */ /*********************/ -gfx_pixmap_color_t * -gfxr_read_pal1(int id, int *colors_nr, byte *resource, int size); +gfx_pixmap_color_t *gfxr_read_pal1(int id, int *colors_nr, byte *resource, int size); /* Reads an SCI1 palette ** Parameters: (int) id: Resource ID for the palette (or the view it was found in) ** (int *) colors_nr: Pointer to the variable the number of colors @@ -375,8 +357,7 @@ gfxr_read_pal1(int id, int *colors_nr, byte *resource, int size); ** Returns : (gfx_pixmap_color_t *) *colors_nr color_t entries with the colors */ -gfx_pixmap_color_t * -gfxr_read_pal1_amiga(int *colors_nr, FILE *f); +gfx_pixmap_color_t *gfxr_read_pal1_amiga(int *colors_nr, FILE *f); /* Reads an SCI1 palette ** Parameters: (int *) colors_nr: Pointer to the variable the number of colors ** will be stored in @@ -384,8 +365,7 @@ gfxr_read_pal1_amiga(int *colors_nr, FILE *f); ** Returns : (gfx_pixmap_color_t *) *colors_nr color_t entries with the colors */ -gfx_pixmap_color_t * -gfxr_read_pal11(int id, int *colors_nr, byte *resource, int size); +gfx_pixmap_color_t *gfxr_read_pal11(int id, int *colors_nr, byte *resource, int size); /* Reads an SCI1.1 palette ** Parameters: (int) id: Resource ID for the palette (or the view it was found in) ** (int *) colors_nr: Pointer to the variable the number of colors @@ -395,8 +375,7 @@ gfxr_read_pal11(int id, int *colors_nr, byte *resource, int size); ** Returns : (gfx_pixmap_color_t *) *colors_nr color_t entries with the colors */ -gfxr_view_t * -gfxr_draw_view1(int id, byte *resource, int size, gfx_pixmap_color_t *static_pal, +gfxr_view_t *gfxr_draw_view1(int id, byte *resource, int size, gfx_pixmap_color_t *static_pal, int static_pal_nr); /* Calculates an SCI1 view ** Parameters: (int) id: Resource ID of the view @@ -407,12 +386,10 @@ gfxr_draw_view1(int id, byte *resource, int size, gfx_pixmap_color_t *static_pal ** Returns : (gfxr_view_t *) The resulting view */ -gfx_pixmap_t * -gfxr_draw_cel11(int id, int loop, int cel, int mirrored, byte *resource_base, byte *cel_base, int size, gfxr_view_t *view); +gfx_pixmap_t *gfxr_draw_cel11(int id, int loop, int cel, int mirrored, byte *resource_base, byte *cel_base, int size, gfxr_view_t *view); -gfx_pixmap_t * -gfxr_endianness_adjust(gfx_pixmap_t *pixmap, gfx_mode_t *mode); +gfx_pixmap_t *gfxr_endianness_adjust(gfx_pixmap_t *pixmap, gfx_mode_t *mode); /* Endianness-adjusts a pixmap, if neccessary ** Parameters: (gfx_pixmap_t *) pixmap: The pixmap to adjust ** (gfx_mode_t *) mode: The mode to adjust it for @@ -423,13 +400,11 @@ gfxr_endianness_adjust(gfx_pixmap_t *pixmap, gfx_mode_t *mode); */ -static inline int -get_uint_16(const byte *offset) { +static inline int get_uint_16(const byte *offset) { return ((unsigned int) offset[0] | (((unsigned int) offset[1]) << 8)); } -static inline int -get_int_16(const byte *offset) { +static inline int get_int_16(const byte *offset) { return ((int) offset[0] | (((int) offset[1]) << 8)); } diff --git a/engines/sci/include/gfx_system.h b/engines/sci/include/gfx_system.h index 9bd87ce46d..d3f7397043 100644 --- a/engines/sci/include/gfx_system.h +++ b/engines/sci/include/gfx_system.h @@ -137,8 +137,7 @@ typedef struct { /* rect_t: Rectangle description */ ** (int x int) xl, yl: Horizontal and vertical extension of the rectangle ** Returns : (rect_t) A rectangle matching the supplied parameters */ -static inline rect_t -gfx_rect(int x, int y, int xl, int yl) { +static inline rect_t gfx_rect(int x, int y, int xl, int yl) { rect_t rect; rect.x = x; @@ -157,10 +156,8 @@ gfx_rect(int x, int y, int xl, int yl) { ** Parameters: (rect_t x rect_t) a,b: The two rect_ts to check for overlap ** Returns : (int) 1 if they overlap, 0 otherwise */ -static inline int -gfx_rects_overlap(rect_t a, rect_t b) { - return (OVERLAP(a, b, x, xl) || OVERLAP(b, a, x, xl)) - && (OVERLAP(a, b, y, yl) || OVERLAP(b, a, y, yl)); +static inline int gfx_rects_overlap(rect_t a, rect_t b) { + return (OVERLAP(a, b, x, xl) || OVERLAP(b, a, x, xl)) && (OVERLAP(a, b, y, yl) || OVERLAP(b, a, y, yl)); } #undef OVERLAP @@ -185,8 +182,7 @@ else SUBMERGE_PARTIAL(b, a, z, zl) ** Parameters: (rect_t x rect_t) a,b: The two rects to merge ** Returns : (rect_t) The smallest rect containing both a and b */ -static inline rect_t -gfx_rects_merge(rect_t a, rect_t b) { +static inline rect_t gfx_rects_merge(rect_t a, rect_t b) { rect_t retval; MERGE_PARTIAL(x, xl); MERGE_PARTIAL(y, yl); @@ -200,11 +196,8 @@ gfx_rects_merge(rect_t a, rect_t b) { ** Parameters: (rect_t) a, b: The two rects to compare ** Returns : non-zero iff for each pixel p in a the following holds: p is in b. */ -static inline int -gfx_rect_subset(rect_t a, rect_t b) { - return ((a.x >= b.x) && (a.y >= b.y) - && ((a.x + a.xl) <= (b.x + b.xl)) - && ((a.y + a.yl) <= (b.y + b.yl))); +static inline int gfx_rect_subset(rect_t a, rect_t b) { + return ((a.x >= b.x) && (a.y >= b.y) && ((a.x + a.xl) <= (b.x + b.xl)) && ((a.y + a.yl) <= (b.y + b.yl))); } @@ -212,12 +205,8 @@ gfx_rect_subset(rect_t a, rect_t b) { ** Parameters: (rect_t) a, b ** Returns : (int) gfx_rect_subset(a,b) AND gfx_rect_subset(b,a) */ -static inline int -gfx_rect_equals(rect_t a, rect_t b) { - return (a.x == b.x - && a.xl == b.xl - && a.y == b.y - && a.yl == b.yl); +static inline int gfx_rect_equals(rect_t a, rect_t b) { + return (a.x == b.x && a.xl == b.xl && a.y == b.y && a.yl == b.yl); } @@ -229,8 +218,7 @@ extern rect_t gfx_rect_fullscreen; ** (Common::Point) offset: The offset to translate it by ** Returns : (rect_t) The translated rect */ -static inline rect_t -gfx_rect_translate(rect_t rect, Common::Point offset) { +static inline rect_t gfx_rect_translate(rect_t rect, Common::Point offset) { rect.x += offset.x; rect.y += offset.y; diff --git a/engines/sci/include/gfx_tools.h b/engines/sci/include/gfx_tools.h index dbbbb02347..09fdc3891d 100644 --- a/engines/sci/include/gfx_tools.h +++ b/engines/sci/include/gfx_tools.h @@ -50,8 +50,7 @@ extern int gfx_crossblit_alpha_threshold; /* Crossblitting functions use this va ** for distinguishing between transparent and opaque ** wrt alpha values */ -gfx_mode_t * -gfx_new_mode(int xfact, int yfact, int bytespp, unsigned int red_mask, unsigned int green_mask, +gfx_mode_t *gfx_new_mode(int xfact, int yfact, int bytespp, unsigned int red_mask, unsigned int green_mask, unsigned int blue_mask, unsigned int alpha_mask, int red_shift, int green_shift, int blue_shift, int alpha_shift, int palette, int flags); /* Allocates a new gfx_mode_t structure with the specified parameters @@ -71,8 +70,7 @@ gfx_new_mode(int xfact, int yfact, int bytespp, unsigned int red_mask, unsigned */ -void -gfx_clip_box_basic(rect_t *box, int maxx, int maxy); +void gfx_clip_box_basic(rect_t *box, int maxx, int maxy); /* Clips a rect_t ** Parameters: (rect_t *) box: Pointer to the box to clip ** (int x int) maxx, maxy: Maximum allowed width and height @@ -80,16 +78,14 @@ gfx_clip_box_basic(rect_t *box, int maxx, int maxy); */ -void -gfx_free_mode(gfx_mode_t *mode); +void gfx_free_mode(gfx_mode_t *mode); /* Frees all memory allocated by a mode structure ** Parameters: (gfx_mode_t *) mode: The mode to free ** Returns : (void) */ -gfx_pixmap_t * -gfx_new_pixmap(int xl, int yl, int resid, int loop, int cel); +gfx_pixmap_t *gfx_new_pixmap(int xl, int yl, int resid, int loop, int cel); /* Creates a new pixmap structure ** Parameters: (int x int) xl x yl: The dimensions (in SCI coordinates) of the pixmap ** (int) resid: The pixmap's resource ID, or GFX_RESID_NONE @@ -102,8 +98,7 @@ gfx_new_pixmap(int xl, int yl, int resid, int loop, int cel); ** index_scaled <- 0 */ -gfx_pixmap_t * -gfx_clone_pixmap(gfx_pixmap_t *pixmap, gfx_mode_t *mode); +gfx_pixmap_t *gfx_clone_pixmap(gfx_pixmap_t *pixmap, gfx_mode_t *mode); /* Clones a pixmap, minus its index data, palette and driver-specific handles ** Parameters: (gfx_pixmap_t *) pixmap: The pixmap to clone ** (gfx_mode_t *) mode: The mode to be applied to the pixmap @@ -111,45 +106,39 @@ gfx_clone_pixmap(gfx_pixmap_t *pixmap, gfx_mode_t *mode); */ -gfx_pixmap_t * -gfx_pixmap_alloc_index_data(gfx_pixmap_t *pixmap); +gfx_pixmap_t *gfx_pixmap_alloc_index_data(gfx_pixmap_t *pixmap); /* Allocates the index_data field of a pixmap ** Parameters: (gfx_pixmap_t *) pixmap: The pixmap to allocate for ** Returns : (gfx_pixmap_t *) pixmap */ -gfx_pixmap_t * -gfx_pixmap_free_index_data(gfx_pixmap_t *pixmap); +gfx_pixmap_t *gfx_pixmap_free_index_data(gfx_pixmap_t *pixmap); /* Frees the index_data field of a pixmap ** Parameters: (gfx_pixmap_t *) pixmap: The pixmap to modify ** Returns : (gfx_pixmap_t *) pixmap */ -gfx_pixmap_t * -gfx_pixmap_alloc_data(gfx_pixmap_t *pixmap, gfx_mode_t *mode); +gfx_pixmap_t *gfx_pixmap_alloc_data(gfx_pixmap_t *pixmap, gfx_mode_t *mode); /* Allocates the data field of a pixmap ** Parameters: (gfx_pixmap_t *) pixmap: The pixmap to allocate for ** (gfx_mode_t *) mode: The mode the memory is to be allocated for ** Returns : (gfx_pixmap_t *) pixmap */ -gfx_pixmap_t * -gfx_pixmap_free_data(gfx_pixmap_t *pixmap); +gfx_pixmap_t *gfx_pixmap_free_data(gfx_pixmap_t *pixmap); /* Frees the memory allocated for a pixmap's data field ** Parameters: (gfx_pixmap_t *) pixmap: The pixmap to modify ** Returns : (gfx_pixmap_t *) pixmap */ -void -gfx_free_pixmap(gfx_driver_t *driver, gfx_pixmap_t *pxm); +void gfx_free_pixmap(gfx_driver_t *driver, gfx_pixmap_t *pxm); /* Frees all memory associated with a pixmap ** Parameters: (gfx_driver_t *) driver: The driver the pixmap is to be removed from ** (gfx_pixmap_t *) pxm: The pixmap to free ** Returns : (void) */ -void -gfx_draw_line_pixmap_i(gfx_pixmap_t *pxm, Common::Point start, Common::Point end, int color); +void gfx_draw_line_pixmap_i(gfx_pixmap_t *pxm, Common::Point start, Common::Point end, int color); /* Draws a line to a pixmap's index data buffer ** Parameters: (gfx_pixmap_t *) pxm: The pixmap to draw to ** (Common::Point) start: Starting point of the line to draw @@ -160,8 +149,7 @@ gfx_draw_line_pixmap_i(gfx_pixmap_t *pxm, Common::Point start, Common::Point end ** The line is not clipped. Invalid x, y, x1, y1 values will result in memory corruption. */ -void -gfx_draw_line_buffer(byte *buffer, int linewidth, int pixelwidth, +void gfx_draw_line_buffer(byte *buffer, int linewidth, int pixelwidth, Common::Point start, Common::Point end, unsigned int color); /* Draws a line to a linear pixel buffer ** Parameters: (byte *) buffer: Pointer to the start of the buffer to draw to @@ -176,8 +164,7 @@ gfx_draw_line_buffer(byte *buffer, int linewidth, int pixelwidth, ** This function assumes 1 <= pixelwidth <= 4 */ -void -gfx_draw_box_pixmap_i(gfx_pixmap_t *pxm, rect_t box, int color); +void gfx_draw_box_pixmap_i(gfx_pixmap_t *pxm, rect_t box, int color); /* Draws a filled rectangular area to a pixmap's index buffer ** Parameters: (gfx_pixmap_t *) pxm: The pixmap to draw to ** (rect_t) box: The box to fill @@ -186,8 +173,7 @@ gfx_draw_box_pixmap_i(gfx_pixmap_t *pxm, rect_t box, int color); ** This function only draws to the index buffer. */ -void -gfx_copy_pixmap_box_i(gfx_pixmap_t *dest, gfx_pixmap_t *src, rect_t box); +void gfx_copy_pixmap_box_i(gfx_pixmap_t *dest, gfx_pixmap_t *src, rect_t box); /* Copies part of a pixmap to another pixmap, with clipping ** Parameters: (gfx_pixmap_t *) dest: The destination pixmap ** (gfx_pixmap_t *) src: The source pixmap @@ -195,8 +181,7 @@ gfx_copy_pixmap_box_i(gfx_pixmap_t *dest, gfx_pixmap_t *src, rect_t box); ** Returns : (void) */ -void -gfx_xlate_pixmap(gfx_pixmap_t *pxm, gfx_mode_t *mode, gfx_xlate_filter_t filter); +void gfx_xlate_pixmap(gfx_pixmap_t *pxm, gfx_mode_t *mode, gfx_xlate_filter_t filter); /* Translates a pixmap's index data to drawable graphics data ** Parameters: (gfx_pixmap_t *) pxm: The pixmap to translate ** (gfx_mode_t *) mode: The mode according which to scale @@ -204,8 +189,7 @@ gfx_xlate_pixmap(gfx_pixmap_t *pxm, gfx_mode_t *mode, gfx_xlate_filter_t filter) ** Returns : (void) */ -void -gfxr_antialiase(gfx_pixmap_t *pixmap, gfx_mode_t *mode, gfxr_antialiasing_t type); +void gfxr_antialiase(gfx_pixmap_t *pixmap, gfx_mode_t *mode, gfxr_antialiasing_t type); /* Performs antialiasing on a pixmap ** Parameters: (gfx_pixmap_t *) pixmap: The pixmap to antialiase ** (gfx_mode_t *) mode: The current mode @@ -217,8 +201,7 @@ gfxr_antialiase(gfx_pixmap_t *pixmap, gfx_mode_t *mode, gfxr_antialiasing_t type /* Means that the first byte in the visual data refers to the ** point corresponding to (dest.x, dest.y) */ -int -gfx_crossblit_pixmap(gfx_mode_t *mode, gfx_pixmap_t *pxm, int priority, +int gfx_crossblit_pixmap(gfx_mode_t *mode, gfx_pixmap_t *pxm, int priority, rect_t src_coords, rect_t dest_coords, byte *dest, int dest_line_width, byte *priority_dest, int priority_line_width, int priority_skip, @@ -246,8 +229,7 @@ gfx_crossblit_pixmap(gfx_mode_t *mode, gfx_pixmap_t *pxm, int priority, ** linear access. */ -int -gfx_alloc_color(gfx_palette_t *pal, gfx_pixmap_color_t *color); +int gfx_alloc_color(gfx_palette_t *pal, gfx_pixmap_color_t *color); /* Allocates a color entry for the specified pixmap color ** Parameters: (gfx_palette_t *) pal: The palette structure the color should be allocated in ** (gfx_pixmap_color_t *) color: The color to allocate @@ -256,16 +238,14 @@ gfx_alloc_color(gfx_palette_t *pal, gfx_pixmap_color_t *color); ** palette. */ -int -gfx_free_color(gfx_palette_t *pal, gfx_pixmap_color_t *color); +int gfx_free_color(gfx_palette_t *pal, gfx_pixmap_color_t *color); /* Frees the color entry allocated for the specified pixmap color ** Parameters: (gfx_palette_t *) pal: The palette structure the color was previously allocated in ** (gfx_pixmap_color_t *) color: The color to free ** Returns : (int) GFX_ERROR if any error occured, GFX_OK otherwise */ -gfx_pixmap_t * -gfx_pixmap_scale_index_data(gfx_pixmap_t *pixmap, gfx_mode_t *mode); +gfx_pixmap_t *gfx_pixmap_scale_index_data(gfx_pixmap_t *pixmap, gfx_mode_t *mode); /* Scales the index data associated with a pixmap ** Parameters: (gfx_pixmap_t *) pixmap: The pixmap whose index data should be scaled ** (gfx_mode_t *) mode: The mode to scale it to diff --git a/engines/sci/include/gfx_widgets.h b/engines/sci/include/gfx_widgets.h index 99e76c5994..9f365a9959 100644 --- a/engines/sci/include/gfx_widgets.h +++ b/engines/sci/include/gfx_widgets.h @@ -240,8 +240,7 @@ extern Common::Point gfxw_point_zero; /*-- Primitive types --*/ -gfxw_box_t * -gfxw_new_box(gfx_state_t *state, rect_t area, gfx_color_t color1, gfx_color_t color2, gfx_box_shade_t shade_type); +gfxw_box_t *gfxw_new_box(gfx_state_t *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 ** (rect_t) area: The box's dimensions, relative to its container widget @@ -252,8 +251,7 @@ gfxw_new_box(gfx_state_t *state, rect_t area, gfx_color_t color1, gfx_color_t co ** The graphics state- if non-NULL- is used here for some optimizations. */ -gfxw_primitive_t * -gfxw_new_rect(rect_t rect, gfx_color_t color, gfx_line_mode_t line_mode, gfx_line_style_t line_style); +gfxw_primitive_t *gfxw_new_rect(rect_t rect, gfx_color_t color, gfx_line_mode_t line_mode, gfx_line_style_t line_style); /* Creates a new rectangle ** Parameters: (rect_t) rect: The rectangle area ** (gfx_color_t) color: The rectangle's color @@ -262,8 +260,7 @@ gfxw_new_rect(rect_t rect, gfx_color_t color, gfx_line_mode_t line_mode, gfx_lin ** Returns : (gfxw_primitive_t *) The newly allocated rectangle widget (a Primitive) */ -gfxw_primitive_t * -gfxw_new_line(Common::Point start, Common::Point end, gfx_color_t color, gfx_line_mode_t line_mode, gfx_line_style_t line_style); +gfxw_primitive_t *gfxw_new_line(Common::Point start, Common::Point end, gfx_color_t color, gfx_line_mode_t line_mode, gfx_line_style_t line_style); /* Creates a new line ** Parameters: (Common::Point * Common::Point) (start, line): The line origin and end point ** (gfx_color_t) color: The line's color @@ -279,8 +276,7 @@ gfxw_new_line(Common::Point start, Common::Point end, gfx_color_t color, gfx_lin /* Whether the view should _not_ apply its x/y offset modifyers */ #define GFXW_VIEW_FLAG_DONT_MODIFY_OFFSET (1 << 1) -gfxw_view_t * -gfxw_new_view(gfx_state_t *state, Common::Point pos, int view, int loop, int cel, int palette, int priority, int control, +gfxw_view_t *gfxw_new_view(gfx_state_t *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 @@ -294,8 +290,7 @@ gfxw_new_view(gfx_state_t *state, Common::Point pos, int view, int loop, int cel ** Returns : (gfxw_cel_t *) A newly allocated cel according to the specs */ -gfxw_dyn_view_t * -gfxw_new_dyn_view(gfx_state_t *state, Common::Point pos, int z, int view, int loop, int cel, int palette, +gfxw_dyn_view_t *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, gfx_alignment_t halign, gfx_alignment_t valign, int sequence); /* Creates a new dyn view @@ -314,8 +309,7 @@ gfxw_new_dyn_view(gfx_state_t *state, Common::Point pos, int z, int view, int lo ** optimizations when they move or change shape. */ -gfxw_text_t * -gfxw_new_text(gfx_state_t *state, rect_t area, int font, const char *text, gfx_alignment_t halign, +gfxw_text_t *gfxw_new_text(gfx_state_t *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 @@ -332,8 +326,7 @@ gfxw_new_text(gfx_state_t *state, rect_t area, int font, const char *text, gfx_a ** Returns : (gfxw_text_t *) The resulting text widget */ -void -gfxw_text_info(gfx_state_t *state, gfxw_text_t *text, int *lines_nr, +void gfxw_text_info(gfx_state_t *state, gfxw_text_t *text, int *lines_nr, int *lineheight, int *offset); /* Determines text widget meta-information ** Parameters: (gfx_state_t *) state: The state to operate on @@ -344,8 +337,7 @@ gfxw_text_info(gfx_state_t *state, gfxw_text_t *text, int *lines_nr, ** last character in the last line */ -gfxw_widget_t * -gfxw_set_id(gfxw_widget_t *widget, int ID, int subID); +gfxw_widget_t *gfxw_set_id(gfxw_widget_t *widget, int ID, int subID); /* Sets a widget's ID ** Parmaeters: (gfxw_widget_t *) widget: The widget whose ID should be set ** (int x int) ID, subID: The ID to set @@ -355,8 +347,7 @@ gfxw_set_id(gfxw_widget_t *widget, int ID, int subID); ** This function handles widget = NULL gracefully (by doing nothing and returning NULL). */ -gfxw_widget_t * -gfxw_remove_id(gfxw_container_t *container, int ID, int subID); +gfxw_widget_t *gfxw_remove_id(gfxw_container_t *container, int ID, int subID); /* Finds a widget with a specific ID in a container and removes it from there ** Parameters: (gfxw_container_t *) container: The container to search in ** (int) ID: The ID to look for @@ -366,32 +357,28 @@ gfxw_remove_id(gfxw_container_t *container, int ID, int subID); */ -gfxw_dyn_view_t * -gfxw_dyn_view_set_params(gfxw_dyn_view_t *widget, int under_bits, void *under_bitsp, int signal, void *signalp); +gfxw_dyn_view_t *gfxw_dyn_view_set_params(gfxw_dyn_view_t *widget, int under_bits, void *under_bitsp, int signal, void *signalp); /* Initializes a dyn view's interpreter attributes ** Parameters: (gfxw_dyn_view_t *) widget: The widget affected ** (int x void * x int x void *) under_bits, inder_bitsp, signal, signalp: Interpreter-dependant data ** Returns : (gfxw_dyn_view_t *) widget */ -gfxw_widget_t * -gfxw_hide_widget(gfxw_widget_t *widget); +gfxw_widget_t *gfxw_hide_widget(gfxw_widget_t *widget); /* Makes a widget invisible without removing it from the list of widgets ** Parameters: (gfxw_widget_t *) widget: The widget to invisibilize ** Returns : (gfxw_widget_t *) widget ** Has no effect on invisible widgets */ -gfxw_widget_t * -gfxw_show_widget(gfxw_widget_t *widget); +gfxw_widget_t *gfxw_show_widget(gfxw_widget_t *widget); /* Makes an invisible widget reappear ** Parameters: (gfxw_widget_t *) widget: The widget to show again ** Returns : (gfxw_widget_t *) widget ** Does not affect visible widgets */ -gfxw_widget_t * -gfxw_abandon_widget(gfxw_widget_t *widget); +gfxw_widget_t *gfxw_abandon_widget(gfxw_widget_t *widget); /* Marks a widget as "abandoned" ** Parameters: (gfxw_widget_t *) widget: The widget to abandon ** Returns : (gfxw_widget_t *) widget @@ -402,8 +389,7 @@ gfxw_abandon_widget(gfxw_widget_t *widget); #define GFXW_LIST_UNSORTED 0 #define GFXW_LIST_SORTED 1 -gfxw_list_t * -gfxw_new_list(rect_t area, int sorted); +gfxw_list_t *gfxw_new_list(rect_t area, int sorted); /* Creates a new list widget ** Parameters: (rect_t) area: The area covered by the list (absolute position) ** (int) sorted: Whether the list should be a sorted list @@ -411,8 +397,7 @@ gfxw_new_list(rect_t area, int sorted); ** List widgets are also referred to as Display Lists. */ -gfxw_visual_t * -gfxw_new_visual(gfx_state_t *state, int font); +gfxw_visual_t *gfxw_new_visual(gfx_state_t *state, int font); /* Creates a new visual widget ** Parameters: (gfx_state_t *) state: The graphics state ** (int) font: The default font number for contained ports @@ -421,8 +406,7 @@ gfxw_new_visual(gfx_state_t *state, int font); */ -gfxw_port_t * -gfxw_new_port(gfxw_visual_t *visual, gfxw_port_t *predecessor, rect_t area, gfx_color_t fgcolor, gfx_color_t bgcolor); +gfxw_port_t *gfxw_new_port(gfxw_visual_t *visual, gfxw_port_t *predecessor, rect_t area, gfx_color_t fgcolor, gfx_color_t bgcolor); /* Creates a new port widget with the default settings ** Paramaters: (gfxw_visual_t *) visual: The visual the port is added to ** (gfxw_port_t *) predecessor: The port's predecessor @@ -435,8 +419,7 @@ gfxw_new_port(gfxw_visual_t *visual, gfxw_port_t *predecessor, rect_t area, gfx_ ** Ports are assigned implicit IDs identifying their position within the port stack. */ -gfxw_port_t * -gfxw_find_port(gfxw_visual_t *visual, int ID); +gfxw_port_t *gfxw_find_port(gfxw_visual_t *visual, int ID); /* Retrieves a port with the specified ID ** Parameters: (gfxw_visual_t *) visual: The visual the port is to be retrieved from ** (int) ID: The port's ID @@ -444,8 +427,7 @@ gfxw_find_port(gfxw_visual_t *visual, int ID); ** This function is O(1). */ -gfxw_port_t * -gfxw_find_default_port(gfxw_visual_t *visual); +gfxw_port_t *gfxw_find_default_port(gfxw_visual_t *visual); /* Retreives the default port from a visual ** Parameters: (gfxw_visual_t *) visual: The visual the port should be retrieved from ** Returns : (gfxw_port_t *) The default port, or NULL if no port is present @@ -453,8 +435,7 @@ gfxw_find_default_port(gfxw_visual_t *visual); ** or highest-ranking port. */ -void -gfxw_port_set_auto_restore(gfxw_visual_t *visual, gfxw_port_t *window, rect_t auto_rect); +void gfxw_port_set_auto_restore(gfxw_visual_t *visual, gfxw_port_t *window, rect_t auto_rect); /* Sets rectangle to be restored upon port removal ** Parameters: (state_t *) s: The state to operate on (gfxw_port_t *) window: The affected window @@ -462,24 +443,21 @@ gfxw_port_set_auto_restore(gfxw_visual_t *visual, gfxw_port_t *window, rect_t au ** Returns : (void) */ -gfxw_port_t * -gfxw_remove_port(gfxw_visual_t *visual, gfxw_port_t *port); +gfxw_port_t *gfxw_remove_port(gfxw_visual_t *visual, gfxw_port_t *port); /* Removes a port from a visual ** Parameters: (gfxw_visual_t *) visual: The visual the port should be removed from ** (gfxw_port_t *) port: The port to remove ** Returns : (gfxw_port_t *) port's parent port, or NULL if it had none */ -void -gfxw_remove_widget_from_container(gfxw_container_t *container, gfxw_widget_t *widget); +void gfxw_remove_widget_from_container(gfxw_container_t *container, gfxw_widget_t *widget); /* Removes the widget from the specified port ** Parameters: (gfxw_container_t *) container: The container it should be removed from ** (gfxw_widget_t *) widget: The widget to remove ** Returns : (void) */ -gfxw_snapshot_t * -gfxw_make_snapshot(gfxw_visual_t *visual, rect_t area); +gfxw_snapshot_t *gfxw_make_snapshot(gfxw_visual_t *visual, rect_t area); /* Makes a "snapshot" of a visual ** Parameters: (gfxw_visual_t *) visual: The visual a snapshot is to be taken of ** (rect_t) area: The area a snapshot should be taken of @@ -489,16 +467,14 @@ gfxw_make_snapshot(gfxw_visual_t *visual, rect_t area); ** This operation also increases the global serial number counter by one. */ -int -gfxw_widget_matches_snapshot(gfxw_snapshot_t *snapshot, gfxw_widget_t *widget); +int gfxw_widget_matches_snapshot(gfxw_snapshot_t *snapshot, gfxw_widget_t *widget); /* Predicate to test whether a widget would be destroyed by applying a snapshot ** Parameters: (gfxw_snapshot_t *) snapshot: The snapshot to test against ** (gfxw_widget_t *) widget: The widget to test ** Retunrrs : (int) An appropriate boolean value */ -gfxw_snapshot_t * -gfxw_restore_snapshot(gfxw_visual_t *visual, gfxw_snapshot_t *snapshot); +gfxw_snapshot_t *gfxw_restore_snapshot(gfxw_visual_t *visual, gfxw_snapshot_t *snapshot); /* Restores a snapshot to a visual ** Parameters: (gfxw_visual_t *) visual: The visual to operate on ** (gfxw_snapshot_t *) snapshot: The snapshot to restore @@ -507,8 +483,7 @@ gfxw_restore_snapshot(gfxw_visual_t *visual, gfxw_snapshot_t *snapshot); ** the snapshotted area are destroyed. */ -void -gfxw_annihilate(gfxw_widget_t *widget); +void gfxw_annihilate(gfxw_widget_t *widget); /* As widget->widfree(widget), but destroys all overlapping widgets ** Parameters: (gfxw_widget_t *) widget: The widget to use ** Returns : (void) @@ -516,16 +491,14 @@ gfxw_annihilate(gfxw_widget_t *widget); ** all widgets with a higher or equal priority drawn after this widget. */ -gfxw_dyn_view_t * -gfxw_picviewize_dynview(gfxw_dyn_view_t *dynview); +gfxw_dyn_view_t *gfxw_picviewize_dynview(gfxw_dyn_view_t *dynview); /* Turns a dynview into a picview ** Parameters: (gfxw_dyn_view_t *) dynview: The victim ** Returns : (gfxw_dyn_view_t *) The victim, after his transformation ** The only changes are in function and type variables, actually. */ -void -gfxw_port_auto_restore_background(gfxw_visual_t *visual, gfxw_port_t *window, rect_t auto_rect); +void gfxw_port_auto_restore_background(gfxw_visual_t *visual, gfxw_port_t *window, rect_t auto_rect); /* Tags a window widget as automatically restoring the visual background upon removal ** Parameters: (gfx_visual_t *) visual: The base visual ** (gfxw_port_t *) window: The window to tag @@ -534,17 +507,13 @@ gfxw_port_auto_restore_background(gfxw_visual_t *visual, gfxw_port_t *window, re */ -gfxw_port_t * -gfxw_get_chrono_port(gfxw_visual_t *visual, gfxw_list_t **temp_widgets_list, int flags); +gfxw_port_t *gfxw_get_chrono_port(gfxw_visual_t *visual, gfxw_list_t **temp_widgets_list, int flags); -void -gfxw_add_to_chrono(gfxw_visual_t *visual, gfxw_widget_t *widget); +void gfxw_add_to_chrono(gfxw_visual_t *visual, gfxw_widget_t *widget); -void -gfxw_widget_reparent_chrono(gfxw_visual_t *visual, gfxw_widget_t *view, gfxw_list_t *target); +void gfxw_widget_reparent_chrono(gfxw_visual_t *visual, gfxw_widget_t *view, gfxw_list_t *target); -void -gfxw_widget_kill_chrono(gfxw_visual_t *visual, int window); +void gfxw_widget_kill_chrono(gfxw_visual_t *visual, int window); } // End of namespace Sci diff --git a/engines/sci/include/heapmgr.h b/engines/sci/include/heapmgr.h index db72e41c95..dff2e9fc12 100644 --- a/engines/sci/include/heapmgr.h +++ b/engines/sci/include/heapmgr.h @@ -53,30 +53,23 @@ typedef struct { \ ENTRY##_entry_t *table; \ } ENTRY##_table_t; \ \ -void \ -init_##ENTRY##_table(ENTRY##_table_t *table); \ -int \ -alloc_##ENTRY##_entry(ENTRY##_table_t *table); \ -void \ -free_##ENTRY##_entry(ENTRY##_table_t *table, int index); +void init_##ENTRY##_table(ENTRY##_table_t *table); \ +int alloc_##ENTRY##_entry(ENTRY##_table_t *table); \ +void free_##ENTRY##_entry(ENTRY##_table_t *table, int index); #define DEFINE_HEAPENTRY_WITH_CLEANUP(ENTRY, INITIAL, INCREMENT, CLEANUP_FN) \ -void \ -init_##ENTRY##_table(ENTRY##_table_t *table) \ -{ \ +void init_##ENTRY##_table(ENTRY##_table_t *table) { \ table->entries_nr = INITIAL; \ table->max_entry = 0; \ table->entries_used = 0; \ table->first_free = HEAPENTRY_INVALID; \ - table->table = (ENTRY##_entry_t*)sci_malloc(sizeof(ENTRY##_entry_t) * INITIAL);\ + table->table = (ENTRY##_entry_t *)sci_malloc(sizeof(ENTRY##_entry_t) * INITIAL);\ memset(table->table, 0, sizeof(ENTRY##_entry_t) * INITIAL); \ } \ \ -void \ -free_##ENTRY##_entry(ENTRY##_table_t *table, int index) \ -{ \ +void free_##ENTRY##_entry(ENTRY##_table_t *table, int index) { \ ENTRY##_entry_t *e = table->table + index; \ \ if (index < 0 || index >= table->max_entry) { \ @@ -91,9 +84,7 @@ free_##ENTRY##_entry(ENTRY##_table_t *table, int index) \ table->entries_used--; \ } \ \ -int \ -alloc_##ENTRY##_entry(ENTRY##_table_t *table) \ -{ \ +int alloc_##ENTRY##_entry(ENTRY##_table_t *table) { \ table->entries_used++; \ if (table->first_free != HEAPENTRY_INVALID) { \ int oldff = table->first_free; \ @@ -106,13 +97,10 @@ alloc_##ENTRY##_entry(ENTRY##_table_t *table) \ table->entries_nr += INCREMENT; \ \ table->table = (ENTRY##_entry_t*)sci_realloc(table->table,\ - sizeof(ENTRY##_entry_t) \ - * table->entries_nr); \ - memset(&table->table[table->entries_nr-INCREMENT], \ - 0, INCREMENT*sizeof(ENTRY##_entry_t)); \ + sizeof(ENTRY##_entry_t) * table->entries_nr); \ + memset(&table->table[table->entries_nr-INCREMENT], 0, INCREMENT*sizeof(ENTRY##_entry_t)); \ } \ - table->table[table->max_entry].next_free = \ - table->max_entry; /* Tag as 'valid' */ \ + table->table[table->max_entry].next_free = table->max_entry; /* Tag as 'valid' */ \ return table->max_entry++; \ } \ } diff --git a/engines/sci/include/kernel.h b/engines/sci/include/kernel.h index 332e12fd9f..d28fe62250 100644 --- a/engines/sci/include/kernel.h +++ b/engines/sci/include/kernel.h @@ -86,14 +86,11 @@ typedef struct { reg_t read_selector(EngineState *s, reg_t object, selector_t selector_id, const char *fname, int line); -void write_selector(EngineState *s, reg_t object, selector_t selector_id, reg_t value, - const char *fname, int line); +void write_selector(EngineState *s, reg_t object, selector_t selector_id, reg_t value, const char *fname, int line); int invoke_selector(EngineState *s, reg_t object, int selector_id, int noinvalid, int kfunct, stack_ptr_t k_argp, int k_argc, const char *fname, int line, int argc, ...); - - /******************** Text functionality ********************/ char *kernel_lookup_text(EngineState *s, reg_t address, int index); /* Looks up text referenced by scripts @@ -108,7 +105,6 @@ char *kernel_lookup_text(EngineState *s, reg_t address, int index); */ - /******************** Debug functionality ********************/ #define KERNEL_OOPS(reason) kernel_oops(s, __FILE__, __LINE__, reason) @@ -138,8 +134,6 @@ bool is_object(EngineState *s, reg_t obj); ** Returns : (int) 1 if it is an object, 0 otherwise */ - - /******************** Kernel function parameter macros ********************/ /* Returns the parameter value or (alt) if not enough parameters were supplied */ @@ -176,10 +170,6 @@ byte *kernel_dereference_bulk_pointer(EngineState *s, reg_t pointer, int entries #define RESOURCE_NUMBER(resid) ((resid) & 0x7ff) #define RESOURCE_TYPE(resid) ((resid) >> 11) - - - - int kernel_oops(EngineState *s, const char *file, int line, const char *reason); /* Halts script execution and informs the user about an internal kernel error or failed assertion ** Paramters: (EngineState *) s: The state to use @@ -188,9 +178,6 @@ int kernel_oops(EngineState *s, const char *file, int line, const char *reason); ** (const char *) reason: Reason for the kernel oops */ - - - /******************** Priority macros/functions ********************/ extern int sci01_priority_table_flags; /* 1: delete, 2: print */ @@ -282,7 +269,6 @@ list_t *lookup_list(EngineState *s, reg_t addr, const char *file, int line); */ - /******************** Constants ********************/ /* Maximum length of a savegame name (including terminator character) */ diff --git a/engines/sci/include/menubar.h b/engines/sci/include/menubar.h index 4fed274891..7e8a0131a3 100644 --- a/engines/sci/include/menubar.h +++ b/engines/sci/include/menubar.h @@ -125,8 +125,7 @@ struct gfx_picture; /* forward declarations for graphics.h */ /********** function definitions *********/ -menubar_t * -menubar_new(void); +menubar_t *menubar_new(); /* Creates a new menubar struct ** Parameters: (void) ** Returns : (menubar_t *) A pointer to the new menubar entity @@ -134,16 +133,14 @@ menubar_new(void); */ -void -menubar_free(menubar_t *menubar); +void menubar_free(menubar_t *menubar); /* Frees all memory associated with a menubar ** Parameters: (menubar_t *) menubar: The menubar to free ** Returns : (void) */ -void -menubar_add_menu(gfx_state_t *state, menubar_t *menubar, char *title, char *entries, int font, reg_t entries_base); +void menubar_add_menu(gfx_state_t *state, menubar_t *menubar, char *title, char *entries, int font, reg_t entries_base); /* Adds a menu to the menubar. ** Parameters: (gfx_state_t *) state: The state the fonts are stored in ** (menubar_t *) menubar: The menubar to operate on @@ -165,8 +162,7 @@ menubar_add_menu(gfx_state_t *state, menubar_t *menubar, char *title, char *entr */ -int -menubar_set_attribute(EngineState *s, int menu, int item, int attribute, reg_t value); +int menubar_set_attribute(EngineState *s, int menu, int item, int attribute, reg_t value); /* Sets the (currently unidentified) foo and bar values. ** Parameters: (state_t *) s: The current state ** (int) menu: The menu number to edit @@ -177,8 +173,7 @@ menubar_set_attribute(EngineState *s, int menu, int item, int attribute, reg_t v */ -reg_t -menubar_get_attribute(EngineState *s, int menu, int item, int attribute); +reg_t menubar_get_attribute(EngineState *s, int menu, int item, int attribute); /* Sets the (currently unidentified) foo and bar values. ** Parameters: (state_t *) s: The current state ** (int) menu: The menu number @@ -188,8 +183,7 @@ menubar_get_attribute(EngineState *s, int menu, int item, int attribute); */ -int -menubar_item_valid(EngineState *s, int menu, int item); +int menubar_item_valid(EngineState *s, int menu, int item); /* Determines whether the specified menu entry may be activated ** Parameters: (state_t *) s: The current state ** (int x int) (menu, item): The menu item to check @@ -197,8 +191,7 @@ menubar_item_valid(EngineState *s, int menu, int item); */ -int -menubar_map_pointer(EngineState *s, int *menu_nr, int *item_nr, gfxw_port_t *port); +int menubar_map_pointer(EngineState *s, int *menu_nr, int *item_nr, gfxw_port_t *port); /* Maps the pointer position to a (menu,item) tuple. ** Parameters: (state_t *) s: The current state ** ((int *) x (int *)) (menu_nr, item_nr): Pointers to the current menu/item tuple @@ -206,8 +199,7 @@ menubar_map_pointer(EngineState *s, int *menu_nr, int *item_nr, gfxw_port_t *por ** Returns : (int) 1 if the pointer is outside a valid port, 0 otherwise. */ -int -menubar_match_key(menu_item_t *item, int message, int modifiers); +int menubar_match_key(menu_item_t *item, int message, int modifiers); /* Determines whether a message/modifiers key pair matches a menu item's key parameters ** Parameters: (menu_item_t *) item: The menu item to match ** (int x int) message, modifiers: The input to compare diff --git a/engines/sci/include/resource.h b/engines/sci/include/resource.h index 9865e2aa07..a6ab89c1f5 100644 --- a/engines/sci/include/resource.h +++ b/engines/sci/include/resource.h @@ -113,8 +113,7 @@ namespace Sci { # define scimkdir(arg1,arg2) mkdir(arg1,arg2) #endif -static inline gint16 -getInt16(byte *d) { +static inline gint16 getInt16(byte *d) { return (gint16)(*d | (d[1] << 8)); } @@ -126,8 +125,7 @@ getInt16(byte *d) { ** getUInt16 returns the int unsigned. */ -static inline void -putInt16(byte* dest, int src) { +static inline void putInt16(byte* dest, int src) { dest[0] = (byte)src & 0xff; dest[1] = (byte)(src >> 8) & 0xff; } @@ -138,8 +136,7 @@ putInt16(byte* dest, int src) { /* --- */ -void -sci_gettime(long *seconds, long *useconds); +void sci_gettime(long *seconds, long *useconds); /* Calculates the current time in seconds and microseconds ** Parameters: (long *) seconds: Pointer to the variable the seconds part of the ** current time will be stored in @@ -150,15 +147,13 @@ sci_gettime(long *seconds, long *useconds); ** (typically 01/01/1970 on *NIX systems). */ -void -sci_get_current_time(GTimeVal *val); +void sci_get_current_time(GTimeVal *val); /* GTimeVal version of sci_gettime() ** Parameters: (GTimeVal *) val: Pointer to the structure the values will be stored in ** Returns : (void) */ -void -sci_init_dir(sci_dir_t *dirent); +void sci_init_dir(sci_dir_t *dirent); /* Initializes an sci directory search structure ** Parameters: (sci_dir_t *) dirent: The entity to initialize ** Returns : (void) @@ -168,23 +163,20 @@ sci_init_dir(sci_dir_t *dirent); ** subjected to any of the other dirent calls. */ -char * -sci_find_first(sci_dir_t *dirent, const char *mask); +char *sci_find_first(sci_dir_t *dirent, const char *mask); /* Finds the first file matching the specified file mask ** Parameters: (sci_dir_t *) dirent: Pointer to an unused dirent structure ** (const char *) mask: File mask to apply ** Returns : (char *) Name of the first matching file found, or NULL */ -char * -sci_find_next(sci_dir_t *dirent); +char *sci_find_next(sci_dir_t *dirent); /* Finds the next file specified by an sci_dir initialized by sci_find_first() ** Parameters: (sci_dir_t *) dirent: Pointer to SCI dir entity ** Returns : (char *) Name of the next matching file, or NULL */ -void -sci_finish_find(sci_dir_t *dirent); +void sci_finish_find(sci_dir_t *dirent); /* Completes an 'sci_find_first/next' procedure ** Parameters: (sci_dir_t *) dirent: Pointer to the dirent used ** Returns : (void) @@ -195,8 +187,7 @@ sci_finish_find(sci_dir_t *dirent); ** the second operation is guaranteed to be a no-op. */ -FILE * -sci_fopen(const char *fname, const char *mode); +FILE *sci_fopen(const char *fname, const char *mode); /* Opens a FILE* case-insensitively ** Parameters: (const char *) fname: Name of the file to open ** (const char *) mode: Mode to open it with @@ -204,8 +195,7 @@ sci_fopen(const char *fname, const char *mode); ** Always refers to the cwd, cannot address subdirectories */ -int -sci_open(const char *fname, int flags); +int sci_open(const char *fname, int flags); /* Opens a file descriptor case-insensitively ** Parameters: (const char *) fname: Name of the file to open ** (int) flags: open(2) flags for the file @@ -215,8 +205,7 @@ sci_open(const char *fname, int flags); */ -int -sciprintf(const char *fmt, ...) GCC_PRINTF(1, 2); +int sciprintf(const char *fmt, ...) GCC_PRINTF(1, 2); #define gfxprintf sciprintf /* Prints a string to the console stack ** Parameters: fmt: a printf-style format string @@ -225,30 +214,26 @@ sciprintf(const char *fmt, ...) GCC_PRINTF(1, 2); ** Implementation is in src/scicore/console.c */ -char * -sci_getcwd(void); +char *sci_getcwd(); /* Returns the current working directory, malloc'd. ** Parameters: (void) ** Returns : (char *) a malloc'd cwd, or NULL if it couldn't be determined. */ -int -sci_mkpath(const char *path); +int sci_mkpath(const char *path); /* Asserts that the specified path is available ** Parameters: (const char *) path: Path to verify/create ** Returns : (int) 0 on success, <0 on error ** This function will create any directories that couldn't be found */ -int -sci_fd_size(int fd); +int sci_fd_size(int fd); /* Returns the filesize of an open file ** Parameters: (int) fd: File descriptor of open file ** Returns : (int) filesize of file pointed to by fd, -1 on error */ -int -sci_file_size(const char *fname); +int sci_file_size(const char *fname); /* Returns the filesize of a file ** Parameters: (const char *) fname: Name of file to get filesize of ** Returns : (int) filesize of the file, -1 on error diff --git a/engines/sci/include/sbtree.h b/engines/sci/include/sbtree.h index 65790344a2..0639d80bfc 100644 --- a/engines/sci/include/sbtree.h +++ b/engines/sci/include/sbtree.h @@ -48,8 +48,7 @@ typedef struct { } sbtree_t; -sbtree_t * -sbtree_new(int size, int *keys); +sbtree_t *sbtree_new(int size, int *keys); /* Generates a new sbtree with the specified key set ** Parameters: (int) size: Number of entries in 'keys' ** (int *) keys: Array of 'size' integer keys @@ -59,15 +58,13 @@ sbtree_new(int size, int *keys); ** beforehand. */ -void -sbtree_free(sbtree_t *tree); +void sbtree_free(sbtree_t *tree); /* Frees an sbtree ** Parameters: (sbtree_t *) tree: The tree to free ** Returns : (void) Nothing at all */ -int -sbtree_set(sbtree_t *tree, int key, void *value); +int sbtree_set(sbtree_t *tree, int key, void *value); /* Sets a key to a value ** Parameters: (sbtree_t *) tree: The tree to modify ** (int) key: The key to set @@ -76,8 +73,7 @@ sbtree_set(sbtree_t *tree, int key, void *value); ** value may, of course, be NULL here. */ -void * -sbtree_get(sbtree_t *tree, int key); +void *sbtree_get(sbtree_t *tree, int key); /* Retreives a key ** Parameters: (sbtree_t *) tree: The tree to search in ** (int) key: The key to retrieve @@ -87,8 +83,7 @@ sbtree_get(sbtree_t *tree, int key); ** short of attempting to set that key. */ -void -sbtree_foreach(sbtree_t *tree, void *args, void *(*operation)(sbtree_t *, const int, +void sbtree_foreach(sbtree_t *tree, void *args, void *(*operation)(sbtree_t *, const int, const void *, void *)); /* Operates once on each entry in the tree ** Parameters: (sbtree_t *) tree: The tree to operate on diff --git a/engines/sci/include/sci_widgets.h b/engines/sci/include/sci_widgets.h index 5a8d8b7c93..d2b8e0320d 100644 --- a/engines/sci/include/sci_widgets.h +++ b/engines/sci/include/sci_widgets.h @@ -60,8 +60,7 @@ namespace Sci { /* Used by the interpreter to flag buttons that are enabled */ #define CONTROL_STATE_ENABLED 0x0001 -void -sciw_set_status_bar(EngineState *s, gfxw_port_t *status_bar, char *text, int fgcolor, int bgcolor); +void sciw_set_status_bar(EngineState *s, gfxw_port_t *status_bar, char *text, int fgcolor, int bgcolor); /* Sets the contents of a port used as status bar ** Parmeters: (EngineState *) s: The affected game state ** (gfxw_port_t *) status_bar: The status bar port @@ -69,8 +68,7 @@ sciw_set_status_bar(EngineState *s, gfxw_port_t *status_bar, char *text, int fgc ** Returns : (void) */ -gfxw_port_t * -sciw_new_window(EngineState *s, rect_t area, int font, gfx_color_t color, gfx_color_t bgcolor, +gfxw_port_t *sciw_new_window(EngineState *s, rect_t area, int font, gfx_color_t color, gfx_color_t bgcolor, int title_font, gfx_color_t title_color, gfx_color_t title_bg_color, const char *title, int flags); /* Creates a new SCI style window @@ -91,8 +89,7 @@ sciw_new_window(EngineState *s, rect_t area, int font, gfx_color_t color, gfx_co /*** Control widgets ***/ /*---------------------*/ -gfxw_list_t * -sciw_new_button_control(gfxw_port_t *port, reg_t ID, rect_t zone, char *text, int font, char selected, char inverse, char gray); +gfxw_list_t *sciw_new_button_control(gfxw_port_t *port, reg_t ID, rect_t zone, char *text, int font, char selected, char inverse, char gray); /* Creates a new button control list ** Parameters: (gfxw_port_t *) port: The port containing the color values to use for the ** button (the button is /not/ appended to the port there) @@ -106,8 +103,7 @@ sciw_new_button_control(gfxw_port_t *port, reg_t ID, rect_t zone, char *text, in ** Returns : (gfxw_list_t *) The button */ -gfxw_list_t * -sciw_new_text_control(gfxw_port_t *port, reg_t ID, rect_t zone, char *text, int font, +gfxw_list_t *sciw_new_text_control(gfxw_port_t *port, reg_t ID, rect_t zone, char *text, int font, gfx_alignment_t align, char frame, char inverse); /* Creates a new text control list ** Parameters: (gfxw_port_t *) port: The port containing the color values to use @@ -121,8 +117,7 @@ sciw_new_text_control(gfxw_port_t *port, reg_t ID, rect_t zone, char *text, int ** Returns : (gfxw_list_t *) The text control widget list */ -gfxw_list_t * -sciw_new_edit_control(gfxw_port_t *port, reg_t ID, rect_t zone, char *text, int font, unsigned int cursor, +gfxw_list_t *sciw_new_edit_control(gfxw_port_t *port, reg_t ID, rect_t zone, char *text, int font, unsigned int cursor, char inverse); /* Creates a new edit control list ** Parameters: (gfxw_port_t *) port: The port containing the color values to use @@ -135,8 +130,7 @@ sciw_new_edit_control(gfxw_port_t *port, reg_t ID, rect_t zone, char *text, int ** Returns : (gfxw_list_t *) An appropriate widget list */ -gfxw_list_t * -sciw_new_icon_control(gfxw_port_t *port, reg_t ID, rect_t zone, int view, int loop, int cel, +gfxw_list_t *sciw_new_icon_control(gfxw_port_t *port, reg_t ID, rect_t zone, int view, int loop, int cel, char frame, char inverse); /* Creates a new icon control list ** Parameters: (gfxw_port_t *) port: The port containing the color values to use @@ -148,8 +142,7 @@ sciw_new_icon_control(gfxw_port_t *port, reg_t ID, rect_t zone, int view, int lo ** Returns : (gfxw_list_t *) An appropriate widget list */ -gfxw_list_t * -sciw_new_list_control(gfxw_port_t *port, reg_t ID, rect_t zone, int font_nr, char **entries_list, +gfxw_list_t *sciw_new_list_control(gfxw_port_t *port, reg_t ID, rect_t zone, int font_nr, char **entries_list, int entries_nr, int list_top, int selection, char inverse); /* Creates a new list control list ** Parameters: (gfxw_port_t *) port: The port containing the color values to use @@ -168,8 +161,7 @@ sciw_new_list_control(gfxw_port_t *port, reg_t ID, rect_t zone, int font_nr, cha /*** Menubar widgets ***/ /*---------------------*/ -void -sciw_set_menubar(EngineState *s, gfxw_port_t *status_bar, menubar_t *menubar, int selection); +void sciw_set_menubar(EngineState *s, gfxw_port_t *status_bar, menubar_t *menubar, int selection); /* Draws the menu bar ** Parameters: (EngineState *) s: The state to operate on ** (gfxw_port_t *) status_bar: The status bar port to modify @@ -178,8 +170,7 @@ sciw_set_menubar(EngineState *s, gfxw_port_t *status_bar, menubar_t *menubar, in ** Returns : (void) */ -gfxw_port_t * -sciw_new_menu(EngineState *s, gfxw_port_t *status_bar, menubar_t *menubar, int selection); +gfxw_port_t *sciw_new_menu(EngineState *s, gfxw_port_t *status_bar, menubar_t *menubar, int selection); /* Creates a menu port ** Parameters: (EngineState *) s: The state to operate on ** (gfxw_port_t *) status_bar: The status bar @@ -188,8 +179,7 @@ sciw_new_menu(EngineState *s, gfxw_port_t *status_bar, menubar_t *menubar, int s ** Returns : (gfxw_port_t *) The result port */ -gfxw_port_t * -sciw_unselect_item(EngineState *s, gfxw_port_t *menu_port, menu_t *menu, int selection); +gfxw_port_t *sciw_unselect_item(EngineState *s, gfxw_port_t *menu_port, menu_t *menu, int selection); /* Unselects a previously selected item from a menu port ** Parameters: (EngineState *) s: The state to operate on ** (gfxw_port_t *) menu_port: The port modify diff --git a/engines/sci/include/sciresource.h b/engines/sci/include/sciresource.h index 9b30d7d8ba..aa280657ca 100644 --- a/engines/sci/include/sciresource.h +++ b/engines/sci/include/sciresource.h @@ -228,8 +228,7 @@ ResourceSource *scir_add_external_map(ResourceManager *mgr, const char *file_nam ** Returns: A pointer to the added source structure, or NULL if an error occurred. */ -int -scir_scan_new_sources(ResourceManager *mgr, int *detected_version); +int scir_scan_new_sources(ResourceManager *mgr, int *detected_version); /* Scans newly registered resource sources for resources, earliest addition first. ** Parameters: (ResourceManager *) mgr: The resource manager to look up in ** (int *) detected_version: Pointer to the detected version number, @@ -237,8 +236,7 @@ scir_scan_new_sources(ResourceManager *mgr, int *detected_version); ** Returns: One of SCI_ERROR_*. */ -resource_t * -scir_find_resource(ResourceManager *mgr, int type, int number, int lock); +resource_t *scir_find_resource(ResourceManager *mgr, int type, int number, int lock); /* Looks up a resource's data ** Parameters: (ResourceManager *) mgr: The resource manager to look up in ** (int) type: The resource type to look for @@ -249,8 +247,7 @@ scir_find_resource(ResourceManager *mgr, int type, int number, int lock); ** they are unlocked explicitly (by scir_unlock_resource). */ -void -scir_unlock_resource(ResourceManager *mgr, resource_t *res, int restype, int resnum); +void scir_unlock_resource(ResourceManager *mgr, resource_t *res, int restype, int resnum); /* Unlocks a previously locked resource ** Parameters: (ResourceManager *) mgr: The manager the resource should be freed from ** (resource_t *) res: The resource to free @@ -259,8 +256,7 @@ scir_unlock_resource(ResourceManager *mgr, resource_t *res, int restype, int res ** Returns : (void) */ -resource_t * -scir_test_resource(ResourceManager *mgr, int type, int number); +resource_t *scir_test_resource(ResourceManager *mgr, int type, int number); /* Tests whether a resource exists ** Parameters: (ResourceManager *) mgr: The resource manager to search in ** (int) type: Type of the resource to check @@ -304,8 +300,7 @@ int sci1_read_resource_map(ResourceManager *mgr, ResourceSource *map, ResourceSo /**--- Patch management functions ---*/ -void -sci0_sprintf_patch_file_name(char *string, resource_t *res); +void sci0_sprintf_patch_file_name(char *string, resource_t *res); /* Prints the name of a matching patch to a string buffer ** Parameters: (char *) string: The buffer to print to ** (resource_t *) res: Resource containing the number and type of the @@ -313,8 +308,7 @@ sci0_sprintf_patch_file_name(char *string, resource_t *res); ** Returns : (void) */ -void -sci1_sprintf_patch_file_name(char *string, resource_t *res); +void sci1_sprintf_patch_file_name(char *string, resource_t *res); /* Prints the name of a matching patch to a string buffer ** Parameters: (char *) string: The buffer to print to ** (resource_t *) res: Resource containing the number and type of the @@ -404,16 +398,14 @@ byte *pic_reorder(byte *inbuffer, int dsize); /*--- Internal helper functions ---*/ -void -_scir_free_resources(resource_t *resources, int _resourcesNr); +void _scir_free_resources(resource_t *resources, int _resourcesNr); /* Frees a block of resources and associated data ** Parameters: (resource_t *) resources: The resources to free ** (int) _resourcesNr: Number of resources in the block ** Returns : (void) */ -resource_t * -_scir_find_resource_unsorted(resource_t *res, int res_nr, int type, int number); +resource_t *_scir_find_resource_unsorted(resource_t *res, int res_nr, int type, int number); /* Finds a resource matching type.number in an unsorted resource_t block ** To be used during initial resource loading, when the resource list ** may not have been sorted yet. diff --git a/engines/sci/include/script.h b/engines/sci/include/script.h index 00effd22a9..9d3d7ee22a 100644 --- a/engines/sci/include/script.h +++ b/engines/sci/include/script.h @@ -207,8 +207,7 @@ extern opcode_format formats[128][4]; void script_adjust_opcode_formats(int res_version); -int -script_find_selector(EngineState *s, const char *selector_name); +int script_find_selector(EngineState *s, const char *selector_name); /* Determines the selector ID of a selector by its name ** Parameters: (state_t *) s: VM state ** (char *) selector_name: Name of the selector to look up diff --git a/engines/sci/include/sfx_engine.h b/engines/sci/include/sfx_engine.h index fe48463b65..3a037aa60b 100644 --- a/engines/sci/include/sfx_engine.h +++ b/engines/sci/include/sfx_engine.h @@ -61,54 +61,46 @@ typedef struct { /* General */ /***********/ -void -sfx_init(sfx_state_t *self, ResourceManager *resmgr, int flags); +void sfx_init(sfx_state_t *self, ResourceManager *resmgr, int flags); /* Initializes the sound engine ** Parameters: (ResourceManager *) resmgr: Resource manager for initialization ** (int) flags: SFX_STATE_FLAG_* */ -void -sfx_exit(sfx_state_t *self); +void sfx_exit(sfx_state_t *self); /* Deinitializes the sound subsystem */ -void -sfx_suspend(sfx_state_t *self, int suspend); +void sfx_suspend(sfx_state_t *self, int suspend); /* Suspends/unsuspends the sound sybsystem ** Parameters: (int) suspend: Whether to suspend (non-null) or to unsuspend */ -int -sfx_poll(sfx_state_t *self, song_handle_t *handle, int *cue); +int sfx_poll(sfx_state_t *self, song_handle_t *handle, int *cue); /* Polls the sound server for cues etc. ** Returns : (int) 0 if the cue queue is empty, SI_LOOP, SI_CUE, or SI_FINISHED otherwise ** (song_handle_t) *handle: The affected handle ** (int) *cue: The sound cue number (if SI_CUE), or the loop number (if SI_LOOP) */ -int -sfx_poll_specific(sfx_state_t *self, song_handle_t handle, int *cue); +int sfx_poll_specific(sfx_state_t *self, song_handle_t handle, int *cue); /* Polls the sound server for cues etc. ** Parameters: (song_handle_t) handle: The handle to poll ** Returns : (int) 0 if the cue queue is empty, SI_LOOP, SI_CUE, or SI_FINISHED otherwise ** (int) *cue: The sound cue number (if SI_CUE), or the loop number (if SI_LOOP) */ -int -sfx_get_volume(sfx_state_t *self); +int sfx_get_volume(sfx_state_t *self); /* Determines the current global volume settings ** Returns : (int) The global volume, between 0 (silent) and 127 (max. volume) */ -void -sfx_set_volume(sfx_state_t *self, int volume); +void sfx_set_volume(sfx_state_t *self, int volume); /* Determines the current global volume settings ** Parameters: (int) volume: The new global volume, between 0 and 127 (see above) */ -void -sfx_all_stop(sfx_state_t *self); +void sfx_all_stop(sfx_state_t *self); /* Stops all songs currently playing, purges song library */ @@ -117,8 +109,7 @@ sfx_all_stop(sfx_state_t *self); /* Song basics */ /*****************/ -int -sfx_add_song(sfx_state_t *self, song_iterator_t *it, int priority, song_handle_t handle, int resnum); +int sfx_add_song(sfx_state_t *self, song_iterator_t *it, int priority, song_handle_t handle, int resnum); /* Adds a song to the internal sound library ** Parameters: (song_iterator_t *) it: The iterator describing the song ** (int) priority: Initial song priority (higher <-> more important) @@ -127,8 +118,7 @@ sfx_add_song(sfx_state_t *self, song_iterator_t *it, int priority, song_handle_t */ -void -sfx_remove_song(sfx_state_t *self, song_handle_t handle); +void sfx_remove_song(sfx_state_t *self, song_handle_t handle); /* Deletes a song and its associated song iterator from the song queue ** Parameters: (song_handle_t) handle: The song to remove */ @@ -139,8 +129,7 @@ sfx_remove_song(sfx_state_t *self, song_handle_t handle); /**********************/ -void -sfx_song_set_status(sfx_state_t *self, song_handle_t handle, int status); +void sfx_song_set_status(sfx_state_t *self, song_handle_t handle, int status); /* Sets the song status, i.e. whether it is playing, suspended, or stopped. ** Parameters: (song_handle_t) handle: Handle of the song to modify ** (int) status: The song status the song should assume @@ -148,29 +137,25 @@ sfx_song_set_status(sfx_state_t *self, song_handle_t handle, int status); ** as far as this function is concerned. */ -void -sfx_song_renice(sfx_state_t *self, song_handle_t handle, int priority); +void sfx_song_renice(sfx_state_t *self, song_handle_t handle, int priority); /* Sets the new song priority ** Parameters: (song_handle_t) handle: The handle to modify ** (int) priority: The priority to set */ -void -sfx_song_set_loops(sfx_state_t *self, song_handle_t handle, int loops); +void sfx_song_set_loops(sfx_state_t *self, song_handle_t handle, int loops); /* Sets the number of loops for the specified song ** Parameters: (song_handle_t) handle: The song handle to reference ** (int) loops: Number of loops to set */ -void -sfx_song_set_hold(sfx_state_t *self, song_handle_t handle, int hold); +void sfx_song_set_hold(sfx_state_t *self, song_handle_t handle, int hold); /* Sets the number of loops for the specified song ** Parameters: (song_handle_t) handle: The song handle to reference ** (int) hold: Number of loops to setn */ -void -sfx_song_set_fade(sfx_state_t *self, song_handle_t handle, fade_params_t *fade_setup); +void sfx_song_set_fade(sfx_state_t *self, song_handle_t handle, fade_params_t *fade_setup); /* Instructs a song to be faded out ** Parameters: (song_handle_t) handle: The song handle to reference ** (fade_params_t *) fade_setup: The precise fade-out configuration to use diff --git a/engines/sci/include/sfx_iterator.h b/engines/sci/include/sfx_iterator.h index 5dbafa8b9a..652314c3cf 100644 --- a/engines/sci/include/sfx_iterator.h +++ b/engines/sci/include/sfx_iterator.h @@ -203,8 +203,7 @@ typedef struct _song_iterator { ** Thus, this flag distinguishes song iterators in the main thread from those ** in the song-player thread. */ -void -song_iterator_add_death_listener(song_iterator_t *it, +void song_iterator_add_death_listener(song_iterator_t *it, void *client, void (*notify)(void *self, void *notifier)); /* Adds a death listener to a song iterator @@ -217,8 +216,7 @@ song_iterator_add_death_listener(song_iterator_t *it, ** Death listeners are NOT cloned. */ -void -song_iterator_remove_death_listener(song_iterator_t *it, +void song_iterator_remove_death_listener(song_iterator_t *it, void *client); /* Removes a death listener from a song iterator ** Parameters: (song_iterator_t *) it: The iterator to modify @@ -251,8 +249,7 @@ song_iterator_remove_death_listener(song_iterator_t *it, | IT_READER_MASK_CUE \ | IT_READER_MASK_PCM ) -int -songit_next(song_iterator_t **it, unsigned char *buf, int *result, int mask); +int songit_next(song_iterator_t **it, unsigned char *buf, int *result, int mask); /* Convenience wrapper around it->next ** Parameters: (song_iterator_t **it) Reference to the iterator to access ** (byte *) buf: The buffer to write to (needs to be able to @@ -270,8 +267,7 @@ songit_next(song_iterator_t **it, unsigned char *buf, int *result, int mask); ** or the number of loops remaining for SI_LOOP. */ -song_iterator_t * -songit_new(unsigned char *data, unsigned int size, int type, songit_id_t id); +song_iterator_t *songit_new(unsigned char *data, unsigned int size, int type, songit_id_t id); /* Constructs a new song iterator object ** Parameters: (byte *) data: The song data to iterate over ** (unsigned int) size: Number of bytes in the song @@ -281,8 +277,7 @@ songit_new(unsigned char *data, unsigned int size, int type, songit_id_t id); ** iterator, or NULL if 'type' was invalid or unsupported */ -song_iterator_t * -songit_new_tee(song_iterator_t *left, song_iterator_t *right, int may_destroy); +song_iterator_t *songit_new_tee(song_iterator_t *left, song_iterator_t *right, int may_destroy); /* Combines two iterators, returns the next event available from either ** Parameters: (song_iterator_t *) left: One of the iterators ** (song_iterator_t *) right: The other iterator @@ -292,15 +287,13 @@ songit_new_tee(song_iterator_t *left, song_iterator_t *right, int may_destroy); */ -void -songit_free(song_iterator_t *it); +void songit_free(song_iterator_t *it); /* Frees a song iterator and the song it wraps ** Parameters: (song_iterator_t *) it: The song iterator to free ** Returns : (void) */ -song_iterator_message_t -songit_make_message(songit_id_t id, +song_iterator_message_t songit_make_message(songit_id_t id, int recipient_class, int type, int a1, int a2); /* Create a song iterator message ** Parameters: (songit_id_t) id: song ID the message is targetted to @@ -310,8 +303,7 @@ songit_make_message(songit_id_t id, ** You should only use this with the SIMSG_* macros */ -song_iterator_message_t -songit_make_ptr_message(songit_id_t id, +song_iterator_message_t songit_make_ptr_message(songit_id_t id, int recipient_class, int type, void * a1, int a2); /* Create a song iterator message, wherein the first parameter is a pointer ** Parameters: (songit_id_t) id: song ID the message is targetted to @@ -321,8 +313,7 @@ songit_make_ptr_message(songit_id_t id, ** You should only use this with the SIMSG_* macros */ -int -songit_handle_message(song_iterator_t **it_reg, song_iterator_message_t msg); +int songit_handle_message(song_iterator_t **it_reg, song_iterator_message_t msg); /* Handles a message to the song iterator ** Parameters: (song_iterator_t **): A reference to the variable storing the song iterator ** Returns : (int) Non-zero if the message was understood @@ -330,8 +321,7 @@ songit_handle_message(song_iterator_t **it_reg, song_iterator_message_t msg); */ -song_iterator_t * -songit_clone(song_iterator_t *it, int delta); +song_iterator_t *songit_clone(song_iterator_t *it, int delta); /* Clones a song iterator ** Parameters: (song_iterator_t *) it: The iterator to clone ** (int) delta: Number of ticks that still need to elapse until @@ -343,8 +333,7 @@ songit_clone(song_iterator_t *it, int delta); */ -int -sfx_play_iterator_pcm(song_iterator_t *it, unsigned long handle); +int sfx_play_iterator_pcm(song_iterator_t *it, unsigned long handle); /* Plays a song iterator that found a PCM through a PCM device, if possible ** Parameters: (song_iterator_t *) it: The iterator to play ** (song_handle_t) handle: Debug handle diff --git a/engines/sci/include/sfx_iterator_internal.h b/engines/sci/include/sfx_iterator_internal.h index 54d63bde36..8f71267edb 100644 --- a/engines/sci/include/sfx_iterator_internal.h +++ b/engines/sci/include/sfx_iterator_internal.h @@ -146,15 +146,13 @@ typedef struct { /*********************************/ -song_iterator_t * -new_cleanup_iterator(unsigned int channels); +song_iterator_t *new_cleanup_iterator(unsigned int channels); /* Creates a new song iterator with the purpose of sending notes-off channel commands ** Parameters: (unsigned int) channels: Channel mask to send these commands for ** Returns : A song iterator with the aforementioned purpose */ -int -is_cleanup_iterator(song_iterator_t *it); +int is_cleanup_iterator(song_iterator_t *it); /* Determines whether a given song iterator is a cleanup song iterator ** Parameters: (song_iterator_t *) it: The iterator to check ** Returns : (int) 1 iff 'it' is a cleanup song iterator @@ -173,8 +171,7 @@ typedef struct { } fast_forward_song_iterator_t; -song_iterator_t * -new_fast_forward_iterator(song_iterator_t *it, int delta); +song_iterator_t *new_fast_forward_iterator(song_iterator_t *it, int delta); /* Creates a new song iterator which fast-forwards ** Parameters: (song_iterator_t *) it: The iterator to wrap ** (int) delta: The number of ticks to skip @@ -223,8 +220,7 @@ typedef struct { } tee_song_iterator_t; -sfx_pcm_feed_t * -sfx_iterator_make_feed(byte *base_data, int offset, +sfx_pcm_feed_t *sfx_iterator_make_feed(byte *base_data, int offset, int size, sfx_pcm_config_t conf); /* Generates a feed for a song iterator diff --git a/engines/sci/include/sfx_pcm.h b/engines/sci/include/sfx_pcm.h index 7490ab3e22..1169354bb8 100644 --- a/engines/sci/include/sfx_pcm.h +++ b/engines/sci/include/sfx_pcm.h @@ -174,8 +174,7 @@ typedef struct _sfx_pcm_feed_t { } sfx_pcm_feed_t; -int -sfx_pcm_available(void); +int sfx_pcm_available(); /* Determines whether a PCM device is available and has been initialised ** Returns : (int) zero iff no PCM device is available */ diff --git a/engines/sci/include/sfx_player.h b/engines/sci/include/sfx_player.h index a9b59582f8..efd2a2902d 100644 --- a/engines/sci/include/sfx_player.h +++ b/engines/sci/include/sfx_player.h @@ -40,16 +40,14 @@ typedef struct { const char *name; const char *version; - int - (*set_option)(char *name, char *value); + int (*set_option)(char *name, char *value); /* Sets an option for player timing mechanism ** Parameters: (char *) name: The name describing what to set ** (char *) value: The value to set ** Returns : (int) SFX_OK, or SFX_ERROR if the name wasn't understood */ - int - (*init)(ResourceManager *resmgr, int expected_latency); + int (*init)(ResourceManager *resmgr, int expected_latency); /* Initializes the player ** Parameters: (ResourceManager *) resmgr: A resource manager for driver initialization ** (int) expected_latency: Expected delay in between calls to 'maintenance' @@ -57,8 +55,7 @@ typedef struct { ** Returns : (int) SFX_OK on success, SFX_ERROR on failure */ - int - (*add_iterator)(song_iterator_t *it, GTimeVal start_time); + int (*add_iterator)(song_iterator_t *it, GTimeVal start_time); /* Adds an iterator to the song player ** Parameters: (songx_iterator_t *) it: The iterator to play ** (GTimeVal) start_time: The time to assume as the @@ -70,20 +67,17 @@ typedef struct { ** to add iterators onto their already existing iterators */ - int - (*fade_out)(void); + int (*fade_out)(void); /* Fades out the currently playing song (within two seconds ** Returns : (int) SFX_OK on success, SFX_ERROR on failure */ - int - (*stop)(void); + int (*stop)(void); /* Stops the currently playing song and deletes the associated iterator ** Returns : (int) SFX_OK on success, SFX_ERROR on failure */ - int - (*iterator_message)(song_iterator_message_t msg); + int (*iterator_message)(song_iterator_message_t msg); /* Transmits a song iterator message to the active song ** Parameters: (song_iterator_message_t) msg: The message to transmit ** Returns : (int) SFX_OK on success, SFX_ERROR on failure @@ -92,26 +86,22 @@ typedef struct { ** and re-start playing, so it is preferred that it is present */ - int - (*pause)(void); /* OPTIONAL -- may be NULL */ + int (*pause)(void); /* OPTIONAL -- may be NULL */ /* Pauses song playing ** Returns : (int) SFX_OK on success, SFX_ERROR on failure */ - int - (*resume)(void); /* OPTIONAL -- may be NULL */ + int (*resume)(void); /* OPTIONAL -- may be NULL */ /* Resumes song playing after a pause ** Returns : (int) SFX_OK on success, SFX_ERROR on failure */ - int - (*exit)(void); + int (*exit)(void); /* Stops the player ** Returns : (int) SFX_OK on success, SFX_ERROR on failure */ - void - (*maintenance)(void); /* OPTIONAL -- may be NULL */ + void (*maintenance)(void); /* OPTIONAL -- may be NULL */ /* Regularly called maintenance function ** This function is called frequently and regularly (if present), it can be ** used to emit sound. @@ -127,34 +117,29 @@ typedef struct { } sfx_player_t; -sfx_player_t * -sfx_find_player(char *name); +sfx_player_t *sfx_find_player(char *name); /* Looks up a player by name or finds the default player ** Parameters: (char *) name: Name of the player to look up, or NULL for dedault ** Returns : (sfx_player_t *) The player requested, or NULL if none was found */ -tell_synth_func * -sfx_get_player_tell_func(void); +tell_synth_func *sfx_get_player_tell_func(void); /* Gets the callback function of the player in use. ** Returns: (tell_synth_func *) The callback function. */ -int -sfx_get_player_polyphony(void); +int sfx_get_player_polyphony(void); /* Determines the polyphony of the player in use ** Returns : (int) Number of voices the active player can emit */ -void -sfx_reset_player(void); +void sfx_reset_player(void); /* Tells the player to stop its internal iterator ** Parameters: None. ** Returns: Nothing. */ -song_iterator_t * -sfx_iterator_combine(song_iterator_t *it1, song_iterator_t *it2); +song_iterator_t *sfx_iterator_combine(song_iterator_t *it1, song_iterator_t *it2); /* Combines two song iterators into one ** Parameters: (sfx_iterator_t *) it1: One of the two iterators, or NULL ** (sfx_iterator_t *) it2: The other iterator, or NULL diff --git a/engines/sci/include/sfx_songlib.h b/engines/sci/include/sfx_songlib.h index 09dbc631e3..99448f7aa4 100644 --- a/engines/sci/include/sfx_songlib.h +++ b/engines/sci/include/sfx_songlib.h @@ -88,8 +88,7 @@ typedef struct { /* Song library commands: */ /**************************/ -song_t * -song_new(song_handle_t handle, song_iterator_t *it, int priority); +song_t *song_new(song_handle_t handle, song_iterator_t *it, int priority); /* Initializes a new song ** Parameters: (song_handle_t) handle: The sound handle ** (song_iterator_t *) it: The song @@ -99,46 +98,40 @@ song_new(song_handle_t handle, song_iterator_t *it, int priority); */ -void -song_lib_init(songlib_t *songlib); +void song_lib_init(songlib_t *songlib); /* Initializes a static song library ** Parameters: (songlib_t *) songlib: Pointer to the library ** to initialize ** Returns : (void) */ -void -song_lib_free(songlib_t songlib); +void song_lib_free(songlib_t songlib); /* Frees a song library ** Parameters: (songlib_t) songlib: The library to free ** Returns : (void) */ -void -song_lib_add(songlib_t songlib, song_t *song); +void song_lib_add(songlib_t songlib, song_t *song); /* Adds a song to a song library. ** Parameters: (songlib_t) songlib: An existing sound library, or NULL ** (song_t *) song: The song to add ** Returns : (void) */ -song_t * -song_lib_find(songlib_t songlib, song_handle_t handle); +song_t *song_lib_find(songlib_t songlib, song_handle_t handle); /* Looks up the song with the specified handle ** Parameters: (songlib_t) songlib: An existing sound library, may point to NULL ** (song_handle_t) handle: The sound handle to look for ** Returns : (song_t *) The song or NULL if it wasn't found */ -song_t * -song_lib_find_active(songlib_t songlib); +song_t *song_lib_find_active(songlib_t songlib); /* Finds the first song playing with the highest priority ** Parameters: (songlib_t) songlib: An existing sound library ** Returns : (song_t *) The song that should be played next, or NULL if there is none */ -song_t * -song_lib_find_next_active(songlib_t songlib, song_t *song); +song_t *song_lib_find_next_active(songlib_t songlib, song_t *song); /* Finds the next song playing with the highest priority ** Parameters: (songlib_t) songlib: The song library to operate on ** (song_t *) song: A song previously returned from the song library @@ -149,39 +142,34 @@ song_lib_find_next_active(songlib_t songlib, song_t *song); ** being 'playable'. */ -int -song_lib_remove(songlib_t songlib, song_handle_t handle); +int song_lib_remove(songlib_t songlib, song_handle_t handle); /* Removes a song from the library ** Parameters: (songlib_t) songlib: An existing sound library ** (song_handle_t) handle: Handle of the song to remove ** Returns : (int) The status of the song that was removed */ -void -song_lib_resort(songlib_t songlib, song_t *song); +void song_lib_resort(songlib_t songlib, song_t *song); /* Removes a song from the library and sorts it in again; for use after renicing ** Parameters: (songlib_t) songlib: An existing sound library ** (song_t *) song: The song to work on ** Returns : (void) */ -int -song_lib_count(songlib_t songlib); +int song_lib_count(songlib_t songlib); /* Counts the number of songs in a song library ** Parameters: (songlib_t) songlib: The library to count ** Returns : (int) The number of songs */ -GTimeVal -song_sleep_time(GTimeVal *lastslept, long ticks); +GTimeVal song_sleep_time(GTimeVal *lastslept, long ticks); /* Caluculates the amount of seconds and microseconds to sleep. ** Parameters: (GTimeVal *) lastslept: The time to start counting on ** (long) ticks: Number of ticks to sleep ** Returns : (GTimeVal) The amount of time to sleep */ -GTimeVal -song_next_wakeup_time(GTimeVal *lastslept, long ticks); +GTimeVal song_next_wakeup_time(GTimeVal *lastslept, long ticks); /* Calculates the time at which "ticks" have passed, counting from "lastslept". ** Parameters: (GTimeVal *) lastslept: The base to start counting on ** (long) ticks: Number of ticks to count @@ -189,8 +177,7 @@ song_next_wakeup_time(GTimeVal *lastslept, long ticks); ** specified number of ticks has passed */ -void -song_lib_set_restore_behavior(songlib_t songlib, song_handle_t handle, +void song_lib_set_restore_behavior(songlib_t songlib, song_handle_t handle, RESTORE_BEHAVIOR action); /* Determines what should be done with the song "handle" when ** restoring it from a saved game. diff --git a/engines/sci/include/sfx_time.h b/engines/sci/include/sfx_time.h index d2e0cbec3e..d362dfa381 100644 --- a/engines/sci/include/sfx_time.h +++ b/engines/sci/include/sfx_time.h @@ -37,23 +37,20 @@ typedef struct { } sfx_timestamp_t; -sfx_timestamp_t -sfx_new_timestamp(long secs, long usecs, int frame_rate); +sfx_timestamp_t sfx_new_timestamp(long secs, long usecs, int frame_rate); /* Creates a new mutable timestamp ** Parameters: (long x long) (secs, usecs): Initial timestamp ** (int) frame_rate: Frame rate, for increasing the time stamp */ -sfx_timestamp_t -sfx_timestamp_add(sfx_timestamp_t timestamp, int frames); +sfx_timestamp_t sfx_timestamp_add(sfx_timestamp_t timestamp, int frames); /* Adds a number of frames to a timestamp ** Parameters: (sfx_timestampt_t *) timestamp: The timestamp to update ** (int) frames: Number of frames to add ** Returns : (sfx_timestamp_t) The increased timestamp */ -sfx_timestamp_t -sfx_timestamp_renormalise(sfx_timestamp_t timestamp, int new_freq); +sfx_timestamp_t sfx_timestamp_renormalise(sfx_timestamp_t timestamp, int new_freq); /* Translates a timestamp to a new base frame frequency ** Parameters: (sfx_timestamp_t *) timestamp: The timestamp to normalise ** (int) new_freq: The new frequency to normalise to @@ -62,24 +59,21 @@ sfx_timestamp_renormalise(sfx_timestamp_t timestamp, int new_freq); ** for "usual" sampling frequencies. */ -int -sfx_timestamp_frame_diff(sfx_timestamp_t a, sfx_timestamp_t b); +int sfx_timestamp_frame_diff(sfx_timestamp_t a, sfx_timestamp_t b); /* Computes the difference (# of frames) between two timestamps ** Parameters: (sfx_timestamp) a: See below ** (sfx_timestamp) b: See below ** Returns : (int) a-b */ -long -sfx_timestamp_usecs_diff(sfx_timestamp_t a, sfx_timestamp_t b); +long sfx_timestamp_usecs_diff(sfx_timestamp_t a, sfx_timestamp_t b); /* Computes the difference (# of microseconds) between two timestamps ** Parameters: (sfx_timestamp) a: See below ** (sfx_timestamp) b: See below ** Returns : (long) a-b */ -void -sfx_timestamp_gettime(sfx_timestamp_t *timestamp, long *secs, long *usecs); +void sfx_timestamp_gettime(sfx_timestamp_t *timestamp, long *secs, long *usecs); /* Determines the time described by a given timestamp ** Parameters: (sfx_timestamp_t *) timestamp: Timestamp to read from ** Returns : (int * x int *) (secs, usecs): Seconds and microseconds since diff --git a/engines/sci/include/sfx_timer.h b/engines/sci/include/sfx_timer.h index 6342503121..3f75777199 100644 --- a/engines/sci/include/sfx_timer.h +++ b/engines/sci/include/sfx_timer.h @@ -33,8 +33,7 @@ namespace Sci { typedef struct { int delay_ms; /* Approximate delay (in milliseconds) between calls */ - int - (*init)(void (*callback)(void *data), void *data); + int (*init)(void (*callback)(void *data), void *data); /* Initializes the timer ** Parameters: (void* -> void) callback: ** 'data' must contain the next argument: @@ -44,8 +43,7 @@ typedef struct { ** This function is called exactly once (provided that the timer is used at all). */ - int - (*exit)(void); + int (*exit)(void); /* Stops the timer ** Returns : (int) SFX_OK on success, SFX_ERROR on failure ** All resources allocated with the timer should be freed as an effect diff --git a/engines/sci/include/sys_strings.h b/engines/sci/include/sys_strings.h index 3a16777a0b..b9586268f2 100644 --- a/engines/sci/include/sys_strings.h +++ b/engines/sci/include/sys_strings.h @@ -45,8 +45,7 @@ typedef struct { sys_string_t strings[SYS_STRINGS_MAX]; } sys_strings_t; -void -sys_string_acquire(sys_strings_t *strings, int index, const char *name, int max_len); +void sys_string_acquire(sys_strings_t *strings, int index, const char *name, int max_len); /* Reserves a new system string ** Parameters: (sys_strings_t *) strings: The string table to reserve in ** (int) index: Index number to reserve @@ -54,8 +53,7 @@ sys_string_acquire(sys_strings_t *strings, int index, const char *name, int max_ ** (int) max_len: Maximum string length in bytes */ -int -sys_string_set(sys_strings_t *strings, int index, const char *value); +int sys_string_set(sys_strings_t *strings, int index, const char *value); /* Sets the value of a system string ** Parameters: (sys_strings_t *) strings: The string table to use ** (int) index: Index of the string to write to @@ -64,15 +62,13 @@ sys_string_set(sys_strings_t *strings, int index, const char *value); ** Length clipping is performed. */ -void -sys_strings_restore(sys_strings_t *new_strings, sys_strings_t *old_strings); +void sys_strings_restore(sys_strings_t *new_strings, sys_strings_t *old_strings); /* Cleanup system strings after a gamestate restore ** Parameters: (sys_strings_t *) The freshly loaded system strings to clean up ** (sys_strings_t *) The old system strings to clean up */ -void -sys_string_free_all(sys_strings_t *strings); +void sys_string_free_all(sys_strings_t *strings); /* Deallocates all allocated system strings ** Parameters: (sys_strings_t *) strings: The string table to deallocate */ diff --git a/engines/sci/include/versions.h b/engines/sci/include/versions.h index dfcea5ede1..da06f3f2c8 100644 --- a/engines/sci/include/versions.h +++ b/engines/sci/include/versions.h @@ -125,22 +125,19 @@ typedef int sci_version_t; struct EngineState; -void -version_require_earlier_than(EngineState *s, sci_version_t version); +void version_require_earlier_than(EngineState *s, sci_version_t version); /* Function used in autodetection ** Parameters: (EngineState *) s: EngineState containing the version ** (sci_version_t) version: The version that we're earlier than */ -void -version_require_later_than(EngineState *s, sci_version_t version); +void version_require_later_than(EngineState *s, sci_version_t version); /* Function used in autodetection (read this function "version_require_later_than_or_equal_to") ** Parameters: (EngineState *) s: EngineState containing the version ** (sci_version_t) version: The version that we're later than */ -int -version_parse(const char *vn, sci_version_t *result); +int version_parse(const char *vn, sci_version_t *result); /* Parse a string containing an SCI version number ** Parameters: (char *) vn: The string to parse ** Returns : (int) 0 on success, 1 on failure diff --git a/engines/sci/include/vm_types.h b/engines/sci/include/vm_types.h index c8634ce9a3..5bf0d8114e 100644 --- a/engines/sci/include/vm_types.h +++ b/engines/sci/include/vm_types.h @@ -50,8 +50,7 @@ typedef int selector_t; /* Selector ID */ #define PSTK "ST:%04x" #define PRINT_STK(v) (unsigned) (v - s->stack_base) -static inline reg_t -make_reg(int segment, int offset) { +static inline reg_t make_reg(int segment, int offset) { reg_t r; r.offset = offset; r.segment = segment; diff --git a/engines/sci/include/vocabulary.h b/engines/sci/include/vocabulary.h index f890b3f4ba..52fa8253bb 100644 --- a/engines/sci/include/vocabulary.h +++ b/engines/sci/include/vocabulary.h @@ -191,14 +191,14 @@ typedef struct { /*FIXME: These need freeing functions...*/ -int* vocabulary_get_classes(ResourceManager *resmgr, int *count); +int *vocabulary_get_classes(ResourceManager *resmgr, int *count); int vocabulary_get_class_count(ResourceManager *resmgr); /** * Returns a null terminated array of selector names. */ -char** vocabulary_get_snames(ResourceManager *resmgr, int *pcount, sci_version_t version); +char **vocabulary_get_snames(ResourceManager *resmgr, int *pcount, sci_version_t version); /** * Frees the aforementioned array @@ -212,10 +212,9 @@ int vocabulary_lookup_sname(char **snames_list, char *sname); /** * Returns a null terminated array of opcodes. */ -opcode* vocabulary_get_opcodes(ResourceManager *resmgr); +opcode *vocabulary_get_opcodes(ResourceManager *resmgr); -void -vocabulary_free_opcodes(opcode *opcodes); +void vocabulary_free_opcodes(opcode *opcodes); /* Frees a previously allocated list of opcodes ** Parameters: (opcode *) opcodes: Opcodes to free ** Returns : (void) @@ -229,13 +228,12 @@ vocabulary_free_opcodes(opcode *opcodes); * The returned array has the same format regardless of the format of the * name table of the resource (the format changed between version 0 and 1). */ -char** vocabulary_get_knames(ResourceManager *resmgr, int* count); +char **vocabulary_get_knames(ResourceManager *resmgr, int* count); void vocabulary_free_knames(char** names); -word_t ** -vocab_get_words(ResourceManager *resmgr, int *word_counter); +word_t **vocab_get_words(ResourceManager *resmgr, int *word_counter); /* Gets all words from the main vocabulary ** Parameters: (ResourceManager *) resmr: The resource manager to read from ** (int *) word_counter: The int which the number of words is stored in @@ -252,8 +250,7 @@ vocab_free_words(word_t **words, int words_nr); */ -suffix_t ** -vocab_get_suffices(ResourceManager *resmgr, int *suffices_nr); +suffix_t **vocab_get_suffices(ResourceManager *resmgr, int *suffices_nr); /* Gets all suffixes from the suffix vocabulary ** Parameters: (ResourceManager*) resmgr: Resource manager the resources are ** read from @@ -261,8 +258,7 @@ vocab_get_suffices(ResourceManager *resmgr, int *suffices_nr); ** Returns : (suffix_t **): A list of suffixes */ -void -vocab_free_suffices(ResourceManager *resmgr, suffix_t **suffices, int suffices_nr); +void vocab_free_suffices(ResourceManager *resmgr, suffix_t **suffices, int suffices_nr); /* Frees suffices_nr suffices ** Parameters: (ResourceManager *) resmgr: The resource manager to free from ** (suffix_t **) suffices: The suffixes to free @@ -270,8 +266,7 @@ vocab_free_suffices(ResourceManager *resmgr, suffix_t **suffices, int suffices_n ** Returns : (void) */ -parse_tree_branch_t * -vocab_get_branches(ResourceManager *resmgr, int *branches_nr); +parse_tree_branch_t *vocab_get_branches(ResourceManager *resmgr, int *branches_nr); /* Retrieves all grammar rules from the resource data ** Parameters: (ResourceManager*) resmgr: Resource manager the rules are ** read from @@ -280,15 +275,13 @@ vocab_get_branches(ResourceManager *resmgr, int *branches_nr); ** Returns : (parse_tree_branch_t *): The rules, or NULL on error */ -void -vocab_free_branches(parse_tree_branch_t *parser_branches); +void vocab_free_branches(parse_tree_branch_t *parser_branches); /* Frees all branches ** Parameters: (parse_tree_branch_t *) parser_branches: The branches to free ** Returns : (null) */ -result_word_t * -vocab_lookup_word(char *word, int word_len, +result_word_t *vocab_lookup_word(char *word, int word_len, word_t **words, int words_nr, suffix_t **suffices, int suffices_nr); /* Looks up a single word in the words and suffixes list @@ -303,8 +296,7 @@ vocab_lookup_word(char *word, int word_len, */ -result_word_t * -vocab_tokenize_string(char *sentence, int *result_nr, +result_word_t *vocab_tokenize_string(char *sentence, int *result_nr, word_t **words, int words_nr, suffix_t **suffices, int suffices_nr, char **error); @@ -323,8 +315,7 @@ vocab_tokenize_string(char *sentence, int *result_nr, */ -parse_rule_list_t * -vocab_build_gnf(parse_tree_branch_t *branches, int branches_nr); +parse_rule_list_t *vocab_build_gnf(parse_tree_branch_t *branches, int branches_nr); /* Constructs the Greibach Normal Form of the grammar supplied in 'branches' ** Parameters: (parse_tree_branch_t *) branches: The parser's branches ** (int) branches_nr: Number of parser branches @@ -337,16 +328,14 @@ vocab_build_gnf(parse_tree_branch_t *branches, int branches_nr); */ -void -vocab_free_rule_list(parse_rule_list_t *rule_list); +void vocab_free_rule_list(parse_rule_list_t *rule_list); /* Frees a parser rule list as returned by vocab_build_gnf() ** Parameters: (parse_rule_list_t *) rule_list: The rule list to free ** Returns : (void) */ -int -vocab_build_parse_tree(parse_tree_node_t *nodes, result_word_t *words, int words_nr, +int vocab_build_parse_tree(parse_tree_node_t *nodes, result_word_t *words, int words_nr, parse_tree_branch_t *branch0, parse_rule_list_t *rules); /* Builds a parse tree from a list of words ** Parameters: (parse_tree_node_t *) nodes: A node list to store the tree in (must have @@ -361,8 +350,7 @@ vocab_build_parse_tree(parse_tree_node_t *nodes, result_word_t *words, int words ** described by the grammar passed in 'rules'. */ -void -vocab_dump_parse_tree(const char *tree_name, parse_tree_node_t *nodes); +void vocab_dump_parse_tree(const char *tree_name, parse_tree_node_t *nodes); /* Prints a parse tree ** Parameters: (const char *) tree_name: Name of the tree to dump (free-form) ** (parse_tree_node_t *) nodes: The nodes containing the parse tree @@ -372,8 +360,7 @@ vocab_dump_parse_tree(const char *tree_name, parse_tree_node_t *nodes); -int -said(EngineState *s, byte *spec, int verbose); +int said(EngineState *s, byte *spec, int verbose); /* Builds a parse tree from a spec and compares it to a parse tree ** Parameters: (EngineState *) s: The affected state ** (byte *) spec: Pointer to the spec to build @@ -381,8 +368,7 @@ said(EngineState *s, byte *spec, int verbose); ** Returns : (int) 1 on a match, 0 otherwise */ -const char * -vocab_get_any_group_word(int group, word_t **words, int words_nr); +const char *vocab_get_any_group_word(int group, word_t **words, int words_nr); /* Gets any word from the specified group. ** Parameters: (int) group: Group number. ** (word_t **) words: List of words @@ -391,8 +377,7 @@ vocab_get_any_group_word(int group, word_t **words, int words_nr); */ -void -vocab_decypher_said_block(EngineState *s, byte *pos); +void vocab_decypher_said_block(EngineState *s, byte *pos); /* Decyphers a said block and dumps its content via sciprintf. ** Parameters: (EngineState *) s: The state to use ** (byte *) pos: Pointer to the data to dump @@ -400,8 +385,7 @@ vocab_decypher_said_block(EngineState *s, byte *pos); */ -void -vocab_synonymize_tokens(result_word_t *words, int words_nr, synonym_t *synonyms, int synonyms_nr); +void vocab_synonymize_tokens(result_word_t *words, int words_nr, synonym_t *synonyms, int synonyms_nr); /* Synonymizes a token list ** Parameters: (result_wort_t *) words: The word list to synonymize ** (int) words_nr: Number of word_ts in the list @@ -409,12 +393,10 @@ vocab_synonymize_tokens(result_word_t *words, int words_nr, synonym_t *synonyms, ** (int) synonyms_nr: Number of synonyms in the list */ -int -vocab_gnf_parse(parse_tree_node_t *nodes, result_word_t *words, int words_nr, +int vocab_gnf_parse(parse_tree_node_t *nodes, result_word_t *words, int words_nr, parse_tree_branch_t *branch0, parse_rule_list_t *tlist, int verbose); -void -vocab_gnf_dump(parse_tree_branch_t *branches, int branches_nr); +void vocab_gnf_dump(parse_tree_branch_t *branches, int branches_nr); } // End of namespace Sci |