-moved card backs to Cache instead of ResourceManager
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-08-30 08:11:38 +00:00
parent 5afd1a45a2
commit 89419f90a7
7 changed files with 108 additions and 122 deletions
+2 -11
View File
@@ -71,17 +71,8 @@ ShopItem::ShopItem(int id, JLBFont *font, int _cardid, float _xy[], bool hasFocu
thumb = cache.getThumb(card);
if (!thumb){
switch(card->getColor())
{
case Constants::MTG_COLOR_GREEN: thumb = GameApp::CommonRes->GetQuad("green_thumb"); break;
case Constants::MTG_COLOR_BLUE : thumb = GameApp::CommonRes->GetQuad("blue_thumb"); break;
case Constants::MTG_COLOR_RED : thumb = GameApp::CommonRes->GetQuad("red_thumb"); break;
case Constants::MTG_COLOR_BLACK: thumb = GameApp::CommonRes->GetQuad("black_thumb"); break;
case Constants::MTG_COLOR_WHITE: thumb = GameApp::CommonRes->GetQuad("white_thumb"); break;
default: thumb = GameApp::CommonRes->GetQuad("black_thumb"); break;
}
}
if (!thumb) thumb = CardGui::alternateThumbQuad(card);
if (thumb){
mesh=NEW hgeDistortionMesh(2,2);
mesh->SetTexture(thumb->mTex);