Skip to content

Commit

Permalink
CGE2: Implement CGE2Eninge::switchHero().
Browse files Browse the repository at this point in the history
  • Loading branch information
uruk committed Jun 2, 2014
1 parent 562644d commit 79ef038
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion engines/cge2/cge2_main.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 79ef038

Please sign in to comment.