From ecbd31160e99cf7ee5e49fd2eddf510dd57f94e6 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Tue, 30 Oct 2007 19:41:55 +0000 Subject: [PATCH] Fix for bug #1822680. svn-id: r29326 --- engines/parallaction/parallaction.cpp | 13 +++++++------ engines/parallaction/parallaction.h | 3 +++ engines/parallaction/parallaction_ns.cpp | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index 57d98e2a338..bc41f9f3416 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -1015,6 +1015,8 @@ Character::Character(Parallaction *vm) : _vm(vm), _builder(&_ani) { _head = NULL; _objs = NULL; + _dummy = false; + _ani._left = 150; _ani._top = 100; _ani._z = 10; @@ -1086,22 +1088,18 @@ void Character::setName(const char *name) { _prefix = _empty; _suffix = _empty; - if (IS_DUMMY_CHARACTER(name)) { - begin = 0; - end = 0; - } else { + _dummy = IS_DUMMY_CHARACTER(name); + if (!_dummy) { const char *s = strstr(name, "tras"); if (s) { _suffix = _suffixTras; end = s; } - if (IS_MINI_CHARACTER(name)) { _prefix = _prefixMini; begin = name+4; } - } memset(_baseName, 0, 30); @@ -1137,6 +1135,9 @@ const char *Character::getFullName() const { return _fullName; } +bool Character::dummy() const { + return _dummy; +} void Parallaction::beep() { _soundMan->playSfx("beep", 3, false); diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index e1420d3a1dc..dc4e7fcb5e4 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -231,6 +231,8 @@ protected: const char *_prefix; const char *_suffix; + bool _dummy; + char _name[30]; char _baseName[30]; char _fullName[30]; @@ -244,6 +246,7 @@ public: const char *getName() const; const char *getBaseName() const; const char *getFullName() const; + bool dummy() const; }; diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp index 9bf5915ec3d..d5b59ff496a 100644 --- a/engines/parallaction/parallaction_ns.cpp +++ b/engines/parallaction/parallaction_ns.cpp @@ -364,7 +364,7 @@ void Parallaction_ns::changeCharacter(const char *name) { Common::String oldArchive = _disk->selectArchive((getFeatures() & GF_LANG_MULT) ? "disk1" : "disk0"); _char._ani._cnv = _disk->loadFrames(_char.getFullName()); - if (_char.getBaseName()[0] != '\0') { + if (!_char.dummy()) { if (getPlatform() == Common::kPlatformAmiga && (getFeatures() & GF_LANG_MULT)) _disk->selectArchive("disk0");