diff options
author | uruk | 2014-06-02 13:58:52 +0200 |
---|---|---|
committer | uruk | 2014-06-02 13:58:52 +0200 |
commit | 79ef03801d90064291aaa4709c8560c9c98cf5b7 (patch) | |
tree | eeb8c7740895db7f4857431899c92a42da302bae | |
parent | 562644db48a894bff55eeef03f89ce3b1ecc4c51 (diff) | |
download | scummvm-rg350-79ef03801d90064291aaa4709c8560c9c98cf5b7.tar.gz scummvm-rg350-79ef03801d90064291aaa4709c8560c9c98cf5b7.tar.bz2 scummvm-rg350-79ef03801d90064291aaa4709c8560c9c98cf5b7.zip |
CGE2: Implement CGE2Eninge::switchHero().
-rw-r--r-- | engines/cge2/cge2_main.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp index e9fc11bd86..1ca99bd5ff 100644 --- a/engines/cge2/cge2_main.cpp +++ b/engines/cge2/cge2_main.cpp @@ -755,7 +755,21 @@ void CGE2Engine::killText() { } void CGE2Engine::switchHero(bool sex) { - warning("STUB: CGE2Engine::switchHero()"); + if (sex != _sex) { + int scene = _heroTab[sex]->_ptr->_scene; + if (_blinkSprite) { + _blinkSprite->_flags._hide = false; + _blinkSprite = nullptr; + } + if (scene >= 0) { + _commandHandler->addCommand(kCmdSeq, -1, 2, _heroTab[_sex]->_face); + _sex = !_sex; + switchCave(scene); + } + } + Sprite *face = _heroTab[_sex]->_face; + if (face->_seqPtr == 0) + _commandHandler->addCommand(kCmdSeq, -1, 1, face); } Sprite *CGE2Engine::spriteAt(int x, int y) { |