@@ -274,28 +274,44 @@ void Damage::Render()
|
|||||||
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
|
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
|
||||||
char buffer[200];
|
char buffer[200];
|
||||||
sprintf(buffer, _("Deals %i damage to").c_str(), damage);
|
sprintf(buffer, _("Deals %i damage to").c_str(), damage);
|
||||||
mFont->DrawString(buffer, x + 20, y, JGETEXT_LEFT);
|
//mFont->DrawString(buffer, x + 20, y, JGETEXT_LEFT);
|
||||||
|
mFont->DrawString(buffer, x + 32, y + GetVerticalTextOffset(), JGETEXT_LEFT);
|
||||||
JRenderer * renderer = JRenderer::GetInstance();
|
JRenderer * renderer = JRenderer::GetInstance();
|
||||||
JQuadPtr quad = WResourceManager::Instance()->RetrieveCard(source, CACHE_THUMB);
|
JQuadPtr quad = WResourceManager::Instance()->RetrieveCard(source, CACHE_THUMB);
|
||||||
if (quad.get())
|
if (quad.get())
|
||||||
{
|
{
|
||||||
float scale = 30 / quad->mHeight;
|
//float scale = 30 / quad->mHeight;
|
||||||
renderer->RenderQuad(quad.get(), x, y, 0, scale, scale);
|
//renderer->RenderQuad(quad.get(), x, y, 0, scale, scale);
|
||||||
|
quad->SetColor(ARGB(255,255,255,255));
|
||||||
|
float scale = mHeight / quad->mHeight;
|
||||||
|
renderer->RenderQuad(quad.get(), x + (quad->mWidth * scale / 2), y + (quad->mHeight * scale / 2), 0, scale, scale);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mFont->DrawString(_(source->getName()).c_str(), x, y - 15);
|
//mFont->DrawString(_(source->getName()).c_str(), x, y - 15);
|
||||||
|
mFont->DrawString(_(source->getName()).c_str(), x, y + GetVerticalTextOffset() - 15);
|
||||||
}
|
}
|
||||||
quad = target->getIcon();
|
quad = target->getIcon();
|
||||||
if (quad.get())
|
if (quad.get())
|
||||||
{
|
{
|
||||||
float scale = 30 / quad->mHeight;
|
//float scale = 30 / quad->mHeight;
|
||||||
renderer->RenderQuad(quad.get(), x + 150, y, 0, scale, scale);
|
//renderer->RenderQuad(quad.get(), x + 150, y, 0, scale, scale);
|
||||||
|
float backupX = quad->mHotSpotX;
|
||||||
|
float backupY = quad->mHotSpotY;
|
||||||
|
quad->SetColor(ARGB(255,255,255,255));
|
||||||
|
quad->SetHotSpot(quad->mWidth / 2, quad->mHeight / 2);
|
||||||
|
float scale = mHeight / quad->mHeight;
|
||||||
|
renderer->RenderQuad(quad.get(), x + 130, y - 0.5f + ((mHeight - quad->mHeight) / 2) + quad->mHotSpotY, 0, scale, scale);
|
||||||
|
quad->SetHotSpot(backupX, backupY);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
//if (target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE)
|
||||||
|
//mFont->DrawString(_(((MTGCardInstance *) target)->getName()).c_str(), x + 120, y);
|
||||||
if (target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE)
|
if (target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE)
|
||||||
mFont->DrawString(_(((MTGCardInstance *) target)->getName()).c_str(), x + 120, y);
|
mFont->DrawString(_(((MTGCardInstance *) target)->getName()).c_str(), x + 35, y+15 + GetVerticalTextOffset());
|
||||||
|
else if(target->type_as_damageable == Damageable::DAMAGEABLE_PLAYER)
|
||||||
|
mFont->DrawString(_(((Player *) target)->getDisplayName()).c_str(), x + 35, y+15 + GetVerticalTextOffset());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -639,18 +639,18 @@ void GameObserver::gameStateBasedEffects()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///while checking all these zones, lets also strip devoid cards of thier colors
|
///while checking all these zones, lets also strip devoid cards of thier colors
|
||||||
for (int w = 0; w < zone->nb_cards; w++)
|
for (int w = 0; w < zone->nb_cards; w++)
|
||||||
{
|
{
|
||||||
MTGCardInstance * card = zone->cards[w];
|
MTGCardInstance * card = zone->cards[w];
|
||||||
for (int i = Constants::MTG_COLOR_GREEN; i <= Constants::MTG_COLOR_WHITE; ++i)
|
for (int i = Constants::MTG_COLOR_GREEN; i <= Constants::MTG_COLOR_WHITE; ++i)
|
||||||
{
|
{
|
||||||
if (card->has(Constants::DEVOID))
|
if (card->has(Constants::DEVOID))
|
||||||
{
|
{
|
||||||
card->removeColor(i);
|
card->removeColor(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}//check for losers if its GAMEOVER clear the stack to allow gamestateeffects to continue
|
}//check for losers if its GAMEOVER clear the stack to allow gamestateeffects to continue
|
||||||
|
|||||||
Reference in New Issue
Block a user