@@ -14,7 +14,7 @@ class CacheController
1414 static String MD5String = "" ;
1515 static String LastFile = "" ;
1616
17- public static TextureInfoWrapper FetchCacheTexture ( TexInfo Texture , bool compress , bool mipmaps , bool makeNotReadable )
17+ public static TextureInfoWrapper FetchCacheTexture ( TexInfo Texture , bool compress , bool mipmaps )
1818 {
1919 String textureName = Texture . name ;
2020 String originalTextureFile = KSPUtil . ApplicationRootPath + "GameData/" + textureName ;
@@ -36,7 +36,7 @@ public static TextureInfoWrapper FetchCacheTexture(TexInfo Texture, bool compres
3636 if ( origWidthString == null || origHeightString == null ||
3737 cacheHash == null || format == null )
3838 {
39- return RebuildCache ( Texture , compress , mipmaps , makeNotReadable ) ;
39+ return RebuildCache ( Texture , compress , mipmaps ) ;
4040 }
4141
4242 originalTextureFile += format ;
@@ -86,33 +86,32 @@ public static TextureInfoWrapper FetchCacheTexture(TexInfo Texture, bool compres
8686 {
8787 ActiveTextureManagement . DBGLog ( Texture . resizeHeight + " != " + cacheHeight ) ;
8888 }
89- return RebuildCache ( Texture , compress , mipmaps , makeNotReadable ) ;
89+ return RebuildCache ( Texture , compress , mipmaps ) ;
9090 }
9191 else
9292 {
9393 ActiveTextureManagement . DBGLog ( "Loading from cache... " + textureName ) ;
9494 Texture . needsResize = false ;
9595 Texture . width = Texture . resizeWidth ;
9696 Texture . height = Texture . resizeHeight ;
97- Texture . readable = ! makeNotReadable ;
9897 Texture . filename = cacheFile ;
9998
10099 return TextureConverter . DDSToTexture ( Texture , hasMipmaps , isCompressed , hasAlpha ) ; ;
101100 }
102101 }
103102 else
104103 {
105- return RebuildCache ( Texture , compress , mipmaps , makeNotReadable ) ;
104+ return RebuildCache ( Texture , compress , mipmaps ) ;
106105 }
107106 }
108107 else
109108 {
110- return RebuildCache ( Texture , compress , mipmaps , makeNotReadable ) ;
109+ return RebuildCache ( Texture , compress , mipmaps ) ;
111110 }
112111
113112 }
114113
115- private static TextureInfoWrapper RebuildCache ( TexInfo Texture , bool compress , bool mipmaps , bool makeNotReadable )
114+ private static TextureInfoWrapper RebuildCache ( TexInfo Texture , bool compress , bool mipmaps )
116115 {
117116 Texture . loadOriginalFirst = true ;
118117 ActiveTextureManagement . DBGLog ( "Loading texture..." ) ;
@@ -158,9 +157,9 @@ private static TextureInfoWrapper RebuildCache(TexInfo Texture, bool compress, b
158157 tex . Compress ( true ) ;
159158 }
160159 cacheTexture . isCompressed = compress ;
161- tex . Apply ( false , makeNotReadable ) ;
160+ tex . Apply ( false , Texture . makeNotReadable ) ;
162161
163- cacheTexture . isReadable = ! makeNotReadable ;
162+ cacheTexture . isReadable = ! Texture . makeNotReadable ;
164163
165164 return cacheTexture ;
166165 }
0 commit comments