Skip to content

Commit

Permalink
TOOLS: Fix handling of input path for the extract_cine tool
Browse files Browse the repository at this point in the history
  • Loading branch information
criezy committed Jan 29, 2017
1 parent 8c7ce98 commit a38f178
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ For a more comprehensive changelog of the latest experimental code, see:

1.10.0 (YYYY-MM-DD)
- Fix handling of output path for the compress_touche tool.
- Fix handling of input path for the extract_cine tool. It was only working
when run from the directory that contains the game data.

1.9.0 (2016-10-27)
- Fix random crashes in the tool to convert Broken Sword 1 speech files.
Expand Down
9 changes: 8 additions & 1 deletion engines/cine/extract_cine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,10 @@ void ExtractCine::unpackAllResourceFiles(const Common::Filename &filename) {
for (unsigned int i = 0; i < resourceFilesCount; ++i) {
memcpy(resourceFileName, &buf[4 + i * entrySize], 8);
resourceFileName[8] = 0;
Common::Filename resourcePath(filename);
resourcePath.setFullName(resourceFileName);

Common::File fpResFile(resourceFileName, "rb");
Common::File fpResFile(resourcePath, "rb");
print("--- Unpacking resource file %s:", resourceFileName);
unpackFile(fpResFile);
}
Expand All @@ -294,6 +296,11 @@ void ExtractCine::unpackAllResourceFiles(const Common::Filename &filename) {
}

void ExtractCine::execute() {
// We always need to setup default output path, since there is no obligation to specify it
if (_outputPath.empty()) {
_outputPath.setFullPath("./");
}

Common::Filename infilename(_inputPaths[0].path);

std::string fname = infilename.getFullName();
Expand Down

0 comments on commit a38f178

Please sign in to comment.