@@ -1,20 +0,0 @@
|
||||
#include "../include/GameApp.h"
|
||||
#include "../include/MTGCard.h"
|
||||
#include "../include/GameOptions.h"
|
||||
#include "../include/CardEffect.h"
|
||||
|
||||
CardEffect::CardEffect(CardGui* target) :
|
||||
target(target)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CardEffect::~CardEffect()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CardEffect::Render()
|
||||
{
|
||||
// std::cout << "Rendering effect" << std::endl;
|
||||
}
|
||||
@@ -23,22 +23,6 @@
|
||||
#include "AIPlayer.h"
|
||||
|
||||
|
||||
|
||||
//!! helper function; this is probably handled somewhere in the code already.
|
||||
// If not, should be placed in general library
|
||||
void StringExplode(string str, string separator, vector<string>* results)
|
||||
{
|
||||
size_t found;
|
||||
found = str.find_first_of(separator);
|
||||
while (found != string::npos)
|
||||
{
|
||||
if (found > 0) results->push_back(str.substr(0, found));
|
||||
str = str.substr(found + 1);
|
||||
found = str.find_first_of(separator);
|
||||
}
|
||||
if (str.length() > 0) results->push_back(str);
|
||||
}
|
||||
|
||||
GameStateDeckViewer::GameStateDeckViewer(GameApp* parent) :
|
||||
GameState(parent, "deckeditor")
|
||||
{
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
#include "GuiMessageBox.h"
|
||||
|
||||
bool GuiMessageBox::CheckUserInput(JButton key)
|
||||
{
|
||||
if (mActionButton == key)
|
||||
{
|
||||
if (mObjects[mCurr] != NULL && mObjects[mCurr]->ButtonPressed())
|
||||
{
|
||||
if (mListener != NULL)
|
||||
{
|
||||
mListener->ButtonPressed(mId, mObjects[mCurr]->GetId());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((PSP_CTRL_LEFT == key) || (PSP_CTRL_UP == key)) // || mEngine->GetAnalogY()<64)
|
||||
{
|
||||
int n = mCurr;
|
||||
n--;
|
||||
if (n < 0)
|
||||
{
|
||||
if ((mStyle & JGUI_STYLE_WRAPPING))
|
||||
n = mCount - 1;
|
||||
else
|
||||
n = 0;
|
||||
}
|
||||
|
||||
if (n != mCurr && mObjects[mCurr] != NULL && mObjects[mCurr]->Leaving(PSP_CTRL_UP))
|
||||
{
|
||||
mCurr = n;
|
||||
mObjects[mCurr]->Entering();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if ((PSP_CTRL_RIGHT == key) || (PSP_CTRL_DOWN == key)) // || mEngine->GetAnalogY()>192)
|
||||
{
|
||||
int n = mCurr;
|
||||
n++;
|
||||
if (n > mCount - 1)
|
||||
{
|
||||
if ((mStyle & JGUI_STYLE_WRAPPING))
|
||||
n = 0;
|
||||
else
|
||||
n = mCount - 1;
|
||||
}
|
||||
|
||||
if (n != mCurr && mObjects[mCurr] != NULL && mObjects[mCurr]->Leaving(PSP_CTRL_DOWN))
|
||||
{
|
||||
mCurr = n;
|
||||
mObjects[mCurr]->Entering();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
#include "MTGSpellStack.h"
|
||||
|
||||
MTGSpellStack::MTGSpellStack()
|
||||
{
|
||||
cursor = -1;
|
||||
}
|
||||
|
||||
void MTGSpellStack::addSpell(Ability * ability)
|
||||
{
|
||||
cursor++;
|
||||
spellStack[cursor] ability;
|
||||
}
|
||||
|
||||
int MTGSpellStack::resolve()
|
||||
{
|
||||
if (cursor < 0)
|
||||
return 0;
|
||||
int result = cursor;
|
||||
cursor--;
|
||||
(spellStack[cursor + 1])->resolve();
|
||||
return (result + 1);
|
||||
}
|
||||
Reference in New Issue
Block a user