aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorTorbjörn Andersson2009-05-31 10:02:16 +0000
committerTorbjörn Andersson2009-05-31 10:02:16 +0000
commit0999534749f6c4edb9e4d054b95f185b829adba3 (patch)
tree55744aee72afd7cc699213a88be65938e70fa0a0 /engines/scumm
parent3b311c65d0140e8bf727910d230ffd7a7f803761 (diff)
downloadscummvm-rg350-0999534749f6c4edb9e4d054b95f185b829adba3.tar.gz
scummvm-rg350-0999534749f6c4edb9e4d054b95f185b829adba3.tar.bz2
scummvm-rg350-0999534749f6c4edb9e4d054b95f185b829adba3.zip
The error() and warning() functions add ! and newline automatically. (I didn't
look at debug() and debugC(), since I'm really bored with this now. :-) svn-id: r41061
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/boxes.cpp2
-rw-r--r--engines/scumm/charset.cpp4
-rw-r--r--engines/scumm/file.cpp6
-rw-r--r--engines/scumm/file_nes.cpp4
-rw-r--r--engines/scumm/he/logic_he.cpp2
-rw-r--r--engines/scumm/imuse/imuse_player.cpp4
-rw-r--r--engines/scumm/imuse_digi/dimuse_bndmgr.cpp4
-rw-r--r--engines/scumm/imuse_digi/dimuse_codecs.cpp2
-rw-r--r--engines/scumm/imuse_digi/dimuse_sndmgr.cpp6
-rw-r--r--engines/scumm/object.cpp2
-rw-r--r--engines/scumm/player_v2a.cpp2
-rw-r--r--engines/scumm/player_v3a.cpp2
-rw-r--r--engines/scumm/resource.cpp2
-rw-r--r--engines/scumm/resource_v4.cpp2
-rw-r--r--engines/scumm/script_v5.cpp4
-rw-r--r--engines/scumm/scumm.cpp2
-rw-r--r--engines/scumm/smush/imuse_channel.cpp3
-rw-r--r--engines/scumm/string.cpp6
18 files changed, 30 insertions, 29 deletions
diff --git a/engines/scumm/boxes.cpp b/engines/scumm/boxes.cpp
index 2753b55b3c..f1429d4261 100644
--- a/engines/scumm/boxes.cpp
+++ b/engines/scumm/boxes.cpp
@@ -229,7 +229,7 @@ void ScummEngine::setBoxScale(int box, int scale) {
if (_game.version == 8)
ptr->v8.scale = TO_LE_32(scale);
else if (_game.version <= 2)
- error("This should not ever be called!");
+ error("This should not ever be called");
else
ptr->old.scale = TO_LE_16(scale);
}
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index 5e661a9cae..193fc434e4 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -299,7 +299,7 @@ void CharsetRendererCommon::setCurID(int32 id) {
_fontPtr = _vm->getResourceAddress(rtCharset, id);
if (_fontPtr == 0)
- error("CharsetRendererCommon::setCurID: charset %d not found!", id);
+ error("CharsetRendererCommon::setCurID: charset %d not found", id);
if (_vm->_game.version == 4)
_fontPtr += 17;
@@ -321,7 +321,7 @@ void CharsetRendererV3::setCurID(int32 id) {
_fontPtr = _vm->getResourceAddress(rtCharset, id);
if (_fontPtr == 0)
- error("CharsetRendererCommon::setCurID: charset %d not found!", id);
+ error("CharsetRendererCommon::setCurID: charset %d not found", id);
_bitDepth = 1;
_numChars = _fontPtr[4];
diff --git a/engines/scumm/file.cpp b/engines/scumm/file.cpp
index 3db2801c01..3f101691c7 100644
--- a/engines/scumm/file.cpp
+++ b/engines/scumm/file.cpp
@@ -304,7 +304,7 @@ bool ScummDiskImage::open(const Common::String &filename) {
signature = fileReadUint16LE();
if (signature != 0x0A31) {
- error("ScummDiskImage::open(): signature not found in disk 1!");
+ error("ScummDiskImage::open(): signature not found in disk 1");
return false;
}
@@ -316,12 +316,12 @@ bool ScummDiskImage::open(const Common::String &filename) {
File::seek(143104);
signature = fileReadUint16LE();
if (signature != 0x0032)
- error("Error: signature not found in disk 2!\n");
+ error("Error: signature not found in disk 2");
} else {
File::seek(0);
signature = fileReadUint16LE();
if (signature != 0x0132)
- error("Error: signature not found in disk 2!\n");
+ error("Error: signature not found in disk 2");
}
diff --git a/engines/scumm/file_nes.cpp b/engines/scumm/file_nes.cpp
index bfd9f3f6cd..444b117037 100644
--- a/engines/scumm/file_nes.cpp
+++ b/engines/scumm/file_nes.cpp
@@ -983,7 +983,7 @@ uint16 ScummNESFile::extractResource(Common::WriteStream *output, const Resource
break;
default:
- error("extract_resource - unknown resource type %d specified!", type);
+ error("extract_resource - unknown resource type %d specified", type);
}
return reslen;
@@ -1225,7 +1225,7 @@ bool ScummNESFile::generateIndex() {
lfl_index.costume_addr[78] = TO_LE_16(respos);
break;
default:
- error("Unindexed entry found!");
+ error("Unindexed entry found");
break;
}
respos += extractResource(0, &entry->type->langs[_ROMset][entry->index], entry->type->type);
diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp
index 9efb1c697c..5f3bdd7018 100644
--- a/engines/scumm/he/logic_he.cpp
+++ b/engines/scumm/he/logic_he.cpp
@@ -446,7 +446,7 @@ void LogicHEfunshop::op_1004(int32 *args) {
(int32)data[2], (int32)data[3], (int32)data[6], (int32)data[7], &x, &y);
if (s != 1) {
- error("LogicHEfunshop::op_1004: Your shape has defied the laws of physics\n");
+ error("LogicHEfunshop::op_1004: Your shape has defied the laws of physics");
return;
}
diff --git a/engines/scumm/imuse/imuse_player.cpp b/engines/scumm/imuse/imuse_player.cpp
index 253bd919c6..0d79917bf3 100644
--- a/engines/scumm/imuse/imuse_player.cpp
+++ b/engines/scumm/imuse/imuse_player.cpp
@@ -101,7 +101,7 @@ bool Player::startSound(int sound, MidiDriver *midi, bool passThrough) {
// but we'll go ahead and do a similar check.
ptr = _se->findStartOfSound(sound);
if (!ptr) {
- error("Player::startSound(): Couldn't find start of sound %d!", sound);
+ error("Player::startSound(): Couldn't find start of sound %d", sound);
return false;
}
@@ -800,7 +800,7 @@ int Player::query_part_param(int param, byte chan) {
return part->_vol;
case 16:
// FIXME: Need to know where this occurs...
-error("Trying to cast instrument (%d, %d) -- please tell Fingolfin\n", param, chan);
+error("Trying to cast instrument (%d, %d) -- please tell Fingolfin", param, chan);
// In old versions of the code, this used to return part->_program.
// This was changed in revision 2.29 of imuse.cpp (where this code used
// to reside).
diff --git a/engines/scumm/imuse_digi/dimuse_bndmgr.cpp b/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
index 780a9ad216..4577a11fe1 100644
--- a/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
+++ b/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
@@ -258,7 +258,7 @@ int32 BundleMgr::decompressSampleByIndex(int32 index, int32 offset, int32 size,
assert(0 <= index && index < _numFiles);
if (_file->isOpen() == false) {
- error("BundleMgr::decompressSampleByIndex() File is not open!");
+ error("BundleMgr::decompressSampleByIndex() File is not open");
return 0;
}
@@ -335,7 +335,7 @@ int32 BundleMgr::decompressSampleByName(const char *name, int32 offset, int32 si
int32 final_size = 0;
if (!_file->isOpen()) {
- error("BundleMgr::decompressSampleByName() File is not open!");
+ error("BundleMgr::decompressSampleByName() File is not open");
return 0;
}
diff --git a/engines/scumm/imuse_digi/dimuse_codecs.cpp b/engines/scumm/imuse_digi/dimuse_codecs.cpp
index 22796f3152..479a7a5470 100644
--- a/engines/scumm/imuse_digi/dimuse_codecs.cpp
+++ b/engines/scumm/imuse_digi/dimuse_codecs.cpp
@@ -635,7 +635,7 @@ int32 decompressCodec(int32 codec, byte *compInput, byte *compOutput, int32 inpu
break;
default:
- error("BundleCodecs::decompressCodec() Unknown codec %d!", (int)codec);
+ error("BundleCodecs::decompressCodec() Unknown codec %d", (int)codec);
outputSize = 0;
break;
}
diff --git a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
index b18b0ba70f..10ebe093bf 100644
--- a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
+++ b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
@@ -673,7 +673,7 @@ int32 ImuseDigiSndMgr::getDataFromRegion(SoundDesc *soundDesc, int region, byte
cmpFile = soundDesc->bundle->getFile(fileName, offs, len);
if (len) {
#ifndef USE_FLAC
- error("FLAC library compiled support needed!");
+ error("FLAC library compiled support needed");
#endif
soundMode = 3;
}
@@ -682,7 +682,7 @@ int32 ImuseDigiSndMgr::getDataFromRegion(SoundDesc *soundDesc, int region, byte
cmpFile = soundDesc->bundle->getFile(fileName, offs, len);
if (len) {
#ifndef USE_VORBIS
- error("Vorbis library compiled support needed!");
+ error("Vorbis library compiled support needed");
#endif
soundMode = 2;
}
@@ -692,7 +692,7 @@ int32 ImuseDigiSndMgr::getDataFromRegion(SoundDesc *soundDesc, int region, byte
cmpFile = soundDesc->bundle->getFile(fileName, offs, len);
if (len) {
#ifndef USE_MAD
- error("Mad library compiled support needed!");
+ error("Mad library compiled support needed");
#endif
soundMode = 1;
}
diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp
index b5b309863f..372fcd9e45 100644
--- a/engines/scumm/object.cpp
+++ b/engines/scumm/object.cpp
@@ -412,7 +412,7 @@ void ScummEngine::getObjectXYPos(int object, int &x, int &y, int &dir) {
y = od.y_pos + (int32)READ_LE_UINT32(&imhd->v8.hotspot[state].y);
break;
default:
- error("Unsupported image header version %d\n", FROM_LE_32(imhd->v8.version));
+ error("Unsupported image header version %d", FROM_LE_32(imhd->v8.version));
}
} else if (_game.version == 7) {
x = od.x_pos + (int16)READ_LE_UINT16(&imhd->v7.hotspot[state].x);
diff --git a/engines/scumm/player_v2a.cpp b/engines/scumm/player_v2a.cpp
index 73fc8d1b8a..7217dd2eb3 100644
--- a/engines/scumm/player_v2a.cpp
+++ b/engines/scumm/player_v2a.cpp
@@ -72,7 +72,7 @@ class V2A_Sound_Unsupported : public V2A_Sound {
public:
V2A_Sound_Unsupported() { }
virtual void start(Player_MOD *mod, int id, const byte *data) {
- warning("player_v2a - sound %i not supported!", id);
+ warning("player_v2a - sound %i not supported", id);
}
virtual bool update() { return false; }
virtual void stop() { }
diff --git a/engines/scumm/player_v3a.cpp b/engines/scumm/player_v3a.cpp
index d53716cba3..5082bf102d 100644
--- a/engines/scumm/player_v3a.cpp
+++ b/engines/scumm/player_v3a.cpp
@@ -161,7 +161,7 @@ void Player_V3A::startSound(int nr) {
assert(data);
if ((_vm->_game.id != GID_INDY3) && (_vm->_game.id != GID_LOOM))
- error("player_v3a - unknown game!");
+ error("player_v3a - unknown game");
if (!_isinit) {
int i;
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index 1f4c743e90..874b787615 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -480,7 +480,7 @@ void ScummEngine::readIndexBlock(uint32 blocktype, uint32 itemsize) {
break;
default:
- error("Bad ID %04X('%s') found in index file directory!", blocktype,
+ error("Bad ID %04X('%s') found in index file directory", blocktype,
tag2str(blocktype));
}
}
diff --git a/engines/scumm/resource_v4.cpp b/engines/scumm/resource_v4.cpp
index ae4f4536bc..28e0fb05b5 100644
--- a/engines/scumm/resource_v4.cpp
+++ b/engines/scumm/resource_v4.cpp
@@ -146,7 +146,7 @@ void ScummEngine_v4::readIndexFile() {
break;
default:
- error("Bad ID %c%c found in directory!", blocktype & 0xFF, blocktype >> 8);
+ error("Bad ID %c%c found in directory", blocktype & 0xFF, blocktype >> 8);
}
}
closeRoom();
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index a0d012f158..00d01143d6 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -1753,7 +1753,7 @@ void ScummEngine_v5::o5_roomOps() {
if (filename.hasPrefix("iq-") || filename.hasPrefix("IQ-") || filename.hasSuffix("-iq")) {
filename = _targetName + ".iq";
} else {
- error("SO_SAVE_STRING: Unsupported filename %s\n", filename.c_str());
+ error("SO_SAVE_STRING: Unsupported filename %s", filename.c_str());
}
Common::OutSaveFile *file = _saveFileMan->openForSaving(filename);
@@ -1778,7 +1778,7 @@ void ScummEngine_v5::o5_roomOps() {
if (filename.hasPrefix("iq-") || filename.hasPrefix("IQ-") || filename.hasSuffix("-iq")) {
filename = _targetName + ".iq";
} else {
- error("SO_LOAD_STRING: Unsupported filename %s\n", filename.c_str());
+ error("SO_LOAD_STRING: Unsupported filename %s", filename.c_str());
}
Common::InSaveFile *file = _saveFileMan->openForLoading(filename);
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 0536f11039..de4f9c7bd7 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1635,7 +1635,7 @@ void ScummEngine::setupMusic(int midi) {
if (_musicType == MDT_ADLIB || _musicType == MDT_PCSPK) {
midiDriver = MD_NULL;
_musicType = MDT_NONE;
- warning("MIDI driver depends on sound mixer, switching to null MIDI driver\n");
+ warning("MIDI driver depends on sound mixer, switching to null MIDI driver");
}
}
diff --git a/engines/scumm/smush/imuse_channel.cpp b/engines/scumm/smush/imuse_channel.cpp
index cab836fcc8..e39397eded 100644
--- a/engines/scumm/smush/imuse_channel.cpp
+++ b/engines/scumm/smush/imuse_channel.cpp
@@ -162,7 +162,8 @@ void ImuseChannel::decode() {
byte *old = _tbuffer;
int new_size = remaining_size + _tbufferSize;
_tbuffer = new byte[new_size];
- if (!_tbuffer) error("imuse_channel failed to allocate memory");
+ if (!_tbuffer)
+ error("imuse_channel failed to allocate memory");
memcpy(_tbuffer, old, _tbufferSize);
delete[] old;
memcpy(_tbuffer + _tbufferSize, _sbuffer + _sbufferSize - remaining_size, remaining_size);
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp
index 2aaedf5667..77fad53425 100644
--- a/engines/scumm/string.cpp
+++ b/engines/scumm/string.cpp
@@ -1095,7 +1095,7 @@ int ScummEngine::convertMessageToString(const byte *msg, byte *dst, int dstSize)
// Check for a buffer overflow
if (dst >= end)
- error("convertMessageToString: buffer overflow!");
+ error("convertMessageToString: buffer overflow");
}
*dst = 0;
@@ -1144,7 +1144,7 @@ int ScummEngine_v72he::convertMessageToString(const byte *msg, byte *dst, int ds
// Check for a buffer overflow
if (dst >= end)
- error("convertMessageToString: buffer overflow!");
+ error("convertMessageToString: buffer overflow");
}
*dst = 0;
@@ -1362,7 +1362,7 @@ void ScummEngine_v7::loadLanguageBundle() {
// That was another index entry
_languageIndexSize++;
} else {
- error("Unknown language.bnd entry found: '%s'\n", ptr);
+ error("Unknown language.bnd entry found: '%s'", ptr);
}
// Skip over newlines (and turn them into null bytes)