[Scummvm-cvs-logs] SF.net SVN: scummvm:[35172] scummvm/trunk

robinwatts at users.sourceforge.net robinwatts at users.sourceforge.net
Sat Nov 29 19:01:16 CET 2008


Revision: 35172
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35172&view=rev
Author:   robinwatts
Date:     2008-11-29 18:01:16 +0000 (Sat, 29 Nov 2008)

Log Message:
-----------
Remove warnings from NDS build.

Modified Paths:
--------------
    scummvm/trunk/backends/fs/ds/ds-fs.cpp
    scummvm/trunk/backends/fs/stdiostream.cpp
    scummvm/trunk/backends/platform/ds/arm9/source/fat/disc_io.c
    scummvm/trunk/backends/platform/ds/arm9/source/wordcompletion.cpp
    scummvm/trunk/engines/agi/saveload.cpp
    scummvm/trunk/engines/agos/script_s1.cpp
    scummvm/trunk/engines/agos/zones.cpp
    scummvm/trunk/engines/gob/sound/adlib.cpp
    scummvm/trunk/engines/lure/hotspots.cpp
    scummvm/trunk/engines/lure/menu.cpp
    scummvm/trunk/engines/saga/actor.cpp
    scummvm/trunk/engines/saga/interface.cpp
    scummvm/trunk/engines/saga/music.cpp
    scummvm/trunk/engines/saga/saveload.cpp
    scummvm/trunk/engines/saga/sound.cpp
    scummvm/trunk/engines/saga/sprite.cpp
    scummvm/trunk/engines/scumm/resource_v2.cpp
    scummvm/trunk/engines/scumm/saveload.cpp
    scummvm/trunk/engines/sky/text.cpp
    scummvm/trunk/graphics/scaler/scalebit.cpp
    scummvm/trunk/graphics/scaler.cpp
    scummvm/trunk/sound/mpu401.cpp
    scummvm/trunk/sound/softsynth/ym2612.cpp

Modified: scummvm/trunk/backends/fs/ds/ds-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/ds/ds-fs.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/backends/fs/ds/ds-fs.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -588,7 +588,7 @@
 		return bytes / size;
 	}
 
-	if ((size_t)(handle->pos + size * numItems) > handle->size) {
+	if ((int)(handle->pos + size * numItems) > handle->size) {
 		numItems = (handle->size - handle->pos) / size;
 		if (numItems < 0) numItems = 0;
 	}

Modified: scummvm/trunk/backends/fs/stdiostream.cpp
===================================================================
--- scummvm/trunk/backends/fs/stdiostream.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/backends/fs/stdiostream.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -85,6 +85,7 @@
 	#define fseek(handle, offset, whence)		DS::std_fseek(handle, offset, whence)
 	#define clearerr(handle)					DS::std_clearerr(handle)
 	#define fflush(file)						DS::std_fflush(file)
+	#undef ferror
 	#define ferror(handle)						DS::std_ferror(handle)
 
 #endif

Modified: scummvm/trunk/backends/platform/ds/arm9/source/fat/disc_io.c
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/fat/disc_io.c	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/backends/platform/ds/arm9/source/fat/disc_io.c	2008-11-29 18:01:16 UTC (rev 35172)
@@ -5,7 +5,7 @@
 	uniformed io-interface to work with Chishm's FAT library
 
 	Written by MightyMax
-  
+
 	Modified by Chishm:
 	2005-11-06
 		* Added WAIT_CR modifications for NDS
@@ -28,14 +28,14 @@
 		* Added EFA2 support
 */
 
-#include "disc_io.h"
-#include "scummconsole.h"
-
 #ifdef NDS
 	#include <nds.h>
 #endif
 
+#include "disc_io.h"
+#include "scummconsole.h"
 
+
 // Include known io-interfaces:
 #ifdef SUPPORT_MPCF
  #include "io_mpcf.h"
@@ -87,7 +87,7 @@
 
 	Disc Cache functions
 	2006-02-03:
-		Added by www.neoflash.com 
+		Added by www.neoflash.com
 
 */
 int discDetect = 0;
@@ -99,7 +99,7 @@
 #include <string.h>
 
 #define CACHE_FREE 0xFFFFFFFF
-	
+
 static u8 cacheBuffer[ DISC_CACHE_COUNT * 512 ];
 
 static struct {
@@ -112,20 +112,20 @@
 
 static u32 disc_CacheFind(u32 sector) {
 	u32 i;
-	
+
 	for( i = 0; i < DISC_CACHE_COUNT; i++ )	{
 		if( cache[ i ].sector == sector )
 			return i;
 	}
-	
+
 	return CACHE_FREE;
 }
 
 static u32 disc_CacheFindFree(void) {
-	
+
 	u32 i = 0, j;
 	u32 count = -1;
-	
+
 	for( j = 0; j < DISC_CACHE_COUNT; j++ )	{
 
 		if( cache[ j ].sector == CACHE_FREE ) {
@@ -142,7 +142,7 @@
 	if( cache[ i ].sector != CACHE_FREE && cache[i].dirty != 0 ) {
 
 		active_interface->fn_WriteSectors( cache[ i ].sector, 1, &cacheBuffer[ i * 512 ] );
-		/* todo: handle write error here 
+		// todo: handle write error here
 
 		cache[ i ].sector = CACHE_FREE;
 		cache[ i ].dirty = 0;
@@ -368,7 +368,7 @@
 
 	active_interface = DLDI_GetInterface();
 
-	if (stricmp(&_dldi_driver_name, "Default (No interface)")) {
+	if (stricmp((char *)(&_dldi_driver_name), "Default (No interface)")) {
 		char name[48];
 		memcpy(name, &_dldi_driver_name, 48);
 		name[47] = '\0';
@@ -431,7 +431,7 @@
 #endif
 
 
-bool disc_Init(void) 
+bool disc_Init(void)
 {
 #ifdef DISC_CACHE
 	disc_CacheInit();
@@ -455,15 +455,15 @@
 	// could not find a working IO Interface
 	active_interface = 0 ;
 	return false ;
-} 
+}
 
-bool disc_IsInserted(void) 
+bool disc_IsInserted(void)
 {
 	if (active_interface) return active_interface->fn_IsInserted() ;
 	return false ;
-} 
+}
 
-bool disc_ReadSectors(u32 sector, u8 numSecs, void* buffer) 
+bool disc_ReadSectors(u32 sector, u8 numSecs, void* buffer)
 {
 #ifdef DISC_CACHE
 	u8 *p=(u8*)buffer;
@@ -480,9 +480,9 @@
 	if (active_interface) return active_interface->fn_ReadSectors(sector,numSecs,buffer) ;
 	return false ;
 #endif
-} 
+}
 
-bool disc_WriteSectors(u32 sector, u8 numSecs, void* buffer) 
+bool disc_WriteSectors(u32 sector, u8 numSecs, void* buffer)
 {
 /*#ifdef DISC_CACHE
 	u8 *p=(u8*)buffer;
@@ -513,32 +513,32 @@
 		int r;
 
 		for (r = 0; r < numSecs; r++) {
-			memcpy(sectorBuffer, &buffer[r * 512], 512);
+			memcpy(sectorBuffer, &((char *)buffer)[r * 512], 512);
 
 			if (!active_interface->fn_WriteSectors(sector + r, 1, sectorBuffer))
 			{
 				return false;
 			}
 		}
-		
 
+
 		return true;
 	}
 
 #else
 	if (active_interface) return active_interface->fn_WriteSectors(sector,numSecs,buffer) ;
-	return false ;
 #endif
 //#endif
-} 
+	return false ;
+}
 
-bool disc_ClearStatus(void) 
+bool disc_ClearStatus(void)
 {
 	if (active_interface) return active_interface->fn_ClearStatus() ;
 	return false ;
-} 
+}
 
-bool disc_Shutdown(void) 
+bool disc_Shutdown(void)
 {
 #ifdef DISC_CACHE
 	disc_CacheFlush();
@@ -546,7 +546,7 @@
 	if (active_interface) active_interface->fn_Shutdown() ;
 	active_interface = 0 ;
 	return true ;
-} 
+}
 
 u32	disc_HostType (void)
 {

Modified: scummvm/trunk/backends/platform/ds/arm9/source/wordcompletion.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/wordcompletion.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/backends/platform/ds/arm9/source/wordcompletion.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -70,7 +70,6 @@
 // Sends the current available words to the virtual keyboard code for display
 bool findWordCompletions(char* input)
 {
-	char testWord[32];
 	int min = 0;
 	int max = wordBufferPtrPos - 1;
 	char* word;
@@ -136,7 +135,7 @@
 	bool match = true;
 
 
-	for (int r = 0; r < strlen(partialWord); r++) {
+	for (int r = 0; partialWord[r] != 0; r++) {
 		if (word[r] != partialWord[r]) {
 			match = false;
 			break;
@@ -155,7 +154,7 @@
 
 	do {
 
-		for (int r = 0; r < strlen(partialWord); r++) {
+		for (int r = 0; partialWord[r] != 0; r++) {
 			if (word[r] != partialWord[r]) {
 				match = false;
 				break;

Modified: scummvm/trunk/engines/agi/saveload.cpp
===================================================================
--- scummvm/trunk/engines/agi/saveload.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/engines/agi/saveload.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -80,8 +80,8 @@
 	tm curTime;
 	_system->getTimeAndDate(curTime);
 
-	uint32 saveDate = (curTime.tm_mday & 0xFF) << 24 | ((curTime.tm_mon + 1) & 0xFF) << 16 | (curTime.tm_year + 1900) & 0xFFFF;
-	uint16 saveTime = (curTime.tm_hour & 0xFF) << 8 | (curTime.tm_min) & 0xFF;
+	uint32 saveDate = ((curTime.tm_mday & 0xFF) << 24) | (((curTime.tm_mon + 1) & 0xFF) << 16) | ((curTime.tm_year + 1900) & 0xFFFF);
+	uint16 saveTime = ((curTime.tm_hour & 0xFF) << 8) | ((curTime.tm_min) & 0xFF);
 
 	out->writeUint32BE(saveDate);
 	debugC(5, kDebugLevelMain | kDebugLevelSavegame, "Writing save date (%d)", saveDate);

Modified: scummvm/trunk/engines/agos/script_s1.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_s1.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/engines/agos/script_s1.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -481,7 +481,7 @@
 			}
 			x_diff += y_diff /= 4;
 
-			if (x_diff < best_dist || x_diff == best_dist && prev_i == i) {
+			if ((x_diff < best_dist) || ((x_diff == best_dist) && (prev_i == i))) {
 				best_dist = x_diff;
 				best_i = maxPath + 1 - i;
 				best_j = j;

Modified: scummvm/trunk/engines/agos/zones.cpp
===================================================================
--- scummvm/trunk/engines/agos/zones.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/engines/agos/zones.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -197,9 +197,9 @@
 	uint count = ARRAYSIZE(_vgaBufferPointers);
 	VgaPointersEntry *vpe = _vgaBufferPointers;
 	do {
-		if (vpe->vgaFile1 < _blockEnd && vpe->vgaFile1End > _block ||
-			vpe->vgaFile2 < _blockEnd && vpe->vgaFile2End > _block ||
-			vpe->sfxFile < _blockEnd && vpe->sfxFileEnd > _block) {
+		if (((vpe->vgaFile1 < _blockEnd) && (vpe->vgaFile1End > _block)) ||
+			((vpe->vgaFile2 < _blockEnd) && (vpe->vgaFile2End > _block)) ||
+			((vpe->sfxFile < _blockEnd) && (vpe->sfxFileEnd > _block))) {
 			vpe->vgaFile1 = NULL;
 			vpe->vgaFile1End = NULL;
 			vpe->vgaFile2 = NULL;
@@ -218,8 +218,8 @@
 
 	vpe = &_vgaBufferPointers[_noOverWrite];
 
-	if (_block <= vpe->vgaFile1 && _blockEnd >= vpe->vgaFile1 ||
-		_vgaMemPtr <= vpe->vgaFile2 && _blockEnd >= vpe->vgaFile2) {
+	if (((_block <= vpe->vgaFile1) && (_blockEnd >= vpe->vgaFile1)) ||
+		((_vgaMemPtr <= vpe->vgaFile2) && (_blockEnd >= vpe->vgaFile2))) {
 		_rejectBlock = true;
 		_vgaMemPtr = vpe->vgaFile1 + 0x5000;
 	} else {
@@ -232,8 +232,8 @@
 
 	vpe = &_vgaBufferPointers[a];
 
-	if (_block <= vpe->vgaFile1 && _blockEnd >= vpe->vgaFile1 ||
-			_block <= vpe->vgaFile2 && _blockEnd >= vpe->vgaFile2) {
+	if (((_block <= vpe->vgaFile1) && (_blockEnd >= vpe->vgaFile1)) ||
+			((_block <= vpe->vgaFile2) && (_blockEnd >= vpe->vgaFile2))) {
 		_rejectBlock = true;
 		_vgaMemPtr = vpe->vgaFile1 + 0x5000;
 	} else {
@@ -245,8 +245,8 @@
 	uint count = ARRAYSIZE(_vgaBufferPointers);
 	VgaPointersEntry *vpe = _vgaBufferPointers;
 	do {
-		if (_block <= vpe->vgaFile1 && _blockEnd >= vpe->vgaFile1 ||
-			_block <= vpe->vgaFile2 && _blockEnd >= vpe->vgaFile2) {
+		if (((_block <= vpe->vgaFile1) && (_blockEnd >= vpe->vgaFile1)) ||
+			((_block <= vpe->vgaFile2) && (_blockEnd >= vpe->vgaFile2))) {
 			vpe->vgaFile1 = NULL;
 			vpe->vgaFile2 = NULL;
 		}

Modified: scummvm/trunk/engines/gob/sound/adlib.cpp
===================================================================
--- scummvm/trunk/engines/gob/sound/adlib.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/engines/gob/sound/adlib.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -165,8 +165,8 @@
 	for (int i = 0; i < 9; i++) {
 		writeOPL(0xA0 | i, 0);
 		writeOPL(0xB0 | i, 0);
-		writeOPL(0xE0 | _operators[i]    , 0);
-		writeOPL(0xE0 | _operators[i] + 3, 0);
+		writeOPL(0xE0 | _operators[i]     , 0);
+		writeOPL(0xE0 |(_operators[i] + 3), 0);
 	}
 
 	// Authorize the control of the waveformes

Modified: scummvm/trunk/engines/lure/hotspots.cpp
===================================================================
--- scummvm/trunk/engines/lure/hotspots.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/engines/lure/hotspots.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -728,7 +728,7 @@
 }
 
 void Hotspot::resetPosition() {
-	setPosition(x() & 0xf8 | 5, y());
+	setPosition((x() & 0xf8) | 5, y());
 	setDirection(direction());
 }
 

Modified: scummvm/trunk/engines/lure/menu.cpp
===================================================================
--- scummvm/trunk/engines/lure/menu.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/engines/lure/menu.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -480,10 +480,10 @@
 	byte whiteColour = isEGA ? EGA_DIALOG_WHITE_COLOUR : VGA_DIALOG_WHITE_COLOUR;
 
 
+	const uint16 yMiddle = FULL_SCREEN_HEIGHT / 2;
+#ifndef LURE_CLICKABLE_MENUS
 	uint16 oldX = mouse.x();
 	uint16 oldY = mouse.y();
-	const uint16 yMiddle = FULL_SCREEN_HEIGHT / 2;
-#ifndef LURE_CLICKABLE_MENUS
 	mouse.cursorOff();
 	mouse.setPosition(FULL_SCREEN_WIDTH / 2, yMiddle);
 

Modified: scummvm/trunk/engines/saga/actor.cpp
===================================================================
--- scummvm/trunk/engines/saga/actor.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/engines/saga/actor.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -925,8 +925,8 @@
 
 	CommonObjectOrderList::iterator drawOrderIterator;
 	CommonObjectDataPointer drawObject;
-	int frameNumber;
-	SpriteList *spriteList;
+	int frameNumber = 0;
+	SpriteList *spriteList = NULL;
 
 	createDrawOrderList();
 
@@ -1044,8 +1044,8 @@
 
 	CommonObjectOrderList::iterator drawOrderIterator;
 	CommonObjectDataPointer drawObject;
-	int frameNumber;
-	SpriteList *spriteList;
+	int frameNumber = 0;
+	SpriteList *spriteList = NULL;
 
 	Surface *backBuffer;
 

Modified: scummvm/trunk/engines/saga/interface.cpp
===================================================================
--- scummvm/trunk/engines/saga/interface.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/engines/saga/interface.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -1243,7 +1243,7 @@
 		_textInputPos = _textInputStringLength + 1;
 		break;
 	default:
-		if (keystate.ascii <= 255 && isalnum(keystate.ascii) || (keystate.ascii == ' ') ||
+		if (((keystate.ascii <= 255) && (isalnum(keystate.ascii))) || (keystate.ascii == ' ') ||
 		    (keystate.ascii == '-') || (keystate.ascii == '_')) {
 			if (_textInputStringLength < save_title_size - 1) {
 				ch[0] = keystate.ascii;

Modified: scummvm/trunk/engines/saga/music.cpp
===================================================================
--- scummvm/trunk/engines/saga/music.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/engines/saga/music.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -139,7 +139,9 @@
 }
 
 void DigitalMusicInputStream::createCompressedStream() {
+#if defined(USE_MAD) || defined(USE_VORBIS) || defined(USE_FLAC)
 	uint numLoops = _looping ? 0 : 1;
+#endif
 	_memoryStream = _file->readStream(resourceData->size - 9);
 
 	switch (soundType) {

Modified: scummvm/trunk/engines/saga/saveload.cpp
===================================================================
--- scummvm/trunk/engines/saga/saveload.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/engines/saga/saveload.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -190,8 +190,8 @@
 	tm curTime;
 	_system->getTimeAndDate(curTime);
 
-	uint32 saveDate = (curTime.tm_mday & 0xFF) << 24 | ((curTime.tm_mon + 1) & 0xFF) << 16 | (curTime.tm_year + 1900) & 0xFFFF;
-	uint16 saveTime = (curTime.tm_hour & 0xFF) << 8 | (curTime.tm_min) & 0xFF;
+	uint32 saveDate = ((curTime.tm_mday & 0xFF) << 24) | (((curTime.tm_mon + 1) & 0xFF) << 16) | ((curTime.tm_year + 1900) & 0xFFFF);
+	uint16 saveTime = ((curTime.tm_hour & 0xFF) << 8) | ((curTime.tm_min) & 0xFF);
 
 	out->writeUint32BE(saveDate);
 	out->writeUint16BE(saveTime);

Modified: scummvm/trunk/engines/saga/sound.cpp
===================================================================
--- scummvm/trunk/engines/saga/sound.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/engines/saga/sound.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -92,7 +92,9 @@
 					buffer.size, buffer.frequency, flags, -1, volume);
 	} else {
 		Audio::AudioStream *stream = NULL;
+#if defined(USE_MAD) || defined(USE_VORBIS) || defined(USE_FLAC)
 		MemoryReadStream *tmp = NULL;
+#endif
 
 		switch (buffer.soundType) {
 #ifdef USE_MAD

Modified: scummvm/trunk/engines/saga/sprite.cpp
===================================================================
--- scummvm/trunk/engines/saga/sprite.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/engines/saga/sprite.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -254,11 +254,11 @@
 }
 
 void Sprite::draw(Surface *ds, const Rect &clipRect, SpriteList &spriteList, int32 spriteNumber, const Point &screenCoord, int scale) {
-	const byte *spriteBuffer;
-	int width;
-	int height;
-	int xAlign;
-	int yAlign;
+	const byte *spriteBuffer = NULL;
+	int width  = 0;
+	int height = 0;
+	int xAlign = 0;
+	int yAlign = 0;
 	Point spritePointer;
 
 	getScaledSpriteBuffer(spriteList, spriteNumber, scale, width, height, xAlign, yAlign, spriteBuffer);
@@ -270,11 +270,13 @@
 }
 
 void Sprite::draw(Surface *ds, const Rect &clipRect, SpriteList &spriteList, int32 spriteNumber, const Rect &screenRect, int scale) {
-	const byte *spriteBuffer;
-	int width;
-	int height;
-	int xAlign, spw;
-	int yAlign, sph;
+	const byte *spriteBuffer = NULL;
+	int width  = 0;
+	int height = 0;
+	int xAlign = 0;
+	int spw;
+	int yAlign = 0;
+	int sph;
 	Point spritePointer;
 
 	getScaledSpriteBuffer(spriteList, spriteNumber, scale, width, height, xAlign, yAlign, spriteBuffer);
@@ -292,13 +294,13 @@
 }
 
 bool Sprite::hitTest(SpriteList &spriteList, int spriteNumber, const Point &screenCoord, int scale, const Point &testPoint) {
-	const byte *spriteBuffer;
+	const byte *spriteBuffer = NULL;
 	int i, j;
 	const byte *srcRowPointer;
-	int width;
-	int height;
-	int xAlign;
-	int yAlign;
+	int width  = 0;
+	int height = 0;
+	int xAlign = 0;
+	int yAlign = 0;
 	Point spritePointer;
 
 	getScaledSpriteBuffer(spriteList, spriteNumber, scale, width, height, xAlign, yAlign, spriteBuffer);
@@ -319,17 +321,17 @@
 }
 
 void Sprite::drawOccluded(Surface *ds, const Rect &clipRect, SpriteList &spriteList, int spriteNumber, const Point &screenCoord, int scale, int depth) {
-	const byte *spriteBuffer;
+	const byte *spriteBuffer = NULL;
 	int x, y;
 	byte *destRowPointer;
 	const byte *sourceRowPointer;
 	const byte *sourcePointer;
 	byte *destPointer;
 	byte *maskPointer;
-	int width;
-	int height;
-	int xAlign;
-	int yAlign;
+	int width  = NULL;
+	int height = 0;
+	int xAlign = 0;
+	int yAlign = 0;
 
 	ClipData clipData;
 

Modified: scummvm/trunk/engines/scumm/resource_v2.cpp
===================================================================
--- scummvm/trunk/engines/scumm/resource_v2.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/engines/scumm/resource_v2.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -194,10 +194,11 @@
 			break;
 		case 0x132:
 			printf("C64 V1 game detected\n");
-			if (_game.id == GID_MANIAC)
+			if (_game.id == GID_MANIAC) {
 				assert(_game.version == 0);
-			else
+			} else {
 				assert(_game.version == 1);
+			}
 			readClassicIndexFile();
 			break;
 		case 0x032:

Modified: scummvm/trunk/engines/scumm/saveload.cpp
===================================================================
--- scummvm/trunk/engines/scumm/saveload.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/engines/scumm/saveload.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -644,8 +644,8 @@
 	tm curTime;
 	_system->getTimeAndDate(curTime);
 
-	section.date = (curTime.tm_mday & 0xFF) << 24 | ((curTime.tm_mon + 1) & 0xFF) << 16 | (curTime.tm_year + 1900) & 0xFFFF;
-	section.time = (curTime.tm_hour & 0xFF) << 8 | (curTime.tm_min) & 0xFF;
+	section.date = ((curTime.tm_mday & 0xFF) << 24) | (((curTime.tm_mon + 1) & 0xFF) << 16) | ((curTime.tm_year + 1900) & 0xFFFF);
+	section.time = ((curTime.tm_hour & 0xFF) << 8) | ((curTime.tm_min) & 0xFF);
 
 	file->writeUint32BE(section.type);
 	file->writeUint32BE(section.version);

Modified: scummvm/trunk/engines/sky/text.cpp
===================================================================
--- scummvm/trunk/engines/sky/text.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/engines/sky/text.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -376,12 +376,12 @@
 			dataBit = (data & 0x8000) != 0; //check data
 			data <<= 1;
 
-			if (maskBit)
+			if (maskBit) {
 				if (dataBit)
 					*curPos = color;
 				else
 					*curPos = 240; //black edge
-
+			}
 			curPos++;
 		}
 		//advance a line

Modified: scummvm/trunk/graphics/scaler/scalebit.cpp
===================================================================
--- scummvm/trunk/graphics/scaler/scalebit.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/graphics/scaler/scalebit.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -131,7 +131,7 @@
 }
 
 /**
- * Apply the Scale32x effect on a bitmap.
+ * Apply the Scale3x effect on a bitmap.
  * The destination bitmap is filled with the scaled version of the source bitmap.
  * The source bitmap isn't modified.
  * The destination bitmap must be manually allocated before calling the function,

Modified: scummvm/trunk/graphics/scaler.cpp
===================================================================
--- scummvm/trunk/graphics/scaler.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/graphics/scaler.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -127,6 +127,12 @@
  */
 void Normal1x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch,
 							int width, int height) {
+        /* Spot the case when it can all be done in 1 hit */
+        if (((int)srcPitch == 2*width) && ((int)dstPitch == 2*width))
+        {
+            width *= height;
+            height = 1;
+        }
 	while (height--) {
 		memcpy(dstPtr, srcPtr, 2 * width);
 		srcPtr += srcPitch;

Modified: scummvm/trunk/sound/mpu401.cpp
===================================================================
--- scummvm/trunk/sound/mpu401.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/sound/mpu401.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -44,7 +44,7 @@
 }
 
 void MidiChannel_MPU401::send(uint32 b) {
-	_owner->send(b & 0xFFFFFFF0 | (_channel & 0xF));
+	_owner->send((b & 0xFFFFFFF0) | (_channel & 0xF));
 }
 
 void MidiChannel_MPU401::noteOff(byte note) {

Modified: scummvm/trunk/sound/softsynth/ym2612.cpp
===================================================================
--- scummvm/trunk/sound/softsynth/ym2612.cpp	2008-11-28 23:56:25 UTC (rev 35171)
+++ scummvm/trunk/sound/softsynth/ym2612.cpp	2008-11-29 18:01:16 UTC (rev 35172)
@@ -716,7 +716,7 @@
 				int f10 = (fnum[i] >>  9) & 1;
 				int f11 = (fnum[i] >> 10) & 1;
 				int  n4 = f11;
-				int  n3 = f11&(f10|f9|f8) | (~f11&f10&f9&f8);
+				int  n3 = (f11&(f10|f9|f8)) | (~f11&f10&f9&f8);
 				int note = n4*2 + n3;
 				// see p.207
 				keycodeTable[(block+1)*12+i] = block*4 + note;


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