diff options
author | Eugene Sandulenko | 2017-01-14 13:35:34 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-01-14 13:35:34 +0100 |
commit | b955b7ba446a2d464529e47c650cd082fdc1629b (patch) | |
tree | 7f3a1670d527888789fc859075deded8c8f8e539 /engines | |
parent | 0ecaa79f08d7cf4caed3f274a728906de5e2115a (diff) | |
download | scummvm-rg350-b955b7ba446a2d464529e47c650cd082fdc1629b.tar.gz scummvm-rg350-b955b7ba446a2d464529e47c650cd082fdc1629b.tar.bz2 scummvm-rg350-b955b7ba446a2d464529e47c650cd082fdc1629b.zip |
DIRECTOR: Switch to common readPascalString
Diffstat (limited to 'engines')
-rw-r--r-- | engines/director/director.cpp | 10 | ||||
-rw-r--r-- | engines/director/director.h | 4 | ||||
-rw-r--r-- | engines/director/resource.cpp | 4 |
3 files changed, 3 insertions, 15 deletions
diff --git a/engines/director/director.cpp b/engines/director/director.cpp index d2df6cd169..e57401c6f0 100644 --- a/engines/director/director.cpp +++ b/engines/director/director.cpp @@ -183,16 +183,6 @@ Common::HashMap<Common::String, Score *> *DirectorEngine::scanMovies(const Commo return nameMap; } -Common::String DirectorEngine::readPascalString(Common::SeekableReadStream &stream) { - byte length = stream.readByte(); - Common::String x; - - while (length--) - x += (char)stream.readByte(); - - return x; -} - void DirectorEngine::setPalette(byte *palette, uint16 count) { _currentPalette = palette; _currentPaletteLength = count; diff --git a/engines/director/director.h b/engines/director/director.h index 3a7a4c8427..f80329e5b4 100644 --- a/engines/director/director.h +++ b/engines/director/director.h @@ -34,7 +34,7 @@ class MacResManager; } namespace Graphics { -class MacWindowManager; +class MacWindowManager; typedef Common::Array<byte *> MacPatterns; } @@ -122,8 +122,6 @@ private: void loadEXERIFX(Common::SeekableReadStream *stream, uint32 offset); void loadMac(); - Common::String readPascalString(Common::SeekableReadStream &stream); - Common::HashMap<int, Cast *> *_sharedCasts; Common::HashMap<int, Common::SeekableSubReadStreamEndian *> *_sharedDIB; Common::HashMap<int, Common::SeekableSubReadStreamEndian *> *_sharedSTXT; diff --git a/engines/director/resource.cpp b/engines/director/resource.cpp index da7f3b69b0..3d1f7a25bb 100644 --- a/engines/director/resource.cpp +++ b/engines/director/resource.cpp @@ -87,8 +87,8 @@ void DirectorEngine::loadEXEv3(Common::SeekableReadStream *stream) { stream->skip(5); // unknown stream->readUint32LE(); // Main MMM size - Common::String mmmFileName = readPascalString(*stream); - Common::String directoryName = readPascalString(*stream); + Common::String mmmFileName = stream->readPascalString(); + Common::String directoryName = stream->readPascalString(); debugC(1, kDebugLoading, "Main MMM: '%s'", mmmFileName.c_str()); debugC(1, kDebugLoading, "Directory Name: '%s'", directoryName.c_str()); |