1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 10:09:43 +01:00

Remove .data.zip assets

This WOULD be a huge breaking change, if it weren't for the fact that no
one uses them. Which is why I'm removing them, to simplify the code.

I asked on the VVVVVV Discord whether anyone used them or was even aware
of them and basically the answer was no. I go on Distractionware and no
one uses them. And why would they, when they'd have to distribute the
level .vvvvvv file separately? Better to just distribute everything in
one zip. And it's quite a bit obscure that you have to suffix the file
with .data.zip anyway.
This commit is contained in:
Misa 2022-03-25 10:58:12 -07:00
parent f88ed0dc1b
commit 7b53c1289d

View file

@ -522,16 +522,16 @@ bool FILESYSTEM_mountAssets(const char* path)
VVV_between(path, "levels/", filename, ".vvvvvv"); VVV_between(path, "levels/", filename, ".vvvvvv");
/* Check for a zipped up pack only containing assets first */
SDL_snprintf( SDL_snprintf(
virtual_path, virtual_path,
sizeof(virtual_path), sizeof(virtual_path),
"levels/%s.data.zip", "levels/%s.zip",
filename filename
); );
if (FILESYSTEM_exists(virtual_path)) if (FILESYSTEM_exists(virtual_path))
{ {
vlog_info("Asset directory is .data.zip at %s", virtual_path); /* This is a full zipped-up level including assets */
vlog_info("Asset directory is .zip at %s", virtual_path);
if (!FILESYSTEM_mountAssetsFrom(virtual_path)) if (!FILESYSTEM_mountAssetsFrom(virtual_path))
{ {
@ -542,16 +542,16 @@ bool FILESYSTEM_mountAssets(const char* path)
} }
else else
{ {
/* If it's not a level, look for a level folder */
SDL_snprintf( SDL_snprintf(
virtual_path, virtual_path,
sizeof(virtual_path), sizeof(virtual_path),
"levels/%s.zip", "levels/%s/",
filename filename
); );
if (FILESYSTEM_exists(virtual_path)) if (FILESYSTEM_exists(virtual_path))
{ {
/* This is a full zipped-up level including assets */ vlog_info("Asset directory exists at %s", virtual_path);
vlog_info("Asset directory is .zip at %s", virtual_path);
if (!FILESYSTEM_mountAssetsFrom(virtual_path)) if (!FILESYSTEM_mountAssetsFrom(virtual_path))
{ {
@ -562,29 +562,8 @@ bool FILESYSTEM_mountAssets(const char* path)
} }
else else
{ {
/* If it's not a level or base zip, look for a level folder */ /* Wasn't a level zip or folder! */
SDL_snprintf( vlog_debug("Asset directory does not exist");
virtual_path,
sizeof(virtual_path),
"levels/%s/",
filename
);
if (FILESYSTEM_exists(virtual_path))
{
vlog_info("Asset directory exists at %s", virtual_path);
if (!FILESYSTEM_mountAssetsFrom(virtual_path))
{
return false;
}
MAYBE_FAIL(graphics.reloadresources());
}
else
{
/* Wasn't a level zip, base zip, or folder! */
vlog_debug("Asset directory does not exist");
}
} }
} }