diff --git a/projects/mtg/Makefile b/projects/mtg/Makefile index 9485d7d1b..dc4f2b7fe 100644 --- a/projects/mtg/Makefile +++ b/projects/mtg/Makefile @@ -1,7 +1,7 @@ OBJS = objs/InteractiveButton.o objs/AbilityParser.o objs/ActionElement.o\ objs/ActionLayer.o objs/ActionStack.o objs/AIHints.o objs/AIMomirPlayer.o\ objs/AIPlayer.o objs/AIPlayerBaka.o objs/AIStats.o objs/AllAbilities.o\ - objs/CardGui.o objs/CardDescriptor.o objs/CardDisplay.o objs/CardEffect.o\ + objs/CardGui.o objs/CardDescriptor.o objs/CardDisplay.o\ objs/CardPrimitive.o objs/CardSelector.o objs/CardSelectorSingleton.o\ objs/Counters.o objs/Credits.o objs/Damage.o objs/DamagerDamaged.o\ objs/DeckDataWrapper.o objs/DeckEditorMenu.o objs/DeckMenu.o\ diff --git a/projects/mtg/include/CardEffect.h b/projects/mtg/include/CardEffect.h deleted file mode 100644 index ef2ea3b09..000000000 --- a/projects/mtg/include/CardEffect.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef _CARDEFFECT_H_ -#define _CARDEFFECT_H_ - -#include -#include "Effects.h" - -struct CardGui; - -class CardEffect: public Effect -{ -public: - CardEffect(CardGui* target); - ~CardEffect(); -private: - CardGui* target; - -public: - virtual void Render(); -}; - -#endif // _CARDEFFECT_H_ diff --git a/projects/mtg/include/GameApp.h b/projects/mtg/include/GameApp.h index 7c0c996d7..eeb1c8141 100644 --- a/projects/mtg/include/GameApp.h +++ b/projects/mtg/include/GameApp.h @@ -20,7 +20,6 @@ #include "MTGCard.h" #include "MTGGameZones.h" -#include "CardEffect.h" #ifdef NETWORK_SUPPORT #include "JNetwork.h" #endif //NETWORK_SUPPORT @@ -49,7 +48,6 @@ public: GameType gameType; Rules * rules; - CardEffect *effect; #ifdef NETWORK_SUPPORT string mServerAddress; JNetwork* mpNetwork; diff --git a/projects/mtg/include/OSD.h b/projects/mtg/include/OSD.h deleted file mode 100644 index f6733ebd3..000000000 --- a/projects/mtg/include/OSD.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef _OSD_H_ -#define _OSD_H_ - -class OSDLayer: public PlayGuiObjectController -{ - virtual void Update(float dt); - virtual bool CheckUserInput(JButton key); - virtual void Render(); -}; - -#endif diff --git a/projects/mtg/src/CardEffect.cpp b/projects/mtg/src/CardEffect.cpp deleted file mode 100644 index 12afd8bb2..000000000 --- a/projects/mtg/src/CardEffect.cpp +++ /dev/null @@ -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; -} diff --git a/projects/mtg/src/GameStateDeckViewer.cpp b/projects/mtg/src/GameStateDeckViewer.cpp index 41a8a2f37..24e51f910 100644 --- a/projects/mtg/src/GameStateDeckViewer.cpp +++ b/projects/mtg/src/GameStateDeckViewer.cpp @@ -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* 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") { diff --git a/projects/mtg/src/GuiMessageBox.cpp b/projects/mtg/src/GuiMessageBox.cpp deleted file mode 100644 index 94b22ac0c..000000000 --- a/projects/mtg/src/GuiMessageBox.cpp +++ /dev/null @@ -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; -} diff --git a/projects/mtg/src/MTGSpellStack.cpp b/projects/mtg/src/MTGSpellStack.cpp deleted file mode 100644 index 0b8fac351..000000000 --- a/projects/mtg/src/MTGSpellStack.cpp +++ /dev/null @@ -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); -} diff --git a/projects/mtg/template.vcxproj b/projects/mtg/template.vcxproj index 7109ebd09..96f355a51 100644 --- a/projects/mtg/template.vcxproj +++ b/projects/mtg/template.vcxproj @@ -455,7 +455,6 @@ - @@ -517,7 +516,6 @@ - diff --git a/projects/mtg/template.vcxproj.filters b/projects/mtg/template.vcxproj.filters index 32cd0ca8b..0d874bf5b 100644 --- a/projects/mtg/template.vcxproj.filters +++ b/projects/mtg/template.vcxproj.filters @@ -363,9 +363,6 @@ inc - - inc - inc @@ -528,9 +525,6 @@ inc - - inc - inc diff --git a/projects/mtg/wagic-qt.pro b/projects/mtg/wagic-qt.pro index 715823a8a..d9b1171fe 100644 --- a/projects/mtg/wagic-qt.pro +++ b/projects/mtg/wagic-qt.pro @@ -89,7 +89,6 @@ SOURCES += \ src/AllAbilities.cpp\ src/CardDescriptor.cpp\ src/CardDisplay.cpp\ - src/CardEffect.cpp\ src/CardGui.cpp\ src/CardPrimitive.cpp\ src/CardSelector.cpp\ @@ -243,7 +242,6 @@ HEADERS += \ include/GameStateShop.h\ include/MTGPack.h\ include/TextScroller.h\ - include/CardEffect.h\ include/GameStateStory.h\ include/MTGRules.h\ include/ThisDescriptor.h\ @@ -254,7 +252,6 @@ HEADERS += \ include/Token.h\ include/CardPrimitive.h\ include/GuiAvatars.h\ - include/OSD.h\ include/Translate.h\ include/CardSelector.h\ include/GuiBackground.h\