diff options
author | Sven Hesse | 2011-09-14 20:07:17 +0200 |
---|---|---|
committer | Sven Hesse | 2011-09-14 20:07:17 +0200 |
commit | 2edfb693bedbd578c6019970ae66b2d6384509ca (patch) | |
tree | a9c4a71a022cfad4c6387facdcb8e7964cf7d952 /engines/gob/minigames/geisha | |
parent | 5caf4ac4003180bcbf897d6bfa1812eba8d5e76c (diff) | |
download | scummvm-rg350-2edfb693bedbd578c6019970ae66b2d6384509ca.tar.gz scummvm-rg350-2edfb693bedbd578c6019970ae66b2d6384509ca.tar.bz2 scummvm-rg350-2edfb693bedbd578c6019970ae66b2d6384509ca.zip |
GOB: Add EvilFish::mutate()
Changing a fish into a different fish type
Diffstat (limited to 'engines/gob/minigames/geisha')
-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, |