- Speed improvements to the filesystem (partial fix for issue 767)

- minor speed improvement in the shop (removed a locked texture loading that wasn't necessary)
This commit is contained in:
wagic.the.homebrew
2011-12-13 15:14:47 +00:00
parent 54a2f949b7
commit 2e3331a0c0
7 changed files with 70 additions and 52 deletions
+13 -1
View File
@@ -120,13 +120,25 @@ public:
bool m_Directory;
};
class limited_file_info
{
public:
limited_file_info() : m_Offset(0), m_Size(0) { }
limited_file_info(size_t Offset, size_t Size) :
m_Offset(Offset), m_Size(Size) { }
size_t m_Offset;
size_t m_Size;
};
filesystem(const char * BasePath = "", const char * FileExt = "zip", bool DefaultFS = true);
~filesystem();
void MakeDefault();
void Open(izfstream & File, const char * Filename);
bool DirExists(const std::string & folderName);
bool PreloadZip(const char * Filename, std::map<std::string, file_info>& target);
bool FileExists(const std::string & fileName);
bool PreloadZip(const char * Filename, std::map<std::string, limited_file_info>& target);
static std::string getCurrentZipName();
static filesystem * getCurrentFS();
static std::streamoff SkipLFHdr(std::istream & File, std::streamoff LFHdrPos);