kolibrios-fun/programs/games/LaserTank/trunk/smalllibc/kosFile.h
ZblCoder fb06cf5f79 LaserTank game added
git-svn-id: svn://kolibrios.org@5276 a494cfbc-eb01-0410-851d-a64ba20cac60
2014-12-28 18:29:59 +00:00

28 lines
613 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);
void LoadTex(Byte *targetPtr, Byte Size, int width, int height);
protected:
int filePointer;
int bufferPointer;
bool validBuffer;
kosFileInfo fileInfo;
void ValidateBuffer(void);
void UpdateBuffer(void);
};