[Scummvm-git-logs] scummvm-tools master -> a38f178730bd8658d2aee3611e7c8a1e37228cb1

criezy criezy at scummvm.org
Sun Jan 29 17:59:24 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm-tools' repo located at https://github.com/scummvm/scummvm-tools .

Summary:
a38f178730 TOOLS: Fix handling of input path for the extract_cine tool


Commit: a38f178730bd8658d2aee3611e7c8a1e37228cb1
    https://github.com/scummvm/scummvm-tools/commit/a38f178730bd8658d2aee3611e7c8a1e37228cb1
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2017-01-29T16:59:05Z

Commit Message:
TOOLS: Fix handling of input path for the extract_cine tool

Changed paths:
    NEWS
    engines/cine/extract_cine.cpp


diff --git a/NEWS b/NEWS
index dee9c2d..8ffd1d6 100644
--- a/NEWS
+++ b/NEWS
@@ -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.
diff --git a/engines/cine/extract_cine.cpp b/engines/cine/extract_cine.cpp
index 179505e..09b8db9 100644
--- a/engines/cine/extract_cine.cpp
+++ b/engines/cine/extract_cine.cpp
@@ -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);
 	}
@@ -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();





More information about the Scummvm-git-logs mailing list