file_io: Zip file support

Support for loading files stored inside a zip file.

Treats zipped files as folders and allows loading files from inside the
zip file.  Files are loaded on-demand from the archive.

Nested zip-files are currently not supported.
This commit is contained in:
David Holm
2018-12-31 19:05:42 +01:00
parent 0a0341bf81
commit 868c60f99f
3 changed files with 602 additions and 104 deletions

View File

@@ -1299,10 +1299,7 @@ int user_io_file_tx(const char* name, unsigned char index, char opensave, char m
if (opensave)
{
strcpy((char*)buf, name);
char *p = strrchr((char*)buf, '.');
if (!p) p = (char*)buf + strlen(name);
strcpy(p, ".sav");
FileGenerateSavePath(name, "sav", (char*)buf, sizeof(buf));
user_io_file_mount((char*)buf, 0, 1);
}