diff options
author | Nicola Mettifogo | 2007-11-01 17:39:58 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-11-01 17:39:58 +0000 |
commit | 555336cebeffb7a3796c08880ed037d2d86ee968 (patch) | |
tree | f9693e6ab4c78a71f243d5e816336c2244bd2a05 /engines | |
parent | 60c6720441ae107b93a92e1e691f0a31a95e40c3 (diff) | |
download | scummvm-rg350-555336cebeffb7a3796c08880ed037d2d86ee968.tar.gz scummvm-rg350-555336cebeffb7a3796c08880ed037d2d86ee968.tar.bz2 scummvm-rg350-555336cebeffb7a3796c08880ed037d2d86ee968.zip |
Fix for bug #1822819. Donna now changes her look into Suzy after makeup.
svn-id: r29361
Diffstat (limited to 'engines')
-rw-r--r-- | engines/parallaction/callables_ns.cpp | 3 | ||||
-rw-r--r-- | engines/parallaction/parallaction.cpp | 28 | ||||
-rw-r--r-- | engines/parallaction/parallaction.h | 1 | ||||
-rw-r--r-- | engines/parallaction/parallaction_ns.cpp | 2 |
4 files changed, 14 insertions, 20 deletions
diff --git a/engines/parallaction/callables_ns.cpp b/engines/parallaction/callables_ns.cpp index d258276838..1437c68f42 100644 --- a/engines/parallaction/callables_ns.cpp +++ b/engines/parallaction/callables_ns.cpp @@ -308,6 +308,9 @@ void Parallaction_ns::_c_zeroFoglie(void *parm) { void Parallaction_ns::_c_trasformata(void *parm) { _engineFlags ^= kEngineTransformedDonna; + // No need to invoke changeCharacter here, as + // transformation happens on a location switch + // and character change is automatically triggered. return; } diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index e7223d2386..126e16c77b 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -1084,15 +1084,20 @@ void Character::setName(const char *name) { const char *end = begin + strlen(name); _prefix = _empty; - _suffix = _empty; _dummy = IS_DUMMY_CHARACTER(name); if (!_dummy) { - const char *s = strstr(name, "tras"); - if (s) { + if (_engineFlags & kEngineTransformedDonna) { _suffix = _suffixTras; - end = s; + } else { + const char *s = strstr(name, "tras"); + if (s) { + _suffix = _suffixTras; + end = s; + } else { + _suffix = _empty; + } } if (IS_MINI_CHARACTER(name)) { _prefix = _prefixMini; @@ -1106,21 +1111,6 @@ void Character::setName(const char *name) { sprintf(_fullName, "%s%s%s", _prefix, _baseName, _suffix); } -void Character::transform() { - if (scumm_stricmp("donna", _baseName)) { - error("can't transform character %s", _baseName); - } - - if (_suffix) { - _suffix = _empty; - } else { - _suffix = _suffixTras; - } - - _engineFlags ^= kEngineTransformedDonna; - setName(_name); -} - const char *Character::getName() const { return _name; } diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index 77f70f838f..15e09c5649 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -241,7 +241,6 @@ protected: public: void setName(const char *name); - void transform(); const char *getName() const; const char *getBaseName() const; const char *getFullName() const; diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp index 8d4e72475d..652ffd1d64 100644 --- a/engines/parallaction/parallaction_ns.cpp +++ b/engines/parallaction/parallaction_ns.cpp @@ -455,6 +455,8 @@ JobOpcode* Parallaction_ns::createJobOpcode(uint functionId, Job *job) { void Parallaction_ns::cleanupGame() { + _engineFlags &= ~kEngineTransformedDonna; + // this code saves main character animation from being removed from the following code _animations.remove(&_char._ani); _numLocations = 0; |