소스 검색

* again, please don't include headers in headers if not necessary
* minor changes

mateuszb 16 년 전
부모
커밋
f22570712e
4개의 변경된 파일6개의 추가작업 그리고 10개의 파일을 삭제
  1. 2 7
      client/CPreGame.cpp
  2. 2 2
      client/GUIClasses.cpp
  3. 2 0
      client/Graphics.cpp
  4. 0 1
      client/Graphics.h

+ 2 - 7
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:

+ 2 - 2
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<SComponent*>(), boost::bind(do_quit), 0, false);
+	LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[578], std::vector<SComponent*>(), do_quit, 0, false);
 }
 
 void CSystemOptionsWindow::breturnf()

+ 2 - 0
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

+ 0 - 1
client/Graphics.h

@@ -4,7 +4,6 @@
 
 #include "../global.h"
 #include "FontBase.h"
-#include "../hch/CObjectHandler.h"
 
 /*
  * Graphics.h, part of VCMI engine