[Scummvm-cvs-logs] CVS: scummvm/sky autoroute.cpp,1.12,1.13 control.cpp,1.46,1.47 debug.cpp,1.4,1.5 disk.cpp,1.41,1.42 logic.cpp,1.124,1.125 screen.cpp,1.47,1.48 sound.cpp,1.27,1.28

Max Horn fingolfin at users.sourceforge.net
Sun Jul 13 09:23:15 CEST 2003


Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv17573/sky

Modified Files:
	autoroute.cpp control.cpp debug.cpp disk.cpp logic.cpp 
	screen.cpp sound.cpp 
Log Message:
debug/warning/error all automatically output a newline

Index: autoroute.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/autoroute.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- autoroute.cpp	7 Jul 2003 00:14:16 -0000	1.12
+++ autoroute.cpp	13 Jul 2003 16:22:16 -0000	1.13
@@ -62,7 +62,7 @@
 uint16 SkyAutoRoute::autoRoute(Compact *cpt, uint16 **pSaveRoute) {
 
 	if (!cpt->extCompact)
-		error("SkyAutoRoute::autoRoute: fatal error. cpt->extCompact == NULL!\n");
+		error("SkyAutoRoute::autoRoute: fatal error. cpt->extCompact == NULL");
 	uint16* routeData = (uint16 *)cpt->extCompact->animScratch;
 	uint8* screenGrid = _grid->giveGrid(cpt->screen);
 	screenGrid += GRID_SIZE-4; // all arrays are processed from behind, so make

Index: control.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/control.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- control.cpp	12 Jul 2003 16:54:29 -0000	1.46
+++ control.cpp	13 Jul 2003 16:22:16 -0000	1.47
@@ -593,7 +593,7 @@
 			return 0;
 
 		default: 
-			error("SkyControl::handleClick: unknown routine: %X\n",pButton->_onClick);
+			error("SkyControl::handleClick: unknown routine: %X",pButton->_onClick);
 	}
 }
 
@@ -1447,7 +1447,7 @@
 		LODSW(srcPos, SkyCompact::high_floor_table[cnt]);
 
 	if (srcPos - srcBuf != (int32)size)
-		error("Restore failed! Savegame data = %d bytes. Expected size: %d.\n", srcPos-srcBuf, size);
+		error("Restore failed! Savegame data = %d bytes. Expected size: %d", srcPos-srcBuf, size);
 
 	if (!SkyState::isDemo()) {
 		_skyLogic->fnLeaveSection(oldSection, 0, 0);

Index: debug.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/debug.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- debug.cpp	30 May 2003 16:06:43 -0000	1.4
+++ debug.cpp	13 Jul 2003 16:22:16 -0000	1.5
@@ -1236,13 +1236,13 @@
 	uint32 compactNum = (a & 0x0fff);
 
 	if (sectionNum == 0)
-		debug(8, "Loading Compact %d (%s) from section %d\n", compactNum, section_0_compacts[compactNum], sectionNum);
+		debug(8, "Loading Compact %d (%s) from section %d", compactNum, section_0_compacts[compactNum], sectionNum);
 	else
-		debug(8, "Loading Compact %d from section %d\n", compactNum, sectionNum);
+		debug(8, "Loading Compact %d from section %d", compactNum, sectionNum);
 }
 
 void SkyDebug::logic(uint32 logic) {
-	debug(6, "LOGIC: %s\n", logic_table_names[logic]);
+	debug(6, "LOGIC: %s", logic_table_names[logic]);
 }
 
 void SkyDebug::script(uint32 command, uint16 *scriptData) {
@@ -1255,10 +1255,10 @@
 			debug(6, " %d", READ_LE_UINT16(scriptData + i));
 		}
 	}
-	debug(6, "\n");
+	debug(6, "");
 }
 
 void SkyDebug::mcode(uint32 mcode, uint32 a, uint32 b, uint32 c) {
-	debug(6, "MCODE: %s(%d, %d, %d)\n", mcodes[mcode], a, b, c);
+	debug(6, "MCODE: %s(%d, %d, %d)", mcodes[mcode], a, b, c);
 };
 

Index: disk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/disk.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- disk.cpp	12 Jul 2003 10:02:12 -0000	1.41
+++ disk.cpp	13 Jul 2003 16:22:16 -0000	1.42
@@ -41,20 +41,20 @@
 
 	_dnrHandle->open(dinnerFilename, _gameDataPath);
 	if (_dnrHandle->isOpen() == false)
-			error("Could not open %s%s!\n", _gameDataPath, dinnerFilename);
+			error("Could not open %s%s", _gameDataPath, dinnerFilename);
 
 	if (!(_dinnerTableEntries = _dnrHandle->readUint32LE()))
-		error("Error reading from sky.dnr!\n"); //even though it was opened correctly?!
+		error("Error reading from sky.dnr"); //even though it was opened correctly?!
 
 	_dinnerTableArea = (uint8 *)malloc(_dinnerTableEntries * 8);
 	entriesRead = _dnrHandle->read(_dinnerTableArea, 8 * _dinnerTableEntries) / 8;
 
 	if (entriesRead != _dinnerTableEntries)
-		warning("entriesRead != dinnerTableEntries. [%d/%d]\n", entriesRead, _dinnerTableEntries);
+		warning("entriesRead != dinnerTableEntries. [%d/%d]", entriesRead, _dinnerTableEntries);
 
 	_dataDiskHandle->open(dataFilename, _gameDataPath);
 	if (_dataDiskHandle->isOpen() == false) 
-		error("Error opening %s%s!\n", _gameDataPath, dataFilename);
+		error("Error opening %s%s", _gameDataPath, dataFilename);
 
 	debug(1, "Found BASS version v0.0%d (%d dnr entries)", determineGameVersion(), _dinnerTableEntries);
 
@@ -114,7 +114,7 @@
 	}
 
 	#ifdef file_order_chk
-		warning("File order checking not implemented yet!\n");
+		warning("File order checking not implemented yet");
 	#endif
 
 	_compFile = fileNr;
@@ -122,7 +122,7 @@
 
 	filePtr = getFileInfo(fileNr);
 	if (filePtr == NULL) {
-		printf("File %d not found!\n", fileNr);
+		printf("File %d not found", fileNr);
 		return NULL;
 	}
 
@@ -152,14 +152,14 @@
 	_dataDiskHandle->seek(_fileOffset, SEEK_SET);
 
 	#ifdef file_order_chk
-		warning("File order checking not implemented yet!\n");
+		warning("File order checking not implemented yet");
 	#endif
 
 	//now read in the data
 	bytesRead = _dataDiskHandle->read(_fileDest, 1 * _fileSize);
 
 	if (bytesRead != (int32)_fileSize)
-		printf("ERROR: Unable to read %d bytes from datadisk (%d bytes read)\n", _fileSize, bytesRead);
+		printf("ERROR: Unable to read %d bytes from datadisk (%d bytes read)", _fileSize, bytesRead);
 
 	cflag = (uint8)((_fileFlags >> (23)) & 0x1);
 
@@ -240,7 +240,7 @@
 		fEntry = &((*fEntry)->next);
 	}
 	if (found) {
-		debug(1,"SkyDisk::prefetchFile: File %d was already prefetched.\n",fileNr);
+		debug(1,"SkyDisk::prefetchFile: File %d was already prefetched",fileNr);
 		return ;
 	}
 	uint8 *temp = loadFile(fileNr, NULL);
@@ -358,7 +358,7 @@
 		_loadedFilesList[targCnt] = 0;
 		SkyState::_itemList[_buildList[bCnt] & 2047] = (void**)loadFile(_buildList[bCnt] & 0x7FFF, NULL);
 		if (!SkyState::_itemList[_buildList[bCnt] & 2047])
-			warning("fnCacheFiles: SkyDisk::loadFile() returned NULL for file %d\n",_buildList[bCnt] & 0x7FFF);
+			warning("fnCacheFiles: SkyDisk::loadFile() returned NULL for file %d",_buildList[bCnt] & 0x7FFF);
 		bCnt++;
 	}
 	_buildList[0] = 0;

Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/logic.cpp,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -d -r1.124 -r1.125
--- logic.cpp	12 Jul 2003 04:21:20 -0000	1.124
+++ logic.cpp	13 Jul 2003 16:22:16 -0000	1.125
@@ -1171,7 +1171,7 @@
 	/// low level interface to interpreter
 
 	uint16 moduleNo = (uint16)((scriptNo & 0xff00) >> 12);
-	debug(3, "Doing Script %x\n", (offset << 16) | scriptNo);
+	debug(3, "Doing Script %x", (offset << 16) | scriptNo);
 	uint16 *scriptData = _moduleList[moduleNo]; // get module address
 
 	if (!scriptData) { // The module has not been loaded
@@ -1353,7 +1353,7 @@
 }
 
 bool SkyLogic::fnDrawScreen(uint32 a, uint32 b, uint32 c) {
-	debug(5, "Call: fnDrawScreen(%X, %X)\n",a,b);
+	debug(5, "Call: fnDrawScreen(%X, %X)",a,b);
 	SkyState::_systemVars.currentPalette = a;
 	_skyScreen->fnDrawScreen(a, b);
 	return true;
@@ -1959,11 +1959,11 @@
 	uint16 *rst = (uint16 *)SkyState::fetchCompact(resetBlock);
 
 	if (!cpt) {
-		warning("fnResetId(): Compact %d (id) == NULL\n",id);
+		warning("fnResetId(): Compact %d (id) == NULL",id);
 		return true;
 	}
 	if (!rst) {
-		warning("fnResetId(): Compact %d (resetBlock) == NULL\n",resetBlock);
+		warning("fnResetId(): Compact %d (resetBlock) == NULL",resetBlock);
 		return true;
 	}
 
@@ -2263,7 +2263,7 @@
 	if ((a == 85) || (a == 106) || (a == 75) || (a == 15)) {
 		_skyScreen->startSequenceItem((uint16)a);
 	} else {
-		debug(1,"SkyLogic::fnNewSwingSeq: ignored seq %d\n",a);
+		debug(1,"SkyLogic::fnNewSwingSeq: ignored seq %d",a);
 	}
 	return true;
 }
@@ -2412,7 +2412,7 @@
 }
 
 bool SkyLogic::fnPrintf(uint32 a, uint32 b, uint32 c) {
-	printf("fnPrintf: %d\n", a);
+	printf("fnPrintf: %d", a);
 	return true;
 }
 

Index: screen.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/screen.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- screen.cpp	13 Jul 2003 15:38:59 -0000	1.47
+++ screen.cpp	13 Jul 2003 16:22:16 -0000	1.48
@@ -129,7 +129,7 @@
 	if (tmpPal) {
 		setPalette(tmpPal);
 		free(tmpPal);
-	} else warning("SkyScreen::setPalette: can't load file nr. %d\n",fileNum);
+	} else warning("SkyScreen::setPalette: can't load file nr. %d",fileNum);
 }
 
 void SkyScreen::showScreen(uint16 fileNum) {
@@ -138,7 +138,7 @@
 	_currentScreen = _skyDisk->loadFile(fileNum, NULL);
 	
 	if (_currentScreen) showScreen(_currentScreen);
-	else warning("SkyScreen::showScreen: can't load file nr. %d\n",fileNum);
+	else warning("SkyScreen::showScreen: can't load file nr. %d",fileNum);
 }
 
 void SkyScreen::showScreen(uint8 *pScreen) {
@@ -272,7 +272,7 @@
 	if (pal) {
 		paletteFadeUp(pal);
 		free(pal);
-	} else warning("SkyScreen::paletteFadeUp: Can't load palette #%d\n",fileNr);
+	} else warning("SkyScreen::paletteFadeUp: Can't load palette #%d",fileNr);
 }
 
 void SkyScreen::paletteFadeUp(uint8 *pal) {
@@ -304,7 +304,7 @@
 	if ((scroll == 0) || (SkyState::_systemVars.systemFlags & SF_NO_SCROLL)) {
 		uint8 *palette = (uint8 *)SkyState::fetchCompact(palNum);
 		if (palette == NULL)
-			error("SkyScreen::fnFadeUp: can't fetch compact %X.\n", palNum);
+			error("SkyScreen::fnFadeUp: can't fetch compact %X", palNum);
 #ifdef SCUMM_BIG_ENDIAN
 		byte tmpPal[256 * 3];
 		for (uint16 cnt = 0; cnt < 256*3; cnt++)
@@ -315,8 +315,8 @@
 #endif
 	} else if (scroll == 123) {
 		// scroll left (going right)
-		if (!_currentScreen) error("SkyScreen::fnFadeUp[Scroll L]: _currentScreen is NULL!\n");
-		if (!_scrollScreen) error("SkyScreen::fnFadeUp[Scroll L]: _scrollScreen is NULL!\n");
+		if (!_currentScreen) error("SkyScreen::fnFadeUp[Scroll L]: _currentScreen is NULL");
+		if (!_scrollScreen) error("SkyScreen::fnFadeUp[Scroll L]: _scrollScreen is NULL");
 		uint8 *scrNewPtr, *scrOldPtr;
 		for (uint8 scrollCnt = 0; scrollCnt < (GAME_SCREEN_WIDTH / SCROLL_JUMP) - 1; scrollCnt++) {
 			scrNewPtr = _currentScreen + scrollCnt * SCROLL_JUMP;
@@ -334,8 +334,8 @@
 		free(_scrollScreen);
 	} else if (scroll == 321) {
 		// scroll right (going left)
-		if (!_currentScreen) error("SkyScreen::fnFadeUp[Scroll R]: _currentScreen is NULL!\n");
-		if (!_scrollScreen) error("SkyScreen::fnFadeUp[Scroll R]: _scrollScreen is NULL!\n");
+		if (!_currentScreen) error("SkyScreen::fnFadeUp[Scroll R]: _currentScreen is NULL");
+		if (!_scrollScreen) error("SkyScreen::fnFadeUp[Scroll R]: _scrollScreen is NULL");
 		uint8 *scrNewPtr, *scrOldPtr;
 		for (uint8 scrollCnt = 0; scrollCnt < (GAME_SCREEN_WIDTH / SCROLL_JUMP) - 1; scrollCnt++) {
 			scrNewPtr = _currentScreen + GAME_SCREEN_WIDTH - (scrollCnt + 1) * SCROLL_JUMP;
@@ -511,7 +511,7 @@
 							dataFileHeader *spriteData = 
 								(dataFileHeader *)SkyState::fetchItem(spriteComp->frame >> 6);
 							if (!spriteData) {
-								debug(9,"Missing file %d!\n",spriteComp->frame >> 6);
+								debug(9,"Missing file %d",spriteComp->frame >> 6);
 								spriteComp->status = 0;
 							} else {
 								sortList[spriteCnt].yCood = spriteComp->ycood + spriteData->s_offset_y + spriteData->s_height;
@@ -571,7 +571,7 @@
 						(spriteData->screen == SkyLogic::_scriptVariables[SCREEN])) {
 					uint8 *toBeDrawn = (uint8 *)SkyState::fetchItem(spriteData->frame >> 6);
 					if (!toBeDrawn) {
-						debug(9, "Spritedata %d not loaded!\n",spriteData->frame >> 6);
+						debug(9, "Spritedata %d not loaded",spriteData->frame >> 6);
 						spriteData->status = 0;
 					} else {
 						drawSprite(toBeDrawn, spriteData);
@@ -590,7 +590,7 @@
 void SkyScreen::drawSprite(uint8 *spriteInfo, Compact *sprCompact) {
 
 	if (spriteInfo == NULL) {
-		warning("SkyScreen::drawSprite Can't draw sprite. Data %d was not loaded.\n", sprCompact->frame >> 6);
+		warning("SkyScreen::drawSprite Can't draw sprite. Data %d was not loaded", sprCompact->frame >> 6);
 		sprCompact->status = 0;
 		return ;
 	}
@@ -651,7 +651,7 @@
 		return;
 	}
 	if ((_sprX + _sprWidth > 320) || (_sprY + _sprHeight > 192)) {
-		warning("SkyScreen::drawSprite fatal error: got x = %d, y = %d, w = %d, h = %d\n",_sprX, _sprY, _sprWidth, _sprHeight);
+		warning("SkyScreen::drawSprite fatal error: got x = %d, y = %d, w = %d, h = %d",_sprX, _sprY, _sprWidth, _sprHeight);
 		_sprWidth = 0;
 		return ;
 	}

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sound.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- sound.cpp	13 Jul 2003 06:04:39 -0000	1.27
+++ sound.cpp	13 Jul 2003 16:22:16 -0000	1.28
@@ -1082,7 +1082,7 @@
 	if ((_soundData[asmOfs] != 0x3C) || (_soundData[asmOfs + 0x27] != 0x8D) ||
 		(_soundData[asmOfs + 0x28] != 0x1E) || (_soundData[asmOfs + 0x2F] != 0x8D) ||
 		(_soundData[asmOfs + 0x30] != 0x36))
-			error("Unknown sounddriver version!\n");
+			error("Unknown sounddriver version!");
 
 	_soundsTotal = _soundData[asmOfs + 1];
 	uint16 sRateTabOfs = (_soundData[asmOfs + 0x2A] << 8) | _soundData[asmOfs + 0x29];
@@ -1102,12 +1102,12 @@
 		_mixer->stopID(SOUND_CH1);
 
 	if (!_soundData) {
-		warning("SkySound::playSound(%04X, %04X) called with a section having been loaded.\n", sound, volume);
+		warning("SkySound::playSound(%04X, %04X) called with a section having been loaded", sound, volume);
 		return;
 	}
 	
 	if (sound > _soundsTotal) {
-		debug(5, "SkySound::playSound %d ignored, only %d sfx in file.\n", sound, _soundsTotal);
+		debug(5, "SkySound::playSound %d ignored, only %d sfx in file", sound, _soundsTotal);
 		return ;
 	}
 
@@ -1239,7 +1239,7 @@
 	
 	uint8 *speechData = _skyDisk->loadFile(speechFileNum + 50000, NULL);
 	if (!speechData) {
-		debug(9,"File %d (speechFile %d from section %d) wasn't found!\n", speechFileNum + 50000, textNum & 0xFFF, textNum >> 12);
+		debug(9,"File %d (speechFile %d from section %d) wasn't found", speechFileNum + 50000, textNum & 0xFFF, textNum >> 12);
 		return false;
 	}
 





More information about the Scummvm-git-logs mailing list