summaryrefslogtreecommitdiff
path: root/src/fs/virtfs/virtfsfuncs.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-29 23:58:34 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-29 23:58:34 +0300
commit7c377321ca62168658499f9753b9475a276d4506 (patch)
tree922c48d550afc3486987a62ec8df2fa47aec5c6c /src/fs/virtfs/virtfsfuncs.h
parent11b1979a4dd43ff9b6788a8c95eec945ad5fde5a (diff)
downloadmanaplus-7c377321ca62168658499f9753b9475a276d4506.tar.gz
manaplus-7c377321ca62168658499f9753b9475a276d4506.tar.bz2
manaplus-7c377321ca62168658499f9753b9475a276d4506.tar.xz
manaplus-7c377321ca62168658499f9753b9475a276d4506.zip
Move rwops functions into virtfsdir and virtfszip without optimisations.
Diffstat (limited to 'src/fs/virtfs/virtfsfuncs.h')
-rw-r--r--src/fs/virtfs/virtfsfuncs.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/fs/virtfs/virtfsfuncs.h b/src/fs/virtfs/virtfsfuncs.h
index 21b7a3220..84345679b 100644
--- a/src/fs/virtfs/virtfsfuncs.h
+++ b/src/fs/virtfs/virtfsfuncs.h
@@ -21,12 +21,15 @@
#ifndef UTILS_VIRTFSFUNCS_H
#define UTILS_VIRTFSFUNCS_H
+#include "fs/virtfs/rwopstypes.h"
+
#include "utils/stringvector.h"
#include "localconsts.h"
struct VirtFile;
struct VirtFsEntry;
+struct SDL_RWops;
struct VirtFsFuncs final
{
@@ -45,7 +48,14 @@ struct VirtFsFuncs final
openWrite(nullptr),
openAppend(nullptr),
eof(nullptr),
- loadFile(nullptr)
+ loadFile(nullptr),
+ rwops_seek(nullptr),
+ rwops_read(nullptr),
+ rwops_write(nullptr),
+#ifdef USE_SDL2
+ rwops_size(nullptr),
+#endif // USE_SDL2
+ rwops_close(nullptr)
{
}
@@ -87,6 +97,22 @@ struct VirtFsFuncs final
const char *(*loadFile) (VirtFsEntry *restrict const entry,
const std::string &restrict fileName,
int &restrict fileSize);
+
+ RWOPSINT (*rwops_seek) (SDL_RWops *const rw,
+ const RWOPSINT offset,
+ const int whence);
+ RWOPSSIZE (*rwops_read) (SDL_RWops *const rw,
+ void *const ptr,
+ const RWOPSSIZE size,
+ const RWOPSSIZE maxnum);
+ RWOPSSIZE (*rwops_write) (SDL_RWops *const rw,
+ const void *const ptr,
+ const RWOPSSIZE size,
+ const RWOPSSIZE num);
+#ifdef USE_SDL2
+ RWOPSINT (*rwops_size) (SDL_RWops *const rw);
+#endif // USE_SDL2
+ int (*rwops_close) (SDL_RWops *const rw);
};
#endif // UTILS_VIRTFSFUNCS_H