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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sat Feb 21 22:16:42 CET 2009


Revision: 38746
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38746&view=rev
Author:   fingolfin
Date:     2009-02-21 21:16:41 +0000 (Sat, 21 Feb 2009)

Log Message:
-----------
SCI: Got rid of include/scitypes.h

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/heap.cpp
    scummvm/trunk/engines/sci/engine/heap.h
    scummvm/trunk/engines/sci/engine/kgraphics.cpp
    scummvm/trunk/engines/sci/engine/kmath.cpp
    scummvm/trunk/engines/sci/engine/kmovement.cpp
    scummvm/trunk/engines/sci/engine/kscripts.cpp
    scummvm/trunk/engines/sci/engine/ksound.cpp
    scummvm/trunk/engines/sci/engine/kstring.cpp
    scummvm/trunk/engines/sci/engine/savegame.cfsml
    scummvm/trunk/engines/sci/engine/savegame.cpp
    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/vm.cpp
    scummvm/trunk/engines/sci/gfx/gfx_resource.cpp
    scummvm/trunk/engines/sci/gfx/gfx_system.h
    scummvm/trunk/engines/sci/gfx/operations.cpp
    scummvm/trunk/engines/sci/gfx/resource/sci_view_1.cpp
    scummvm/trunk/engines/sci/include/kernel.h
    scummvm/trunk/engines/sci/include/sciresource.h
    scummvm/trunk/engines/sci/include/versions.h
    scummvm/trunk/engines/sci/include/vm.h
    scummvm/trunk/engines/sci/include/vm_types.h
    scummvm/trunk/engines/sci/scicore/decompress0.cpp
    scummvm/trunk/engines/sci/scicore/decompress01.cpp
    scummvm/trunk/engines/sci/scicore/decompress1.cpp
    scummvm/trunk/engines/sci/scicore/decompress11.cpp
    scummvm/trunk/engines/sci/scicore/resource_patch.cpp
    scummvm/trunk/engines/sci/scicore/sci_memory.cpp
    scummvm/trunk/engines/sci/sfx/adlib.cpp
    scummvm/trunk/engines/sci/sfx/adlib.h
    scummvm/trunk/engines/sci/sfx/mixer/soft.cpp
    scummvm/trunk/engines/sci/sfx/seq/gm.cpp
    scummvm/trunk/engines/sci/sfx/seq/map-mt32-to-gm.cpp
    scummvm/trunk/engines/sci/sfx/seq/oss-adlib.cpp
    scummvm/trunk/engines/sci/sfx/sequencer.h
    scummvm/trunk/engines/sci/sfx/sfx_iterator.h
    scummvm/trunk/engines/sci/sfx/sfx_pcm.h
    scummvm/trunk/engines/sci/sfx/sfx_songlib.h
    scummvm/trunk/engines/sci/sfx/softseq/SN76496.cpp
    scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp
    scummvm/trunk/engines/sci/sfx/softseq/fluidsynth.cpp
    scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp
    scummvm/trunk/engines/sci/sfx/softseq/pcspeaker.cpp
    scummvm/trunk/engines/sci/tools.h

Removed Paths:
-------------
    scummvm/trunk/engines/sci/include/scitypes.h

Modified: scummvm/trunk/engines/sci/engine/heap.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/heap.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/engine/heap.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -46,12 +46,12 @@
 
 static unsigned int get_size(heap_t *h, int block_pos) {
 	assert_in_range(block_pos);
-	return (guint16)getInt16(h->start + block_pos);
+	return (uint16)getInt16(h->start + block_pos);
 }
 
 static unsigned int get_next(heap_t *h, int block_pos) {
 	assert_in_range(block_pos);
-	return (guint16)getInt16(h->start + block_pos + 2);
+	return (uint16)getInt16(h->start + block_pos + 2);
 }
 
 // Allocates a new heap

Modified: scummvm/trunk/engines/sci/engine/heap.h
===================================================================
--- scummvm/trunk/engines/sci/engine/heap.h	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/engine/heap.h	2009-02-21 21:16:41 UTC (rev 38746)
@@ -32,7 +32,7 @@
 
 #define SCI_HEAP_SIZE 0x10000
 
-typedef guint16 heap_ptr;
+typedef uint16 heap_ptr;
 
 typedef struct {
 	byte *start;

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -675,7 +675,7 @@
 	return make_reg(0, PRIORITY_BAND_FIRST(priority));
 }
 
-void _k_dirloop(reg_t obj, word angle, EngineState *s, int funct_nr, int argc, reg_t *argv) {
+void _k_dirloop(reg_t obj, uint16 angle, EngineState *s, int funct_nr, int argc, reg_t *argv) {
 	int view = GET_SEL32V(obj, view);
 	int signal = GET_SEL32V(obj, signal);
 	int loop;
@@ -780,13 +780,13 @@
 	reg_t cliplist_ref = KP_ALT(1, NULL_REG);
 	list_t *cliplist = NULL;
 	gfxw_port_t *port = s->picture_port;
-	word signal;
+	uint16 signal;
 	int retval;
 
 	abs_rect_t abs_zone;
 	rect_t zone;
-	word edgehit;
-	word illegal_bits;
+	uint16 edgehit;
+	uint16 illegal_bits;
 
 	abs_zone.x = GET_SEL32SV(obj, brLeft);
 	abs_zone.xend = GET_SEL32SV(obj, brRight);
@@ -1362,7 +1362,7 @@
 	reg_t event = argv[1];
 
 	if (obj.segment) {
-		word ct_type = GET_SEL32V(obj, type);
+		uint16 ct_type = GET_SEL32V(obj, type);
 		switch (ct_type) {
 
 		case 0:
@@ -1564,7 +1564,7 @@
 	case K_CONTROL_BUTTON:
 		SCIkdebug(SCIkGRAPHICS, "drawing button "PREG" to %d,%d\n", PRINT_REG(obj), x, y);
 		ADD_TO_CURRENT_BG_WIDGETS(sciw_new_button_control(s->port, obj, area, text, font_nr,
-		                          (gint8)(state & CONTROL_STATE_FRAMED), (gint8)inverse, (gint8)(state & CONTROL_STATE_GRAY)));
+		                          (int8)(state & CONTROL_STATE_FRAMED), (int8)inverse, (int8)(state & CONTROL_STATE_GRAY)));
 		break;
 
 	case K_CONTROL_TEXT:
@@ -1573,7 +1573,7 @@
 		SCIkdebug(SCIkGRAPHICS, "drawing text "PREG" to %d,%d, mode=%d\n", PRINT_REG(obj), x, y, mode);
 
 		ADD_TO_CURRENT_BG_WIDGETS(sciw_new_text_control(s->port, obj, area, text, font_nr, mode,
-									(gint8)(!!(state & CONTROL_STATE_DITHER_FRAMED)), (gint8)inverse));
+									(int8)(!!(state & CONTROL_STATE_DITHER_FRAMED)), (int8)inverse));
 		break;
 
 	case K_CONTROL_EDIT:
@@ -1589,7 +1589,7 @@
 			update_cursor_limits(&s->save_dir_edit_offset, &cursor, max);
 
 		update_cursor_limits(&s->save_dir_edit_offset, &cursor, max);
-		ADD_TO_CURRENT_BG_WIDGETS(sciw_new_edit_control(s->port, obj, area, text, font_nr, (unsigned)cursor, (gint8)inverse));
+		ADD_TO_CURRENT_BG_WIDGETS(sciw_new_edit_control(s->port, obj, area, text, font_nr, (unsigned)cursor, (int8)inverse));
 		break;
 
 	case K_CONTROL_ICON:
@@ -1597,7 +1597,7 @@
 		SCIkdebug(SCIkGRAPHICS, "drawing icon control "PREG" to %d,%d\n", PRINT_REG(obj), x, y - 1);
 
 		ADD_TO_CURRENT_BG_WIDGETS(sciw_new_icon_control(s->port, obj, area, view, loop, cel,
-		                          (gint8)(state & CONTROL_STATE_FRAMED), (gint8)inverse));
+		                          (int8)(state & CONTROL_STATE_FRAMED), (int8)inverse));
 		break;
 
 	case K_CONTROL_CONTROL:
@@ -1635,7 +1635,7 @@
 		}
 
 		ADD_TO_CURRENT_BG_WIDGETS(sciw_new_list_control(s->port, obj, area, font_nr, entries_list, entries_nr,
-		                          list_top, selection, (gint8)inverse));
+		                          list_top, selection, (int8)inverse));
 		if (entries_nr)
 			free(entries_list);
 	}
@@ -2213,7 +2213,7 @@
 			widget = gfxw_picviewize_dynview(widget);
 
 		if (GFXW_IS_DYN_VIEW(widget) && widget->ID) {
-			word signal = (flags & _K_DRAW_VIEW_LIST_USE_SIGNAL) ? ((reg_t *)(widget->signalp))->offset : 0;
+			uint16 signal = (flags & _K_DRAW_VIEW_LIST_USE_SIGNAL) ? ((reg_t *)(widget->signalp))->offset : 0;
 
 			if (signal & _K_VIEW_SIG_FLAG_HIDDEN)
 				gfxw_hide_widget(GFXW(widget));

Modified: scummvm/trunk/engines/sci/engine/kmath.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmath.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/engine/kmath.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -39,7 +39,7 @@
 }
 
 reg_t kSqrt(EngineState *s, int funct_nr, int argc, reg_t *argv) {
-	return make_reg(0, (gint16) sqrt((float) abs(SKPV(0))));
+	return make_reg(0, (int16) sqrt((float) abs(SKPV(0))));
 }
 
 int get_angle(int xrel, int yrel) {
@@ -103,7 +103,7 @@
 	int xrel = (int)(((float) SKPV(1) - SKPV_OR_ALT(3, 0)) / cos(SKPV_OR_ALT(5, 0) * PI / 180.0)); // This works because cos(0)==1
 	int yrel = SKPV(0) - SKPV_OR_ALT(2, 0);
 
-	return make_reg(0, (gint16)sqrt((float) xrel*xrel + yrel*yrel));
+	return make_reg(0, (int16)sqrt((float) xrel*xrel + yrel*yrel));
 }
 
 reg_t kTimesSin(EngineState *s, int funct_nr, int argc, reg_t *argv) {
@@ -127,9 +127,9 @@
 
 	if ((cosval < 0.0001) && (cosval > 0.0001)) {
 		warning("Attepted division by zero");
-		return make_reg(0, (gint16)0x8000);
+		return make_reg(0, (int16)0x8000);
 	} else
-		return make_reg(0, (gint16)(value / cosval));
+		return make_reg(0, (int16)(value / cosval));
 }
 
 reg_t kSinDiv(EngineState *s, int funct_nr, int argc, reg_t *argv) {
@@ -139,9 +139,9 @@
 
 	if ((sinval < 0.0001) && (sinval > 0.0001)) {
 		warning("Attepted division by zero");
-		return make_reg(0, (gint16)0x8000);
+		return make_reg(0, (int16)0x8000);
 	} else
-		return make_reg(0, (gint16)(value / sinval));
+		return make_reg(0, (int16)(value / sinval));
 }
 
 reg_t kTimesTan(EngineState *s, int funct_nr, int argc, reg_t *argv) {
@@ -151,9 +151,9 @@
 	param -= 90;
 	if ((param % 90) == 0) {
 		warning("Attempted tan(pi/2)");
-		return make_reg(0, (gint16)0x8000);
+		return make_reg(0, (int16)0x8000);
 	} else
-		return make_reg(0, (gint16) - (tan(param * PI / 180.0) * scale));
+		return make_reg(0, (int16) - (tan(param * PI / 180.0) * scale));
 }
 
 reg_t kTimesCot(EngineState *s, int funct_nr, int argc, reg_t *argv) {
@@ -162,9 +162,9 @@
 
 	if ((param % 90) == 0) {
 		warning("Attempted tan(pi/2)");
-		return make_reg(0, (gint16)0x8000);
+		return make_reg(0, (int16)0x8000);
 	} else
-		return make_reg(0, (gint16)(tan(param * PI / 180.0) * scale));
+		return make_reg(0, (int16)(tan(param * PI / 180.0) * scale));
 }
 
 } // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/kmovement.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmovement.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/engine/kmovement.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -286,7 +286,7 @@
 	int x = GET_SEL32SV(client, x);
 	int y = GET_SEL32SV(client, y);
 	int oldx, oldy, destx, desty, dx, dy, bdi, bi1, bi2, movcnt, bdelta, axis;
-	word signal = GET_SEL32V(client, signal);
+	uint16 signal = GET_SEL32V(client, signal);
 	int completed = 0;
 	int max_movcnt = GET_SEL32V(client, moveSpeed);
 
@@ -384,7 +384,7 @@
 	return make_reg(0, completed);
 }
 
-extern void _k_dirloop(reg_t obj, word angle, EngineState *s, int funct_nr, int argc, reg_t *argv);
+extern void _k_dirloop(reg_t obj, uint16 angle, EngineState *s, int funct_nr, int argc, reg_t *argv);
 int is_heap_object(EngineState *s, reg_t pos);
 extern int get_angle(int xrel, int yrel);
 
@@ -505,7 +505,7 @@
 				return s->r_acc;
 		} else {
 			// No looper? Fall back to DirLoop
-			_k_dirloop(client, (word)angle, s, funct_nr, argc, argv);
+			_k_dirloop(client, (uint16)angle, s, funct_nr, argc, argv);
 		}
 	}
 

Modified: scummvm/trunk/engines/sci/engine/kscripts.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kscripts.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/engine/kscripts.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -195,7 +195,7 @@
 reg_t kDisposeClone(EngineState *s, int funct_nr, int argc, reg_t *argv) {
 	reg_t victim_addr = argv[0];
 	clone_t *victim_obj = obj_get(s, victim_addr);
-	word underBits;
+	uint16 underBits;
 
 	if (!victim_obj) {
 		SCIkwarn(SCIkERROR, "Attempt to dispose non-class/object at "PREG"\n",

Modified: scummvm/trunk/engines/sci/engine/ksound.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/ksound.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/engine/ksound.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -176,7 +176,7 @@
 reg_t
 kDoSound_SCI0(EngineState *s, int funct_nr, int argc, reg_t *argv) {
 	reg_t obj = KP_ALT(1, NULL_REG);
-	word command = UKPV(0);
+	uint16 command = UKPV(0);
 	song_handle_t handle = FROBNICATE_HANDLE(obj);
 	int number = obj.segment ?
 	             GET_SEL32V(obj, number) :
@@ -367,7 +367,7 @@
 
 reg_t
 kDoSound_SCI01(EngineState *s, int funct_nr, int argc, reg_t *argv) {
-	word command = UKPV(0);
+	uint16 command = UKPV(0);
 	reg_t obj = KP_ALT(1, NULL_REG);
 	song_handle_t handle = FROBNICATE_HANDLE(obj);
 	int number = obj.segment ?
@@ -672,7 +672,7 @@
 
 reg_t
 kDoSound_SCI1(EngineState *s, int funct_nr, int argc, reg_t *argv) {
-	word command = UKPV(0);
+	uint16 command = UKPV(0);
 	reg_t obj = KP_ALT(1, NULL_REG);
 	song_handle_t handle = FROBNICATE_HANDLE(obj);
 	int number = obj.segment ?

Modified: scummvm/trunk/engines/sci/engine/kstring.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kstring.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/engine/kstring.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -451,9 +451,9 @@
 		source++; /* Skip whitespace */
 
 	if (*source == '$') /* SCI uses this for hex numbers */
-		return make_reg(0, (gint16)strtol(source + 1, NULL, 16)); /* Hex */
+		return make_reg(0, (int16)strtol(source + 1, NULL, 16)); /* Hex */
 	else
-		return make_reg(0, (gint16)strtol(source, NULL, 10)); /* Force decimal */
+		return make_reg(0, (int16)strtol(source, NULL, 10)); /* Force decimal */
 }
 
 

Modified: scummvm/trunk/engines/sci/engine/savegame.cfsml
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cfsml	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/engine/savegame.cfsml	2009-02-21 21:16:41 UTC (rev 38746)
@@ -216,7 +216,7 @@
 // Unused types
 /*
 TYPE long "long" LIKE int;
-TYPE gint16 "gint16" LIKE int;
+TYPE int16 "int16" LIKE int;
 
 RECORD synonym_t "synonym_t" {
 	int replaceant;
@@ -845,7 +845,7 @@
 
 				load_script(s, i);
 				scr->locals_block = scr->locals_segment == 0 ? NULL : &s->seg_manager.heap[scr->locals_segment]->data.locals;
-				scr->export_table = (guint16 *) find_unique_script_block(s, scr->buf, sci_obj_exports);
+				scr->export_table = (uint16 *) find_unique_script_block(s, scr->buf, sci_obj_exports);
 				scr->synonyms = find_unique_script_block(s, scr->buf, sci_obj_synonyms);
 				scr->code = NULL;
 				scr->code_blocks_nr = 0;
@@ -877,8 +877,8 @@
 					byte *data = scr->buf + scr->objects[j].pos.offset;
 
 					if (self->sci1_1) {
-						guint16 *funct_area = (guint16 *) (scr->buf + getUInt16( data + 6 ));
-						guint16 *prop_area = (guint16 *) (scr->buf + getUInt16( data + 4 ));
+						uint16 *funct_area = (uint16 *) (scr->buf + getUInt16( data + 6 ));
+						uint16 *prop_area = (uint16 *) (scr->buf + getUInt16( data + 4 ));
 
 						scr->objects[j].base_method = funct_area;
 						scr->objects[j].base_vars = prop_area;
@@ -896,8 +896,8 @@
 						scr->objects[j].variable_names_nr = base_obj->variables_nr;
 						scr->objects[j].base_obj = base_obj->base_obj;
 
-						scr->objects[j].base_method = (guint16 *) (data + funct_area);
-						scr->objects[j].base_vars = (guint16 *) (data + scr->objects[j].variable_names_nr * 2 + SCRIPT_SELECTOR_OFFSET);
+						scr->objects[j].base_method = (uint16 *) (data + funct_area);
+						scr->objects[j].base_vars = (uint16 *) (data + scr->objects[j].variable_names_nr * 2 + SCRIPT_SELECTOR_OFFSET);
 					}
 				}
 			}

Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -216,7 +216,7 @@
 // Unused types
 /*
 TYPE long "long" LIKE int;
-TYPE gint16 "gint16" LIKE int;
+TYPE int16 "int16" LIKE int;
 
 RECORD synonym_t "synonym_t" {
 	int replaceant;
@@ -4796,7 +4796,7 @@
 
 				load_script(s, i);
 				scr->locals_block = scr->locals_segment == 0 ? NULL : &s->seg_manager.heap[scr->locals_segment]->data.locals;
-				scr->export_table = (guint16 *) find_unique_script_block(s, scr->buf, sci_obj_exports);
+				scr->export_table = (uint16 *) find_unique_script_block(s, scr->buf, sci_obj_exports);
 				scr->synonyms = find_unique_script_block(s, scr->buf, sci_obj_synonyms);
 				scr->code = NULL;
 				scr->code_blocks_nr = 0;
@@ -4828,8 +4828,8 @@
 					byte *data = scr->buf + scr->objects[j].pos.offset;
 
 					if (self->sci1_1) {
-						guint16 *funct_area = (guint16 *) (scr->buf + getUInt16( data + 6 ));
-						guint16 *prop_area = (guint16 *) (scr->buf + getUInt16( data + 4 ));
+						uint16 *funct_area = (uint16 *) (scr->buf + getUInt16( data + 6 ));
+						uint16 *prop_area = (uint16 *) (scr->buf + getUInt16( data + 4 ));
 
 						scr->objects[j].base_method = funct_area;
 						scr->objects[j].base_vars = prop_area;
@@ -4847,8 +4847,8 @@
 						scr->objects[j].variable_names_nr = base_obj->variables_nr;
 						scr->objects[j].base_obj = base_obj->base_obj;
 
-						scr->objects[j].base_method = (guint16 *) (data + funct_area);
-						scr->objects[j].base_vars = (guint16 *) (data + scr->objects[j].variable_names_nr * 2 + SCRIPT_SELECTOR_OFFSET);
+						scr->objects[j].base_method = (uint16 *) (data + funct_area);
+						scr->objects[j].base_vars = (uint16 *) (data + scr->objects[j].variable_names_nr * 2 + SCRIPT_SELECTOR_OFFSET);
 					}
 				}
 			}

Modified: scummvm/trunk/engines/sci/engine/scriptdebug.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -634,7 +634,7 @@
 		break;
 
 		case KSIG_ARITHMETIC:
-			sciprintf("arithmetic value\n  %d (%04x)\n", (gint16) reg.offset, reg.offset);
+			sciprintf("arithmetic value\n  %d (%04x)\n", (int16) reg.offset, reg.offset);
 			break;
 
 		default:
@@ -1244,7 +1244,7 @@
 	byte *scr;
 	int scr_size;
 	reg_t retval = make_reg(pos.segment, pos.offset + 1);
-	word param_value;
+	uint16 param_value;
 	int opsize;
 	int opcode;
 	int bytecount = 1;
@@ -1428,7 +1428,7 @@
 			int restmod = *p_restadjust;
 			int stackframe = (scr[pos.offset + 1] >> 1) + restmod;
 			reg_t *sb = *p_sp;
-			word selector;
+			uint16 selector;
 			reg_t *val_ref;
 			reg_t fun_ref;
 

Modified: scummvm/trunk/engines/sci/engine/seg_manager.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/engine/seg_manager.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -528,7 +528,7 @@
 }
 #endif
 
-gint16 sm_get_heap(SegManager *self, reg_t reg) {
+int16 sm_get_heap(SegManager *self, reg_t reg) {
 	mem_obj_t *mem_obj;
 	mem_obj_enum mem_type;
 
@@ -538,7 +538,7 @@
 
 	switch (mem_type) {
 	case MEM_OBJ_SCRIPT:
-		VERIFY(reg.offset + 1 < (guint16)mem_obj->data.script.buf_size, "invalid offset\n");
+		VERIFY(reg.offset + 1 < (uint16)mem_obj->data.script.buf_size, "invalid offset\n");
 		return (mem_obj->data.script.buf[reg.offset] | (mem_obj->data.script.buf[reg.offset+1]) << 8);
 	case MEM_OBJ_CLONES:
 		sciprintf("memcpy for clones hasn't been implemented yet\n");
@@ -550,7 +550,7 @@
 	return 0; // never get here
 }
 
-void sm_put_heap(SegManager *self, reg_t reg, gint16 value) {
+void sm_put_heap(SegManager *self, reg_t reg, int16 value) {
 	mem_obj_t *mem_obj;
 	mem_obj_enum mem_type;
 
@@ -560,7 +560,7 @@
 
 	switch (mem_type) {
 	case MEM_OBJ_SCRIPT:
-		VERIFY(reg.offset + 1 < (guint16)mem_obj->data.script.buf_size, "invalid offset");
+		VERIFY(reg.offset + 1 < (uint16)mem_obj->data.script.buf_size, "invalid offset");
 		mem_obj->data.script.buf[reg.offset] = value & 0xff;
 		mem_obj->data.script.buf[reg.offset + 1] = value >> 8;
 		break;
@@ -636,7 +636,7 @@
 
 	GET_SEGID();
 	if (offset) {
-		scr->export_table = (guint16 *)(scr->buf + offset + 2);
+		scr->export_table = (uint16 *)(scr->buf + offset + 2);
 		scr->exports_nr = getUInt16((byte *)(scr->export_table - 1));
 	} else {
 		scr->export_table = NULL;
@@ -668,7 +668,7 @@
 
 #if 0
 // Unreferenced - removed
-static guint16 *sm_get_export_table_offset(SegManager *self, int id, int flag, int *max) {
+static uint16 *sm_get_export_table_offset(SegManager *self, int id, int flag, int *max) {
 	GET_SEGID();
 	if (max)
 		*max = self->heap[id]->data.script.exports_nr;
@@ -785,7 +785,7 @@
 
 	scr = &(mobj->data.script);
 
-	VERIFY(block.offset < (guint16)scr->buf_size && getUInt16(scr->buf + block.offset) * 2 + block.offset < (guint16)scr->buf_size,
+	VERIFY(block.offset < (uint16)scr->buf_size && getUInt16(scr->buf + block.offset) * 2 + block.offset < (uint16)scr->buf_size,
 	       "Relocation block outside of script\n");
 
 	count = getUInt16(scr->buf + block.offset);
@@ -837,7 +837,7 @@
 
 	scr = &(mobj->data.script);
 
-	VERIFY(block.offset < (guint16)scr->heap_size && getUInt16(scr->heap_start + block.offset) * 2 + block.offset < (guint16)scr->buf_size,
+	VERIFY(block.offset < (uint16)scr->heap_size && getUInt16(scr->heap_start + block.offset) * 2 + block.offset < (uint16)scr->buf_size,
 	       "Relocation block outside of script\n");
 
 	if (scr->relocated)
@@ -934,7 +934,7 @@
 		obj->methods_nr = functions_nr;
 		obj->base = scr->buf;
 		obj->base_obj = data;
-		obj->base_method = (guint16 *)(data + funct_area);
+		obj->base_method = (uint16 *)(data + funct_area);
 		obj->base_vars = NULL;
 
 		for (i = 0; i < variables_nr; i++)
@@ -955,7 +955,7 @@
 
 	scr = &(mobj->data.script);
 
-	VERIFY(base < (guint16)scr->buf_size, "Attempt to initialize object beyond end of script\n");
+	VERIFY(base < (uint16)scr->buf_size, "Attempt to initialize object beyond end of script\n");
 
 	if (!scr->objects) {
 		scr->objects_allocated = DEFAULT_OBJECTS;
@@ -971,12 +971,12 @@
 
 	obj = scr->objects + id;
 
-	VERIFY(base + SCRIPT_FUNCTAREAPTR_OFFSET < (guint16)scr->buf_size, "Function area pointer stored beyond end of script\n");
+	VERIFY(base + SCRIPT_FUNCTAREAPTR_OFFSET < (uint16)scr->buf_size, "Function area pointer stored beyond end of script\n");
 
 	{
 		byte *data = (byte *)(scr->buf + base);
-		guint16 *funct_area = (guint16 *)(scr->buf + getUInt16(data + 6));
-		guint16 *prop_area = (guint16 *)(scr->buf + getUInt16(data + 4));
+		uint16 *funct_area = (uint16 *)(scr->buf + getUInt16(data + 6));
+		uint16 *prop_area = (uint16 *)(scr->buf + getUInt16(data + 4));
 		int variables_nr;
 		int functions_nr;
 		int is_class;
@@ -1067,7 +1067,7 @@
 
 	scr = &(mobj->data.script);
 
-	VERIFY(location.offset + 1 < (guint16)scr->buf_size, "Locals beyond end of script\n");
+	VERIFY(location.offset + 1 < (uint16)scr->buf_size, "Locals beyond end of script\n");
 
 	if (self->sci1_1)
 		count = getUInt16(scr->buf + location.offset - 2);
@@ -1228,9 +1228,9 @@
 	return segid;
 }
 
-guint16 sm_validate_export_func(SegManager* self, int pubfunct, int seg) {
+uint16 sm_validate_export_func(SegManager* self, int pubfunct, int seg) {
 	script_t* script;
-	guint16 offset;
+	uint16 offset;
 	VERIFY(sm_check(self, seg), "invalid seg id");
 	VERIFY(self->heap[seg]->type == MEM_OBJ_SCRIPT, "Can only validate exports on scripts");
 

Modified: scummvm/trunk/engines/sci/engine/seg_manager.h
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.h	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/engine/seg_manager.h	2009-02-21 21:16:41 UTC (rev 38746)
@@ -140,11 +140,11 @@
 //				by its segment (SEG_ID). SEG_ID is faster than SCRIPT_ID,
 //				but less convenient.
 
-guint16 sm_validate_export_func(SegManager* self, int pubfunct, int seg);
+uint16 sm_validate_export_func(SegManager* self, int pubfunct, int seg);
 // Validate whether the specified public function is exported by the script in the specified segment
 // Parameters:	(int) pubfunct: Index of the function to validate
 //		(int) seg: Segment ID of the script the check is to be performed for
-// Returns   :  (guint16) 0 if the public function is invalid, its offset into the script's segment
+// Returns   :  (uint16) 0 if the public function is invalid, its offset into the script's segment
 //			  otherwise
 
 int sm_seg_get(SegManager* self, int script_nr);
@@ -329,16 +329,16 @@
 
 // Not all of these functions are fully operational for clones ATM 
 
-gint16 sm_get_heap(SegManager* self, reg_t reg);
+int16 sm_get_heap(SegManager* self, reg_t reg);
 // Retrieves a 16 bit value from within a script's heap representation
 // Parameters: (reg_t) reg: The address to read from
-// Returns   : (gint16) The value read from the specified location
+// Returns   : (int16) The value read from the specified location
 
 
-void sm_put_heap(SegManager *self, reg_t reg, gint16 value);
+void sm_put_heap(SegManager *self, reg_t reg, int16 value);
 // Writes a 16 bit value into a script's heap representation
 // Parameters: (reg_t) reg: The address to write to
-//	       (gint16) value: The value to write
+//	       (int16) value: The value to write
 
 
 void sm_mcpy_in_out(SegManager* self, int dst, const void *src, size_t n, int id, int flag);

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -245,10 +245,10 @@
 #define POP32() (*(validate_stack_addr(s, --(xs->sp))))
 
 // Getting instruction parameters
-#define GET_OP_BYTE() ((guint8)code_buf[(xs->addr.pc.offset)++])
+#define GET_OP_BYTE() ((uint8)code_buf[(xs->addr.pc.offset)++])
 #define GET_OP_WORD() (getUInt16(code_buf + ((xs->addr.pc.offset) += 2) - 2))
 #define GET_OP_FLEX() ((opcode & 1)? GET_OP_BYTE() : GET_OP_WORD())
-#define GET_OP_SIGNED_BYTE() ((gint8)(code_buf[(xs->addr.pc.offset)++]))
+#define GET_OP_SIGNED_BYTE() ((int8)(code_buf[(xs->addr.pc.offset)++]))
 #define GET_OP_SIGNED_WORD() ((getInt16(code_buf + ((xs->addr.pc.offset) += 2) - 2)))
 #define GET_OP_SIGNED_FLEX() ((opcode & 1)? GET_OP_SIGNED_BYTE() : GET_OP_SIGNED_WORD())
 
@@ -259,9 +259,9 @@
 #define OBJ_SUPERCLASS(s, reg) SEG_GET_HEAP(s, make_reg(reg.segment, reg.offset + SCRIPT_SUPERCLASS_OFFSET))
 // Returns an object's superclass
 
-inline exec_stack_t *execute_method(EngineState *s, word script, word pubfunct, stack_ptr_t sp, reg_t calling_obj, word argc, stack_ptr_t argp) {
+inline exec_stack_t *execute_method(EngineState *s, uint16 script, uint16 pubfunct, stack_ptr_t sp, reg_t calling_obj, uint16 argc, stack_ptr_t argp) {
 	int seg;
-	guint16 temp;
+	uint16 temp;
 
 	if (!sm_script_is_loaded(&s->seg_manager, script, SCRIPT_ID))  // Script not present yet?
 		script_instantiate(s, script);
@@ -281,7 +281,7 @@
 	// Check if a breakpoint is set on this method
 	if (s->have_bp & BREAK_EXPORT) {
 		breakpoint_t *bp;
-		guint32 bpaddress;
+		uint32 bpaddress;
 
 		bpaddress = (script << 16 | pubfunct);
 
@@ -598,10 +598,10 @@
 	unsigned int code_buf_size = 0 ; // (Avoid spurious warning)
 #endif
 	int temp;
-	gint16 aux_acc; // Auxiliary 16 bit accumulator
+	int16 aux_acc; // Auxiliary 16 bit accumulator
 	reg_t r_temp; // Temporary register
 	stack_ptr_t s_temp; // Temporary stack pointer
-	gint16 opparams[4]; // opcode parameters
+	int16 opparams[4]; // opcode parameters
 
 	int restadjust = s->r_amp_rest;
 	// &rest adjusts the parameter count by this value
@@ -861,27 +861,27 @@
 			break;
 
 		case 0x03: // mul
-			s->r_acc = ACC_ARITHMETIC_L(((gint16)POP()) * (gint16)/*acc*/);
+			s->r_acc = ACC_ARITHMETIC_L(((int16)POP()) * (int16)/*acc*/);
 			break;
 
 		case 0x04: // div
 			ACC_AUX_LOAD();
-			aux_acc = aux_acc != 0 ? ((gint16)POP()) / aux_acc : 0;
+			aux_acc = aux_acc != 0 ? ((int16)POP()) / aux_acc : 0;
 			ACC_AUX_STORE();
 			break;
 
 		case 0x05: // mod
 			ACC_AUX_LOAD();
-			aux_acc = aux_acc != 0 ? ((gint16)POP()) % aux_acc : 0;
+			aux_acc = aux_acc != 0 ? ((int16)POP()) % aux_acc : 0;
 			ACC_AUX_STORE();
 			break;
 
 		case 0x06: // shr
-			s->r_acc = ACC_ARITHMETIC_L(((guint16) POP()) >> /*acc*/);
+			s->r_acc = ACC_ARITHMETIC_L(((uint16) POP()) >> /*acc*/);
 			break;
 
 		case 0x07: // shl
-			s->r_acc = ACC_ARITHMETIC_L(((guint16)POP()) << /*acc*/);
+			s->r_acc = ACC_ARITHMETIC_L(((uint16)POP()) << /*acc*/);
 			break;
 
 		case 0x08: // xor
@@ -921,22 +921,22 @@
 
 		case 0x0f: // gt?
 			s->r_prev = s->r_acc;
-			s->r_acc = ACC_ARITHMETIC_L((gint16)POP() > (gint16)/*acc*/);
+			s->r_acc = ACC_ARITHMETIC_L((int16)POP() > (int16)/*acc*/);
 			break;
 
 		case 0x10: // ge?
 			s->r_prev = s->r_acc;
-			s->r_acc = ACC_ARITHMETIC_L((gint16)POP() >= (gint16)/*acc*/);
+			s->r_acc = ACC_ARITHMETIC_L((int16)POP() >= (int16)/*acc*/);
 			break;
 
 		case 0x11: // lt? 
 			s->r_prev = s->r_acc;
-			s->r_acc = ACC_ARITHMETIC_L((gint16)POP() < (gint16)/*acc*/);
+			s->r_acc = ACC_ARITHMETIC_L((int16)POP() < (int16)/*acc*/);
 			break;
 
 		case 0x12: // le? 
 			s->r_prev = s->r_acc;
-			s->r_acc = ACC_ARITHMETIC_L((gint16)POP() <= (gint16)/*acc*/);
+			s->r_acc = ACC_ARITHMETIC_L((int16)POP() <= (int16)/*acc*/);
 			break;
 
 		case 0x13: // ugt? 
@@ -1134,7 +1134,7 @@
 			xs->sp -= ((opparams[0] >> 1) + restadjust); // Adjust stack 
 
 			xs->sp[1].offset += restadjust;
-			xs_new = send_selector(s, s->r_acc, s->r_acc, s_temp, (int)(opparams[0] >> 1) + (word)restadjust, xs->sp);
+			xs_new = send_selector(s, s->r_acc, s->r_acc, s_temp, (int)(opparams[0] >> 1) + (uint16)restadjust, xs->sp);
 
 			if (xs_new && xs_new != xs)
 				s->execution_stack_pos_changed = 1;
@@ -1152,7 +1152,7 @@
 			xs->sp -= ((opparams[0] >> 1) + restadjust); // Adjust stack 
 
 			xs->sp[1].offset += restadjust;
-			xs_new = send_selector(s, xs->objp, xs->objp, s_temp, (int)(opparams[0] >> 1) + (word)restadjust, xs->sp);
+			xs_new = send_selector(s, xs->objp, xs->objp, s_temp, (int)(opparams[0] >> 1) + (uint16)restadjust, xs->sp);
 
 			if (xs_new && xs_new != xs)
 				s->execution_stack_pos_changed = 1;
@@ -1170,7 +1170,7 @@
 				xs->sp -= ((opparams[1] >> 1) + restadjust); // Adjust stack 
 
 				xs->sp[1].offset += restadjust;
-				xs_new = send_selector(s, r_temp, xs->objp, s_temp, (int)(opparams[1] >> 1) + (word)restadjust, xs->sp);
+				xs_new = send_selector(s, r_temp, xs->objp, s_temp, (int)(opparams[1] >> 1) + (uint16)restadjust, xs->sp);
 
 				if (xs_new && xs_new != xs)
 					s->execution_stack_pos_changed = 1;
@@ -1181,7 +1181,7 @@
 			break;
 
 		case 0x2c: // &rest 
-			temp = (guint16) opparams[0]; // First argument 
+			temp = (uint16) opparams[0]; // First argument 
 			restadjust = xs->argc - temp + 1; // +1 because temp counts the paramcount while argc doesn't 
 			if (restadjust < 0)
 				restadjust = 0;
@@ -1192,7 +1192,7 @@
 			break;
 
 		case 0x2d: // lea 
-			temp = (guint16) opparams[0] >> 1;
+			temp = (uint16) opparams[0] >> 1;
 			var_number = temp & 0x03; // Get variable type 
 
 			// Get variable block offset 
@@ -1500,7 +1500,7 @@
 		int i;
 		byte *buf = obj->base_obj + selector_name_offset;
 
-		obj->base_vars = (guint16 *) buf;
+		obj->base_vars = (uint16 *) buf;
 
 		for (i = 0; i < varnum; i++)
 			if (getUInt16(buf + (i << 1)) == slc) // Found it? 
@@ -2034,7 +2034,7 @@
 }
 
 static void _init_stack_base_with_selector(EngineState *s, selector_t selector) {
-	s->stack_base[0] = make_reg(0, (word)selector);
+	s->stack_base[0] = make_reg(0, (uint16)selector);
 	s->stack_base[1] = NULL_REG;
 }
 

Modified: scummvm/trunk/engines/sci/gfx/gfx_resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_resource.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/gfx/gfx_resource.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -206,7 +206,7 @@
 
 // Now construct the pixmap scaling functions
 #define EXTRA_BYTE_OFFSET 0
-#define SIZETYPE guint8
+#define SIZETYPE uint8
 #define FUNCNAME _gfx_xlate_pixmap_unfiltered_1
 #define FUNCNAME_LINEAR _gfx_xlate_pixmap_linear_1
 #define FUNCNAME_TRILINEAR _gfx_xlate_pixmap_trilinear_1
@@ -214,7 +214,7 @@
 #include "gfx_pixmap_scale.cpp"
 #undef COPY_BYTES
 
-#define SIZETYPE guint16
+#define SIZETYPE uint16
 #define FUNCNAME _gfx_xlate_pixmap_unfiltered_2
 #define FUNCNAME_LINEAR _gfx_xlate_pixmap_linear_2
 #define FUNCNAME_TRILINEAR _gfx_xlate_pixmap_trilinear_2
@@ -226,7 +226,7 @@
 # undef EXTRA_BYTE_OFFSET
 # define EXTRA_BYTE_OFFSET 1
 #endif // SCUMM_BIG_ENDIAN
-#define SIZETYPE guint32
+#define SIZETYPE uint32
 #define FUNCNAME _gfx_xlate_pixmap_unfiltered_3
 #define FUNCNAME_LINEAR _gfx_xlate_pixmap_linear_3
 #define FUNCNAME_TRILINEAR _gfx_xlate_pixmap_trilinear_3
@@ -238,7 +238,7 @@
 # define EXTRA_BYTE_OFFSET 0
 #endif // SCUMM_BIG_ENDIAN
 
-#define SIZETYPE guint32
+#define SIZETYPE uint32
 #define FUNCNAME _gfx_xlate_pixmap_unfiltered_4
 #define FUNCNAME_LINEAR _gfx_xlate_pixmap_linear_4
 #define FUNCNAME_TRILINEAR _gfx_xlate_pixmap_trilinear_4

Modified: scummvm/trunk/engines/sci/gfx/gfx_system.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_system.h	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/gfx/gfx_system.h	2009-02-21 21:16:41 UTC (rev 38746)
@@ -114,13 +114,13 @@
 /** Pixmap-specific color entries */
 struct  gfx_pixmap_color_t{
 	int global_index; /* Global index color or GFX_COLOR_INDEX_UNMAPPED. */
-	guint8 r, g, b; /* Real color */
+	uint8 r, g, b; /* Real color */
 };
 
 /** Full color */
 struct gfx_color_t {
 	gfx_pixmap_color_t visual;
-	guint8 alpha; /* transparency = (1-opacity) */
+	uint8 alpha; /* transparency = (1-opacity) */
 	signed char priority, control;
 	byte mask; /* see mask values below */
 };

Modified: scummvm/trunk/engines/sci/gfx/operations.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/operations.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/gfx/operations.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -1182,17 +1182,17 @@
 		draw_color1.priority = draw_color2.priority = color1.priority;
 
 		if (draw_color1.mask & GFX_MASK_VISUAL) {
-			draw_color1.visual.r = (guint8) COLOR_MIX(visual.r, mod_offset);
-			draw_color1.visual.g = (guint8) COLOR_MIX(visual.g, mod_offset);
-			draw_color1.visual.b = (guint8) COLOR_MIX(visual.b, mod_offset);
-			draw_color1.alpha = (guint8) COLOR_MIX(alpha, mod_offset);
+			draw_color1.visual.r = (uint8) COLOR_MIX(visual.r, mod_offset);
+			draw_color1.visual.g = (uint8) COLOR_MIX(visual.g, mod_offset);
+			draw_color1.visual.b = (uint8) COLOR_MIX(visual.b, mod_offset);
+			draw_color1.alpha = (uint8) COLOR_MIX(alpha, mod_offset);
 
 			mod_offset += mod_breadth;
 
-			draw_color2.visual.r = (guint8) COLOR_MIX(visual.r, mod_offset);
-			draw_color2.visual.g = (guint8) COLOR_MIX(visual.g, mod_offset);
-			draw_color2.visual.b = (guint8) COLOR_MIX(visual.b, mod_offset);
-			draw_color2.alpha = (guint8) COLOR_MIX(alpha, mod_offset);
+			draw_color2.visual.r = (uint8) COLOR_MIX(visual.r, mod_offset);
+			draw_color2.visual.g = (uint8) COLOR_MIX(visual.g, mod_offset);
+			draw_color2.visual.b = (uint8) COLOR_MIX(visual.b, mod_offset);
+			draw_color2.alpha = (uint8) COLOR_MIX(alpha, mod_offset);
 		}
 		if (reverse)
 			return drv->draw_filled_rect(drv, new_box, draw_color2, draw_color1, driver_shade_type);

Modified: scummvm/trunk/engines/sci/gfx/resource/sci_view_1.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_view_1.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_view_1.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -230,8 +230,8 @@
 gfx_pixmap_t *gfxr_draw_cel1(int id, int loop, int cel, int mirrored, byte *resource, int size, gfxr_view_t *view, int amiga_game) {
 	int xl = get_int_16(resource);
 	int yl = get_int_16(resource + 2);
-	int xhot = (gint8) resource[4];
-	int yhot = (guint8) resource[5];
+	int xhot = (int8) resource[4];
+	int yhot = (uint8) resource[5];
 	int pos = 8;
 	int pixmap_size = xl * yl;
 	gfx_pixmap_t *retval = gfx_pixmap_alloc_index_data(gfx_new_pixmap(xl, yl, id, loop, cel));

Modified: scummvm/trunk/engines/sci/include/kernel.h
===================================================================
--- scummvm/trunk/engines/sci/include/kernel.h	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/include/kernel.h	2009-02-21 21:16:41 UTC (rev 38746)
@@ -57,11 +57,11 @@
 
 #define GET_SEL32(_o_, _slc_) read_selector(s, _o_, s->selector_map._slc_, __FILE__, __LINE__)
 #define GET_SEL32V(_o_, _slc_) (GET_SEL32(_o_, _slc_).offset)
-#define GET_SEL32SV(_o_, _slc_) ((gint16)(GET_SEL32(_o_, _slc_).offset))
+#define GET_SEL32SV(_o_, _slc_) ((int16)(GET_SEL32(_o_, _slc_).offset))
 /* Retrieves a selector from an object
 ** Parameters: (reg_t) object: The address of the object which the selector should be read from
 **             (selector_name) selector: The selector to read
-** Returns   : (gint16/guint16/reg_t) The selector value
+** Returns   : (int16/uint16/reg_t) The selector value
 ** This macro halts on error. 'selector' must be a selector name registered in vm.h's
 ** selector_map_t and mapped in script.c.
 */
@@ -71,7 +71,7 @@
 /* Writes a selector value to an object
 ** Parameters: (reg_t) object: The address of the object which the selector should be written to
 **             (selector_name) selector: The selector to read
-**             (gint16) value: The value to write
+**             (int16) value: The value to write
 ** Returns   : (void)
 ** This macro halts on error. 'selector' must be a selector name registered in vm.h's
 ** selector_map_t and mapped in script.c.
@@ -140,8 +140,8 @@
 
 
 #define KP_ALT(x, alt) ((x < argc)? argv[x] : (alt))
-#define KP_UINT(x) ((guint16) x.offset)
-#define KP_SINT(x) ((gint16) x.offset)
+#define KP_UINT(x) ((uint16) x.offset)
+#define KP_SINT(x) ((int16) x.offset)
 
 
 #define SKPV(x) KP_SINT(argv[x])

Modified: scummvm/trunk/engines/sci/include/sciresource.h
===================================================================
--- scummvm/trunk/engines/sci/include/sciresource.h	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/include/sciresource.h	2009-02-21 21:16:41 UTC (rev 38746)
@@ -35,8 +35,6 @@
 	class ReadStream;
 }
 
-#include "sci/include/scitypes.h"
-
 namespace Sci {
 
 /** The maximum allowed size for a compressed or decompressed resource */
@@ -145,7 +143,7 @@
 
 	unsigned short number;
 	unsigned short type;
-	guint16 id; /* contains number and type */
+	uint16 id; /* contains number and type */
 
 	unsigned int size;
 
@@ -376,11 +374,11 @@
 */
 
 
-int decrypt2(guint8* dest, guint8* src, int length, int complength);
+int decrypt2(uint8* dest, uint8* src, int length, int complength);
 /* Huffman token decryptor - defined in decompress0.c and used in decompress01.c
 */
 
-int decrypt4(guint8* dest, guint8* src, int length, int complength);
+int decrypt4(uint8* dest, uint8* src, int length, int complength);
 /* DCL inflate- implemented in decompress1.c
 */
 

Deleted: scummvm/trunk/engines/sci/include/scitypes.h
===================================================================
--- scummvm/trunk/engines/sci/include/scitypes.h	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/include/scitypes.h	2009-02-21 21:16:41 UTC (rev 38746)
@@ -1,50 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-#ifndef SCI_TYPES
-#define SCI_TYPES
-
-#include "common/scummsys.h"
-
-namespace Sci {
-
-typedef int8 gint8;
-typedef uint8 guint8;
-
-typedef int16 gint16;
-typedef uint16 guint16;
-
-typedef int32 gint32;
-typedef uint32 guint32;
-
-#undef byte
-
-typedef gint8 sbyte;
-typedef guint8 byte;
-typedef guint16 word;
-
-} // End of namespace Sci
-
-#endif /* !SCI_TYPES */

Modified: scummvm/trunk/engines/sci/include/versions.h
===================================================================
--- scummvm/trunk/engines/sci/include/versions.h	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/include/versions.h	2009-02-21 21:16:41 UTC (rev 38746)
@@ -28,8 +28,6 @@
 #ifndef _SCI_VERSIONS_H_
 #define _SCI_VERSIONS_H_
 
-#include "sci/include/scitypes.h"
-
 namespace Sci {
 
 #define SCI_VERSION(_major_, _minor_, _patchlevel_) (((_major_)<<20) | ((_minor_)<<10) | _patchlevel_)

Modified: scummvm/trunk/engines/sci/include/vm.h
===================================================================
--- scummvm/trunk/engines/sci/include/vm.h	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/include/vm.h	2009-02-21 21:16:41 UTC (rev 38746)
@@ -145,8 +145,8 @@
 	int methods_nr;
 	byte *base; /* Points to a buffer all relative references (code, strings) point to */
 	byte *base_obj; /* base + object offset within base */
-	guint16 *base_method; /* Pointer to the method selector area for this object */
-	guint16 *base_vars; /* Pointer to the varselector area for this object */
+	uint16 *base_method; /* Pointer to the method selector area for this object */
+	uint16 *base_vars; /* Pointer to the varselector area for this object */
 	reg_t *variables;
 } object_t;
 
@@ -189,7 +189,7 @@
 
 	byte *synonyms; /* Synonyms block  or 0 if not present*/
 	byte *heap_start; /* Start of heap if SCI1.1, NULL otherwise */
-	guint16 *export_table; /* Abs. offset of the export table or 0 if not present */
+	uint16 *export_table; /* Abs. offset of the export table or 0 if not present */
 
 	int_hash_map_t *obj_indices;
 
@@ -397,7 +397,7 @@
 typedef struct _breakpoint {
 	int type;
 	union {
-		guint32 address;  /* Breakpoints on exports */
+		uint32 address;  /* Breakpoints on exports */
 		char *name; /* Breakpoints on selector names */
 	} data;
 	struct _breakpoint *next;
@@ -450,15 +450,15 @@
 extern int max_instance;
 
 /*inline*/
-exec_stack_t *execute_method(EngineState *s, word script, word pubfunct, stack_ptr_t sp, reg_t calling_obj,
-               word argc, stack_ptr_t argp);
+exec_stack_t *execute_method(EngineState *s, uint16 script, uint16 pubfunct, stack_ptr_t sp, reg_t calling_obj,
+               uint16 argc, stack_ptr_t argp);
 /* Executes function pubfunct of the specified script.
 ** Parameters: (EngineState *) s: The state which is to be executed with
-**             (word) script: The script which is called
-**             (word) pubfunct: The exported script function which is to be called
+**             (uint16) script: The script which is called
+**             (uint16) pubfunct: The exported script function which is to be called
 **             (stack_ptr_t) sp: Stack pointer position
 **             (reg_t) calling_obj: The heap address of the object which executed the call
-**             (word) argc: Number of arguments supplied
+**             (uint16) argc: Number of arguments supplied
 **             (stack_ptr_t) argp: Pointer to the first supplied argument
 ** Returns   : (exec_stack_t *): A pointer to the new exec stack TOS entry
 */

Modified: scummvm/trunk/engines/sci/include/vm_types.h
===================================================================
--- scummvm/trunk/engines/sci/include/vm_types.h	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/include/vm_types.h	2009-02-21 21:16:41 UTC (rev 38746)
@@ -26,7 +26,7 @@
 #ifndef _SCI_VM_TYPES_H_
 #define _SCI_VM_TYPES_H_
 
-#include "sci/include/scitypes.h"
+#include "common/scummsys.h"
 
 namespace Sci {
 

Modified: scummvm/trunk/engines/sci/scicore/decompress0.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/decompress0.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/scicore/decompress0.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -38,7 +38,7 @@
 //#define _SCI_DECOMPRESS_DEBUG
 
 // 9-12 bit LZW encoding
-int decrypt1(guint8 *dest, guint8 *src, int length, int complength) {
+int decrypt1(uint8 *dest, uint8 *src, int length, int complength) {
 	// Doesn't do length checking yet
 	/* Theory: Considering the input as a bit stream, we get a series of
 	** 9 bit elements in the beginning. Every one of them is a 'token'
@@ -56,24 +56,24 @@
 	** be faster than the recursive approach.
 	*/
 
-	guint16 bitlen = 9; // no. of bits to read (max. 12)
-	guint16 bitmask = 0x01ff;
-	guint16 bitctr = 0; // current bit position
-	guint16 bytectr = 0; // current byte position
-	guint16 token; // The last received value
-	guint16 maxtoken = 0x200; // The biggest token
+	uint16 bitlen = 9; // no. of bits to read (max. 12)
+	uint16 bitmask = 0x01ff;
+	uint16 bitctr = 0; // current bit position
+	uint16 bytectr = 0; // current byte position
+	uint16 token; // The last received value
+	uint16 maxtoken = 0x200; // The biggest token
 
-	guint16 tokenlist[4096]; // pointers to dest[]
-	guint16 tokenlengthlist[4096]; // char length of each token
-	guint16 tokenctr = 0x102; // no. of registered tokens (starts here)
+	uint16 tokenlist[4096]; // pointers to dest[]
+	uint16 tokenlengthlist[4096]; // char length of each token
+	uint16 tokenctr = 0x102; // no. of registered tokens (starts here)
 
-	guint16 tokenlastlength = 0;
+	uint16 tokenlastlength = 0;
 
-	guint16 destctr = 0;
+	uint16 destctr = 0;
 
 	while (bytectr < complength) {
 
-		guint32 tokenmaker = src[bytectr++] >> bitctr;
+		uint32 tokenmaker = src[bytectr++] >> bitctr;
 		if (bytectr < complength)
 			tokenmaker |= (src[bytectr] << (8 - bitctr));
 		if (bytectr + 1 < complength)
@@ -161,11 +161,11 @@
 /***************************************************************************/
 
 // decrypt2 helper function
-gint16 getc2(guint8 *node, guint8 *src, guint16 *bytectr, guint16 *bitctr, int complength) {
-	guint16 next;
+int16 getc2(uint8 *node, uint8 *src, uint16 *bytectr, uint16 *bitctr, int complength) {
+	uint16 next;
 
 	while (node[1] != 0) {
-		gint16 value = (src[*bytectr] << (*bitctr));
+		int16 value = (src[*bytectr] << (*bitctr));
 		(*bitctr)++;
 		if (*bitctr == 8) {
 			(*bitctr) = 0;
@@ -175,7 +175,7 @@
 		if (value & 0x80) {
 			next = node[1] & 0x0f; // low 4 bits
 			if (next == 0) {
-				guint16 result = (src[*bytectr] << (*bitctr));
+				uint16 result = (src[*bytectr] << (*bitctr));
 
 				if (++(*bytectr) > complength)
 					return -1;
@@ -195,12 +195,12 @@
 }
 
 // Huffman token decryptor
-int decrypt2(guint8* dest, guint8* src, int length, int complength) {
+int decrypt2(uint8* dest, uint8* src, int length, int complength) {
 	// no complength checking atm */
-	guint8 numnodes, terminator;
-	guint8 *nodes;
-	gint16 c;
-	guint16 bitctr = 0, bytectr;
+	uint8 numnodes, terminator;
+	uint8 *nodes;
+	int16 c;
+	uint16 bitctr = 0, bytectr;
 
 	numnodes = src[0];
 	terminator = src[1];
@@ -211,7 +211,7 @@
 		if (length-- == 0)
 			return SCI_ERROR_DECOMPRESSION_OVERFLOW;
 
-		*dest = (guint8)c;
+		*dest = (uint8)c;
 		dest++;
 	}
 
@@ -222,7 +222,7 @@
 // Carl Muckenhoupt's decompression code ends here
 
 int sci0_get_compression_method(Common::ReadStream &stream) {
-	guint16 compressionMethod;
+	uint16 compressionMethod;
 
 	stream.readUint16LE();
 	stream.readUint16LE();
@@ -267,7 +267,7 @@
 		return SCI_ERROR_EMPTY_OBJECT;
 	}
 
-	buffer = (guint8*)sci_malloc(compressedLength);
+	buffer = (uint8*)sci_malloc(compressedLength);
 	result->data = (unsigned char *)sci_malloc(result->size);
 
 	if (stream.read(buffer, compressedLength) != compressedLength) {

Modified: scummvm/trunk/engines/sci/scicore/decompress01.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/decompress01.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/scicore/decompress01.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -39,17 +39,17 @@
 // TODO: Clean up, re-organize, improve speed-wise */
 
 struct tokenlist {
-	guint8 data;
-	gint16 next;
+	uint8 data;
+	int16 next;
 } tokens[0x1004];
 
-static gint8 stak[0x1014] = {0};
-static gint8 lastchar = 0;
-static gint16 stakptr = 0;
-static guint16 s_numbits, s_bitstring, lastbits, decryptstart;
-static gint16 curtoken, endtoken;
+static int8 stak[0x1014] = {0};
+static int8 lastchar = 0;
+static int16 stakptr = 0;
+static uint16 s_numbits, s_bitstring, lastbits, decryptstart;
+static int16 curtoken, endtoken;
 
-uint32 gbits(int numbits,  guint8 * data, int dlen);
+uint32 gbits(int numbits,  uint8 * data, int dlen);
 
 void decryptinit3() {
 	int i;
@@ -67,8 +67,8 @@
 	}
 }
 
-int decrypt3(guint8 *dest, guint8 *src, int length, int complength) {
-	static gint16 token;
+int decrypt3(uint8 *dest, uint8 *src, int length, int complength) {
+	static int16 token;
 	while (length != 0) {
 		switch (decryptstart) {
 		case 0:
@@ -133,10 +133,10 @@
 	return 0;
 }
 
-guint32 gbits(int numbits,  guint8 * data, int dlen) {
+uint32 gbits(int numbits,  uint8 * data, int dlen) {
 	int place; // indicates location within byte
-	guint32 bitstring;
-	static guint32 whichbit = 0;
+	uint32 bitstring;
+	static uint32 whichbit = 0;
 	int i;
 
 	if (numbits == 0) {
@@ -526,7 +526,7 @@
 		return SCI_ERROR_EMPTY_OBJECT;
 	}
 
-	buffer = (guint8 *)sci_malloc(compressedLength);
+	buffer = (uint8 *)sci_malloc(compressedLength);
 	result->data = (unsigned char *)sci_malloc(result->size);
 
 	if (stream.read(buffer, compressedLength) != compressedLength) {

Modified: scummvm/trunk/engines/sci/scicore/decompress1.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/decompress1.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/scicore/decompress1.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -253,7 +253,7 @@
 	return 0;
 }
 
-int decrypt4(guint8* dest, guint8* src, int length, int complength) {
+int decrypt4(uint8* dest, uint8* src, int length, int complength) {
 	struct bit_read_struct reader;
 
 	reader.length = complength;
@@ -265,7 +265,7 @@
 }
 
 void decryptinit3();
-int decrypt3(guint8* dest, guint8* src, int length, int complength);
+int decrypt3(uint8* dest, uint8* src, int length, int complength);
 
 int decompress1(resource_t *result, Common::ReadStream &stream, int sci_version) {
 	uint16 compressedLength;
@@ -314,7 +314,7 @@
 		return SCI_ERROR_EMPTY_OBJECT;
 	}
 
-	buffer = (guint8 *)sci_malloc(compressedLength);
+	buffer = (uint8 *)sci_malloc(compressedLength);
 	result->data = (unsigned char *)sci_malloc(result->size);
 
 	if (stream.read(buffer, compressedLength) != compressedLength) {

Modified: scummvm/trunk/engines/sci/scicore/decompress11.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/decompress11.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/scicore/decompress11.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -35,13 +35,13 @@
 #define DDEBUG if (0) printf
 
 void decryptinit3();
-int decrypt3(guint8* dest, guint8* src, int length, int complength);
-int decrypt4(guint8* dest, guint8* src, int length, int complength);
+int decrypt3(uint8* dest, uint8* src, int length, int complength);
+int decrypt4(uint8* dest, uint8* src, int length, int complength);
 
 int decompress11(resource_t *result, Common::ReadStream &stream, int sci_version) {
-	guint16 compressedLength;
-	guint16 compressionMethod;
-	guint8 *buffer;
+	uint16 compressedLength;
+	uint16 compressionMethod;
+	uint8 *buffer;
 
 	DDEBUG("d1");
 
@@ -75,7 +75,7 @@
 		return SCI_ERROR_EMPTY_OBJECT;
 	}
 
-	buffer = (guint8*)sci_malloc(compressedLength);
+	buffer = (uint8*)sci_malloc(compressedLength);
 	result->data = (unsigned char*)sci_malloc(result->size);
 
 	if (stream.read(buffer, compressedLength) != compressedLength) {

Modified: scummvm/trunk/engines/sci/scicore/resource_patch.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/resource_patch.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/scicore/resource_patch.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -51,7 +51,7 @@
 	if (!file.open(member.createReadStream(), member.getName()))
 		perror("""__FILE__"": (""__LINE__""): failed to open");
 	else {
-		guint8 filehdr[2];
+		uint8 filehdr[2];
 		resource_t *newrsc = _scir_find_resource_unsorted(*resource_p, *resource_nr_p, restype, resnumber);
 		int fsize = file.size();
 		if (fsize < 3) {

Modified: scummvm/trunk/engines/sci/scicore/sci_memory.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/sci_memory.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/scicore/sci_memory.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -87,20 +87,20 @@
 
 //-------- Refcounting ----------
 
-#define REFCOUNT_OVERHEAD (sizeof(guint32) * 3)
+#define REFCOUNT_OVERHEAD (sizeof(uint32) * 3)
 #define REFCOUNT_MAGIC_LIVE_1 0xebdc1741
 #define REFCOUNT_MAGIC_LIVE_2 0x17015ac9
 #define REFCOUNT_MAGIC_DEAD_1 0x11dead11
 #define REFCOUNT_MAGIC_DEAD_2 0x22dead22
 
-#define REFCOUNT_CHECK(p) ((((guint32 *)(p))[-3] == REFCOUNT_MAGIC_LIVE_2) && (((guint32 *)(p))[-1] == REFCOUNT_MAGIC_LIVE_1))
+#define REFCOUNT_CHECK(p) ((((uint32 *)(p))[-3] == REFCOUNT_MAGIC_LIVE_2) && (((uint32 *)(p))[-1] == REFCOUNT_MAGIC_LIVE_1))
 
-#define REFCOUNT(p) (((guint32 *)p)[-2])
+#define REFCOUNT(p) (((uint32 *)p)[-2])
 
 #undef TRACE_REFCOUNT
 
 extern void *sci_refcount_alloc(size_t length) {
-	guint32 *data = (guint32 *)sci_malloc(REFCOUNT_OVERHEAD + length);
+	uint32 *data = (uint32 *)sci_malloc(REFCOUNT_OVERHEAD + length);
 #ifdef TRACE_REFCOUNT
 	fprintf(stderr, "[] REF: Real-alloc at %p\n", data);
 #endif
@@ -136,7 +136,7 @@
 	if (!REFCOUNT_CHECK(data)) {
 		BREAKPOINT();
 	} else if (--REFCOUNT(data) == 0) {
-		guint32 *fdata = (guint32 *)data;
+		uint32 *fdata = (uint32 *)data;
 
 		fdata[-1] = REFCOUNT_MAGIC_DEAD_1;
 		fdata[-3] = REFCOUNT_MAGIC_DEAD_2;

Modified: scummvm/trunk/engines/sci/sfx/adlib.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/adlib.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/sfx/adlib.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -29,7 +29,7 @@
 
 adlib_instr adlib_sbi[96];
 
-void make_sbi(adlib_def *one, guint8 *buffer) {
+void make_sbi(adlib_def *one, uint8 *buffer) {
 	memset(buffer, 0, sizeof(adlib_instr));
 
 #if 0

Modified: scummvm/trunk/engines/sci/sfx/adlib.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/adlib.h	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/sfx/adlib.h	2009-02-21 21:16:41 UTC (rev 38746)
@@ -34,34 +34,34 @@
 #define ADLIB_VOICES 12
 
 typedef struct _sci_adlib_def {
-	guint8 keyscale1;       /* 0-3 !*/
-	guint8 freqmod1;        /* 0-15 !*/
-	guint8 feedback1;       /* 0-7 !*/
-	guint8 attackrate1;     /* 0-15 !*/
-	guint8 sustainvol1;     /* 0-15 !*/
-	guint8 envelope1;       /* t/f !*/
-	guint8 decayrate1;      /* 0-15 !*/
-	guint8 releaserate1;    /* 0-15 !*/
-	guint8 volume1;         /* 0-63 !*/
-	guint8 ampmod1;         /* t/f !*/
-	guint8 vibrato1;        /* t/f !*/
-	guint8 keybdscale1;     /* t/f !*/
-	guint8 algorithm1;      /* 0,1 REVERSED */
-	guint8 keyscale2;       /* 0-3 !*/
-	guint8 freqmod2;        /* 0-15 !*/
-	guint8 feedback2;       /* 0-7 UNUSED */
-	guint8 attackrate2;     /* 0-15 !*/
-	guint8 sustainvol2;     /* 0-15 !*/
-	guint8 envelope2;       /* t/f !*/
-	guint8 decayrate2;      /* 0-15 !*/
-	guint8 releaserate2;    /* 0-15 !*/
-	guint8 volume2;         /* 0-63 !*/
-	guint8 ampmod2;         /* t/f !*/
-	guint8 vibrato2;        /* t/f !*/
-	guint8 keybdscale2;     /* t/f !*/
-	guint8 algorithm2;      /* 0,1 UNUSED */
-	guint8 waveform1;       /* 0-3 !*/
-	guint8 waveform2;       /* 0-3 !*/
+	uint8 keyscale1;       /* 0-3 !*/
+	uint8 freqmod1;        /* 0-15 !*/
+	uint8 feedback1;       /* 0-7 !*/
+	uint8 attackrate1;     /* 0-15 !*/
+	uint8 sustainvol1;     /* 0-15 !*/
+	uint8 envelope1;       /* t/f !*/
+	uint8 decayrate1;      /* 0-15 !*/
+	uint8 releaserate1;    /* 0-15 !*/
+	uint8 volume1;         /* 0-63 !*/
+	uint8 ampmod1;         /* t/f !*/
+	uint8 vibrato1;        /* t/f !*/
+	uint8 keybdscale1;     /* t/f !*/
+	uint8 algorithm1;      /* 0,1 REVERSED */
+	uint8 keyscale2;       /* 0-3 !*/
+	uint8 freqmod2;        /* 0-15 !*/
+	uint8 feedback2;       /* 0-7 UNUSED */
+	uint8 attackrate2;     /* 0-15 !*/
+	uint8 sustainvol2;     /* 0-15 !*/
+	uint8 envelope2;       /* t/f !*/
+	uint8 decayrate2;      /* 0-15 !*/
+	uint8 releaserate2;    /* 0-15 !*/
+	uint8 volume2;         /* 0-63 !*/
+	uint8 ampmod2;         /* t/f !*/
+	uint8 vibrato2;        /* t/f !*/
+	uint8 keybdscale2;     /* t/f !*/
+	uint8 algorithm2;      /* 0,1 UNUSED */
+	uint8 waveform1;       /* 0-3 !*/
+	uint8 waveform2;       /* 0-3 !*/
 } adlib_def;
 
 typedef unsigned char adlib_instr[12];
@@ -69,7 +69,7 @@
 extern adlib_instr adlib_sbi[96];
 
 /** Converts a raw SCI adlib instrument into the adlib register format. */
-void make_sbi(adlib_def *one, guint8 *buffer);
+void make_sbi(adlib_def *one, uint8 *buffer);
 
 } // End of namespace Sci
 

Modified: scummvm/trunk/engines/sci/sfx/mixer/soft.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/mixer/soft.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/sfx/mixer/soft.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -58,7 +58,7 @@
 	sfx_timestamp_t outbuf_timestamp; /* Timestamp associated with the output buffer */
 	int have_outbuf_timestamp; /* Whether we really _have_ an associated timestamp */
 	byte *writebuf; /* Buffer we're supposed to write to */
-	gint32 *compbuf_l, *compbuf_r; /* Intermediate buffers for computation */
+	int32 *compbuf_l, *compbuf_r; /* Intermediate buffers for computation */
 	int lastbuf_len; /* Number of frames stored in the last buffer */
 
 	long skew; /* Millisecond relative to which we compute time. This is the millisecond
@@ -81,8 +81,8 @@
 	self->private_bits = new mixer_private();
 	P->outbuf = P->writebuf = NULL;
 	P->lastbuf_len = 0;
-	P->compbuf_l = (gint32*)sci_malloc(sizeof(gint32) * device->buf_size);
-	P->compbuf_r = (gint32*)sci_malloc(sizeof(gint32) * device->buf_size);
+	P->compbuf_l = (int32*)sci_malloc(sizeof(int32) * device->buf_size);
+	P->compbuf_r = (int32*)sci_malloc(sizeof(int32) * device->buf_size);
 	P->played_this_second = 0;
 	P->paused = 0;
 #ifdef DEBUG
@@ -263,8 +263,8 @@
 	byte *lchan, *rchan = NULL;
 	/* Don't see how this could possibly wind up being
 	** used w/o initialisation, but you never know... */
-	gint32 *lsrc = P->compbuf_l;
-	gint32 *rsrc = P->compbuf_r;
+	int32 *lsrc = P->compbuf_l;
+	int32 *rsrc = P->compbuf_r;
 	int frame_size = SFX_PCM_FRAME_SIZE(conf);
 
 
@@ -523,8 +523,8 @@
 	sfx_pcm_feed_t *f = fs->feed;
 	sfx_pcm_config_t conf = f->conf;
 	int use_16 = conf.format & SFX_PCM_FORMAT_16;
-	gint32 *lchan = P->compbuf_l;
-	gint32 *rchan = P->compbuf_r;
+	int32 *lchan = P->compbuf_l;
+	int32 *rchan = P->compbuf_r;
 	int frame_size = f->frame_size;
 	byte *wr_dest = fs->buf + (frame_size * fs->frame_bufstart);
 	byte *lsrc = fs->buf;
@@ -601,8 +601,8 @@
 		case PCM_FEED_IDLE:
 			/* Clear audio buffer, if neccessary, and return */
 			if (!add_result) {
-				memset(P->compbuf_l, 0, sizeof(gint32) * len);
-				memset(P->compbuf_r, 0, sizeof(gint32) * len);
+				memset(P->compbuf_l, 0, sizeof(int32) * len);
+				memset(P->compbuf_r, 0, sizeof(int32) * len);
 			}
 			return;
 
@@ -632,8 +632,8 @@
 	/* Skip at the beginning: */
 	if (delay_frames) {
 		if (!add_result) {
-			memset(lchan, 0, sizeof(gint32) * delay_frames);
-			memset(rchan, 0, sizeof(gint32) * delay_frames);
+			memset(lchan, 0, sizeof(int32) * delay_frames);
+			memset(rchan, 0, sizeof(int32) * delay_frames);
 		}
 		lchan += delay_frames;
 		rchan += delay_frames;
@@ -747,8 +747,8 @@
 
 	/* If neccessary, zero out the rest */
 	if (write_offset < len && !add_result) {
-		memset(lchan, 0, sizeof(gint32) * (len - write_offset));
-		memset(rchan, 0, sizeof(gint32) * (len - write_offset));
+		memset(lchan, 0, sizeof(int32) * (len - write_offset));
+		memset(rchan, 0, sizeof(int32) * (len - write_offset));
 	}
 
 	/* Save whether we have a partial frame still stored */
@@ -869,8 +869,8 @@
 			} while (frames_skip >= 0);
 
 		} else { /* Zero it out */
-			memset(P->compbuf_l, 0, sizeof(gint32) * buflen);
-			memset(P->compbuf_r, 0, sizeof(gint32) * buflen);
+			memset(P->compbuf_l, 0, sizeof(int32) * buflen);
+			memset(P->compbuf_r, 0, sizeof(int32) * buflen);
 		}
 
 #if (DEBUG >= 1)

Modified: scummvm/trunk/engines/sci/sfx/seq/gm.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/seq/gm.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/sfx/seq/gm.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -94,7 +94,7 @@
 #define MIDI_MASTER_VOLUME_LEN 8
 
 static int
-midi_gm_volume(guint8 volume) {
+midi_gm_volume(uint8 volume) {
 	byte data[MIDI_MASTER_VOLUME_LEN] = {
 		0xf0,
 		0x7f,

Modified: scummvm/trunk/engines/sci/sfx/seq/map-mt32-to-gm.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/seq/map-mt32-to-gm.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/sfx/seq/map-mt32-to-gm.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -228,8 +228,8 @@
 
 static struct {
 	const char *name;
-	gint8 gm_instr;
-	gint8 gm_rhythm_key;
+	int8 gm_instr;
+	int8 gm_rhythm_key;
 } MT32_PresetTimbreMaps[] = {
 	/*000*/  {"AcouPiano1", 0, SFX_UNMAPPED},
 	/*001*/  {"AcouPiano2", 1, SFX_UNMAPPED},
@@ -363,8 +363,8 @@
 
 static struct {
 	const char *name;
-	gint8 gm_instr;
-	gint8 gm_rhythmkey;
+	int8 gm_instr;
+	int8 gm_rhythmkey;
 } MT32_RhythmTimbreMaps[] = {
 	/*00*/  {"Acou BD   ", SFX_MAPPED_TO_RHYTHM, 34},
 	/*01*/  {"Acou SD   ", SFX_MAPPED_TO_RHYTHM, 37},
@@ -398,7 +398,7 @@
 	/*29*/  {"OpenHiHat2", SFX_MAPPED_TO_RHYTHM, 43}
 };
 
-static gint8
+static int8
 MT32_PresetRhythmKeymap[] = {
 	SFX_UNMAPPED, SFX_UNMAPPED, SFX_UNMAPPED, SFX_UNMAPPED, SFX_UNMAPPED, SFX_UNMAPPED, SFX_UNMAPPED, SFX_UNMAPPED, SFX_UNMAPPED, SFX_UNMAPPED,
 	SFX_UNMAPPED, SFX_UNMAPPED, SFX_UNMAPPED, SFX_UNMAPPED, SFX_UNMAPPED, SFX_UNMAPPED, SFX_UNMAPPED, SFX_UNMAPPED, SFX_UNMAPPED, SFX_UNMAPPED,
@@ -424,8 +424,8 @@
    R   - Rhythm... */
 static struct {
 	const char *name;
-	gint8 gm_instr;
-	gint8 gm_rhythm_key;
+	int8 gm_instr;
+	int8 gm_rhythm_key;
 } MT32_MemoryTimbreMaps[] = {
 	{"AccPnoKA2 ", 1, SFX_UNMAPPED},     /* ++ (KQ1) */
 	{"Acou BD   ", SFX_MAPPED_TO_RHYTHM, 34},   /* R (PQ2) */
@@ -560,7 +560,7 @@
 	{0, 0, 0}
 };
 
-static gint8
+static int8
 lookup_instrument(const char *iname) {
 	int i = 0;
 
@@ -572,7 +572,7 @@
 	return SFX_UNMAPPED;
 }
 
-static gint8
+static int8
 lookup_rhythm_key(const char *iname) {
 	int i = 0;
 
@@ -675,9 +675,9 @@
 sfx_instrument_map_t *
 sfx_instrument_map_mt32_to_gm(byte *data, size_t size) {
 	int memtimbres, patches;
-	guint8 group, number, keyshift, finetune, bender_range;
-	guint8 *patchpointer;
-	guint32 pos;
+	uint8 group, number, keyshift, finetune, bender_range;
+	uint8 *patchpointer;
+	uint32 pos;
 	sfx_instrument_map_t * map;
 	int i;
 	int type;

Modified: scummvm/trunk/engines/sci/sfx/seq/oss-adlib.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/seq/oss-adlib.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/sfx/seq/oss-adlib.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -50,7 +50,7 @@
 extern int seqfd;
 #endif
 
-static guint8 instr[MIDI_CHANNELS];
+static uint8 instr[MIDI_CHANNELS];
 static int dev;
 static int free_voices = ADLIB_VOICES;
 static long note_time[ADLIB_VOICES];
@@ -267,8 +267,8 @@
 }
 
 static inline int
-midi_adlib_event1(guint8 command, guint8 note, guint8 velocity) {
-	guint8 channel, oper;
+midi_adlib_event1(uint8 command, uint8 note, uint8 velocity) {
+	uint8 channel, oper;
 
 	channel = command & 0x0f;
 	oper = command & 0xf0;
@@ -301,9 +301,9 @@
 }
 
 static inline int
-midi_adlib_event2(guint8 command, guint8 param) {
-	guint8 channel;
-	guint8 oper;
+midi_adlib_event2(uint8 command, uint8 param) {
+	uint8 channel;
+	uint8 oper;
 
 	channel = command & 0x0f;
 	oper = command & 0xf0;

Modified: scummvm/trunk/engines/sci/sfx/sequencer.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/sequencer.h	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/sfx/sequencer.h	2009-02-21 21:16:41 UTC (rev 38746)
@@ -32,7 +32,6 @@
 #include "sci/tools.h"	// For GTimeVal
 #include "sci/sfx/sfx_core.h"
 #include "sci/sfx/device.h"
-#include "sci/include/scitypes.h"
 
 namespace Sci {
 
@@ -101,7 +100,7 @@
 	** Returns   : SFX_OK on success, SFX_ERROR otherwise
 	*/
 
-	int (*volume)(guint8 volume);  /* OPTIONAL -- can be NULL */
+	int (*volume)(uint8 volume);  /* OPTIONAL -- can be NULL */
 	/* Sets the sequencer volume
 	** Parameters; (byte) volume: The volume to set, with 0 being mute and 127 full volume
 	** Returns   : SFX_OK on success, SFX_ERROR otherwise
@@ -115,7 +114,7 @@
 
 	int patchfile, patchfile2; /* Patch resources to pass into the call to open(),
 		       ** if present, or SFX_SEQ_PATCHFILE_NONE  */
-	guint8 playmask; /* SCI 'playflag' mask to determine which SCI song channels
+	uint8 playmask; /* SCI 'playflag' mask to determine which SCI song channels
 			 ** this sequencer should play */
 	/* 0x01	-- MT-32
 	** 0x02	-- Yamaha FB-01
@@ -124,8 +123,8 @@
 	** 0x10	-- Tandy 3-voice
 	** 0x20 -- PC speaker
 	*/
-	guint8 play_rhythm; /* Plays the rhythm channel? */
-	gint8 polyphony; /* Device polyphony (# of voices) */
+	uint8 play_rhythm; /* Plays the rhythm channel? */
+	int8 polyphony; /* Device polyphony (# of voices) */
 
 	int min_write_ahead_ms; /* Minimal write-ahead, in milliseconds */
 	/* Note that write-ahead is tuned automatically; this enforces a lower limit */

Modified: scummvm/trunk/engines/sci/sfx/sfx_iterator.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/sfx_iterator.h	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/sfx/sfx_iterator.h	2009-02-21 21:16:41 UTC (rev 38746)
@@ -108,7 +108,7 @@
 
 #define INHERITS_SONG_ITERATOR \
 	songit_id_t ID;										  \
-	guint16 channel_mask;									  \
+	uint16 channel_mask;									  \
         fade_params_t fade;                                                                       \
 	unsigned int flags;									  \
 	int priority;                                                                             \
@@ -126,7 +126,7 @@
 typedef struct _song_iterator {
 
 	songit_id_t ID;
-	guint16 channel_mask; /* Bitmask of all channels this iterator will use */
+	uint16 channel_mask; /* Bitmask of all channels this iterator will use */
 	fade_params_t fade;
 	unsigned int flags;
 	int priority;

Modified: scummvm/trunk/engines/sci/sfx/sfx_pcm.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/sfx_pcm.h	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/sfx/sfx_pcm.h	2009-02-21 21:16:41 UTC (rev 38746)
@@ -29,7 +29,6 @@
 #include "sci/sfx/sfx_core.h"
 #include "sci/sfx/sfx_timer.h"
 #include "sci/sfx/sfx_time.h"
-#include "sci/include/scitypes.h"
 
 namespace Sci {
 

Modified: scummvm/trunk/engines/sci/sfx/sfx_songlib.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/sfx_songlib.h	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/sfx/sfx_songlib.h	2009-02-21 21:16:41 UTC (rev 38746)
@@ -31,7 +31,6 @@
 #include "common/scummsys.h"
 
 #include "sci/tools.h"	// For GTimeVal
-#include "sci/include/scitypes.h"
 #include "sci/sfx/sfx_iterator.h"
 
 namespace Sci {

Modified: scummvm/trunk/engines/sci/sfx/softseq/SN76496.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/SN76496.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/sfx/softseq/SN76496.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -158,7 +158,7 @@
 
 
 void SN76496_poll(sfx_softseq_t *self, byte *dest, int len) {
-	gint16 *buf = (gint16 *) dest;
+	int16 *buf = (int16 *) dest;
 	int i;
 	int chan;
 	int freq[CHANNELS_NR];

Modified: scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -71,8 +71,8 @@
 	int transpose;
 	/* Envelope */
 	envelope_t envelope[4];
-	sbyte *samples;
-	sbyte *loop;
+	int8 *samples;
+	int8 *loop;
 } instrument_t;
 
 typedef struct bank {
@@ -141,14 +141,14 @@
 		channel->velocity = envelope[phase - 1].target;
 }
 
-static inline int interpolate(sbyte *samples, frac_t offset) {
+static inline int interpolate(int8 *samples, frac_t offset) {
 	int x = fracToInt(offset);
 	int diff = (samples[x + 1] - samples[x]) << 8;
 
 	return (samples[x] << 8) + fracToInt(diff * (offset & FRAC_LO_MASK));
 }
 
-static void play_instrument(gint16 *dest, channel_t *channel, int count) {
+static void play_instrument(int16 *dest, channel_t *channel, int count) {
 	int index = 0;
 	int vol = hw_channels[channel->hw_channel].volume;
 	instrument_t *instrument = bank.instruments[channel->instrument];
@@ -157,7 +157,7 @@
 		/* Available source samples until end of segment */
 		frac_t lin_avail;
 		int seg_end, rem, i, amount;
-		sbyte *samples;
+		int8 *samples;
 
 		if (channel->looping) {
 			samples = instrument->loop;
@@ -352,11 +352,11 @@
 	channels[channel].looping = 0;
 }
 
-static gint16 read_int16(byte *data) {
+static int16 read_int16(byte *data) {
 	return (data[0] << 8) | data[1];
 }
 
-static gint32 read_int32(byte *data) {
+static int32 read_int32(byte *data) {
 	return (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3];
 }
 
@@ -380,15 +380,15 @@
 	seg_size[2] = read_int16(header + 47) * 2;
 
 	instrument->mode = header[33];
-	instrument->transpose = (gint8) header[34];
+	instrument->transpose = (int8) header[34];
 	for (i = 0; i < 4; i++) {
-		int length = (gint8) header[49 + i];
+		int length = (int8) header[49 + i];
 
 		if (length == 0 && i > 0)
 			length = 256;
 
 		instrument->envelope[i].length = length * FREQUENCY / 60;
-		instrument->envelope[i].delta = (gint8) header[53 + i];
+		instrument->envelope[i].delta = (int8) header[53 + i];
 		instrument->envelope[i].target = header[57 + i];
 	}
 	/* Final target must be 0 */
@@ -410,7 +410,7 @@
 	sciprintf("                Segment sizes: %i %i %i\n", seg_size[0], seg_size[1], seg_size[2]);
 	sciprintf("                Segment offsets: 0 %i %i\n", loop_offset, read_int32(header + 43));
 #endif
-	instrument->samples = (sbyte *) sci_malloc(size + 1);
+	instrument->samples = (int8 *) sci_malloc(size + 1);
 	if (fread(instrument->samples, 1, size, file) < (unsigned int)size) {
 		sciprintf("[sfx:seq:amiga] Error: failed to read instrument samples\n");
 		return NULL;
@@ -433,7 +433,7 @@
 		instrument->size = seg_size[0];
 		instrument->loop_size = seg_size[1];
 
-		instrument->loop = (sbyte*)sci_malloc(instrument->loop_size + 1);
+		instrument->loop = (int8*)sci_malloc(instrument->loop_size + 1);
 		memcpy(instrument->loop, instrument->samples + loop_offset, instrument->loop_size);
 
 		instrument->samples[instrument->size] = instrument->loop[0];
@@ -569,8 +569,8 @@
 
 void ami_poll(sfx_softseq_t *self, byte *dest, int len) {
 	int i, j;
-	gint16 *buf = (gint16 *) dest;
-	gint16 *buffers = (gint16*)malloc(len * 2 * CHANNELS_NR);
+	int16 *buf = (int16 *) dest;
+	int16 *buffers = (int16*)malloc(len * 2 * CHANNELS_NR);
 
 	memset(buffers, 0, len * 2 * CHANNELS_NR);
 	memset(dest, 0, len * 4);

Modified: scummvm/trunk/engines/sci/sfx/softseq/fluidsynth.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/fluidsynth.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/sfx/softseq/fluidsynth.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -41,7 +41,7 @@
 static sfx_sequencer_t *gmseq;
 static fluid_settings_t* settings;
 static fluid_synth_t* synth;
-static guint8 status;
+static uint8 status;
 static char *soundfont = "/etc/midi/8MBGMSFX.SF2";
 static int rpn[16];
 
@@ -65,7 +65,7 @@
 	if (buf[0] == 0xf0)
 		sciprintf("FluidSynth: Skipping sysex message.\n");
 	else if (len == 2) {
-		guint8 command, channel;
+		uint8 command, channel;
 
 		command = buf[0] & 0xf0;
 		channel = buf[0] & 0x0f;
@@ -78,7 +78,7 @@
 			printf("FluidSynth: MIDI command [%02x %02x] not supported\n", buf[0], buf[1]);
 		}
 	} else if (len == 3) {
-		guint8 command, channel;
+		uint8 command, channel;
 
 		command = buf[0] & 0xf0;
 		channel = buf[0] & 0x0f;

Modified: scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -99,28 +99,28 @@
 	0x2ae
 };
 
-static guint8 sci_adlib_vol_base[16] = {
+static uint8 sci_adlib_vol_base[16] = {
 	0x00, 0x11, 0x15, 0x19, 0x1D, 0x22, 0x26, 0x2A,
 	0x2E, 0x23, 0x37, 0x3B, 0x3F, 0x3F, 0x3F, 0x3F
 };
-static guint8 sci_adlib_vol_tables[16][64];
+static uint8 sci_adlib_vol_tables[16][64];
 
 /* back to your regularly scheduled definitions */
 
-static guint8 instr[MIDI_CHANNELS];
-static guint16 pitch[MIDI_CHANNELS];
-static guint8 vol[MIDI_CHANNELS];
-static guint8 pan[MIDI_CHANNELS];
+static uint8 instr[MIDI_CHANNELS];
+static uint16 pitch[MIDI_CHANNELS];
+static uint8 vol[MIDI_CHANNELS];
+static uint8 pan[MIDI_CHANNELS];
 static int free_voices = ADLIB_VOICES;
-static guint8 oper_note[ADLIB_VOICES];
-static guint8 oper_chn[ADLIB_VOICES];
+static uint8 oper_note[ADLIB_VOICES];
+static uint8 oper_chn[ADLIB_VOICES];
 
 static FM_OPL *ym3812_L = NULL;
 static FM_OPL *ym3812_R = NULL;
 
-static guint8 adlib_reg_L[256];
-static guint8 adlib_reg_R[256];
-static guint8 adlib_master;
+static uint8 adlib_reg_L[256];
+static uint8 adlib_reg_R[256];
+static uint8 adlib_master;
 
 
 /* initialise note/operator lists, etc. */
@@ -131,7 +131,7 @@
 
 	for (i = 0 ; i < 16 ; i++) {
 		for (j = 0; j < 64 ; j++) {
-			sci_adlib_vol_tables[i][j] = ((guint16)sci_adlib_vol_base[i]) * j / 63;
+			sci_adlib_vol_tables[i][j] = ((uint16)sci_adlib_vol_base[i]) * j / 63;
 		}
 	}
 
@@ -171,14 +171,14 @@
 }
 
 /*
-static inline guint8 opl_read (int a)
+static inline uint8 opl_read (int a)
 {
   OPLWrite (ym3812_L, 0x388, a);
   return OPLRead (ym3812_L, 0x389);
 }
 */
 
-void synth_setpatch(int voice, guint8 *data) {
+void synth_setpatch(int voice, uint8 *data) {
 	int i;
 
 	opl_write(0xBD, 0);
@@ -201,7 +201,7 @@
 }
 
 void synth_setvolume_L(int voice, int volume) {
-	gint8 level1, level2;
+	int8 level1, level2;
 
 	level1 = ~adlib_reg_L[register_base[2] + register_offset[voice]] & 0x3f;
 	level2 = ~adlib_reg_L[register_base[3] + register_offset[voice]] & 0x3f;
@@ -227,17 +227,17 @@
 	/* algorithm-dependent; we may need to set both operators. */
 	if (adlib_reg_L[register_base[10] + voice] & 1)
 		opl_write_L(register_base[2] + register_offset[voice],
-		            (guint8)((~level1 &0x3f) |
+		            (uint8)((~level1 &0x3f) |
 		                     (adlib_reg_L[register_base[2] + register_offset[voice]]&0xc0)));
 
 	opl_write_L(register_base[3] + register_offset[voice],
-	            (guint8)((~level2 &0x3f) |
+	            (uint8)((~level2 &0x3f) |
 	                     (adlib_reg_L[register_base[3] + register_offset[voice]]&0xc0)));
 
 }
 
 void synth_setvolume_R(int voice, int volume) {
-	gint8 level1, level2;
+	int8 level1, level2;
 
 	level1 = ~adlib_reg_R[register_base[2] + register_offset[voice]] & 0x3f;
 	level2 = ~adlib_reg_R[register_base[3] + register_offset[voice]] & 0x3f;
@@ -263,11 +263,11 @@
 	/* now for the other side. */
 	if (adlib_reg_R[register_base[10] + voice] & 1)
 		opl_write_R(register_base[2] + register_offset[voice],
-		            (guint8)((~level1 &0x3f) |
+		            (uint8)((~level1 &0x3f) |
 		                     (adlib_reg_R[register_base[2] + register_offset[voice]]&0xc0)));
 
 	opl_write_R(register_base[3] + register_offset[voice],
-	            (guint8)((~level2 &0x3f) |
+	            (uint8)((~level2 &0x3f) |
 	                     (adlib_reg_R[register_base[3] + register_offset[voice]]&0xc0)));
 
 }
@@ -423,9 +423,9 @@
 
 	int voice = 0;
 #if 0
-	guint8 data[] = { 0x25, 0x21, 0x48, 0x48, 0xf0, 0xf2, 0xf0, 0xa5, 0x00, 0x00, 0x06 };
+	uint8 data[] = { 0x25, 0x21, 0x48, 0x48, 0xf0, 0xf2, 0xf0, 0xa5, 0x00, 0x00, 0x06 };
 #else
-	guint8 *data = adlib_sbi[0x0a];
+	uint8 *data = adlib_sbi[0x0a];
 #endif
 
 #if 1
@@ -469,8 +469,8 @@
    We assume 16-bit stereo frames (ie 4 bytes)
 */
 static void opl2_poll(sfx_softseq_t *self, byte *dest, int count) {
-	gint16 *buffer = (gint16 *) dest;
-	gint16 *ptr = buffer;
+	int16 *buffer = (int16 *) dest;
+	int16 *ptr = buffer;
 
 	if (!ready) {
 		error("synth_mixer(): !ready \n");
@@ -580,8 +580,8 @@
 	return 0;
 }
 
-int midi_adlibemu_event(guint8 command, guint8 note, guint8 velocity, guint32 delta) {
-	guint8 channel, oper;
+int midi_adlibemu_event(uint8 command, uint8 note, uint8 velocity, uint32 delta) {
+	uint8 channel, oper;
 
 	channel = command & 0x0f;
 	oper = command & 0xf0;
@@ -628,9 +628,9 @@
 	return 0;
 }
 
-int midi_adlibemu_event2(guint8 command, guint8 param, guint32 delta) {
-	guint8 channel;
-	guint8 oper;
+int midi_adlibemu_event2(uint8 command, uint8 param, uint32 delta) {
+	uint8 channel;
+	uint8 oper;
 
 	channel = command & 0x0f;
 	oper = command & 0xf0;
@@ -649,9 +649,9 @@
 }
 
 static void opl2_volume(sfx_softseq_t *self, int volume) {
-	guint8 i;
+	uint8 i;
 
-	i = (guint8)volume * 15 / 100;
+	i = (uint8)volume * 15 / 100;
 
 	adlib_master = i;
 

Modified: scummvm/trunk/engines/sci/sfx/softseq/pcspeaker.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/pcspeaker.cpp	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/sfx/softseq/pcspeaker.cpp	2009-02-21 21:16:41 UTC (rev 38746)
@@ -110,7 +110,7 @@
 	int oct_diff = ((halftone_delta + BASE_OCTAVE * 12) / 12) - BASE_OCTAVE;
 	int halftone_index = (halftone_delta + (12 * 100)) % 12 ;
 	int freq = (!note) ? 0 : freq_table[halftone_index] / (1 << (-oct_diff));
-	gint16 *buf = (gint16 *) dest;
+	int16 *buf = (int16 *) dest;
 
 	int i;
 	for (i = 0; i < len; i++) {

Modified: scummvm/trunk/engines/sci/tools.h
===================================================================
--- scummvm/trunk/engines/sci/tools.h	2009-02-21 21:07:51 UTC (rev 38745)
+++ scummvm/trunk/engines/sci/tools.h	2009-02-21 21:16:41 UTC (rev 38746)
@@ -54,8 +54,6 @@
 #endif
 #define VERSION "0.6.4"
 
-#include "sci/include/scitypes.h"
-
 // FIXME: Mostly for close() in lots of places. Get rid of this!
 #ifndef _MSC_VER
 #include <unistd.h>


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