From d3477eedc113a2c126f36f41384b8921d610906a Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Fri, 8 Feb 2008 19:24:12 +0000 Subject: updated filesystem, removed inifile, updated game and tga loader minor cleanups --- src/filesystem/diskfile.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/filesystem/diskfile.h (limited to 'src/filesystem/diskfile.h') diff --git a/src/filesystem/diskfile.h b/src/filesystem/diskfile.h new file mode 100644 index 0000000..b71576d --- /dev/null +++ b/src/filesystem/diskfile.h @@ -0,0 +1,43 @@ +/* + filesystem/diskfile.h + This file is part of the Osirion project and is distributed under + the terms of the GNU General Public License version 2 +*/ + +#ifndef __INCLUDED_FILESYSTEM_DISKFILE_H__ +#define __INCLUDED_FILESYSTEM_DISKFILE_H__ + +#include "filesystem/filesystem.h" +#include "sys/sys.h" + +#include + +#include + +namespace filesystem +{ + +/** + * @brief implementation of File for a file on disk + */ +class DiskFile : public File +{ +public: + DiskFile(); + virtual ~DiskFile(); + + virtual bool open(const char * filename); + virtual void close(); + + virtual size_t read(void *buffer, size_t count); + + void skip(size_t count); + +private: + FILE *diskfile_handle; +}; + +} // namespace filesystem + +#endif // __INCLUDED_FILESYSTEM_DISKFILE_H__ + -- cgit v1.2.3