From 71183d23b691570efc6345825719a283aaadcd8c Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Sun, 6 May 2012 09:14:45 +0000 Subject: [PATCH] cosmetic bug fix issue854 adjusted the calculation of x for enstack attackers to avoid drawing cards on top of the phase wheel out outside of the red box. adjusted the red box length for uniformity. the previous calculation only drew cards to the middle of the screen and after about 15 attackers it pushed cards out of the red box, over on top of the phase wheel making it impossible to click or touch requiring alternative methods to advance to damage phase or reduction of the amount of attackers. the new calculation draws attackers at the start of the red box keeping the enstack a cardwidth and a half from the edge of the screen on both sides instead instacking massive amounts of attackers tighter inside the red box, much how we handle battlefield enstack...attacking with more then 40 creatures no longer pushes attackers off screen. --- projects/mtg/src/GuiPlay.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/mtg/src/GuiPlay.cpp b/projects/mtg/src/GuiPlay.cpp index 28f0518a0..ffd00a833 100644 --- a/projects/mtg/src/GuiPlay.cpp +++ b/projects/mtg/src/GuiPlay.cpp @@ -122,7 +122,7 @@ void GuiPlay::BattleField::reset(float x, float y) } void GuiPlay::BattleField::EnstackAttacker(CardView* card) { - card->x = currentAttacker * (HORZWIDTH - 20) / (attackers + 1); + card->x = CARD_WIDTH + 20 + (currentAttacker * (HORZWIDTH) / (attackers+1)); card->y = baseY + (card->card->getObserver()->players[0] == card->card->controller() ? 20 + y : -20 - y); ++currentAttacker; // JRenderer::GetInstance()->RenderQuad(WResourceManager::Instance()->GetQuad("BattleIcon"), card->actX, card->actY, 0, 0.5 + 0.1 * sinf(JGE::GetInstance()->GetTime()), 0.5 + 0.1 * sinf(JGE::GetInstance()->GetTime())); @@ -159,7 +159,7 @@ void GuiPlay::BattleField::Update(float dt) void GuiPlay::BattleField::Render() { if (height > 3) - JRenderer::GetInstance()->FillRect(22, SCREEN_HEIGHT / 2 + 10 - height / 2, 250, height, ARGB(127, red, 0, 0)); + JRenderer::GetInstance()->FillRect(44, SCREEN_HEIGHT / 2 + 10 - height / 2, 318, height, ARGB(127, red, 0, 0)); } GuiPlay::GuiPlay(GameObserver* game) :