Mercurial > audlegacy-plugins
diff src/adplug/core/binio_virtual.h @ 703:cae46214b8bf trunk
[svn] - rework AdPlug to use VFS properly
see http://sacredspiral.co.uk/~nenolod/adplug-vfs-ng.diff for a diff.
| author | nenolod |
|---|---|
| date | Fri, 23 Feb 2007 20:23:34 -0800 |
| parents | 7fc7b66c8a53 |
| children | fa9f85cebade |
line wrap: on
line diff
--- a/src/adplug/core/binio_virtual.h Thu Feb 22 07:19:39 2007 -0800 +++ b/src/adplug/core/binio_virtual.h Fri Feb 23 20:23:34 2007 -0800 @@ -20,6 +20,11 @@ public: vfsistream() {}; + ~vfsistream() {}; + + vfsistream(VFSFile *fd) { + this->fd = fd; + }; vfsistream(const char *file) { this->fd = vfs_fopen(file, "rb"); @@ -29,11 +34,6 @@ this->fd = vfs_fopen(file.c_str(), "rb"); }; - ~vfsistream() { - if (this->fd != NULL) - vfs_fclose(this->fd); - }; - void open(const char *file) { this->fd = vfs_fopen(file, "rb"); }; @@ -80,6 +80,11 @@ public: vfsostream() {}; + ~vfsostream() {}; + + vfsostream(VFSFile *fd) { + this->fd = fd; + }; vfsostream(const char *file) { this->fd = vfs_fopen(file, "wb"); @@ -89,11 +94,6 @@ this->fd = vfs_fopen(file.c_str(), "wb"); }; - ~vfsostream() { - if (this->fd != NULL) - vfs_fclose(this->fd); - }; - void open(const char *file) { this->fd = vfs_fopen(file, "wb"); };
