mirror of
https://github.com/glest/glest-source.git
synced 2025-08-12 03:14:00 +02:00
Implemented the new g3d spec
This commit is contained in:
@@ -218,9 +218,9 @@ namespace Shared {
|
||||
double getTimeDuationMinutes(int frames, int updateFps) {
|
||||
int framesleft = frames;
|
||||
double hours = (int) ((int) frames / (float) updateFps / 3600.0f);
|
||||
framesleft = framesleft - hours * 3600 * updateFps;
|
||||
framesleft = (int) (framesleft - hours * 3600 * updateFps);
|
||||
double minutes = (int) ((int) framesleft / (float) updateFps / 60.0f);
|
||||
framesleft = framesleft - minutes * 60 * updateFps;
|
||||
framesleft = (int) (framesleft - minutes * 60 * updateFps);
|
||||
double seconds = (int) ((int) framesleft / (float) updateFps);
|
||||
|
||||
double result = (hours * 60.0) + minutes;
|
||||
|
@@ -514,8 +514,8 @@ namespace Shared {
|
||||
//printf("In [%s::%s - %d]defaultValueIfNotFound = [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,defaultValueIfNotFound);
|
||||
return string(defaultValueIfNotFound);
|
||||
} else {
|
||||
//throw megaglest_runtime_error("Value not found in propertyMap: " + key + ", loaded from: " + path);
|
||||
throw runtime_error("Value not found in propertyMap: " + key + ", loaded from: " + path);
|
||||
//throw runtime_error("Value not found in propertyMap: " + key + ", loaded from: " + path);
|
||||
return string();
|
||||
}
|
||||
} else {
|
||||
return (it->second != "" ? it->second : (defaultValueIfNotFound != NULL ? defaultValueIfNotFound : it->second));
|
||||
@@ -618,8 +618,8 @@ namespace Shared {
|
||||
//printf("In [%s::%s - %d]defaultValueIfNotFound = [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,defaultValueIfNotFound);
|
||||
return string(defaultValueIfNotFound);
|
||||
} else {
|
||||
//throw megaglest_runtime_error("Value not found in propertyMap: " + string(key) + ", loaded from: " + path);
|
||||
throw runtime_error("Value not found in propertyMap: " + string(key) + ", loaded from: " + path);
|
||||
//throw runtime_error("Value not found in propertyMap: " + string(key) + ", loaded from: " + path);
|
||||
return string();
|
||||
}
|
||||
} else {
|
||||
return (it->second != "" ? it->second : (defaultValueIfNotFound != NULL ? defaultValueIfNotFound : it->second));
|
||||
|
Reference in New Issue
Block a user