-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathwadfile.h
More file actions
43 lines (31 loc) · 826 Bytes
/
wadfile.h
File metadata and controls
43 lines (31 loc) · 826 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
37
38
39
40
41
42
43
#ifndef WADFILE_H
#define WADFILE_H
#include <QtCore>
#include <QObject>
class Lump
{
public:
QString name;
quint32 length;
QByteArray data;
};
class WadFile : public QObject
{
Q_OBJECT
public:
explicit WadFile(QString filePath, QObject *parent = nullptr);
bool LoadWadFile();
bool SaveWadFile(QString filePath);
bool SaveWadFile(QIODevice* device);
qint32 GetLumpByName(QString name, Lump& lump);
bool GetLumpByNum(quint32 lumpnum, Lump& lump);
bool ReplaceLump(quint32 lumpnum, Lump newLump);
bool InsertLump(quint32 lumpnum, Lump newLump);
bool RemoveLump(quint32 lumpnum);
quint32 LumpCount();
bool MergeWadFile(WadFile& wadFile);
private:
QString wadPath;
QList<Lump> lumps;
};
#endif // WADFILE_H