Binary file not shown.
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 19 KiB |
@@ -0,0 +1,39 @@
|
|||||||
|
#Tireless Tracker counters vs Graf Mole opponents
|
||||||
|
[INIT]
|
||||||
|
FIRSTMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
inplay:Concordant Crossroads, Swamp, Tireless Tracker, Mortician Beetle
|
||||||
|
library:Mountain
|
||||||
|
hand:Plains
|
||||||
|
[PLAYER2]
|
||||||
|
inplay:Graf Mole
|
||||||
|
[DO]
|
||||||
|
Plains
|
||||||
|
Swamp
|
||||||
|
Plains
|
||||||
|
Clue
|
||||||
|
#Tireless Tracker gets a counter
|
||||||
|
#Mortician sacrificed event must not trigger
|
||||||
|
#Graf Mole in opponents must not trigger and his life must not change
|
||||||
|
#begins
|
||||||
|
next
|
||||||
|
#attack
|
||||||
|
next
|
||||||
|
Tireless Tracker
|
||||||
|
Mortician Beetle
|
||||||
|
next
|
||||||
|
#damage
|
||||||
|
next
|
||||||
|
#end
|
||||||
|
eot
|
||||||
|
#untap
|
||||||
|
[ASSERT]
|
||||||
|
UNTAP
|
||||||
|
[PLAYER1]
|
||||||
|
inplay:Concordant Crossroads, Swamp, Tireless Tracker, Plains, Mortician Beetle
|
||||||
|
hand:Mountain
|
||||||
|
life:20
|
||||||
|
[PLAYER2]
|
||||||
|
inplay:Graf Mole
|
||||||
|
life:15
|
||||||
|
[END]
|
||||||
@@ -683,6 +683,7 @@ tidal_warrior_i649.txt
|
|||||||
tidal_warrior_i652.txt
|
tidal_warrior_i652.txt
|
||||||
Timely_Reinforcements.txt
|
Timely_Reinforcements.txt
|
||||||
TirelessTracker.txt
|
TirelessTracker.txt
|
||||||
|
TirelessGraf.txt
|
||||||
titanic_ultimatum.txt
|
titanic_ultimatum.txt
|
||||||
tokenizer.txt
|
tokenizer.txt
|
||||||
tokenizer2.txt
|
tokenizer2.txt
|
||||||
|
|||||||
@@ -1372,7 +1372,7 @@ public:
|
|||||||
if (!e) return 0;
|
if (!e) return 0;
|
||||||
MTGCardInstance * check = e->cardAfter;
|
MTGCardInstance * check = e->cardAfter;
|
||||||
MTGGameZone * oldZone = e->cardAfter->currentZone;
|
MTGGameZone * oldZone = e->cardAfter->currentZone;
|
||||||
MTGGameZone * currZone = check->currentZone;
|
//MTGGameZone * currZone = check->currentZone;
|
||||||
check->currentZone = check->previousZone;
|
check->currentZone = check->previousZone;
|
||||||
if (check->next && (check->next->currentZone|| check->isToken))
|
if (check->next && (check->next->currentZone|| check->isToken))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ protected:
|
|||||||
/*
|
/*
|
||||||
** Tries to render the Big version of a card picture, backups to text version in case of failure
|
** Tries to render the Big version of a card picture, backups to text version in case of failure
|
||||||
*/
|
*/
|
||||||
static void RenderBig(MTGCard * card, const Pos& pos, bool thumb = false, bool noborder = false);
|
static void RenderBig(MTGCard * card, const Pos& pos, bool thumb = false, bool noborder = false, bool smallerscale = false);
|
||||||
|
|
||||||
static void RenderCountersBig(MTGCard * card, const Pos& pos, int drawMode = DrawMode::kNormal);
|
static void RenderCountersBig(MTGCard * card, const Pos& pos, int drawMode = DrawMode::kNormal);
|
||||||
static void AlternateRender(MTGCard * card, const Pos& pos);
|
static void AlternateRender(MTGCard * card, const Pos& pos);
|
||||||
@@ -55,9 +55,9 @@ public:
|
|||||||
virtual void Render();
|
virtual void Render();
|
||||||
virtual void Update(float dt);
|
virtual void Update(float dt);
|
||||||
|
|
||||||
void DrawCard(const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false);
|
void DrawCard(const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false, bool smallscale = false);
|
||||||
static void DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false);
|
static void DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false, bool smallscale = false);
|
||||||
|
static void DrawBorder(string setname, const Pos& inPosition, float x, bool noborder = false, bool smallscale = false);
|
||||||
static JQuadPtr AlternateThumbQuad(MTGCard * card);
|
static JQuadPtr AlternateThumbQuad(MTGCard * card);
|
||||||
virtual ostream& toString(ostream&) const;
|
virtual ostream& toString(ostream&) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ public:
|
|||||||
bool exileEffects;
|
bool exileEffects;
|
||||||
bool suspended;
|
bool suspended;
|
||||||
bool miracle;
|
bool miracle;
|
||||||
|
bool hasCopiedToken;
|
||||||
bool isBestowed;
|
bool isBestowed;
|
||||||
int chooseacolor;
|
int chooseacolor;
|
||||||
string chooseasubtype;
|
string chooseasubtype;
|
||||||
|
|||||||
@@ -130,25 +130,9 @@ void Interruptible::Render(MTGCardInstance * source, JQuad * targetQuad, string
|
|||||||
|
|
||||||
if (bigQuad)
|
if (bigQuad)
|
||||||
{
|
{
|
||||||
//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, 0.90f, 0.0, 220);
|
||||||
Pos npos = Pos(CardGui::BigWidth / 2 + 8.f, CardGui::BigHeight / 2 - 2.f, 1.0f - (1.0f/10), 0.0, 220);
|
pos.actY = 142;//adjust y a little bit
|
||||||
//border
|
CardGui::DrawCard(source, pos, observer->getCardSelector()->GetDrawMode());
|
||||||
if(observer->getCardSelector()->GetDrawMode() < 2)
|
|
||||||
{
|
|
||||||
string cardsetname = setlist[source->setId].c_str();
|
|
||||||
if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM")
|
|
||||||
{
|
|
||||||
JRenderer::GetInstance()->FillRoundRect((npos.actX - (npos.actZ * 84.f))-11.5f,(npos.actY - (npos.actZ * 119.7f))-14.f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,8.f,ARGB(255,248,248,255));
|
|
||||||
JRenderer::GetInstance()->DrawRoundRect((npos.actX - (npos.actZ * 84.f))-11.5f,(npos.actY - (npos.actZ * 119.7f))-14.f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,8.f,ARGB(150,20,20,20));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
JRenderer::GetInstance()->FillRoundRect((npos.actX - (npos.actZ * 84.f))-11.5f,(npos.actY - (npos.actZ * 119.7f))-14.f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,8.f,ARGB(255,5,5,5));
|
|
||||||
JRenderer::GetInstance()->DrawRoundRect((npos.actX - (npos.actZ * 84.f))-11.5f,(npos.actY - (npos.actZ * 119.7f))-14.f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,8.f,ARGB(50,240,240,240));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//render card
|
|
||||||
CardGui::DrawCard(source, npos, observer->getCardSelector()->GetDrawMode(),false,true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (targetQuad)
|
if (targetQuad)
|
||||||
|
|||||||
@@ -1466,18 +1466,23 @@ AACopier::AACopier(GameObserver* observer, int _id, MTGCardInstance * _source, M
|
|||||||
|
|
||||||
int AACopier::resolve()
|
int AACopier::resolve()
|
||||||
{
|
{
|
||||||
|
bool tokencopied = false;
|
||||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||||
if (_target)
|
if (_target)
|
||||||
{
|
{
|
||||||
MTGCard* clone ;
|
MTGCard* clone ;
|
||||||
if(_target->isToken || _target->isACopier)
|
if(_target->isToken || (_target->isACopier && _target->hasCopiedToken))
|
||||||
|
{
|
||||||
clone = _target;
|
clone = _target;
|
||||||
|
tokencopied = true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
clone = MTGCollection()->getCardById(_target->copiedID);
|
clone = MTGCollection()->getCardById(_target->copiedID);
|
||||||
MTGCardInstance * myClone = NEW MTGCardInstance(clone, source->controller()->game);
|
MTGCardInstance * myClone = NEW MTGCardInstance(clone, source->controller()->game);
|
||||||
source->copy(myClone);
|
source->copy(myClone);
|
||||||
SAFE_DELETE(myClone);
|
SAFE_DELETE(myClone);
|
||||||
source->isACopier = true;
|
source->isACopier = true;
|
||||||
|
source->hasCopiedToken = tokencopied;
|
||||||
source->copiedID = _target->copiedID;
|
source->copiedID = _target->copiedID;
|
||||||
if(_target->isMorphed)
|
if(_target->isMorphed)
|
||||||
{
|
{
|
||||||
@@ -3880,8 +3885,8 @@ int AACloner::resolve()
|
|||||||
// Use id of the card to have the same image as the original
|
// Use id of the card to have the same image as the original
|
||||||
MTGCard* clone = (_target->isToken ? _target: MTGCollection()->getCardById(_target->getId()));
|
MTGCard* clone = (_target->isToken ? _target: MTGCollection()->getCardById(_target->getId()));
|
||||||
|
|
||||||
// If its a copier then copy what it is
|
// If its a copier and copied a token then copy what it is
|
||||||
if(_target->isACopier)
|
if(_target->isACopier && _target->hasCopiedToken)
|
||||||
clone = _target;
|
clone = _target;
|
||||||
|
|
||||||
Player * targetPlayer = who == 1 ? source->controller()->opponent() : source->controller();
|
Player * targetPlayer = who == 1 ? source->controller()->opponent() : source->controller();
|
||||||
|
|||||||
@@ -263,11 +263,11 @@ 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, 0.90f, 0.0, 220);
|
||||||
int drawMode = DrawMode::kNormal;
|
int drawMode = DrawMode::kNormal;//scale card display from 1.0f to 0.90f
|
||||||
if (observer)
|
if (observer)
|
||||||
{
|
{
|
||||||
pos.actY = 145;
|
pos.actY = 142;//reduce y a little
|
||||||
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 = observer->getCardSelector()->GetDrawMode();
|
drawMode = observer->getCardSelector()->GetDrawMode();
|
||||||
}
|
}
|
||||||
|
|||||||
+104
-80
@@ -111,17 +111,17 @@ void CardGui::Update(float dt)
|
|||||||
PlayGuiObject::Update(dt);
|
PlayGuiObject::Update(dt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CardGui::DrawCard(const Pos& inPosition, int inMode, bool thumb, bool noborder)
|
void CardGui::DrawCard(const Pos& inPosition, int inMode, bool thumb, bool noborder, bool smallerscale)
|
||||||
{
|
{
|
||||||
DrawCard(card, inPosition, inMode, thumb, noborder);
|
DrawCard(card, inPosition, inMode, thumb, noborder, smallerscale);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CardGui::DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode, bool thumb, bool noborder)
|
void CardGui::DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode, bool thumb, bool noborder, bool smallerscale)
|
||||||
{
|
{
|
||||||
switch (inMode)
|
switch (inMode)
|
||||||
{
|
{
|
||||||
case DrawMode::kNormal:
|
case DrawMode::kNormal:
|
||||||
RenderBig(inCard, inPosition, thumb, noborder);
|
RenderBig(inCard, inPosition, thumb, noborder, smallerscale);
|
||||||
break;
|
break;
|
||||||
case DrawMode::kText:
|
case DrawMode::kText:
|
||||||
AlternateRender(inCard, inPosition);
|
AlternateRender(inCard, inPosition);
|
||||||
@@ -157,9 +157,14 @@ void CardGui::Render()
|
|||||||
//I want the below for melded cards but I dont know how to adjust everything else
|
//I want the below for melded cards but I dont know how to adjust everything else
|
||||||
//to look neat and clean. leaving this here incase someone else wants to pretty up the p/t box
|
//to look neat and clean. leaving this here incase someone else wants to pretty up the p/t box
|
||||||
//and line up the position.
|
//and line up the position.
|
||||||
/* if (card->MeldedFrom.size())
|
float zz = 1.0f;
|
||||||
cardScale = cardScale + (10 / quad->mHeight);*/
|
float yy = 0.0f;
|
||||||
float scale = actZ * cardScale;
|
if (card->MeldedFrom.size())
|
||||||
|
{
|
||||||
|
zz = 1.15f;
|
||||||
|
yy = 2.0f;
|
||||||
|
}
|
||||||
|
float scale = (actZ*zz) * cardScale;
|
||||||
|
|
||||||
JQuadPtr shadow;
|
JQuadPtr shadow;
|
||||||
if (actZ > 1)
|
if (actZ > 1)
|
||||||
@@ -168,7 +173,7 @@ void CardGui::Render()
|
|||||||
if (shadow)
|
if (shadow)
|
||||||
{
|
{
|
||||||
shadow->SetColor(ARGB(static_cast<unsigned char>(actA)/2,255,255,255));
|
shadow->SetColor(ARGB(static_cast<unsigned char>(actA)/2,255,255,255));
|
||||||
renderer->RenderQuad(shadow.get(), actX + (actZ - 1) * 15, actY + (actZ - 1) * 15, actT, 28 * actZ / 16, 40 * actZ / 16);
|
renderer->RenderQuad(shadow.get(), actX + ((actZ*zz) - 1) * 15, (actY-yy) + ((actZ*zz) - 1) * 15, actT, 28 * (actZ*zz) / 16, 40 * (actZ*zz) / 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,7 +184,7 @@ void CardGui::Render()
|
|||||||
if (extracostshadow)
|
if (extracostshadow)
|
||||||
{
|
{
|
||||||
extracostshadow->SetColor(ARGB(static_cast<unsigned char>(actA)/2,100,0,0));
|
extracostshadow->SetColor(ARGB(static_cast<unsigned char>(actA)/2,100,0,0));
|
||||||
renderer->RenderQuad(extracostshadow.get(), actX + (actZ - 1) * 15, actY + (actZ - 1) * 15, actT, 28 * actZ / 16, 40 * actZ / 16);
|
renderer->RenderQuad(extracostshadow.get(), actX + ((actZ*zz) - 1) * 15, (actY-yy) + ((actZ*zz) - 1) * 15, actT, 28 * (actZ*zz) / 16, 40 * (actZ*zz) / 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,7 +213,7 @@ void CardGui::Render()
|
|||||||
if(white)
|
if(white)
|
||||||
{
|
{
|
||||||
white->SetColor(ARGB(255,230,50,50));
|
white->SetColor(ARGB(255,230,50,50));
|
||||||
renderer->RenderQuad(white.get(), actX, actY, actT, 30 * actZ / 16, 42 * actZ / 16);
|
renderer->RenderQuad(white.get(), actX, (actY-yy), actT, 30 * (actZ*zz) / 16, 42 * (actZ*zz) / 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,7 +240,7 @@ void CardGui::Render()
|
|||||||
if(white)
|
if(white)
|
||||||
{
|
{
|
||||||
white->SetColor(ARGB(255,0,0,255));
|
white->SetColor(ARGB(255,0,0,255));
|
||||||
renderer->RenderQuad(white.get(), actX, actY, actT, 30 * actZ / 16, 42 * actZ / 16);
|
renderer->RenderQuad(white.get(), actX, (actY-yy), actT, 30 * (actZ*zz) / 16, 42 * (actZ*zz) / 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -253,7 +258,7 @@ void CardGui::Render()
|
|||||||
fakeborder->SetColor(ARGB((int)(actA),7,235,7));//green border
|
fakeborder->SetColor(ARGB((int)(actA),7,235,7));//green border
|
||||||
else
|
else
|
||||||
fakeborder->SetColor(ARGB((int)(actA),15,15,15));
|
fakeborder->SetColor(ARGB((int)(actA),15,15,15));
|
||||||
renderer->RenderQuad(fakeborder.get(), actX, actY, actT, (29 * actZ + 1) / 16, 42 * actZ / 16);
|
renderer->RenderQuad(fakeborder.get(), actX, (actY-yy), actT, (29 * (actZ*zz) + 1) / 16, 42 * (actZ*zz) / 16);
|
||||||
}
|
}
|
||||||
//draw border for highlighting
|
//draw border for highlighting
|
||||||
if (game)
|
if (game)
|
||||||
@@ -261,26 +266,26 @@ void CardGui::Render()
|
|||||||
if (card && card->isTargetted() && highlightborder)
|
if (card && card->isTargetted() && highlightborder)
|
||||||
{
|
{
|
||||||
highlightborder->SetColor(ARGB(95,255,0,0));
|
highlightborder->SetColor(ARGB(95,255,0,0));
|
||||||
renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16);
|
renderer->RenderQuad(highlightborder.get(), actX, (actY-yy), actT, (30 * (actZ*zz) + 1) / 16, 43 * (actZ*zz) / 16);
|
||||||
}
|
}
|
||||||
if (card && card->isTargetter() && highlightborder)
|
if (card && card->isTargetter() && highlightborder)
|
||||||
{
|
{
|
||||||
highlightborder->SetColor(ARGB(95,0,245,0));
|
highlightborder->SetColor(ARGB(95,0,245,0));
|
||||||
renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16);
|
renderer->RenderQuad(highlightborder.get(), actX, (actY-yy), actT, (30 * (actZ*zz) + 1) / 16, 43 * (actZ*zz) / 16);
|
||||||
}
|
}
|
||||||
if(card->myPair && card->myPair->isInPlay(game) && highlightborder)
|
if(card->myPair && card->myPair->isInPlay(game) && highlightborder)
|
||||||
{
|
{
|
||||||
if(mHasFocus)
|
if(mHasFocus)
|
||||||
{
|
{
|
||||||
highlightborder->SetColor(ARGB(200,7,98,248));
|
highlightborder->SetColor(ARGB(200,7,98,248));
|
||||||
renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16);
|
renderer->RenderQuad(highlightborder.get(), actX, (actY-yy), actT, (30 * (actZ*zz) + 1) / 16, 43 * (actZ*zz) / 16);
|
||||||
}
|
}
|
||||||
if(CardView* cv = dynamic_cast<CardView*>(card->myPair->view))
|
if(CardView* cv = dynamic_cast<CardView*>(card->myPair->view))
|
||||||
{
|
{
|
||||||
if(cv->mHasFocus)
|
if(cv->mHasFocus)
|
||||||
{
|
{
|
||||||
highlightborder->SetColor(ARGB(200,57,28,248));
|
highlightborder->SetColor(ARGB(200,57,28,248));
|
||||||
renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16);
|
renderer->RenderQuad(highlightborder.get(), actX, (actY-yy), actT, (30 * (actZ*zz) + 1) / 16, 43 * (actZ*zz) / 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -293,7 +298,7 @@ void CardGui::Render()
|
|||||||
else
|
else
|
||||||
highlightborder->SetColor(ARGB(200,57,28,248));
|
highlightborder->SetColor(ARGB(200,57,28,248));
|
||||||
|
|
||||||
renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16);
|
renderer->RenderQuad(highlightborder.get(), actX, (actY-yy), actT, (30 * (actZ*zz) + 1) / 16, 43 * (actZ*zz) / 16);
|
||||||
}
|
}
|
||||||
if(CardView* cv = dynamic_cast<CardView*>(card->shackled->view))
|
if(CardView* cv = dynamic_cast<CardView*>(card->shackled->view))
|
||||||
{
|
{
|
||||||
@@ -304,20 +309,20 @@ void CardGui::Render()
|
|||||||
else
|
else
|
||||||
highlightborder->SetColor(ARGB(200,57,28,248));
|
highlightborder->SetColor(ARGB(200,57,28,248));
|
||||||
|
|
||||||
renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16);
|
renderer->RenderQuad(highlightborder.get(), actX, (actY-yy), actT, (30 * (actZ*zz) + 1) / 16, 43 * (actZ*zz) / 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//draw the card image
|
//draw the card image
|
||||||
renderer->RenderQuad(quad.get(), actX, actY, actT, scale, scale);
|
renderer->RenderQuad(quad.get(), actX, (actY-yy), actT, scale, scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (alternate)
|
if (alternate)
|
||||||
{
|
{
|
||||||
mFont->SetColor(ARGB(static_cast<unsigned char>(actA), 0, 0, 0));
|
mFont->SetColor(ARGB(static_cast<unsigned char>(actA), 0, 0, 0));
|
||||||
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE * 0.5f * actZ);
|
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE * 0.5f * (actZ*zz));
|
||||||
mFont->DrawString(_(card->getName()), actX - actZ * Width / 2 + 1, actY - actZ * Height / 2 + 1);
|
mFont->DrawString(_(card->getName()), actX - (actZ*zz) * Width / 2 + 1, (actY-yy) - (actZ*zz) * Height / 2 + 1);
|
||||||
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
|
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
|
||||||
|
|
||||||
JQuadPtr icon;
|
JQuadPtr icon;
|
||||||
@@ -334,7 +339,7 @@ void CardGui::Render()
|
|||||||
if (icon.get())
|
if (icon.get())
|
||||||
{
|
{
|
||||||
icon->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,255));
|
icon->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,255));
|
||||||
renderer->RenderQuad(icon.get(), actX, actY, actT);
|
renderer->RenderQuad(icon.get(), actX, (actY-yy), actT);
|
||||||
icon->SetColor(ARGB(255,255,255,255)); //Putting color back as this quad is shared
|
icon->SetColor(ARGB(255,255,255,255)); //Putting color back as this quad is shared
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -346,7 +351,7 @@ void CardGui::Render()
|
|||||||
if (mor && mor->mTex) {
|
if (mor && mor->mTex) {
|
||||||
mor->SetHotSpot(static_cast<float> (mor->mTex->mWidth / 2), static_cast<float> (mor->mTex->mHeight / 2));
|
mor->SetHotSpot(static_cast<float> (mor->mTex->mWidth / 2), static_cast<float> (mor->mTex->mHeight / 2));
|
||||||
mor->SetColor(ARGB(255,255,255,255));
|
mor->SetColor(ARGB(255,255,255,255));
|
||||||
renderer->RenderQuad(mor.get(), actX, actY, actT,scale, scale);
|
renderer->RenderQuad(mor.get(), actX, (actY-yy), actT,scale, scale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -358,24 +363,24 @@ void CardGui::Render()
|
|||||||
if(card->isTapped())
|
if(card->isTapped())
|
||||||
{
|
{
|
||||||
if(mHasFocus)
|
if(mHasFocus)
|
||||||
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-10,actY - (scale * quad->mHeight / 2)+6.5f, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,255,0,0));
|
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-10,(actY-yy) - (scale * quad->mHeight / 2)+6.5f, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,255,0,0));
|
||||||
else
|
else
|
||||||
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-8,actY - (scale * quad->mHeight / 2)+4, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,255,0,0));
|
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-8,(actY-yy) - (scale * quad->mHeight / 2)+4, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,255,0,0));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-2,actY - (scale * quad->mHeight / 2)-2, (scale * quad->mWidth)-0.02f, (scale * quad->mHeight)-0.02f, 1.8f,ARGB(250,255,0,0));
|
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-2,(actY-yy) - (scale * quad->mHeight / 2)-2, (scale * quad->mWidth)-0.02f, (scale * quad->mHeight)-0.02f, 1.8f,ARGB(250,255,0,0));
|
||||||
}
|
}
|
||||||
if (card && card->isTargetter())
|
if (card && card->isTargetter())
|
||||||
{
|
{
|
||||||
if(card->isTapped())
|
if(card->isTapped())
|
||||||
{
|
{
|
||||||
if(mHasFocus)
|
if(mHasFocus)
|
||||||
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-10,actY - (scale * quad->mHeight / 2)+6.5f, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,0,255,0));
|
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-10,(actY-yy) - (scale * quad->mHeight / 2)+6.5f, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,0,255,0));
|
||||||
else
|
else
|
||||||
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-8,actY - (scale * quad->mHeight / 2)+4, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,0,255,0));
|
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-8,(actY-yy) - (scale * quad->mHeight / 2)+4, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,0,255,0));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-2,actY - (scale * quad->mHeight / 2)-2, (scale * quad->mWidth)-0.02f, (scale * quad->mHeight)-0.02f, 1.8f,ARGB(250,0,255,0));
|
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-2,(actY-yy) - (scale * quad->mHeight / 2)-2, (scale * quad->mWidth)-0.02f, (scale * quad->mHeight)-0.02f, 1.8f,ARGB(250,0,255,0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -385,9 +390,9 @@ void CardGui::Render()
|
|||||||
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
|
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
|
||||||
char buffer[200];
|
char buffer[200];
|
||||||
sprintf(buffer, "%i/%i", card->power, card->life);
|
sprintf(buffer, "%i/%i", card->power, card->life);
|
||||||
renderer->FillRect(actX - (13 * actZ), actY + 4 * actZ, 25.5f * actZ, 14 * actZ,
|
renderer->FillRect(actX - (13 * (actZ*zz)), (actY-yy) + 4 * (actZ*zz), 25.5f * (actZ*zz), 14 * (actZ*zz),
|
||||||
ARGB(((static_cast<unsigned char>(actA))/2),0,0,0));
|
ARGB(((static_cast<unsigned char>(actA))/2),0,0,0));
|
||||||
renderer->DrawRect(actX - (13 * actZ), actY + 4 * actZ, 25.5f * actZ, 14 * actZ,
|
renderer->DrawRect(actX - (13 * (actZ*zz)), (actY-yy) + 4 * (actZ*zz), 25.5f * (actZ*zz), 14 * (actZ*zz),
|
||||||
ARGB(((static_cast<unsigned char>(actA))),20,20,20));
|
ARGB(((static_cast<unsigned char>(actA))),20,20,20));
|
||||||
//damaged or buffed or powered down
|
//damaged or buffed or powered down
|
||||||
if(card->wasDealtDamage && card->life <= 2)
|
if(card->wasDealtDamage && card->life <= 2)
|
||||||
@@ -400,9 +405,9 @@ void CardGui::Render()
|
|||||||
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),238,130,238));//violet legendary eldrazi
|
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),238,130,238));//violet legendary eldrazi
|
||||||
else
|
else
|
||||||
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,255));//white default
|
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,255));//white default
|
||||||
mFont->SetScale(actZ);
|
mFont->SetScale((actZ*zz));
|
||||||
mFont->SetScale(actZ);
|
mFont->SetScale((actZ*zz));
|
||||||
mFont->DrawString(buffer, actX - 10 * actZ, actY + 7 * actZ);
|
mFont->DrawString(buffer, actX - 10 * (actZ*zz), (actY-yy) + 7 * (actZ*zz));
|
||||||
mFont->SetScale(1);
|
mFont->SetScale(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -435,7 +440,7 @@ void CardGui::Render()
|
|||||||
sprintf(buffer, "%s", buff.c_str());
|
sprintf(buffer, "%s", buff.c_str());
|
||||||
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,215,0));//Gold indicator
|
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,215,0));//Gold indicator
|
||||||
mFont->SetScale(0.8f);
|
mFont->SetScale(0.8f);
|
||||||
mFont->DrawString(buffer, actX - 10 * actZ, actY - (16 * actZ));
|
mFont->DrawString(buffer, actX - 10 * (actZ*zz), (actY-yy) - (16 * (actZ*zz)));
|
||||||
mFont->SetScale(1);
|
mFont->SetScale(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -454,8 +459,8 @@ void CardGui::Render()
|
|||||||
char buffer[200];
|
char buffer[200];
|
||||||
sprintf(buffer, "%i", card->counters->counters[0]->nb);
|
sprintf(buffer, "%i", card->counters->counters[0]->nb);
|
||||||
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,255));
|
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,255));
|
||||||
mFont->SetScale(actZ);
|
mFont->SetScale((actZ*zz));
|
||||||
mFont->DrawString(buffer, actX - 10 * actZ, actY - (12 * actZ));
|
mFont->DrawString(buffer, actX - 10 * (actZ*zz), (actY-yy) - (12 * (actZ*zz)));
|
||||||
mFont->SetScale(1);
|
mFont->SetScale(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -467,34 +472,38 @@ void CardGui::Render()
|
|||||||
if (shadow)
|
if (shadow)
|
||||||
{
|
{
|
||||||
shadow->SetColor(ARGB(200,255,255,255));
|
shadow->SetColor(ARGB(200,255,255,255));
|
||||||
renderer->RenderQuad(shadow.get(), actX, actY, actT, (28 * actZ + 1) / 16, 40 * actZ / 16);
|
renderer->RenderQuad(shadow.get(), actX, (actY-yy), actT, (28 * (actZ*zz) + 1) / 16, 40 * (actZ*zz) / 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Render a mask over the card, if set
|
// Render a mask over the card, if set
|
||||||
if (mask && quad)
|
if (mask && quad)
|
||||||
JRenderer::GetInstance()->FillRect(actX - (scale * quad->mWidth / 2),actY - (scale * quad->mHeight / 2), scale * quad->mWidth, scale* quad->mHeight, mask);
|
JRenderer::GetInstance()->FillRect(actX - (scale * quad->mWidth / 2),(actY-yy) - (scale * quad->mHeight / 2), scale * quad->mWidth, scale* quad->mHeight, mask);
|
||||||
|
|
||||||
if ((tc && tc->alreadyHasTarget(card)) || (game && card == game->mLayers->actionLayer()->currentActionCard))//paint targets red.
|
if ((tc && tc->alreadyHasTarget(card)) || (game && card == game->mLayers->actionLayer()->currentActionCard))//paint targets red.
|
||||||
{
|
{
|
||||||
|
float xy = yy>0.0f?2.0f:1.0f;
|
||||||
|
float modx = mHasFocus?xy:0.0f;
|
||||||
if (card->isTapped())
|
if (card->isTapped())
|
||||||
{
|
{
|
||||||
renderer->FillRect(actX - (scale * quad->mWidth / 2)-7,actY - (scale * quad->mHeight / 2)+7,scale* quad->mHeight,scale * quad->mWidth, ARGB(128,255,0,0));
|
renderer->FillRect(actX - (scale * quad->mWidth / 2)-(7+modx),(actY-yy) - (scale * quad->mHeight / 2)+(7+modx),scale* quad->mHeight,scale * quad->mWidth, ARGB(128,255,0,0));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
renderer->FillRect(actX - (scale * quad->mWidth / 2),actY - (scale * quad->mHeight / 2), scale * quad->mWidth, scale* quad->mHeight, ARGB(128,255,0,0));
|
renderer->FillRect(actX - (scale * quad->mWidth / 2),(actY-yy) - (scale * quad->mHeight / 2), scale * quad->mWidth, scale* quad->mHeight, ARGB(128,255,0,0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(tc && tc->source && tc->source->view && tc->source->view->actZ >= 1.3 && card == tc->source)//paint the source green while infocus.
|
if(tc && tc->source && tc->source->view && tc->source->view->actY >= 1.3 && card == tc->source)//paint the source green while infocus.
|
||||||
{
|
{
|
||||||
|
float xy = yy>0.0f?2.0f:1.0f;
|
||||||
|
float modx = mHasFocus?xy:0.0f;
|
||||||
if (tc->source->isTapped())
|
if (tc->source->isTapped())
|
||||||
{
|
{
|
||||||
renderer->FillRect(actX - (scale * quad->mWidth / 2)-7,actY - (scale * quad->mHeight / 2)+7,scale* quad->mHeight,scale * quad->mWidth, ARGB(128,0,255,0));
|
renderer->FillRect(actX - (scale * quad->mWidth / 2)-(7+modx),(actY-yy) - (scale * quad->mHeight / 2)+(7+modx),scale* quad->mHeight,scale * quad->mWidth, ARGB(128,0,255,0));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
renderer->FillRect(tc->source->view->actX - (scale * quad->mWidth / 2),tc->source->view->actY - (scale * quad->mHeight / 2), scale*quad->mWidth, scale*quad->mHeight, ARGB(128,0,255,0));
|
renderer->FillRect(tc->source->view->actX - (scale * quad->mWidth / 2),(tc->source->view->actY-yy) - (scale * quad->mHeight / 2), scale*quad->mWidth, scale*quad->mHeight, ARGB(128,0,255,0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1114,7 +1123,7 @@ void CardGui::TinyCropRender(MTGCard * card, const Pos& pos, JQuad * quad)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Renders a big card on screen. Defaults to the "alternate" rendering if no image is found
|
//Renders a big card on screen. Defaults to the "alternate" rendering if no image is found
|
||||||
void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder)
|
void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder, bool smallerscale)
|
||||||
{
|
{
|
||||||
JRenderer * renderer = JRenderer::GetInstance();
|
JRenderer * renderer = JRenderer::GetInstance();
|
||||||
//GameObserver * game = GameObserver::GetInstance();
|
//GameObserver * game = GameObserver::GetInstance();
|
||||||
@@ -1122,10 +1131,10 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder
|
|||||||
// card = (MTGCard*)game->mLayers->actionLayer()->currentActionCard;
|
// card = (MTGCard*)game->mLayers->actionLayer()->currentActionCard;
|
||||||
//i want this but ai targets cards so quickly that it can crash the game.
|
//i want this but ai targets cards so quickly that it can crash the game.
|
||||||
float x = pos.actX;
|
float x = pos.actX;
|
||||||
|
//init setname
|
||||||
|
string cardsetname = setlist[card->setId].c_str();
|
||||||
JQuadPtr quad = thumb ? WResourceManager::Instance()->RetrieveCard(card, RETRIEVE_THUMB)
|
JQuadPtr quad = thumb ? WResourceManager::Instance()->RetrieveCard(card, RETRIEVE_THUMB)
|
||||||
: WResourceManager::Instance()->RetrieveCard(card);
|
: WResourceManager::Instance()->RetrieveCard(card);
|
||||||
JQuadPtr alphabeta = WResourceManager::Instance()->RetrieveTempQuad("alphabeta.png");
|
|
||||||
MTGCardInstance * kcard = dynamic_cast<MTGCardInstance*>(card);
|
MTGCardInstance * kcard = dynamic_cast<MTGCardInstance*>(card);
|
||||||
if(kcard && !kcard->isToken && kcard->name != kcard->model->data->name)
|
if(kcard && !kcard->isToken && kcard->name != kcard->model->data->name)
|
||||||
{
|
{
|
||||||
@@ -1140,40 +1149,15 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder
|
|||||||
}
|
}
|
||||||
quad->SetColor(ARGB(255,255,255,255));
|
quad->SetColor(ARGB(255,255,255,255));
|
||||||
float scale = pos.actZ * 250.f / quad->mHeight;
|
float scale = pos.actZ * 250.f / quad->mHeight;
|
||||||
//init setname
|
//Draw border
|
||||||
string cardsetname = setlist[card->setId].c_str();
|
DrawBorder(cardsetname, pos, x, noborder, smallerscale);
|
||||||
if(!noborder)
|
//force smaller scale on alpha beta
|
||||||
{
|
smallerscale = cardsetname=="LEA"||cardsetname=="LEB"?true:smallerscale;
|
||||||
if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM")
|
//Draw card
|
||||||
{
|
if(smallerscale)
|
||||||
renderer->FillRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(255,248,248,255));
|
renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale-0.01f, scale-0.01f);
|
||||||
renderer->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(150,20,20,20));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(cardsetname == "LEA"||cardsetname == "LEB")
|
|
||||||
{
|
|
||||||
renderer->FillRoundRect((pos.actX - (pos.actZ * 84.f))-10.5f,(pos.actY - (pos.actZ * 119.7f))-11.5f,pos.actZ * 168.f + 0.5f,pos.actZ * 239.4f + 4.f,10.f,ARGB(255,5,5,5));
|
|
||||||
renderer->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-10.5f,(pos.actY - (pos.actZ * 119.7f))-11.5f,pos.actZ * 168.f + 0.5f,pos.actZ * 239.4f + 4.f,10.f,ARGB(50,240,240,240));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
renderer->FillRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(255,5,5,5));
|
|
||||||
renderer->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(50,240,240,240));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(cardsetname == "LEA"||cardsetname == "LEB")
|
|
||||||
{
|
|
||||||
if(alphabeta.get())
|
|
||||||
renderer->RenderQuad(alphabeta.get(),(pos.actX - (pos.actZ * 100.f))+12.f,(pos.actY - (pos.actZ * 142.5f))+17.5f, pos.actT, 0.88f, 0.88f);
|
|
||||||
renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale-0.01f, scale-0.01f);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale, scale);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale, scale);
|
renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale, scale);
|
||||||
|
|
||||||
RenderCountersBig(card, pos);
|
RenderCountersBig(card, pos);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1184,6 +1168,46 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder
|
|||||||
AlternateRender(card, pos);
|
AlternateRender(card, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CardGui::DrawBorder(string cardsetname, const Pos& pos, float x, bool noborder, bool smallerscale)
|
||||||
|
{
|
||||||
|
JRenderer * renderer = JRenderer::GetInstance();
|
||||||
|
JQuadPtr alphabeta = WResourceManager::Instance()->RetrieveTempQuad("alphabeta.png");
|
||||||
|
|
||||||
|
if(!noborder)
|
||||||
|
{
|
||||||
|
if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM")
|
||||||
|
{//Draw white border
|
||||||
|
renderer->FillRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(255,248,248,255));
|
||||||
|
renderer->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(150,20,20,20));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(cardsetname == "LEA")
|
||||||
|
{//BETA HAS REGULAR BORDER
|
||||||
|
//Draw more rounder black border
|
||||||
|
renderer->FillRoundRect((pos.actX - (pos.actZ * 84.f))-10.5f,(pos.actY - (pos.actZ * 119.7f))-11.5f,pos.actZ * 168.f + 0.5f,pos.actZ * 239.4f + 4.f,10.f,ARGB(255,5,5,5));
|
||||||
|
renderer->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-10.5f,(pos.actY - (pos.actZ * 119.7f))-11.5f,pos.actZ * 168.f + 0.5f,pos.actZ * 239.4f + 4.f,10.f,ARGB(50,240,240,240));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{//draw black border
|
||||||
|
renderer->FillRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(255,5,5,5));
|
||||||
|
renderer->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(50,240,240,240));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//draw inner border
|
||||||
|
if(cardsetname == "LEA"||cardsetname == "LEB")
|
||||||
|
{
|
||||||
|
if(alphabeta.get())
|
||||||
|
{
|
||||||
|
alphabeta->SetHotSpot(static_cast<float> (alphabeta->mWidth / 2), static_cast<float> (alphabeta->mHeight / 2));
|
||||||
|
float myscale = pos.actZ * 250 / alphabeta->mHeight;
|
||||||
|
alphabeta->SetColor(ARGB((int)pos.actA,255,255,255));
|
||||||
|
renderer->RenderQuad(alphabeta.get(), x, pos.actY, pos.actT, myscale, myscale);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
string CardGui::FormattedData(string data, string replace, string value)
|
string CardGui::FormattedData(string data, string replace, string value)
|
||||||
{
|
{
|
||||||
size_t found = data.find(replace.c_str());
|
size_t found = data.find(replace.c_str());
|
||||||
|
|||||||
@@ -341,28 +341,9 @@ void CardSelector::Render()
|
|||||||
{
|
{
|
||||||
if(timer > 0)
|
if(timer > 0)
|
||||||
{
|
{
|
||||||
float modx = 0.f;
|
Pos npos = Pos(bigpos.x+7.f,bigpos.y-4.f,bigpos.zoom-(bigpos.zoom/10),bigpos.t,bigpos.alpha);
|
||||||
//if(card->mHasFocus && observer->isInHand(card->getCard()) && !card->getCard()->owner->isAI())
|
|
||||||
//modx -= 1.8f;//todo small adjustment
|
|
||||||
//new npos for smaller bigquad
|
|
||||||
Pos npos = Pos(bigpos.x+7.f+modx,bigpos.y-4.f,bigpos.zoom-(bigpos.zoom/10),bigpos.t,bigpos.alpha);
|
|
||||||
//border
|
|
||||||
if(mDrawMode < 2)
|
|
||||||
{
|
|
||||||
string cardsetname = setlist[card->getCard()->setId].c_str();
|
|
||||||
if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM")
|
|
||||||
{
|
|
||||||
JRenderer::GetInstance()->FillRoundRect((npos.actX - (npos.actZ * 84.f))-11.5f,(npos.actY - (npos.actZ * 119.7f))-14.f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,8.f,ARGB(255,248,248,255));
|
|
||||||
JRenderer::GetInstance()->DrawRoundRect((npos.actX - (npos.actZ * 84.f))-11.5f,(npos.actY - (npos.actZ * 119.7f))-14.f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,8.f,ARGB(150,20,20,20));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
JRenderer::GetInstance()->FillRoundRect((npos.actX - (npos.actZ * 84.f))-11.5f,(npos.actY - (npos.actZ * 119.7f))-14.f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,8.f,ARGB(255,5,5,5));
|
|
||||||
JRenderer::GetInstance()->DrawRoundRect((npos.actX - (npos.actZ * 84.f))-11.5f,(npos.actY - (npos.actZ * 119.7f))-14.f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,8.f,ARGB(50,240,240,240));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//render card
|
//render card
|
||||||
card->DrawCard(npos, mDrawMode, false, true);
|
card->DrawCard(npos, mDrawMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,7 +147,8 @@ void DeckView::renderCard(int index, int alpha, bool asThumbnail, bool addWHbord
|
|||||||
{//NORMAL VIEW WITH IMAGES
|
{//NORMAL VIEW WITH IMAGES
|
||||||
int mode = !options[Options::DISABLECARDS].number ? DrawMode::kNormal : DrawMode::kText;
|
int mode = !options[Options::DISABLECARDS].number ? DrawMode::kNormal : DrawMode::kText;
|
||||||
float modx = addWHborder ? 2.0f:0.0f;
|
float modx = addWHborder ? 2.0f:0.0f;
|
||||||
//border for editor && others???
|
bool smallerscale = modx > 0.0f ? true:false;
|
||||||
|
//border for editor && others since the border in cardgui:drawcard scales larger...
|
||||||
string cardsetname = setlist[cardPosition.card->setId].c_str();
|
string cardsetname = setlist[cardPosition.card->setId].c_str();
|
||||||
if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM")
|
if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM")
|
||||||
{
|
{
|
||||||
@@ -156,11 +157,19 @@ void DeckView::renderCard(int index, int alpha, bool asThumbnail, bool addWHbord
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
JRenderer::GetInstance()->FillRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-(5.f+modx),(cardPosition.y - cardPosition.scale * 142.5f)-(5.f+modx),cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f+modx,ARGB(255,10,10,10));
|
if (cardsetname == "LEA")
|
||||||
JRenderer::GetInstance()->DrawRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-(5.f+modx),(cardPosition.y - cardPosition.scale * 142.5f)-(5.f+modx),cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f+modx,ARGB(50,240,240,240));
|
{
|
||||||
|
JRenderer::GetInstance()->FillRoundRect((cardPosition.x - cardPosition.scale * 96.75f)-(7.f+modx),(cardPosition.y - cardPosition.scale * 139.25f)-(7.f+modx),cardPosition.scale * 193.5f,cardPosition.scale * 278.5f,7.f+modx,ARGB(255,10,10,10));
|
||||||
|
JRenderer::GetInstance()->DrawRoundRect((cardPosition.x - cardPosition.scale * 96.75f)-(7.f+modx),(cardPosition.y - cardPosition.scale * 139.25f)-(7.f+modx),cardPosition.scale * 193.5f,cardPosition.scale * 278.5f,7.f+modx,ARGB(50,240,240,240));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
JRenderer::GetInstance()->FillRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-(5.f+modx),(cardPosition.y - cardPosition.scale * 142.5f)-(5.f+modx),cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f+modx,ARGB(255,10,10,10));
|
||||||
|
JRenderer::GetInstance()->DrawRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-(5.f+modx),(cardPosition.y - cardPosition.scale * 142.5f)-(5.f+modx),cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f+modx,ARGB(50,240,240,240));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Pos pos = Pos(cardPosition.x, cardPosition.y, cardPosition.scale * 285 / 250, 0.0, 255);
|
Pos pos = Pos(cardPosition.x, cardPosition.y, cardPosition.scale * 285 / 250, 0.0, 255);
|
||||||
CardGui::DrawCard(cardPosition.card, pos, mode, asThumbnail, true);
|
CardGui::DrawCard(cardPosition.card, pos, mode, asThumbnail, true, smallerscale);
|
||||||
}
|
}
|
||||||
int quadAlpha = alpha;
|
int quadAlpha = alpha;
|
||||||
if (!deck()->count(cardPosition.card)) quadAlpha /= 2;
|
if (!deck()->count(cardPosition.card)) quadAlpha /= 2;
|
||||||
|
|||||||
@@ -227,6 +227,7 @@ void MTGCardInstance::initMTGCI()
|
|||||||
myPair = NULL;
|
myPair = NULL;
|
||||||
shackled = NULL;
|
shackled = NULL;
|
||||||
miracle = false;
|
miracle = false;
|
||||||
|
hasCopiedToken = false;
|
||||||
countTrini = 0;
|
countTrini = 0;
|
||||||
imprintedCards.clear();
|
imprintedCards.clear();
|
||||||
attackCost = 0;
|
attackCost = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user