Jeck - Added theme substyles, which are chosen dynamically based on the player's deck composition. Also added lazy unit test for booster packs, though there should be a better way to framework this.

This commit is contained in:
wagic.jeck
2010-08-28 10:51:38 +00:00
parent 3ad28096b1
commit 8114944db9
46 changed files with 415 additions and 26 deletions

View File

@@ -27,22 +27,13 @@ HandLimitor::HandLimitor(GuiHand* hand) : hand(hand) {}
GuiHand::GuiHand(CardSelector* cs, MTGHand* hand) : GuiLayer(), hand(hand), cs(cs)
{
JTexture* texture = resources.GetTexture("handback.png");
if (texture)
{
back = NEW JQuad(texture, 0, 0, 101, 250);
back->SetTextureRect(1, 0, 100, 250);
}
else
{
back = NULL;
GameApp::systemError = "Error loading hand texture : " __FILE__;
}
back = resources.RetrieveTempQuad("handback.png");
if(back) back->SetTextureRect(1, 0, 100, 250);
else GameApp::systemError = "Error loading hand texture : " __FILE__;
}
GuiHand::~GuiHand()
{
delete(back);
for (vector<CardView*>::iterator it = cards.begin(); it != cards.end(); ++it)
delete(*it);
}