diff options
author | Nicola Mettifogo | 2008-07-25 08:27:44 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2008-07-25 08:27:44 +0000 |
commit | a27f0faeef4e09b9625d8183207323dc0d780b17 (patch) | |
tree | 07a1df78ce86b244a1775bc5c2a2120f8d1ee7d2 | |
parent | 884a6b1dfb465990757c9ea3619d874a0c8c208c (diff) | |
download | scummvm-rg350-a27f0faeef4e09b9625d8183207323dc0d780b17.tar.gz scummvm-rg350-a27f0faeef4e09b9625d8183207323dc0d780b17.tar.bz2 scummvm-rg350-a27f0faeef4e09b9625d8183207323dc0d780b17.zip |
Made character visible in BRA.
svn-id: r33273
-rw-r--r-- | engines/parallaction/gui_br.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/parallaction_br.cpp | 31 |
2 files changed, 21 insertions, 12 deletions
diff --git a/engines/parallaction/gui_br.cpp b/engines/parallaction/gui_br.cpp index 2a82eca041..b10237046e 100644 --- a/engines/parallaction/gui_br.cpp +++ b/engines/parallaction/gui_br.cpp @@ -283,6 +283,8 @@ void Parallaction_br::startGui() { delete _menuHelper; _menuHelper = 0; + + _input->_inputMode = Input::kInputModeGame; } diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp index 494544fb03..04036eb4aa 100644 --- a/engines/parallaction/parallaction_br.cpp +++ b/engines/parallaction/parallaction_br.cpp @@ -232,7 +232,7 @@ void Parallaction_br::changeLocation(char *location) { // free open location stuff clearSubtitles(); freeBackground(); - _gfx->clearGfxObjects(kGfxObjNormal | kGfxObjCharacter); + _gfx->clearGfxObjects(kGfxObjNormal); _location._programs.clear(); _location._animations.remove(_char._ani); @@ -244,12 +244,17 @@ void Parallaction_br::changeLocation(char *location) { // free(_location._comment); // _location._comment = 0; -// _location._commands.clear(); -// _location._aCommands.clear(); - + _location._commands.clear(); + _location._aCommands.clear(); // load new location parseLocation(location); + + // kFlagsRemove is cleared because the character defaults to visible on new locations + // script command can hide the character, anyway, so that's why the flag is cleared + // before _location._commands are executed + _char._ani->_flags &= ~kFlagsRemove; + _cmdExec->run(_location._commands); // doLocationEnterTransition(); _cmdExec->run(_location._aCommands); @@ -301,17 +306,19 @@ void Parallaction_br::loadProgram(AnimationPtr a, const char *filename) { void Parallaction_br::changeCharacter(const char *name) { - printf("changeCharacter(%s)\n", name); - const char *charName = _char.getName(); - if (!scumm_stricmp(charName, name)) { - return; + + if (scumm_stricmp(charName, name)) { + debugC(1, kDebugExec, "changeCharacter(%s)", name); + + _char.setName(name); + _char._ani->gfxobj = _gfx->loadAnim(name); + _char._ani->gfxobj->setFlags(kGfxObjCharacter); + _char._ani->gfxobj->clearFlags(kGfxObjNormal); + _char._talk = _disk->loadTalk(name); } - _char.setName(name); - _char._ani->gfxobj = _gfx->loadAnim(name); - _char._ani->gfxobj->setFlags(kGfxObjCharacter); - _char._talk = _disk->loadTalk(name); + _char._ani->_flags |= kFlagsActive; } |