mirror of
https://github.com/glest/glest-source.git
synced 2025-09-02 04:22:32 +02:00
- Added a new pre-Cache thread for CRC value calculation
- Added support in the client UI if multiple local LAN servers are discovered.
This commit is contained in:
@@ -29,6 +29,7 @@
|
|||||||
#include "sound_renderer.h"
|
#include "sound_renderer.h"
|
||||||
#include "ImageReaders.h"
|
#include "ImageReaders.h"
|
||||||
#include "renderer.h"
|
#include "renderer.h"
|
||||||
|
#include "thread.h"
|
||||||
|
|
||||||
#include "leak_dumper.h"
|
#include "leak_dumper.h"
|
||||||
|
|
||||||
@@ -100,6 +101,157 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class FileCRCPreCacheThread : public Thread
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
Mutex mutexRunning;
|
||||||
|
Mutex mutexQuit;
|
||||||
|
|
||||||
|
bool quit;
|
||||||
|
bool running;
|
||||||
|
|
||||||
|
void setRunningStatus(bool value);
|
||||||
|
void setQuitStatus(bool value);
|
||||||
|
|
||||||
|
public:
|
||||||
|
FileCRCPreCacheThread();
|
||||||
|
virtual void execute();
|
||||||
|
void signalQuit();
|
||||||
|
bool getQuitStatus();
|
||||||
|
bool getRunningStatus();
|
||||||
|
static void shutdownAndWait(FileCRCPreCacheThread *pThread);
|
||||||
|
};
|
||||||
|
|
||||||
|
FileCRCPreCacheThread::FileCRCPreCacheThread() {
|
||||||
|
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
|
setQuitStatus(false);
|
||||||
|
setRunningStatus(false);
|
||||||
|
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileCRCPreCacheThread::signalQuit() {
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
|
setQuitStatus(true);
|
||||||
|
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileCRCPreCacheThread::setQuitStatus(bool value) {
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
|
mutexQuit.p();
|
||||||
|
quit = value;
|
||||||
|
mutexQuit.v();
|
||||||
|
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FileCRCPreCacheThread::getQuitStatus() {
|
||||||
|
//SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
|
bool retval = false;
|
||||||
|
mutexQuit.p();
|
||||||
|
retval = quit;
|
||||||
|
mutexQuit.v();
|
||||||
|
|
||||||
|
//SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FileCRCPreCacheThread::getRunningStatus() {
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
|
bool retval = false;
|
||||||
|
mutexRunning.p();
|
||||||
|
retval = running;
|
||||||
|
mutexRunning.v();
|
||||||
|
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] running = %d\n",__FILE__,__FUNCTION__,__LINE__,retval);
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileCRCPreCacheThread::setRunningStatus(bool value) {
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] value = %d\n",__FILE__,__FUNCTION__,__LINE__,value);
|
||||||
|
|
||||||
|
mutexRunning.p();
|
||||||
|
running = value;
|
||||||
|
mutexRunning.v();
|
||||||
|
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] running = %d\n",__FILE__,__FUNCTION__,__LINE__,value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileCRCPreCacheThread::execute() {
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
|
setRunningStatus(true);
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"FILE CRC PreCache thread is running\n");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Config &config = Config::getInstance();
|
||||||
|
vector<string> techDataPaths = config.getPathListForType(ptTechs);
|
||||||
|
//tech Tree listBox
|
||||||
|
vector<string> techPaths;
|
||||||
|
findDirs(techDataPaths, techPaths);
|
||||||
|
if(techPaths.empty() == false) {
|
||||||
|
for(int idx = 0; idx < techPaths.size(); idx++) {
|
||||||
|
string &techPath = techPaths[idx];
|
||||||
|
for(int idx2 = 0; idx2 < techPaths.size(); idx2++) {
|
||||||
|
string techName = techPaths[idx2];
|
||||||
|
|
||||||
|
printf("In [%s::%s Line: %d] caching CRC value for Tech [%s]\n",__FILE__,__FUNCTION__,__LINE__,techName.c_str());
|
||||||
|
int32 techCRC = getFolderTreeContentsCheckSumRecursively(techDataPaths, string("/") + techName + string("/*"), ".xml", NULL);
|
||||||
|
printf("In [%s::%s Line: %d] cached CRC value for Tech [%s] is [%d]\n",__FILE__,__FUNCTION__,__LINE__,techName.c_str(),techCRC);
|
||||||
|
|
||||||
|
if(getQuitStatus() == true) {
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
sleep( 100 );
|
||||||
|
}
|
||||||
|
if(getQuitStatus() == true) {
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(const exception &ex) {
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||||
|
setRunningStatus(false);
|
||||||
|
}
|
||||||
|
catch(...) {
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] unknown error\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
setRunningStatus(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
setRunningStatus(false);
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"FILE CRC PreCache thread is exiting\n");
|
||||||
|
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileCRCPreCacheThread::shutdownAndWait(FileCRCPreCacheThread *pThread) {
|
||||||
|
if(pThread != NULL) {
|
||||||
|
pThread->signalQuit();
|
||||||
|
for( time_t elapsed = time(NULL); difftime(time(NULL),elapsed) <= 10; ) {
|
||||||
|
if(pThread->getRunningStatus() == false) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
sleep(50);
|
||||||
|
//SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
}
|
||||||
|
//SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// =====================================================
|
// =====================================================
|
||||||
// class MainWindow
|
// class MainWindow
|
||||||
// =====================================================
|
// =====================================================
|
||||||
@@ -279,6 +431,8 @@ int glestMain(int argc, char** argv){
|
|||||||
ExceptionHandler exceptionHandler;
|
ExceptionHandler exceptionHandler;
|
||||||
exceptionHandler.install( getCrashDumpFileName() );
|
exceptionHandler.install( getCrashDumpFileName() );
|
||||||
|
|
||||||
|
FileCRCPreCacheThread preCacheThread;
|
||||||
|
|
||||||
try{
|
try{
|
||||||
Config &config = Config::getInstance();
|
Config &config = Config::getInstance();
|
||||||
|
|
||||||
@@ -339,6 +493,10 @@ int glestMain(int argc, char** argv){
|
|||||||
|
|
||||||
gameInitialized = true;
|
gameInitialized = true;
|
||||||
|
|
||||||
|
if(config.getBool("AllowGameDataSynchCheck","false") == true) {
|
||||||
|
preCacheThread.start();
|
||||||
|
}
|
||||||
|
|
||||||
// test
|
// test
|
||||||
//Shared::Platform::MessageBox(NULL,"Mark's test.","Test",0);
|
//Shared::Platform::MessageBox(NULL,"Mark's test.","Test",0);
|
||||||
//throw runtime_error("test!");
|
//throw runtime_error("test!");
|
||||||
@@ -350,22 +508,28 @@ int glestMain(int argc, char** argv){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(const exception &e){
|
catch(const exception &e){
|
||||||
|
FileCRCPreCacheThread::shutdownAndWait(&preCacheThread);
|
||||||
//exceptionMessage(e);
|
//exceptionMessage(e);
|
||||||
ExceptionHandler::handleRuntimeError(e.what());
|
ExceptionHandler::handleRuntimeError(e.what());
|
||||||
}
|
}
|
||||||
catch(const char *e){
|
catch(const char *e){
|
||||||
//exceptionMessage(e);
|
//exceptionMessage(e);
|
||||||
|
FileCRCPreCacheThread::shutdownAndWait(&preCacheThread);
|
||||||
ExceptionHandler::handleRuntimeError(e);
|
ExceptionHandler::handleRuntimeError(e);
|
||||||
}
|
}
|
||||||
catch(const string &ex){
|
catch(const string &ex){
|
||||||
//exceptionMessage(e);
|
//exceptionMessage(e);
|
||||||
|
FileCRCPreCacheThread::shutdownAndWait(&preCacheThread);
|
||||||
ExceptionHandler::handleRuntimeError(ex.c_str());
|
ExceptionHandler::handleRuntimeError(ex.c_str());
|
||||||
}
|
}
|
||||||
catch(...){
|
catch(...){
|
||||||
//exceptionMessage(e);
|
//exceptionMessage(e);
|
||||||
|
FileCRCPreCacheThread::shutdownAndWait(&preCacheThread);
|
||||||
ExceptionHandler::handleRuntimeError("Unknown error!");
|
ExceptionHandler::handleRuntimeError("Unknown error!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FileCRCPreCacheThread::shutdownAndWait(&preCacheThread);
|
||||||
|
|
||||||
//SoundRenderer &soundRenderer= SoundRenderer::getInstance();
|
//SoundRenderer &soundRenderer= SoundRenderer::getInstance();
|
||||||
//soundRenderer.stopAllSounds();
|
//soundRenderer.stopAllSounds();
|
||||||
|
|
||||||
|
@@ -36,6 +36,9 @@ using namespace Shared::Util;
|
|||||||
// ===============================
|
// ===============================
|
||||||
|
|
||||||
const int MenuStateJoinGame::newServerIndex= 0;
|
const int MenuStateJoinGame::newServerIndex= 0;
|
||||||
|
const int MenuStateJoinGame::newPrevServerIndex= 1;
|
||||||
|
const int MenuStateJoinGame::foundServersIndex= 2;
|
||||||
|
|
||||||
const string MenuStateJoinGame::serverFileName= "servers.ini";
|
const string MenuStateJoinGame::serverFileName= "servers.ini";
|
||||||
|
|
||||||
|
|
||||||
@@ -73,6 +76,7 @@ MenuStateJoinGame::MenuStateJoinGame(Program *program, MainMenu *mainMenu, bool
|
|||||||
listBoxServerType.init(465, 490);
|
listBoxServerType.init(465, 490);
|
||||||
listBoxServerType.pushBackItem(lang.get("ServerTypeNew"));
|
listBoxServerType.pushBackItem(lang.get("ServerTypeNew"));
|
||||||
listBoxServerType.pushBackItem(lang.get("ServerTypePrevious"));
|
listBoxServerType.pushBackItem(lang.get("ServerTypePrevious"));
|
||||||
|
listBoxServerType.pushBackItem(lang.get("ServerTypeFound"));
|
||||||
|
|
||||||
//server label
|
//server label
|
||||||
labelServer.init(330, 460);
|
labelServer.init(330, 460);
|
||||||
@@ -84,6 +88,9 @@ MenuStateJoinGame::MenuStateJoinGame(Program *program, MainMenu *mainMenu, bool
|
|||||||
listBoxServers.pushBackItem(servers.getKey(i));
|
listBoxServers.pushBackItem(servers.getKey(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// found servers listbox
|
||||||
|
listBoxFoundServers.init(465, 460);
|
||||||
|
|
||||||
//server ip
|
//server ip
|
||||||
labelServerIp.init(465, 460);
|
labelServerIp.init(465, 460);
|
||||||
|
|
||||||
@@ -101,8 +108,6 @@ MenuStateJoinGame::MenuStateJoinGame(Program *program, MainMenu *mainMenu, bool
|
|||||||
}
|
}
|
||||||
labelServerPort.setText(port);
|
labelServerPort.setText(port);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
labelStatus.init(330, 400);
|
labelStatus.init(330, 400);
|
||||||
labelStatus.setText("");
|
labelStatus.setText("");
|
||||||
|
|
||||||
@@ -135,10 +140,16 @@ MenuStateJoinGame::~MenuStateJoinGame() {
|
|||||||
void MenuStateJoinGame::DiscoveredServers(std::vector<string> serverList) {
|
void MenuStateJoinGame::DiscoveredServers(std::vector<string> serverList) {
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
|
// Testing multi-server
|
||||||
|
//serverList.push_back("test1");
|
||||||
|
//serverList.push_back("test2");
|
||||||
|
//
|
||||||
|
|
||||||
buttonAutoFindServers.setEnabled(true);
|
buttonAutoFindServers.setEnabled(true);
|
||||||
if(serverList.size() > 0) {
|
if(serverList.size() > 0) {
|
||||||
string bestIPMatch = "";
|
string bestIPMatch = "";
|
||||||
std::vector<std::string> localIPList = Socket::getLocalIPAddressList();
|
std::vector<std::string> localIPList = Socket::getLocalIPAddressList();
|
||||||
|
|
||||||
for(int idx = 0; idx < serverList.size(); idx++) {
|
for(int idx = 0; idx < serverList.size(); idx++) {
|
||||||
bestIPMatch = serverList[idx];
|
bestIPMatch = serverList[idx];
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] bestIPMatch = [%s] localIPList[0] = [%s]\n",__FILE__,__FUNCTION__,__LINE__,bestIPMatch.c_str(),localIPList[0].c_str());
|
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] bestIPMatch = [%s] localIPList[0] = [%s]\n",__FILE__,__FUNCTION__,__LINE__,bestIPMatch.c_str(),localIPList[0].c_str());
|
||||||
@@ -148,7 +159,14 @@ void MenuStateJoinGame::DiscoveredServers(std::vector<string> serverList) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
labelServerIp.setText(bestIPMatch);
|
labelServerIp.setText(bestIPMatch);
|
||||||
connectToServer();
|
|
||||||
|
if(serverList.size() > 1) {
|
||||||
|
listBoxServerType.setSelectedItemIndex(MenuStateJoinGame::foundServersIndex);
|
||||||
|
listBoxFoundServers.setItems(serverList);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
connectToServer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
}
|
}
|
||||||
@@ -162,20 +180,24 @@ void MenuStateJoinGame::mouseClick(int x, int y, MouseButton mouseButton)
|
|||||||
NetworkManager &networkManager= NetworkManager::getInstance();
|
NetworkManager &networkManager= NetworkManager::getInstance();
|
||||||
ClientInterface* clientInterface= networkManager.getClientInterface();
|
ClientInterface* clientInterface= networkManager.getClientInterface();
|
||||||
|
|
||||||
if(!clientInterface->isConnected()){
|
if(clientInterface->isConnected() == false) {
|
||||||
//server type
|
//server type
|
||||||
if(listBoxServerType.mouseClick(x, y)){
|
if(listBoxServerType.mouseClick(x, y)){
|
||||||
if(!listBoxServers.getText().empty()){
|
if(!listBoxServers.getText().empty()){
|
||||||
labelServerIp.setText(servers.getString(listBoxServers.getText())+"_");
|
labelServerIp.setText(servers.getString(listBoxServers.getText())+"_");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//server list
|
//server list
|
||||||
else if(listBoxServerType.getSelectedItemIndex()!=newServerIndex){
|
else if(listBoxServerType.getSelectedItemIndex() == newPrevServerIndex){
|
||||||
if(listBoxServers.mouseClick(x, y)){
|
if(listBoxServers.mouseClick(x, y)) {
|
||||||
labelServerIp.setText(servers.getString(listBoxServers.getText())+"_");
|
labelServerIp.setText(servers.getString(listBoxServers.getText())+"_");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(listBoxServerType.getSelectedItemIndex() == foundServersIndex){
|
||||||
|
if(listBoxFoundServers.mouseClick(x, y)) {
|
||||||
|
labelServerIp.setText(listBoxFoundServers.getText());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//return
|
//return
|
||||||
@@ -239,12 +261,15 @@ void MenuStateJoinGame::mouseMove(int x, int y, const MouseState *ms){
|
|||||||
listBoxServerType.mouseMove(x, y);
|
listBoxServerType.mouseMove(x, y);
|
||||||
|
|
||||||
//hide-show options depending on the selection
|
//hide-show options depending on the selection
|
||||||
if(listBoxServers.getSelectedItemIndex()==newServerIndex){
|
if(listBoxServers.getSelectedItemIndex() == newServerIndex) {
|
||||||
labelServerIp.mouseMove(x, y);
|
labelServerIp.mouseMove(x, y);
|
||||||
}
|
}
|
||||||
else{
|
else if(listBoxServers.getSelectedItemIndex() == newPrevServerIndex) {
|
||||||
listBoxServers.mouseMove(x, y);
|
listBoxServers.mouseMove(x, y);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
listBoxFoundServers.mouseMove(x, y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MenuStateJoinGame::render(){
|
void MenuStateJoinGame::render(){
|
||||||
@@ -261,13 +286,15 @@ void MenuStateJoinGame::render(){
|
|||||||
renderer.renderButton(&buttonAutoFindServers);
|
renderer.renderButton(&buttonAutoFindServers);
|
||||||
renderer.renderListBox(&listBoxServerType);
|
renderer.renderListBox(&listBoxServerType);
|
||||||
|
|
||||||
if(listBoxServerType.getSelectedItemIndex()==newServerIndex){
|
if(listBoxServerType.getSelectedItemIndex() == newServerIndex) {
|
||||||
renderer.renderLabel(&labelServerIp);
|
renderer.renderLabel(&labelServerIp);
|
||||||
}
|
}
|
||||||
else
|
else if(listBoxServerType.getSelectedItemIndex() == newPrevServerIndex) {
|
||||||
{
|
|
||||||
renderer.renderListBox(&listBoxServers);
|
renderer.renderListBox(&listBoxServers);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
renderer.renderListBox(&listBoxFoundServers);
|
||||||
|
}
|
||||||
|
|
||||||
renderer.renderChatManager(&chatManager);
|
renderer.renderChatManager(&chatManager);
|
||||||
renderer.renderConsole(&console);
|
renderer.renderConsole(&console);
|
||||||
@@ -308,10 +335,6 @@ void MenuStateJoinGame::update()
|
|||||||
{
|
{
|
||||||
label = label + " techtree";
|
label = label + " techtree";
|
||||||
}
|
}
|
||||||
//if(clientInterface->getNetworkGameDataSynchCheckOkFogOfWar() == false)
|
|
||||||
//{
|
|
||||||
// label = label + " FogOfWar == false";
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
else if(clientInterface->getAllowGameDataSynchCheck() == true)
|
else if(clientInterface->getAllowGameDataSynchCheck() == true)
|
||||||
{
|
{
|
||||||
@@ -344,10 +367,6 @@ void MenuStateJoinGame::update()
|
|||||||
{
|
{
|
||||||
label = label + " techtree";
|
label = label + " techtree";
|
||||||
}
|
}
|
||||||
//if(clientInterface->getNetworkGameDataSynchCheckOkFogOfWar() == false)
|
|
||||||
//{
|
|
||||||
// label = label + " FogOfWar == false";
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
else if(clientInterface->getAllowGameDataSynchCheck() == true)
|
else if(clientInterface->getAllowGameDataSynchCheck() == true)
|
||||||
{
|
{
|
||||||
|
@@ -31,6 +31,8 @@ class NetworkMessageIntro;
|
|||||||
class MenuStateJoinGame: public MenuState, public DiscoveredServersInterface {
|
class MenuStateJoinGame: public MenuState, public DiscoveredServersInterface {
|
||||||
private:
|
private:
|
||||||
static const int newServerIndex;
|
static const int newServerIndex;
|
||||||
|
static const int newPrevServerIndex;
|
||||||
|
static const int foundServersIndex;
|
||||||
static const string serverFileName;
|
static const string serverFileName;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -44,6 +46,7 @@ private:
|
|||||||
GraphicLabel labelInfo;
|
GraphicLabel labelInfo;
|
||||||
GraphicListBox listBoxServerType;
|
GraphicListBox listBoxServerType;
|
||||||
GraphicListBox listBoxServers;
|
GraphicListBox listBoxServers;
|
||||||
|
GraphicListBox listBoxFoundServers;
|
||||||
GraphicLabel labelServerPort;
|
GraphicLabel labelServerPort;
|
||||||
GraphicLabel labelServerPortLabel;
|
GraphicLabel labelServerPortLabel;
|
||||||
|
|
||||||
|
@@ -72,8 +72,8 @@ protected:
|
|||||||
|
|
||||||
class NetworkMessageIntro: public NetworkMessage{
|
class NetworkMessageIntro: public NetworkMessage{
|
||||||
private:
|
private:
|
||||||
static const int maxVersionStringSize= 64;
|
static const int maxVersionStringSize= 128;
|
||||||
static const int maxNameSize= 16;
|
static const int maxNameSize= 32;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct Data{
|
struct Data{
|
||||||
|
Reference in New Issue
Block a user