diff --git a/desktop_version/src/FileSystemUtils.cpp b/desktop_version/src/FileSystemUtils.cpp index 374f952c..40e54da9 100644 --- a/desktop_version/src/FileSystemUtils.cpp +++ b/desktop_version/src/FileSystemUtils.cpp @@ -32,7 +32,7 @@ void PLATFORM_getOSDirectory(char* output); void PLATFORM_migrateSaveData(char* output); void PLATFORM_copyFile(const char *oldLocation, const char *newLocation); -void FILESYSTEM_init(char *argvZero) +int FILESYSTEM_init(char *argvZero) { char output[MAX_PATH]; int mkdirResult; @@ -78,6 +78,11 @@ void FILESYSTEM_init(char *argvZero) #endif if (!PHYSFS_mount(output, NULL, 1)) { + puts("Error: data.zip missing!"); + puts("You do not have data.zip!"); + puts("Grab it from your purchased copy of the game,"); + puts("or get it from the free Make and Play Edition."); + SDL_ShowSimpleMessageBox( SDL_MESSAGEBOX_ERROR, "data.zip missing!", @@ -86,7 +91,9 @@ void FILESYSTEM_init(char *argvZero) "\nor get it from the free Make and Play Edition.", NULL ); + return 0; } + return 1; } void FILESYSTEM_deinit() diff --git a/desktop_version/src/FileSystemUtils.h b/desktop_version/src/FileSystemUtils.h index bcc7c5f5..26aa7a24 100644 --- a/desktop_version/src/FileSystemUtils.h +++ b/desktop_version/src/FileSystemUtils.h @@ -4,7 +4,7 @@ #include #include -void FILESYSTEM_init(char *argvZero); +int FILESYSTEM_init(char *argvZero); void FILESYSTEM_deinit(); char *FILESYSTEM_getUserSaveDirectory(); diff --git a/desktop_version/src/main.cpp b/desktop_version/src/main.cpp index d423223b..c26ab749 100644 --- a/desktop_version/src/main.cpp +++ b/desktop_version/src/main.cpp @@ -36,7 +36,10 @@ scriptclass script; int main(int argc, char *argv[]) { - FILESYSTEM_init(argv[0]); + if(!FILESYSTEM_init(argv[0])) + { + return 1; + } SDL_Init( SDL_INIT_VIDEO | SDL_INIT_AUDIO |