Fixed the crash I just introduced when buying boosters.

This commit is contained in:
wrenczes
2010-11-15 16:32:48 +00:00
parent 1317eb0d29
commit b0c826ca01
+3 -1
View File
@@ -217,13 +217,15 @@ void CardDisplay::Render(){
mObjects[mCurr]->Render(); mObjects[mCurr]->Render();
CardGui * cardg = ((CardGui *)mObjects[mCurr]); CardGui * cardg = ((CardGui *)mObjects[mCurr]);
Pos pos = Pos(CardGui::BigWidth / 2, CardGui::BigHeight / 2 - 10, 1.0, 0.0, 220); Pos pos = Pos(CardGui::BigWidth / 2, CardGui::BigHeight / 2 - 10, 1.0, 0.0, 220);
int drawMode = DrawMode::kNormal;
if (game) if (game)
{ {
pos.actY = 150; pos.actY = 150;
if (x < (CardGui::BigWidth / 2)) pos.actX = SCREEN_WIDTH - 10 - CardGui::BigWidth / 2; if (x < (CardGui::BigWidth / 2)) pos.actX = SCREEN_WIDTH - 10 - CardGui::BigWidth / 2;
drawMode = CardSelectorSingleton::Instance()->GetDrawMode();
} }
cardg->DrawCard(pos, CardSelectorSingleton::Instance()->GetDrawMode()); cardg->DrawCard(pos, drawMode);
} }
} }