removed dead code

reformatted statements
removed unnecessary debug statements
fixed a few floating point warnings
This commit is contained in:
techdragon.nguyen@gmail.com
2010-11-06 03:49:15 +00:00
parent 8908e86857
commit 0c34d7a04f
5 changed files with 8 additions and 8 deletions

View File

@@ -22,7 +22,6 @@ class DeckMenu:public JGuiController{
int fontId;
std::string title;
int displaytitle;
int maxItems, startId;
float selectionT, selectionY;
float timeOpen;

View File

@@ -94,7 +94,7 @@ JQuad* DeckMenu::getBackground()
ostringstream bgFilename;
bgFilename << backgroundName << ".png";
resources.RetrieveTexture( bgFilename.str(), RETRIEVE_MANAGE );
return resources.RetrieveQuad(bgFilename.str(), 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, backgroundName );
return resources.RetrieveQuad(bgFilename.str(), 0, 0, SCREEN_WIDTH_F, SCREEN_HEIGHT_F, backgroundName, RETRIEVE_MANAGE );
}

View File

@@ -203,7 +203,8 @@ bool GuiCombat::CheckUserInput(JButton key)
case ATK :
{
DamagerDamaged* old = active;
active = closest<Left>(attackers, NULL, static_cast<AttackerDamaged*>(active)); activeAtk = static_cast<AttackerDamaged*>(active);
active = closest<Left>(attackers, NULL, static_cast<AttackerDamaged*>(active));
activeAtk = static_cast<AttackerDamaged*>(active);
if (old != active) { if (old) old->zoom = kZoom_none; if (active) active->zoom = kZoom_level1; }
}
break;
@@ -235,7 +236,10 @@ bool GuiCombat::CheckUserInput(JButton key)
if (active == oldActive) { active = activeAtk = NULL; cursor_pos = OK; }
else
{
if (old != active) { if (old) old->zoom = kZoom_none; if (active) active->zoom = kZoom_level1; }
if (old != active) {
if (old) old->zoom = kZoom_none;
if (active) active->zoom = kZoom_level1;
}
activeAtk = static_cast<AttackerDamaged*>(active);
}
}

View File

@@ -1540,10 +1540,8 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
}
//Gain/loose simple Ability
DebugTrace(" start gain/lose simple ability " );
for (int j = 0; j < Constants::NB_BASIC_ABILITIES; j++){
found = s.find(Constants::MTGBasicAbilities[j]);
DebugTrace( "basic ability search at index " << Constants::MTGBasicAbilities[j] );
if (found == 0 || found == 1){
int modifier = 1;
if (found > 0 && s[found-1] == '-') modifier = 0;
@@ -1557,7 +1555,6 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
}
}
DebugTrace(" end gain/lose simple ability " );
//Untapper (Ley Druid...)
found = s.find("untap");
if (found != string::npos){

View File

@@ -499,7 +499,7 @@ int WSrcDeck::totalPrice(){
return total;
}
//WSrcDeckViewer
WSrcDeckViewer::WSrcDeckViewer(WSrcCards * _active, WSrcCards * _inactive): WSrcCards(0.2) {
WSrcDeckViewer::WSrcDeckViewer(WSrcCards * _active, WSrcCards * _inactive): WSrcCards(0.2f) {
active = _active;
inactive = _inactive;
}