Abstract zip loading to FileSystemUtils

editor.cpp no longer calls PhysFS functions directly; its physfs.h
include can now be dropped.
This commit is contained in:
Misa authored and Ethan Lee committed 2021-03-04 19:10:53 -05:00
1 parent 7316833f95
commit d938a18504
3 files changed
+16 -11

No files matched your search

+14
View File
@@ -198,6 +198,20 @@ void FILESYSTEM_mount(const char *fname)
}
}
void FILESYSTEM_loadZip(const char* filename)
{
PHYSFS_File* zip = PHYSFS_openRead(filename);
if (!PHYSFS_mountHandle(zip, filename, "levels", 1))
{
printf(
"Could not mount %s: %s\n",
filename,
PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode())
);
}
}
bool FILESYSTEM_assetsmounted = false;
void FILESYSTEM_mountassets(const char* path)