removed unused variables

moved debug framerate message to be 10px higher.  current position covers the credit count on the game shop screens.
changed hard coded numeric values for menu ids to Labels.  ( this was done only to GameStateAward )
This commit is contained in:
techdragon.nguyen@gmail.com
2011-09-09 17:38:39 +00:00
parent cabd82e736
commit 5d09bb8a13
5 changed files with 25 additions and 21 deletions

View File

@@ -206,9 +206,9 @@ bool AIPlayer::payTheManaCost(ManaCost * cost, MTGCardInstance * target,vector<M
{
DebugTrace(" Ai had a payment in mind.");
ManaCost * paid = NEW ManaCost();
paid->init();
GameObserver * go = GameObserver::GetInstance();
vector<AIAction*>clicks = vector<AIAction*>();
paid->init();
for(int k = 0;k < int(gotPayments.size());k++)
{
AManaProducer * amp = dynamic_cast<AManaProducer*> (gotPayments[k]);
@@ -2197,7 +2197,7 @@ int AIPlayerBaka::computeActions()
if (targetResult)
return 1;
}
int currentGamePhase = g->getCurrentGamePhase();
static bool findingCard = false;
//this guard is put in place to prevent Ai from
//ever running computeActions() function WHILE its already doing so.

View File

@@ -254,7 +254,7 @@ AAPhaseOut::AAPhaseOut(int _id, MTGCardInstance * _source, MTGCardInstance * _ta
}
int AAPhaseOut::resolve()
{GameObserver * g = GameObserver::GetInstance();
{
MTGCardInstance * _target = (MTGCardInstance *) target;
if (_target)
{
@@ -516,7 +516,6 @@ int AAProliferate::resolve()
}
else if (target->typeAsTarget() == TARGET_CARD && ((MTGCardInstance*)target)->counters)
{
Counter * targetCounter = NULL;
for(unsigned int i = 0; i < ((MTGCardInstance*)target)->counters->counters.size();i++)
{
MTGAbility * a = NEW AACounter(game->mLayers->actionLayer()->getMaxId(), source, (MTGCardInstance*)target,"", ((MTGCardInstance*)target)->counters->counters[i]->name.c_str(), ((MTGCardInstance*)target)->counters->counters[i]->power, ((MTGCardInstance*)target)->counters->counters[i]->toughness, 1,0);

View File

@@ -404,7 +404,7 @@ void GameApp::Render()
if (mFont)
{
mFont->SetColor(ARGB(255,255,255,255));
mFont->DrawString(buf, 10, SCREEN_HEIGHT-15);
mFont->DrawString(buf, 10, SCREEN_HEIGHT-25);
}
#endif

View File

@@ -13,7 +13,11 @@
enum ENUM_AWARDS_STATE
{
STATE_LISTVIEW, STATE_DETAILS,
STATE_LISTVIEW,
STATE_DETAILS,
EXIT_AWARDS_MENU = -102,
GUI_AWARD_BUTTON = -103,
};
namespace
@@ -64,31 +68,31 @@ void GameStateAwards::Start()
listview->Add(wgh);
aw = NEW WGuiAward(Options::DIFFICULTY_MODE_UNLOCKED, "Difficulty Modes", "Achieved a 66% victory ratio.");
btn = NEW WGuiButton(aw, -103, Options::DIFFICULTY_MODE_UNLOCKED, this);
btn = NEW WGuiButton(aw, GUI_AWARD_BUTTON, Options::DIFFICULTY_MODE_UNLOCKED, this);
listview->Add(btn);
aw = NEW WGuiAward(Options::MOMIR_MODE_UNLOCKED, "Momir Mode", "Won with exactly 8 lands.");
btn = NEW WGuiButton(aw, -103, Options::MOMIR_MODE_UNLOCKED, this);
btn = NEW WGuiButton(aw, GUI_AWARD_BUTTON, Options::MOMIR_MODE_UNLOCKED, this);
listview->Add(btn);
aw = NEW WGuiAward(Options::STONEHEWER_MODE_UNLOCKED, "Stone Hewer Mode", "Won with more than 10 equipments.");
btn = NEW WGuiButton(aw, -103, Options::STONEHEWER_MODE_UNLOCKED, this);
btn = NEW WGuiButton(aw, GUI_AWARD_BUTTON, Options::STONEHEWER_MODE_UNLOCKED, this);
listview->Add(btn);
aw = NEW WGuiAward(Options::HERMIT_MODE_UNLOCKED, "Hermit Druid Mode", "Won with less than 10 lands.");
btn = NEW WGuiButton(aw, -103, Options::HERMIT_MODE_UNLOCKED, this);
btn = NEW WGuiButton(aw, GUI_AWARD_BUTTON, Options::HERMIT_MODE_UNLOCKED, this);
listview->Add(btn);
aw = NEW WGuiAward(Options::EVILTWIN_MODE_UNLOCKED, "Evil Twin Mode", "Won with same army size.");
btn = NEW WGuiButton(aw, -103, Options::EVILTWIN_MODE_UNLOCKED, this);
btn = NEW WGuiButton(aw, GUI_AWARD_BUTTON, Options::EVILTWIN_MODE_UNLOCKED, this);
listview->Add(btn);
aw = NEW WGuiAward(Options::RANDOMDECK_MODE_UNLOCKED, "Random Deck Mode", "Won against a higher difficulty.");
btn = NEW WGuiButton(aw, -103, Options::RANDOMDECK_MODE_UNLOCKED, this);
btn = NEW WGuiButton(aw, GUI_AWARD_BUTTON, Options::RANDOMDECK_MODE_UNLOCKED, this);
listview->Add(btn);
aw = NEW WGuiAward(Options::AWARD_COLLECTOR, "Valuable Collection", "Collection valued over 10,000c.", "Collection Info");
btn = NEW WGuiButton(aw, -103, Options::AWARD_COLLECTOR, this);
btn = NEW WGuiButton(aw, GUI_AWARD_BUTTON, Options::AWARD_COLLECTOR, this);
listview->Add(btn);
wgh = NEW WGuiHeader("");
@@ -115,7 +119,7 @@ void GameStateAwards::Start()
aw = NEW WGuiAward(Options::optionSet(i), si->getName(), buf, "Card Spoiler");
aw->mFlags = WGuiItem::NO_TRANSLATE;
btn = NEW WGuiButton(aw, -103, Options::optionSet(i), this);
btn = NEW WGuiButton(aw, GUI_AWARD_BUTTON, Options::optionSet(i), this);
listview->Add(btn);
}
if (locked)
@@ -176,6 +180,7 @@ void GameStateAwards::Update(float dt)
else
{
JButton key = JGE_BTN_NONE;
while ((key = JGE::GetInstance()->ReadButton()))
{
switch (key)
@@ -183,7 +188,7 @@ void GameStateAwards::Update(float dt)
case JGE_BTN_MENU:
showMenu = true;
SAFE_DELETE(menu);
menu = NEW SimpleMenu(-102, this, Fonts::MENU_FONT, 50, 170);
menu = NEW SimpleMenu(EXIT_AWARDS_MENU, this, Fonts::MENU_FONT, 50, 170);
if (mState == STATE_DETAILS)
menu->Add(kBackToTrophiesID, "Back to Trophies");
menu->Add(kBackToMainMenuID, "Back to Main Menu");
@@ -355,7 +360,7 @@ bool GameStateAwards::enterStats(int option)
}
void GameStateAwards::ButtonPressed(int controllerId, int controlId)
{
if (controllerId == -102)
if (controllerId == EXIT_AWARDS_MENU)
switch (controlId)
{
case kBackToMainMenuID:
@@ -371,7 +376,7 @@ void GameStateAwards::ButtonPressed(int controllerId, int controlId)
showMenu = false;
break;
}
else if (controllerId == -103)
else if (controllerId == GUI_AWARD_BUTTON)
{
int setid = controlId - Options::SET_UNLOCKS;

View File

@@ -831,9 +831,9 @@ void GameStateShop::OnScroll(int inXVelocity, int inYVelocity)
{
if (abs(inXVelocity) > 200)
{
bool flickLeft = (inXVelocity < 0);
if(!flickLeft)
mEngine->HoldKey_NoRepeat(JGE_BTN_PRI);
bool flickRight = (inXVelocity >= 0);
if (flickRight)
mEngine->HoldKey_NoRepeat(JGE_BTN_PRI);
}
}