-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathchunkloader.h
More file actions
36 lines (27 loc) · 728 Bytes
/
chunkloader.h
File metadata and controls
36 lines (27 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/** Copyright (c) 2013, Sean Kasun */
#ifndef CHUNKLOADER_H_
#define CHUNKLOADER_H_
#include <QObject>
#include <QRunnable>
#include "chunkcache.h"
class ChunkLoader : public QObject, public QRunnable {
Q_OBJECT
public:
ChunkLoader(QString path, int cx, int cz);
~ChunkLoader();
enum CHUNKLOAD_TYPE {
MAIN_MAP_DATA = 0,
SEPARATED_ENTITIES = 1
};
static bool loadNbt(QString path, int cx, int cz, QSharedPointer<Chunk> chunk);
static bool loadNbtHelper(QString filename, int cx, int cz, QSharedPointer<Chunk> chunk, int loadtype);
signals:
void loaded(int cx, int cz);
protected:
void run();
private:
QString path;
int cx, cz;
ChunkCache &cache;
};
#endif // CHUNKLOADER_H_