Fixed a gazillion of warnings occuring when compiling Wagic with Clang with Werror.

This commit is contained in:
Xawotihs@gmail.com
2013-06-09 21:16:39 +00:00
parent 7990540096
commit 26ab65860e
75 changed files with 303 additions and 242 deletions
+3 -3
View File
@@ -138,7 +138,7 @@ AIPlayer::~AIPlayer()
}
int AIPlayer::Act(float dt)
int AIPlayer::Act(float)
{
if (observer->currentPlayer == this)
observer->userRequestNextGamePhase();
@@ -183,7 +183,7 @@ int AIPlayer::clickMultiTarget(TargetChooser * tc, vector<Targetable*>& potentia
return 1;
}
int AIPlayer::clickSingleTarget(TargetChooser * tc, vector<Targetable*>& potentialTargets, MTGCardInstance * chosenCard)
int AIPlayer::clickSingleTarget(TargetChooser *, vector<Targetable*>& potentialTargets, MTGCardInstance * chosenCard)
{
int i = randomGenerator.random() % potentialTargets.size();
@@ -248,7 +248,7 @@ AIPlayer * AIPlayerFactory::createAIPlayer(GameObserver *observer, MTGAllCards *
return baka;
}
int AIPlayer::receiveEvent(WEvent * event)
int AIPlayer::receiveEvent(WEvent *)
{
return 0;
}
+1 -1
View File
@@ -645,7 +645,7 @@ int AIPlayerBaka::getEfficiency(OrderedAIAction * action)
//
MTGCardInstance * AIPlayerBaka::chooseCard(TargetChooser * tc, MTGCardInstance * source, int random)
MTGCardInstance * AIPlayerBaka::chooseCard(TargetChooser * tc, MTGCardInstance * source, int)
{
MTGPlayerCards * playerZones = source->controller()->game;
if (comboHint && comboHint->cardTargets.size())
+1 -1
View File
@@ -456,7 +456,7 @@ void ActionLayer::doReactTo(int menuIndex)
}
}
void ActionLayer::ButtonPressed(int controllerid, int controlid)
void ActionLayer::ButtonPressed(int, int controlid)
{
stringstream stream;
for(size_t i = 0; i < abilitiesMenu->mObjects.size(); i++)
-1
View File
@@ -308,7 +308,6 @@ int Spell::resolve()
{
Player * p = source->controller();
int castMethod = source->castMethod;
Player * playerT = source->playerTarget;
vector<Targetable*>backupTgt = source->backupTargets;
source = p->game->putInZone(source, from, p->game->battlefield);
+17 -23
View File
@@ -544,7 +544,7 @@ AACounter * AACounter::clone() const
}
//shield a card from a certain type of counter.
ACounterShroud::ACounterShroud(GameObserver* observer, int id, MTGCardInstance * source, MTGCardInstance * target,TargetChooser * tc, Counter * counter) :
ACounterShroud::ACounterShroud(GameObserver* observer, int id, MTGCardInstance * source, MTGCardInstance *,TargetChooser * tc, Counter * counter) :
MTGAbility(observer, id, source),csTc(tc),counter(counter),re(NULL)
{
}
@@ -732,7 +732,7 @@ AARemoveAllCounter * AARemoveAllCounter::clone() const
}
//proliferate a target
AAProliferate::AAProliferate(GameObserver* observer, int id, MTGCardInstance * source, Targetable * target,ManaCost * cost) :
AAProliferate::AAProliferate(GameObserver* observer, int id, MTGCardInstance * source, Targetable *,ManaCost * cost) :
ActivatedAbility(observer, id, source, cost, 0)
{
this->GetId();
@@ -789,7 +789,7 @@ AAProliferate::~AAProliferate()
}
//
//choosing a type or color
GenericChooseTypeColor::GenericChooseTypeColor(GameObserver* observer, int id, MTGCardInstance * source, Targetable * target,string _toAdd,bool chooseColor,bool nonwall, ManaCost * cost) :
GenericChooseTypeColor::GenericChooseTypeColor(GameObserver* observer, int id, MTGCardInstance * source, Targetable *,string _toAdd,bool chooseColor,bool nonwall, ManaCost * cost) :
ActivatedAbility(observer, id, source, cost, 0), baseAbility(_toAdd),chooseColor(chooseColor),ANonWall(nonwall)
{
this->GetId();
@@ -973,8 +973,8 @@ AASetTypeChosen::~AASetTypeChosen()
//
//choosing a type or color
GenericFlipACoin::GenericFlipACoin(GameObserver* observer, int id, MTGCardInstance * source, Targetable * target,string _toAdd, ManaCost * cost) :
ActivatedAbility(observer, id, source, cost, 0), baseAbility(_toAdd),chooseColor(chooseColor)
GenericFlipACoin::GenericFlipACoin(GameObserver* observer, int id, MTGCardInstance * source, Targetable *,string _toAdd, ManaCost * cost) :
ActivatedAbility(observer, id, source, cost, 0), baseAbility(_toAdd),chooseColor(true)
{
this->GetId();
setCoin = NULL;
@@ -1881,28 +1881,23 @@ int AADynamic::resolve()
break;
case DYNAMIC_ABILITY_WHO_ITSELF:
source = ((MTGCardInstance *) _target);
_target = _target;
break;
case DYNAMIC_ABILITY_WHO_TARGETCONTROLLER:
_target = _target;
secondaryTarget = ((MTGCardInstance *) _target)->controller();
break;
case DYNAMIC_ABILITY_WHO_TARGETOPPONENT:
_target = _target;
secondaryTarget = ((MTGCardInstance *) _target)->controller()->opponent();
break;
case DYNAMIC_ABILITY_WHO_TOSOURCE:
tosrc = true;
break;
case DYNAMIC_ABILITY_WHO_SOURCECONTROLLER:
_target = _target;
secondaryTarget = ((MTGCardInstance *) OriginalSrc)->controller();
break;
case DYNAMIC_ABILITY_WHO_SOURCEOPPONENT:
secondaryTarget = OriginalSrc->controller()->opponent();
break;
default:
_target = _target;
break;
}
if(amountsource == DYNAMIC_MYSELF_AMOUNT)
@@ -2112,7 +2107,7 @@ int AADynamic::resolve()
return 0;
}
int AADynamic::activateMainAbility(MTGAbility * toActivate,MTGCardInstance * source , Damageable * target)
int AADynamic::activateMainAbility(MTGAbility * toActivate,MTGCardInstance * , Damageable *)
{
if(storedAbility)
activateStored();
@@ -2867,7 +2862,6 @@ int AARemoveMana::resolve()
{
if (player->doesntEmpty->getConvertedCost() && !player->poolDoesntEmpty->getConvertedCost())
{
ManaCost * toRemove = manaPool->Diff(player->doesntEmpty);
player->getManaPool()->pay(manaPool->Diff(player->doesntEmpty));
return 1;
}
@@ -2994,7 +2988,7 @@ AAUntapper * AAUntapper::clone() const
return NEW AAUntapper(*this);
}
AAWhatsMax::AAWhatsMax(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * source, ManaCost * _cost, int value) :
AAWhatsMax::AAWhatsMax(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance *, ManaCost * _cost, int value) :
ActivatedAbility(observer, id, card, _cost, 0), value(value)
{
}
@@ -3083,7 +3077,7 @@ MTGAbility(observer, _id, _source), tcString(Tc), manaString(mana)
{
}
void ANewAffinity::Update(float dt)
void ANewAffinity::Update(float)
{
testDestroy();
return;
@@ -3334,7 +3328,7 @@ int MenuAbility::testDestroy()
}
int MenuAbility::isReactingToTargetClick(Targetable * card){return MayAbility::isReactingToTargetClick(card);}
int MenuAbility::reactToTargetClick(Targetable * object){return 1;}
int MenuAbility::reactToTargetClick(Targetable *){return 1;}
int MenuAbility::reactToChoiceClick(Targetable * object,int choice,int control)
{
@@ -3938,7 +3932,7 @@ for (it = types.begin(); it != types.end(); it++)
return MTGAbility::addToGame();
}
int ATransformer::reapplyCountersBonus(MTGCardInstance * rtarget,bool powerapplied,bool toughnessapplied)
int ATransformer::reapplyCountersBonus(MTGCardInstance * rtarget,bool , bool toughnessapplied)
{
if(!rtarget->counters || !rtarget->counters->counters.size())
return 0;
@@ -4478,7 +4472,7 @@ APreventDamageTypesUEOT::~APreventDamageTypesUEOT()
}
//AVanishing creature also fading
AVanishing::AVanishing(GameObserver* observer, int _id, MTGCardInstance * card, ManaCost * _cost, int restrictions, int amount, string counterName) :
AVanishing::AVanishing(GameObserver* observer, int _id, MTGCardInstance * card, ManaCost *, int, int amount, string counterName) :
MTGAbility(observer, _id, source, target),amount(amount),counterName(counterName)
{
target = card;
@@ -4657,7 +4651,7 @@ AUpkeep::~AUpkeep()
}
//A Phase based Action
APhaseAction::APhaseAction(GameObserver* observer, int _id, MTGCardInstance * card, MTGCardInstance * target, string sAbility, int restrictions, int _phase,bool forcedestroy,bool next,bool myturn,bool opponentturn,bool once) :
APhaseAction::APhaseAction(GameObserver* observer, int _id, MTGCardInstance * card, MTGCardInstance *, string sAbility, int, int _phase,bool forcedestroy,bool next,bool myturn,bool opponentturn,bool once) :
MTGAbility(observer, _id, card),sAbility(sAbility), phase(_phase),forcedestroy(forcedestroy),next(next),myturn(myturn),opponentturn(opponentturn),once(once)
{
abilityId = _id;
@@ -5029,7 +5023,7 @@ ABlinkGeneric::~ABlinkGeneric()
}
// target becomes blocked by source
AABlock::AABlock(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, ManaCost * _cost) :
AABlock::AABlock(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, ManaCost *) :
InstantAbility(observer, id, card, target)
{
target = _target;
@@ -5053,7 +5047,7 @@ AABlock * AABlock::clone() const
}
// target becomes pair of source
PairCard::PairCard(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, ManaCost * _cost) :
PairCard::PairCard(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, ManaCost *) :
InstantAbility(observer, id, card, target)
{
target = _target;
@@ -5078,7 +5072,7 @@ PairCard * PairCard::clone() const
return NEW PairCard(*this);
}
//target is dredged
dredgeCard::dredgeCard(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, ManaCost * _cost) :
dredgeCard::dredgeCard(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, ManaCost *) :
InstantAbility(observer, id, card, target)
{
target = _target;
@@ -5108,7 +5102,7 @@ dredgeCard * dredgeCard::clone() const
}
// target becomes a parent of card(source)
AAConnect::AAConnect(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, ManaCost * _cost) :
AAConnect::AAConnect(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, ManaCost *) :
InstantAbility(observer, id, card, target)
{
target = _target;
@@ -5267,7 +5261,7 @@ void ATutorialMessage::Update(float dt)
}
}
void ATutorialMessage::ButtonPressed(int controllerId, int controlId)
void ATutorialMessage::ButtonPressed(int, int)
{
//TODO : cancel ALL tips/tutorials for JGE_BTN_SEC?
if (mLimit)
+1 -1
View File
@@ -44,7 +44,7 @@ struct Diff: public Exp
};
struct True: public Exp
{
static inline bool test(CardSelector::Target* ref, CardSelector::Target* test)
static inline bool test(CardSelector::Target*, CardSelector::Target*)
{
return true;
}
-1
View File
@@ -232,7 +232,6 @@ int DeckManager::getDifficultyRating(Player *statsPlayer, Player *player)
if (meta)
{
int diff = meta->getVictoryPercentage();
meta->mPlayerDeck = statsPlayer->GetCurrentDeckStatsFile();
meta->mStatsFilename = player->deckFileSmall;
meta->LoadStats();
+1 -1
View File
@@ -37,7 +37,7 @@ hgeParticleSystem* DeckMenu::stars = NULL;
// TODO:
// *** Need to make this configurable in a file somewhere to allow for class reuse
DeckMenu::DeckMenu(int id, JGuiListener* listener, int fontId, const string _title, const int& startIndex, bool showDetailsOverride) :
DeckMenu::DeckMenu(int id, JGuiListener* listener, int fontId, const string _title, const int&, bool showDetailsOverride) :
JGuiController(JGE::GetInstance(), id, listener), fontId(fontId), mShowDetailsScreen( showDetailsOverride )
{
+1 -1
View File
@@ -148,7 +148,7 @@ void DeckMenuItem::Entering()
parent->mSelectionTargetY = mY;
}
bool DeckMenuItem::Leaving(JButton key)
bool DeckMenuItem::Leaving(JButton)
{
// check to see if the user clicked on the object, if so return true.
checkUserClick();
+5 -5
View File
@@ -1963,7 +1963,7 @@ NetworkGameObserver::~NetworkGameObserver()
mpNetworkSession->sendCommand("disconnect", "");
}
void NetworkGameObserver::disconnect(void*pxThis, stringstream& in, stringstream& out)
void NetworkGameObserver::disconnect(void*pxThis, stringstream&, stringstream&)
{
NetworkGameObserver* pThis = (NetworkGameObserver*)pxThis;
pThis->setLoser(pThis->getView()->getRenderedPlayerOpponent());
@@ -1983,7 +1983,7 @@ void NetworkGameObserver::loadPlayer(int playerId, Player* player)
mpNetworkSession->sendCommand("loadPlayer", out.str());
}
void NetworkGameObserver::loadPlayer(void*pxThis, stringstream& in, stringstream& out)
void NetworkGameObserver::loadPlayer(void*pxThis, stringstream& in, stringstream&)
{
NetworkGameObserver* pThis = (NetworkGameObserver*)pxThis;
Player* pPlayer = 0;
@@ -2027,7 +2027,7 @@ void NetworkGameObserver::synchronize(void*pxThis, stringstream& in, stringstrea
}
void NetworkGameObserver::checkSynchro(void*pxThis, stringstream& in, stringstream& out)
void NetworkGameObserver::checkSynchro(void*pxThis, stringstream& in, stringstream&)
{
NetworkGameObserver* pThis = (NetworkGameObserver*)pxThis;
@@ -2038,7 +2038,7 @@ void NetworkGameObserver::checkSynchro(void*pxThis, stringstream& in, stringstre
assert(aGame == *pThis);
}
void NetworkGameObserver::sendAction(void*pxThis, stringstream& in, stringstream& out)
void NetworkGameObserver::sendAction(void*pxThis, stringstream& in, stringstream&)
{
NetworkGameObserver* pThis = (NetworkGameObserver*)pxThis;
@@ -2055,4 +2055,4 @@ void NetworkGameObserver::logAction(const string& s)
mpNetworkSession->sendCommand("sendAction", s);
}
#endif
#endif
+1 -1
View File
@@ -389,7 +389,7 @@ void GameStateAwards::ButtonPressed(int controllerId, int controlId)
}
}
void GameStateAwards::OnScroll(int inXVelocity, int inYVelocity)
void GameStateAwards::OnScroll(int, int inYVelocity)
{
if (abs(inYVelocity) > 300)
{
+20 -4
View File
@@ -1119,19 +1119,35 @@ void GameStateDeckViewer::renderOnScreenMenu()
for (int j = 0; j < Constants::NB_Colors - 1; j++)
{
curCount = stw->countBasicLandsPerColor[j];
sprintf(buffer, (curCount == 0 ? "." : "%i"), curCount);
if(curCount == 0) {
sprintf(buffer, ".");
} else {
sprintf(buffer, "%i", curCount);
}
font->DrawString(buffer, 49 + leftTransition + j * 15, posY);
curCount = stw->countLandsPerColor[j];
sprintf(buffer, (curCount == 0 ? "." : "%i"), curCount);
if(curCount == 0) {
sprintf(buffer, ".");
} else {
sprintf(buffer, "%i", curCount);
}
font->DrawString(buffer, 49 + leftTransition + j * 15, posY + 10);
curCount = stw->countNonLandProducersPerColor[j];
sprintf(buffer, (curCount == 0 ? "." : "%i"), curCount);
if(curCount == 0) {
sprintf(buffer, ".");
} else {
sprintf(buffer, "%i", curCount);
}
font->DrawString(buffer, 49 + leftTransition + j * 15, posY + 20);
curCount = stw->countLandsPerColor[j] + stw->countBasicLandsPerColor[j] + stw->countNonLandProducersPerColor[j];
sprintf(buffer, (curCount == 0 ? "." : "%i"), curCount);
if(curCount == 0) {
sprintf(buffer, ".");
} else {
sprintf(buffer, "%i", curCount);
}
font->DrawString(buffer, 49 + leftTransition + j * 15, posY + 33);
}
+2 -2
View File
@@ -766,9 +766,9 @@ void GameStateMenu::Render()
else
{
if (primitivesLoadCounter <= (int) (primitives.size()))
sprintf(text, _("LOADING PRIMITIVES").c_str());
sprintf(text, "%s", _("LOADING PRIMITIVES").c_str());
else
sprintf(text, _("LOADING...").c_str());
sprintf(text, "%s", _("LOADING...").c_str());
}
mFont->SetColor(ARGB(170,0,0,0));
mFont->DrawString(text, SCREEN_WIDTH / 2 + 2, SCREEN_HEIGHT - 50 + 2, JGETEXT_CENTER);
+3 -4
View File
@@ -110,7 +110,6 @@ void GameStateShop::Start()
srcCards->addFilter(NEW WCFilterNOT(NEW WCFilterRarity("T")));
srcCards->addFilter(NEW WCFilterNOT(NEW WCFilterSet(MTGSets::INTERNAL_SET)));
bigSync = 0;
shopMenu = NEW WGuiMenu(JGE_BTN_DOWN, JGE_BTN_UP, true, &bigSync);
MTGAllCards * ac = MTGCollection();
playerdata = NEW PlayerData(ac);
@@ -265,7 +264,7 @@ void GameStateShop::cancelCard(int controlId)
//Prices do not immediately go down when you ignore something.
return;
}
void GameStateShop::cancelBooster(int controlId)
void GameStateShop::cancelBooster(int)
{
return; //TODO FIXME Tie boosters into pricelist.
}
@@ -867,7 +866,7 @@ void GameStateShop::ButtonPressed(int controllerId, int controlId)
menu->Close();
}
void GameStateShop::OnScroll(int inXVelocity, int inYVelocity)
void GameStateShop::OnScroll(int inXVelocity, int)
{
// we ignore magnitude since there isn't any scrolling in the shop
if (abs(inXVelocity) > 200)
@@ -980,7 +979,7 @@ int ShopBooster::maxInventory()
return 2;
return 5;
}
void ShopBooster::addToDeck(MTGDeck * d, WSrcCards * srcCards)
void ShopBooster::addToDeck(MTGDeck * d, WSrcCards *)
{
if (!pack)
{ //A combination booster.
+3 -3
View File
@@ -18,7 +18,7 @@ const float kZoom_level3 = 2.7f;
struct True: public Exp
{
static inline bool test(DamagerDamaged* ref, DamagerDamaged* test)
static inline bool test(DamagerDamaged*, DamagerDamaged*)
{
return true;
}
@@ -90,7 +90,7 @@ void GuiCombat::Update(float dt)
enemy_avatar.Update(dt);
}
void GuiCombat::remaskBlkViews(AttackerDamaged* before, AttackerDamaged* after)
void GuiCombat::remaskBlkViews(AttackerDamaged*, AttackerDamaged* after)
{
if (after)
{
@@ -155,7 +155,7 @@ void GuiCombat::addOne(DefenserDamaged* blocker, CombatStep step)
}
}
}
void GuiCombat::removeOne(DefenserDamaged* blocker, CombatStep step)
void GuiCombat::removeOne(DefenserDamaged* blocker, CombatStep)
{
blocker->addDamage(-1, activeAtk);
for (vector<DamagerDamaged*>::iterator it = activeAtk->blockers.begin(); it != activeAtk->blockers.end(); ++it)
+1 -1
View File
@@ -23,7 +23,7 @@ bool HandLimitor::select(Target* t)
else
return false;
}
bool HandLimitor::greyout(Target* t)
bool HandLimitor::greyout(Target*)
{
return true;
}
+2 -2
View File
@@ -33,7 +33,7 @@ namespace
const float ICONSCALE = 1.5;
const float CENTER = SCREEN_HEIGHT_F / 2 + 10;
void DrawGlyph(JQuad* inQuad, int inGlyph, float inY, float inAngle, unsigned int inP, float inScale)
void DrawGlyph(JQuad* inQuad, int inGlyph, float inY, float, unsigned int inP, float inScale)
{
float xPos = static_cast<float> ((inP + inGlyph * (int) (kWidth + 1)) % (kPhases * (int) (kWidth + 1)));
inQuad->SetTextureRect(xPos, 0, kWidth, kHeight);
@@ -87,7 +87,7 @@ void GuiPhaseBar::Entering()
zoom = 1.4f*ICONSCALE;
}
bool GuiPhaseBar::Leaving(JButton key)
bool GuiPhaseBar::Leaving(JButton)
{
mHasFocus = false;
zoom = ICONSCALE;
+2 -2
View File
@@ -13,7 +13,7 @@ void GuiStatic::Entering()
parent->Activate(this);
}
bool GuiStatic::Leaving(JButton key)
bool GuiStatic::Leaving(JButton)
{
parent->Deactivate(this);
return false;
@@ -186,7 +186,7 @@ void GuiGameZone::Render()
PlayGuiObject::Render();
}
void GuiGameZone::ButtonPressed(int controllerId, int controlId)
void GuiGameZone::ButtonPressed(int, int)
{
zone->owner->getObserver()->ButtonPressed(this);
}
+1 -1
View File
@@ -109,7 +109,7 @@ void IconButton::Entering()
mTargetScale = SCALE_SELECTED * mScale;
}
bool IconButton::Leaving(JButton key)
bool IconButton::Leaving(JButton)
{
mHasFocus = false;
mTargetScale = SCALE_NORMAL * mScale;
+6 -6
View File
@@ -625,7 +625,7 @@ TargetChooser * AbilityFactory::parseSimpleTC(const std::string& s, const std::s
// evaluate trigger ability
// ie auto=@attacking(mytgt):destroy target(*)
// eval only the text between the @ and the first :
TriggeredAbility * AbilityFactory::parseTrigger(string s, string magicText, int id, Spell * spell, MTGCardInstance *card,
TriggeredAbility * AbilityFactory::parseTrigger(string s, string, int id, Spell *, MTGCardInstance *card,
Targetable * target)
{
size_t found = string::npos;
@@ -3088,7 +3088,7 @@ MTGAbility * AbilityFactory::parsePhaseActionAbility(string s,MTGCardInstance *
return NEW APhaseActionGeneric(observer, id, card,_target, trim(splitActions[2]), restrictions, phase,sourceinPlay,next,myturn,opponentturn,once);
}
MTGAbility * AbilityFactory::parseChooseActionAbility(string s,MTGCardInstance * card,Spell * spell,MTGCardInstance * target, int restrictions,int id)
MTGAbility * AbilityFactory::parseChooseActionAbility(string s,MTGCardInstance * card,Spell *,MTGCardInstance * target, int, int id)
{
vector<string> splitChooseAColor2 = parseBetween(s, "activatechooseacolor ", " activatechooseend");
if (splitChooseAColor2.size())
@@ -4127,7 +4127,7 @@ void AbilityFactory::addAbilities(int _id, Spell * spell)
//ManaRedux -> manaredux(colorless,+2)
// -> manaredux(green,-2)
MTGAbility * AbilityFactory::getManaReduxAbility(string s, int id, Spell *spell, MTGCardInstance *card, MTGCardInstance *target)
MTGAbility * AbilityFactory::getManaReduxAbility(string s, int id, Spell *, MTGCardInstance *card, MTGCardInstance *target)
{
int color = -1;
string manaCost = s.substr(s.find(",") + 1);
@@ -4770,7 +4770,7 @@ int TriggeredAbility::receiveEvent(WEvent * e)
return 0;
}
void TriggeredAbility::Update(float dt)
void TriggeredAbility::Update(float)
{
if (trigger())
fireAbility();
@@ -4822,7 +4822,7 @@ InstantAbility::InstantAbility(GameObserver* observer, int _id, MTGCardInstance
init = 0;
}
void InstantAbility::Update(float dt)
void InstantAbility::Update(float)
{
if (!init)
{
@@ -4988,7 +4988,7 @@ void ListMaintainerAbility::checkTargets()
}
}
void ListMaintainerAbility::Update(float dt)
void ListMaintainerAbility::Update(float)
{
updateTargets();
}
+1 -1
View File
@@ -336,7 +336,7 @@ void MTGAllCards::init()
initCounters();
}
int MTGAllCards::load(const char * config_file, const char * set_name, int autoload)
int MTGAllCards::load(const char * config_file, const char * set_name, int)
{
conf_read_mode = 0;
const int set_id = set_name ? setlist.Add(set_name) : MTGSets::INTERNAL_SET;
+1 -1
View File
@@ -12,7 +12,7 @@ MTGGamePhase::MTGGamePhase(GameObserver* g, int id) :
mFont->SetBase(0); // using 2nd font
}
void MTGGamePhase::Update(float dt)
void MTGGamePhase::Update(float)
{
int newState = observer->getCurrentGamePhase();
if (newState != currentState)
+1 -2
View File
@@ -124,7 +124,6 @@ void MTGPlayerCards::initGame(int shuffle, int draw)
void MTGPlayerCards::OptimizedHand(Player * who,int amount, int lands, int creatures, int othercards)
{
//give the Ai hand adventage to insure a challanging match.
GameObserver * game = who->getObserver();
Player * p = dynamic_cast<Player*>(who);
MTGCardInstance * card = NULL;
MTGGameZone * z = p->game->library;
@@ -381,7 +380,7 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone
}
void MTGPlayerCards::discardRandom(MTGGameZone * from, MTGCardInstance * source)
void MTGPlayerCards::discardRandom(MTGGameZone * from, MTGCardInstance *)
{
if (!from->nb_cards)
return;
+1 -3
View File
@@ -26,7 +26,7 @@ int MTGPackEntryRandom::addCard(WSrcCards *pool, MTGDeck *to)
pool->addFilter(oldf);
return fails;
}
int MTGPackEntrySpecific::addCard(WSrcCards *pool, MTGDeck *to)
int MTGPackEntrySpecific::addCard(WSrcCards *, MTGDeck *to)
{
if (!card)
return copies;
@@ -113,8 +113,6 @@ int MTGPack::assemblePack(MTGDeck *to)
for (size_t i = 0; i < slotss.size(); i++)
{
carryover = slotss[i]->add(p, to, carryover);
if (carryover > 0)
carryover = carryover; //This means we're failing.
}
SAFE_DELETE(p);
return carryover;
+12 -12
View File
@@ -279,7 +279,7 @@ PermanentAbility(observer, _id)
aType = MTGAbility::PUT_INTO_PLAY;
}
int MTGPutInPlayRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
int MTGPutInPlayRule::isReactingToClick(MTGCardInstance * card, ManaCost *)
{
int cardsinhand = game->players[0]->game->hand->nb_cards;
Player * player = game->currentlyActing();
@@ -474,7 +474,7 @@ MTGPutInPlayRule(observer, _id)
{
aType = MTGAbility::PUT_INTO_PLAY_WITH_KICKER;
}
int MTGKickerRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
int MTGKickerRule::isReactingToClick(MTGCardInstance * card, ManaCost *)
{
if(OptionKicker::KICKER_ALWAYS == options[Options::KICKERPAYMENT].number)
return 0;
@@ -625,7 +625,7 @@ int MTGAlternativeCostRule::isReactingToClick(MTGCardInstance * card, ManaCost *
return isReactingToClick( card, mana, alternateCost );
}
int MTGAlternativeCostRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana, ManaCost *alternateManaCost)
int MTGAlternativeCostRule::isReactingToClick(MTGCardInstance * card, ManaCost *, ManaCost *alternateManaCost)
{
Player * player = game->currentlyActing();
Player * currentPlayer = game->currentPlayer;
@@ -1024,7 +1024,7 @@ MTGMorphCostRule::MTGMorphCostRule(GameObserver* observer, int _id) :
{
aType = MTGAbility::MORPH_COST;
}
int MTGMorphCostRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
int MTGMorphCostRule::isReactingToClick(MTGCardInstance * card, ManaCost *)
{
Player * player = game->currentlyActing();
@@ -1153,7 +1153,7 @@ bool MTGAttackRule::select(Target* t)
}
return false;
}
bool MTGAttackRule::greyout(Target* t)
bool MTGAttackRule::greyout(Target*)
{
return true;
}
@@ -1164,7 +1164,7 @@ PermanentAbility(observer, _id)
aType = MTGAbility::MTG_ATTACK_RULE;
}
int MTGAttackRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
int MTGAttackRule::isReactingToClick(MTGCardInstance * card, ManaCost *)
{
if (currentPhase == MTG_PHASE_COMBATATTACKERS && card->controller() == game->currentPlayer && card->controller() == game->currentlyActing())//on my turn and when I am the acting player.
{
@@ -1238,7 +1238,7 @@ PermanentAbility(observer, _id)
aType = MTGAbility::MTG_ATTACK_RULE;
}
int MTGPlaneswalkerAttackRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
int MTGPlaneswalkerAttackRule::isReactingToClick(MTGCardInstance * card, ManaCost *)
{
if (currentPhase == MTG_PHASE_COMBATATTACKERS && card->controller() == game->currentPlayer && card->controller() == game->currentlyActing())//on my turn and when I am the acting player.
{
@@ -1310,7 +1310,7 @@ bool MTGPlaneswalkerAttackRule::select(Target* t)
}
return false;
}
bool MTGPlaneswalkerAttackRule::greyout(Target* t)
bool MTGPlaneswalkerAttackRule::greyout(Target*)
{
return true;
}
@@ -1524,7 +1524,7 @@ int MTGBlockRule::receiveEvent(WEvent *e)
return 0;
}
int MTGBlockRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
int MTGBlockRule::isReactingToClick(MTGCardInstance * card, ManaCost *)
{
if (currentPhase == MTG_PHASE_COMBATBLOCKERS && !game->isInterrupting
&& card->controller() != game->currentPlayer
@@ -1652,7 +1652,7 @@ MTGMomirRule::MTGMomirRule(GameObserver* observer, int _id, MTGAllCards * _colle
textAlpha = 0;
}
int MTGMomirRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
int MTGMomirRule::isReactingToClick(MTGCardInstance * card, ManaCost *)
{
if (alreadyplayed)
return 0;
@@ -2487,7 +2487,7 @@ int MTGLegendRule::added(MTGCardInstance * card)
return 1;
}
int MTGLegendRule::removed(MTGCardInstance * card)
int MTGLegendRule::removed(MTGCardInstance *)
{
return 0;
}
@@ -2544,7 +2544,7 @@ int MTGPlaneWalkerRule::added(MTGCardInstance * card)
return 1;
}
int MTGPlaneWalkerRule::removed(MTGCardInstance * card)
int MTGPlaneWalkerRule::removed(MTGCardInstance *)
{
return 0;
}
+1 -1
View File
@@ -91,7 +91,7 @@ void MenuItem::Entering()
mTargetScale = 1.3f;
}
bool MenuItem::Leaving(JButton key)
bool MenuItem::Leaving(JButton)
{
if (mParticleSys)
mParticleSys->Stop(true);
+3 -3
View File
@@ -220,7 +220,7 @@ void OptionProfile::Render()
}
void OptionProfile::Entering(JButton key)
void OptionProfile::Entering(JButton)
{
mFocus = true;
initialValue = value;
@@ -263,7 +263,7 @@ bool OptionThemeStyle::Visible()
return (selections.size() > 1);
}
void OptionThemeStyle::confirmChange(bool confirmed)
void OptionThemeStyle::confirmChange(bool)
{
options.getStyleMan()->determineActive(NULL, NULL);
}
@@ -642,7 +642,7 @@ void OptionKey::Overlay()
btnMenu->Render();
}
void OptionKey::ButtonPressed(int controllerId, int controlId)
void OptionKey::ButtonPressed(int, int controlId)
{
to = btnList[controlId];
SAFE_DELETE(btnMenu);
+1 -1
View File
@@ -97,7 +97,7 @@ void PlayGuiObjectController::Update(float dt)
}
}
bool PlayGuiObjectController::CheckUserInput(JButton key)
bool PlayGuiObjectController::CheckUserInput(JButton)
{
/*
if (!mCount)
+1 -1
View File
@@ -94,7 +94,7 @@ void SimpleButton::Entering()
setFocus(true);
}
bool SimpleButton::Leaving(JButton key)
bool SimpleButton::Leaving(JButton)
{
checkUserClick();
setFocus(false);
+1 -1
View File
@@ -223,7 +223,7 @@ void SimplePad::MoveSelection(unsigned char moveto)
else if (moveto == KPD_INPUT) selected = KPD_INPUT;
}
void SimplePad::Update(float dt)
void SimplePad::Update(float)
{
JGE * mEngine = JGE::GetInstance();
+2 -2
View File
@@ -86,7 +86,7 @@ void SimplePopup::Update(DeckMetaData* selectedDeck)
}
string SimplePopup::getDetailedInformation(string filename)
string SimplePopup::getDetailedInformation(string)
{
ostringstream oss;
oss
@@ -120,7 +120,7 @@ string SimplePopup::getDetailedInformation(string filename)
return oss.str();
}
void SimplePopup::Update(float dt)
void SimplePopup::Update(float)
{
JButton key = mEngine->ReadButton();
CheckUserInput(key);
+5 -5
View File
@@ -62,7 +62,7 @@ float StoryText::getHeight()
return mFont->GetHeight();
}
void StoryText::Update(float dt)
void StoryText::Update(float)
{
//Nothing for now
}
@@ -90,7 +90,7 @@ void StoryReward::Render()
StoryText::Render();
}
void StoryReward::Update(float dt)
void StoryReward::Update(float)
{
if (rewardDone) return;
@@ -216,7 +216,7 @@ float StoryImage::getHeight()
return 0;
}
void StoryImage::Update(float dt)
void StoryImage::Update(float)
{
//Nothing for now
}
@@ -266,7 +266,7 @@ void StoryChoice::Entering()
mTargetScale = 1.2f;
}
bool StoryChoice::Leaving(JButton key)
bool StoryChoice::Leaving(JButton)
{
mHasFocus = false;
mTargetScale = 1.0f;
@@ -520,7 +520,7 @@ void StoryDialog::Render()
}
void StoryDialog::ButtonPressed(int controllerid, int controlid)
void StoryDialog::ButtonPressed(int, int controlid)
{
if ( controlid == kInfoMenuID )
return;
+9 -9
View File
@@ -925,7 +925,7 @@ int TargetChooser::countValidTargets()
return result;
}
bool TargetChooser::equals(TargetChooser * tc)
bool TargetChooser::equals(TargetChooser *)
{
//This function always return 1 for now, since the default TargetChooser targets everything
@@ -1276,7 +1276,7 @@ PlayerTargetChooser::PlayerTargetChooser(GameObserver *observer, MTGCardInstance
{
}
bool PlayerTargetChooser::canTarget(Targetable * target,bool withoutProtections)
bool PlayerTargetChooser::canTarget(Targetable * target,bool)
{
if (source && targetter && (targetter->controller() != targetter->controller()->opponent())
&& (targetter->controller()->opponent()->game->inPlay->hasAbility(Constants::CONTROLLERSHROUD))
@@ -1354,7 +1354,7 @@ SpellTargetChooser::SpellTargetChooser(GameObserver *observer, MTGCardInstance *
color = _color;
}
bool SpellTargetChooser::canTarget(Targetable * target,bool withoutProtections)
bool SpellTargetChooser::canTarget(Targetable * target,bool)
{
Spell * spell = dynamic_cast<Spell *>(target);
if (!spell)
@@ -1442,7 +1442,7 @@ DamageTargetChooser::DamageTargetChooser(GameObserver *observer, MTGCardInstance
state = _state;
}
bool DamageTargetChooser::canTarget(Targetable * target,bool withoutProtections)
bool DamageTargetChooser::canTarget(Targetable * target, bool)
{
if ( Damage * damage = dynamic_cast<Damage *>(target))
{
@@ -1481,12 +1481,12 @@ TriggerTargetChooser::TriggerTargetChooser(GameObserver *observer, int _triggerT
target = NULL;
}
bool TriggerTargetChooser::targetsZone(MTGGameZone * z)
bool TriggerTargetChooser::targetsZone(MTGGameZone *)
{
return true;
}
bool TriggerTargetChooser::canTarget(Targetable * _target,bool withoutProtections)
bool TriggerTargetChooser::canTarget(Targetable * _target,bool)
{
if (_target == target) return true;
return false;
@@ -1512,7 +1512,7 @@ bool TriggerTargetChooser::equals(TargetChooser * tc)
}
/*my curses */
bool myCursesChooser::canTarget(Targetable * target,bool withoutProtections)
bool myCursesChooser::canTarget(Targetable * target,bool)
{
for(unsigned int i = 0;i < source->controller()->curses.size();++i)
{
@@ -1576,7 +1576,7 @@ bool BlockableChooser::equals(TargetChooser * tc)
}
/*display cards pairable by source */
bool pairableChooser::canTarget(Targetable * target,bool withoutProtections)
bool pairableChooser::canTarget(Targetable * target,bool)
{
if (MTGCardInstance * card = dynamic_cast<MTGCardInstance*>(target))
{
@@ -1610,7 +1610,7 @@ bool pairableChooser::equals(TargetChooser * tc)
}
//*Dredge targetchooser*//
bool dredgeChooser::canTarget(Targetable * target,bool withoutProtections)
bool dredgeChooser::canTarget(Targetable * target,bool)
{
if (MTGCardInstance * card = dynamic_cast<MTGCardInstance*>(target))
{
+6 -6
View File
@@ -548,7 +548,7 @@ void TaskList::Render()
f->SetScale(1);
}
void TaskList::addRandomTask(int diff)
void TaskList::addRandomTask(int)
{
// TODO: Weighted random (rarity of tasks)
// - based on counts of finished tasks?
@@ -614,7 +614,7 @@ string TaskWinAgainst::getShortDesc()
return result;
}
bool TaskWinAgainst::isDone(GameObserver* observer, GameApp * _app)
bool TaskWinAgainst::isDone(GameObserver* observer, GameApp *)
{
AIPlayerBaka * baka = (AIPlayerBaka*) observer->players[1];
return ((baka) && (!observer->players[0]->isAI()) && (observer->players[1]->isAI()) && (observer->didWin(observer->players[0])) // Human player wins
@@ -821,7 +821,7 @@ string TaskImmortal::getShortDesc()
return buffer;
}
bool TaskImmortal::isDone(GameObserver *observer, GameApp * _app)
bool TaskImmortal::isDone(GameObserver *observer, GameApp *)
{
return (!observer->players[0]->isAI()) && (observer->players[1]->isAI()) && (observer->didWin(observer->players[0])) // Human player wins
&& (observer->players[0]->life >= targetLife);
@@ -916,7 +916,7 @@ string TaskMassiveBurial::getShortDesc()
return buffer;
}
bool TaskMassiveBurial::isDone(GameObserver* observer, GameApp * _app)
bool TaskMassiveBurial::isDone(GameObserver* observer, GameApp *)
{
int countColor = 0;
vector<MTGCardInstance *> cards = observer->players[1]->game->graveyard->cards;
@@ -1009,7 +1009,7 @@ string TaskWisdom::getShortDesc()
return buffer;
}
bool TaskWisdom::isDone(GameObserver* observer, GameApp * _app)
bool TaskWisdom::isDone(GameObserver* observer, GameApp *)
{
int countColor = 0;
vector<MTGCardInstance *> cards = observer->players[0]->game->hand->cards;
@@ -1090,7 +1090,7 @@ string TaskPacifism::getShortDesc()
return buffer;
}
bool TaskPacifism::isDone(GameObserver* observer, GameApp * _app)
bool TaskPacifism::isDone(GameObserver* observer, GameApp *)
{
return (!observer->players[0]->isAI()) && (observer->players[1]->isAI()) && (observer->didWin(observer->players[0])) // Human player wins
&& (observer->players[1]->life >= lifeSlashCardMin) && ((int) observer->players[1]->game->library->cards.size() >= lifeSlashCardMin);
+1 -1
View File
@@ -83,7 +83,7 @@ int TestSuiteAI::displayStack()
return 1;
}
int TestSuiteAI::Act(float dt)
int TestSuiteAI::Act(float)
{
observer->setLoser(NULL); // Prevent draw rule from losing the game
+1 -1
View File
@@ -329,7 +329,7 @@ void WCachedParticles::Refresh()
return;
}
bool WCachedParticles::Attempt(const string& filename, int submode, int & error)
bool WCachedParticles::Attempt(const string& filename, int, int & error)
{
JFileSystem* fileSys = JFileSystem::GetInstance();
+1 -1
View File
@@ -35,7 +35,7 @@ bool WSyncable::prev()
}
//WSrcImage
JQuadPtr WSrcImage::getImage(int offset)
JQuadPtr WSrcImage::getImage(int)
{
return WResourceManager::Instance()->RetrieveTempQuad(filename);
}
+2 -2
View File
@@ -147,7 +147,7 @@ void WLBFont::FormatText(string &s, vector<string>& output)
}
}
WFBFont::WFBFont(int inFontID, const char *fontname, int lineheight, bool useVideoRAM) :
WFBFont::WFBFont(int inFontID, const char *fontname, int lineheight, bool) :
WFont(inFontID)
{
mRenderer = JRenderer::GetInstance();
@@ -594,7 +594,7 @@ float WFBFont::GetHeight() const
}
// Legacy : GBK encoding
WGBKFont::WGBKFont(int inFontID, const char *fontname, int lineheight, bool useVideoRAM) :
WGBKFont::WGBKFont(int inFontID, const char *fontname, int lineheight, bool) :
WFBFont(inFontID)
{
mRenderer = JRenderer::GetInstance();
+4 -4
View File
@@ -80,7 +80,7 @@ bool WGuiBase::yieldFocus()
}
//WGuiItem
void WGuiItem::Entering(JButton key)
void WGuiItem::Entering(JButton)
{
mFocus = true;
}
@@ -95,7 +95,7 @@ float WGuiItem::minHeight()
return mFont->GetHeight();
}
bool WGuiItem::Leaving(JButton key)
bool WGuiItem::Leaving(JButton)
{
mFocus = false;
return true;
@@ -1496,7 +1496,7 @@ void WGuiCardImage::Render()
}
//WGuiCardDistort
WGuiCardDistort::WGuiCardDistort(WDataSource * wds, bool _thumb, WDataSource * _distort) :
WGuiCardDistort::WGuiCardDistort(WDataSource * wds, bool _thumb, WDataSource *) :
WGuiCardImage(wds, _thumb)
{
mesh = NEW hgeDistortionMesh(2, 2);
@@ -2193,7 +2193,7 @@ void WGuiFilterItem::updateValue()
}
}
void WGuiFilterItem::ButtonPressed(int controllerId, int controlId)
void WGuiFilterItem::ButtonPressed(int, int controlId)
{
if (!mParent) return;
+1 -1
View File
@@ -83,7 +83,7 @@ void RandomGenerator::loadRandValues(string s)
}
}
int WRand(bool log)
int WRand(bool)
{
return rand();
}