28 lines
657 B
C++
28 lines
657 B
C++
#ifndef MEMCARD_H
|
|
#define MEMCARD_H
|
|
|
|
#include "blocks.h"
|
|
|
|
class MemoryCard {
|
|
private:
|
|
Block *blocks[16];
|
|
public:
|
|
MemoryCard();
|
|
|
|
enum fileFormatCard {
|
|
FORMAT_RAW
|
|
};
|
|
enum fileFormatSingle {
|
|
FORMAT_MCS
|
|
};
|
|
|
|
bool loadFile( char* fileName );
|
|
bool loadBlockFromFile( char *fileName, int srcBlock, int dstBlock = -1, int offset = 0 );
|
|
bool loadMCS( char* fileName, int dstBlock = -1 );
|
|
bool saveFile( char* fileName, fileFormatCard format = FORMAT_RAW );
|
|
bool saveBlockToFile( char *fileName, int block, fileFormatSingle format = FORMAT_MCS );
|
|
Block* getBlock( int index );
|
|
DirectoryBlock* directory();
|
|
};
|
|
|
|
#endif // MEMCARD_H
|