- added new intro video by Tiger

- bugfix for video display
- cleaned more code wanrings from cppcheck
This commit is contained in:
Mark Vejvoda 2012-10-18 07:49:50 +00:00
parent c898371d6c
commit 829a72db35
5 changed files with 38 additions and 34 deletions

View File

@ -6,7 +6,7 @@ http://sourceforge.net/apps/trac/megaglest/timeline
v3.7.0
- bugfixes reported in the bugs forum since 3.6.0.3
- first person view allows you to follow a selected unit. Select one unit anf press f4 to enable (deselect anf f4 to disable).
- third person view allows you to follow a selected unit. Select one unit anf press f4 to enable (deselect anf f4 to disable).
- cell markers allow players to create markers anywhere on the map and associate a note with them. All team players see the markers.
- quick sonar signal to tell team players where the action is happening
- admin player can disconnect other network players in game
@ -19,6 +19,9 @@ v3.7.0
- more game data validation for commandline modders, see --help for more info
- many new lua commands for scenario modders
- enhanced AI management (logging and modding) and added more intellegence to decsions
- enhanced game data downloads now allow for downloading data from the mod center instead of game server if available.
- Quick keys in game lobby, SHIFT+<letter>+listbox arrow to jump to that letter in a list
or Hold CTRL when clicking listbox for network control type to change all non human control values
- enhanced unicode support for non-ascii characters
- customizable unit, resource and upgrade language files
- tilesets support animated models

View File

@ -379,7 +379,8 @@ void ClientInterface::updateLobby() {
if(this->getNetworkGameDataSynchCheckOkTech() == false) {
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
vctFileList = getFolderTreeContentsCheckSumListRecursively(config.getPathListForType(ptTechs,scenarioDir),string("/") + networkMessageSynchNetworkGameData.getTech() + "/*", ".xml", NULL);
string pathSearchString = "/" + networkMessageSynchNetworkGameData.getTech() + "/*";
vctFileList = getFolderTreeContentsCheckSumListRecursively(config.getPathListForType(ptTechs,scenarioDir),pathSearchString, ".xml", NULL);
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);

View File

@ -188,21 +188,21 @@ vector<string> getFolderTreeContentsListRecursively(const string &path, const st
string getCRCCacheFilePath();
void setCRCCacheFilePath(string path);
std::pair<string,string> getFolderTreeContentsCheckSumCacheKey(vector<string> paths, string pathSearchString, const string filterFileExt);
void clearFolderTreeContentsCheckSum(vector<string> paths, string pathSearchString, const string filterFileExt);
uint32 getFolderTreeContentsCheckSumRecursively(vector<string> paths, string pathSearchString, const string filterFileExt, Checksum *recursiveChecksum,bool forceNoCache=false);
time_t getFolderTreeContentsCheckSumRecursivelyLastGenerated(vector<string> paths, string pathSearchString, const string filterFileExt);
std::pair<string,string> getFolderTreeContentsCheckSumCacheKey(vector<string> paths, string pathSearchString, const string &filterFileExt);
void clearFolderTreeContentsCheckSum(vector<string> paths, string pathSearchString, const string &filterFileExt);
uint32 getFolderTreeContentsCheckSumRecursively(vector<string> paths, string pathSearchString, const string &filterFileExt, Checksum *recursiveChecksum,bool forceNoCache=false);
time_t getFolderTreeContentsCheckSumRecursivelyLastGenerated(vector<string> paths, string pathSearchString, const string &filterFileExt);
std::pair<string,string> getFolderTreeContentsCheckSumCacheKey(const string &path, const string filterFileExt);
void clearFolderTreeContentsCheckSum(const string &path, const string filterFileExt);
std::pair<string,string> getFolderTreeContentsCheckSumCacheKey(const string &path, const string &filterFileExt);
void clearFolderTreeContentsCheckSum(const string &path, const string &filterFileExt);
uint32 getFolderTreeContentsCheckSumRecursively(const string &path, const string &filterFileExt, Checksum *recursiveChecksum,bool forceNoCache=false);
std::pair<string,string> getFolderTreeContentsCheckSumListCacheKey(vector<string> paths, string pathSearchString, const string filterFileExt);
void clearFolderTreeContentsCheckSumList(vector<string> paths, string pathSearchString, const string filterFileExt);
vector<std::pair<string,uint32> > getFolderTreeContentsCheckSumListRecursively(vector<string> paths, string pathSearchString, const string filterFileExt, vector<std::pair<string,uint32> > *recursiveMap);
std::pair<string,string> getFolderTreeContentsCheckSumListCacheKey(vector<string> paths, string pathSearchString, const string &filterFileExt);
void clearFolderTreeContentsCheckSumList(vector<string> paths, string pathSearchString, const string &filterFileExt);
vector<std::pair<string,uint32> > getFolderTreeContentsCheckSumListRecursively(vector<string> paths, string pathSearchString, const string &filterFileExt, vector<std::pair<string,uint32> > *recursiveMap);
std::pair<string,string> getFolderTreeContentsCheckSumListCacheKey(const string &path, const string filterFileExt);
void clearFolderTreeContentsCheckSumList(const string &path, const string filterFileExt);
std::pair<string,string> getFolderTreeContentsCheckSumListCacheKey(const string &path, const string &filterFileExt);
void clearFolderTreeContentsCheckSumList(const string &path, const string &filterFileExt);
vector<std::pair<string,uint32> > getFolderTreeContentsCheckSumListRecursively(const string &path, const string &filterFileExt, vector<std::pair<string,uint32> > *recursiveMap);
void createDirectoryPaths(string Path);
@ -225,8 +225,8 @@ void updatePathClimbingParts(string &path);
string formatPath(string path);
string replaceAll(string& context, const string& from, const string& to);
vector<char> replaceAllBetweenTokens(vector<char>& context, const string startToken, const string endToken, const string newText, bool removeTokens=true);
string replaceAllBetweenTokens(string& context, const string startToken, const string endToken, const string newText, bool removeTokens=true);
vector<char> replaceAllBetweenTokens(vector<char>& context, const string &startToken, const string &endToken, const string &newText, bool removeTokens=true);
string replaceAllBetweenTokens(string& context, const string &startToken, const string &endToken, const string &newText, bool removeTokens=true);
bool removeFile(string file);
bool renameFile(string oldFile, string newFile);
void removeFolder(const string path);

View File

@ -1387,20 +1387,20 @@ bool VideoPlayer::playFrame(bool swapBuffers) {
const double HEIGHT_DEFAULT = 768;
const double WIDTH_DEFAULT = 1024;
const double HEIGHT_MULTIPLIER = HEIGHT_DEFAULT / ctxPtr->height;
const double WIDTH_MULTIPLIER = WIDTH_DEFAULT / ctxPtr->width;
const double HEIGHT_MULTIPLIER = HEIGHT_DEFAULT / (double)ctxPtr->height;
const double WIDTH_MULTIPLIER = WIDTH_DEFAULT / (double)ctxPtr->width;
//printf("w x h = %d x %d\n",ctxPtr->width,ctxPtr->height);
glBegin(GL_TRIANGLE_STRIP);
glTexCoord2i(0, 1);
glVertex2i(ctxPtr->x, ctxPtr->y + ctxPtr->height * (int)HEIGHT_MULTIPLIER);
glVertex2i(ctxPtr->x, (int)((double)ctxPtr->y + (double)ctxPtr->height * HEIGHT_MULTIPLIER));
glTexCoord2i(0, 0);
glVertex2i(ctxPtr->x, ctxPtr->y);
glTexCoord2i(1, 1);
glVertex2i(ctxPtr->x+ctxPtr->width * (int)WIDTH_MULTIPLIER, ctxPtr->y+ctxPtr->height * (int)HEIGHT_MULTIPLIER);
glVertex2i((int)((double)ctxPtr->x + (double)ctxPtr->width * WIDTH_MULTIPLIER), (int)((double)ctxPtr->y + (double)ctxPtr->height * HEIGHT_MULTIPLIER));
glTexCoord2i(1, 0);
glVertex2i(ctxPtr->x+ctxPtr->width * (int)WIDTH_MULTIPLIER, ctxPtr->y);
glVertex2i((int)((double)ctxPtr->x + (double)ctxPtr->width * WIDTH_MULTIPLIER), ctxPtr->y);
glEnd();
}

View File

@ -619,7 +619,7 @@ string getFormattedCRCCacheFileName(std::pair<string,string> cacheKeys) {
//printf("result [%s]\n",result.c_str());
return result;
}
std::pair<string,string> getFolderTreeContentsCheckSumCacheKey(vector<string> paths, string pathSearchString, const string filterFileExt) {
std::pair<string,string> getFolderTreeContentsCheckSumCacheKey(vector<string> paths, string pathSearchString, const string &filterFileExt) {
string cacheLookupId = CacheManager::getFolderTreeContentsCheckSumRecursivelyCacheLookupKey1;
string cacheKey = "";
@ -753,7 +753,7 @@ void writeCachedFileCRCValue(string crcCacheFile, uint32 &crcValue) {
}
}
void clearFolderTreeContentsCheckSum(vector<string> paths, string pathSearchString, const string filterFileExt) {
void clearFolderTreeContentsCheckSum(vector<string> paths, string pathSearchString, const string &filterFileExt) {
std::pair<string,string> cacheKeys = getFolderTreeContentsCheckSumCacheKey(paths, pathSearchString, filterFileExt);
string cacheLookupId = cacheKeys.first;
std::map<string,uint32> &crcTreeCache = CacheManager::getCachedItem< std::map<string,uint32> >(cacheLookupId);
@ -775,7 +775,7 @@ void clearFolderTreeContentsCheckSum(vector<string> paths, string pathSearchStri
}
}
time_t getFolderTreeContentsCheckSumRecursivelyLastGenerated(vector<string> paths, string pathSearchString, const string filterFileExt) {
time_t getFolderTreeContentsCheckSumRecursivelyLastGenerated(vector<string> paths, string pathSearchString, const string &filterFileExt) {
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"-------------- In [%s::%s Line: %d] Calculating CRC for [%s] -----------\n",__FILE__,__FUNCTION__,__LINE__,pathSearchString.c_str());
std::pair<string,string> cacheKeys = getFolderTreeContentsCheckSumCacheKey(paths, pathSearchString, filterFileExt);
@ -807,7 +807,7 @@ time_t getFolderTreeContentsCheckSumRecursivelyLastGenerated(vector<string> path
}
//finds all filenames like path and gets their checksum of all files combined
uint32 getFolderTreeContentsCheckSumRecursively(vector<string> paths, string pathSearchString, const string filterFileExt, Checksum *recursiveChecksum, bool forceNoCache) {
uint32 getFolderTreeContentsCheckSumRecursively(vector<string> paths, string pathSearchString, const string &filterFileExt, Checksum *recursiveChecksum, bool forceNoCache) {
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"-------------- In [%s::%s Line: %d] Calculating CRC for [%s] -----------\n",__FILE__,__FUNCTION__,__LINE__,pathSearchString.c_str());
std::pair<string,string> cacheKeys = getFolderTreeContentsCheckSumCacheKey(paths, pathSearchString, filterFileExt);
@ -866,14 +866,14 @@ uint32 getFolderTreeContentsCheckSumRecursively(vector<string> paths, string pat
return result;
}
std::pair<string,string> getFolderTreeContentsCheckSumCacheKey(const string &path, const string filterFileExt) {
std::pair<string,string> getFolderTreeContentsCheckSumCacheKey(const string &path, const string &filterFileExt) {
string cacheLookupId = CacheManager::getFolderTreeContentsCheckSumRecursivelyCacheLookupKey2;
string cacheKey = path + "_" + filterFileExt;
return make_pair(cacheLookupId,cacheKey);
}
void clearFolderTreeContentsCheckSum(const string &path, const string filterFileExt) {
void clearFolderTreeContentsCheckSum(const string &path, const string &filterFileExt) {
std::pair<string,string> cacheKeys = getFolderTreeContentsCheckSumCacheKey(path,filterFileExt);
string cacheLookupId = cacheKeys.first;
std::map<string,uint32> &crcTreeCache = CacheManager::getCachedItem< std::map<string,uint32> >(cacheLookupId);
@ -1032,7 +1032,7 @@ uint32 getFolderTreeContentsCheckSumRecursively(const string &path, const string
}
std::pair<string,string> getFolderTreeContentsCheckSumListCacheKey(vector<string> paths, string pathSearchString, const string filterFileExt) {
std::pair<string,string> getFolderTreeContentsCheckSumListCacheKey(vector<string> paths, string pathSearchString, const string &filterFileExt) {
string cacheLookupId = CacheManager::getFolderTreeContentsCheckSumListRecursivelyCacheLookupKey1;
string cacheKey = "";
@ -1043,7 +1043,7 @@ std::pair<string,string> getFolderTreeContentsCheckSumListCacheKey(vector<string
return make_pair(cacheLookupId,cacheKey);
}
void clearFolderTreeContentsCheckSumList(vector<string> paths, string pathSearchString, const string filterFileExt) {
void clearFolderTreeContentsCheckSumList(vector<string> paths, string pathSearchString, const string &filterFileExt) {
std::pair<string,string> cacheKeys = getFolderTreeContentsCheckSumListCacheKey(paths, pathSearchString, filterFileExt);
string cacheLookupId = cacheKeys.first;
std::map<string,vector<std::pair<string,uint32> > > &crcTreeCache = CacheManager::getCachedItem< std::map<string,vector<std::pair<string,uint32> > > >(cacheLookupId);
@ -1063,7 +1063,7 @@ void clearFolderTreeContentsCheckSumList(vector<string> paths, string pathSearch
}
}
vector<std::pair<string,uint32> > getFolderTreeContentsCheckSumListRecursively(vector<string> paths, string pathSearchString, string filterFileExt, vector<std::pair<string,uint32> > *recursiveMap) {
vector<std::pair<string,uint32> > getFolderTreeContentsCheckSumListRecursively(vector<string> paths, string pathSearchString, const string &filterFileExt, vector<std::pair<string,uint32> > *recursiveMap) {
std::pair<string,string> cacheKeys = getFolderTreeContentsCheckSumListCacheKey(paths, pathSearchString, filterFileExt);
string cacheLookupId = cacheKeys.first;
std::map<string,vector<std::pair<string,uint32> > > &crcTreeCache = CacheManager::getCachedItem< std::map<string,vector<std::pair<string,uint32> > > >(cacheLookupId);
@ -1213,14 +1213,14 @@ vector<string> getFolderTreeContentsListRecursively(const string &path, const st
return resultFiles;
}
std::pair<string,string> getFolderTreeContentsCheckSumListCacheKey(const string &path, const string filterFileExt) {
std::pair<string,string> getFolderTreeContentsCheckSumListCacheKey(const string &path, const string &filterFileExt) {
string cacheLookupId = CacheManager::getFolderTreeContentsCheckSumListRecursivelyCacheLookupKey2;
string cacheKey = path + "_" + filterFileExt;
return make_pair(cacheLookupId,cacheKey);
}
void clearFolderTreeContentsCheckSumList(const string &path, const string filterFileExt) {
void clearFolderTreeContentsCheckSumList(const string &path, const string &filterFileExt) {
std::pair<string,string> cacheKeys = getFolderTreeContentsCheckSumListCacheKey(path,filterFileExt);
string cacheLookupId = cacheKeys.first;
std::map<string,vector<std::pair<string,uint32> > > &crcTreeCache = CacheManager::getCachedItem< std::map<string,vector<std::pair<string,uint32> > > >(cacheLookupId);
@ -1800,7 +1800,7 @@ string replaceAll(string& context, const string& from, const string& to) {
}
vector<char> replaceAllBetweenTokens(vector<char>& context,
const string startToken, const string endToken, const string newText,
const string &startToken, const string &endToken, const string &newText,
bool removeTokens) {
string newValue(context.begin(),context.end());
replaceAllBetweenTokens(newValue,startToken,endToken,newText,removeTokens);
@ -1808,8 +1808,8 @@ vector<char> replaceAllBetweenTokens(vector<char>& context,
return context;
}
string replaceAllBetweenTokens(string& context, const string startToken,
const string endToken, const string newText, bool removeTokens) {
string replaceAllBetweenTokens(string& context, const string &startToken,
const string &endToken, const string &newText, bool removeTokens) {
size_t lookHere = 0;
size_t foundHere = 0;
if((foundHere = context.find(startToken, lookHere)) != string::npos) {