[Scummvm-git-logs] scummvm master -> c73bf1c0ce211030ac8e915c815408d1f963f7b8

csnover csnover at users.noreply.github.com
Sun May 21 04:52:11 CEST 2017


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

Summary:
c73bf1c0ce SCI: Add resource hash to resource_info debugger command


Commit: c73bf1c0ce211030ac8e915c815408d1f963f7b8
    https://github.com/scummvm/scummvm/commit/c73bf1c0ce211030ac8e915c815408d1f963f7b8
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-05-20T21:52:00-05:00

Commit Message:
SCI: Add resource hash to resource_info debugger command

Bad resources that need to be blacklisted sometimes seem to have
the same size as good resources. In such cases, the bad resources
can be identified by hash instead. Adding a hash output to
resource_info will make it easy for users to provide the hash of
questionable resources inside of resource bundles that we do not
have access to.

Refs Trac#9797.

Changed paths:
    engines/sci/console.cpp


diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 99c5498..211aab0 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -22,6 +22,7 @@
 
 // Console module
 
+#include "common/md5.h"
 #include "sci/sci.h"
 #include "sci/console.h"
 #include "sci/debug.h"
@@ -990,6 +991,9 @@ bool Console::cmdResourceInfo(int argc, const char **argv) {
 		if (resource) {
 			debugPrintf("Resource size: %u\n", resource->size());
 			debugPrintf("Resource location: %s\n", resource->getResourceLocation().c_str());
+			Common::MemoryReadStream stream = resource->toStream();
+			const Common::String hash = Common::computeStreamMD5AsString(stream);
+			debugPrintf("Resource hash (decompressed): %s\n", hash.c_str());
 		} else {
 			debugPrintf("Resource %s.%03d not found\n", argv[1], resNum);
 		}





More information about the Scummvm-git-logs mailing list