Support for KLD and AER

Kaladesh & Aether Revolt
This commit is contained in:
Anthony Calosa
2017-01-18 22:13:51 +08:00
parent d86b9119a4
commit d03ebdace8
14 changed files with 306 additions and 20 deletions

View File

@@ -31,6 +31,7 @@ void GuiAvatar::Render()
JRenderer * r = JRenderer::GetInstance();
int life = player->life;
int poisonCount = player->poisonCount;
int energyCount = player->energyCount;
WFont * mFont = WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT);
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
//Avatar
@@ -108,10 +109,10 @@ void GuiAvatar::Render()
{
case TOP_LEFT:
mFont->SetColor(ARGB((int)actA / 4, 0, 0, 0));
mFont->DrawString(buffer, actX + 2, actY + 2);
mFont->DrawString(buffer, actX + 2, actY - 2);
mFont->SetScale(1.3f);
mFont->SetColor(ARGB((int)actA, lx, ly, lz));
mFont->DrawString(buffer, actX + 1, actY + 1);
mFont->DrawString(buffer, actX + 1, actY - 1);
mFont->SetScale(1);
break;
case BOTTOM_RIGHT:
@@ -122,8 +123,8 @@ void GuiAvatar::Render()
break;
}
//poison
char poison[5];
if (poisonCount > 0)
char poison[10];
if (poisonCount >= 0)
{
sprintf(poison, "%i", poisonCount);
switch (corner)
@@ -138,6 +139,23 @@ void GuiAvatar::Render()
break;
}
}
//energy
char energy[15];
if (energyCount >= 0)
{
sprintf(energy, "%i", energyCount);
switch (corner)
{
case TOP_LEFT:
mFont->SetColor(ARGB((int)actA / 1, 255, 255, 0));
mFont->DrawString(energy, actX + 2, actY + 17);
break;
case BOTTOM_RIGHT:
mFont->SetColor(ARGB((int)actA / 1 ,255, 255, 0));
mFont->DrawString(energy, actX, actY - 27, JGETEXT_RIGHT);
break;
}
}
PlayGuiObject::Render();
}