Preload data in dev client as well, ref kaetemi/ryzomclassic#168

develop
kaetemi 4 years ago
parent 58b5941bbe
commit 9d303b2a9a
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -50,8 +50,9 @@ if not os.path.isfile(ClientDevDirectory + "/client.cfg"):
cfg = open(ClientDevDirectory + "/client.cfg", "w")
cfg.write("RootConfigFilename = \"client_default.cfg\";\n")
cfg.write("PreDataPath = {\n")
cfg.write("\t\"" + InstallDirectory + "\", \"user\", \"patch\", \"data\", \"examples\" \n")
cfg.write("\t\"user\", \"patch\", \"" + DataCommonDirectory + "\", \"" + GamedevDirectory + "\", \"" + LeveldesignDirectory + "/translation/translated\", \"" + InstallDirectory + "\", \"data\", \"examples\" \n")
cfg.write("};\n")
cfg.write("PreLoadPath = \"" + InstallDirectory + "\";\n")
cfg.write("PatchWanted = 0;\n")
cfg.write("DisplayLuaDebugInfo = 1;\n")
cfg.write("AllowDebugLua = 1;\n")

@ -1314,6 +1314,9 @@ void CClientConfig::setValues()
// Data Path no recurse.
READ_STRINGVECTOR_FV(DataPathNoRecurse);
// Pre-load path
READ_STRING_DEV(PreLoadPath);
// Streamed package path
READ_STRING_FV(StreamedPackagePath);

@ -391,6 +391,8 @@ struct CClientConfig
std::vector<string> DataPath;
/// Data Path no recurse.
std::vector<string> DataPathNoRecurse;
/// Pre-load path
std::string PreLoadPath;
/// Streamed package path
std::string StreamedPackagePath;
/// Streamed package hosts

@ -1071,14 +1071,18 @@ void initMainLoop()
ProgressBar.pushCropedValues (0, 0.25f);
if(!DBG_DisablePreloadShape)
{
Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheName, "data/3d/common/characters/shapes", "*.shape", false, &ProgressBar);
Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheName,
ClientCfg.PreLoadPath.empty() ? "data/3d/common/characters/shapes" : ClientCfg.PreLoadPath + "/characters_shapes",
"*.shape", false, &ProgressBar);
}
ProgressBar.popCropedValues ();
ProgressBar.progress (0.25f);
ProgressBar.pushCropedValues (0.25f,0.5f);
if(!DBG_DisablePreloadShape)
{
Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheName, "data/3d/common/characters/skeletons", "*.skel", false, &ProgressBar);
Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheName,
ClientCfg.PreLoadPath.empty() ? "data/3d/common/characters/skeletons" : ClientCfg.PreLoadPath + "/characters_skeletons",
"*.skel", false, &ProgressBar);
}
ProgressBar.popCropedValues ();
}
@ -1126,14 +1130,18 @@ void initMainLoop()
ProgressBar.pushCropedValues (0.5f, 0.75f);
if(!DBG_DisablePreloadShape)
{
Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheName, "data/3d/common/fauna/shapes", "*.shape", false, &ProgressBar);
Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheName,
ClientCfg.PreLoadPath.empty() ? "data/3d/common/fauna/shapes" : ClientCfg.PreLoadPath + "/fauna_shapes",
"*.shape", false, &ProgressBar);
}
ProgressBar.popCropedValues ();
ProgressBar.progress (0.75f);
ProgressBar.pushCropedValues (0.75f,1);
if(!DBG_DisablePreloadShape)
{
Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheName, "data/3d/common/fauna/skeletons", "*.skel", false, &ProgressBar);
Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheName,
ClientCfg.PreLoadPath.empty() ? "data/3d/common/fauna/skeletons" : ClientCfg.PreLoadPath + "/fauna_skeletons",
"*.skel", false, &ProgressBar);
}
ProgressBar.popCropedValues ();
}
@ -1174,14 +1182,18 @@ void initMainLoop()
ProgressBar.pushCropedValues (0.0f, 0.5f);
if(!DBG_DisablePreloadShape)
{
Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheNameFX, "data/3d/common/sfx", "*.ps", true, &ProgressBar, preloadFXTextures);
Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheNameFX,
ClientCfg.PreLoadPath.empty() ? "data/3d/common/sfx" : ClientCfg.PreLoadPath + "/sfx",
"*.ps", true, &ProgressBar, preloadFXTextures);
}
ProgressBar.popCropedValues ();
ProgressBar.progress (0.5f);
ProgressBar.pushCropedValues (0.5f,1);
if(!DBG_DisablePreloadShape)
{
Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheNameFX, "data/3d/common/sfx", "*.shape", true, &ProgressBar, preloadFXTextures);
Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheNameFX,
ClientCfg.PreLoadPath.empty() ? "data/3d/common/sfx" : ClientCfg.PreLoadPath + "/sfx",
"*.shape", true, &ProgressBar, preloadFXTextures);
}
ProgressBar.popCropedValues ();
}
@ -1214,7 +1226,9 @@ void initMainLoop()
ProgressBar.pushCropedValues (0.0f, 1.f);
if(!DBG_DisablePreloadShape)
{
Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheNameObjects, "data/3d/common/objects", "*.shape", true, &ProgressBar, preloadObjectTextures);
Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheNameObjects,
ClientCfg.PreLoadPath.empty() ? "data/3d/common/objects" : ClientCfg.PreLoadPath + "/objects",
"*.shape", true, &ProgressBar, preloadObjectTextures);
}
ProgressBar.popCropedValues ();
}

Loading…
Cancel
Save