2013-06-04 23:24:40 +03:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FULLPIPE_UTILS_H
|
|
|
|
#define FULLPIPE_UTILS_H
|
|
|
|
|
2013-06-07 23:56:40 +03:00
|
|
|
#include "common/hash-str.h"
|
|
|
|
#include "common/array.h"
|
|
|
|
|
2013-06-04 23:24:40 +03:00
|
|
|
namespace Fullpipe {
|
|
|
|
|
2013-06-07 00:49:50 +03:00
|
|
|
class CObject;
|
|
|
|
|
2013-06-07 23:56:40 +03:00
|
|
|
typedef Common::HashMap<Common::String, int, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> ClassMap;
|
|
|
|
|
2013-06-04 23:26:37 +03:00
|
|
|
class MfcArchive : public Common::File {
|
2013-06-07 23:56:40 +03:00
|
|
|
ClassMap _classMap;
|
2013-06-11 01:17:11 +03:00
|
|
|
Common::Array<CObject *> _objectMap;
|
|
|
|
Common::Array<int> _objectIdMap;
|
2013-06-07 23:56:40 +03:00
|
|
|
|
|
|
|
int _lastIndex;
|
2013-06-11 01:34:37 +03:00
|
|
|
int _level;
|
2013-06-07 23:56:40 +03:00
|
|
|
|
|
|
|
public:
|
|
|
|
MfcArchive();
|
|
|
|
|
2013-06-08 17:05:51 +03:00
|
|
|
char *readPascalString(bool twoByte = false);
|
2013-06-07 23:56:40 +03:00
|
|
|
int readCount();
|
2013-06-11 01:17:11 +03:00
|
|
|
CObject *parseClass(bool *isCopyReturned);
|
2013-06-10 01:03:15 +03:00
|
|
|
CObject *readClass();
|
2013-06-11 01:34:37 +03:00
|
|
|
|
|
|
|
void incLevel() { _level++; }
|
|
|
|
void decLevel() { _level--; }
|
|
|
|
int getLevel() { return _level; }
|
2013-06-04 23:24:40 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End of namespace Fullpipe
|
|
|
|
|
|
|
|
#endif /* FULLPIPE_UTILS_H */
|