[Scummvm-cvs-logs] scummvm-tools master -> 1bc845fbdb1d9ff4e792eed037cc076ae75c6bfb
criezy
criezy at scummvm.org
Mon Oct 20 20:42:19 CEST 2014
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:
1bc845fbdb TOOLS: Fix inputs handling for extract_gob_stk
Commit: 1bc845fbdb1d9ff4e792eed037cc076ae75c6bfb
https://github.com/scummvm/scummvm-tools/commit/1bc845fbdb1d9ff4e792eed037cc076ae75c6bfb
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2014-10-20T19:41:57+01:00
Commit Message:
TOOLS: Fix inputs handling for extract_gob_stk
This tool can take as input non only files with the stk extension but
also files with the itk and ltk extensions.
Changed paths:
engines/gob/extract_gob_stk.cpp
engines/gob/extract_gob_stk.h
diff --git a/engines/gob/extract_gob_stk.cpp b/engines/gob/extract_gob_stk.cpp
index 478f0ce..58b6e42 100644
--- a/engines/gob/extract_gob_stk.cpp
+++ b/engines/gob/extract_gob_stk.cpp
@@ -46,7 +46,7 @@ ExtractGobStk::ExtractGobStk(const std::string &name) : Tool(name, TOOLTYPE_EXTR
_chunks = NULL;
ToolInput input;
- input.format = "*.stk";
+ input.format = "*.*";
_inputPaths.push_back(input);
_shorthelp = "Extract the files from a Stick file used by 'gob' engine (.STK/.ITK/.LTK).";
@@ -57,6 +57,18 @@ ExtractGobStk::~ExtractGobStk() {
delete _chunks;
}
+InspectionMatch ExtractGobStk::inspectInput(const Common::Filename &filename) {
+ // Accept either any file with stk, itk or ltk extension
+ std::string ext = filename.getExtension();
+ if (
+ scumm_stricmp(ext.c_str(), "stk") == 0 ||
+ scumm_stricmp(ext.c_str(), "itk") == 0 ||
+ scumm_stricmp(ext.c_str(), "ltk") == 0
+ )
+ return IMATCH_PERFECT;
+ return IMATCH_AWFUL;
+}
+
void ExtractGobStk::execute() {
char signature[7];
Common::File stk;
diff --git a/engines/gob/extract_gob_stk.h b/engines/gob/extract_gob_stk.h
index c8b2df5..63f2e64 100644
--- a/engines/gob/extract_gob_stk.h
+++ b/engines/gob/extract_gob_stk.h
@@ -31,6 +31,8 @@ public:
~ExtractGobStk();
virtual void execute();
+
+ virtual InspectionMatch inspectInput(const Common::Filename &filename);
protected:
struct Chunk;
More information about the Scummvm-git-logs
mailing list