- added the beginning work to support translatable techtrees

This commit is contained in:
Mark Vejvoda
2012-05-02 20:46:47 +00:00
parent 5c0db25c86
commit 897346d1f5
21 changed files with 141 additions and 47 deletions

View File

@@ -736,28 +736,6 @@ int round(float f){
// ==================== misc ====================
bool fileExists(const string &path) {
#ifdef WIN32
wstring wstr = utf8_decode(path);
FILE* file= _wfopen(wstr.c_str(), L"rb");
#else
FILE* file= fopen(path.c_str(), "rb");
#endif
if(file != NULL) {
fclose(file);
return true;
}
else {
//int fileErrno = errno;
#ifdef WIN32
int fileErrno = errno;
DWORD error = GetLastError();
string strError = "[#6] Could not open file, result: " + intToStr(error) + " - " + intToStr(fileErrno) + " " + strerror(fileErrno) + " [" + path + "]";
#endif
}
return false;
}
bool checkVersionComptability(string clientVersionString, string serverVersionString) {
bool compatible = (clientVersionString == serverVersionString);
if(compatible == false) {