From 02e9a70009f79064043033abc5e597930aa11079 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 23 Aug 2008 12:04:21 +0000 Subject: PNG support --- src/filesystem/diskfile.cc | 5 +++++ src/filesystem/diskfile.h | 1 + src/filesystem/file.cc | 5 +++++ src/filesystem/file.h | 2 ++ 4 files changed, 13 insertions(+) (limited to 'src/filesystem') diff --git a/src/filesystem/diskfile.cc b/src/filesystem/diskfile.cc index 56e2727..6554f1e 100644 --- a/src/filesystem/diskfile.cc +++ b/src/filesystem/diskfile.cc @@ -20,6 +20,11 @@ DiskFile::~DiskFile() fclose(diskfile_handle); } +FILE *DiskFile::handle() +{ + return diskfile_handle; +} + bool DiskFile::open(const char *filename) { if (diskfile_handle) { diff --git a/src/filesystem/diskfile.h b/src/filesystem/diskfile.h index b71576d..7da1a88 100644 --- a/src/filesystem/diskfile.h +++ b/src/filesystem/diskfile.h @@ -31,6 +31,7 @@ public: virtual size_t read(void *buffer, size_t count); + virtual FILE *handle(); void skip(size_t count); private: diff --git a/src/filesystem/file.cc b/src/filesystem/file.cc index 07f8870..91ac9f9 100644 --- a/src/filesystem/file.cc +++ b/src/filesystem/file.cc @@ -13,5 +13,10 @@ File::File() {} File::~File() {} +FILE *File::handle() +{ + return 0; +} + } // namespace filesystem diff --git a/src/filesystem/file.h b/src/filesystem/file.h index 37ac8b4..daef174 100644 --- a/src/filesystem/file.h +++ b/src/filesystem/file.h @@ -27,6 +27,8 @@ public: /// close file virtual void close() = 0; + virtual FILE *handle(); + /// read bytes virtual size_t read(void *buffer, size_t count) = 0; -- cgit v1.2.3