fixed some formatting issues.
changed conditional for lord and thises evaluation from hardcoded value to length of the array being evaluated. This doesn't change current functionality, but minimizes code change if these arrays were ever to change in size.
This commit is contained in:
@@ -1393,7 +1393,8 @@ void GameStateDeckViewer::Render()
|
|||||||
JRenderer * r = JRenderer::GetInstance();
|
JRenderer * r = JRenderer::GetInstance();
|
||||||
|
|
||||||
r->ClearScreen(ARGB(0,0,0,0));
|
r->ClearScreen(ARGB(0,0,0,0));
|
||||||
if (displayed_deck == myDeck && mStage != STAGE_MENU) renderDeckBackground();
|
if (displayed_deck == myDeck && mStage != STAGE_MENU)
|
||||||
|
renderDeckBackground();
|
||||||
int order[3] = { 1, 2, 3 };
|
int order[3] = { 1, 2, 3 };
|
||||||
if (mRotation < 0.5 && mRotation > -0.5)
|
if (mRotation < 0.5 && mRotation > -0.5)
|
||||||
{
|
{
|
||||||
@@ -1601,7 +1602,7 @@ void GameStateDeckViewer::ButtonPressed(int controllerId, int controlId)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_ITEM_SWITCH_DECKS_NO_SAVE:
|
case MENU_ITEM_SWITCH_DECKS_NO_SAVE:
|
||||||
updateDecks();
|
//updateDecks();
|
||||||
mStage = STAGE_WELCOME;
|
mStage = STAGE_WELCOME;
|
||||||
mSwitching = true;
|
mSwitching = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -637,9 +637,9 @@ int GuiCombat::receiveEventMinus(WEvent* e)
|
|||||||
for (inner_iterator attacker = attackers.begin(); attacker != attackers.end(); ++attacker)
|
for (inner_iterator attacker = attackers.begin(); attacker != attackers.end(); ++attacker)
|
||||||
autoaffectDamage(*attacker, step);
|
autoaffectDamage(*attacker, step);
|
||||||
for (inner_iterator it = attackers.begin(); it != attackers.end(); ++it)
|
for (inner_iterator it = attackers.begin(); it != attackers.end(); ++it)
|
||||||
(*it)->show = ((*it)->card->has(Constants::DOUBLESTRIKE) || ((*it)->card->has(Constants::FIRSTSTRIKE) ^ (DAMAGE
|
(*it)->show = ((*it)->card->has(Constants::DOUBLESTRIKE)
|
||||||
== step))) && (((*it)->card->has(Constants::TRAMPLE) ? (size_t) 0 : (size_t) 1)
|
|| ((*it)->card->has(Constants::FIRSTSTRIKE) ^ (DAMAGE == step)))
|
||||||
< (*it)->blockers.size());
|
&& (((*it)->card->has(Constants::TRAMPLE) ? (size_t) 0 : (size_t) 1) < (*it)->blockers.size());
|
||||||
repos<AttackerDamaged> (attackers.begin(), attackers.end(), 0);
|
repos<AttackerDamaged> (attackers.begin(), attackers.end(), 0);
|
||||||
active = activeAtk = NULL;
|
active = activeAtk = NULL;
|
||||||
for (inner_iterator it = attackers.begin(); it != attackers.end(); ++it)
|
for (inner_iterator it = attackers.begin(); it != attackers.end(); ++it)
|
||||||
@@ -656,7 +656,7 @@ int GuiCombat::receiveEventMinus(WEvent* e)
|
|||||||
cursor_pos = ATK;
|
cursor_pos = ATK;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
go->nextCombatStep();
|
go->nextCombatStep();
|
||||||
return 1;
|
return 1;
|
||||||
case END_DAMAGE:
|
case END_DAMAGE:
|
||||||
step = END_DAMAGE;
|
step = END_DAMAGE;
|
||||||
|
|||||||
@@ -708,7 +708,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
string thises[] = { "this(", "thisforeach(" };
|
string thises[] = { "this(", "thisforeach(" };
|
||||||
found = string::npos;
|
found = string::npos;
|
||||||
int i = -1;
|
int i = -1;
|
||||||
for (int j = 0; j < 2; ++j)
|
for (int j = 0; j < thises->length(); ++j)
|
||||||
{
|
{
|
||||||
size_t found2 = s.find(thises[j]);
|
size_t found2 = s.find(thises[j]);
|
||||||
if (found2 != string::npos && ((found == string::npos) || found2 < found))
|
if (found2 != string::npos && ((found == string::npos) || found2 < found))
|
||||||
@@ -792,7 +792,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
string lords[] = { "lord(", "foreach(", "aslongas(", "teach(", "all(" };
|
string lords[] = { "lord(", "foreach(", "aslongas(", "teach(", "all(" };
|
||||||
found = string::npos;
|
found = string::npos;
|
||||||
i = -1;
|
i = -1;
|
||||||
for (int j = 0; j < 5; ++j)
|
for (int j = 0; j < lords->length(); ++j)
|
||||||
{
|
{
|
||||||
size_t found2 = s.find(lords[j]);
|
size_t found2 = s.find(lords[j]);
|
||||||
if (found2 != string::npos && ((found == string::npos) || found2 < found))
|
if (found2 != string::npos && ((found == string::npos) || found2 < found))
|
||||||
|
|||||||
Reference in New Issue
Block a user