kolibrios-gitea/programs/games/kosilka/KosFile.h
Evgeny Grechnikov (Diamond) d7d25fb0e8 remove trash created in previous revisions
git-svn-id: svn://kolibrios.org@1143 a494cfbc-eb01-0410-851d-a64ba20cac60
2009-08-26 11:23:22 +00:00

27 lines
546 B
C++

#pragma once
#define SEEK_SET 0
#define SEEK_CUR 1
#define FILE_BUFFER_SIZE 512
#define OS_BLOCK_SIZE 1
#define FILE_BUFFER_BLOCKS (FILE_BUFFER_SIZE / OS_BLOCK_SIZE)
class CKosFile
{
public:
CKosFile(char *fileName);
~CKosFile(void);
int Read(Byte *targetPtr, int readCount);
int Write(Byte *sourcePtr, int writeCount);
int Seek(int seekFrom, int seekStep);
protected:
int filePointer;
int bufferPointer;
bool validBuffer;
kosFileInfo fileInfo;
void ValidateBuffer(void);
void UpdateBuffer(void);
};