@@ -644,13 +644,13 @@ static int GetRealTextureOffset_MH(const UTexture2D *Obj, int MipIndex)
644
644
#endif // MARVEL_HEROES
645
645
646
646
#if SMITE
647
- #include < md5/md5.h>
648
647
#include " ../FileSystem/GameFileSystemSmite.h"
649
648
#include " ../UnrealPackage/UnPackageUE3Reader.h"
650
649
651
650
static bool LoadBulkTextureSMITE (const UTexture2D* texture, const TArray<FTexture2DMipMap> &MipsArray, int MipIndex, bool verbose) {
652
651
static char buf[2048 ];
653
- texture->GetFullName (ARRAY_ARG (buf), true , true , true ); char *s = buf;
652
+ texture->GetFullName (ARRAY_ARG (buf), true , true , true );
653
+ char *s = buf;
654
654
int len = 0 ;
655
655
if (verbose) {
656
656
appPrintf (" Smite: Finding %s (Mip %d) in MergedFileIndexCache\n " , buf, MipIndex);
@@ -660,13 +660,9 @@ static bool LoadBulkTextureSMITE(const UTexture2D* texture, const TArray<FTextur
660
660
len++;
661
661
s++;
662
662
}
663
- MD5Context ctx;
664
- md5Init (&ctx);
665
- md5Update (&ctx, (unsigned char *)buf, len);
666
- md5Finalize (&ctx);
667
663
668
664
const FTexture2DMipMap &Mip = MipsArray[MipIndex];
669
- FArchive* Ar = GetSmiteBlob (* reinterpret_cast <FGuid*>(ctx. digest ) , MipIndex, " tfc" );
665
+ FArchive* Ar = GetSmiteBlob (buf, len , MipIndex, " tfc" );
670
666
if (Ar == NULL ) {
671
667
appPrintf (" Smite: unable to find %s (Mip %d) in MergedFileIndexCache\n " , buf, MipIndex);
672
668
return false ;
@@ -727,10 +723,8 @@ bool UTexture2D::LoadBulkTexture(const TArray<FTexture2DMipMap> &MipsArray, int
727
723
if (TextureFileCacheName != " None" )
728
724
{
729
725
#if SMITE
730
- if (GForceGame == GAME_Smite) {
731
- if (LoadBulkTextureSMITE (this , MipsArray, MipIndex, verbose)) {
732
- return true ;
733
- }
726
+ if (Package && Package->Game == GAME_Smite) {
727
+ return LoadBulkTextureSMITE (this , MipsArray, MipIndex, verbose);
734
728
}
735
729
#endif
736
730
// TFC file is assigned
@@ -1091,6 +1085,11 @@ bool UTexture2D::GetTextureData(CTextureData &TexData) const
1091
1085
// ?? Separate this function ?
1092
1086
// !! * -notfc cmdline switch
1093
1087
// !! * material viewer: support switching mip levels (for xbox decompression testing)
1088
+ #if SMITE
1089
+ if (Package && Package->Game == GAME_Smite) {
1090
+ bulkFailed = false ;
1091
+ } else
1092
+ #endif
1094
1093
if (Bulk.BulkDataFlags & BULKDATA_Unused) continue ; // mip level is stripped
1095
1094
if (!(Bulk.BulkDataFlags & BULKDATA_StoreInSeparateFile)) continue ; // equals to BULKDATA_PayloadAtEndOfFile for UE4
1096
1095
// some optimization in a case of missing bulk file
0 commit comments