- Zip file Directory cache for faster access
- Preload card images in player's hand before the game starts
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-05-26 11:32:17 +00:00
parent 04dd43d180
commit 0e88d03c04
3 changed files with 71 additions and 3 deletions

View File

@@ -35,6 +35,14 @@ using namespace std;
///
//////////////////////////////////////////////////////////////////////////
class JZipCache {
public:
JZipCache();
~JZipCache();
map<string,unz_file_pos *> dir;
};
class JFileSystem
{
public:
@@ -109,10 +117,12 @@ protected:
private:
static JFileSystem* mInstance;
map<string,JZipCache *>mZipCache;
string mResourceRoot;
string mZipFileName;
char *mPassword;
bool mZipAvailable;
void preloadZip(string filename);
#if defined (WIN32) || defined (LINUX)
FILE *mFile;
#else