diff --git a/projects/mtg/include/ActionStack.h b/projects/mtg/include/ActionStack.h index 99c2114d1..b3ae08b7d 100644 --- a/projects/mtg/include/ActionStack.h +++ b/projects/mtg/include/ActionStack.h @@ -71,6 +71,7 @@ class NextGamePhase: public Interruptible { bool extraDamagePhase(); void Render(); virtual ostream& toString(ostream& out) const; + virtual const string getDisplayName() const; NextGamePhase(int id); }; @@ -112,6 +113,7 @@ class StackAbility: public Interruptible { int resolve(); void Render(); virtual ostream& toString(ostream& out) const; + virtual const string getDisplayName() const; StackAbility(int id, MTGAbility * _ability); }; diff --git a/projects/mtg/src/ActionStack.cpp b/projects/mtg/src/ActionStack.cpp index 0be8e137b..c3662f1ab 100644 --- a/projects/mtg/src/ActionStack.cpp +++ b/projects/mtg/src/ActionStack.cpp @@ -25,7 +25,13 @@ int NextGamePhase::resolve(){ return 1; } +const string NextGamePhase::getDisplayName() const +{ + std::ostringstream stream; + stream << "NextGamePhase. (Current phase is: " << PhaseRing::phaseName(GameObserver::GetInstance()->getCurrentGamePhase()) << ")"; + return stream.str(); +} void NextGamePhase::Render(){ GameObserver * g = GameObserver::GetInstance(); @@ -145,6 +151,14 @@ ostream& StackAbility::toString(ostream& out) const return out; } +const string StackAbility::getDisplayName() const +{ + std::ostringstream stream; + stream << "StackAbility. (Source: " << ability->source->getDisplayName() << ")"; + + return stream.str(); +} + /* Spell Cast */ Spell::Spell(MTGCardInstance * _source): Interruptible(0){ diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index 331d1c838..6eb2b31d7 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -1,4 +1,5 @@ #include "../include/config.h" +#include "../include/DebugRoutines.h" #include "../include/GameObserver.h" #include "../include/GameOptions.h" #include "../include/CardGui.h" @@ -380,9 +381,7 @@ void GameObserver::Render() void GameObserver::ButtonPressed(PlayGuiObject * target){ -#if defined (WIN32) || defined (LINUX) - OutputDebugString("GAMEOBSERVER Click\n"); -#endif + DebugTrace("GAMEOBSERVER Click"); if (CardView* cardview = dynamic_cast(target)){ MTGCardInstance * card = cardview->getCard(); cardClick(card, card); diff --git a/projects/mtg/src/GameOptions.cpp b/projects/mtg/src/GameOptions.cpp index 4d100e8aa..f0f465460 100644 --- a/projects/mtg/src/GameOptions.cpp +++ b/projects/mtg/src/GameOptions.cpp @@ -633,11 +633,6 @@ void GameSettings::checkProfile(){ } void GameSettings::createUsersFirstDeck(int setId){ -#if defined (WIN32) || defined (LINUX) - char buf[4096]; - sprintf(buf, "setID: %i", setId); - OutputDebugString(buf); -#endif if(theGame == NULL || theGame->collection == NULL) return; @@ -659,19 +654,11 @@ void GameSettings::createUsersFirstDeck(int setId){ if (!mCollection->addRandomCards(10, sets,1,Constants::RARITY_L,"Island")) mCollection->addRandomCards(10, 0,0,Constants::RARITY_L,"Island"); - -#if defined (WIN32) || defined (LINUX) - OutputDebugString("1\n"); -#endif - //Starter Deck mCollection->addRandomCards(3, sets,1,Constants::RARITY_R,NULL); mCollection->addRandomCards(9, sets,1,Constants::RARITY_U,NULL); mCollection->addRandomCards(48, sets,1,Constants::RARITY_C,NULL); -#if defined (WIN32) || defined (LINUX) - OutputDebugString("2\n"); -#endif //Boosters for (int i = 0; i< 2; i++){ mCollection->addRandomCards(1, sets,1,Constants::RARITY_R);