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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Wed May 20 19:53:31 CEST 2009


Revision: 40742
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40742&view=rev
Author:   fingolfin
Date:     2009-05-20 17:53:31 +0000 (Wed, 20 May 2009)

Log Message:
-----------
removed trailing whitespaces

Modified Paths:
--------------
    scummvm/trunk/engines/sci/decompressor.cpp
    scummvm/trunk/engines/sci/decompressor.h
    scummvm/trunk/engines/sci/detection.cpp
    scummvm/trunk/engines/sci/engine/game.cpp
    scummvm/trunk/engines/sci/engine/intmap.cpp
    scummvm/trunk/engines/sci/engine/kfile.cpp
    scummvm/trunk/engines/sci/engine/kgraphics.cpp
    scummvm/trunk/engines/sci/engine/kpathing.cpp
    scummvm/trunk/engines/sci/engine/message.cpp
    scummvm/trunk/engines/sci/engine/said.cpp
    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/state.h
    scummvm/trunk/engines/sci/engine/stringfrag.cpp
    scummvm/trunk/engines/sci/gfx/gfx_res_options.cpp
    scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp
    scummvm/trunk/engines/sci/gfx/gfx_resmgr.h
    scummvm/trunk/engines/sci/gfx/gfx_tools.cpp
    scummvm/trunk/engines/sci/gfx/operations.cpp
    scummvm/trunk/engines/sci/gfx/palette.cpp
    scummvm/trunk/engines/sci/gfx/picfill.cpp
    scummvm/trunk/engines/sci/gfx/res_cursor.cpp
    scummvm/trunk/engines/sci/gfx/res_pic.cpp
    scummvm/trunk/engines/sci/resource.cpp
    scummvm/trunk/engines/sci/resource.h
    scummvm/trunk/engines/sci/sci.cpp
    scummvm/trunk/engines/sci/sci.h
    scummvm/trunk/engines/sci/sfx/iterator.cpp
    scummvm/trunk/engines/sci/sfx/iterator_internal.h
    scummvm/trunk/engines/sci/vocab_debug.cpp

Modified: scummvm/trunk/engines/sci/decompressor.cpp
===================================================================
--- scummvm/trunk/engines/sci/decompressor.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/decompressor.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -8,7 +8,7 @@
  * 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
@@ -200,7 +200,7 @@
 				if (token >= _curtoken) {
 					warning("unpackLZW: Bad token %x", token);
 					return SCI_ERROR_DECOMPRESSION_ERROR;
-				} 
+				}
 				tokenlastlength = tokenlengthlist[token] + 1;
 				if (_dwWrote + tokenlastlength > _szUnpacked) {
 					// For me this seems a normal situation, It's necessary to handle it
@@ -387,7 +387,7 @@
 	byte *writer = dest;
 	char viewdata[7];
 	byte *cdata, *cdata_start;
-	
+
 	*writer++ = PIC_OP_OPX;
 	*writer++ = PIC_OPX_SET_PALETTE;
 
@@ -406,7 +406,7 @@
 
 	memcpy(viewdata, seeker, sizeof(viewdata));
 	seeker += sizeof(viewdata);
-	
+
 	memcpy(writer, seeker, 4*256); /* Palette */
 	seeker += 4*256;
 	writer += 4*256;
@@ -418,7 +418,7 @@
 	}
 
 	if (dsize != view_start + EXTRA_MAGIC_SIZE + view_size) {
-		memcpy(dest + view_size + view_start + EXTRA_MAGIC_SIZE, seeker, 
+		memcpy(dest + view_size + view_start + EXTRA_MAGIC_SIZE, seeker,
 		       dsize - view_size - view_start - EXTRA_MAGIC_SIZE);
 		seeker += dsize - view_size - view_start - EXTRA_MAGIC_SIZE;
 	}
@@ -426,7 +426,7 @@
 	cdata_start = cdata = (byte *)malloc(cdata_size);
 	memcpy(cdata, seeker, cdata_size);
 	seeker += cdata_size;
-	
+
 	writer = dest + view_start;
 	*writer++ = PIC_OP_OPX;
 	*writer++ = PIC_OPX_EMBEDDED_VIEW;
@@ -442,7 +442,7 @@
 	*writer++ = 0;
 
 	decodeRLE(&seeker, &cdata, writer, view_size);
-	
+
 	free(cdata_start);
 }
 
@@ -903,17 +903,17 @@
 	uint16 offs = 0, clen;
 
 	while (!isFinished()) {
-		if (getBitsMSB(1)) { // Compressed bytes follow 
+		if (getBitsMSB(1)) { // Compressed bytes follow
 			if (getBitsMSB(1)) { // Seven bit offset follows
 				offs = getBitsMSB(7);
-				if (!offs) // This is the end marker - a 7 bit offset of zero 
+				if (!offs) // This is the end marker - a 7 bit offset of zero
 					break;
 				if (!(clen = getCompLen())) {
 					warning("lzsDecomp: length mismatch");
 					return SCI_ERROR_DECOMPRESSION_ERROR;
 				}
 				copyComp(offs, clen);
-			} else { // Eleven bit offset follows 
+			} else { // Eleven bit offset follows
 				offs = getBitsMSB(11);
 				if (!(clen = getCompLen())) {
 					warning("lzsDecomp: length mismatch");

Modified: scummvm/trunk/engines/sci/decompressor.h
===================================================================
--- scummvm/trunk/engines/sci/decompressor.h	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/decompressor.h	2009-05-20 17:53:31 UTC (rev 40742)
@@ -63,7 +63,7 @@
 	 * @param nUnpacket	size of unpacked data
 	 * @return 0 on success, non-zero on error
 	 */
-	virtual void init(Common::ReadStream *src, byte *dest, uint32 nPacked, uint32 nUnpacked);	
+	virtual void init(Common::ReadStream *src, byte *dest, uint32 nPacked, uint32 nUnpacked);
 
 	/**
 	 * Get a number of bits from _src stream, starting with the most
@@ -89,7 +89,7 @@
 	byte getByteLSB();
 
 	void fetchBitsMSB();
-	void fetchBitsLSB(); 
+	void fetchBitsLSB();
 
 	/**
 	 * Write one byte into _dest stream
@@ -158,7 +158,7 @@
 	void decodeRLE(byte **rledata, byte **pixeldata, byte *outbuffer, int size);
 	int getRLEsize(byte *rledata, int dsize);
 	void buildCelHeaders(byte **seeker, byte **writer, int celindex, int *cc_lengths, int max);
-	
+
 	// decompressor data
 	struct Tokenlist {
 		byte data;

Modified: scummvm/trunk/engines/sci/detection.cpp
===================================================================
--- scummvm/trunk/engines/sci/detection.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/detection.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -1567,7 +1567,7 @@
 		SCI_VERSION_AUTODETECT,
 		SCI_VERSION_0
 	},
-	
+
 	// Larry 2 - English DOS
 	// SCI interpreter version 0.000.409
 	{{"lsl2", "", {
@@ -3476,7 +3476,7 @@
 
 	// Try to parse the executable version
 	if (getSciVersionFromString(exeVersionString, &g_fallbackDesc.version, g_fallbackDesc.desc.platform)) {
-		printf("Detected version: %s, parsed SCI version: %s\n", 
+		printf("Detected version: %s, parsed SCI version: %s\n",
 					exeVersionString.c_str(), versionNames[g_fallbackDesc.version]);
 
 		return (const ADGameDescription *)&g_fallbackDesc;

Modified: scummvm/trunk/engines/sci/engine/game.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/game.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/engine/game.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -143,7 +143,7 @@
 
 	s->visual = gfxw_new_visual(s->gfx_state, font_nr);
 
-	s->wm_port = gfxw_new_port(s->visual, NULL, s->gfx_state->pic_port_bounds, s->ega_colors[0], transparent);	
+	s->wm_port = gfxw_new_port(s->visual, NULL, s->gfx_state->pic_port_bounds, s->ega_colors[0], transparent);
 
 	s->iconbar_port = gfxw_new_port(s->visual, NULL, gfx_rect(0, 0, 320, 200), s->ega_colors[0], transparent);
 	s->iconbar_port->_flags |= GFXW_FLAG_NO_IMPLICIT_SWITCH;
@@ -419,7 +419,7 @@
 	str->max_size = MAX_SAVE_DIR_SIZE;
 	str->value = (reg_t *)calloc(MAX_SAVE_DIR_SIZE, sizeof(reg_t));	// FIXME -- sizeof(char) or sizeof(reg_t) ??
 	str->value[0].segment = s->string_frag_segment; // Set to empty string
-	str->value[0].offset = 0; 
+	str->value[0].offset = 0;
 
 
 	s->save_dir_copy = make_reg(s->sys_strings_segment, SYS_STRING_SAVEDIR);
@@ -458,7 +458,7 @@
 
 void script_set_gamestate_save_dir(EngineState *s, const char *path) {
 	SystemString *str = &s->sys_strings->strings[SYS_STRING_SAVEDIR];
-	
+
 	strncpy((char *)str->value, path, str->max_size);		// FIXME -- strncpy or internal_stringfrag_strncpy ?
 	str->value[str->max_size - 1].segment = s->string_frag_segment; // Make sure to terminate
 	str->value[str->max_size - 1].offset &= 0xff00; // Make sure to terminate

Modified: scummvm/trunk/engines/sci/engine/intmap.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/intmap.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/engine/intmap.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -104,7 +104,7 @@
 
 	if (*node)
 		return (*node)->idx;
-	
+
 	return -1;
 }
 

Modified: scummvm/trunk/engines/sci/engine/kfile.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kfile.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/engine/kfile.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -46,14 +46,14 @@
  *
  * To handle opening a file called "foobar", what we do is this: First, we
  * create an 'augmented file name', by prepending the game target and a dash,
- * so if we running game target sq1vga, the name becomes "sq1vga-foobar". 
+ * so if we running game target sq1vga, the name becomes "sq1vga-foobar".
  * Next, we check if such a file is known to the SaveFileManager. If so, we
  * we use that for reading/writing, delete it, whatever.
  *
  * If no such file is present but we were only asked to *read* the file,
  * we fallback to looking for a regular file called "foobar", and open that
  * for reading only.
- * 
+ *
  * There are some caveats to this: First off, SCI apparently has no way
  * to signal that a file is supposed to be opened for reading only. For now,
  * we hackishly just assume that this is what _K_FILE_MODE_OPEN_OR_FAIL is for.
@@ -71,9 +71,9 @@
  * at all, and for what. Based on that, we can maybe come up with a better waybill
  * to provide this functionality.
  */
- 
- 
 
+
+
 FileHandle::FileHandle() : _in(0), _out(0) {
 }
 
@@ -197,7 +197,7 @@
 	s->_fileHandles[handle]._name = filename;
 
 	s->r_acc = make_reg(0, handle);
-	
+
 	debug(3, " -> opened file '%s' with handle %d", filename, handle);
 }
 
@@ -694,7 +694,7 @@
 
 
 void DirSeeker::firstFile(const char *mask, reg_t buffer) {
-	
+
 	// Verify that we are given a valid buffer
 	if (!buffer.segment) {
 		error("DirSeeker::firstFile('%s') invoked with invalid buffer", mask);
@@ -722,7 +722,7 @@
 	char *mem = kernel_dereference_char_pointer(_vm, _outbuffer, 0);
 	memset(mem, 0, 13);
 
-	// TODO: Transform the string back into a format usable by the SCI scripts. 
+	// TODO: Transform the string back into a format usable by the SCI scripts.
 	// I.e., strip any TARGET- prefix.
 	const char *string = _iter->c_str();
 	assert(string);

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -276,7 +276,7 @@
 	else {
 		error("Color index %d out of bounds for pic %d (%d max)", color, s->gfx_state->pic_nr, s->gfx_state->gfxResMan->getColorCount());
 		BREAKPOINT();
-		return PaletteEntry(0,0,0); 
+		return PaletteEntry(0,0,0);
 	}
 }
 
@@ -312,7 +312,7 @@
 			s->mouse_pointer_loop = s->save_mouse_pointer_loop;
 			s->mouse_pointer_cel = s->save_mouse_pointer_cel;
 		}
-	case 2 : 
+	case 2 :
 	case 4 :
 		if (s->version >= SCI_VERSION_1_1 || (s->flags & GF_SCI1_NEWSETCURSOR)) {
 			GFX_ASSERT(gfxop_set_pointer_position(s->gfx_state, Common::Point(UKPV(0), UKPV(1))));
@@ -1344,8 +1344,8 @@
 	 * SQ4SG.<number>) and the exact file format of the savegame index
 	 * (SQ4SG.DIR). From the earlier discussions on file I/O handling -
 	 * before as well as after the merge - I gather that this is not an
-	 * option. 
-	 * 
+	 * option.
+	 *
 	 * SQ4/Floppy is special, being the first game to implement savegame
 	 * deletion at all. For later games, we manage to implement deletion by
 	 * using gross hacks in kDeviceInfo() (essentially repurposing a few
@@ -3155,7 +3155,7 @@
 	color0 = port->_color;
 	bg_color = port->_bgcolor;
 	// TODO: in SCI1VGA the default colors for text and background are #0 (black)
-	// SCI0 case should be checked 
+	// SCI0 case should be checked
 	if (s->resmgr->_sciVersion >= SCI_VERSION_01_VGA) {
 		// This priority check fixes the colors in the menus in KQ5
 		// TODO/FIXME: Is this correct?

Modified: scummvm/trunk/engines/sci/engine/kpathing.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kpathing.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/engine/kpathing.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -75,7 +75,7 @@
 	PF_OK = 0,
 	PF_ERROR = -1,
 	PF_FATAL = -2
-};	
+};
 
 // Floating point struct
 struct FloatPoint {
@@ -130,11 +130,11 @@
 
 public:
 	CircularVertexList() : _head(0) {}
-	
+
 	Vertex *first() const {
 		return _head;
 	}
-	
+
 	void insertHead(Vertex *elm) {
 		if (_head == NULL) {
 			elm->_next = elm->_prev = elm;
@@ -240,7 +240,7 @@
 		_appendPoint = NULL;
 		vertices = 0;
 	}
-	
+
 	~PathfindingState() {
 		free(vertex_index);
 
@@ -810,10 +810,10 @@
 		if (VERTEX_HAS_EDGES(vertex)) {
 			CLIST_FOREACH(vertex, &polygon->vertices) {
 				const Common::Point *high, *low;
-	
+
 				// Add edges that intersect the initial position of the sweeping line
 				clockwise(vertex, high, low);
-	
+
 				if ((high->y < p.y) && (low->y >= p.y) && (*low != p))
 					intersected.push_front(vertex);
 			}
@@ -1201,7 +1201,7 @@
 		if (VERTEX_HAS_EDGES(polygon->vertices.first())) {
 			CLIST_FOREACH(vertex, &polygon->vertices) {
 				Vertex *next = CLIST_NEXT(vertex);
-		
+
 				if (between(vertex->v, next->v, v)) {
 					// Split edge by adding vertex
 					polygon->vertices.insertAfter(vertex, v_new);

Modified: scummvm/trunk/engines/sci/engine/message.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/message.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/engine/message.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -87,9 +87,9 @@
 	while (1) {
 		MessageTuple looking_at = getTuple();
 
-		if (t.noun == looking_at.noun && 
-			t.verb == looking_at.verb && 
-			t.cond == looking_at.cond && 
+		if (t.noun == looking_at.noun &&
+			t.verb == looking_at.verb &&
+			t.cond == looking_at.cond &&
 			t.seq == looking_at.seq)
 			break;
 

Modified: scummvm/trunk/engines/sci/engine/said.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/said.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/engine/said.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -1245,7 +1245,7 @@
 #endif
 #endif
 {
-  
+
   int yystate;
   int yyn;
   int yyresult;

Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -82,7 +82,7 @@
 	s.syncAsSint32LE(obj.restore_time);
 	s.syncAsSint32LE(obj.loops);
 	s.syncAsSint32LE(obj.hold);
-	
+
 	if (s.isLoading()) {
 		obj._delay = 0;
 		obj.it = 0;
@@ -219,7 +219,7 @@
 		delete obj;
 		obj = new SegManager(sci11);
 	}
-	
+
 	obj->saveLoadWithSerializer(s);
 }
 
@@ -366,7 +366,7 @@
 static void sync_SystemString(Common::Serializer &s, SystemString &obj) {
 	syncCStr(s, &obj.name);
 	s.syncAsSint32LE(obj.max_size);
-	
+
 	// FIXME: This is a *WEIRD* hack: We sync a reg_t* as if it was a string.
 	// No idea why, but this mimicks what the old save/load code used to do.
 	syncCStr(s, (char **)&obj.value);
@@ -406,7 +406,7 @@
 	if (s.isSaving())
 		songcount = song_lib_count(obj);
 	s.syncAsUint32LE(songcount);
-	
+
 	if (s.isLoading()) {
 		song_lib_init(&obj);
 		while (songcount--) {
@@ -442,7 +442,7 @@
 	} else {
 		assert(mobj);
 	}
-	
+
 	s.syncAsSint32LE(mobj->_segmgrId);
 	mobj->saveLoadWithSerializer(s);
 }
@@ -819,7 +819,7 @@
 	internal_stringfrag_strncpy(s, str->value, s->sys_strings->strings[SYS_STRING_SAVEDIR].value, str->max_size);
 	str->value[str->max_size - 1].segment = s->string_frag_segment; // Make sure to terminate
 	str->value[str->max_size - 1].offset &= 0xff00; // Make sure to terminate
-	
+
 	// Time state:
 	retval->last_wait_time = g_system->getMillis();
 	retval->game_start_time = g_system->getMillis() - retval->game_time * 1000;

Modified: scummvm/trunk/engines/sci/engine/scriptdebug.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -91,7 +91,7 @@
 
 static const char *_debug_get_input() {
 	char newinpbuf[256];
-	
+
 	printf("> ");
 	if (!fgets(newinpbuf, 254, stdin))
 		return NULL;

Modified: scummvm/trunk/engines/sci/engine/seg_manager.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/engine/seg_manager.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -824,7 +824,7 @@
 
 SegmentId SegManager::allocateStringFrags() {
 	SegmentId segid;
-	
+
 	allocNonscriptSegment(MEM_OBJ_STRING_FRAG, &segid);
 
 	return segid;

Modified: scummvm/trunk/engines/sci/engine/state.h
===================================================================
--- scummvm/trunk/engines/sci/engine/state.h	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/engine/state.h	2009-05-20 17:53:31 UTC (rev 40742)
@@ -52,7 +52,7 @@
 struct GfxState;
 struct GfxPort;
 struct GfxVisual;
-struct GfxContainer;	
+struct GfxContainer;
 struct GfxList;
 
 
@@ -68,7 +68,7 @@
 		_outbuffer = NULL_REG;
 		_iter = _savefiles.begin();
 	}
-	
+
 	void firstFile(const char *mask, reg_t buffer);
 	void nextFile();
 };
@@ -100,11 +100,11 @@
 	Common::String _name;
 	Common::SeekableReadStream *_in;
 	Common::WriteStream *_out;
-	
+
 public:
 	FileHandle();
 	~FileHandle();
-	
+
 	void close();
 	bool isOpen() const;
 };
@@ -224,7 +224,7 @@
 	reg_t parser_base; /**< Base address for the parser error reporting mechanism */
 	reg_t parser_event; /**< The event passed to Parse() and later used by Said() */
 	Script *script_000;  /**< script 000, e.g. for globals */
-	
+
 	uint16 currentRoomNumber() const { return KP_UINT(script_000->locals_block->_locals[13]); }
 
 	int parser_lastmatch_word; /**< Position of the input word the parser last matched on, or SAID_NO_MATCH */

Modified: scummvm/trunk/engines/sci/engine/stringfrag.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/stringfrag.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/engine/stringfrag.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -38,7 +38,7 @@
 Max Horn wrote:
 > Basically, saving the reg_t "array" (?) in the SystemString struct (see
 > sync_SystemString in engine/savegame.cpp) seems like a bad hack that will
-> result in breakage... 
+> result in breakage...
 
 The short explanation is that the casts _will_ go away, but that the
 system strings, too, will become stringfrag-based eventually.
@@ -107,7 +107,7 @@
 
 	return internal_is_valid_stringfrag(s, buffer);
 }
-	
+
 static int internal_stringfrag_length(EngineState *s, reg_t *buffer) {
 	int result = 0;
 
@@ -245,20 +245,20 @@
 	/* Some of these values are not used yet. There are a couple
 	   of cases that we could implement faster if the need arises, in
 	   which case we would most certainly need these. */
-	int source_begin_pos = sourcepos/2; 
-	int source_begin_offset = sourcepos%2; 
+	int source_begin_pos = sourcepos/2;
+	int source_begin_offset = sourcepos%2;
 	int source_end_pos = (sourcepos+count-1)/2;
 	int source_end_offset = (sourcepos+count-1)%2;
 
-	int dest_begin_pos = destpos/2; 
-	int dest_begin_offset = destpos%2; 
+	int dest_begin_pos = destpos/2;
+	int dest_begin_offset = destpos%2;
 	int dest_end_pos = (destpos+count-1)/2;
 	int dest_end_offset = (destpos+count-1)%2;
 
 	if (sourcepos < destpos) {
 		for (int n = count-1; n >= 0; n--) {
 			buffer[dest_end_pos].segment = STRINGFRAG_SEGMENT;
-			stringfrag_setchar(buffer, dest_end_pos, dest_end_offset, 
+			stringfrag_setchar(buffer, dest_end_pos, dest_end_offset,
 					   stringfrag_getchar(buffer, source_end_pos, source_end_offset));
 			if (source_end_offset ^= 1)
 				source_end_pos --;
@@ -268,7 +268,7 @@
 	} else {
 		for (int n = 0; n < count; n++) {
 			buffer[dest_begin_pos].segment = STRINGFRAG_SEGMENT;
-			stringfrag_setchar(buffer, dest_begin_pos, dest_begin_offset, 
+			stringfrag_setchar(buffer, dest_begin_pos, dest_begin_offset,
 					   stringfrag_getchar(buffer, source_begin_pos, source_begin_offset));
 			if (!(source_begin_offset ^= 1))
 				source_begin_pos ++;
@@ -291,7 +291,7 @@
 
 	/* The variables restore_null_offset and restore_null_pos will
 	   indicate where the NUL character should be PUT BACK after
-	   inserting c, as this operation might overwrite the NUL. */ 
+	   inserting c, as this operation might overwrite the NUL. */
 	if (seeker->offset & 0xff00) {
 		restore_nul_offset = 1;
 		restore_nul_pos = 0;
@@ -329,7 +329,7 @@
 
 	/* The variables restore_null_offset and restore_null_pos will
 	   indicate where the NUL character should be PUT BACK after
-	   deletion, as this operation might overwrite the NUL. */ 
+	   deletion, as this operation might overwrite the NUL. */
 	if (seeker->offset & 0xff00) {
 		restore_nul_offset = 1;
 		restore_nul_pos = -1;

Modified: scummvm/trunk/engines/sci/gfx/gfx_res_options.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_res_options.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/gfx/gfx_res_options.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -140,7 +140,7 @@
 		UPDATE_COL(c.g, 1);
 		UPDATE_COL(c.b, 2);
 		pal->setColor(i, c.r, c.g, c.b);
-			
+
 #undef UPDATE_COL
 	}
 }
@@ -168,7 +168,7 @@
 		if (pxm->palette)
 			pxm->palette->free();
 
-		pxm->palette = new Palette(conf->conf.assign.assign.palette.colors, 
+		pxm->palette = new Palette(conf->conf.assign.assign.palette.colors,
 								   conf->conf.assign.assign.palette.colors_nr);
 		pxm->palette->name = "res";
 	}

Modified: scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -49,8 +49,8 @@
 	gfx_driver_t *driver;
 };
 
-GfxResManager::GfxResManager(int version, bool isVGA, gfx_options_t *options, gfx_driver_t *driver, ResourceManager *resManager) : 
-				_version(version), _isVGA(isVGA), _options(options), _driver(driver), _resManager(resManager), 
+GfxResManager::GfxResManager(int version, bool isVGA, gfx_options_t *options, gfx_driver_t *driver, ResourceManager *resManager) :
+				_version(version), _isVGA(isVGA), _options(options), _driver(driver), _resManager(resManager),
 				_lockCounter(0), _tagLockCounter(0), _staticPalette(0) {
 	gfxr_init_static_palette();
 
@@ -154,7 +154,7 @@
 			return 10;
 		else
 			return (_options->pic0_unscaled) ? 0x10000 : (_options->pic0_dither_mode << 12)
-			       | (_options->pic0_dither_pattern << 8) | (_options->pic0_brush_mode << 4) 
+			       | (_options->pic0_dither_pattern << 8) | (_options->pic0_brush_mode << 4)
 				   | (_options->pic0_line_mode);
 #else
 		if (_version >= SCI_VERSION_01_VGA)
@@ -536,7 +536,7 @@
 				view->palette = new Palette(_staticPalette->size());
 				view->palette->name = "interpreter_get_view";
 			}
-			
+
 			// Palettize view
 			for (unsigned i = 0; i < MIN(view->palette->size(), _staticPalette->size()); i++) {
 				const PaletteEntry& vc = view->palette->getColor(i);
@@ -659,7 +659,7 @@
 			return NULL;
 		}
 
-		gfx_pixmap_t *cursor = gfxr_draw_cursor(GFXR_RES_ID(GFX_RESOURCE_TYPE_CURSOR, num), 
+		gfx_pixmap_t *cursor = gfxr_draw_cursor(GFXR_RES_ID(GFX_RESOURCE_TYPE_CURSOR, num),
 										cursorRes->data, cursorRes->size, _version != SCI_VERSION_0);
 
 		if (!cursor)

Modified: scummvm/trunk/engines/sci/gfx/gfx_resmgr.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_resmgr.h	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/gfx/gfx_resmgr.h	2009-05-20 17:53:31 UTC (rev 40742)
@@ -138,7 +138,7 @@
 
 
 	/* Retrieves a translated view cel
-	** Parameters: 
+	** Parameters:
 	**             (int) nr: The view number
 	**             (int *) loop: Pointer to a variable containing the loop number
 	**             (int *) cel: Pointer to a variable containing the cel number

Modified: scummvm/trunk/engines/sci/gfx/gfx_tools.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_tools.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/gfx/gfx_tools.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -49,7 +49,7 @@
 	mode->xfact = xfact;
 	mode->yfact = yfact;
 	mode->bytespp = format.bytesPerPixel;
-	
+
 	// FIXME: I am not sure whether the following assignments are quite right.
 	// The only code using these are the built-in scalers of the SCI engine.
 	// And those are pretty weird, so I am not sure I interpreted them correctly.

Modified: scummvm/trunk/engines/sci/gfx/operations.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/operations.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/gfx/operations.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -405,7 +405,7 @@
 	(*pixmap)->palette = new Palette(default_colors, DEFAULT_COLORS_NR);
 }
 
-int gfxop_init(int version, bool isVGA, GfxState *state, gfx_options_t *options, ResourceManager *resManager, 
+int gfxop_init(int version, bool isVGA, GfxState *state, gfx_options_t *options, ResourceManager *resManager,
 			   int xfact, int yfact, gfx_color_mode_t bpp) {
 	int color_depth = bpp ? bpp : 1;
 	int initialized = 0;

Modified: scummvm/trunk/engines/sci/gfx/palette.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/palette.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/gfx/palette.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -164,12 +164,12 @@
 
 	for (uint i = 0; i < _size; ++i) {
 		PaletteEntry& entry = _colors[i];
-	
+
 		if (entry.refcount != PALENTRY_FREE) {
 			int dr = abs(entry.r - r);
 			int dg = abs(entry.g - g);
 			int db = abs(entry.b - b);
-	
+
 			if (dr == 0 && dg == 0 && db == 0) {
 				// Exact match
 				//exact = true;
@@ -177,7 +177,7 @@
 					entry.refcount++;
 				return i;
 			}
-	
+
 			int delta = (dr * dr) + (dg * dg) + (db * db);
 			if (delta < bestdelta) {
 				bestdelta = delta;
@@ -188,7 +188,7 @@
 				firstfree = i;
 		}
 	}
-	
+
 	if (firstfree != -1) {
 		// TODO: mark palette as dirty
 		setColor(firstfree, r, g, b);

Modified: scummvm/trunk/engines/sci/gfx/picfill.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/picfill.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/gfx/picfill.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -32,13 +32,13 @@
  *    AUXBUF_FILL: Name of the exported floodfill function
  *    AUXBUF_FILL_HELPER: Name of the helper function
  *    FILL_FUNCTION: Name of the exported floodfill function
- *    FILL_FUNCTION_RECURSIVE: Name of the helper function 
+ *    FILL_FUNCTION_RECURSIVE: Name of the helper function
  *
  * Define DRAW_SCALED to support scaled drawing, or leave it out for faster
  * processing.
  *
  */
- 
+
 namespace Sci {
 
 #define CLIPMASK_HARD_BOUND 0x80 /* ensures that we don't re-fill filled stuff */

Modified: scummvm/trunk/engines/sci/gfx/res_cursor.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/res_cursor.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/gfx/res_cursor.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -59,8 +59,8 @@
 
 	retval = gfx_pixmap_alloc_index_data(gfx_new_pixmap(CURSOR_SIZE, CURSOR_SIZE, id, 0, 0));
 	// FIXME: don't copy palette
- 	retval->palette = new Palette(gfx_sci01_cursor_colors, isSci01 ? GFX_SCI01_CURSOR_COLORS_NR : GFX_SCI0_CURSOR_COLORS_NR);
- 	retval->palette->name = "cursor"; 
+	retval->palette = new Palette(gfx_sci01_cursor_colors, isSci01 ? GFX_SCI01_CURSOR_COLORS_NR : GFX_SCI0_CURSOR_COLORS_NR);
+	retval->palette->name = "cursor";
 	retval->color_key = GFX_CURSOR_TRANSPARENT;
 
 	if (isSci01) {

Modified: scummvm/trunk/engines/sci/gfx/res_pic.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/res_pic.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/gfx/res_pic.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -1552,7 +1552,7 @@
 
 				gfx_xlate_pixmap(view, mode, GFX_XLATE_FILTER_NONE);
 				gfx_free_mode(mode);
-				// When the mode is freed, the associated view 
+				// When the mode is freed, the associated view
 				// palette is freed too, so set it to NULL
 				view->palette = NULL;
 

Modified: scummvm/trunk/engines/sci/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/resource.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/resource.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -748,8 +748,8 @@
 
 		int chk = (curVersion == SCI_VERSION_0) ? 4 : 20;
 		int offs = curVersion < SCI_VERSION_1_1 ? 4 : 0;
-		if ((curVersion < SCI_VERSION_32 && wCompression > chk) 
-				|| (curVersion == SCI_VERSION_32 && wCompression != 0 && wCompression != 32) 
+		if ((curVersion < SCI_VERSION_32 && wCompression > chk)
+				|| (curVersion == SCI_VERSION_32 && wCompression != 0 && wCompression != 32)
 				|| (wCompression == 0 && dwPacked != dwUnpacked + offs)
 		        || (dwUnpacked < dwPacked - offs)) {
 
@@ -868,7 +868,7 @@
 			} else {
 				// SCI0 scheme
 				int resname_len = strlen(szResType);
-				if (scumm_strnicmp(name.c_str(), szResType, resname_len) == 0 
+				if (scumm_strnicmp(name.c_str(), szResType, resname_len) == 0
 					&& !isalpha(name[resname_len + 1])) {
 					number = atoi(name.c_str() + resname_len + 1);
 					bAdd = true;
@@ -1056,10 +1056,10 @@
 		compression = kCompNone;
 		break;
 	case 1:
-		compression = (_sciVersion == SCI_VERSION_0) ? kCompLZW : kCompHuffman; 
+		compression = (_sciVersion == SCI_VERSION_0) ? kCompLZW : kCompHuffman;
 		break;
 	case 2:
-		compression = (_sciVersion == SCI_VERSION_0) ? kCompHuffman : kCompLZW1; 
+		compression = (_sciVersion == SCI_VERSION_0) ? kCompHuffman : kCompLZW1;
 		break;
 	case 3:
 		compression = kCompLZW1View;

Modified: scummvm/trunk/engines/sci/resource.h
===================================================================
--- scummvm/trunk/engines/sci/resource.h	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/resource.h	2009-05-20 17:53:31 UTC (rev 40742)
@@ -129,7 +129,7 @@
 struct resource_index_t {
 	uint16 wOffset;
 	uint16 wSize;
-}; 
+};
 
 struct ResourceSource {
 	ResSourceType source_type;

Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/sci.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -201,7 +201,7 @@
 		}
 	} else if (version >= SCI_VERSION_1_EARLY && version <= SCI_VERSION_1_LATE) {
 		// SCI1
-		
+
 		if (gamestate->flags & GF_SCI0_OLD ||
 			gamestate->flags & GF_SCI0_OLDGFXFUNCS ||
 			gamestate->flags & GF_SCI0_OLDGETTIME) {

Modified: scummvm/trunk/engines/sci/sci.h
===================================================================
--- scummvm/trunk/engines/sci/sci.h	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/sci.h	2009-05-20 17:53:31 UTC (rev 40742)
@@ -111,7 +111,7 @@
 	/*
 	** SCI1 flags
 	*/
-	
+
 	/*
 	** Used to distinguish SCI1 EGA games
 	*/

Modified: scummvm/trunk/engines/sci/sfx/iterator.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/iterator.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/sfx/iterator.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -532,7 +532,7 @@
 
 static Audio::AudioStream *makeStream(byte *data, int size, sfx_pcm_config_t conf) {
 	printf("Playing PCM data of size %d, rate %d\n", size, conf.rate);
-	
+
 	// Duplicate the data
 	byte *sound = (byte *)malloc(size);
 	memcpy(sound, data, size);
@@ -1234,9 +1234,9 @@
 	return _delegate->getTimepos();
 }
 
-FastForwardSongIterator::FastForwardSongIterator(SongIterator *capsit, int delta) 
+FastForwardSongIterator::FastForwardSongIterator(SongIterator *capsit, int delta)
 	: _delegate(capsit), _delta(delta) {
-	
+
 	channel_mask = capsit->channel_mask;
 }
 

Modified: scummvm/trunk/engines/sci/sfx/iterator_internal.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/iterator_internal.h	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/sfx/iterator_internal.h	2009-05-20 17:53:31 UTC (rev 40742)
@@ -47,7 +47,7 @@
 };
 
 struct SongIteratorChannel {
-	
+
 	int state;	//!< State of this song iterator channel
 	int offset;     //!< Offset into the data chunk */
 	int end;	//!< Last allowed byte in track */

Modified: scummvm/trunk/engines/sci/vocab_debug.cpp
===================================================================
--- scummvm/trunk/engines/sci/vocab_debug.cpp	2009-05-20 17:52:49 UTC (rev 40741)
+++ scummvm/trunk/engines/sci/vocab_debug.cpp	2009-05-20 17:53:31 UTC (rev 40742)
@@ -70,7 +70,7 @@
 	for (int i = 0; i < count; i++) {
 		int offset = READ_LE_UINT16(r->data + 2 + i * 2);
 		int len = READ_LE_UINT16(r->data + offset);
-		
+
 		Common::String tmp((const char *)r->data + offset + 2, len);
 		selectorNames.push_back(tmp);
 


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