ActionElement.h: Replace defines, remove superfluous ";"

Defines do not follow scope rules, but enums do. Enum classes
even utilize strong type checking (but i am not sure about compiler
support for c++11 on all target platforms).
This commit is contained in:
Tobias Loose
2013-11-17 16:08:29 +01:00
parent c6dc51c7d3
commit 146872797b
3 changed files with 15 additions and 28 deletions

View File

@@ -9,10 +9,6 @@
#include <JGui.h>
#include "MTGDefinitions.h"
#define INACTIVE 0
#define ACTION_REQUESTED 1
#define ACTIVE 2
class MTGCardInstance;
class ManaCost;
class Targetable;
@@ -22,31 +18,33 @@ class WEvent;
class ActionElement: public JGuiObject
{
protected:
int activeState;
enum Activity{
Inactive,
ActionRequested,
Active
};
Activity activity;
TargetChooser * tc;
public:
GamePhase currentPhase;
GamePhase newPhase;
int modal;
int waitingForAnswer;
int getActivity();
virtual void Update(float){};
virtual void Render(){};
virtual void Update(float){}
virtual void Render(){}
virtual int testDestroy()
{
return 0;
}
;
virtual int destroy()
{
return 0;
}
;
virtual bool CheckUserInput(JButton)
{
return false;
}
;
ActionElement(int id);
ActionElement(const ActionElement& copyFromMe);
TargetChooser * getActionTc(){return tc;}
@@ -62,27 +60,22 @@ public:
{
return 0;
}
;
virtual int stillInUse(MTGCardInstance *)
{
return 0;
}
;
virtual int receiveEvent(WEvent *)
{
return 0;
}
;
virtual int reactToClick(MTGCardInstance *)
{
return 0;
}
;
virtual const char * getMenuText()
{
return "Ability";
}
;
virtual ActionElement * clone() const = 0;
};