files
kolibrios/programs/games/floppybird/smalllibc/kosFile.h
leency e0f45e268a flappybird renamed to floppybird
kiv fix label with green bg in fullscreen mode
2025-02-24 21:37:50 +02:00

27 lines
520 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);
};