Commit 592eaf86 authored by mercury233's avatar mercury233

fix texture loadedList

parent ab7b6822
......@@ -381,6 +381,10 @@ public class GameTextureManager
private static void ProcessingCardFeature(PictureResource pic)
{
if (loadedList.ContainsKey(hashPic(pic.code, pic.type)))
{
return;
}
bool EightEdition = false;
BitmapHelper bitmap = getCloseup(pic);
if (bitmap != null)
......@@ -414,11 +418,8 @@ public class GameTextureManager
}
caculateK(pic);
if (!loadedList.ContainsKey(hashPic(pic.code, pic.type)))
{
loadedList.Add(hashPic(pic.code, pic.type), pic);
}
}
else
{
var data = getPicture(pic, out EightEdition);
......@@ -435,11 +436,8 @@ public class GameTextureManager
pic.hashed_data[w, h, 3] = 0;
}
}
if (!loadedList.ContainsKey(hashPic(pic.code, pic.type)))
{
loadedList.Add(hashPic(pic.code, pic.type), pic);
}
}
else
{
MemoryStream stream = new MemoryStream(data);
......@@ -472,13 +470,10 @@ public class GameTextureManager
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);
}
}
}
}
private static void caculateK(PictureResource pic)
{
......@@ -670,6 +665,10 @@ public class GameTextureManager
private static void ProcessingVerticleDrawing(PictureResource pic)
{
if (loadedList.ContainsKey(hashPic(pic.code, pic.type)))
{
return;
}
var bitmap = getCloseup(pic);
if (bitmap == null)
{
......@@ -740,11 +739,8 @@ public class GameTextureManager
caculateK(pic);
}
if (!loadedList.ContainsKey(hashPic(pic.code, pic.type)))
{
loadedList.Add(hashPic(pic.code, pic.type), pic);
}
}
private static void softVtype(PictureResource pic, float si)
{
......@@ -798,16 +794,18 @@ public class GameTextureManager
private static void ProcessingCardPicture(PictureResource pic)
{
if (loadedList.ContainsKey(hashPic(pic.code, pic.type)))
{
return;
}
bool EightEdition;
var data = getPicture(pic, out EightEdition);
if (data.Length > 0)
{
pic.data = data;
if (!loadedList.ContainsKey(hashPic(pic.code, pic.type)))
{
loadedList.Add(hashPic(pic.code, pic.type), pic);
}
}
else
{
if (pic.code > 0)
......@@ -818,12 +816,9 @@ public class GameTextureManager
{
pic.u_data = myBack;
}
if (!loadedList.ContainsKey(hashPic(pic.code, pic.type)))
{
loadedList.Add(hashPic(pic.code, pic.type), pic);
}
}
}
private static UInt64 hashPic(long code, GameTextureType type)
{
......
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