mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Add -assets option to specify data.zip (#139)
This is useful for distributions, which may not want to put data.zip in
the same directory as the binary. This can't be distribution-specific
due to the license ("Altered source/binary versions must be plainly
marked as such, and must not be misrepresented as being the original
software.").
This commit is contained in:
@@ -39,7 +39,7 @@ void PLATFORM_getOSDirectory(char* output);
|
||||
void PLATFORM_migrateSaveData(char* output);
|
||||
void PLATFORM_copyFile(const char *oldLocation, const char *newLocation);
|
||||
|
||||
int FILESYSTEM_init(char *argvZero)
|
||||
int FILESYSTEM_init(char *argvZero, char *assetsPath)
|
||||
{
|
||||
char output[MAX_PATH];
|
||||
int mkdirResult;
|
||||
@@ -79,8 +79,12 @@ int FILESYSTEM_init(char *argvZero)
|
||||
}
|
||||
|
||||
/* Mount the stock content last */
|
||||
strcpy(output, PHYSFS_getBaseDir());
|
||||
strcat(output, "data.zip");
|
||||
if (assetsPath) {
|
||||
strcpy(output, assetsPath);
|
||||
} else {
|
||||
strcpy(output, PHYSFS_getBaseDir());
|
||||
strcat(output, "data.zip");
|
||||
}
|
||||
if (!PHYSFS_mount(output, NULL, 1))
|
||||
{
|
||||
puts("Error: data.zip missing!");
|
||||
|
||||
Reference in New Issue
Block a user