aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/cge2/fileio.cpp9
-rw-r--r--engines/cge2/fileio.h5
2 files changed, 13 insertions, 1 deletions
diff --git a/engines/cge2/fileio.cpp b/engines/cge2/fileio.cpp
index 7677699fed..6cc9f8b8de 100644
--- a/engines/cge2/fileio.cpp
+++ b/engines/cge2/fileio.cpp
@@ -181,7 +181,7 @@ uint16 ResourceManager::catRead(byte *buf, uint16 length) {
/*-----------------------------------------------------------------------
* EncryptedStream
*-----------------------------------------------------------------------*/
-EncryptedStream::EncryptedStream(CGE2Engine *vm, const char *name) : _vm(vm) {
+EncryptedStream::EncryptedStream(CGE2Engine *vm, const char *name) : _vm(vm), _lineCount(0) {
_error = false;
BtKeypack *kp = _vm->_resman->find(name);
if (scumm_stricmp(kp->_key, name) != 0)
@@ -229,6 +229,7 @@ bool EncryptedStream::seek(int32 offset) {
}
Common::String EncryptedStream::readLine() {
+ _lineCount++;
return _readStream->readLine();
}
@@ -256,4 +257,10 @@ EncryptedStream::~EncryptedStream() {
delete _readStream;
}
+const char *EncryptedStream::kIdTab[] = {
+ "[near]", "[mtake]", "[ftake]", "[phase]", "[seq]",
+ "Name", "Type", "Front", "East",
+ "Portable", "Transparent",
+ NULL };
+
} // End of namespace CGE2
diff --git a/engines/cge2/fileio.h b/engines/cge2/fileio.h
index a596d71341..0d32cab3c2 100644
--- a/engines/cge2/fileio.h
+++ b/engines/cge2/fileio.h
@@ -102,7 +102,11 @@ class EncryptedStream {
private:
CGE2Engine *_vm;
Common::SeekableReadStream *_readStream;
+ const char **_tab;
+ int _lineCount;
bool _error;
+
+ static const char *kIdTab[];
public:
EncryptedStream(CGE2Engine *vm, const char *name);
~EncryptedStream();
@@ -115,6 +119,7 @@ public:
Common::String readLine();
static int number(char *s);
static char *token(char *s);
+ int getLineCount() { return _lineCount; }
};
} // End of namespace CGE2