mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-30 07:23:05 +00:00
MADS: Completely remove synchronizeString in favour of syncString
This commit is contained in:
parent
df23dff517
commit
6bfc9ce8f2
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user