diff options
author | Paul Gilbert | 2014-05-20 21:22:01 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-05-20 21:22:01 -0400 |
commit | 6bfc9ce8f25d5d08e3a0aa1d5fa55e3dfe93b97f (patch) | |
tree | d8809d6f097a35769deb8a528962b396331296b0 /engines/mads | |
parent | df23dff5177ece670f2fd8222337faa80baf12bd (diff) | |
download | scummvm-rg350-6bfc9ce8f25d5d08e3a0aa1d5fa55e3dfe93b97f.tar.gz scummvm-rg350-6bfc9ce8f25d5d08e3a0aa1d5fa55e3dfe93b97f.tar.bz2 scummvm-rg350-6bfc9ce8f25d5d08e3a0aa1d5fa55e3dfe93b97f.zip |
MADS: Completely remove synchronizeString in favour of syncString
Diffstat (limited to 'engines/mads')
-rw-r--r-- | engines/mads/action.cpp | 2 | ||||
-rw-r--r-- | engines/mads/game.cpp | 2 | ||||
-rw-r--r-- | engines/mads/player.cpp | 2 | ||||
-rw-r--r-- | engines/mads/resources.cpp | 19 | ||||
-rw-r--r-- | engines/mads/resources.h | 5 |
5 files changed, 3 insertions, 27 deletions
diff --git a/engines/mads/action.cpp b/engines/mads/action.cpp index f26a999ff7..df9da126e8 100644 --- a/engines/mads/action.cpp +++ b/engines/mads/action.cpp @@ -678,7 +678,7 @@ void MADSAction::synchronize(Common::Serializer &s) { s.syncAsSint16LE(_statusTextIndex); s.syncAsSint16LE(_hotspotId); _savedFields.synchronize(s); - synchronizeString(s, _sentence); + s.syncString(_sentence); s.syncAsSint16LE(_verbType); s.syncAsSint16LE(_prepType); diff --git a/engines/mads/game.cpp b/engines/mads/game.cpp index 118dc829c3..f8d6c36ebf 100644 --- a/engines/mads/game.cpp +++ b/engines/mads/game.cpp @@ -457,7 +457,7 @@ void Game::synchronize(Common::Serializer &s, bool phase1) { s.syncAsSint16LE(_trigger); s.syncAsUint16LE(_triggerSetupMode); s.syncAsUint16LE(_triggerMode); - synchronizeString(s, _aaName); + s.syncString(_aaName); s.syncAsSint16LE(_lastSave); _scene.synchronize(s); diff --git a/engines/mads/player.cpp b/engines/mads/player.cpp index 3672c80f32..a9c9f113ff 100644 --- a/engines/mads/player.cpp +++ b/engines/mads/player.cpp @@ -755,7 +755,7 @@ void Player::synchronize(Common::Serializer &s) { s.syncAsSint16LE(_totalDistance); s.syncAsSint16LE(_velocity); s.syncAsUint16LE(_frameCount); - synchronizeString(s, _spritesPrefix); + s.syncString(_spritesPrefix); s.syncAsUint32LE(_priorTimer); s.syncAsByte(_loadsFirst); s.syncAsByte(_loadedFirst); diff --git a/engines/mads/resources.cpp b/engines/mads/resources.cpp index 0d5aee1526..745583b516 100644 --- a/engines/mads/resources.cpp +++ b/engines/mads/resources.cpp @@ -413,23 +413,4 @@ void SynchronizedList::synchronize(Common::Serializer &s) { } } -/*------------------------------------------------------------------------*/ - -void synchronizeString(Common::Serializer &s, Common::String &str) { - int len = str.size(); - s.syncAsUint16LE(len); - - if (s.isSaving()) { - s.syncBytes((byte *)str.c_str(), len); - } else { - str.clear(); - char c; - for (int i = 0; i < len; ++i) { - s.syncAsByte(c); - str += c; - } - } -} - - } // End of namespace MADS diff --git a/engines/mads/resources.h b/engines/mads/resources.h index 137eb7a169..003684ef84 100644 --- a/engines/mads/resources.h +++ b/engines/mads/resources.h @@ -84,11 +84,6 @@ public: void synchronize(Common::Serializer &s); }; -/** -* Synchronize string support method -*/ -void synchronizeString(Common::Serializer &s, Common::String &str); - } // End of namespace MADS #endif /* MADS_RESOURCES_H */ |