mirror of
https://github.com/glest/glest-source.git
synced 2025-08-22 16:02:50 +02:00
- fixed a few issues found by JeffM (debian games team irc channel) while testing on Windows 7 64 bit
This commit is contained in:
@@ -613,6 +613,7 @@ void World::updateAllFactionConsumableCosts() {
|
||||
|
||||
void World::update() {
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
bool showPerfStats = Config::getInstance().getBool("ShowPerfStats","false");
|
||||
Chrono chronoPerf;
|
||||
char perfBuf[8096]="";
|
||||
@@ -639,6 +640,7 @@ void World::update() {
|
||||
perfList.push_back(perfBuf);
|
||||
}
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
// objects on the map from tilesets
|
||||
updateAllTilesetObjects();
|
||||
|
||||
@@ -665,6 +667,7 @@ void World::update() {
|
||||
perfList.push_back(perfBuf);
|
||||
}
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
//food costs
|
||||
updateAllFactionConsumableCosts();
|
||||
|
||||
@@ -673,6 +676,7 @@ void World::update() {
|
||||
perfList.push_back(perfBuf);
|
||||
}
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
//fow smoothing
|
||||
if(fogOfWarSmoothing && ((frameCount+1) % (fogOfWarSmoothingFrameSkip+1))==0) {
|
||||
float fogFactor= static_cast<float>(frameCount % GameConstants::updateFps) / GameConstants::updateFps;
|
||||
@@ -684,6 +688,7 @@ void World::update() {
|
||||
perfList.push_back(perfBuf);
|
||||
}
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
//tick
|
||||
bool needToTick = canTickWorld();
|
||||
|
||||
@@ -694,6 +699,7 @@ void World::update() {
|
||||
|
||||
if(needToTick == true) {
|
||||
//printf("=========== World is about to be updated, current frameCount = %d\n",frameCount);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
tick();
|
||||
}
|
||||
|
||||
@@ -708,6 +714,7 @@ void World::update() {
|
||||
printf("%s",perfList[x].c_str());
|
||||
}
|
||||
}
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
}
|
||||
|
||||
bool World::canTickWorld() const {
|
||||
|
@@ -577,7 +577,8 @@ void TextRenderer3DGl::internalRender(const string &text, float x, float y, boo
|
||||
vector<string> parts;
|
||||
char szBuf[8096]="";
|
||||
|
||||
for (int i=0; renderText[i] != '\0'; ++i) {
|
||||
//for (int i=0; renderText[i] != '\0'; ++i) {
|
||||
for(size_t i=0; i < renderText.size(); ++i) {
|
||||
szBuf[0] = '\0';
|
||||
snprintf(szBuf,8096,"%c",renderText[i]);
|
||||
|
||||
|
@@ -423,6 +423,8 @@ bool isdir(const char *path)
|
||||
}
|
||||
|
||||
bool fileExists(const string &path) {
|
||||
if (path.size() == 0) return false;
|
||||
|
||||
#ifdef WIN32
|
||||
wstring wstr = utf8_decode(path);
|
||||
FILE* file= _wfopen(wstr.c_str(), L"rb");
|
||||
|
Reference in New Issue
Block a user