diff options
author | Max Horn | 2010-10-28 00:26:25 +0000 |
---|---|---|
committer | Max Horn | 2010-10-28 00:26:25 +0000 |
commit | b2fa7e58a395b883e7c59ecb1f29f8fc6607885b (patch) | |
tree | 01e5d568b0d7fe4b42b0abca5c1f0fa80654e196 /engines/sword25/gfx | |
parent | cf3551525f4583ec8a5feb231cb25d81a9722853 (diff) | |
download | scummvm-rg350-b2fa7e58a395b883e7c59ecb1f29f8fc6607885b.tar.gz scummvm-rg350-b2fa7e58a395b883e7c59ecb1f29f8fc6607885b.tar.bz2 scummvm-rg350-b2fa7e58a395b883e7c59ecb1f29f8fc6607885b.zip |
SWORD25: Start to rename read/write methods of *PersistenceBlock classes
All should be renamed to reduce risk of accidental incorrect use.
svn-id: r53899
Diffstat (limited to 'engines/sword25/gfx')
-rw-r--r-- | engines/sword25/gfx/animation.cpp | 16 | ||||
-rw-r--r-- | engines/sword25/gfx/animationtemplate.cpp | 12 | ||||
-rw-r--r-- | engines/sword25/gfx/staticbitmap.cpp | 4 | ||||
-rw-r--r-- | engines/sword25/gfx/text.cpp | 8 |
4 files changed, 20 insertions, 20 deletions
diff --git a/engines/sword25/gfx/animation.cpp b/engines/sword25/gfx/animation.cpp index ed0f807234..0d3baae347 100644 --- a/engines/sword25/gfx/animation.cpp +++ b/engines/sword25/gfx/animation.cpp @@ -562,7 +562,7 @@ bool Animation::persist(OutputPersistenceBlock &writer) { if (_animationResourcePtr) { uint marker = 0; writer.write(marker); - writer.write(_animationResourcePtr->getFileName()); + writer.writeString(_animationResourcePtr->getFileName()); } else if (_animationTemplateHandle) { uint marker = 1; writer.write(marker); @@ -578,13 +578,13 @@ bool Animation::persist(OutputPersistenceBlock &writer) { // The following is only there to for compatibility with older saves // resp. the original engine. writer.write((uint)1); - writer.write(Common::String("LuaLoopPointCB")); + writer.writeString("LuaLoopPointCB"); writer.write(getHandle()); writer.write((uint)1); - writer.write(Common::String("LuaActionCB")); + writer.writeString("LuaActionCB"); writer.write(getHandle()); writer.write((uint)1); - writer.write(Common::String("LuaDeleteCB")); + writer.writeString("LuaDeleteCB"); writer.write(getHandle()); result &= RenderObject::persistChildren(writer); @@ -617,7 +617,7 @@ bool Animation::unpersist(InputPersistenceBlock &reader) { reader.read(marker); if (marker == 0) { Common::String resourceFilename; - reader.read(resourceFilename); + reader.readString(resourceFilename); initializeAnimationResource(resourceFilename); } else if (marker == 1) { reader.read(_animationTemplateHandle); @@ -639,7 +639,7 @@ bool Animation::unpersist(InputPersistenceBlock &reader) { // loop point callback reader.read(callbackCount); assert(callbackCount == 1); - reader.read(callbackFunctionName); + reader.readString(callbackFunctionName); assert(callbackFunctionName == "LuaLoopPointCB"); reader.read(callbackData); assert(callbackData == getHandle()); @@ -647,7 +647,7 @@ bool Animation::unpersist(InputPersistenceBlock &reader) { // loop point callback reader.read(callbackCount); assert(callbackCount == 1); - reader.read(callbackFunctionName); + reader.readString(callbackFunctionName); assert(callbackFunctionName == "LuaActionCB"); reader.read(callbackData); assert(callbackData == getHandle()); @@ -655,7 +655,7 @@ bool Animation::unpersist(InputPersistenceBlock &reader) { // loop point callback reader.read(callbackCount); assert(callbackCount == 1); - reader.read(callbackFunctionName); + reader.readString(callbackFunctionName); assert(callbackFunctionName == "LuaDeleteCB"); reader.read(callbackData); assert(callbackData == getHandle()); diff --git a/engines/sword25/gfx/animationtemplate.cpp b/engines/sword25/gfx/animationtemplate.cpp index 948dfbfa4d..4a060dbad9 100644 --- a/engines/sword25/gfx/animationtemplate.cpp +++ b/engines/sword25/gfx/animationtemplate.cpp @@ -195,13 +195,13 @@ bool AnimationTemplate::persist(OutputPersistenceBlock &writer) { writer.write(Iter->hotspotY); writer.write(Iter->flipV); writer.write(Iter->flipH); - writer.write(Iter->fileName); - writer.write(Iter->action); + writer.writeString(Iter->fileName); + writer.writeString(Iter->action); ++Iter; } // Restliche Member persistieren. - writer.write(_sourceAnimationPtr->getFileName()); + writer.writeString(_sourceAnimationPtr->getFileName()); writer.write(_valid); return Result; @@ -224,15 +224,15 @@ bool AnimationTemplate::unpersist(InputPersistenceBlock &reader) { reader.read(frame.hotspotY); reader.read(frame.flipV); reader.read(frame.flipH); - reader.read(frame.fileName); - reader.read(frame.action); + reader.readString(frame.fileName); + reader.readString(frame.action); _frames.push_back(frame); } // Die Animations-Resource wird für die gesamte Lebensdauer des Objektes gelockt Common::String sourceAnimation; - reader.read(sourceAnimation); + reader.readString(sourceAnimation); _sourceAnimationPtr = requestSourceAnimation(sourceAnimation); reader.read(_valid); diff --git a/engines/sword25/gfx/staticbitmap.cpp b/engines/sword25/gfx/staticbitmap.cpp index bbcadb11c6..3019fe0ac1 100644 --- a/engines/sword25/gfx/staticbitmap.cpp +++ b/engines/sword25/gfx/staticbitmap.cpp @@ -162,7 +162,7 @@ bool StaticBitmap::persist(OutputPersistenceBlock &writer) { bool result = true; result &= Bitmap::persist(writer); - writer.write(_resourceFilename); + writer.writeString(_resourceFilename); result &= RenderObject::persistChildren(writer); @@ -174,7 +174,7 @@ bool StaticBitmap::unpersist(InputPersistenceBlock &reader) { result &= Bitmap::unpersist(reader); Common::String resourceFilename; - reader.read(resourceFilename); + reader.readString(resourceFilename); result &= initBitmapResource(resourceFilename); result &= RenderObject::unpersistChildren(reader); diff --git a/engines/sword25/gfx/text.cpp b/engines/sword25/gfx/text.cpp index 55a87a41d6..b8e12ba570 100644 --- a/engines/sword25/gfx/text.cpp +++ b/engines/sword25/gfx/text.cpp @@ -313,8 +313,8 @@ bool Text::persist(OutputPersistenceBlock &writer) { result &= RenderObject::persist(writer); writer.write(_modulationColor); - writer.write(_font); - writer.write(_text); + writer.writeString(_font); + writer.writeString(_text); writer.write(_autoWrap); writer.write(_autoWrapThreshold); @@ -335,11 +335,11 @@ bool Text::unpersist(InputPersistenceBlock &reader) { // So wird das Layout automatisch aktualisiert und auch alle anderen notwendigen Methoden ausgeführt. Common::String font; - reader.read(font); + reader.readString(font); setFont(font); Common::String text; - reader.read(text); + reader.readString(text); setText(text); bool autoWrap; |