-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTZX.h
62 lines (48 loc) · 1.11 KB
/
TZX.h
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef __TZX_H__
#define __TZX_H__
#include "types.h"
#include "ByteBuffer.h"
#include "TZX_Blocks.h"
#include <vector>
#include <string>
using namespace std;
using namespace TZX_Blocks;
namespace TZX_Class
{
// ============================================================================================
// Constants
#define TZX_LIB "NPC_TZX Lib v0.2b"
#define TZX_VER_HI 1
#define TZX_VER_LO 21
#define TZX_VER "1.21"
#define TZX_MAGIC "ZXTape!\x1a"
// ============================================================================================
// Class TZX
class TZX
{
public:
TZX();
TZX(string filename);
TZX(const TZX& other);
~TZX();
void clear();
void showInfo();
void hexDump();
void hexCharDump();
bool loadFromFile(string filename);
bool saveToFile(string filename);
size_t getNumBlocks();
Block* getBlock(size_t index);
Block* getLastBlock();
void addBlock(Block *b);
void removeLastBlock();
TZX& operator=(const TZX& tzx);
protected:
void genericShowInfo(int);
private:
BYTE majorVer;
BYTE minorVer;
vector<Block*> *blocks;
};
}
#endif //__TZX_H__