Ticket #9042: scummvm-sci-resource.patch
File scummvm-sci-resource.patch, 1.2 KB (added by , 15 years ago) |
---|
-
engines/sci/resource.cpp
old new 864 898 debug("Patching %s failed - resource type mismatch", source->location_name.c_str()); 865 899 return; 866 900 } 901 902 // Fixes SQ5/German, patch file special case logic taken from SCI-View disassembly 903 if (patch_data_offset & 0x80) { 904 switch (patch_data_offset & 0x7F) { 905 case 0: patch_data_offset = 24; break; 906 case 1: patch_data_offset = 2; break; 907 default: 908 warning("Resource-patch unsupported special case %X\n", patch_data_offset); 909 } 910 } 911 867 912 if (patch_data_offset + 2 >= fsize) { 868 913 debug("Patching %s failed - patch starting at offset %d can't be in file of size %d", 869 914 source->location_name.c_str(), patch_data_offset + 2, fsize); … … 974 1019 res->file_offset = offset & (((~bMask) << 24) | 0xFFFFFF); 975 1020 res->id = resId; 976 1021 res->source = getVolume(map, offset >> bShift); 1022 if (!res->source) { 1023 warning("Could not get volume for resource %d, VolumeID %d\n", resId, offset >> bShift); 1024 } 977 1025 _resMap.setVal(resId, res); 978 1026 } 979 1027 } while (!file.eos());