Fixed a few issues, everything now works again.
[fail.git] / src / io / FileInputStream.h
blobc2d647c61081b7385244831f161682c3b76637c6
1 /*
2 Fail game engine
3 Copyright 2007 Antoine Chavasse <a.chavasse@gmail.com>
5 This file is part of Fail.
7 Fail is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License version 3
9 as published by the Free Software Foundation.
11 Fail is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef FAIL_IO_FILEINPUTSTREAM_H_
20 #define FAIL_IO_FILEINPUTSTREAM_H_
22 #include "core/core.h"
23 #include "io/io_export.h"
24 #include "SeekableInputStream.h"
25 #include <physfs.h>
27 namespace fail { namespace io
29 class FLIO_EXPORT FileInputStream : public SeekableInputStream
31 public:
32 FileInputStream( const std::string& Name_ );
33 virtual ~FileInputStream();
34 virtual unsigned int read( void* pBuffer_, unsigned int Size_ );
36 virtual void seek( uint32_t Pos_ );
37 virtual void seek( uint64_t Pos_ );
38 virtual uint64_t tell() const;
40 virtual void setReadLimit( uint64_t EndPos );
42 private:
43 PHYSFS_file* m_pFile;
44 uint64_t m_EndPos;
48 #endif