increase battlefield "hot area" size, opponent phase ring uses darker glyph vs human
This commit is contained in:
@@ -22,7 +22,7 @@ private:
|
||||
InOutQuadEasing zoomFactorEasing;
|
||||
DuelLayers* mpDuelLayers;
|
||||
|
||||
void DrawGlyph(JQuad *inQuad, int phaseId, float x, float y, float scale);
|
||||
void DrawGlyph(JQuad *inQuad, int phaseId, float x, float y, float scale, float z);
|
||||
public:
|
||||
GuiPhaseBar(DuelLayers* duelLayers);
|
||||
~GuiPhaseBar();
|
||||
|
||||
@@ -11,7 +11,7 @@ GuiFrame::GuiFrame(GameObserver* observer)
|
||||
if (observer->getResourceManager()->GetTexture("wood.png"))
|
||||
{
|
||||
wood = observer->getResourceManager()->RetrieveQuad("wood.png", 0, 0, 0, 0);
|
||||
wood->mHeight =32.f;
|
||||
wood->mHeight = 32.f;
|
||||
wood->mWidth = 480.f;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -36,9 +36,9 @@ namespace
|
||||
const unsigned kPhases = NB_MTG_PHASES - 2; //there are two phases we do not show
|
||||
}
|
||||
|
||||
void GuiPhaseBar::DrawGlyph(JQuad *inQuad, int phaseId, float x, float y, float scale)
|
||||
void GuiPhaseBar::DrawGlyph(JQuad *inQuad, int phaseId, float x, float y, float scale, float z)
|
||||
{
|
||||
inQuad->SetTextureRect(phaseId * (kWidth + 1), 0, kWidth, kHeight);
|
||||
inQuad->SetTextureRect(phaseId * (kWidth + 1), z, kWidth, kHeight);
|
||||
JRenderer::GetInstance()->RenderQuad(inQuad, x, y - scale * kWidth/2, 0.0f, scale, scale);
|
||||
}
|
||||
|
||||
@@ -110,7 +110,10 @@ void GuiPhaseBar::Render()
|
||||
//hint: sin(circPos + PI/2) = cos(circPos)
|
||||
const float glyphScale = float(zoomFactor * cosf(circPos) * 0.5f);
|
||||
|
||||
DrawGlyph(quad.get(), (displayedPhaseId - 2 + i + kPhases) % kPhases, 0, glyphY, glyphScale);
|
||||
if (observer->currentPlayer && observer->currentPlayer->isAI() && !observer->currentPlayer->opponent()->isAI())
|
||||
DrawGlyph(quad.get(), (displayedPhaseId - 2 + i + kPhases) % kPhases, 0, glyphY, glyphScale, 29);
|
||||
else
|
||||
DrawGlyph(quad.get(), (displayedPhaseId - 2 + i + kPhases) % kPhases, 0, glyphY, glyphScale, 0);
|
||||
}
|
||||
|
||||
//print phase name
|
||||
|
||||
@@ -106,7 +106,7 @@ GuiPlay::BattleField::BattleField() :
|
||||
attackers(0), height(0.0), red(0), colorFlow(0)
|
||||
{
|
||||
}
|
||||
const float GuiPlay::BattleField::HEIGHT = 80.0f;
|
||||
const float GuiPlay::BattleField::HEIGHT = 146.0f;
|
||||
void GuiPlay::BattleField::addAttacker(MTGCardInstance*)
|
||||
{
|
||||
++attackers;
|
||||
@@ -160,7 +160,10 @@ void GuiPlay::BattleField::Update(float dt)
|
||||
void GuiPlay::BattleField::Render()
|
||||
{
|
||||
if (height > 3)
|
||||
JRenderer::GetInstance()->FillRect(44, SCREEN_HEIGHT / 2 + 10 - height / 2, 318, height, ARGB(127, red, 0, 0));
|
||||
JRenderer::GetInstance()->FillRect(0, SCREEN_HEIGHT / 2 + 10 - height / 2, 480, height, ARGB(127, red, 0, 0));
|
||||
//JQuadPtr fillblack = WResourceManager::Instance()->RetrieveTempQuad("fillblack.png", TEXTURE_SUB_5551);
|
||||
//if (fillblack.get() && height > 3)//mask
|
||||
//JRenderer::GetInstance()->RenderQuad(fillblack.get(), 0, 70.f, 0, 0.5f, 0.5f);
|
||||
}
|
||||
|
||||
GuiPlay::GuiPlay(DuelLayers* view) :
|
||||
|
||||
Reference in New Issue
Block a user