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
@@ -71,7 +71,7 @@ namespace boost {
}; };
template<typename InputT, typename FindResultT> template<typename InputT, typename FindResultT>
bool check_find_result(InputT& Input, FindResultT& FindResult) bool check_find_result(InputT&, FindResultT& FindResult)
{ {
typedef BOOST_STRING_TYPENAME typedef BOOST_STRING_TYPENAME
range_const_iterator<InputT>::type input_iterator_type; range_const_iterator<InputT>::type input_iterator_type;
+1 -1
View File
@@ -33,7 +33,7 @@ std::string ToHex(T* pointer)
{ \ { \
std::ostringstream stream; \ std::ostringstream stream; \
stream << inString << std::endl; \ stream << inString << std::endl; \
qDebug(stream.str().c_str()); \ qDebug("%s", stream.str().c_str()); \
} }
#elif defined (ANDROID) #elif defined (ANDROID)
#include <android/log.h> #include <android/log.h>
+1 -1
View File
@@ -61,7 +61,7 @@ public:
virtual bool ButtonPressed(); // action button pressed, return false to ignore virtual bool ButtonPressed(); // action button pressed, return false to ignore
// Used for mouse support so that the GUI engine can found out which Object was selected // Used for mouse support so that the GUI engine can found out which Object was selected
virtual bool getTopLeft(float& top, float& left) virtual bool getTopLeft(float&, float&)
{ {
return false; return false;
} }
+1 -1
View File
@@ -73,7 +73,7 @@ public:
Q_INVOKABLE qint64 getTick() { Q_INVOKABLE qint64 getTick() {
return g_startTimer.elapsed(); return g_startTimer.elapsed();
}; };
Q_INVOKABLE void doScroll(int x, int y, int magnitude) { Q_INVOKABLE void doScroll(int x, int y, int) {
m_engine->Scroll(x, y); m_engine->Scroll(x, y);
}; };
int getNominalHeight(){ return SCREEN_HEIGHT;}; int getNominalHeight(){ return SCREEN_HEIGHT;};
+6 -1
View File
@@ -591,6 +591,8 @@ void JGE::SendCommand(string command)
sendJNICommand(command); sendJNICommand(command);
#elif defined (IOS) #elif defined (IOS)
SendCommand(command, ""); SendCommand(command, "");
#else
cerr << command;
#endif #endif
} }
@@ -602,6 +604,8 @@ void JGE::SendCommand(std::string command, std::string parameter)
[delegate handleWEngineCommand:[NSString stringWithCString: command.c_str() encoding: NSUTF8StringEncoding] [delegate handleWEngineCommand:[NSString stringWithCString: command.c_str() encoding: NSUTF8StringEncoding]
withParameter: [NSString stringWithCString: parameter.c_str() encoding:NSUTF8StringEncoding]]; withParameter: [NSString stringWithCString: parameter.c_str() encoding:NSUTF8StringEncoding]];
#else
cerr << command << " " << parameter;
#endif #endif
} }
@@ -613,6 +617,8 @@ void JGE::SendCommand(std::string command, float& x, float& y, float& width, flo
#elif IOS #elif IOS
wagicAppDelegate *delegate = [[UIApplication sharedApplication] delegate]; wagicAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
[delegate handleWEngineCommand: [NSString stringWithCString: command.c_str() encoding: NSUTF8StringEncoding] withUIParameters: x yCoordinate: y width: width height: height]; [delegate handleWEngineCommand: [NSString stringWithCString: command.c_str() encoding: NSUTF8StringEncoding] withUIParameters: x yCoordinate: y width: width height: height];
#else
cerr << command << " " << x << " " << y << " " << width << " " << height;
#endif #endif
} }
@@ -656,7 +662,6 @@ JNIEnv * JGE::getJNIEnv()
string JGE::getFileSystemLocation() string JGE::getFileSystemLocation()
{ {
char result[512];
JNIEnv * env = getJNIEnv(); JNIEnv * env = getJNIEnv();
if (env == NULL) if (env == NULL)
{ {
+2
View File
@@ -257,6 +257,8 @@ void JMD2Model::CalculateNormal(float *p1, float *p2, float *p3)
#else #else
// FIXME // FIXME
#endif #endif
#else
cerr << p1 << " " << p2 << " " << p3 << endl;
#endif #endif
} }
+2
View File
@@ -62,6 +62,8 @@ void JNetwork::getServerIp(string& aString)
memcpy(&addr, phe->h_addr_list[i], sizeof(struct in_addr)); memcpy(&addr, phe->h_addr_list[i], sizeof(struct in_addr));
aString = inet_ntoa(addr); aString = inet_ntoa(addr);
} }
#else
aString = "No clue";
#endif #endif
} }
+1 -1
View File
@@ -1,7 +1,7 @@
#define GL_GLEXT_PROTOTYPES #define GL_GLEXT_PROTOTYPES
#include <QtOpenGL> #include <QtOpenGL>
#include <QTime> #include <QTime>
#include <QtGui/QApplication> #include <QApplication>
#include <QScopedPointer> #include <QScopedPointer>
#ifdef QT_WIDGET #ifdef QT_WIDGET
#include <QWidget> #include <QWidget>
+8 -7
View File
@@ -1584,7 +1584,7 @@ void JRenderer::Plot(float x, float y, PIXEL_TYPE color)
glEnd(); glEnd();
glColor4ub(255, 255, 255, 255); glColor4ub(255, 255, 255, 255);
#else #else
// FIXME, not used cerr << x << " " << y << " " << color << endl;
#endif //#if (!defined GL_ES_VERSION_2_0) && (!defined GL_VERSION_2_0) #endif //#if (!defined GL_ES_VERSION_2_0) && (!defined GL_VERSION_2_0)
glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);
checkGlError(); checkGlError();
@@ -1606,6 +1606,7 @@ void JRenderer::PlotArray(float *x, float *y, int count, PIXEL_TYPE color)
glColor4ub(255, 255, 255, 255); glColor4ub(255, 255, 255, 255);
#else #else
// FIXME, not used // FIXME, not used
cerr << x << " " << y << " " << count << " " << " " << color << endl;
#endif //#if (!defined GL_ES_VERSION_2_0) && (!defined GL_VERSION_2_0) #endif //#if (!defined GL_ES_VERSION_2_0) && (!defined GL_VERSION_2_0)
glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);
checkGlError(); checkGlError();
@@ -2242,7 +2243,7 @@ JTexture* JRenderer::LoadTexture(const char* filename, int mode, int TextureForm
return tex; return tex;
} }
#elif (defined QT_CONFIG) #elif (defined QT_CONFIG)
JTexture* JRenderer::LoadTexture(const char* filename, int mode, int TextureFormat __attribute__((unused))) JTexture* JRenderer::LoadTexture(const char* filename, int, int)
{ {
JTexture *tex = NULL; JTexture *tex = NULL;
int rawsize = 0; int rawsize = 0;
@@ -2518,7 +2519,7 @@ void JRenderer::Enable3D()
} }
void JRenderer::SetClip(int x, int y, int width, int height) void JRenderer::SetClip(int, int, int, int)
{// NOT USED {// NOT USED
//glScissor(x, y, width, height); //glScissor(x, y, width, height);
} }
@@ -2530,25 +2531,25 @@ void JRenderer::LoadIdentity()
} }
void JRenderer::Translate(float x, float y, float z) void JRenderer::Translate(float, float, float)
{// NOT USED {// NOT USED
//glTranslatef(x, y, z); //glTranslatef(x, y, z);
} }
void JRenderer::RotateX(float angle) void JRenderer::RotateX(float)
{// NOT USED {// NOT USED
//glRotatef(angle*RAD2DEG, 1.0f, 0.0f, 0.0f); //glRotatef(angle*RAD2DEG, 1.0f, 0.0f, 0.0f);
} }
void JRenderer::RotateY(float angle) void JRenderer::RotateY(float)
{// NOT USED {// NOT USED
//glRotatef(angle*RAD2DEG, 0.0f, 1.0f, 0.0f); //glRotatef(angle*RAD2DEG, 0.0f, 1.0f, 0.0f);
} }
void JRenderer::RotateZ(float angle) void JRenderer::RotateZ(float)
{// NOT USED {// NOT USED
//glRotatef(angle*RAD2DEG, 0.0f, 0.0f, 1.0f); //glRotatef(angle*RAD2DEG, 0.0f, 0.0f, 1.0f);
} }
+9
View File
@@ -174,6 +174,7 @@ JMusic *JSoundSystem::LoadMusic(const char *fileName)
} }
return music; return music;
#else #else
cerr << fileName << endl;
return NULL; return NULL;
#endif #endif
} }
@@ -203,6 +204,9 @@ void JSoundSystem::PlayMusic(JMusic *music, bool looping)
else else
FSOUND_SetLoopMode(mChannel, FSOUND_LOOP_OFF); FSOUND_SetLoopMode(mChannel, FSOUND_LOOP_OFF);
} }
#else
music = 0;
looping = false;
#endif #endif
} }
@@ -216,6 +220,8 @@ void JSoundSystem::StopMusic(JMusic *music)
} }
#elif (defined WITH_FMOD) #elif (defined WITH_FMOD)
FSOUND_StopSound(mChannel); FSOUND_StopSound(mChannel);
#else
music = 0;
#endif #endif
} }
@@ -290,6 +296,7 @@ JSample *JSoundSystem::LoadSample(const char *fileName)
} }
return sample; return sample;
#else #else
cerr << fileName << endl;
return NULL; return NULL;
#endif #endif
} }
@@ -308,6 +315,8 @@ void JSoundSystem::PlaySample(JSample *sample)
int channel = FSOUND_PlaySound(FSOUND_FREE, sample->mSample); int channel = FSOUND_PlaySound(FSOUND_FREE, sample->mSample);
FSOUND_SetVolumeAbsolute(channel, static_cast<int>(mSampleVolume * 2.55)); FSOUND_SetVolumeAbsolute(channel, static_cast<int>(mSampleVolume * 2.55));
} }
#else
sample = 0;
#endif #endif
} }
+2 -2
View File
@@ -467,12 +467,12 @@ void WagicCore::mouseMoveEvent(QMouseEvent *event)
} }
} }
void WagicCore::showEvent ( QShowEvent * event ) void WagicCore::showEvent ( QShowEvent * )
{ {
setActive(true); setActive(true);
} }
void WagicCore::hideEvent ( QHideEvent * event ) void WagicCore::hideEvent ( QHideEvent * )
{ {
setActive(false); setActive(false);
} }
+4 -4
View File
@@ -134,7 +134,7 @@ zbuffer_stored * zbuffer_stored::close()
int zbuffer_stored::overflow(int c) int zbuffer_stored::overflow(int)
{ {
return EOF; return EOF;
} }
@@ -231,7 +231,7 @@ int zbuffer_stored::sync()
streambuf * zbuffer_stored::setbuf(char * pr, int nLength) streambuf * zbuffer_stored::setbuf(char *, int)
{ {
return NULL; return NULL;
} }
@@ -298,7 +298,7 @@ zbuffer_deflated * zbuffer_deflated::close()
int zbuffer_deflated::overflow(int c) int zbuffer_deflated::overflow(int)
{ {
return EOF; return EOF;
} }
@@ -442,7 +442,7 @@ int zbuffer_deflated::sync()
streambuf * zbuffer_deflated::setbuf(char * pr, int nLength) streambuf * zbuffer_deflated::setbuf(char *, int)
{ {
return NULL; return NULL;
} }
+7 -7
View File
@@ -30,7 +30,7 @@ public:
int modal; int modal;
int waitingForAnswer; int waitingForAnswer;
int getActivity(); int getActivity();
virtual void Update(float dt){}; virtual void Update(float){};
virtual void Render(){}; virtual void Render(){};
virtual int testDestroy() virtual int testDestroy()
{ {
@@ -42,7 +42,7 @@ public:
return 0; return 0;
} }
; ;
virtual bool CheckUserInput(JButton key) virtual bool CheckUserInput(JButton)
{ {
return false; return false;
} }
@@ -54,26 +54,26 @@ public:
virtual ~ActionElement(); virtual ~ActionElement();
virtual int isReactingToTargetClick(Targetable * card); virtual int isReactingToTargetClick(Targetable * card);
virtual int reactToTargetClick(Targetable * card); virtual int reactToTargetClick(Targetable * card);
virtual int reactToChoiceClick(Targetable * card,int choice = 0,int controlid = 0) virtual int reactToChoiceClick(Targetable *,int,int)
{ {
return 0; return 0;
} }
virtual int isReactingToClick(MTGCardInstance * card, ManaCost * man = NULL) virtual int isReactingToClick(MTGCardInstance *, ManaCost * = NULL)
{ {
return 0; return 0;
} }
; ;
virtual int stillInUse(MTGCardInstance * card) virtual int stillInUse(MTGCardInstance *)
{ {
return 0; return 0;
} }
; ;
virtual int receiveEvent(WEvent * event) virtual int receiveEvent(WEvent *)
{ {
return 0; return 0;
} }
; ;
virtual int reactToClick(MTGCardInstance * card) virtual int reactToClick(MTGCardInstance *)
{ {
return 0; return 0;
} }
+2 -2
View File
@@ -58,7 +58,7 @@ public:
mHasFocus = true; mHasFocus = true;
} }
virtual bool Leaving(JButton key) virtual bool Leaving(JButton)
{ {
mHasFocus = false; mHasFocus = false;
return true; return true;
@@ -86,7 +86,7 @@ public:
virtual const string getDisplayName() const; virtual const string getDisplayName() const;
void Render(MTGCardInstance * source, JQuad * targetQuad, string alt1, string alt2, string action, bool bigQuad = false); void Render(MTGCardInstance * source, JQuad * targetQuad, string alt1, string alt2, string action, bool bigQuad = false);
virtual int receiveEvent(WEvent * event) virtual int receiveEvent(WEvent *)
{ {
return 0; return 0;
} }
+36 -33
View File
@@ -289,8 +289,10 @@ private:
if(toughnessCheck) if(toughnessCheck)
check = cCard->toughness; check = cCard->toughness;
check > highest?highest = check:highest = highest; if(check > highest)
check <= lowest?lowest = check:lowest = lowest; highest = check;
if(check <= lowest)
lowest = check;
} }
} }
} }
@@ -1044,6 +1046,7 @@ public:
~ATutorialMessage(); ~ATutorialMessage();
//JGuiListener Implementation //JGuiListener Implementation
using JGuiObject::ButtonPressed;
void ButtonPressed(int controllerId, int controlId); void ButtonPressed(int controllerId, int controlId);
}; };
@@ -1660,7 +1663,7 @@ public:
abilitygranted = _ability; abilitygranted = _ability;
} }
int isReactingToClick(MTGCardInstance * card, ManaCost * cost = NULL) int isReactingToClick(MTGCardInstance *, ManaCost *)
{ {
//The upper level "GenericTargetAbility" takes care of the click so we always return 0 here //The upper level "GenericTargetAbility" takes care of the click so we always return 0 here
return 0; return 0;
@@ -1718,7 +1721,7 @@ public:
trigger.setColor(color); trigger.setColor(color);
} }
int isReactingToClick(MTGCardInstance * _card, ManaCost * mana = NULL) int isReactingToClick(MTGCardInstance * _card, ManaCost * = NULL)
{ {
if (_card == source && game->currentlyActing()->game->inPlay->hasCard(source)) if (_card == source && game->currentlyActing()->game->inPlay->hasCard(source))
{ {
@@ -1778,7 +1781,7 @@ public:
{ {
} }
int isReactingToClick(MTGCardInstance * _card, ManaCost * mana = NULL) int isReactingToClick(MTGCardInstance * _card, ManaCost * = NULL)
{ {
if (_card == target && game->currentlyActing()->game->inPlay->hasCard(source) && _card->isTapped()) if (_card == target && game->currentlyActing()->game->inPlay->hasCard(source) && _card->isTapped())
{ {
@@ -1989,7 +1992,7 @@ public:
aType = MTGAbility::STANDARD_PUMP; aType = MTGAbility::STANDARD_PUMP;
} }
void Update(float dt) void Update(float)
{ {
if(!nonstatic) if(!nonstatic)
return; return;
@@ -2290,7 +2293,7 @@ public:
{ {
} }
void Update(float dt) void Update(float)
{ {
if (newPhase != currentPhase && newPhase == phase && game->currentPlayer == ((MTGCardInstance *) target)->controller()) if (newPhase != currentPhase && newPhase == phase && game->currentPlayer == ((MTGCardInstance *) target)->controller())
{ {
@@ -2450,15 +2453,15 @@ public:
return 1; return 1;
} }
/////////////////section required///////////////////// /////////////////section required/////////////////////
int added(MTGCardInstance * card) int added(MTGCardInstance *)
{ {
return 1; return 1;
} }
int added(Player * p) int added(Player *)
{ {
return 1; return 1;
} }
int removed(MTGCardInstance * card) int removed(MTGCardInstance *)
{ {
return 1; return 1;
} }
@@ -2618,7 +2621,7 @@ public:
int includeSelf; int includeSelf;
map<Damageable *, MTGAbility *> skills; map<Damageable *, MTGAbility *> skills;
ATeach(GameObserver* observer, int _id, MTGCardInstance * card, TargetChooser * _tc, int _includeSelf, MTGAbility * a) : ATeach(GameObserver* observer, int _id, MTGCardInstance * card, TargetChooser * _tc, int, MTGAbility * a) :
ListMaintainerAbility(observer, _id, card), NestedAbility(a) ListMaintainerAbility(observer, _id, card), NestedAbility(a)
{ {
tc = _tc; tc = _tc;
@@ -2896,7 +2899,7 @@ public:
MTGCardInstance * myToken; MTGCardInstance * myToken;
vector<MTGAbility *> currentAbilities; vector<MTGAbility *> currentAbilities;
Player * tokenReciever; Player * tokenReciever;
ATokenCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable * _target, ManaCost * _cost, int tokenId,string starfound, WParsedInt * multiplier = NULL, ATokenCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable *, ManaCost * _cost, int tokenId,string starfound, WParsedInt * multiplier = NULL,
int who = 0,bool aLivingWeapon = false) : int who = 0,bool aLivingWeapon = false) :
ActivatedAbility(observer, _id, _source, _cost, 0), tokenId(tokenId), starfound(starfound),multiplier(multiplier), who(who),aLivingWeapon(aLivingWeapon) ActivatedAbility(observer, _id, _source, _cost, 0), tokenId(tokenId), starfound(starfound),multiplier(multiplier), who(who),aLivingWeapon(aLivingWeapon)
{ {
@@ -2906,14 +2909,13 @@ public:
battleReady = false; battleReady = false;
} }
ATokenCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable * _target, ManaCost * _cost, string sname, string stypes, int _power, int _toughness, ATokenCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable *, ManaCost * _cost, string sname, string stypes, int _power, int _toughness,
string sabilities, string starfound,WParsedInt * multiplier = NULL, int who = 0,bool aLivingWeapon = false,string spt = "") : string sabilities, string starfound,WParsedInt * multiplier = NULL, int _who = 0,bool aLivingWeapon = false,string spt = "") :
ActivatedAbility(observer, _id, _source, _cost, 0),sabilities(sabilities),starfound(starfound), multiplier(multiplier), who(who),aLivingWeapon(aLivingWeapon),spt(spt) ActivatedAbility(observer, _id, _source, _cost, 0),sabilities(sabilities),starfound(starfound), multiplier(multiplier), who(_who),aLivingWeapon(aLivingWeapon),spt(spt)
{ {
power = _power; power = _power;
toughness = _toughness; toughness = _toughness;
name = sname; name = sname;
who = who;
tokenId = 0; tokenId = 0;
aType = MTGAbility::STANDARD_TOKENCREATOR; aType = MTGAbility::STANDARD_TOKENCREATOR;
battleReady = false; battleReady = false;
@@ -3136,7 +3138,7 @@ public:
int who; int who;
MTGCardInstance * myDummy; MTGCardInstance * myDummy;
Player * abilityReciever; Player * abilityReciever;
ATargetedAbilityCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable * _target, ManaCost * _cost,string _name, string abilityToAdd, int who = 0) : ATargetedAbilityCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable *, ManaCost * _cost,string _name, string abilityToAdd, int who = 0) :
ActivatedAbility(observer, _id, _source, _cost, 0),name(_name),sabilities(abilityToAdd), who(who) ActivatedAbility(observer, _id, _source, _cost, 0),name(_name),sabilities(abilityToAdd), who(who)
{ {
} }
@@ -3242,7 +3244,7 @@ public:
return MTGAbility::addToGame(); return MTGAbility::addToGame();
} }
void Update(float dt) void Update(float)
{ {
resolve(); resolve();
} }
@@ -3432,7 +3434,7 @@ public:
return MTGAbility::addToGame(); return MTGAbility::addToGame();
} }
void Update(float dt) void Update(float)
{ {
resolve(); resolve();
} }
@@ -3518,7 +3520,7 @@ public:
return MTGAbility::addToGame(); return MTGAbility::addToGame();
} }
void Update(float dt) void Update(float)
{ {
resolve(); resolve();
} }
@@ -3930,7 +3932,7 @@ public:
} }
} }
void Update(float dt) void Update(float)
{ {
if (newPhase != currentPhase && newPhase == phase) if (newPhase != currentPhase && newPhase == phase)
{ {
@@ -3977,7 +3979,7 @@ public:
sprintf(land, "%s", _land); sprintf(land, "%s", _land);
} }
void Update(float dt) void Update(float)
{ {
if (newPhase != currentPhase && (newPhase == MTG_PHASE_COMBATBEGIN || newPhase == MTG_PHASE_COMBATATTACKERS)) if (newPhase != currentPhase && (newPhase == MTG_PHASE_COMBATBEGIN || newPhase == MTG_PHASE_COMBATATTACKERS))
{ {
@@ -4512,7 +4514,8 @@ public:
} }
} }
void Render(float dt) using TargetAbility::Render;
void Render(float)
{ {
if (waitingForAnswer) if (waitingForAnswer)
{ {
@@ -4565,7 +4568,7 @@ public:
cost = ManaCost(_cost, 1); cost = ManaCost(_cost, 1);
} }
void Update(float dt) void Update(float)
{ {
if (newPhase != currentPhase) if (newPhase != currentPhase)
{ {
@@ -4582,7 +4585,7 @@ public:
} }
} }
} }
int isReactingToClick(MTGCardInstance * _card, ManaCost * mana = NULL) int isReactingToClick(MTGCardInstance * _card, ManaCost * = NULL)
{ {
if (counters > 0 && _card == source && currentPhase == MTG_PHASE_UPKEEP) if (counters > 0 && _card == source && currentPhase == MTG_PHASE_UPKEEP)
{ {
@@ -4673,12 +4676,12 @@ public:
return 1; return 1;
} }
void Update(float dt) void Update(float)
{ {
alterDamage(); alterDamage();
} }
int isReactingToClick(MTGCardInstance * _card, ManaCost * mana = NULL) int isReactingToClick(MTGCardInstance * _card, ManaCost * = NULL)
{ {
if (_card == source && game->currentlyActing()->game->inPlay->hasCard(source) && !_card->isTapped()) if (_card == source && game->currentlyActing()->game->inPlay->hasCard(source) && !_card->isTapped())
{ {
@@ -4723,7 +4726,7 @@ public:
nbOpponents = 0; nbOpponents = 0;
} }
void Update(float dt) void Update(float)
{ {
if (newPhase != currentPhase) if (newPhase != currentPhase)
{ {
@@ -4823,7 +4826,7 @@ public:
attackedThisTurn = 1; attackedThisTurn = 1;
} }
void Update(float dt) void Update(float)
{ {
if (newPhase != currentPhase) if (newPhase != currentPhase)
{ {
@@ -4990,7 +4993,7 @@ public:
TriggeredAbility::Update(dt); TriggeredAbility::Update(dt);
} }
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL) int isReactingToClick(MTGCardInstance * card, ManaCost * = NULL)
{ {
MTGCardInstance * _target = (MTGCardInstance *) target; MTGCardInstance * _target = (MTGCardInstance *) target;
if (damagesToDealThisTurn && currentPhase == MTG_PHASE_UPKEEP && card == source && _target->controller() if (damagesToDealThisTurn && currentPhase == MTG_PHASE_UPKEEP && card == source && _target->controller()
@@ -5001,7 +5004,7 @@ public:
return 0; return 0;
} }
int reactToclick(MTGCardInstance * card) int reactToclick(MTGCardInstance *)
{ {
game->currentPlayer->getManaPool()->pay(&cost); game->currentPlayer->getManaPool()->pay(&cost);
damagesToDealThisTurn--; damagesToDealThisTurn--;
@@ -5136,7 +5139,7 @@ public:
initThisTurn = 0; initThisTurn = 0;
} }
void Update(float dt) void Update(float)
{ {
if (currentPhase == MTG_PHASE_UNTAP && game->currentPlayer == source->controller()) if (currentPhase == MTG_PHASE_UNTAP && game->currentPlayer == source->controller())
{ {
@@ -5160,7 +5163,7 @@ public:
} }
} }
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL) int isReactingToClick(MTGCardInstance * card, ManaCost * = NULL)
{ {
if (card == source && game->currentPlayer == card->controller()) if (card == source && game->currentPlayer == card->controller())
{ {
+1
View File
@@ -23,6 +23,7 @@ struct DamagerDamaged: TransientCardView
DamagerDamaged(MTGCardInstance* card, const Pos& ref, bool show, Player* damageSelecter); DamagerDamaged(MTGCardInstance* card, const Pos& ref, bool show, Player* damageSelecter);
~DamagerDamaged(); ~DamagerDamaged();
using CardGui::Render;
void Render(CombatStep mode); void Render(CombatStep mode);
}; };
+1
View File
@@ -78,6 +78,7 @@ public:
virtual void Render(); virtual void Render();
virtual void Update(float dt); virtual void Update(float dt);
using JGuiController::Add;
virtual void Add(int id, const char * Text, string desc = "", bool forceFocus = false, DeckMetaData *deckMetaData = NULL); virtual void Add(int id, const char * Text, string desc = "", bool forceFocus = false, DeckMetaData *deckMetaData = NULL);
virtual void Close(); virtual void Close();
void updateScroller(); void updateScroller();
+1 -1
View File
@@ -204,7 +204,7 @@ public:
static void sendAction(void*pThis, stringstream& in, stringstream& out); static void sendAction(void*pThis, stringstream& in, stringstream& out);
static void synchronize(void*pThis, stringstream& in, stringstream& out); static void synchronize(void*pThis, stringstream& in, stringstream& out);
static void checkSynchro(void*pxThis, stringstream& in, stringstream& out); static void checkSynchro(void*pxThis, stringstream& in, stringstream& out);
static void ignoreResponse(void*pThis, stringstream& in, stringstream& out){}; static void ignoreResponse(void*, stringstream&, stringstream&){};
static void disconnect(void*pxThis, stringstream& in, stringstream& out); static void disconnect(void*pxThis, stringstream& in, stringstream& out);
}; };
#endif #endif
+1 -1
View File
@@ -56,7 +56,7 @@ public:
virtual void Start(){} virtual void Start(){}
virtual void End(){} virtual void End(){}
virtual void OnScroll(int inXVelocity, int inYVelocity) virtual void OnScroll(int, int)
{ {
} }
+3 -3
View File
@@ -33,7 +33,7 @@ public:
GuiLayer(DuelLayers *duelLayers); GuiLayer(DuelLayers *duelLayers);
virtual ~GuiLayer(); virtual ~GuiLayer();
virtual void Update(float dt); virtual void Update(float dt);
virtual bool CheckUserInput(JButton key) virtual bool CheckUserInput(JButton)
{ {
return false; return false;
} }
@@ -48,12 +48,12 @@ public:
return 1; return 1;
} }
virtual int receiveEventPlus(WEvent * e) virtual int receiveEventPlus(WEvent *)
{ {
return 0; return 0;
} }
virtual int receiveEventMinus(WEvent * e) virtual int receiveEventMinus(WEvent *)
{ {
return 0; return 0;
} }
+1
View File
@@ -28,6 +28,7 @@ public:
int color; int color;
void Render(); void Render();
using Pos::Update;
void Update(float dt, float shift); void Update(float dt, float shift);
void Wither(); void Wither();
void Drop(); void Drop();
+8 -8
View File
@@ -144,22 +144,22 @@ public:
{ {
} }
virtual int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL) virtual int isReactingToClick(MTGCardInstance *, ManaCost *)
{ {
return 0; return 0;
} }
virtual int reactToClick(MTGCardInstance * card) virtual int reactToClick(MTGCardInstance *)
{ {
return 0; return 0;
} }
virtual int receiveEvent(WEvent * event) virtual int receiveEvent(WEvent *)
{ {
return 0; return 0;
} }
virtual void Update(float dt) virtual void Update(float)
{ {
} }
@@ -239,7 +239,7 @@ public:
return 0; return 0;
} }
virtual int triggerOnEvent(WEvent * e) virtual int triggerOnEvent(WEvent *)
{ {
return 0; return 0;
} }
@@ -369,17 +369,17 @@ public:
virtual int added(MTGCardInstance * card) = 0; virtual int added(MTGCardInstance * card) = 0;
virtual int removed(MTGCardInstance * card) = 0; virtual int removed(MTGCardInstance * card) = 0;
virtual int canBeInList(Player * p) virtual int canBeInList(Player *)
{ {
return 0; return 0;
} }
virtual int added(Player * p) virtual int added(Player *)
{ {
return 0; return 0;
} }
virtual int removed(Player * p) virtual int removed(Player *)
{ {
return 0; return 0;
} }
+1 -1
View File
@@ -42,7 +42,7 @@ public:
class MTGPackEntryNothing: public MTGPackEntry class MTGPackEntryNothing: public MTGPackEntry
{ {
public: public:
int addCard(WSrcCards * pool, MTGDeck * to) int addCard(WSrcCards *, MTGDeck *)
{ {
return 0; return 0;
} }
+3 -3
View File
@@ -32,14 +32,14 @@ public:
zoom = 1.4f; zoom = 1.4f;
} }
; ;
virtual bool Leaving(JButton key) virtual bool Leaving(JButton)
{ {
mHasFocus = false; mHasFocus = false;
zoom = 1.0; zoom = 1.0;
return true; return true;
} }
; ;
virtual bool CheckUserInput(JButton key) virtual bool CheckUserInput(JButton)
{ {
return false; return false;
} }
@@ -56,7 +56,7 @@ public:
PlayGuiObject(float desiredHeight, const Pos& ref, int inID, bool hasFocus); PlayGuiObject(float desiredHeight, const Pos& ref, int inID, bool hasFocus);
virtual void ButtonPressed(int controllerId, int controlId) {} virtual void ButtonPressed(int, int) {}
virtual bool getTopLeft(float& top, float& left) virtual bool getTopLeft(float& top, float& left)
{ {
top = actY; top = actY;
+2 -2
View File
@@ -71,7 +71,7 @@ public:
ManaCost * doesntEmpty; ManaCost * doesntEmpty;
ManaCost * poolDoesntEmpty; ManaCost * poolDoesntEmpty;
void cleanupPhase(); void cleanupPhase();
virtual int Act(float dt) virtual int Act(float)
{ {
return 0; return 0;
} }
@@ -90,7 +90,7 @@ public:
int getId(); int getId();
JQuadPtr getIcon(); JQuadPtr getIcon();
virtual int receiveEvent(WEvent * event) virtual int receiveEvent(WEvent *)
{ {
return 0; return 0;
} }
+1
View File
@@ -42,6 +42,7 @@ public:
virtual void Render(); virtual void Render();
virtual bool CheckUserInput(JButton key); virtual bool CheckUserInput(JButton key);
virtual void Update(float dt); virtual void Update(float dt);
using JGuiController::Add;
virtual void Add(int id, const char * Text, string desc = "", bool forceFocus = false); virtual void Add(int id, const char * Text, string desc = "", bool forceFocus = false);
int getmCurr(){return mCurr;} int getmCurr(){return mCurr;}
float getWidth(){return mWidth; } float getWidth(){return mWidth; }
+1 -1
View File
@@ -21,7 +21,7 @@ public:
{ {
} }
; ;
bool Leaving(JButton key) bool Leaving(JButton)
{ {
return false; return false;
} }
+2 -2
View File
@@ -53,11 +53,11 @@ public:
{ {
return 0; return 0;
} }
virtual bool targetsZone(MTGGameZone * z) virtual bool targetsZone(MTGGameZone *)
{ {
return false; return false;
} }
virtual bool targetsZone(MTGGameZone * z,MTGCardInstance * mSource) virtual bool targetsZone(MTGGameZone *,MTGCardInstance *)
{ {
return false; return false;
} }
+9 -9
View File
@@ -15,7 +15,7 @@ class JQuad;
class WSyncable class WSyncable
{ {
public: public:
WSyncable(int i = 0) WSyncable()
{ {
hooked = NULL; hooked = NULL;
currentPos = 0; currentPos = 0;
@@ -54,32 +54,32 @@ public:
{ {
} }
virtual JQuadPtr getImage(int offset = 0) virtual JQuadPtr getImage(int = 0)
{ {
return JQuadPtr(); return JQuadPtr();
} }
virtual JQuadPtr getThumb(int offset = 0) virtual JQuadPtr getThumb(int = 0)
{ {
return JQuadPtr(); return JQuadPtr();
} }
virtual MTGCard * getCard(int offset = 0, bool ignore = false) virtual MTGCard * getCard(int = 0, bool = false)
{ {
return NULL; return NULL;
} }
virtual MTGDeck * getDeck(int offset = 0) virtual MTGDeck * getDeck(int = 0)
{ {
return NULL; return NULL;
} }
virtual WDistort * getDistort(int offset = 0) virtual WDistort * getDistort(int = 0)
{ {
return NULL; return NULL;
} }
virtual bool thisCard(int mtgid) virtual bool thisCard(int)
{ {
return false; return false;
} }
@@ -160,7 +160,7 @@ public:
virtual void updateCounts() {}; virtual void updateCounts() {};
virtual void clearCounts() {}; virtual void clearCounts() {};
virtual void addCount(MTGCard * c, int qty = 1) {}; virtual void addCount(MTGCard *, int = 1) {};
//Loads into us. Calls validate() //Loads into us. Calls validate()
virtual int loadMatches(MTGAllCards* ac); //loadMatches adds the cards from something virtual int loadMatches(MTGAllCards* ac); //loadMatches adds the cards from something
@@ -208,7 +208,7 @@ public:
return active->getCard(offset, ignore); return active->getCard(offset, ignore);
} }
int Size(bool all = false) int Size(bool = false)
{ {
return active->Size(); return active->Size();
} }
+3 -1
View File
@@ -34,7 +34,7 @@ public:
virtual ~WEvent() {}; virtual ~WEvent() {};
virtual std::ostream& toString(std::ostream& out) const; virtual std::ostream& toString(std::ostream& out) const;
virtual int getValue() {return 0;}; virtual int getValue() {return 0;};
virtual Targetable * getTarget(int target) {return 0;}; virtual Targetable * getTarget(int) {return 0;};
}; };
struct WEventZoneChange : public WEvent { struct WEventZoneChange : public WEvent {
@@ -64,6 +64,7 @@ struct WEventCounters : public WEvent {
bool added; bool added;
bool removed; bool removed;
WEventCounters(Counters *counter,string name,int power, int toughness,bool added = false, bool removed = false); WEventCounters(Counters *counter,string name,int power, int toughness,bool added = false, bool removed = false);
using WEvent::getTarget;
virtual Targetable * getTarget(); virtual Targetable * getTarget();
}; };
@@ -221,6 +222,7 @@ struct WEventcardDraw : public WEvent {
WEventcardDraw(Player * player,int nb_cards); WEventcardDraw(Player * player,int nb_cards);
Player * player; Player * player;
int nb_cards; int nb_cards;
using WEvent::getTarget;
virtual Targetable * getTarget(Player * player); virtual Targetable * getTarget(Player * player);
}; };
//event for a card draw ability resolving //event for a card draw ability resolving
+2 -2
View File
@@ -42,7 +42,7 @@ public:
/** /**
Returns true if the card argument matches a certain condition. Returns true if the card argument matches a certain condition.
*/ */
virtual bool isMatch(MTGCard * c) virtual bool isMatch(MTGCard *)
{ {
return true; return true;
} }
@@ -211,7 +211,7 @@ public:
return "NULL"; return "NULL";
} }
; ;
bool isMatch(MTGCard *c) bool isMatch(MTGCard *)
{ {
return true; return true;
} }
+3 -3
View File
@@ -141,9 +141,9 @@ public:
float GetScale() const; float GetScale() const;
float GetHeight() const; float GetHeight() const;
virtual float GetStringWidth(const char *s) const; virtual float GetStringWidth(const char *s) const;
void SetTracking(float tracking) {}; void SetTracking(float) {};
void SetBase(int base) {}; void SetBase(int) {};
void FormatText(string &s, vector<string>& output) {}; void FormatText(string &, vector<string>&) {};
virtual void DrawString(const char *s, float x, float y, int align = JGETEXT_LEFT, float leftOffset = 0, float width = 0); virtual void DrawString(const char *s, float x, float y, int align = JGETEXT_LEFT, float leftOffset = 0, float width = 0);
virtual int GetCode(const u8 *ch, int *charLength) const = 0; virtual int GetCode(const u8 *ch, int *charLength) const = 0;
+16 -16
View File
@@ -108,7 +108,7 @@ public:
Note: This is ONLY called after the user presses "OK" on a WDecoConfirm dialog. See setData() Note: This is ONLY called after the user presses "OK" on a WDecoConfirm dialog. See setData()
for the standard method of changing underlying data. for the standard method of changing underlying data.
*/ */
virtual void confirmChange(bool confirmed) {}; virtual void confirmChange(bool) {};
/** /**
Returns whether or not any changes to this item would require confirmation. Can also be used to Returns whether or not any changes to this item would require confirmation. Can also be used to
validate those changes, or to perform necessary cleanup when a change fails. validate those changes, or to perform necessary cleanup when a change fails.
@@ -116,7 +116,7 @@ public:
virtual CONFIRM_TYPE needsConfirm(); virtual CONFIRM_TYPE needsConfirm();
virtual bool yieldFocus(); virtual bool yieldFocus();
virtual PIXEL_TYPE getColor(int type); virtual PIXEL_TYPE getColor(int type);
virtual float getMargin(int type) virtual float getMargin(int)
{ {
return 4; return 4;
} }
@@ -147,7 +147,7 @@ public:
*/ */
virtual void setData()=0; virtual void setData()=0;
virtual void ButtonPressed(int controllerId, int controlId) {}; virtual void ButtonPressed(int, int) {};
/** /**
Used when it is necessary to update some information. Often called from confirmChange(), but also called Used when it is necessary to update some information. Often called from confirmChange(), but also called
in other places, such as to reload the list of possible profiles after a new one is created. See OptionProfile in other places, such as to reload the list of possible profiles after a new one is created. See OptionProfile
@@ -198,19 +198,19 @@ public:
; ;
/** Sets the modality of the item, if applicable. */ /** Sets the modality of the item, if applicable. */
virtual void setModal(bool val) {}; virtual void setModal(bool) {};
virtual void setDisplay(string s) {}; virtual void setDisplay(string) {};
virtual void setX(float _x) {}; virtual void setX(float) {};
virtual void setY(float _y) {}; virtual void setY(float) {};
virtual void setWidth(float _w) {}; virtual void setWidth(float) {};
virtual void setHeight(float _h) {}; virtual void setHeight(float) {};
virtual void setId(int _id) {}; virtual void setId(int) {};
virtual void setHidden(bool bHidden){}; virtual void setHidden(bool){};
virtual void setVisible(bool bVisisble) {}; virtual void setVisible(bool) {};
virtual void renderBack(WGuiBase * it); virtual void renderBack(WGuiBase * it);
virtual void subBack(WGuiBase * item) {}; virtual void subBack(WGuiBase *) {};
virtual bool CheckUserInput(JButton key) virtual bool CheckUserInput(JButton)
{ {
return false; return false;
} }
@@ -228,7 +228,7 @@ public:
virtual void Entering(JButton key); virtual void Entering(JButton key);
virtual bool Leaving(JButton key); virtual bool Leaving(JButton key);
virtual bool CheckUserInput(JButton key); virtual bool CheckUserInput(JButton key);
virtual void Update(float dt) {}; virtual void Update(float) {};
virtual void Render(); virtual void Render();
WGuiItem(string _display, u8 _mF = 0); WGuiItem(string _display, u8 _mF = 0);
@@ -287,7 +287,7 @@ public:
; ;
virtual float minWidth(); virtual float minWidth();
virtual float minHeight(); virtual float minHeight();
virtual void setId(int _id) {}; virtual void setId(int) {};
virtual void setX(float _x) virtual void setX(float _x)
{ {
x = _x; x = _x;
@@ -12,7 +12,7 @@
#include <QtCore/QDir> #include <QtCore/QDir>
#include <QtCore/QFileInfo> #include <QtCore/QFileInfo>
#include <QtGui/QApplication> #include <QApplication>
#include <QtDeclarative/QDeclarativeComponent> #include <QtDeclarative/QDeclarativeComponent>
#include <QtDeclarative/QDeclarativeEngine> #include <QtDeclarative/QDeclarativeEngine>
#include <QtDeclarative/QDeclarativeContext> #include <QtDeclarative/QDeclarativeContext>
@@ -114,7 +114,7 @@ void QmlApplicationViewer::addImportPath(const QString &path)
engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path)); engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path));
} }
void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) void QmlApplicationViewer::setOrientation(ScreenOrientation)
{ {
#if defined(Q_OS_SYMBIAN) #if defined(Q_OS_SYMBIAN)
// If the version of Qt on the device is < 4.7.2, that attribute won't work // If the version of Qt on the device is < 4.7.2, that attribute won't work
@@ -126,7 +126,7 @@ void QmlApplicationViewer::setOrientation(ScreenOrientation orientation)
} }
} }
#endif // Q_OS_SYMBIAN #endif // Q_OS_SYMBIAN
/*
Qt::WidgetAttribute attribute; Qt::WidgetAttribute attribute;
switch (orientation) { switch (orientation) {
#if QT_VERSION < 0x040702 #if QT_VERSION < 0x040702
@@ -152,9 +152,10 @@ void QmlApplicationViewer::setOrientation(ScreenOrientation orientation)
case ScreenOrientationAuto: case ScreenOrientationAuto:
attribute = Qt::WA_AutoOrientation; attribute = Qt::WA_AutoOrientation;
break; break;
#endif // QT_VERSION < 0x040702 #endif // QT_VERSION < 0x040702
}; };
setAttribute(attribute, true); setAttribute(attribute, true);*/
} }
void QmlApplicationViewer::showExpanded() void QmlApplicationViewer::showExpanded()
+3 -3
View File
@@ -138,7 +138,7 @@ AIPlayer::~AIPlayer()
} }
int AIPlayer::Act(float dt) int AIPlayer::Act(float)
{ {
if (observer->currentPlayer == this) if (observer->currentPlayer == this)
observer->userRequestNextGamePhase(); observer->userRequestNextGamePhase();
@@ -183,7 +183,7 @@ int AIPlayer::clickMultiTarget(TargetChooser * tc, vector<Targetable*>& potentia
return 1; 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(); int i = randomGenerator.random() % potentialTargets.size();
@@ -248,7 +248,7 @@ AIPlayer * AIPlayerFactory::createAIPlayer(GameObserver *observer, MTGAllCards *
return baka; return baka;
} }
int AIPlayer::receiveEvent(WEvent * event) int AIPlayer::receiveEvent(WEvent *)
{ {
return 0; 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; MTGPlayerCards * playerZones = source->controller()->game;
if (comboHint && comboHint->cardTargets.size()) 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; stringstream stream;
for(size_t i = 0; i < abilitiesMenu->mObjects.size(); i++) for(size_t i = 0; i < abilitiesMenu->mObjects.size(); i++)
-1
View File
@@ -308,7 +308,6 @@ int Spell::resolve()
{ {
Player * p = source->controller(); Player * p = source->controller();
int castMethod = source->castMethod; int castMethod = source->castMethod;
Player * playerT = source->playerTarget;
vector<Targetable*>backupTgt = source->backupTargets; vector<Targetable*>backupTgt = source->backupTargets;
source = p->game->putInZone(source, from, p->game->battlefield); 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. //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) MTGAbility(observer, id, source),csTc(tc),counter(counter),re(NULL)
{ {
} }
@@ -732,7 +732,7 @@ AARemoveAllCounter * AARemoveAllCounter::clone() const
} }
//proliferate a target //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) ActivatedAbility(observer, id, source, cost, 0)
{ {
this->GetId(); this->GetId();
@@ -789,7 +789,7 @@ AAProliferate::~AAProliferate()
} }
// //
//choosing a type or color //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) ActivatedAbility(observer, id, source, cost, 0), baseAbility(_toAdd),chooseColor(chooseColor),ANonWall(nonwall)
{ {
this->GetId(); this->GetId();
@@ -973,8 +973,8 @@ AASetTypeChosen::~AASetTypeChosen()
// //
//choosing a type or color //choosing a type or color
GenericFlipACoin::GenericFlipACoin(GameObserver* observer, int id, MTGCardInstance * source, Targetable * target,string _toAdd, ManaCost * cost) : GenericFlipACoin::GenericFlipACoin(GameObserver* observer, int id, MTGCardInstance * source, Targetable *,string _toAdd, ManaCost * cost) :
ActivatedAbility(observer, id, source, cost, 0), baseAbility(_toAdd),chooseColor(chooseColor) ActivatedAbility(observer, id, source, cost, 0), baseAbility(_toAdd),chooseColor(true)
{ {
this->GetId(); this->GetId();
setCoin = NULL; setCoin = NULL;
@@ -1881,28 +1881,23 @@ int AADynamic::resolve()
break; break;
case DYNAMIC_ABILITY_WHO_ITSELF: case DYNAMIC_ABILITY_WHO_ITSELF:
source = ((MTGCardInstance *) _target); source = ((MTGCardInstance *) _target);
_target = _target;
break; break;
case DYNAMIC_ABILITY_WHO_TARGETCONTROLLER: case DYNAMIC_ABILITY_WHO_TARGETCONTROLLER:
_target = _target;
secondaryTarget = ((MTGCardInstance *) _target)->controller(); secondaryTarget = ((MTGCardInstance *) _target)->controller();
break; break;
case DYNAMIC_ABILITY_WHO_TARGETOPPONENT: case DYNAMIC_ABILITY_WHO_TARGETOPPONENT:
_target = _target;
secondaryTarget = ((MTGCardInstance *) _target)->controller()->opponent(); secondaryTarget = ((MTGCardInstance *) _target)->controller()->opponent();
break; break;
case DYNAMIC_ABILITY_WHO_TOSOURCE: case DYNAMIC_ABILITY_WHO_TOSOURCE:
tosrc = true; tosrc = true;
break; break;
case DYNAMIC_ABILITY_WHO_SOURCECONTROLLER: case DYNAMIC_ABILITY_WHO_SOURCECONTROLLER:
_target = _target;
secondaryTarget = ((MTGCardInstance *) OriginalSrc)->controller(); secondaryTarget = ((MTGCardInstance *) OriginalSrc)->controller();
break; break;
case DYNAMIC_ABILITY_WHO_SOURCEOPPONENT: case DYNAMIC_ABILITY_WHO_SOURCEOPPONENT:
secondaryTarget = OriginalSrc->controller()->opponent(); secondaryTarget = OriginalSrc->controller()->opponent();
break; break;
default: default:
_target = _target;
break; break;
} }
if(amountsource == DYNAMIC_MYSELF_AMOUNT) if(amountsource == DYNAMIC_MYSELF_AMOUNT)
@@ -2112,7 +2107,7 @@ int AADynamic::resolve()
return 0; return 0;
} }
int AADynamic::activateMainAbility(MTGAbility * toActivate,MTGCardInstance * source , Damageable * target) int AADynamic::activateMainAbility(MTGAbility * toActivate,MTGCardInstance * , Damageable *)
{ {
if(storedAbility) if(storedAbility)
activateStored(); activateStored();
@@ -2867,7 +2862,6 @@ int AARemoveMana::resolve()
{ {
if (player->doesntEmpty->getConvertedCost() && !player->poolDoesntEmpty->getConvertedCost()) if (player->doesntEmpty->getConvertedCost() && !player->poolDoesntEmpty->getConvertedCost())
{ {
ManaCost * toRemove = manaPool->Diff(player->doesntEmpty);
player->getManaPool()->pay(manaPool->Diff(player->doesntEmpty)); player->getManaPool()->pay(manaPool->Diff(player->doesntEmpty));
return 1; return 1;
} }
@@ -2994,7 +2988,7 @@ AAUntapper * AAUntapper::clone() const
return NEW AAUntapper(*this); 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) 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(); testDestroy();
return; return;
@@ -3334,7 +3328,7 @@ int MenuAbility::testDestroy()
} }
int MenuAbility::isReactingToTargetClick(Targetable * card){return MayAbility::isReactingToTargetClick(card);} 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) int MenuAbility::reactToChoiceClick(Targetable * object,int choice,int control)
{ {
@@ -3938,7 +3932,7 @@ for (it = types.begin(); it != types.end(); it++)
return MTGAbility::addToGame(); 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()) if(!rtarget->counters || !rtarget->counters->counters.size())
return 0; return 0;
@@ -4478,7 +4472,7 @@ APreventDamageTypesUEOT::~APreventDamageTypesUEOT()
} }
//AVanishing creature also fading //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) MTGAbility(observer, _id, source, target),amount(amount),counterName(counterName)
{ {
target = card; target = card;
@@ -4657,7 +4651,7 @@ AUpkeep::~AUpkeep()
} }
//A Phase based Action //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) MTGAbility(observer, _id, card),sAbility(sAbility), phase(_phase),forcedestroy(forcedestroy),next(next),myturn(myturn),opponentturn(opponentturn),once(once)
{ {
abilityId = _id; abilityId = _id;
@@ -5029,7 +5023,7 @@ ABlinkGeneric::~ABlinkGeneric()
} }
// target becomes blocked by source // 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) InstantAbility(observer, id, card, target)
{ {
target = _target; target = _target;
@@ -5053,7 +5047,7 @@ AABlock * AABlock::clone() const
} }
// target becomes pair of source // 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) InstantAbility(observer, id, card, target)
{ {
target = _target; target = _target;
@@ -5078,7 +5072,7 @@ PairCard * PairCard::clone() const
return NEW PairCard(*this); return NEW PairCard(*this);
} }
//target is dredged //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) InstantAbility(observer, id, card, target)
{ {
target = _target; target = _target;
@@ -5108,7 +5102,7 @@ dredgeCard * dredgeCard::clone() const
} }
// target becomes a parent of card(source) // 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) InstantAbility(observer, id, card, target)
{ {
target = _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? //TODO : cancel ALL tips/tutorials for JGE_BTN_SEC?
if (mLimit) if (mLimit)
+1 -1
View File
@@ -44,7 +44,7 @@ struct Diff: public Exp
}; };
struct True: 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; return true;
} }
-1
View File
@@ -232,7 +232,6 @@ int DeckManager::getDifficultyRating(Player *statsPlayer, Player *player)
if (meta) if (meta)
{ {
int diff = meta->getVictoryPercentage();
meta->mPlayerDeck = statsPlayer->GetCurrentDeckStatsFile(); meta->mPlayerDeck = statsPlayer->GetCurrentDeckStatsFile();
meta->mStatsFilename = player->deckFileSmall; meta->mStatsFilename = player->deckFileSmall;
meta->LoadStats(); meta->LoadStats();
+1 -1
View File
@@ -37,7 +37,7 @@ hgeParticleSystem* DeckMenu::stars = NULL;
// TODO: // TODO:
// *** Need to make this configurable in a file somewhere to allow for class reuse // *** 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 ) JGuiController(JGE::GetInstance(), id, listener), fontId(fontId), mShowDetailsScreen( showDetailsOverride )
{ {
+1 -1
View File
@@ -148,7 +148,7 @@ void DeckMenuItem::Entering()
parent->mSelectionTargetY = mY; 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. // check to see if the user clicked on the object, if so return true.
checkUserClick(); checkUserClick();
+4 -4
View File
@@ -1963,7 +1963,7 @@ NetworkGameObserver::~NetworkGameObserver()
mpNetworkSession->sendCommand("disconnect", ""); mpNetworkSession->sendCommand("disconnect", "");
} }
void NetworkGameObserver::disconnect(void*pxThis, stringstream& in, stringstream& out) void NetworkGameObserver::disconnect(void*pxThis, stringstream&, stringstream&)
{ {
NetworkGameObserver* pThis = (NetworkGameObserver*)pxThis; NetworkGameObserver* pThis = (NetworkGameObserver*)pxThis;
pThis->setLoser(pThis->getView()->getRenderedPlayerOpponent()); pThis->setLoser(pThis->getView()->getRenderedPlayerOpponent());
@@ -1983,7 +1983,7 @@ void NetworkGameObserver::loadPlayer(int playerId, Player* player)
mpNetworkSession->sendCommand("loadPlayer", out.str()); 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; NetworkGameObserver* pThis = (NetworkGameObserver*)pxThis;
Player* pPlayer = 0; 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; NetworkGameObserver* pThis = (NetworkGameObserver*)pxThis;
@@ -2038,7 +2038,7 @@ void NetworkGameObserver::checkSynchro(void*pxThis, stringstream& in, stringstre
assert(aGame == *pThis); assert(aGame == *pThis);
} }
void NetworkGameObserver::sendAction(void*pxThis, stringstream& in, stringstream& out) void NetworkGameObserver::sendAction(void*pxThis, stringstream& in, stringstream&)
{ {
NetworkGameObserver* pThis = (NetworkGameObserver*)pxThis; NetworkGameObserver* pThis = (NetworkGameObserver*)pxThis;
+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) 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++) for (int j = 0; j < Constants::NB_Colors - 1; j++)
{ {
curCount = stw->countBasicLandsPerColor[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); font->DrawString(buffer, 49 + leftTransition + j * 15, posY);
curCount = stw->countLandsPerColor[j]; 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); font->DrawString(buffer, 49 + leftTransition + j * 15, posY + 10);
curCount = stw->countNonLandProducersPerColor[j]; 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); font->DrawString(buffer, 49 + leftTransition + j * 15, posY + 20);
curCount = stw->countLandsPerColor[j] + stw->countBasicLandsPerColor[j] + stw->countNonLandProducersPerColor[j]; 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); font->DrawString(buffer, 49 + leftTransition + j * 15, posY + 33);
} }
+2 -2
View File
@@ -766,9 +766,9 @@ void GameStateMenu::Render()
else else
{ {
if (primitivesLoadCounter <= (int) (primitives.size())) if (primitivesLoadCounter <= (int) (primitives.size()))
sprintf(text, _("LOADING PRIMITIVES").c_str()); sprintf(text, "%s", _("LOADING PRIMITIVES").c_str());
else else
sprintf(text, _("LOADING...").c_str()); sprintf(text, "%s", _("LOADING...").c_str());
} }
mFont->SetColor(ARGB(170,0,0,0)); mFont->SetColor(ARGB(170,0,0,0));
mFont->DrawString(text, SCREEN_WIDTH / 2 + 2, SCREEN_HEIGHT - 50 + 2, JGETEXT_CENTER); 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 WCFilterRarity("T")));
srcCards->addFilter(NEW WCFilterNOT(NEW WCFilterSet(MTGSets::INTERNAL_SET))); srcCards->addFilter(NEW WCFilterNOT(NEW WCFilterSet(MTGSets::INTERNAL_SET)));
bigSync = 0;
shopMenu = NEW WGuiMenu(JGE_BTN_DOWN, JGE_BTN_UP, true, &bigSync); shopMenu = NEW WGuiMenu(JGE_BTN_DOWN, JGE_BTN_UP, true, &bigSync);
MTGAllCards * ac = MTGCollection(); MTGAllCards * ac = MTGCollection();
playerdata = NEW PlayerData(ac); playerdata = NEW PlayerData(ac);
@@ -265,7 +264,7 @@ void GameStateShop::cancelCard(int controlId)
//Prices do not immediately go down when you ignore something. //Prices do not immediately go down when you ignore something.
return; return;
} }
void GameStateShop::cancelBooster(int controlId) void GameStateShop::cancelBooster(int)
{ {
return; //TODO FIXME Tie boosters into pricelist. return; //TODO FIXME Tie boosters into pricelist.
} }
@@ -867,7 +866,7 @@ void GameStateShop::ButtonPressed(int controllerId, int controlId)
menu->Close(); 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 // we ignore magnitude since there isn't any scrolling in the shop
if (abs(inXVelocity) > 200) if (abs(inXVelocity) > 200)
@@ -980,7 +979,7 @@ int ShopBooster::maxInventory()
return 2; return 2;
return 5; return 5;
} }
void ShopBooster::addToDeck(MTGDeck * d, WSrcCards * srcCards) void ShopBooster::addToDeck(MTGDeck * d, WSrcCards *)
{ {
if (!pack) if (!pack)
{ //A combination booster. { //A combination booster.
+3 -3
View File
@@ -18,7 +18,7 @@ const float kZoom_level3 = 2.7f;
struct True: public Exp struct True: public Exp
{ {
static inline bool test(DamagerDamaged* ref, DamagerDamaged* test) static inline bool test(DamagerDamaged*, DamagerDamaged*)
{ {
return true; return true;
} }
@@ -90,7 +90,7 @@ void GuiCombat::Update(float dt)
enemy_avatar.Update(dt); enemy_avatar.Update(dt);
} }
void GuiCombat::remaskBlkViews(AttackerDamaged* before, AttackerDamaged* after) void GuiCombat::remaskBlkViews(AttackerDamaged*, AttackerDamaged* after)
{ {
if (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); blocker->addDamage(-1, activeAtk);
for (vector<DamagerDamaged*>::iterator it = activeAtk->blockers.begin(); it != activeAtk->blockers.end(); ++it) 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 else
return false; return false;
} }
bool HandLimitor::greyout(Target* t) bool HandLimitor::greyout(Target*)
{ {
return true; return true;
} }
+2 -2
View File
@@ -33,7 +33,7 @@ namespace
const float ICONSCALE = 1.5; const float ICONSCALE = 1.5;
const float CENTER = SCREEN_HEIGHT_F / 2 + 10; 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))); float xPos = static_cast<float> ((inP + inGlyph * (int) (kWidth + 1)) % (kPhases * (int) (kWidth + 1)));
inQuad->SetTextureRect(xPos, 0, kWidth, kHeight); inQuad->SetTextureRect(xPos, 0, kWidth, kHeight);
@@ -87,7 +87,7 @@ void GuiPhaseBar::Entering()
zoom = 1.4f*ICONSCALE; zoom = 1.4f*ICONSCALE;
} }
bool GuiPhaseBar::Leaving(JButton key) bool GuiPhaseBar::Leaving(JButton)
{ {
mHasFocus = false; mHasFocus = false;
zoom = ICONSCALE; zoom = ICONSCALE;
+2 -2
View File
@@ -13,7 +13,7 @@ void GuiStatic::Entering()
parent->Activate(this); parent->Activate(this);
} }
bool GuiStatic::Leaving(JButton key) bool GuiStatic::Leaving(JButton)
{ {
parent->Deactivate(this); parent->Deactivate(this);
return false; return false;
@@ -186,7 +186,7 @@ void GuiGameZone::Render()
PlayGuiObject::Render(); PlayGuiObject::Render();
} }
void GuiGameZone::ButtonPressed(int controllerId, int controlId) void GuiGameZone::ButtonPressed(int, int)
{ {
zone->owner->getObserver()->ButtonPressed(this); zone->owner->getObserver()->ButtonPressed(this);
} }
+1 -1
View File
@@ -109,7 +109,7 @@ void IconButton::Entering()
mTargetScale = SCALE_SELECTED * mScale; mTargetScale = SCALE_SELECTED * mScale;
} }
bool IconButton::Leaving(JButton key) bool IconButton::Leaving(JButton)
{ {
mHasFocus = false; mHasFocus = false;
mTargetScale = SCALE_NORMAL * mScale; 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 // evaluate trigger ability
// ie auto=@attacking(mytgt):destroy target(*) // ie auto=@attacking(mytgt):destroy target(*)
// eval only the text between the @ and the first : // 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) Targetable * target)
{ {
size_t found = string::npos; 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); 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"); vector<string> splitChooseAColor2 = parseBetween(s, "activatechooseacolor ", " activatechooseend");
if (splitChooseAColor2.size()) if (splitChooseAColor2.size())
@@ -4127,7 +4127,7 @@ void AbilityFactory::addAbilities(int _id, Spell * spell)
//ManaRedux -> manaredux(colorless,+2) //ManaRedux -> manaredux(colorless,+2)
// -> manaredux(green,-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; int color = -1;
string manaCost = s.substr(s.find(",") + 1); string manaCost = s.substr(s.find(",") + 1);
@@ -4770,7 +4770,7 @@ int TriggeredAbility::receiveEvent(WEvent * e)
return 0; return 0;
} }
void TriggeredAbility::Update(float dt) void TriggeredAbility::Update(float)
{ {
if (trigger()) if (trigger())
fireAbility(); fireAbility();
@@ -4822,7 +4822,7 @@ InstantAbility::InstantAbility(GameObserver* observer, int _id, MTGCardInstance
init = 0; init = 0;
} }
void InstantAbility::Update(float dt) void InstantAbility::Update(float)
{ {
if (!init) if (!init)
{ {
@@ -4988,7 +4988,7 @@ void ListMaintainerAbility::checkTargets()
} }
} }
void ListMaintainerAbility::Update(float dt) void ListMaintainerAbility::Update(float)
{ {
updateTargets(); updateTargets();
} }
+1 -1
View File
@@ -336,7 +336,7 @@ void MTGAllCards::init()
initCounters(); 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; conf_read_mode = 0;
const int set_id = set_name ? setlist.Add(set_name) : MTGSets::INTERNAL_SET; 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 mFont->SetBase(0); // using 2nd font
} }
void MTGGamePhase::Update(float dt) void MTGGamePhase::Update(float)
{ {
int newState = observer->getCurrentGamePhase(); int newState = observer->getCurrentGamePhase();
if (newState != currentState) 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) void MTGPlayerCards::OptimizedHand(Player * who,int amount, int lands, int creatures, int othercards)
{ {
//give the Ai hand adventage to insure a challanging match. //give the Ai hand adventage to insure a challanging match.
GameObserver * game = who->getObserver();
Player * p = dynamic_cast<Player*>(who); Player * p = dynamic_cast<Player*>(who);
MTGCardInstance * card = NULL; MTGCardInstance * card = NULL;
MTGGameZone * z = p->game->library; 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) if (!from->nb_cards)
return; return;
+1 -3
View File
@@ -26,7 +26,7 @@ int MTGPackEntryRandom::addCard(WSrcCards *pool, MTGDeck *to)
pool->addFilter(oldf); pool->addFilter(oldf);
return fails; return fails;
} }
int MTGPackEntrySpecific::addCard(WSrcCards *pool, MTGDeck *to) int MTGPackEntrySpecific::addCard(WSrcCards *, MTGDeck *to)
{ {
if (!card) if (!card)
return copies; return copies;
@@ -113,8 +113,6 @@ int MTGPack::assemblePack(MTGDeck *to)
for (size_t i = 0; i < slotss.size(); i++) for (size_t i = 0; i < slotss.size(); i++)
{ {
carryover = slotss[i]->add(p, to, carryover); carryover = slotss[i]->add(p, to, carryover);
if (carryover > 0)
carryover = carryover; //This means we're failing.
} }
SAFE_DELETE(p); SAFE_DELETE(p);
return carryover; return carryover;
+12 -12
View File
@@ -279,7 +279,7 @@ PermanentAbility(observer, _id)
aType = MTGAbility::PUT_INTO_PLAY; 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; int cardsinhand = game->players[0]->game->hand->nb_cards;
Player * player = game->currentlyActing(); Player * player = game->currentlyActing();
@@ -474,7 +474,7 @@ MTGPutInPlayRule(observer, _id)
{ {
aType = MTGAbility::PUT_INTO_PLAY_WITH_KICKER; 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) if(OptionKicker::KICKER_ALWAYS == options[Options::KICKERPAYMENT].number)
return 0; return 0;
@@ -625,7 +625,7 @@ int MTGAlternativeCostRule::isReactingToClick(MTGCardInstance * card, ManaCost *
return isReactingToClick( card, mana, alternateCost ); 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 * player = game->currentlyActing();
Player * currentPlayer = game->currentPlayer; Player * currentPlayer = game->currentPlayer;
@@ -1024,7 +1024,7 @@ MTGMorphCostRule::MTGMorphCostRule(GameObserver* observer, int _id) :
{ {
aType = MTGAbility::MORPH_COST; aType = MTGAbility::MORPH_COST;
} }
int MTGMorphCostRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana) int MTGMorphCostRule::isReactingToClick(MTGCardInstance * card, ManaCost *)
{ {
Player * player = game->currentlyActing(); Player * player = game->currentlyActing();
@@ -1153,7 +1153,7 @@ bool MTGAttackRule::select(Target* t)
} }
return false; return false;
} }
bool MTGAttackRule::greyout(Target* t) bool MTGAttackRule::greyout(Target*)
{ {
return true; return true;
} }
@@ -1164,7 +1164,7 @@ PermanentAbility(observer, _id)
aType = MTGAbility::MTG_ATTACK_RULE; 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. 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; 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. 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; return false;
} }
bool MTGPlaneswalkerAttackRule::greyout(Target* t) bool MTGPlaneswalkerAttackRule::greyout(Target*)
{ {
return true; return true;
} }
@@ -1524,7 +1524,7 @@ int MTGBlockRule::receiveEvent(WEvent *e)
return 0; return 0;
} }
int MTGBlockRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana) int MTGBlockRule::isReactingToClick(MTGCardInstance * card, ManaCost *)
{ {
if (currentPhase == MTG_PHASE_COMBATBLOCKERS && !game->isInterrupting if (currentPhase == MTG_PHASE_COMBATBLOCKERS && !game->isInterrupting
&& card->controller() != game->currentPlayer && card->controller() != game->currentPlayer
@@ -1652,7 +1652,7 @@ MTGMomirRule::MTGMomirRule(GameObserver* observer, int _id, MTGAllCards * _colle
textAlpha = 0; textAlpha = 0;
} }
int MTGMomirRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana) int MTGMomirRule::isReactingToClick(MTGCardInstance * card, ManaCost *)
{ {
if (alreadyplayed) if (alreadyplayed)
return 0; return 0;
@@ -2487,7 +2487,7 @@ int MTGLegendRule::added(MTGCardInstance * card)
return 1; return 1;
} }
int MTGLegendRule::removed(MTGCardInstance * card) int MTGLegendRule::removed(MTGCardInstance *)
{ {
return 0; return 0;
} }
@@ -2544,7 +2544,7 @@ int MTGPlaneWalkerRule::added(MTGCardInstance * card)
return 1; return 1;
} }
int MTGPlaneWalkerRule::removed(MTGCardInstance * card) int MTGPlaneWalkerRule::removed(MTGCardInstance *)
{ {
return 0; return 0;
} }
+1 -1
View File
@@ -91,7 +91,7 @@ void MenuItem::Entering()
mTargetScale = 1.3f; mTargetScale = 1.3f;
} }
bool MenuItem::Leaving(JButton key) bool MenuItem::Leaving(JButton)
{ {
if (mParticleSys) if (mParticleSys)
mParticleSys->Stop(true); 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; mFocus = true;
initialValue = value; initialValue = value;
@@ -263,7 +263,7 @@ bool OptionThemeStyle::Visible()
return (selections.size() > 1); return (selections.size() > 1);
} }
void OptionThemeStyle::confirmChange(bool confirmed) void OptionThemeStyle::confirmChange(bool)
{ {
options.getStyleMan()->determineActive(NULL, NULL); options.getStyleMan()->determineActive(NULL, NULL);
} }
@@ -642,7 +642,7 @@ void OptionKey::Overlay()
btnMenu->Render(); btnMenu->Render();
} }
void OptionKey::ButtonPressed(int controllerId, int controlId) void OptionKey::ButtonPressed(int, int controlId)
{ {
to = btnList[controlId]; to = btnList[controlId];
SAFE_DELETE(btnMenu); 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) if (!mCount)
+1 -1
View File
@@ -94,7 +94,7 @@ void SimpleButton::Entering()
setFocus(true); setFocus(true);
} }
bool SimpleButton::Leaving(JButton key) bool SimpleButton::Leaving(JButton)
{ {
checkUserClick(); checkUserClick();
setFocus(false); setFocus(false);
+1 -1
View File
@@ -223,7 +223,7 @@ void SimplePad::MoveSelection(unsigned char moveto)
else if (moveto == KPD_INPUT) selected = KPD_INPUT; else if (moveto == KPD_INPUT) selected = KPD_INPUT;
} }
void SimplePad::Update(float dt) void SimplePad::Update(float)
{ {
JGE * mEngine = JGE::GetInstance(); 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; ostringstream oss;
oss oss
@@ -120,7 +120,7 @@ string SimplePopup::getDetailedInformation(string filename)
return oss.str(); return oss.str();
} }
void SimplePopup::Update(float dt) void SimplePopup::Update(float)
{ {
JButton key = mEngine->ReadButton(); JButton key = mEngine->ReadButton();
CheckUserInput(key); CheckUserInput(key);
+5 -5
View File
@@ -62,7 +62,7 @@ float StoryText::getHeight()
return mFont->GetHeight(); return mFont->GetHeight();
} }
void StoryText::Update(float dt) void StoryText::Update(float)
{ {
//Nothing for now //Nothing for now
} }
@@ -90,7 +90,7 @@ void StoryReward::Render()
StoryText::Render(); StoryText::Render();
} }
void StoryReward::Update(float dt) void StoryReward::Update(float)
{ {
if (rewardDone) return; if (rewardDone) return;
@@ -216,7 +216,7 @@ float StoryImage::getHeight()
return 0; return 0;
} }
void StoryImage::Update(float dt) void StoryImage::Update(float)
{ {
//Nothing for now //Nothing for now
} }
@@ -266,7 +266,7 @@ void StoryChoice::Entering()
mTargetScale = 1.2f; mTargetScale = 1.2f;
} }
bool StoryChoice::Leaving(JButton key) bool StoryChoice::Leaving(JButton)
{ {
mHasFocus = false; mHasFocus = false;
mTargetScale = 1.0f; 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 ) if ( controlid == kInfoMenuID )
return; return;
+9 -9
View File
@@ -925,7 +925,7 @@ int TargetChooser::countValidTargets()
return result; return result;
} }
bool TargetChooser::equals(TargetChooser * tc) bool TargetChooser::equals(TargetChooser *)
{ {
//This function always return 1 for now, since the default TargetChooser targets everything //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()) if (source && targetter && (targetter->controller() != targetter->controller()->opponent())
&& (targetter->controller()->opponent()->game->inPlay->hasAbility(Constants::CONTROLLERSHROUD)) && (targetter->controller()->opponent()->game->inPlay->hasAbility(Constants::CONTROLLERSHROUD))
@@ -1354,7 +1354,7 @@ SpellTargetChooser::SpellTargetChooser(GameObserver *observer, MTGCardInstance *
color = _color; color = _color;
} }
bool SpellTargetChooser::canTarget(Targetable * target,bool withoutProtections) bool SpellTargetChooser::canTarget(Targetable * target,bool)
{ {
Spell * spell = dynamic_cast<Spell *>(target); Spell * spell = dynamic_cast<Spell *>(target);
if (!spell) if (!spell)
@@ -1442,7 +1442,7 @@ DamageTargetChooser::DamageTargetChooser(GameObserver *observer, MTGCardInstance
state = _state; state = _state;
} }
bool DamageTargetChooser::canTarget(Targetable * target,bool withoutProtections) bool DamageTargetChooser::canTarget(Targetable * target, bool)
{ {
if ( Damage * damage = dynamic_cast<Damage *>(target)) if ( Damage * damage = dynamic_cast<Damage *>(target))
{ {
@@ -1481,12 +1481,12 @@ TriggerTargetChooser::TriggerTargetChooser(GameObserver *observer, int _triggerT
target = NULL; target = NULL;
} }
bool TriggerTargetChooser::targetsZone(MTGGameZone * z) bool TriggerTargetChooser::targetsZone(MTGGameZone *)
{ {
return true; return true;
} }
bool TriggerTargetChooser::canTarget(Targetable * _target,bool withoutProtections) bool TriggerTargetChooser::canTarget(Targetable * _target,bool)
{ {
if (_target == target) return true; if (_target == target) return true;
return false; return false;
@@ -1512,7 +1512,7 @@ bool TriggerTargetChooser::equals(TargetChooser * tc)
} }
/*my curses */ /*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) 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 */ /*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)) if (MTGCardInstance * card = dynamic_cast<MTGCardInstance*>(target))
{ {
@@ -1610,7 +1610,7 @@ bool pairableChooser::equals(TargetChooser * tc)
} }
//*Dredge targetchooser*// //*Dredge targetchooser*//
bool dredgeChooser::canTarget(Targetable * target,bool withoutProtections) bool dredgeChooser::canTarget(Targetable * target,bool)
{ {
if (MTGCardInstance * card = dynamic_cast<MTGCardInstance*>(target)) if (MTGCardInstance * card = dynamic_cast<MTGCardInstance*>(target))
{ {
+6 -6
View File
@@ -548,7 +548,7 @@ void TaskList::Render()
f->SetScale(1); f->SetScale(1);
} }
void TaskList::addRandomTask(int diff) void TaskList::addRandomTask(int)
{ {
// TODO: Weighted random (rarity of tasks) // TODO: Weighted random (rarity of tasks)
// - based on counts of finished tasks? // - based on counts of finished tasks?
@@ -614,7 +614,7 @@ string TaskWinAgainst::getShortDesc()
return result; return result;
} }
bool TaskWinAgainst::isDone(GameObserver* observer, GameApp * _app) bool TaskWinAgainst::isDone(GameObserver* observer, GameApp *)
{ {
AIPlayerBaka * baka = (AIPlayerBaka*) observer->players[1]; AIPlayerBaka * baka = (AIPlayerBaka*) observer->players[1];
return ((baka) && (!observer->players[0]->isAI()) && (observer->players[1]->isAI()) && (observer->didWin(observer->players[0])) // Human player wins 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; 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 return (!observer->players[0]->isAI()) && (observer->players[1]->isAI()) && (observer->didWin(observer->players[0])) // Human player wins
&& (observer->players[0]->life >= targetLife); && (observer->players[0]->life >= targetLife);
@@ -916,7 +916,7 @@ string TaskMassiveBurial::getShortDesc()
return buffer; return buffer;
} }
bool TaskMassiveBurial::isDone(GameObserver* observer, GameApp * _app) bool TaskMassiveBurial::isDone(GameObserver* observer, GameApp *)
{ {
int countColor = 0; int countColor = 0;
vector<MTGCardInstance *> cards = observer->players[1]->game->graveyard->cards; vector<MTGCardInstance *> cards = observer->players[1]->game->graveyard->cards;
@@ -1009,7 +1009,7 @@ string TaskWisdom::getShortDesc()
return buffer; return buffer;
} }
bool TaskWisdom::isDone(GameObserver* observer, GameApp * _app) bool TaskWisdom::isDone(GameObserver* observer, GameApp *)
{ {
int countColor = 0; int countColor = 0;
vector<MTGCardInstance *> cards = observer->players[0]->game->hand->cards; vector<MTGCardInstance *> cards = observer->players[0]->game->hand->cards;
@@ -1090,7 +1090,7 @@ string TaskPacifism::getShortDesc()
return buffer; 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 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); && (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; return 1;
} }
int TestSuiteAI::Act(float dt) int TestSuiteAI::Act(float)
{ {
observer->setLoser(NULL); // Prevent draw rule from losing the game observer->setLoser(NULL); // Prevent draw rule from losing the game
+1 -1
View File
@@ -329,7 +329,7 @@ void WCachedParticles::Refresh()
return; return;
} }
bool WCachedParticles::Attempt(const string& filename, int submode, int & error) bool WCachedParticles::Attempt(const string& filename, int, int & error)
{ {
JFileSystem* fileSys = JFileSystem::GetInstance(); JFileSystem* fileSys = JFileSystem::GetInstance();
+1 -1
View File
@@ -35,7 +35,7 @@ bool WSyncable::prev()
} }
//WSrcImage //WSrcImage
JQuadPtr WSrcImage::getImage(int offset) JQuadPtr WSrcImage::getImage(int)
{ {
return WResourceManager::Instance()->RetrieveTempQuad(filename); 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) WFont(inFontID)
{ {
mRenderer = JRenderer::GetInstance(); mRenderer = JRenderer::GetInstance();
@@ -594,7 +594,7 @@ float WFBFont::GetHeight() const
} }
// Legacy : GBK encoding // 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) WFBFont(inFontID)
{ {
mRenderer = JRenderer::GetInstance(); mRenderer = JRenderer::GetInstance();
+4 -4
View File
@@ -80,7 +80,7 @@ bool WGuiBase::yieldFocus()
} }
//WGuiItem //WGuiItem
void WGuiItem::Entering(JButton key) void WGuiItem::Entering(JButton)
{ {
mFocus = true; mFocus = true;
} }
@@ -95,7 +95,7 @@ float WGuiItem::minHeight()
return mFont->GetHeight(); return mFont->GetHeight();
} }
bool WGuiItem::Leaving(JButton key) bool WGuiItem::Leaving(JButton)
{ {
mFocus = false; mFocus = false;
return true; return true;
@@ -1496,7 +1496,7 @@ void WGuiCardImage::Render()
} }
//WGuiCardDistort //WGuiCardDistort
WGuiCardDistort::WGuiCardDistort(WDataSource * wds, bool _thumb, WDataSource * _distort) : WGuiCardDistort::WGuiCardDistort(WDataSource * wds, bool _thumb, WDataSource *) :
WGuiCardImage(wds, _thumb) WGuiCardImage(wds, _thumb)
{ {
mesh = NEW hgeDistortionMesh(2, 2); 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; 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(); return rand();
} }
+29 -1
View File
@@ -549,7 +549,35 @@ OTHER_FILES += \
android/src/org/kde/necessitas/origo/QtApplication.java \ android/src/org/kde/necessitas/origo/QtApplication.java \
android/src/org/kde/necessitas/origo/QtActivity.java \ android/src/org/kde/necessitas/origo/QtActivity.java \
android/src/org/kde/necessitas/ministro/IMinistroCallback.aidl \ android/src/org/kde/necessitas/ministro/IMinistroCallback.aidl \
android/src/org/kde/necessitas/ministro/IMinistro.aidl android/src/org/kde/necessitas/ministro/IMinistro.aidl \
android/src/org/kde/necessitas/ministro/IMinistro.aidl \
android/src/org/kde/necessitas/ministro/IMinistroCallback.aidl \
android/src/org/qtproject/qt5/android/bindings/QtActivity.java \
android/src/org/qtproject/qt5/android/bindings/QtApplication.java \
android/version.xml \
android/AndroidManifest.xml \
android/res/values-zh-rCN/strings.xml \
android/res/values-fa/strings.xml \
android/res/values-pl/strings.xml \
android/res/values-de/strings.xml \
android/res/values-nl/strings.xml \
android/res/values-id/strings.xml \
android/res/values-nb/strings.xml \
android/res/values-ms/strings.xml \
android/res/values-ja/strings.xml \
android/res/values-rs/strings.xml \
android/res/values-it/strings.xml \
android/res/values-pt-rBR/strings.xml \
android/res/layout/splash.xml \
android/res/values-ru/strings.xml \
android/res/values-zh-rTW/strings.xml \
android/res/values-et/strings.xml \
android/res/values-fr/strings.xml \
android/res/values-ro/strings.xml \
android/res/values/libs.xml \
android/res/values/strings.xml \
android/res/values-es/strings.xml \
android/res/values-el/strings.xml