aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/simple_file.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/simple_file.h')
-rw-r--r--engines/titanic/simple_file.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/engines/titanic/simple_file.h b/engines/titanic/simple_file.h
index 4426380966..cc68d2d54c 100644
--- a/engines/titanic/simple_file.h
+++ b/engines/titanic/simple_file.h
@@ -23,11 +23,10 @@
#ifndef TITANIC_SIMPLE_FILE_H
#define TITANIC_SIMPLE_FILE_H
-#include "common/scummsys.h"
-#include "common/file.h"
-#include "common/queue.h"
#include "common/rect.h"
#include "common/savefile.h"
+#include "common/stream.h"
+#include "common/zlib.h"
#include "titanic/string.h"
namespace Titanic {
@@ -180,6 +179,29 @@ public:
void writeClassEnd(int indent);
};
+/**
+ * Derived file that handles compressed files
+ */
+class CompressedFile : public SimpleFile {
+public:
+ CompressedFile() : SimpleFile() {}
+ virtual ~CompressedFile() {}
+
+ /**
+ * Set up a stream for read access
+ */
+ virtual void open(Common::SeekableReadStream *stream) {
+ SimpleFile::open(Common::wrapCompressedReadStream(stream));
+ }
+
+ /**
+ * Set up a stream for write access
+ */
+ virtual void open(Common::OutSaveFile *stream) {
+ SimpleFile::open(Common::wrapCompressedWriteStream(stream));
+ }
+};
+
} // End of namespace Titanic
#endif /* TITANIC_SIMPLE_FILE_H */