]> git.lizzy.rs Git - irrlicht.git/blobdiff - source/Irrlicht/CFileSystem.cpp
Remove all mentions of iOS
[irrlicht.git] / source / Irrlicht / CFileSystem.cpp
index e1d02484e5fb436d843b800f52c138ebcb19dc13..3ee35d9b5a073e03f84b5baed29f131f929949ad 100644 (file)
@@ -2,13 +2,11 @@
 // This file is part of the "Irrlicht Engine".\r
 // For conditions of distribution and use, see copyright notice in irrlicht.h\r
 \r
-#include "IrrCompileConfig.h"\r
 \r
 #include "CFileSystem.h"\r
 #include "IReadFile.h"\r
 #include "IWriteFile.h"\r
 #include "CZipReader.h"\r
-#include "CMountPointReader.h"\r
 #include "CFileList.h"\r
 #include "stdio.h"\r
 #include "os.h"\r
@@ -16,7 +14,7 @@
 #include "CMemoryFile.h"\r
 #include "CLimitReadFile.h"\r
 #include "CWriteFile.h"\r
-#include "irrList.h"\r
+#include <list>\r
 \r
 #if defined (__STRICT_ANSI__)\r
     #error Compiling with __STRICT_ANSI__ not supported. g++ does set this when compiling with -std=c++11 or -std=c++0x. Use instead -std=gnu++11 or -std=gnu++0x. Or use -U__STRICT_ANSI__ to disable strict ansi.\r
@@ -26,7 +24,7 @@
        #include <direct.h> // for _chdir\r
        #include <io.h> // for _access\r
        #include <tchar.h>\r
-#elif (defined(_IRR_POSIX_API_) || defined(_IRR_OSX_PLATFORM_) || defined(_IRR_IOS_PLATFORM_) || defined(_IRR_ANDROID_PLATFORM_))\r
+#elif (defined(_IRR_POSIX_API_) || defined(_IRR_OSX_PLATFORM_) || defined(_IRR_ANDROID_PLATFORM_))\r
                #include <stdio.h>\r
                #include <stdlib.h>\r
                #include <string.h>\r
@@ -55,29 +53,7 @@ CFileSystem::CFileSystem()
        //! reset current working directory\r
        getWorkingDirectory();\r
 \r
-#ifdef __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_\r
-       ArchiveLoader.push_back(new CArchiveLoaderPAK(this));\r
-#endif\r
-\r
-#ifdef __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_\r
-       ArchiveLoader.push_back(new CArchiveLoaderNPK(this));\r
-#endif\r
-\r
-#ifdef __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_\r
-       ArchiveLoader.push_back(new CArchiveLoaderTAR(this));\r
-#endif\r
-\r
-#ifdef __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_\r
-       ArchiveLoader.push_back(new CArchiveLoaderWAD(this));\r
-#endif\r
-\r
-#ifdef __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_\r
-       ArchiveLoader.push_back(new CArchiveLoaderMount(this));\r
-#endif\r
-\r
-#ifdef __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_\r
        ArchiveLoader.push_back(new CArchiveLoaderZIP(this));\r
-#endif\r
 \r
 }\r
 \r
@@ -219,8 +195,6 @@ bool CFileSystem::addFileArchive(const io::path& filename, bool ignoreCase,
        bool ret = false;\r
 \r
        // see if archive is already added\r
-       if (changeArchivePassword(filename, password, retArchive))\r
-               return true;\r
 \r
        s32 i;\r
 \r
@@ -316,29 +290,6 @@ bool CFileSystem::addFileArchive(const io::path& filename, bool ignoreCase,
        return ret;\r
 }\r
 \r
-// don't expose!\r
-bool CFileSystem::changeArchivePassword(const path& filename,\r
-               const core::stringc& password,\r
-               IFileArchive** archive)\r
-{\r
-       for (s32 idx = 0; idx < (s32)FileArchives.size(); ++idx)\r
-       {\r
-               // TODO: This should go into a path normalization method\r
-               // We need to check for directory names with trailing slash and without\r
-               const path absPath = getAbsolutePath(filename);\r
-               const path arcPath = FileArchives[idx]->getFileList()->getPath();\r
-               if ((absPath == arcPath) || ((absPath+_IRR_TEXT("/")) == arcPath))\r
-               {\r
-                       if (password.size())\r
-                               FileArchives[idx]->Password=password;\r
-                       if (archive)\r
-                               *archive = FileArchives[idx];\r
-                       return true;\r
-               }\r
-       }\r
-\r
-       return false;\r
-}\r
 \r
 bool CFileSystem::addFileArchive(IReadFile* file, bool ignoreCase,\r
                bool ignorePaths, E_FILE_ARCHIVE_TYPE archiveType,\r
@@ -349,9 +300,6 @@ bool CFileSystem::addFileArchive(IReadFile* file, bool ignoreCase,
 \r
        if (file)\r
        {\r
-               if (changeArchivePassword(file->getFileName(), password, retArchive))\r
-                       return true;\r
-\r
                IFileArchive* archive = 0;\r
                s32 i;\r
 \r
@@ -714,11 +662,10 @@ path CFileSystem::getRelativeFilename(const path& filename, const path& director
        io::path path1, file, ext;\r
        core::splitFilename(getAbsolutePath(filename), &path1, &file, &ext);\r
        io::path path2(getAbsolutePath(directory));\r
-       core::list<io::path> list1, list2;\r
+       std::list<io::path> list1, list2;\r
        path1.split(list1, _IRR_TEXT("/\\"), 2);\r
        path2.split(list2, _IRR_TEXT("/\\"), 2);\r
-       u32 i=0;\r
-       core::list<io::path>::ConstIterator it1,it2;\r
+       std::list<io::path>::const_iterator it1,it2;\r
        it1=list1.begin();\r
        it2=list2.begin();\r
 \r
@@ -742,19 +689,19 @@ path CFileSystem::getRelativeFilename(const path& filename, const path& director
        #endif\r
 \r
 \r
-       for (; i<list1.size() && i<list2.size()\r
+       for (; it1 != list1.end() && it2 != list2.end()\r
 #if defined (_IRR_WINDOWS_API_)\r
                && (io::path(*it1).make_lower()==io::path(*it2).make_lower())\r
 #else\r
                && (*it1==*it2)\r
 #endif\r
-               ; ++i)\r
+               ;)\r
        {\r
                ++it1;\r
                ++it2;\r
        }\r
        path1=_IRR_TEXT("");\r
-       for (; i<list2.size(); ++i)\r
+       for (; it2 != list2.end(); ++it2)\r
                path1 += _IRR_TEXT("../");\r
        while (it1 != list1.end())\r
        {\r