- bugfix for transifex tutorial download files now loaded into UI
- updated each thread to provide its name
This commit is contained in:
parent
5cfc4d07a0
commit
5b664fb1a2
|
@ -40,6 +40,7 @@ AiInterfaceThread::AiInterfaceThread(AiInterface *aiIntf) : BaseThread() {
|
||||||
this->masterController = NULL;
|
this->masterController = NULL;
|
||||||
this->triggerIdMutex = new Mutex();
|
this->triggerIdMutex = new Mutex();
|
||||||
this->aiIntf = aiIntf;
|
this->aiIntf = aiIntf;
|
||||||
|
uniqueID = "AiInterfaceThread";
|
||||||
}
|
}
|
||||||
|
|
||||||
AiInterfaceThread::~AiInterfaceThread() {
|
AiInterfaceThread::~AiInterfaceThread() {
|
||||||
|
|
|
@ -40,6 +40,7 @@ namespace Glest{ namespace Game{
|
||||||
CommanderNetworkThread::CommanderNetworkThread() : BaseThread() {
|
CommanderNetworkThread::CommanderNetworkThread() : BaseThread() {
|
||||||
this->idStatus = make_pair<int,bool>(-1,false);
|
this->idStatus = make_pair<int,bool>(-1,false);
|
||||||
this->commanderInterface = NULL;
|
this->commanderInterface = NULL;
|
||||||
|
uniqueID = "CommanderNetworkThread";
|
||||||
}
|
}
|
||||||
|
|
||||||
CommanderNetworkThread::CommanderNetworkThread(CommanderNetworkCallbackInterface *commanderInterface) : BaseThread() {
|
CommanderNetworkThread::CommanderNetworkThread(CommanderNetworkCallbackInterface *commanderInterface) : BaseThread() {
|
||||||
|
|
|
@ -1134,7 +1134,11 @@ void Game::load(int loadTypes) {
|
||||||
if((loadTypes & lgt_Scenario) == lgt_Scenario) {
|
if((loadTypes & lgt_Scenario) == lgt_Scenario) {
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||||
if(scenarioName.empty() == false) {
|
if(scenarioName.empty() == false) {
|
||||||
Lang::getInstance().loadScenarioStrings(gameSettings.getScenarioDir(), scenarioName);
|
|
||||||
|
bool isTutorial = Scenario::isGameTutorial(gameSettings.getScenarioDir());
|
||||||
|
//printf("Loading scenario gameSettings.getScenarioDir() [%s] scenarioName [%s] isTutorial: %d\n",gameSettings.getScenarioDir().c_str(),scenarioName.c_str(),isTutorial);
|
||||||
|
|
||||||
|
Lang::getInstance().loadScenarioStrings(gameSettings.getScenarioDir(), scenarioName, isTutorial);
|
||||||
|
|
||||||
//printf("In [%s::%s Line: %d] rootNode [%p][%s]\n",__FILE__,__FUNCTION__,__LINE__,loadGameNode,(loadGameNode != NULL ? loadGameNode->getName().c_str() : "none"));
|
//printf("In [%s::%s Line: %d] rootNode [%p][%s]\n",__FILE__,__FUNCTION__,__LINE__,loadGameNode,(loadGameNode != NULL ? loadGameNode->getName().c_str() : "none"));
|
||||||
world.loadScenario(gameSettings.getScenarioDir(), &checksum, false,loadGameNode);
|
world.loadScenario(gameSettings.getScenarioDir(), &checksum, false,loadGameNode);
|
||||||
|
@ -2451,8 +2455,10 @@ void Game::update() {
|
||||||
|
|
||||||
//printf("\nname [%s] scenarioFile [%s] results.size() = " MG_SIZE_T_SPECIFIER "\n",name.c_str(),scenarioFile.c_str(),results.size());
|
//printf("\nname [%s] scenarioFile [%s] results.size() = " MG_SIZE_T_SPECIFIER "\n",name.c_str(),scenarioFile.c_str(),results.size());
|
||||||
//printf("[%s:%s] Line: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
//printf("[%s:%s] Line: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
|
bool isTutorial = Scenario::isGameTutorial(scenarioFile);
|
||||||
ScenarioInfo scenarioInfo;
|
ScenarioInfo scenarioInfo;
|
||||||
Scenario::loadScenarioInfo(scenarioFile, &scenarioInfo);
|
Scenario::loadScenarioInfo(scenarioFile, &scenarioInfo, isTutorial);
|
||||||
|
|
||||||
//printf("[%s:%s] Line: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
//printf("[%s:%s] Line: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||||
GameSettings gameSettings;
|
GameSettings gameSettings;
|
||||||
|
|
|
@ -373,7 +373,6 @@ private:
|
||||||
|
|
||||||
bool switchSetupForSlots(ServerInterface *& serverInterface,
|
bool switchSetupForSlots(ServerInterface *& serverInterface,
|
||||||
int startIndex, int endIndex, bool onlyNetworkUnassigned);
|
int startIndex, int endIndex, bool onlyNetworkUnassigned);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}}//end namespace
|
}}//end namespace
|
||||||
|
|
|
@ -206,12 +206,20 @@ bool Lang::isUTF8Language() const {
|
||||||
return is_utf8_language;
|
return is_utf8_language;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Lang::loadScenarioStrings(string scenarioDir, string scenarioName){
|
void Lang::loadScenarioStrings(string scenarioDir, string scenarioName, bool isTutorial) {
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] scenarioDir = [%s] scenarioName = [%s]\n",__FILE__,__FUNCTION__,__LINE__,scenarioDir.c_str(),scenarioName.c_str());
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] scenarioDir = [%s] scenarioName = [%s]\n",__FILE__,__FUNCTION__,__LINE__,scenarioDir.c_str(),scenarioName.c_str());
|
||||||
|
|
||||||
|
//printf("Loading scenario scenarioDir [%s] scenarioName [%s]\n",scenarioDir.c_str(),scenarioName.c_str());
|
||||||
|
|
||||||
// First try to find scenario lng file in userdata
|
// First try to find scenario lng file in userdata
|
||||||
Config &config = Config::getInstance();
|
Config &config = Config::getInstance();
|
||||||
vector<string> scenarioPaths = config.getPathListForType(ptScenarios);
|
vector<string> scenarioPaths;
|
||||||
|
if(isTutorial == false) {
|
||||||
|
scenarioPaths = config.getPathListForType(ptScenarios);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
scenarioPaths = config.getPathListForType(ptTutorials);
|
||||||
|
}
|
||||||
if(scenarioPaths.size() > 1) {
|
if(scenarioPaths.size() > 1) {
|
||||||
string &scenarioPath = scenarioPaths[1];
|
string &scenarioPath = scenarioPaths[1];
|
||||||
endPathWithSlash(scenarioPath);
|
endPathWithSlash(scenarioPath);
|
||||||
|
@ -242,6 +250,8 @@ void Lang::loadScenarioStrings(string scenarioDir, string scenarioName){
|
||||||
|
|
||||||
//try to load the current language first
|
//try to load the current language first
|
||||||
if(fileExists(path)) {
|
if(fileExists(path)) {
|
||||||
|
//printf("#2 Loading scenario path [%s]\n",path.c_str());
|
||||||
|
|
||||||
scenarioStrings.load(path);
|
scenarioStrings.load(path);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -252,6 +262,8 @@ void Lang::loadScenarioStrings(string scenarioDir, string scenarioName){
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] path = [%s]\n",__FILE__,__FUNCTION__,__LINE__,path.c_str());
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] path = [%s]\n",__FILE__,__FUNCTION__,__LINE__,path.c_str());
|
||||||
|
|
||||||
if(fileExists(path)){
|
if(fileExists(path)){
|
||||||
|
//printf("#3 Loading scenario path [%s]\n",path.c_str());
|
||||||
|
|
||||||
scenarioStrings.load(path);
|
scenarioStrings.load(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ public:
|
||||||
static Lang &getInstance();
|
static Lang &getInstance();
|
||||||
|
|
||||||
void loadStrings(string uselanguage, bool loadFonts=true, bool fallbackToDefault=false);
|
void loadStrings(string uselanguage, bool loadFonts=true, bool fallbackToDefault=false);
|
||||||
void loadScenarioStrings(string scenarioDir, string scenarioName);
|
void loadScenarioStrings(string scenarioDir, string scenarioName, bool isTutorial);
|
||||||
void loadTechTreeStrings(string techTree);
|
void loadTechTreeStrings(string techTree);
|
||||||
void loadTilesetStrings(string tileset);
|
void loadTilesetStrings(string tileset);
|
||||||
|
|
||||||
|
|
|
@ -466,7 +466,8 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if(file != "") {
|
if(file != "") {
|
||||||
Scenario::loadScenarioInfo(file, &scenarioInfo);
|
bool isTutorial = Scenario::isGameTutorial(file);
|
||||||
|
Scenario::loadScenarioInfo(file, &scenarioInfo, isTutorial);
|
||||||
|
|
||||||
bool isNetworkScenario = false;
|
bool isNetworkScenario = false;
|
||||||
for(unsigned int j = 0; isNetworkScenario == false && j < GameConstants::maxPlayers; ++j) {
|
for(unsigned int j = 0; isNetworkScenario == false && j < GameConstants::maxPlayers; ++j) {
|
||||||
|
@ -4278,7 +4279,9 @@ void MenuStateConnectedGame::setupUIFromGameSettings(GameSettings *gameSettings,
|
||||||
string scenario = gameSettings->getScenario();
|
string scenario = gameSettings->getScenario();
|
||||||
listBoxScenario.setSelectedItem(formatString(scenario));
|
listBoxScenario.setSelectedItem(formatString(scenario));
|
||||||
string file = Scenario::getScenarioPath(dirList, scenario);
|
string file = Scenario::getScenarioPath(dirList, scenario);
|
||||||
Scenario::loadScenarioInfo(file, &scenarioInfo);
|
|
||||||
|
bool isTutorial = Scenario::isGameTutorial(file);
|
||||||
|
Scenario::loadScenarioInfo(file, &scenarioInfo, isTutorial);
|
||||||
|
|
||||||
gameSettings->setScenarioDir(Scenario::getScenarioPath(dirList, scenarioInfo.name));
|
gameSettings->setScenarioDir(Scenario::getScenarioPath(dirList, scenarioInfo.name));
|
||||||
|
|
||||||
|
@ -4971,7 +4974,8 @@ void MenuStateConnectedGame::setupTilesetList(string scenario) {
|
||||||
|
|
||||||
void MenuStateConnectedGame::loadScenarioInfo(string file, ScenarioInfo *scenarioInfo) {
|
void MenuStateConnectedGame::loadScenarioInfo(string file, ScenarioInfo *scenarioInfo) {
|
||||||
//printf("Load scenario file [%s]\n",file.c_str());
|
//printf("Load scenario file [%s]\n",file.c_str());
|
||||||
Scenario::loadScenarioInfo(file, scenarioInfo);
|
bool isTutorial = Scenario::isGameTutorial(file);
|
||||||
|
Scenario::loadScenarioInfo(file, scenarioInfo, isTutorial);
|
||||||
|
|
||||||
//cleanupPreviewTexture();
|
//cleanupPreviewTexture();
|
||||||
previewLoadDelayTimer=time(NULL);
|
previewLoadDelayTimer=time(NULL);
|
||||||
|
|
|
@ -668,7 +668,8 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if(file != "") {
|
if(file != "") {
|
||||||
Scenario::loadScenarioInfo(file, &scenarioInfo);
|
bool isTutorial = Scenario::isGameTutorial(file);
|
||||||
|
Scenario::loadScenarioInfo(file, &scenarioInfo, isTutorial);
|
||||||
|
|
||||||
bool isNetworkScenario = false;
|
bool isNetworkScenario = false;
|
||||||
for(unsigned int j = 0; isNetworkScenario == false && j < GameConstants::maxPlayers; ++j) {
|
for(unsigned int j = 0; isNetworkScenario == false && j < GameConstants::maxPlayers; ++j) {
|
||||||
|
@ -4207,7 +4208,8 @@ int32 MenuStateCustomGame::getNetworkPlayerStatus() {
|
||||||
|
|
||||||
void MenuStateCustomGame::loadScenarioInfo(string file, ScenarioInfo *scenarioInfo) {
|
void MenuStateCustomGame::loadScenarioInfo(string file, ScenarioInfo *scenarioInfo) {
|
||||||
//printf("Load scenario file [%s]\n",file.c_str());
|
//printf("Load scenario file [%s]\n",file.c_str());
|
||||||
Scenario::loadScenarioInfo(file, scenarioInfo);
|
bool isTutorial = Scenario::isGameTutorial(file);
|
||||||
|
Scenario::loadScenarioInfo(file, scenarioInfo, isTutorial);
|
||||||
|
|
||||||
//cleanupPreviewTexture();
|
//cleanupPreviewTexture();
|
||||||
previewLoadDelayTimer=time(NULL);
|
previewLoadDelayTimer=time(NULL);
|
||||||
|
|
|
@ -347,7 +347,8 @@ void MenuStateScenario::setScenario(int i) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MenuStateScenario::loadScenarioInfo(string file, ScenarioInfo *scenarioInfo) {
|
void MenuStateScenario::loadScenarioInfo(string file, ScenarioInfo *scenarioInfo) {
|
||||||
Scenario::loadScenarioInfo(file, scenarioInfo);
|
bool isTutorial = Scenario::isGameTutorial(file);
|
||||||
|
Scenario::loadScenarioInfo(file, scenarioInfo, isTutorial);
|
||||||
|
|
||||||
cleanupPreviewTexture();
|
cleanupPreviewTexture();
|
||||||
previewLoadDelayTimer=time(NULL);
|
previewLoadDelayTimer=time(NULL);
|
||||||
|
|
|
@ -45,6 +45,7 @@ const bool debugClientInterfacePerf = false;
|
||||||
|
|
||||||
ClientInterfaceThread::ClientInterfaceThread(ClientInterface *client) : BaseThread() {
|
ClientInterfaceThread::ClientInterfaceThread(ClientInterface *client) : BaseThread() {
|
||||||
this->clientInterface = client;
|
this->clientInterface = client;
|
||||||
|
uniqueID = "ClientInterfaceThread";
|
||||||
}
|
}
|
||||||
|
|
||||||
ClientInterfaceThread::~ClientInterfaceThread() {
|
ClientInterfaceThread::~ClientInterfaceThread() {
|
||||||
|
|
|
@ -37,6 +37,7 @@ ConnectionSlotThread::ConnectionSlotThread(int slotIndex) : BaseThread() {
|
||||||
this->triggerIdMutex = new Mutex();
|
this->triggerIdMutex = new Mutex();
|
||||||
this->slotIndex = slotIndex;
|
this->slotIndex = slotIndex;
|
||||||
this->slotInterface = NULL;
|
this->slotInterface = NULL;
|
||||||
|
uniqueID = "ConnectionSlotThread";
|
||||||
//this->event = NULL;
|
//this->event = NULL;
|
||||||
eventList.clear();
|
eventList.clear();
|
||||||
eventList.reserve(100);
|
eventList.reserve(100);
|
||||||
|
@ -47,6 +48,7 @@ ConnectionSlotThread::ConnectionSlotThread(ConnectionSlotCallbackInterface *slot
|
||||||
this->triggerIdMutex = new Mutex();
|
this->triggerIdMutex = new Mutex();
|
||||||
this->slotIndex = slotIndex;
|
this->slotIndex = slotIndex;
|
||||||
this->slotInterface = slotInterface;
|
this->slotInterface = slotInterface;
|
||||||
|
uniqueID = "ConnectionSlotThread";
|
||||||
//this->event = NULL;
|
//this->event = NULL;
|
||||||
eventList.clear();
|
eventList.clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,6 +216,7 @@ FactionThread::FactionThread(Faction *faction) : BaseThread() {
|
||||||
this->triggerIdMutex = new Mutex();
|
this->triggerIdMutex = new Mutex();
|
||||||
this->faction = faction;
|
this->faction = faction;
|
||||||
this->masterController = NULL;
|
this->masterController = NULL;
|
||||||
|
uniqueID = "FactionThread";
|
||||||
}
|
}
|
||||||
|
|
||||||
FactionThread::~FactionThread() {
|
FactionThread::~FactionThread() {
|
||||||
|
|
|
@ -54,7 +54,8 @@ Checksum Scenario::load(const string &path) {
|
||||||
snprintf(szBuf,8096,Lang::getInstance().get("LogScreenGameLoadingScenario","",true).c_str(),formatString(name).c_str());
|
snprintf(szBuf,8096,Lang::getInstance().get("LogScreenGameLoadingScenario","",true).c_str(),formatString(name).c_str());
|
||||||
Logger::getInstance().add(szBuf, true);
|
Logger::getInstance().add(szBuf, true);
|
||||||
|
|
||||||
Scenario::loadScenarioInfo(path, &info);
|
bool isTutorial = Scenario::isGameTutorial(path);
|
||||||
|
Scenario::loadScenarioInfo(path, &info, isTutorial);
|
||||||
|
|
||||||
//parse xml
|
//parse xml
|
||||||
XmlTree xmlTree;
|
XmlTree xmlTree;
|
||||||
|
@ -153,7 +154,25 @@ string Scenario::getFunctionName(const XmlNode *scriptNode){
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Scenario::loadScenarioInfo(string file, ScenarioInfo *scenarioInfo) {
|
bool Scenario::isGameTutorial(string path) {
|
||||||
|
bool isTutorial = false;
|
||||||
|
Config &config = Config::getInstance();
|
||||||
|
vector<string> tutorialPaths = config.getPathListForType(ptTutorials);
|
||||||
|
if(tutorialPaths.empty() == false) {
|
||||||
|
for(unsigned int tutorialIndex = 0; tutorialIndex < tutorialPaths.size(); ++tutorialIndex) {
|
||||||
|
const string &tutorialPath = tutorialPaths[tutorialIndex];
|
||||||
|
size_t pos = path.find( tutorialPath );
|
||||||
|
if( pos != path.npos ) {
|
||||||
|
isTutorial = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return isTutorial;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scenario::loadScenarioInfo(string file, ScenarioInfo *scenarioInfo, bool isTutorial) {
|
||||||
//printf("[%s:%s] Line: %d file [%s]\n",__FILE__,__FUNCTION__,__LINE__,file.c_str());
|
//printf("[%s:%s] Line: %d file [%s]\n",__FILE__,__FUNCTION__,__LINE__,file.c_str());
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] file [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,file.c_str());
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] file [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,file.c_str());
|
||||||
//printf("In [%s::%s Line: %d] file [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,file.c_str());
|
//printf("In [%s::%s Line: %d] file [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,file.c_str());
|
||||||
|
@ -309,7 +328,7 @@ void Scenario::loadScenarioInfo(string file, ScenarioInfo *scenarioInfo) {
|
||||||
|
|
||||||
|
|
||||||
//look for description and append it
|
//look for description and append it
|
||||||
lang.loadScenarioStrings(scenarioDir,scenarioName.c_str());
|
lang.loadScenarioStrings(scenarioDir,scenarioName.c_str(),isTutorial);
|
||||||
//string tmp_description = lang.getScenarioString("DESCRIPTION");
|
//string tmp_description = lang.getScenarioString("DESCRIPTION");
|
||||||
string tmp_description = "";
|
string tmp_description = "";
|
||||||
if(lang.hasScenarioString("DESCRIPTION") == true) {
|
if(lang.hasScenarioString("DESCRIPTION") == true) {
|
||||||
|
|
|
@ -135,12 +135,13 @@ public:
|
||||||
|
|
||||||
ScenarioInfo getInfo() const { return info; }
|
ScenarioInfo getInfo() const { return info; }
|
||||||
|
|
||||||
|
static bool isGameTutorial(string path);
|
||||||
static string getScenarioPath(const vector<string> dir, const string &scenarioName, bool getMatchingRootScenarioPathOnly=false);
|
static string getScenarioPath(const vector<string> dir, const string &scenarioName, bool getMatchingRootScenarioPathOnly=false);
|
||||||
static string getScenarioPath(const string &dir, const string &scenarioName);
|
static string getScenarioPath(const string &dir, const string &scenarioName);
|
||||||
static int getScenarioPathIndex(const vector<string> dirList, const string &scenarioName);
|
static int getScenarioPathIndex(const vector<string> dirList, const string &scenarioName);
|
||||||
static string getScenarioDir(const vector<string> dir, const string &scenarioName);
|
static string getScenarioDir(const vector<string> dir, const string &scenarioName);
|
||||||
|
|
||||||
static void loadScenarioInfo(string file, ScenarioInfo *scenarioInfo);
|
static void loadScenarioInfo(string file, ScenarioInfo *scenarioInfo,bool isTutorial);
|
||||||
static ControlType strToControllerType(const string &str);
|
static ControlType strToControllerType(const string &str);
|
||||||
static string controllerTypeToStr(const ControlType &ct);
|
static string controllerTypeToStr(const ControlType &ct);
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ FileCRCPreCacheThread::FileCRCPreCacheThread() : BaseThread() {
|
||||||
techDataPaths.clear();
|
techDataPaths.clear();
|
||||||
workerThreadTechPaths.clear();
|
workerThreadTechPaths.clear();
|
||||||
processTechCB = NULL;
|
processTechCB = NULL;
|
||||||
|
uniqueID = "FileCRCPreCacheThread";
|
||||||
}
|
}
|
||||||
|
|
||||||
FileCRCPreCacheThread::FileCRCPreCacheThread(vector<string> techDataPaths,
|
FileCRCPreCacheThread::FileCRCPreCacheThread(vector<string> techDataPaths,
|
||||||
|
@ -39,6 +40,7 @@ FileCRCPreCacheThread::FileCRCPreCacheThread(vector<string> techDataPaths,
|
||||||
this->techDataPaths = techDataPaths;
|
this->techDataPaths = techDataPaths;
|
||||||
this->workerThreadTechPaths = workerThreadTechPaths;
|
this->workerThreadTechPaths = workerThreadTechPaths;
|
||||||
this->processTechCB = processTechCB;
|
this->processTechCB = processTechCB;
|
||||||
|
uniqueID = "FileCRCPreCacheThread";
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FileCRCPreCacheThread::canShutdown(bool deleteSelfIfShutdownDelayed) {
|
bool FileCRCPreCacheThread::canShutdown(bool deleteSelfIfShutdownDelayed) {
|
||||||
|
@ -346,6 +348,7 @@ SimpleTaskThread::SimpleTaskThread( SimpleTaskCallbackInterface *simpleTaskInter
|
||||||
bool needTaskSignal) : BaseThread(),
|
bool needTaskSignal) : BaseThread(),
|
||||||
simpleTaskInterface(NULL),
|
simpleTaskInterface(NULL),
|
||||||
overrideShutdownTask(NULL) {
|
overrideShutdownTask(NULL) {
|
||||||
|
uniqueID = "SimpleTaskThread";
|
||||||
this->simpleTaskInterface = simpleTaskInterface;
|
this->simpleTaskInterface = simpleTaskInterface;
|
||||||
this->executionCount = executionCount;
|
this->executionCount = executionCount;
|
||||||
this->millisecsBetweenExecutions = millisecsBetweenExecutions;
|
this->millisecsBetweenExecutions = millisecsBetweenExecutions;
|
||||||
|
@ -525,6 +528,7 @@ bool SimpleTaskThread::getTaskSignalled() {
|
||||||
// -------------------------------------------------
|
// -------------------------------------------------
|
||||||
|
|
||||||
LogFileThread::LogFileThread() : BaseThread() {
|
LogFileThread::LogFileThread() : BaseThread() {
|
||||||
|
uniqueID = "LogFileThread";
|
||||||
logList.clear();
|
logList.clear();
|
||||||
lastSaveToDisk = time(NULL);
|
lastSaveToDisk = time(NULL);
|
||||||
static string mutexOwnerId = string(__FILE__) + string("_") + intToStr(__LINE__);
|
static string mutexOwnerId = string(__FILE__) + string("_") + intToStr(__LINE__);
|
||||||
|
|
|
@ -517,6 +517,7 @@ void IRCThread::setEventDataDone(bool value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
IRCThread::IRCThread(const std::vector<string> &argv, IRCCallbackInterface *callbackObj) : BaseThread() {
|
IRCThread::IRCThread(const std::vector<string> &argv, IRCCallbackInterface *callbackObj) : BaseThread() {
|
||||||
|
uniqueID = "IRCThread";
|
||||||
this->argv = argv;
|
this->argv = argv;
|
||||||
this->callbackObj = callbackObj;
|
this->callbackObj = callbackObj;
|
||||||
ircSession = NULL;
|
ircSession = NULL;
|
||||||
|
|
|
@ -242,6 +242,8 @@ FTPClientThread::FTPClientThread(int portNumber, string serverUrl,
|
||||||
string fileArchiveExtractCommandParameters,
|
string fileArchiveExtractCommandParameters,
|
||||||
int fileArchiveExtractCommandSuccessResult,
|
int fileArchiveExtractCommandSuccessResult,
|
||||||
string tempFilesPath) : BaseThread() {
|
string tempFilesPath) : BaseThread() {
|
||||||
|
|
||||||
|
uniqueID = "FTPClientThread";
|
||||||
this->portNumber = portNumber;
|
this->portNumber = portNumber;
|
||||||
this->serverUrl = serverUrl;
|
this->serverUrl = serverUrl;
|
||||||
this->mapsPath = mapsPath;
|
this->mapsPath = mapsPath;
|
||||||
|
|
|
@ -74,6 +74,8 @@ FTPServerThread::FTPServerThread(std::pair<string,string> mapsPath,
|
||||||
bool allowInternetTilesetFileTransfers, bool allowInternetTechtreeFileTransfers,
|
bool allowInternetTilesetFileTransfers, bool allowInternetTechtreeFileTransfers,
|
||||||
int portNumber, int maxPlayers,
|
int portNumber, int maxPlayers,
|
||||||
FTPClientValidationInterface *ftpValidationIntf, string tempFilesPath) : BaseThread() {
|
FTPClientValidationInterface *ftpValidationIntf, string tempFilesPath) : BaseThread() {
|
||||||
|
|
||||||
|
uniqueID = "FTPServerThread";
|
||||||
this->mapsPath = mapsPath;
|
this->mapsPath = mapsPath;
|
||||||
this->tilesetsPath = tilesetsPath;
|
this->tilesetsPath = tilesetsPath;
|
||||||
this->techtreesPath = techtreesPath;
|
this->techtreesPath = techtreesPath;
|
||||||
|
|
|
@ -2010,6 +2010,7 @@ BroadCastClientSocketThread::BroadCastClientSocketThread(DiscoveredServersInterf
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
discoveredServersCB = cb;
|
discoveredServersCB = cb;
|
||||||
|
uniqueID = "BroadCastClientSocketThread";
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
}
|
}
|
||||||
|
@ -2782,6 +2783,7 @@ BroadCastSocketThread::BroadCastSocketThread(int boundPort) : BaseThread() {
|
||||||
mutexPauseBroadcast = new Mutex();
|
mutexPauseBroadcast = new Mutex();
|
||||||
setPauseBroadcast(false);
|
setPauseBroadcast(false);
|
||||||
this->boundPort = boundPort;
|
this->boundPort = boundPort;
|
||||||
|
uniqueID = "BroadCastSocketThread";
|
||||||
//printf("new broadcast thread [%p]\n",this);
|
//printf("new broadcast thread [%p]\n",this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@ protected:
|
||||||
}
|
}
|
||||||
public:
|
public:
|
||||||
ThreadGarbageCollector() : BaseThread() {
|
ThreadGarbageCollector() : BaseThread() {
|
||||||
|
uniqueID = "ThreadGarbageCollector";
|
||||||
removeThreadFromList();
|
removeThreadFromList();
|
||||||
}
|
}
|
||||||
virtual ~ThreadGarbageCollector() {
|
virtual ~ThreadGarbageCollector() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user