mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
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:
@@ -4,7 +4,6 @@
|
||||
#include "editor.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <physfs.h>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
#include <tinyxml2.h>
|
||||
@@ -82,16 +81,7 @@ static void levelZipCallback(const char* filename)
|
||||
{
|
||||
if (endsWith(filename, ".zip"))
|
||||
{
|
||||
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())
|
||||
);
|
||||
}
|
||||
FILESYSTEM_loadZip(filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user