libpsxsave/blocks.h
2010-08-10 09:40:01 -04:00

40 lines
852 B
C++

#ifndef BLOCKS_H
#define BLOCKS_H
#include "frames.h"
class Block {
protected:
Frame frames[64];
public:
Frame* getFrame( int index );
enum blockType {
PSX_BLOCK_INITIAL = 81,
PSX_BLOCK_MEDIAL = 82,
PSX_BLOCK_FINAL = 83,
PSX_BLOCK_FORMATTED = 160,
PSX_BLOCK_DELETED_INITIAL = 161,
PSX_BLOCK_DELETED_MEDIAL = 162,
PSX_BLOCK_DELETED_FINAL = 163,
PSX_BLOCK_RESERVED = 0xFFFFFFFF
};
};
class DirectoryBlock : protected Block {
public:
IdentificationFrame* IDFrame();
DirectoryFrame* Directory( int index );
void Directory( int index, DirectoryFrame *frame );
Frame* Reserved( int index );
Frame* Unused( int index );
Frame* WriteTest();
int nextOpenBlock();
};
class InitialBlock : protected Block {
public:
SaveHeaderFrame* Header();
Icon* getIcon( int index );
};
#endif // BLOCKS_H