From a69fcdd435a2e07a8ab1e416933655ce811fb38c Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Mon, 14 Jul 2014 17:44:15 +0300 Subject: [PATCH] Fixed compilation issues caused by merge --- client/widgets/CGarrisonInt.cpp | 9 ++++----- client/windows/CCreatureWindow.cpp | 6 +++--- client/windows/CCreatureWindow.h | 2 +- client/windows/GUIClasses.cpp | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/client/widgets/CGarrisonInt.cpp b/client/widgets/CGarrisonInt.cpp index 744bf842a..d7961e268 100644 --- a/client/widgets/CGarrisonInt.cpp +++ b/client/widgets/CGarrisonInt.cpp @@ -120,7 +120,7 @@ void CGarrisonSlot::clickRight(tribool down, bool previousState) { if(down && creature) { - GH.pushInt(createCreWindow(myStack, CCreatureWindow::ARMY)); + GH.pushInt(new CStackWindow(myStack, true)); } } void CGarrisonSlot::clickLeft(tribool down, bool previousState) @@ -137,9 +137,9 @@ void CGarrisonSlot::clickLeft(tribool down, bool previousState) bool canUpgrade = getObj()->tempOwner == LOCPLINT->playerID && pom.oldID>=0; //upgrade is possible bool canDismiss = getObj()->tempOwner == LOCPLINT->playerID && (getObj()->stacksCount()>1 || !getObj()->needsLastStack()); - std::function upgr = nullptr; + std::function upgr = nullptr; std::function dism = nullptr; - if(canUpgrade) upgr = [=] { LOCPLINT->cb->upgradeCreature(getObj(), ID, pom.newID[0]); }; + if(canUpgrade) upgr = [=] (CreatureID newID) { LOCPLINT->cb->upgradeCreature(getObj(), ID, newID); }; if(canDismiss) dism = [=] { LOCPLINT->cb->dismissCreature(getObj(), ID); }; owner->selectSlot(nullptr); @@ -150,8 +150,7 @@ void CGarrisonSlot::clickLeft(tribool down, bool previousState) redraw(); refr = true; - CIntObject *creWindow = createCreWindow(myStack, CCreatureWindow::HERO, upgr, dism, &pom); - GH.pushInt(creWindow); + GH.pushInt(new CStackWindow(myStack, dism, pom, upgr)); } else { diff --git a/client/windows/CCreatureWindow.cpp b/client/windows/CCreatureWindow.cpp index 2455f727f..368d6c505 100644 --- a/client/windows/CCreatureWindow.cpp +++ b/client/windows/CCreatureWindow.cpp @@ -3,6 +3,9 @@ #include "../CGameInfo.h" #include "../CPlayerInterface.h" +#include "../gui/CGuiHandler.h" +#include "../widgets/CIntObjectClasses.h" +#include "../widgets/CAnimation.h" #include "../../CCallback.h" #include "../../lib/BattleState.h" @@ -12,9 +15,6 @@ #include "../../lib/CHeroHandler.h" #include "../../lib/CSpellHandler.h" -#include "../gui/CGuiHandler.h" -#include "../gui/CIntObjectClasses.h" - using namespace CSDL_Ext; class CCreatureArtifactInstance; diff --git a/client/windows/CCreatureWindow.h b/client/windows/CCreatureWindow.h index f0f806e4b..a46258250 100644 --- a/client/windows/CCreatureWindow.h +++ b/client/windows/CCreatureWindow.h @@ -1,7 +1,7 @@ #pragma once #include "../../lib/HeroBonus.h" -#include "../gui/CIntObject.h" +#include "../widgets/MiscWidgets.h" /* * CCreatureWindow.h, part of VCMI engine diff --git a/client/windows/GUIClasses.cpp b/client/windows/GUIClasses.cpp index 3f8d62fde..01b2a68f6 100644 --- a/client/windows/GUIClasses.cpp +++ b/client/windows/GUIClasses.cpp @@ -98,7 +98,7 @@ void CRecruitmentWindow::CCreatureCard::clickLeft(tribool down, bool previousSta void CRecruitmentWindow::CCreatureCard::clickRight(tribool down, bool previousState) { if (down) - GH.pushInt(createCreWindow(creature->idNumber, CCreatureWindow::OTHER, 0)); + GH.pushInt(new CStackWindow(creature, true)); } void CRecruitmentWindow::CCreatureCard::showAll(SDL_Surface * to)