diff --git a/client/CPreGame.cpp b/client/CPreGame.cpp index 69fbfcd6c..1544f030b 100644 --- a/client/CPreGame.cpp +++ b/client/CPreGame.cpp @@ -50,12 +50,7 @@ static int playerColor, playerSerial; static std::string selectedName; //set when game is started/loaded -static void do_quit() -{ - SDL_Event event; - event.quit.type = SDL_QUIT; - SDL_PushEvent(&event); -} +extern void do_quit(); CMenuScreen::CMenuScreen( EState which ) { @@ -70,7 +65,7 @@ CMenuScreen::CMenuScreen( EState which ) buttons[1] = new AdventureMapButton("", CGI->generaltexth->zelp[4].second, bind(&CMenuScreen::moveTo, this, ref(CGP->scrs[loadGame])), 532, 132, "ZMENULG.DEF", SDLK_l); buttons[2] = new AdventureMapButton("", CGI->generaltexth->zelp[5].second, 0 /*cb*/, 524, 251, "ZMENUHS.DEF", SDLK_h); buttons[3] = new AdventureMapButton("", CGI->generaltexth->zelp[6].second, 0 /*cb*/, 557, 359, "ZMENUCR.DEF", SDLK_c); - buttons[4] = new AdventureMapButton("", CGI->generaltexth->zelp[7].second, bind(do_quit), 586, 468, "ZMENUQT.DEF", SDLK_ESCAPE); + buttons[4] = new AdventureMapButton("", CGI->generaltexth->zelp[7].second, do_quit, 586, 468, "ZMENUQT.DEF", SDLK_ESCAPE); } break; case newGame: diff --git a/client/GUIClasses.cpp b/client/GUIClasses.cpp index 11983699e..08e7beccb 100644 --- a/client/GUIClasses.cpp +++ b/client/GUIClasses.cpp @@ -2884,7 +2884,7 @@ CSystemOptionsWindow::~CSystemOptionsWindow() delete effectsVolume; } -static void do_quit() +void do_quit() { SDL_Event event; event.quit.type = SDL_QUIT; @@ -2893,7 +2893,7 @@ static void do_quit() void CSystemOptionsWindow::bquitf() { - LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[578], std::vector(), boost::bind(do_quit), 0, false); + LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[578], std::vector(), do_quit, 0, false); } void CSystemOptionsWindow::breturnf() diff --git a/client/Graphics.cpp b/client/Graphics.cpp index adda5c12c..ff031bb0d 100644 --- a/client/Graphics.cpp +++ b/client/Graphics.cpp @@ -15,6 +15,8 @@ #include "../lib/VCMI_Lib.h" #include "../CCallback.h" #include "../hch/CTownHandler.h" +#include "../hch/CObjectHandler.h" + using namespace boost::assign; using namespace CSDL_Ext; #ifdef min diff --git a/client/Graphics.h b/client/Graphics.h index 220d02a11..58ada63a4 100644 --- a/client/Graphics.h +++ b/client/Graphics.h @@ -4,7 +4,6 @@ #include "../global.h" #include "FontBase.h" -#include "../hch/CObjectHandler.h" /* * Graphics.h, part of VCMI engine