summaryrefslogtreecommitdiff
path: root/src/utils/virtfs.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-02-10 21:18:26 +0300
committerAndrei Karas <akaras@inbox.ru>2017-02-10 21:18:26 +0300
commitc6277401fb4dafbe08bac534e0de7796f70a0d19 (patch)
tree7c32dd8ee76bdbf0d6f68de3aaf08b64b1d57080 /src/utils/virtfs.cpp
parent6c9c56b70db43f4100863d312835fce763698008 (diff)
downloadmanaverse-c6277401fb4dafbe08bac534e0de7796f70a0d19.tar.gz
manaverse-c6277401fb4dafbe08bac534e0de7796f70a0d19.tar.bz2
manaverse-c6277401fb4dafbe08bac534e0de7796f70a0d19.tar.xz
manaverse-c6277401fb4dafbe08bac534e0de7796f70a0d19.zip
Add some missing functions into virtfs.
Diffstat (limited to 'src/utils/virtfs.cpp')
-rw-r--r--src/utils/virtfs.cpp28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/utils/virtfs.cpp b/src/utils/virtfs.cpp
index 3211d91dd..af000376a 100644
--- a/src/utils/virtfs.cpp
+++ b/src/utils/virtfs.cpp
@@ -185,9 +185,9 @@ namespace VirtFs
return PHYSFS_getLastError();
}
- void close(PHYSFS_file *const file)
+ int close(PHYSFS_file *const file)
{
- PHYSFS_close(file);
+ return PHYSFS_close(file);
}
int64_t read(PHYSFS_File *const file,
@@ -198,8 +198,32 @@ namespace VirtFs
return PHYSFS_read(file, buffer, objSize, objCount);
}
+ int64_t write(PHYSFS_File *const file,
+ const void *const buffer,
+ const uint32_t objSize,
+ const uint32_t objCount)
+ {
+ return PHYSFS_write(file, buffer, objSize, objCount);
+ }
+
int64_t fileLength(PHYSFS_File *const file)
{
return PHYSFS_fileLength(file);
}
+
+ int64_t tell(PHYSFS_File *const file)
+ {
+ return PHYSFS_tell(file);
+ }
+
+ int seek(PHYSFS_File *const file,
+ const uint64_t pos)
+ {
+ return PHYSFS_seek(file, pos);
+ }
+
+ int eof(PHYSFS_File *const file)
+ {
+ return PHYSFS_eof(file);
+ }
} // namespace PhysFs