aboutsummaryrefslogtreecommitdiff
path: root/engines/cge/fileio.cpp
diff options
context:
space:
mode:
authorStrangerke2011-09-11 23:57:55 +0200
committerStrangerke2011-09-12 00:30:46 +0200
commitae9985163997eaa87d37bc53f9084b189ef6c37c (patch)
tree67a752553264ded9e857a8421a9c4481e6dcb8b7 /engines/cge/fileio.cpp
parente073fab21131cae6bb0d9919b741ec0b440a948a (diff)
downloadscummvm-rg350-ae9985163997eaa87d37bc53f9084b189ef6c37c.tar.gz
scummvm-rg350-ae9985163997eaa87d37bc53f9084b189ef6c37c.tar.bz2
scummvm-rg350-ae9985163997eaa87d37bc53f9084b189ef6c37c.zip
CGE: Remove VFile class
Diffstat (limited to 'engines/cge/fileio.cpp')
-rw-r--r--engines/cge/fileio.cpp52
1 files changed, 4 insertions, 48 deletions
diff --git a/engines/cge/fileio.cpp b/engines/cge/fileio.cpp
index 024ea77693..888437c18c 100644
--- a/engines/cge/fileio.cpp
+++ b/engines/cge/fileio.cpp
@@ -331,54 +331,6 @@ bool BtFile::exist(const char *name) {
}
/*-----------------------------------------------------------------------
- * VFile
- *-----------------------------------------------------------------------*/
-VFile::VFile(const char *name) : IoBuf(NULL) {
- debugC(3, kCGEDebugFile, "VFile::VFile(%s)", name);
-
- if (_dat->_error || _cat->_error)
- error("Bad volume data");
- BtKeypack *kp = _cat->find(name);
- if (scumm_stricmp(kp->_key, name) != 0)
- _error = 1;
- _endMark = (_bufMark = _begMark = kp->_mark) + kp->_size;
-}
-
-VFile::~VFile() {
-}
-
-void VFile::readBuf() {
- debugC(3, kCGEDebugFile, "VFile::readBuf()");
-
- _dat->seek(_bufMark + _lim);
- _bufMark = _dat->mark();
- long n = _endMark - _bufMark;
- if (n > kBufferSize)
- n = kBufferSize;
- _lim = _dat->read(_buff, (uint16) n);
- _ptr = 0;
-}
-
-long VFile::mark() {
- debugC(5, kCGEDebugFile, "VFile::mark()");
-
- return (_bufMark + _ptr) - _begMark;
-}
-
-long VFile::size() {
- debugC(1, kCGEDebugFile, "VFile::size()");
-
- return _endMark - _begMark;
-}
-
-long VFile::seek(long pos) {
- debugC(1, kCGEDebugFile, "VFile::seek(%ld)", pos);
-
- _lim = 0;
- return (_bufMark = _begMark + pos);
-}
-
-/*-----------------------------------------------------------------------
* EncryptedStream
*-----------------------------------------------------------------------*/
EncryptedStream::EncryptedStream(const char *name) {
@@ -422,6 +374,10 @@ int32 EncryptedStream::size() {
return _readStream->size();
}
+int32 EncryptedStream::pos() {
+ return _readStream->pos();
+}
+
EncryptedStream::~EncryptedStream() {
}