AGI: Replace report() macro by debug() / warning()

This makes AGI quite a bit less noisy by default.

svn-id: r53868
This commit is contained in:
Max Horn 2010-10-26 22:33:49 +00:00
parent 4e2d1b507a
commit 7c2323bdc3
12 changed files with 41 additions and 49 deletions

View file

@ -46,9 +46,9 @@ int AgiEngine::decodeObjects(uint8 *mem, uint32 flen) {
// if so, its encrypted, else it is not
if (READ_LE_UINT16(mem) > flen) {
report("Decrypting objects... ");
debugN(0, "Decrypting objects... ");
decrypt(mem, flen);
report("done.\n");
debug(0, "done.");
}
// alloc memory for object list
@ -79,7 +79,7 @@ int AgiEngine::decodeObjects(uint8 *mem, uint32 flen) {
(_objects + i)->name = strdup("");
}
}
report("Reading objects: %d objects read.\n", _game.numObjects);
debug(0, "Reading objects: %d objects read.", _game.numObjects);
return errOK;
}
@ -92,8 +92,7 @@ int AgiEngine::loadObjects(const char *fname) {
_objects = NULL;
_game.numObjects = 0;
debugC(5, kDebugLevelResources, "(fname = %s)", fname);
report("Loading objects: %s\n", fname);
debugC(5, kDebugLevelResources, "(Loading objects '%s')", fname);
if (!fp.open(fname))
return errBadFileOpen;
@ -130,7 +129,7 @@ void AgiEngine::unloadObjects() {
void AgiEngine::objectSetLocation(unsigned int n, int i) {
if (n >= _game.numObjects) {
report("Error: Can't access object %d.\n", n);
warning("AgiEngine::objectSetLocation: Can't access object %d.\n", n);
return;
}
_objects[n].location = i;
@ -138,7 +137,7 @@ void AgiEngine::objectSetLocation(unsigned int n, int i) {
int AgiEngine::objectGetLocation(unsigned int n) {
if (n >= _game.numObjects) {
report("Error: Can't access object %d.\n", n);
warning("AgiEngine::objectGetLocation: Can't access object %d.\n", n);
return 0;
}
return _objects[n].location;
@ -146,7 +145,7 @@ int AgiEngine::objectGetLocation(unsigned int n) {
const char *AgiEngine::objectName(unsigned int n) {
if (n >= _game.numObjects) {
report("Error: Can't access object %d.\n", n);
warning("AgiEngine::objectName: Can't access object %d.\n", n);
return "";
}
return _objects[n].name;