aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/objects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agi/objects.cpp')
-rw-r--r--engines/agi/objects.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/engines/agi/objects.cpp b/engines/agi/objects.cpp
index 5d1866bea4..d942a2b538 100644
--- a/engines/agi/objects.cpp
+++ b/engines/agi/objects.cpp
@@ -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
@@ -74,12 +74,11 @@ int AgiEngine::decodeObjects(uint8 *mem, uint32 flen) {
if ((uint) offset < flen) {
(_objects + i)->name = (char *)strdup((const char *)mem + offset);
} else {
- printf("ERROR: object %i name beyond object filesize! "
- "(%04x > %04x)\n", i, offset, flen);
+ warning("object %i name beyond object filesize (%04x > %04x)", i, offset, 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 +91,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 +128,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 +136,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 +144,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;