Texture Replacement allow clut hash only variant.

This commit is contained in:
LunaMoo committed 2017-02-26 19:24:32 +01:00
1 parent d84f579928
commit b65704f59a
1 file changed
+9 -1
+9 -1
View File
@@ -411,10 +411,18 @@ std::string TextureReplacer::LookupHashFile(u64 cachekey, u32 hash, int level) {
auto alias = aliases_.find(key);
if (alias == aliases_.end()) {
// Also check for a few more aliases with zeroed portions:
// No data hash.
// Only clut hash (very dangerous in theory, in practice not more than missing "just" data hash)
key.cachekey = cachekey & 0xFFFFFFFFULL;
key.hash = 0;
alias = aliases_.find(key);
if (alias == aliases_.end()) {
// No data hash.
key.cachekey = cachekey;
key.hash = 0;
alias = aliases_.find(key);
}
if (alias == aliases_.end()) {
// No address.
key.cachekey = cachekey & 0xFFFFFFFFULL;