aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction
diff options
context:
space:
mode:
Diffstat (limited to 'engines/parallaction')
-rw-r--r--engines/parallaction/animation.cpp2
-rw-r--r--engines/parallaction/archive.cpp8
-rw-r--r--engines/parallaction/debug.cpp12
-rw-r--r--engines/parallaction/disk.cpp10
4 files changed, 21 insertions, 11 deletions
diff --git a/engines/parallaction/animation.cpp b/engines/parallaction/animation.cpp
index ddceb2639a..1b8752bab3 100644
--- a/engines/parallaction/animation.cpp
+++ b/engines/parallaction/animation.cpp
@@ -175,7 +175,7 @@ void jobDisplayAnimations(void *parm, Job *j) {
else
_si = _vm->_gfx->queryMask(v18->_top + v18->height());
-// printf("jobDisplayAnimations %s, x: %i, y: %i, w: %i, h: %i\n", v18->_name, v18->_left, v18->_top, v14._width, v14._height);
+ debugC(9, kDebugLocation, "jobDisplayAnimations(%s, x:%i, y:%i, z:%i, w:%i, h:%i, %p)", v18->_label._text, v18->_left, v18->_top, _si, v14._width, v14._height, v14._data0);
_vm->_gfx->blitCnv(&v14, v18->_left, v18->_top, _si, Gfx::kBitBack);
}
diff --git a/engines/parallaction/archive.cpp b/engines/parallaction/archive.cpp
index ab913f5d54..3f9d0098cf 100644
--- a/engines/parallaction/archive.cpp
+++ b/engines/parallaction/archive.cpp
@@ -51,7 +51,7 @@ Archive::Archive() {
}
void Archive::open(const char *file) {
- debugC(1, kDebugDisk, "open archive '%s'", file);
+ debugC(3, kDebugDisk, "Archive::open(%s)", file);
if (_archive.isOpen())
close();
@@ -83,8 +83,6 @@ void Archive::open(const char *file) {
void Archive::close() {
- debugC(1, kDebugDisk, "close current archive");
-
if (!_archive.isOpen()) return;
resetArchivedFile();
@@ -96,6 +94,8 @@ void Archive::close() {
bool Archive::openArchivedFile(const char *filename) {
resetArchivedFile();
+ debugC(3, kDebugDisk, "Archive::openArchivedFile(%s)", filename);
+
if (!_archive.isOpen())
error("Archive::openArchivedFile: the archive is not open");
@@ -105,7 +105,7 @@ bool Archive::openArchivedFile(const char *filename) {
}
if (i == _numFiles) return false;
- debugC(1, kDebugDisk, "file '%s' found in slot %i", filename, i);
+ debugC(9, kDebugDisk, "Archive::openArchivedFile: '%s' found in slot %i", filename, i);
_file = true;
diff --git a/engines/parallaction/debug.cpp b/engines/parallaction/debug.cpp
index 61ab924c15..497554e5ed 100644
--- a/engines/parallaction/debug.cpp
+++ b/engines/parallaction/debug.cpp
@@ -61,8 +61,8 @@ Debugger::Debugger(Parallaction *vm)
_vm = vm;
DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
- DCmd_Register("location", WRAP_METHOD(Debugger, Cmd_Location));
- DCmd_Register("give", WRAP_METHOD(Debugger, Cmd_Give));
+ DCmd_Register("location", WRAP_METHOD(Debugger, Cmd_Location));
+ DCmd_Register("give", WRAP_METHOD(Debugger, Cmd_Give));
}
@@ -81,11 +81,15 @@ bool Debugger::Cmd_Location(int argc, const char **argv) {
switch (argc) {
case 3:
character = const_cast<char*>(argv[2]);
- // fallthru is intentional here
+ location = const_cast<char*>(argv[1]);
+ sprintf(_vm->_location._name, "%s.%s", location, character);
+ // TODO: check if location exists
+ _engineFlags |= kEngineChangeLocation;
+ break;
case 2:
location = const_cast<char*>(argv[1]);
- sprintf(_vm->_location._name, "%s.%s", location, character);
+ sprintf(_vm->_location._name, "%s", location);
// TODO: check if location exists
_engineFlags |= kEngineChangeLocation;
break;
diff --git a/engines/parallaction/disk.cpp b/engines/parallaction/disk.cpp
index d1f237773a..3cffbf05af 100644
--- a/engines/parallaction/disk.cpp
+++ b/engines/parallaction/disk.cpp
@@ -246,16 +246,22 @@ Script* DosDisk::loadLocation(const char *name) {
if (IS_MINI_CHARACTER(_vm->_characterName)) {
sprintf(archivefile, "%s%s", _vm->_characterName+4, _languageDir);
} else {
- if (IS_DUMMY_CHARACTER(_vm->_characterName)) strcpy(archivefile, _languageDir);
- else {
+ if (IS_DUMMY_CHARACTER(_vm->_characterName)) {
+ strcpy(archivefile, _languageDir);
+ } else {
sprintf(archivefile, "%s%s", _vm->_characterName, _languageDir);
}
}
+
strcat(archivefile, name);
strcat(archivefile, ".loc");
+ debugC(3, kDebugDisk, "DosDisk::loadLocation(%s): trying '%s'", name, archivefile);
+
if (!_locArchive.openArchivedFile(archivefile)) {
sprintf(archivefile, "%s%s.loc", _languageDir, name);
+ debugC(3, kDebugDisk, "DosDisk::loadLocation(%s): trying '%s'", name, archivefile);
+
if (!_locArchive.openArchivedFile(archivefile))
errorFileNotFound(name);
}