1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

- first part of CIntObject API clean-up.

- - mostly remove usage of (de)activateSomething functions
- - CIntObject's can be safely deleted in active state or without removing from parent first
- - Added CWindowObject to use as base of all windows (will be required for such features as shadows)

Report any crashes or glitches - it should not cause any issues apart from more console output. 

TODO:
- remove redundant (de)activate and show(All) calls
- decrease usage of blitAtLoc\printAtLoc methods
- switch all windows to new base
This commit is contained in:
Ivan Savenko
2012-06-02 15:16:54 +00:00
parent 3df1ddbf86
commit d60f2d57a0
29 changed files with 582 additions and 745 deletions

View File

@@ -310,8 +310,6 @@ void CClient::newGame( CConnection *con, StartInfo *si )
if(networkMode != GUEST)
myPlayers.insert(255); //neutral
CStopWatch tmh;
const_cast<CGameInfo*>(CGI)->state = new CGameState();
tlog0 <<"\tGamestate: "<<tmh.getDiff()<<std::endl;
@@ -712,8 +710,11 @@ void CServerHandler::callServer()
setThreadName(-1, "CServerHandler::callServer");
std::string logName = GVCMIDirs.UserPath + "/server_log.txt";
std::string comm = GameConstants::BIN_DIR + GameConstants::PATH_SEPARATOR + GameConstants::SERVER_NAME + " " + port + " > " + logName;
std::system(comm.c_str());
tlog0 << "Server finished\n";
int result = std::system(comm.c_str());
if (result == 0)
tlog1 << "Server closed correctly\n";
else
tlog0 << "Error: server failed to close correctly or crashed!\n";
}
CConnection * CServerHandler::justConnectToServer(const std::string &host, const std::string &port)