Disable DynOS compression for non-dev again

This commit is contained in:
Agent X 2024-07-03 18:38:06 -04:00
parent b2042864dc
commit bc63f96f2b
3 changed files with 13 additions and 2 deletions

View File

@ -149,10 +149,12 @@ static void DynOS_Actor_Generate(const SysPath &aPackFolder, Array<Pair<u64, Str
// If there is an existing binary file for this layout, skip and go to the next actor
SysPath _BinFilename = fstring("%s/%s.bin", aPackFolder.c_str(), _GeoRootName.begin());
if (fs_sys_file_exists(_BinFilename.c_str())) {
#ifdef DEVELOPMENT
// Compress file to gain some space
if (!DynOS_Bin_IsCompressed(_BinFilename)) {
DynOS_Bin_Compress(_BinFilename);
}
#endif
return;
}
}
@ -258,12 +260,14 @@ void DynOS_Actor_GeneratePack(const SysPath &aPackFolder) {
if (SysPath(_PackEnt->d_name) == ".") continue;
if (SysPath(_PackEnt->d_name) == "..") continue;
#ifdef DEVELOPMENT
// Compress .bin files to gain some space
SysPath _Filename = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name);
if (SysPath(_PackEnt->d_name).find(".bin") != SysPath::npos && !DynOS_Bin_IsCompressed(_Filename)) {
DynOS_Bin_Compress(_Filename);
continue;
}
#endif
// For each subfolder, read tokens from model.inc.c and geo.inc.c
SysPath _Folder = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name);

View File

@ -691,11 +691,13 @@ void DynOS_Col_Generate(const SysPath &aPackFolder, Array<Pair<u64, String>> _Ac
// If there is an existing binary file for this collision, skip and go to the next actor
SysPath _ColFilename = fstring("%s/%s.col", aPackFolder.c_str(), _ColRootName.begin());
if (fs_sys_file_exists(_ColFilename.c_str())) {
#ifdef DEVELOPMENT
// Compress file to gain some space
if (!DynOS_Bin_IsCompressed(_ColFilename)) {
DynOS_Bin_Compress(_ColFilename);
}
continue;
#endif
}
// Init

View File

@ -1119,10 +1119,12 @@ static bool DynOS_Lvl_GeneratePack_Internal(const SysPath &aPackFolder, Array<Pa
// If there is an existing binary file for this level, skip and go to the next level
SysPath _LvlFilename = fstring("%s/%s.lvl", aPackFolder.c_str(), _LvlRootName.begin());
if (fs_sys_file_exists(_LvlFilename.c_str())) {
#ifdef DEVELOPMENT
// Compress file to gain some space
if (!DynOS_Bin_IsCompressed(_LvlFilename)) {
DynOS_Bin_Compress(_LvlFilename);
}
#endif
continue;
}
@ -1245,12 +1247,15 @@ void DynOS_Lvl_GeneratePack(const SysPath &aPackFolder) {
if (SysPath(_PackEnt->d_name) == ".") continue;
if (SysPath(_PackEnt->d_name) == "..") continue;
#ifdef DEVELOPMENT
// Compress .lvl files to gain some space
SysPath _Filename = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name);
// TODO: is this required anymore?
/*SysPath _Filename = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name);
if (SysPath(_PackEnt->d_name).find(".lvl") != SysPath::npos && !DynOS_Bin_IsCompressed(_Filename)) {
DynOS_Bin_Compress(_Filename);
continue;
}
}*/
#endif
// For each subfolder, read tokens from script.c
SysPath _Folder = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name);