d5f3e4cfea
Also fixed the project includes so that we don't need to always use the indirect include path, ie: #include "../include/foo.h" -> #include "foo.h" I'm don't know much about make files - if I busted the linux build, mea culpa, but I think we're okay on that front too. For future reference, here's the most straightforward link on the topic of adding pch support to make files: http://www.mercs-eng.com/~hulud/index.php?2008/06/13/6-writing-a-good-makefile-for-a-c-project
39 lines
819 B
C++
39 lines
819 B
C++
#include "PrecompiledHeader.h"
|
|
|
|
#include "ActionElement.h"
|
|
#include "MTGCardInstance.h"
|
|
#include "Targetable.h"
|
|
#include "TargetChooser.h"
|
|
|
|
ActionElement::ActionElement(int id):JGuiObject(id){
|
|
activeState = INACTIVE;
|
|
modal = 0;
|
|
waitingForAnswer = 0;
|
|
currentPhase = -1;
|
|
newPhase = -1;
|
|
tc = NULL;
|
|
isClone = 0;
|
|
}
|
|
|
|
ActionElement::~ActionElement(){
|
|
if (!isClone){
|
|
SAFE_DELETE(tc);
|
|
}
|
|
}
|
|
|
|
int ActionElement::getActivity(){
|
|
|
|
return activeState;
|
|
}
|
|
|
|
|
|
int ActionElement::isReactingToTargetClick(Targetable * object){
|
|
if (object && object->typeAsTarget() == TARGET_CARD) return isReactingToClick((MTGCardInstance *)object);
|
|
return 0;
|
|
}
|
|
|
|
int ActionElement::reactToTargetClick(Targetable * object){
|
|
if (object->typeAsTarget() == TARGET_CARD) return reactToClick((MTGCardInstance *)object);
|
|
return 0;
|
|
}
|