Implemented the new g3d spec

This commit is contained in:
mathusummut
2018-06-28 21:36:10 +02:00
parent 90556c870e
commit b1760253fd
24 changed files with 225 additions and 338 deletions

View File

@@ -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;

View File

@@ -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));