the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2using namespace std;
3
4#include "DirectoryLevelStorageSource.h"
5#include "FileFilter.h"
6#include "FilenameFilter.h"
7
8class ProgressListener;
9class LevelStorage;
10
11class McRegionLevelStorageSource : public DirectoryLevelStorageSource
12{
13public:
14 class ChunkFile;
15
16 McRegionLevelStorageSource(File dir);
17 virtual wstring getName();
18 virtual vector<LevelSummary *> *getLevelList();
19 virtual void clearAll();
20 virtual shared_ptr<LevelStorage> selectLevel(ConsoleSaveFile *saveFile, const wstring& levelId, bool createPlayerDir);
21 virtual bool isConvertible(ConsoleSaveFile *saveFile, const wstring& levelId);
22 virtual bool requiresConversion(ConsoleSaveFile *saveFile, const wstring& levelId);
23 virtual bool convertLevel(ConsoleSaveFile *saveFile, const wstring& levelId, ProgressListener *progress);
24
25private:
26#if 0
27 // 4J - not required anymore
28 void addRegions(File &baseFolder, vector<ChunkFile *> *dest, vector<File *> *firstLevelFolders);
29#endif
30 void convertRegions(File &baseFolder, vector<ChunkFile *> *chunkFiles, int currentCount, int totalCount, ProgressListener *progress);
31 void eraseFolders(vector<File *> *folders, int currentCount, int totalCount, ProgressListener *progress);
32
33public:
34#if 0
35 // 4J - not required anymore
36 static class FolderFilter : public FileFilter
37 {
38 public:
39 static const std::tr1::wregex chunkFolderPattern; // was Pattern
40 bool accept(File *file);
41 };
42
43 static class ChunkFilter : public FilenameFilter
44 {
45 public:
46 static const std::tr1::wregex chunkFilePattern; // was Pattern
47 bool accept(File *dir, const wstring& name);
48 };
49
50 static class ChunkFile // implements Comparable<ChunkFile>
51 {
52 private:
53 /* const */ File *file;
54 /* const */ int x;
55 /* const */ int z;
56
57 public:
58 ChunkFile(File *file);
59 int compareTo(ChunkFile *rhs);
60 File *getFile();
61 int getX();
62 int getZ();
63
64 // a < b
65 bool operator<( ChunkFile *b );
66 };
67#endif
68};