aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-07-13 16:22:17 +0000
committerMax Horn2003-07-13 16:22:17 +0000
commit963ecad36275f338fffb1619a0e8535016352d61 (patch)
treec7eea83ae283decd62e2fcfb5ecd1fa3dca6c1dd
parent0642d2df98ed3b6c0251acf95b58674b1713bb9f (diff)
downloadscummvm-rg350-963ecad36275f338fffb1619a0e8535016352d61.tar.gz
scummvm-rg350-963ecad36275f338fffb1619a0e8535016352d61.tar.bz2
scummvm-rg350-963ecad36275f338fffb1619a0e8535016352d61.zip
debug/warning/error all automatically output a newline
svn-id: r8991
-rw-r--r--scumm/actor.cpp2
-rw-r--r--scumm/charset.cpp4
-rw-r--r--scumm/imuse_digi.cpp2
-rw-r--r--scumm/resource.cpp6
-rw-r--r--scumm/script_v5.cpp4
-rw-r--r--scumm/script_v6.cpp4
-rw-r--r--scumm/script_v8.cpp2
-rw-r--r--scumm/string.cpp2
-rw-r--r--simon/debug.cpp2
-rw-r--r--sky/autoroute.cpp2
-rw-r--r--sky/control.cpp4
-rw-r--r--sky/debug.cpp10
-rw-r--r--sky/disk.cpp20
-rw-r--r--sky/logic.cpp12
-rw-r--r--sky/music/gmmusic.cpp2
-rw-r--r--sky/music/mt32music.cpp2
-rw-r--r--sky/music/musicbase.cpp16
-rw-r--r--sky/screen.cpp24
-rw-r--r--sky/sound.cpp8
19 files changed, 64 insertions, 64 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index 8dfca3c00f..444188e7a8 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -1426,7 +1426,7 @@ void Actor::walkActorOld() {
byte *Actor::getActorName() {
byte *ptr = _vm->getResourceAddress(rtActorName, number);
if (ptr == NULL) {
- warning("Failed to find name of actor %d\n", number);
+ warning("Failed to find name of actor %d", number);
}
return ptr;
}
diff --git a/scumm/charset.cpp b/scumm/charset.cpp
index 0c76eb799a..40ee479ef2 100644
--- a/scumm/charset.cpp
+++ b/scumm/charset.cpp
@@ -55,7 +55,7 @@ void CharsetRendererCommon::setCurID(byte id) {
_fontPtr = _vm->getResourceAddress(rtCharset, id);
if (_fontPtr == 0)
- error("CharsetRendererCommon::setCurID: charset %d not found!\n", id);
+ error("CharsetRendererCommon::setCurID: charset %d not found!", id);
if (_vm->_version == 4)
_fontPtr += 17;
@@ -70,7 +70,7 @@ void CharsetRendererV3::setCurID(byte id) {
_fontPtr = _vm->getResourceAddress(rtCharset, id);
if (_fontPtr == 0)
- error("CharsetRendererCommon::setCurID: charset %d not found!\n", id);
+ error("CharsetRendererCommon::setCurID: charset %d not found!", id);
_nbChars = _fontPtr[4];
_fontPtr += 6;
diff --git a/scumm/imuse_digi.cpp b/scumm/imuse_digi.cpp
index e182a650e9..d320673e32 100644
--- a/scumm/imuse_digi.cpp
+++ b/scumm/imuse_digi.cpp
@@ -1114,7 +1114,7 @@ int32 IMuseDigital::doCommand(int a, int b, int c, int d, int e, int f, int g, i
tmp /= 2;
}
_channel[chan]._volumeFadeStep = tmp;
- debug(1, "volumeFade is %d, step is %d\n", d, tmp);
+ debug(1, "volumeFade is %d, step is %d", d, tmp);
return 0;
default:
diff --git a/scumm/resource.cpp b/scumm/resource.cpp
index 8b9087c35b..2be823488a 100644
--- a/scumm/resource.cpp
+++ b/scumm/resource.cpp
@@ -886,7 +886,7 @@ int Scumm::readSoundResource(int type, int idx) {
return 1;
} else {
- fprintf(stderr, "WARNING: Unrecognized base tag 0x%08x in sound %d\n", basetag, idx);
+ warning("Unrecognized base tag 0x%08x in sound %d", basetag, idx);
}
res.roomoffs[type][idx] = 0xFFFFFFFF;
return 0;
@@ -1558,7 +1558,7 @@ void Scumm::resourceStats() {
}
}
- debug(1, "Total allocated size=%d, locked=%d(%d)\n", _allocatedSize, lockedSize, lockedNum);
+ debug(1, "Total allocated size=%d, locked=%d(%d)", _allocatedSize, lockedSize, lockedNum);
}
void Scumm::readMAXS() {
@@ -1671,7 +1671,7 @@ void Scumm::allocateArrays() {
_inventory = (uint16 *)calloc(_numInventory, sizeof(uint16));
_verbs = (VerbSlot *)calloc(_numVerbs, sizeof(VerbSlot));
_objs = (ObjectData *)calloc(_numLocalObjects, sizeof(ObjectData));
- debug(2, "Allocated %d space in numObjects\n", _numLocalObjects);
+ debug(2, "Allocated %d space in numObjects", _numLocalObjects);
_scummVars = (int32 *)calloc(_numVariables, sizeof(int32));
_bitVars = (byte *)calloc(_numBitVariables >> 3, 1);
diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp
index 3a217c65d1..0d77cef1d3 100644
--- a/scumm/script_v5.cpp
+++ b/scumm/script_v5.cpp
@@ -1493,7 +1493,7 @@ void Scumm_v5::o5_quitPauseRestart() {
shutDown();
break;
default:
- error("o5_quitPauseRestart invalid case %d\n", subOp);
+ error("o5_quitPauseRestart invalid case %d", subOp);
}
}
@@ -1813,7 +1813,7 @@ void Scumm_v5::o5_roomOps() {
_colorCycle[a - 1].delay = (b != 0) ? 0x4000 / (b * 0x4C) : 0;
break;
default:
- error("o5_roomOps: unknown subopcode %d\n", _opcode & 0x1F);
+ error("o5_roomOps: unknown subopcode %d", _opcode & 0x1F);
}
}
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index cd4602fc93..6d2f38463c 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -2165,7 +2165,7 @@ void Scumm_v6::o6_quitPauseRestart() {
shutDown();
break;
default:
- error("o6_quitPauseRestart invalid case %d\n", subOp);
+ error("o6_quitPauseRestart invalid case %d", subOp);
}
}
@@ -3051,7 +3051,7 @@ void Scumm_v6::o6_unknownEA() {
}
void Scumm_v6::unknownEA_func(int a, int b, int c, int d, int e) {
- warning("unknownEA_func(%d, %d, %d, %d, %d) stub\n", a, b, c, d, e);
+ warning("unknownEA_func(%d, %d, %d, %d, %d) stub", a, b, c, d, e);
}
void Scumm_v6::o6_localizeArray() {
diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp
index e2c442cf52..9edac12f6c 100644
--- a/scumm/script_v8.cpp
+++ b/scumm/script_v8.cpp
@@ -1623,7 +1623,7 @@ void Scumm_v8::o8_drawObject() {
if (x != 0x7FFFFFFF) {
od->x_pos = x;
od->y_pos = y;
- debug(1, "setting position: 0x%X b 0x%X\n", x, y);
+ debug(1, "setting position: 0x%X b 0x%X", x, y);
}
addObjectToDrawQue(objnum);
diff --git a/scumm/string.cpp b/scumm/string.cpp
index 7addac9254..3196dbd04c 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -274,7 +274,7 @@ void Scumm::CHARSET_1() {
_charset->setColor(color);
break;
case 13:
- warning("CHARSET_1: Unknown opcode 13 %d\n", READ_LE_UINT16(buffer));
+ warning("CHARSET_1: Unknown opcode 13 %d", READ_LE_UINT16(buffer));
buffer += 2;
break;
case 14: {
diff --git a/simon/debug.cpp b/simon/debug.cpp
index 84f0cb69aa..0077b9f7ed 100644
--- a/simon/debug.cpp
+++ b/simon/debug.cpp
@@ -47,7 +47,7 @@ byte *SimonEngine::dumpOpcode(byte *p) {
st = s = simon1dos_opcode_name_table[opcode];
}
if (s == NULL) {
- error("INVALID OPCODE %d\n", opcode);
+ error("INVALID OPCODE %d", opcode);
return NULL;
}
while (*st != '|')
diff --git a/sky/autoroute.cpp b/sky/autoroute.cpp
index bcf0b6bc49..73e64576e2 100644
--- a/sky/autoroute.cpp
+++ b/sky/autoroute.cpp
@@ -62,7 +62,7 @@ uint16 SkyAutoRoute::checkBlock(uint16 *blockPos) {
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
diff --git a/sky/control.cpp b/sky/control.cpp
index 0aad8ba8e0..23cdbd21a0 100644
--- a/sky/control.cpp
+++ b/sky/control.cpp
@@ -593,7 +593,7 @@ uint16 SkyControl::handleClick(SkyConResource *pButton) {
return 0;
default:
- error("SkyControl::handleClick: unknown routine: %X\n",pButton->_onClick);
+ error("SkyControl::handleClick: unknown routine: %X",pButton->_onClick);
}
}
@@ -1447,7 +1447,7 @@ uint16 SkyControl::parseSaveData(uint8 *srcBuf) {
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);
diff --git a/sky/debug.cpp b/sky/debug.cpp
index 4789db2f6c..df46f5825b 100644
--- a/sky/debug.cpp
+++ b/sky/debug.cpp
@@ -1236,13 +1236,13 @@ void SkyDebug::fetchCompact(uint32 a) {
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 @@ void SkyDebug::script(uint32 command, uint16 *scriptData) {
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);
};
diff --git a/sky/disk.cpp b/sky/disk.cpp
index f6ef96c771..c6ca874c0e 100644
--- a/sky/disk.cpp
+++ b/sky/disk.cpp
@@ -41,20 +41,20 @@ SkyDisk::SkyDisk(char *gameDataPath) {
_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 @@ uint8 *SkyDisk::loadFile(uint16 fileNr, uint8 *dest) {
}
#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 @@ uint8 *SkyDisk::loadFile(uint16 fileNr, uint8 *dest) {
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 @@ uint8 *SkyDisk::loadFile(uint16 fileNr, uint8 *dest) {
_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 @@ void SkyDisk::prefetchFile(uint16 fileNr) {
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 @@ void SkyDisk::fnCacheFiles(void) {
_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;
diff --git a/sky/logic.cpp b/sky/logic.cpp
index 1b3b939baf..33aa45f7d8 100644
--- a/sky/logic.cpp
+++ b/sky/logic.cpp
@@ -1171,7 +1171,7 @@ script:
/// 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::fnCacheFast(uint32 a, uint32 b, uint32 c) {
}
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 @@ bool SkyLogic::fnResetId(uint32 id, uint32 resetBlock, uint32 c) {
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 @@ bool SkyLogic::fnNewSwingSeq(uint32 a, uint32 b, uint32 c) {
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::fnUnPauseFx(uint32 a, uint32 b, uint32 c) {
}
bool SkyLogic::fnPrintf(uint32 a, uint32 b, uint32 c) {
- printf("fnPrintf: %d\n", a);
+ printf("fnPrintf: %d", a);
return true;
}
diff --git a/sky/music/gmmusic.cpp b/sky/music/gmmusic.cpp
index 07c021a0c5..f274be95db 100644
--- a/sky/music/gmmusic.cpp
+++ b/sky/music/gmmusic.cpp
@@ -34,7 +34,7 @@ SkyGmMusic::SkyGmMusic(MidiDriver *pMidiDrv, SkyDisk *pSkyDisk, OSystem *system)
_midiDrv = pMidiDrv;
int midiRes = _midiDrv->open();
if (midiRes != 0) {
- error("Can't open midi device. Errorcode: %d\n",midiRes);
+ error("Can't open midi device. Errorcode: %d",midiRes);
}
_midiDrv->setTimerCallback(this, passTimerFunc);
_ignoreNextPoll = false;
diff --git a/sky/music/mt32music.cpp b/sky/music/mt32music.cpp
index 93d594de2d..22d40013d9 100644
--- a/sky/music/mt32music.cpp
+++ b/sky/music/mt32music.cpp
@@ -33,7 +33,7 @@ SkyMT32Music::SkyMT32Music(MidiDriver *pMidiDrv, SkyDisk *pSkyDisk, OSystem *sys
_midiDrv = pMidiDrv;
int midiRes = _midiDrv->open();
if (midiRes != 0) {
- error("Can't open midi device. Errorcode: %d\n",midiRes);
+ error("Can't open midi device. Errorcode: %d",midiRes);
}
_midiDrv->setTimerCallback(this, passTimerFunc);
_ignoreNextPoll = false;
diff --git a/sky/music/musicbase.cpp b/sky/music/musicbase.cpp
index def06fd536..60f189b0d0 100644
--- a/sky/music/musicbase.cpp
+++ b/sky/music/musicbase.cpp
@@ -69,25 +69,25 @@ bool SkyMusicBase::musicIsPlaying(void)
void SkyMusicBase::musicCommand(uint16 command)
{
if (_musicData == NULL) {
- debug(1,"Got music command but driver is not yet loaded.\n");
+ debug(1,"Got music command but driver is not yet loaded");
return ;
}
if ((command >> 8) > _allowedCommands) {
- debug(1,"got musicCommand %d while expecting <= %d\n", command >> 8, _allowedCommands);
+ debug(1,"got musicCommand %d while expecting <= %d", command >> 8, _allowedCommands);
return ;
}
switch(command >> 8) {
case 0:
- debug(1,"SkyMusic: got call to startAdlibDriver(). Not necessary in this implementation.\n");
+ debug(1,"SkyMusic: got call to startAdlibDriver(). Not necessary in this implementation.");
break;
case 1:
- debug(1,"SkyMusic: got call to stopDriver(). Not necessary in this implementation.\n");
+ debug(1,"SkyMusic: got call to stopDriver(). Not necessary in this implementation.");
break;
case 2:
- debug(1,"SkyMusic: got call to SetTempo(). Tempo is fixed in this implementation.\n");
+ debug(1,"SkyMusic: got call to SetTempo(). Tempo is fixed in this implementation.");
break;
case 3:
- debug(1,"SkyMusic: ignored direct call to driverPoll().\n");
+ debug(1,"SkyMusic: ignored direct call to driverPoll().");
break;
case 4:
startMusic(command&0xFF);
@@ -102,7 +102,7 @@ void SkyMusicBase::musicCommand(uint16 command)
setFMVolume(command&0xFF);
break;
default:
- debug(1,"musicCommand %d ignored.\n",command>>8);
+ debug(1,"musicCommand %d ignored.",command>>8);
}
}
@@ -134,7 +134,7 @@ void SkyMusicBase::loadNewMusic(void)
{
uint16 musicPos;
if (_onNextPoll.musicToProcess > _musicData[_musicDataLoc]) {
- error("Music %d requested but doesn't exist in file.\n", _onNextPoll.musicToProcess);
+ error("Music %d requested but doesn't exist in file.", _onNextPoll.musicToProcess);
return;
}
if (_currentMusic != 0)
diff --git a/sky/screen.cpp b/sky/screen.cpp
index ef106770da..8e904082f5 100644
--- a/sky/screen.cpp
+++ b/sky/screen.cpp
@@ -129,7 +129,7 @@ void SkyScreen::setPalette(uint16 fileNum) {
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 @@ void SkyScreen::showScreen(uint16 fileNum) {
_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 @@ void SkyScreen::paletteFadeUp(uint16 fileNr) {
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 @@ void SkyScreen::fnFadeUp(uint32 palNum, uint32 scroll) {
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 @@ void SkyScreen::fnFadeUp(uint32 palNum, uint32 scroll) {
#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 @@ void SkyScreen::fnFadeUp(uint32 palNum, uint32 scroll) {
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 @@ void SkyScreen::sortSprites(void) {
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 @@ void SkyScreen::doSprites(uint8 layer) {
(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::doSprites(uint8 layer) {
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 @@ void SkyScreen::drawSprite(uint8 *spriteInfo, Compact *sprCompact) {
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 ;
}
diff --git a/sky/sound.cpp b/sky/sound.cpp
index bac2449518..3244c94834 100644
--- a/sky/sound.cpp
+++ b/sky/sound.cpp
@@ -1082,7 +1082,7 @@ void SkySound::loadSection(uint8 pSection) {
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 @@ void SkySound::playSound(uint16 sound, uint16 volume, uint8 channel) {
_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 @@ bool SkySound::startSpeech(uint16 textNum) {
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;
}