mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 23:01:42 +00:00
PINK: implemented skipString method in Archive
This commit is contained in:
parent
78c2bb6a6a
commit
5f462c1ebc
@ -305,6 +305,11 @@ Common::String Archive::readString() {
|
||||
return Common::String(buffer, len);
|
||||
}
|
||||
|
||||
void Archive::skipString() {
|
||||
byte len = _readStream->readByte();
|
||||
_readStream->skip(len);
|
||||
}
|
||||
|
||||
void Archive::writeString(const Common::String &string) {
|
||||
_writeStream->writeByte(string.size());
|
||||
_writeStream->write(string.c_str(), string.size());
|
||||
|
@ -49,6 +49,7 @@ public:
|
||||
uint16 readWORD() { return _readStream->readUint16LE(); }
|
||||
|
||||
Common::String readString();
|
||||
void skipString();
|
||||
|
||||
Object *readObject();
|
||||
|
||||
|
@ -45,7 +45,7 @@ void Module::load(Archive &archive) {
|
||||
archive.mapObject(this);
|
||||
NamedObject::deserialize(archive);
|
||||
|
||||
archive.readString(); // skip directory
|
||||
archive.skipString(); // skip directory
|
||||
|
||||
_invMgr.deserialize(archive);
|
||||
_pages.deserialize(archive);
|
||||
|
@ -35,7 +35,7 @@ void Page::load(Archive &archive) {
|
||||
debugC(6, kPinkDebugLoadingObjects, "Page load");
|
||||
archive.mapObject(this);
|
||||
NamedObject::deserialize(archive);
|
||||
archive.readString(); //skip directory
|
||||
archive.skipString(); //skip directory
|
||||
_actors.deserialize(archive);
|
||||
}
|
||||
|
||||
|
@ -168,8 +168,8 @@ void PinkEngine::pauseEngine(void *engine, bool pause) {
|
||||
}
|
||||
|
||||
void PinkEngine::load(Archive &archive) {
|
||||
archive.readString();
|
||||
archive.readString();
|
||||
archive.skipString();
|
||||
archive.skipString();
|
||||
_modules.deserialize(archive);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user