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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Thu Mar 12 04:26:47 CET 2009


Revision: 39352
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39352&view=rev
Author:   fingolfin
Date:     2009-03-12 03:26:47 +0000 (Thu, 12 Mar 2009)

Log Message:
-----------
SCI: Removed most uses of the 'inline' keyword. It is  usually better to let the compiler figure out what to inline. As it is, most of these looked as if they were randomly placed ;)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/grammar.cpp
    scummvm/trunk/engines/sci/engine/kernel.cpp
    scummvm/trunk/engines/sci/engine/kgraphics.cpp
    scummvm/trunk/engines/sci/engine/klists.cpp
    scummvm/trunk/engines/sci/engine/said.cpp
    scummvm/trunk/engines/sci/engine/said.y
    scummvm/trunk/engines/sci/engine/scriptdebug.cpp
    scummvm/trunk/engines/sci/engine/seg_manager.cpp
    scummvm/trunk/engines/sci/engine/seg_manager.h
    scummvm/trunk/engines/sci/engine/stringfrag.cpp
    scummvm/trunk/engines/sci/engine/vm.cpp
    scummvm/trunk/engines/sci/gfx/font.cpp
    scummvm/trunk/engines/sci/gfx/gfx_pixmap_scale.cpp
    scummvm/trunk/engines/sci/gfx/gfx_res_options.cpp
    scummvm/trunk/engines/sci/gfx/gfx_resource.cpp
    scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp
    scummvm/trunk/engines/sci/gfx/operations.cpp
    scummvm/trunk/engines/sci/gfx/resource/res_pic.cpp
    scummvm/trunk/engines/sci/gfx/sci_widgets.cpp
    scummvm/trunk/engines/sci/sfx/seq/oss-adlib.cpp
    scummvm/trunk/engines/sci/sfx/softseq/SN76496.cpp
    scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp

Modified: scummvm/trunk/engines/sci/engine/grammar.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/grammar.cpp	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/engine/grammar.cpp	2009-03-12 03:26:47 UTC (rev 39352)
@@ -237,7 +237,7 @@
 	}
 }
 
-static inline int _rules_equal_p(parse_rule_t *r1, parse_rule_t *r2) {
+static int _rules_equal_p(parse_rule_t *r1, parse_rule_t *r2) {
 	if ((r1->id != r2->id) || (r1->length != r2->length) || (r1->first_special != r2->first_special))
 		return 0;
 

Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp	2009-03-12 03:26:47 UTC (rev 39352)
@@ -922,7 +922,7 @@
 		return (*sig == 0 || (*sig & KSIG_ELLIPSIS));
 }
 
-static inline void *_kernel_dereference_pointer(EngineState *s, reg_t pointer, int entries, int align) {
+static void *_kernel_dereference_pointer(EngineState *s, reg_t pointer, int entries, int align) {
 	int maxsize;
 	void *retval = s->seg_manager->dereference(pointer, &maxsize);
 

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-03-12 03:26:47 UTC (rev 39352)
@@ -401,11 +401,6 @@
 	return s->r_acc;
 }
 
-static inline void _ascertain_port_contents(gfxw_port_t *port) {
-	if (!port->contents)
-		port->contents = (gfxw_widget_t *) gfxw_new_list(port->bounds, 0);
-}
-
 reg_t kShow(EngineState *s, int funct_nr, int argc, reg_t *argv) {
 	int old_map = s->pic_visible_map;
 
@@ -1672,7 +1667,7 @@
 	ADD_TO_CURRENT_PICTURE_PORT(box);
 }
 
-static inline void draw_obj_to_control_map(EngineState *s, gfxw_dyn_view_t *view) {
+static void draw_obj_to_control_map(EngineState *s, gfxw_dyn_view_t *view) {
 	reg_t obj = make_reg(view->ID, view->subID);
 
 	if (!is_object(s, obj))

Modified: scummvm/trunk/engines/sci/engine/klists.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/klists.cpp	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/engine/klists.cpp	2009-03-12 03:26:47 UTC (rev 39352)
@@ -28,12 +28,7 @@
 
 namespace Sci {
 
-#ifdef LOOKUP_NODE
-#  undef LOOKUP_NODE
-#  define LOOKUP_NODE(addr) inline_lookup_node(s, (addr), __FILE__, __LINE__)
-#endif
-
-inline Node *inline_lookup_node(EngineState *s, reg_t addr, const char *file, int line) {
+Node *lookup_node(EngineState *s, reg_t addr, const char *file, int line) {
 	MemObject *mobj;
 	NodeTable *nt;
 
@@ -61,13 +56,9 @@
 	return &(nt->table[addr.offset].entry);
 }
 
-Node *lookup_node(EngineState *s, reg_t addr, const char *file, int line) {
-	return inline_lookup_node(s, addr, file, line);
-}
-
 #define LOOKUP_NULL_LIST(addr) _lookup_list(s, addr, __FILE__, __LINE__, 1)
 
-inline List *_lookup_list(EngineState *s, reg_t addr, const char *file, int line, int may_be_null) {
+List *_lookup_list(EngineState *s, reg_t addr, const char *file, int line, int may_be_null) {
 	MemObject *mobj;
 	ListTable *lt;
 
@@ -104,7 +95,7 @@
 
 #else
 
-static inline int sane_nodep(EngineState *s, reg_t addr) {
+static int sane_nodep(EngineState *s, reg_t addr) {
 	int have_prev = 0;
 	reg_t prev = addr;
 
@@ -196,7 +187,7 @@
 	return s->r_acc;
 }
 
-inline reg_t _k_new_node(EngineState *s, reg_t value, reg_t key) {
+reg_t _k_new_node(EngineState *s, reg_t value, reg_t key) {
 	reg_t nodebase;
 	Node *n = s->seg_manager->alloc_Node(&nodebase);
 
@@ -253,7 +244,7 @@
 	return make_reg(0, ((l) ? IS_NULL_REG(l->first) : 0));
 }
 
-inline void _k_add_to_front(EngineState *s, reg_t listbase, reg_t nodebase) {
+void _k_add_to_front(EngineState *s, reg_t listbase, reg_t nodebase) {
 	List *l = LOOKUP_LIST(listbase);
 	Node *new_n = LOOKUP_NODE(nodebase);
 
@@ -276,7 +267,7 @@
 	l->first = nodebase;
 }
 
-inline void _k_add_to_end(EngineState *s, reg_t listbase, reg_t nodebase) {
+void _k_add_to_end(EngineState *s, reg_t listbase, reg_t nodebase) {
 	List *l = LOOKUP_LIST(listbase);
 	Node *new_n = LOOKUP_NODE(nodebase);
 

Modified: scummvm/trunk/engines/sci/engine/said.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/said.cpp	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/engine/said.cpp	2009-03-12 03:26:47 UTC (rev 39352)
@@ -1903,13 +1903,13 @@
 	return retval;
 }
 
-static inline int said_next_node() {
+static int said_next_node() {
 	return ((said_tree_pos == 0) || (said_tree_pos >= VOCAB_TREE_NODES)) ? said_tree_pos = 0 : said_tree_pos++;
 }
 
 #define SAID_NEXT_NODE said_next_node()
 
-static inline int said_leaf_node(tree_t pos, int value) {
+static int said_leaf_node(tree_t pos, int value) {
 	said_tree[pos].type = PARSE_TREE_NODE_LEAF;
 
 	if (value != VALUE_IGNORE)
@@ -1918,7 +1918,7 @@
 	return pos;
 }
 
-static inline int said_branch_node(tree_t pos, int left, int right) {
+static int said_branch_node(tree_t pos, int left, int right) {
 	said_tree[pos].type = PARSE_TREE_NODE_BRANCH;
 
 	if (left != VALUE_IGNORE)
@@ -2180,7 +2180,7 @@
 }
 
 
-static inline int aug_contains_word(int *list, int length, int word) {
+static int aug_contains_word(int *list, int length, int word) {
 	int i;
 
 	if (word == ANYWORD)

Modified: scummvm/trunk/engines/sci/engine/said.y
===================================================================
--- scummvm/trunk/engines/sci/engine/said.y	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/engine/said.y	2009-03-12 03:26:47 UTC (rev 39352)
@@ -259,13 +259,13 @@
 	return retval;
 }
 
-static inline int said_next_node() {
+static int said_next_node() {
 	return ((said_tree_pos == 0) || (said_tree_pos >= VOCAB_TREE_NODES)) ? said_tree_pos = 0 : said_tree_pos++;
 }
 
 #define SAID_NEXT_NODE said_next_node()
 
-static inline int said_leaf_node(tree_t pos, int value) {
+static int said_leaf_node(tree_t pos, int value) {
 	said_tree[pos].type = PARSE_TREE_NODE_LEAF;
 
 	if (value != VALUE_IGNORE)
@@ -274,7 +274,7 @@
 	return pos;
 }
 
-static inline int said_branch_node(tree_t pos, int left, int right) {
+static int said_branch_node(tree_t pos, int left, int right) {
 	said_tree[pos].type = PARSE_TREE_NODE_BRANCH;
 
 	if (left != VALUE_IGNORE)
@@ -536,7 +536,7 @@
 }
 
 
-static inline int aug_contains_word(int *list, int length, int word) {
+static int aug_contains_word(int *list, int length, int word) {
 	int i;
 
 	if (word == ANYWORD)

Modified: scummvm/trunk/engines/sci/engine/scriptdebug.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-03-12 03:26:47 UTC (rev 39352)
@@ -101,7 +101,7 @@
 	return inputbuf;
 }
 
-static inline int _parse_ticks(byte *data, int *offset_p, int size) {
+static int _parse_ticks(byte *data, int *offset_p, int size) {
 	int ticks = 0;
 	int tempticks;
 	int offset = 0;

Modified: scummvm/trunk/engines/sci/engine/seg_manager.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.cpp	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/engine/seg_manager.cpp	2009-03-12 03:26:47 UTC (rev 39352)
@@ -54,7 +54,7 @@
 
 #define INVALID_SCRIPT_ID -1
 
-inline int SegManager::findFreeId(int *id) {
+int SegManager::findFreeId(int *id) {
 	bool was_added = false;
 	int retval = 0;
 
@@ -719,7 +719,7 @@
 }
 #endif
 
-inline int SegManager::relocateBlock(reg_t *block, int block_location, int block_items, SegmentId segment, int location) {
+int SegManager::relocateBlock(reg_t *block, int block_location, int block_items, SegmentId segment, int location) {
 	int rel = location - block_location;
 	int index;
 
@@ -742,14 +742,14 @@
 	return 1;
 }
 
-inline int SegManager::relocateLocal(Script *scr, SegmentId segment, int location) {
+int SegManager::relocateLocal(Script *scr, SegmentId segment, int location) {
 	if (scr->locals_block)
 		return relocateBlock(scr->locals_block->locals, scr->locals_offset, scr->locals_block->nr, segment, location);
 	else
 		return 0; // No hands, no cookies
 }
 
-inline int SegManager::relocateObject(Object *obj, SegmentId segment, int location) {
+int SegManager::relocateObject(Object *obj, SegmentId segment, int location) {
 	return relocateBlock(obj->variables, obj->pos.offset, obj->variables_nr, segment, location);
 }
 
@@ -1186,7 +1186,7 @@
 }
 
 /*
-static inline char *SegManager::dynprintf(char *msg, ...) {
+static char *SegManager::dynprintf(char *msg, ...) {
 	va_list argp;
 	char *buf = (char *)sci_malloc(strlen(msg) + 100);
 

Modified: scummvm/trunk/engines/sci/engine/seg_manager.h
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.h	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/engine/seg_manager.h	2009-03-12 03:26:47 UTC (rev 39352)
@@ -431,11 +431,11 @@
 	Hunk *alloc_Hunk(reg_t *);
 	void free_Hunk(reg_t addr);
 
-	inline int relocateLocal(Script *scr, SegmentId segment, int location);
-	inline int relocateBlock(reg_t *block, int block_location, int block_items, SegmentId segment, int location);
-	inline int relocateObject(Object *obj, SegmentId segment, int location);
+	int relocateLocal(Script *scr, SegmentId segment, int location);
+	int relocateBlock(reg_t *block, int block_location, int block_items, SegmentId segment, int location);
+	int relocateObject(Object *obj, SegmentId segment, int location);
 
-	inline int findFreeId(int *id);
+	int findFreeId(int *id);
 	static void setScriptSize(MemObject *mem, EngineState *s, int script_nr);
 	Object *scriptObjInit0(EngineState *s, reg_t obj_pos);
 	Object *scriptObjInit11(EngineState *s, reg_t obj_pos);

Modified: scummvm/trunk/engines/sci/engine/stringfrag.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/stringfrag.cpp	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/engine/stringfrag.cpp	2009-03-12 03:26:47 UTC (rev 39352)
@@ -166,7 +166,7 @@
 	internal_stringfrag_append_char(s, buffer, c);
 }
 
-inline void stringfrag_setchar(reg_t *buffer, int pos, int offset, unsigned char c) {
+void stringfrag_setchar(reg_t *buffer, int pos, int offset, unsigned char c) {
 	switch (offset) {
 	case 0 :
 		buffer[pos].offset = (buffer[pos].offset & 0x00ff) | (c << 8);
@@ -177,7 +177,7 @@
 	}
 }
 
-inline unsigned char stringfrag_getchar(reg_t *buffer, int pos, int offset) {
+unsigned char stringfrag_getchar(reg_t *buffer, int pos, int offset) {
 	switch (offset) {
 	case 0 :
 		return buffer[pos].offset >> 8;

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2009-03-12 03:26:47 UTC (rev 39352)
@@ -65,7 +65,7 @@
 
 #ifndef DISABLE_VALIDATIONS
 
-static inline reg_t &validate_property(Object *obj, int index) {
+static reg_t &validate_property(Object *obj, int index) {
 	if (!obj) {
 		if (sci_debug_flags & 4)
 			sciprintf("[VM] Sending to disposed object!\n");
@@ -85,7 +85,7 @@
 	return obj->variables[index];
 }
 
-static inline StackPtr validate_stack_addr(EngineState *s, StackPtr sp) {
+static StackPtr validate_stack_addr(EngineState *s, StackPtr sp) {
 	if (sp >= s->stack_base && sp < s->stack_top)
 		return sp;
 
@@ -95,7 +95,7 @@
 	return 0;
 }
 
-static inline int validate_arithmetic(reg_t reg) {
+static int validate_arithmetic(reg_t reg) {
 	if (reg.segment) {
 		if (!_weak_validations)
 			script_debug_flag = script_error_flag = 1;
@@ -107,7 +107,7 @@
 	return reg.offset;
 }
 
-static inline int signed_validate_arithmetic(reg_t reg) {
+static int signed_validate_arithmetic(reg_t reg) {
 	if (reg.segment) {
 		if (!_weak_validations)
 			script_debug_flag = script_error_flag = 1;
@@ -122,7 +122,7 @@
 		return reg.offset;
 }
 
-static inline int validate_variable(reg_t *r, reg_t *stack_base, int type, int max, int index, int line) {
+static int validate_variable(reg_t *r, reg_t *stack_base, int type, int max, int index, int line) {
 	const char *names[4] = {"global", "local", "temp", "param"};
 
 	if (index < 0 || index >= max) {
@@ -154,14 +154,14 @@
 	return 0;
 }
 
-static inline reg_t validate_read_var(reg_t *r, reg_t *stack_base, int type, int max, int index, int line, reg_t default_value) {
+static reg_t validate_read_var(reg_t *r, reg_t *stack_base, int type, int max, int index, int line, reg_t default_value) {
 	if (!validate_variable(r, stack_base, type, max, index, line))
 		return r[index];
 	else
 		return default_value;
 }
 
-static inline void validate_write_var(reg_t *r, reg_t *stack_base, int type, int max, int index, int line, reg_t value) {
+static void validate_write_var(reg_t *r, reg_t *stack_base, int type, int max, int index, int line, reg_t value) {
 	if (!validate_variable(r, stack_base, type, max, index, line))
 		r[index] = value;
 }
@@ -252,7 +252,7 @@
 #define OBJ_SUPERCLASS(s, reg) SEG_GET_HEAP(s, make_reg(reg.segment, reg.offset + SCRIPT_SUPERCLASS_OFFSET))
 // Returns an object's superclass
 
-inline ExecStack *execute_method(EngineState *s, uint16 script, uint16 pubfunct, StackPtr sp, reg_t calling_obj, uint16 argc, StackPtr argp) {
+ExecStack *execute_method(EngineState *s, uint16 script, uint16 pubfunct, StackPtr sp, reg_t calling_obj, uint16 argc, StackPtr argp) {
 	int seg;
 	uint16 temp;
 
@@ -534,7 +534,7 @@
 	error("Could not recover, exitting...\n");
 }
 
-static inline Script *script_locate_by_segment(EngineState *s, SegmentId seg) {
+static Script *script_locate_by_segment(EngineState *s, SegmentId seg) {
 	MemObject *memobj = GET_SEGMENT(*s->seg_manager, seg, MEM_OBJ_SCRIPT);
 	if (memobj)
 		return &(memobj->data.script);
@@ -571,7 +571,7 @@
 	}
 }
 
-static inline void gc_countdown(EngineState *s) {
+static void gc_countdown(EngineState *s) {
 	if (s->gc_countdown-- <= 0) {
 		s->gc_countdown = script_gc_interval;
 		run_gc(s);
@@ -1476,7 +1476,7 @@
 	}
 }
 
-static inline int _obj_locate_varselector(EngineState *s, Object *obj, Selector slc) {
+static int _obj_locate_varselector(EngineState *s, Object *obj, Selector slc) {
 	// Determines if obj explicitly defines slc as a varselector
 	// Returns -1 if not found
 
@@ -1509,7 +1509,7 @@
 	}
 }
 
-static inline int _class_locate_funcselector(EngineState *s, Object *obj, Selector slc) {
+static int _class_locate_funcselector(EngineState *s, Object *obj, Selector slc) {
 	// Determines if obj is a class and explicitly defines slc as a funcselector
 	// Does NOT say anything about obj's superclasses, i.e. failure may be
 	// returned even if one of the superclasses defines the funcselector.
@@ -1523,7 +1523,7 @@
 	return -1; // Failed
 }
 
-static inline SelectorType _lookup_selector_function(EngineState *s, int seg_id, Object *obj, Selector selector_id, reg_t *fptr) {
+static SelectorType _lookup_selector_function(EngineState *s, int seg_id, Object *obj, Selector selector_id, reg_t *fptr) {
 	int index;
 
 	// "recursive" lookup

Modified: scummvm/trunk/engines/sci/gfx/font.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/font.cpp	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/gfx/font.cpp	2009-03-12 03:26:47 UTC (rev 39352)
@@ -164,7 +164,7 @@
 	return fragments;
 }
 
-static inline void render_char(byte *dest, byte *src, int width, int line_width, int lines, int bytes_per_src_line, int fg0, int fg1, int bg) {
+static void render_char(byte *dest, byte *src, int width, int line_width, int lines, int bytes_per_src_line, int fg0, int fg1, int bg) {
 	int x, y;
 
 	for (y = 0; y < lines; y++) {

Modified: scummvm/trunk/engines/sci/gfx/gfx_pixmap_scale.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_pixmap_scale.cpp	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/gfx/gfx_pixmap_scale.cpp	2009-03-12 03:26:47 UTC (rev 39352)
@@ -288,7 +288,7 @@
 
 #ifndef GFX_GET_PIXEL_DELTA
 #define GFX_GET_PIXEL_DELTA
-static inline void gfx_get_pixel_delta(unsigned int *color, int *delta, unsigned int *pixel0, unsigned int *pixel1) {
+static void gfx_get_pixel_delta(unsigned int *color, int *delta, unsigned int *pixel0, unsigned int *pixel1) {
 	int j;
 	int transp0 = pixel0[3] == 0xffffff;
 	int transp1 = pixel1[3] == 0xffffff;
@@ -313,7 +313,7 @@
 }
 
 
-static inline void gfx_apply_delta(unsigned int *color, int *delta, int factor) {
+static void gfx_apply_delta(unsigned int *color, int *delta, int factor) {
 	int i;
 
 	for (i = 0; i < 4; i++)

Modified: scummvm/trunk/engines/sci/gfx/gfx_res_options.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_res_options.cpp	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/gfx/gfx_res_options.cpp	2009-03-12 03:26:47 UTC (rev 39352)
@@ -31,10 +31,8 @@
 
 //#define DEBUG
 
-static inline int matches_patternlist(gfx_res_pattern_t *patterns, int nr, int val) {
-	int i;
-
-	for (i = 0; i < nr; i++)
+static int matches_patternlist(gfx_res_pattern_t *patterns, int nr, int val) {
+	for (int i = 0; i < nr; i++)
 		if (patterns[i].min <= val
 		        && patterns[i].max >= val)
 			return 1;
@@ -49,7 +47,7 @@
 }
 #endif
 
-static inline int resource_matches_patternlists(gfx_res_conf_t *conf, int type, int nr, int loop, int cel) {
+static int resource_matches_patternlists(gfx_res_conf_t *conf, int type, int nr, int loop, int cel) {
 	int loc;
 #ifdef DEBUG
 	int i;
@@ -99,7 +97,7 @@
 	return matches_patternlist(conf->patterns + loc, conf->cels_nr, cel);
 }
 
-static inline gfx_res_conf_t *find_match(gfx_res_conf_t *conflist, int type, int nr, int loop, int cel) {
+static gfx_res_conf_t *find_match(gfx_res_conf_t *conflist, int type, int nr, int loop, int cel) {
 	while (conflist) {
 		if (resource_matches_patternlists(conflist, type, nr, loop, cel)) {
 #ifdef DEBUG

Modified: scummvm/trunk/engines/sci/gfx/gfx_resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_resource.cpp	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/gfx/gfx_resource.cpp	2009-03-12 03:26:47 UTC (rev 39352)
@@ -250,7 +250,7 @@
 
 namespace Sci {
 
-static inline void _gfx_xlate_pixmap_unfiltered(gfx_mode_t *mode, gfx_pixmap_t *pxm, int scale) {
+static void _gfx_xlate_pixmap_unfiltered(gfx_mode_t *mode, gfx_pixmap_t *pxm, int scale) {
 	switch (mode->bytespp) {
 
 	case 1:
@@ -283,7 +283,7 @@
 	}
 }
 
-static inline void _gfx_xlate_pixmap_linear(gfx_mode_t *mode, gfx_pixmap_t *pxm, int scale) {
+static void _gfx_xlate_pixmap_linear(gfx_mode_t *mode, gfx_pixmap_t *pxm, int scale) {
 	if (mode->palette || !scale) { // fall back to unfiltered
 		_gfx_xlate_pixmap_unfiltered(mode, pxm, scale);
 		return;
@@ -317,7 +317,7 @@
 
 }
 
-static inline void _gfx_xlate_pixmap_trilinear(gfx_mode_t *mode, gfx_pixmap_t *pxm, int scale) {
+static void _gfx_xlate_pixmap_trilinear(gfx_mode_t *mode, gfx_pixmap_t *pxm, int scale) {
 	if (mode->palette || !scale) { // fall back to unfiltered
 		_gfx_xlate_pixmap_unfiltered(mode, pxm, scale);
 		return;

Modified: scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp	2009-03-12 03:26:47 UTC (rev 39352)
@@ -82,9 +82,8 @@
 #endif
 
 
-static inline void indent(int indentation) {
-	int i;
-	for (i = 0; i < indentation; i++)
+static void indent(int indentation) {
+	for (int i = 0; i < indentation; i++)
 		sciprintf("    ");
 }
 
@@ -161,7 +160,7 @@
 	return widget;
 }
 
-static inline int verify_widget(gfxw_widget_t *widget) {
+static int verify_widget(gfxw_widget_t *widget) {
 	if (!widget) {
 		GFXERROR("Attempt to use NULL widget\n");
 #ifdef GFXW_DEBUG_WIDGETS
@@ -246,7 +245,7 @@
 		return 1; \
 	}
 
-static inline int _color_equals(gfx_color_t a, gfx_color_t b) {
+static int _color_equals(gfx_color_t a, gfx_color_t b) {
 	if (a.mask != b.mask)
 		return 0;
 
@@ -281,7 +280,7 @@
 	return 0;
 }
 
-static inline void _gfxw_set_ops(gfxw_widget_t *widget, gfxw_point_op *draw, gfxw_op *free, gfxw_op *tag, gfxw_op_int *print,
+static void _gfxw_set_ops(gfxw_widget_t *widget, gfxw_point_op *draw, gfxw_op *free, gfxw_op *tag, gfxw_op_int *print,
 	gfxw_bin_op *compare_to, gfxw_bin_op *equals, gfxw_bin_op *superarea_of) {
 	widget->draw = draw;
 	widget->widfree = free;
@@ -374,18 +373,18 @@
 
 //*** Boxes ***
 
-static inline rect_t _move_rect(rect_t rect, Common::Point point) {
+static rect_t _move_rect(rect_t rect, Common::Point point) {
 	return gfx_rect(rect.x + point.x, rect.y + point.y, rect.xl, rect.yl);
 }
 
-static inline void _split_rect(rect_t rect, Common::Point *p1, Common::Point *p2) {
+static void _split_rect(rect_t rect, Common::Point *p1, Common::Point *p2) {
 	p1->x = rect.x;
 	p1->y = rect.y;
 	p2->x = rect.x + rect.xl;
 	p2->y = rect.y + rect.yl;
 }
 
-static inline Common::Point _move_point(rect_t rect, Common::Point point) {
+static Common::Point _move_point(rect_t rect, Common::Point point) {
 	return Common::Point(rect.x + point.x, rect.y + point.y);
 }
 
@@ -446,7 +445,7 @@
 	              _gfxwop_basic_compare_to, _gfxwop_box_equals, _gfxwop_box_superarea_of);
 }
 
-static inline int _gfxw_color_get_priority(gfx_color_t color) {
+static int _gfxw_color_get_priority(gfx_color_t color) {
 	return (color.mask & GFX_MASK_PRIORITY) ? color.priority : -1;
 }
 
@@ -469,7 +468,7 @@
 	return widget;
 }
 
-static inline gfxw_primitive_t *_gfxw_new_primitive(rect_t area, gfx_color_t color, gfx_line_mode_t mode,
+static gfxw_primitive_t *_gfxw_new_primitive(rect_t area, gfx_color_t color, gfx_line_mode_t mode,
 													gfx_line_style_t style, gfxw_widget_type_t type) {
 	gfxw_primitive_t *widget = (gfxw_primitive_t *)_gfxw_new_widget(sizeof(gfxw_primitive_t), type);
 
@@ -1044,7 +1043,7 @@
 	return cont->add_dirty_abs(cont, _move_rect(rect, Common::Point(cont->zone.x, cont->zone.y)), propagate);
 }
 
-static inline void _gfxw_set_container_ops(gfxw_container_t *container, gfxw_point_op *draw, gfxw_op *free, gfxw_op *tag,
+static void _gfxw_set_container_ops(gfxw_container_t *container, gfxw_point_op *draw, gfxw_op *free, gfxw_op *tag,
 	gfxw_op_int *print, gfxw_bin_op *compare_to, gfxw_bin_op *equals,
 	gfxw_bin_op *superarea_of, gfxw_visual_op *set_visual,
 	gfxw_unary_container_op *free_tagged, gfxw_unary_container_op *free_contents,
@@ -1123,7 +1122,7 @@
 
 int ti = 0;
 
-static inline int _gfxw_dirty_rect_overlaps_normal_rect(rect_t port_zone, rect_t bounds, rect_t dirty) {
+static int _gfxw_dirty_rect_overlaps_normal_rect(rect_t port_zone, rect_t bounds, rect_t dirty) {
 	bounds.x += port_zone.x;
 	bounds.y += port_zone.y;
 
@@ -1384,7 +1383,7 @@
 	return 0;
 }
 
-static inline int _w_gfxwop_list_print(gfxw_widget_t *list, const char *name, int indentation) {
+static int _w_gfxwop_list_print(gfxw_widget_t *list, const char *name, int indentation) {
 	_gfxw_print_widget(list, indentation);
 	sciprintf("%s", name);
 

Modified: scummvm/trunk/engines/sci/gfx/operations.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/operations.cpp	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/gfx/operations.cpp	2009-03-12 03:26:47 UTC (rev 39352)
@@ -294,7 +294,7 @@
 
 //** Dirty rectangle operations **
 
-static inline int _gfxop_update_box(gfx_state_t *state, rect_t box) {
+static int _gfxop_update_box(gfx_state_t *state, rect_t box) {
 	int retval;
 	_gfxop_scale_rect(&box, state->driver->mode);
 
@@ -373,7 +373,7 @@
 	state->dirty_rects = gfxdr_add_dirty(state->dirty_rects, box, state->options->dirty_frames);
 }
 
-static inline void _gfxop_add_dirty_x(gfx_state_t *state, rect_t box) {
+static void _gfxop_add_dirty_x(gfx_state_t *state, rect_t box) {
 	// Extends the box size by one before adding (used for lines)
 	if (box.xl < 0)
 		box.xl--;

Modified: scummvm/trunk/engines/sci/gfx/resource/res_pic.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/res_pic.cpp	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/gfx/resource/res_pic.cpp	2009-03-12 03:26:47 UTC (rev 39352)
@@ -342,13 +342,13 @@
 #endif
 
 
-static inline void _gfxr_auxbuf_tag_line(gfxr_pic_t *pic, int pos, int width) {
-	int i;
-	for (i = 0; i < width; i++)
+#if 0
+// Unreferenced - removed
+static void _gfxr_auxbuf_tag_line(gfxr_pic_t *pic, int pos, int width) {
+	for (int i = 0; i < width; i++)
 		pic->aux_map[i+pos] |= FRESH_PAINT;
 }
 
-#if 0
 // Unreferenced - removed
 static void _gfxr_auxbuf_spread(gfxr_pic_t *pic, int *min_x, int *min_y, int *max_x, int *max_y) {
 	// Tries to spread by approximating the first derivation of the border function.
@@ -626,7 +626,7 @@
 	}
 }
 
-static inline void _gfxr_auxplot_brush(gfxr_pic_t *pic, byte *buffer, int yoffset, int offset, int plot,
+static void _gfxr_auxplot_brush(gfxr_pic_t *pic, byte *buffer, int yoffset, int offset, int plot,
 	int color, gfx_brush_mode_t brush_mode, int randseed) {
 	// yoffset 63680, offset 320, plot 1, color 34, brush_mode 0, randseed 432)*/
 	// Auxplot: Used by plot_aux_pattern to plot to visual and priority
@@ -910,7 +910,7 @@
 	}
 }
 
-static inline void _gfxr_draw_subline(gfxr_pic_t *pic, int x, int y, int ex, int ey, int color, int priority, int drawenable) {
+static void _gfxr_draw_subline(gfxr_pic_t *pic, int x, int y, int ex, int ey, int color, int priority, int drawenable) {
 	Common::Point start;
 	Common::Point end;
 
@@ -1065,7 +1065,7 @@
 		} \
 	}
 
-static inline int _gfxr_find_fill_point(gfxr_pic_t *pic, int min_x, int min_y, int max_x, int max_y, int x_320,
+static int _gfxr_find_fill_point(gfxr_pic_t *pic, int min_x, int min_y, int max_x, int max_y, int x_320,
 	int y_200, int color, int drawenable, int *x, int *y) {
 	// returns -1 on failure, 0 on success
 	int linewidth = pic->mode->xfact * 320;
@@ -1194,7 +1194,7 @@
 	x = oldx + *((signed char *) resource + pos++);
 
 
-inline static void check_and_remove_artifact(byte *dest, byte* srcp, int legalcolor, byte l, byte r, byte u, byte d) {
+static void check_and_remove_artifact(byte *dest, byte* srcp, int legalcolor, byte l, byte r, byte u, byte d) {
 	if (*dest == legalcolor) {
 		if (*srcp == legalcolor)
 			return;

Modified: scummvm/trunk/engines/sci/gfx/sci_widgets.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/sci_widgets.cpp	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/gfx/sci_widgets.cpp	2009-03-12 03:26:47 UTC (rev 39352)
@@ -258,7 +258,7 @@
 
 //*** Controls ***
 
-static inline rect_t _move_and_extend_rect(rect_t rect, Common::Point point, int yplus) {
+static rect_t _move_and_extend_rect(rect_t rect, Common::Point point, int yplus) {
 	return gfx_rect(rect.x + point.x, rect.y + point.y, rect.xl + 1, rect.yl + yplus);
 }
 
@@ -586,7 +586,7 @@
 
 #define MAGIC_ID_OFFSET 0x2000
 
-static inline gfx_color_t un_prioritize(gfx_color_t col) {
+static gfx_color_t un_prioritize(gfx_color_t col) {
 	col.priority = -1;
 	col.mask &= ~GFX_MASK_PRIORITY;
 

Modified: scummvm/trunk/engines/sci/sfx/seq/oss-adlib.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/seq/oss-adlib.cpp	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/sfx/seq/oss-adlib.cpp	2009-03-12 03:26:47 UTC (rev 39352)
@@ -258,7 +258,7 @@
 	return 0;
 }
 
-static inline int midi_adlib_event1(uint8 command, uint8 note, uint8 velocity) {
+static int midi_adlib_event1(uint8 command, uint8 note, uint8 velocity) {
 	uint8 channel, oper;
 
 	channel = command & 0x0f;
@@ -291,7 +291,7 @@
 	return 0;
 }
 
-static inline int midi_adlib_event2(uint8 command, uint8 param) {
+static int midi_adlib_event2(uint8 command, uint8 param) {
 	uint8 channel;
 	uint8 oper;
 

Modified: scummvm/trunk/engines/sci/sfx/softseq/SN76496.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/SN76496.cpp	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/sfx/softseq/SN76496.cpp	2009-03-12 03:26:47 UTC (rev 39352)
@@ -147,7 +147,7 @@
 	53159
 };
 
-static inline int get_freq(int note) {
+static int get_freq(int note) {
 	int halftone_delta = note - BASE_NOTE;
 	int oct_diff = ((halftone_delta + BASE_OCTAVE * 12) / 12) - BASE_OCTAVE;
 	int halftone_index = (halftone_delta + (12 * 100)) % 12 ;

Modified: scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp	2009-03-12 03:26:21 UTC (rev 39351)
+++ scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp	2009-03-12 03:26:47 UTC (rev 39352)
@@ -157,25 +157,25 @@
 
 /* more shamelessly lifted from xmp and adplug.  And altered.  :) */
 
-static inline int opl_write_L(int a, int v) {
+static int opl_write_L(int a, int v) {
 	adlib_reg_L[a] = v;
 	OPLWrite(ym3812_L, 0x388, a);
 	return OPLWrite(ym3812_L, 0x389, v);
 }
 
-static inline int opl_write_R(int a, int v) {
+static int opl_write_R(int a, int v) {
 	adlib_reg_R[a] = v;
 	OPLWrite(ym3812_R, 0x388, a);
 	return OPLWrite(ym3812_R, 0x389, v);
 }
 
-static inline int opl_write(int a, int v) {
+static int opl_write(int a, int v) {
 	opl_write_L(a, v);
 	return opl_write_R(a, v);
 }
 
 /*
-static inline uint8 opl_read (int a) {
+static uint8 opl_read (int a) {
 	OPLWrite (ym3812_L, 0x388, a);
 	return OPLRead (ym3812_L, 0x389);
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list