1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00
This commit is contained in:
Frank Zago 2009-06-01 03:36:13 +00:00
parent d9215d050c
commit 627c20c949
2 changed files with 13 additions and 13 deletions

View File

@ -1787,7 +1787,7 @@ void CBattleInterface::battleFinished(const BattleResult& br)
SDL_Rect temp_rect = genRect(561, 470, (screen->w - 800)/2 + 165, (screen->h - 600)/2 + 19);
CGI->musich->stopMusic();
resWindow = new CBattleReslutWindow(br, temp_rect, this);
resWindow = new CBattleResultWindow(br, temp_rect, this);
LOCPLINT->pushInt(resWindow);
}
@ -2688,7 +2688,7 @@ void CBattleConsole::scrollDown(unsigned int by)
lastShown += by;
}
CBattleReslutWindow::CBattleReslutWindow(const BattleResult &br, const SDL_Rect & pos, const CBattleInterface * owner)
CBattleResultWindow::CBattleResultWindow(const BattleResult &br, const SDL_Rect & pos, const CBattleInterface * owner)
{
this->pos = pos;
background = BitmapHandler::loadBitmap("CPRESULT.BMP", true);
@ -2696,7 +2696,7 @@ CBattleReslutWindow::CBattleReslutWindow(const BattleResult &br, const SDL_Rect
SDL_Surface * pom = SDL_ConvertSurface(background, screen->format, screen->flags);
SDL_FreeSurface(background);
background = pom;
exit = new AdventureMapButton (std::string(), std::string(), boost::bind(&CBattleReslutWindow::bExitf,this), 384 + pos.x, 505 + pos.y, "iok6432.def", SDLK_RETURN);
exit = new AdventureMapButton (std::string(), std::string(), boost::bind(&CBattleResultWindow::bExitf,this), 384 + pos.x, 505 + pos.y, "iok6432.def", SDLK_RETURN);
if(br.winner==0) //attacker won
{
@ -2828,23 +2828,23 @@ CBattleReslutWindow::CBattleReslutWindow(const BattleResult &br, const SDL_Rect
}
}
CBattleReslutWindow::~CBattleReslutWindow()
CBattleResultWindow::~CBattleResultWindow()
{
SDL_FreeSurface(background);
}
void CBattleReslutWindow::activate()
void CBattleResultWindow::activate()
{
LOCPLINT->showingDialog->set(true);
exit->activate();
}
void CBattleReslutWindow::deactivate()
void CBattleResultWindow::deactivate()
{
exit->deactivate();
}
void CBattleReslutWindow::show(SDL_Surface *to)
void CBattleResultWindow::show(SDL_Surface *to)
{
//evaluating to
if(!to)
@ -2854,7 +2854,7 @@ void CBattleReslutWindow::show(SDL_Surface *to)
exit->show(to);
}
void CBattleReslutWindow::bExitf()
void CBattleResultWindow::bExitf()
{
LOCPLINT->popInts(2); //first - we; second - battle interface
LOCPLINT->showingDialog->setn(false);

View File

@ -96,14 +96,14 @@ public:
void scrollDown(unsigned int by = 1); //scrolls console up by 'by' positions
};
class CBattleReslutWindow : public IShowActivable, public CIntObject
class CBattleResultWindow : public IShowActivable, public CIntObject
{
private:
SDL_Surface * background;
AdventureMapButton * exit;
public:
CBattleReslutWindow(const BattleResult & br, const SDL_Rect & pos, const CBattleInterface * owner); //c-tor
~CBattleReslutWindow(); //d-tor
CBattleResultWindow(const BattleResult & br, const SDL_Rect & pos, const CBattleInterface * owner); //c-tor
~CBattleResultWindow(); //d-tor
void bExitf(); //exit button callback
@ -239,7 +239,7 @@ public:
SDL_Surface * cellBorder, * cellShade;
CondSh<BattleAction *> *givenCommand; //data != NULL if we have i.e. moved current unit
bool myTurn; //if true, interface is active (commands can be ordered
CBattleReslutWindow * resWindow; //window of end of battle
CBattleResultWindow * resWindow; //window of end of battle
bool showStackQueue; //if true, queue of stacks will be shown
bool moveStarted; //if true, the creature that is already moving is going to make its first step
@ -296,7 +296,7 @@ public:
void displayEffect(ui32 effect, int destTile); //displays effect of a spell on the battlefield; affected: true - attacker. false - defender
friend class CBattleHex;
friend class CBattleReslutWindow;
friend class CBattleResultWindow;
friend class CPlayerInterface;
friend class AdventureMapButton;
friend class CInGameConsole;