Commit 592eaf86 authored by mercury233's avatar mercury233

fix texture loadedList

parent ab7b6822
...@@ -381,6 +381,10 @@ public class GameTextureManager ...@@ -381,6 +381,10 @@ public class GameTextureManager
private static void ProcessingCardFeature(PictureResource pic) private static void ProcessingCardFeature(PictureResource pic)
{ {
if (loadedList.ContainsKey(hashPic(pic.code, pic.type)))
{
return;
}
bool EightEdition = false; bool EightEdition = false;
BitmapHelper bitmap = getCloseup(pic); BitmapHelper bitmap = getCloseup(pic);
if (bitmap != null) if (bitmap != null)
...@@ -414,10 +418,7 @@ public class GameTextureManager ...@@ -414,10 +418,7 @@ public class GameTextureManager
} }
caculateK(pic); caculateK(pic);
if (!loadedList.ContainsKey(hashPic(pic.code, pic.type))) loadedList.Add(hashPic(pic.code, pic.type), pic);
{
loadedList.Add(hashPic(pic.code, pic.type), pic);
}
} }
else else
{ {
...@@ -435,10 +436,7 @@ public class GameTextureManager ...@@ -435,10 +436,7 @@ public class GameTextureManager
pic.hashed_data[w, h, 3] = 0; pic.hashed_data[w, h, 3] = 0;
} }
} }
if (!loadedList.ContainsKey(hashPic(pic.code, pic.type))) loadedList.Add(hashPic(pic.code, pic.type), pic);
{
loadedList.Add(hashPic(pic.code, pic.type), pic);
}
} }
else else
{ {
...@@ -472,10 +470,7 @@ public class GameTextureManager ...@@ -472,10 +470,7 @@ public class GameTextureManager
pic.hashed_data[w, h, 3] = a * 0.7f; pic.hashed_data[w, h, 3] = a * 0.7f;
} }
} }
if (!loadedList.ContainsKey(hashPic(pic.code, pic.type))) loadedList.Add(hashPic(pic.code, pic.type), pic);
{
loadedList.Add(hashPic(pic.code, pic.type), pic);
}
} }
} }
} }
...@@ -670,6 +665,10 @@ public class GameTextureManager ...@@ -670,6 +665,10 @@ public class GameTextureManager
private static void ProcessingVerticleDrawing(PictureResource pic) private static void ProcessingVerticleDrawing(PictureResource pic)
{ {
if (loadedList.ContainsKey(hashPic(pic.code, pic.type)))
{
return;
}
var bitmap = getCloseup(pic); var bitmap = getCloseup(pic);
if (bitmap == null) if (bitmap == null)
{ {
...@@ -740,10 +739,7 @@ public class GameTextureManager ...@@ -740,10 +739,7 @@ public class GameTextureManager
caculateK(pic); caculateK(pic);
} }
if (!loadedList.ContainsKey(hashPic(pic.code, pic.type))) loadedList.Add(hashPic(pic.code, pic.type), pic);
{
loadedList.Add(hashPic(pic.code, pic.type), pic);
}
} }
private static void softVtype(PictureResource pic, float si) private static void softVtype(PictureResource pic, float si)
...@@ -798,15 +794,17 @@ public class GameTextureManager ...@@ -798,15 +794,17 @@ public class GameTextureManager
private static void ProcessingCardPicture(PictureResource pic) private static void ProcessingCardPicture(PictureResource pic)
{ {
if (loadedList.ContainsKey(hashPic(pic.code, pic.type)))
{
return;
}
bool EightEdition; bool EightEdition;
var data = getPicture(pic, out EightEdition); var data = getPicture(pic, out EightEdition);
if (data.Length > 0) if (data.Length > 0)
{ {
pic.data = data; pic.data = data;
if (!loadedList.ContainsKey(hashPic(pic.code, pic.type))) loadedList.Add(hashPic(pic.code, pic.type), pic);
{
loadedList.Add(hashPic(pic.code, pic.type), pic);
}
} }
else else
{ {
...@@ -818,10 +816,7 @@ public class GameTextureManager ...@@ -818,10 +816,7 @@ public class GameTextureManager
{ {
pic.u_data = myBack; pic.u_data = myBack;
} }
if (!loadedList.ContainsKey(hashPic(pic.code, pic.type))) loadedList.Add(hashPic(pic.code, pic.type), pic);
{
loadedList.Add(hashPic(pic.code, pic.type), pic);
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment