Re-enable DynOS compression (Needs testing)

This commit is contained in:
Agent X 2024-06-21 13:50:58 -04:00
parent 47cccd2a7c
commit 4607405b0c
37 changed files with 2 additions and 13 deletions

View file

@ -149,12 +149,10 @@ 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 // 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()); SysPath _BinFilename = fstring("%s/%s.bin", aPackFolder.c_str(), _GeoRootName.begin());
if (fs_sys_file_exists(_BinFilename.c_str())) { if (fs_sys_file_exists(_BinFilename.c_str())) {
#ifdef DEVELOPMENT
// Compress file to gain some space // Compress file to gain some space
if (!DynOS_Bin_IsCompressed(_BinFilename)) { if (!DynOS_Bin_IsCompressed(_BinFilename)) {
DynOS_Bin_Compress(_BinFilename); DynOS_Bin_Compress(_BinFilename);
} }
#endif
return; return;
} }
} }
@ -260,14 +258,12 @@ void DynOS_Actor_GeneratePack(const SysPath &aPackFolder) {
if (SysPath(_PackEnt->d_name) == ".") continue; if (SysPath(_PackEnt->d_name) == ".") continue;
if (SysPath(_PackEnt->d_name) == "..") continue; if (SysPath(_PackEnt->d_name) == "..") continue;
#ifdef DEVELOPMENT
// Compress .bin files to gain some space // Compress .bin files to gain some space
SysPath _Filename = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name); SysPath _Filename = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name);
if (SysPath(_PackEnt->d_name).find(".bin") != SysPath::npos && !DynOS_Bin_IsCompressed(_Filename)) { if (SysPath(_PackEnt->d_name).find(".bin") != SysPath::npos && !DynOS_Bin_IsCompressed(_Filename)) {
DynOS_Bin_Compress(_Filename); DynOS_Bin_Compress(_Filename);
continue; continue;
} }
#endif
// For each subfolder, read tokens from model.inc.c and geo.inc.c // For each subfolder, read tokens from model.inc.c and geo.inc.c
SysPath _Folder = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name); SysPath _Folder = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name);

View file

@ -691,12 +691,10 @@ 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 // 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()); SysPath _ColFilename = fstring("%s/%s.col", aPackFolder.c_str(), _ColRootName.begin());
if (fs_sys_file_exists(_ColFilename.c_str())) { if (fs_sys_file_exists(_ColFilename.c_str())) {
#ifdef DEVELOPMENT
// Compress file to gain some space // Compress file to gain some space
if (!DynOS_Bin_IsCompressed(_ColFilename)) { if (!DynOS_Bin_IsCompressed(_ColFilename)) {
DynOS_Bin_Compress(_ColFilename); DynOS_Bin_Compress(_ColFilename);
} }
#endif
continue; continue;
} }

View file

@ -1119,12 +1119,10 @@ 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 // 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()); SysPath _LvlFilename = fstring("%s/%s.lvl", aPackFolder.c_str(), _LvlRootName.begin());
if (fs_sys_file_exists(_LvlFilename.c_str())) { if (fs_sys_file_exists(_LvlFilename.c_str())) {
#ifdef DEVELOPMENT
// Compress file to gain some space // Compress file to gain some space
if (!DynOS_Bin_IsCompressed(_LvlFilename)) { if (!DynOS_Bin_IsCompressed(_LvlFilename)) {
DynOS_Bin_Compress(_LvlFilename); DynOS_Bin_Compress(_LvlFilename);
} }
#endif
continue; continue;
} }
@ -1247,15 +1245,12 @@ void DynOS_Lvl_GeneratePack(const SysPath &aPackFolder) {
if (SysPath(_PackEnt->d_name) == ".") continue; if (SysPath(_PackEnt->d_name) == ".") continue;
if (SysPath(_PackEnt->d_name) == "..") continue; if (SysPath(_PackEnt->d_name) == "..") continue;
#ifdef DEVELOPMENT
// Compress .lvl files to gain some space // Compress .lvl files to gain some space
// TODO: is this required anymore? SysPath _Filename = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name);
/*SysPath _Filename = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name);
if (SysPath(_PackEnt->d_name).find(".lvl") != SysPath::npos && !DynOS_Bin_IsCompressed(_Filename)) { if (SysPath(_PackEnt->d_name).find(".lvl") != SysPath::npos && !DynOS_Bin_IsCompressed(_Filename)) {
DynOS_Bin_Compress(_Filename); DynOS_Bin_Compress(_Filename);
continue; continue;
}*/ }
#endif
// For each subfolder, read tokens from script.c // For each subfolder, read tokens from script.c
SysPath _Folder = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name); SysPath _Folder = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name);

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.