diff options
Diffstat (limited to 'engines/gob')
| -rw-r--r-- | engines/gob/minigames/geisha/evilfish.cpp | 23 | ||||
| -rw-r--r-- | engines/gob/minigames/geisha/evilfish.h | 4 |
2 files changed, 27 insertions, 0 deletions
diff --git a/engines/gob/minigames/geisha/evilfish.cpp b/engines/gob/minigames/geisha/evilfish.cpp index e2672d75c8..592e84a32c 100644 --- a/engines/gob/minigames/geisha/evilfish.cpp +++ b/engines/gob/minigames/geisha/evilfish.cpp @@ -158,6 +158,29 @@ void EvilFish::advance() { } } +void EvilFish::mutate(uint16 animSwimLeft, uint16 animSwimRight, + uint16 animTurnLeft, uint16 animTurnRight, uint16 animDie) { + + _animSwimLeft = animSwimLeft; + _animSwimRight = animSwimRight; + _animTurnLeft = animTurnLeft; + _animTurnRight = animTurnRight; + _animDie = animDie; + + switch (_state) { + case kStateSwimLeft: + setAnimation(_animSwimLeft); + break; + + case kStateSwimRight: + setAnimation(_animSwimRight); + break; + + default: + break; + } +} + } // End of namespace Geisha } // End of namespace Gob diff --git a/engines/gob/minigames/geisha/evilfish.h b/engines/gob/minigames/geisha/evilfish.h index 1801ad9b16..223645f47f 100644 --- a/engines/gob/minigames/geisha/evilfish.h +++ b/engines/gob/minigames/geisha/evilfish.h @@ -56,6 +56,10 @@ public: /** Advance the animation to the next frame. */ void advance(); + /** Change the fish's animations, effectively making it a different fish type. */ + void mutate(uint16 animSwimLeft, uint16 animSwimRight, + uint16 animTurnLeft, uint16 animTurnRight, uint16 animDie); + private: enum State { kStateNone, |
