[Scummvm-cvs-logs] scummvm master -> 53985000db22e2897626e2bf26d93d7241726323

sylvaintv sylvaintv at gmail.com
Sat Jul 9 01:53:01 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
53985000db TOON: Fix bad character visibility after restore


Commit: 53985000db22e2897626e2bf26d93d7241726323
    https://github.com/scummvm/scummvm/commit/53985000db22e2897626e2bf26d93d7241726323
Author: sylvaintv (sylvaintv at gmail.com)
Date: 2011-07-08T16:50:38-07:00

Commit Message:
TOON: Fix bad character visibility after restore

Bug #3307195: "TOON: Two instances of Flux Wildly"

Changed paths:
    engines/toon/character.cpp



diff --git a/engines/toon/character.cpp b/engines/toon/character.cpp
index 06c6e21..0222141 100644
--- a/engines/toon/character.cpp
+++ b/engines/toon/character.cpp
@@ -596,7 +596,8 @@ int32 Character::getId() {
 void Character::save(Common::WriteStream *stream) {
 	debugC(1, kDebugCharacter, "save(stream)");
 
-	stream->writeSint32LE(_flags);
+	// we have to save visibility too, put in flags to not invalidate old savegames.
+	stream->writeSint32LE(_flags | ((_visible == false) ? 0x100 : 0));
 	stream->writeSint32LE(_x);
 	stream->writeSint32LE(_y);
 	stream->writeSint32LE(_z);
@@ -633,6 +634,12 @@ void Character::load(Common::ReadStream *stream) {
 	if (_sceneAnimationId > -1) {
 		setAnimationInstance(_vm->getSceneAnimation(_sceneAnimationId)->_animInstance);
 	}
+
+	// "not visible" flag.
+	if (_flags & 0x100) {
+		_flags &= ~0x100;
+		setVisible(false);	
+	}
 }
 
 void Character::setAnimScript(int32 animScriptId) {






More information about the Scummvm-git-logs mailing list