2019-05-10 18:56:19 +02:00
|
|
|
#ifndef IMG_H
|
|
|
|
#define IMG_H
|
|
|
|
|
|
|
|
#include <QFile>
|
2020-02-09 23:24:48 +01:00
|
|
|
#include "mapdata.h"
|
2019-05-10 18:56:19 +02:00
|
|
|
|
2020-02-09 23:24:48 +01:00
|
|
|
class IMG : public MapData
|
2019-05-10 18:56:19 +02:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
IMG(const QString &fileName);
|
2019-07-04 18:18:03 +02:00
|
|
|
|
2019-07-04 09:05:30 +02:00
|
|
|
QString fileName() const {return _file.fileName();}
|
2019-05-16 20:23:37 +02:00
|
|
|
|
2019-05-10 18:56:19 +02:00
|
|
|
private:
|
|
|
|
friend class SubFile;
|
|
|
|
|
2020-06-27 22:46:26 +02:00
|
|
|
unsigned blockBits() const {return _blockBits;}
|
2020-02-09 23:24:48 +01:00
|
|
|
bool readBlock(int blockNum, char *data);
|
2019-05-10 18:56:19 +02:00
|
|
|
qint64 read(char *data, qint64 maxSize);
|
|
|
|
template<class T> bool readValue(T &val);
|
|
|
|
|
|
|
|
QFile _file;
|
|
|
|
quint8 _key;
|
2020-06-27 22:46:26 +02:00
|
|
|
unsigned _blockBits;
|
2019-05-10 18:56:19 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // IMG_H
|