aboutsummaryrefslogtreecommitdiff
path: root/engines/gob
diff options
context:
space:
mode:
authorSven Hesse2011-09-14 20:07:17 +0200
committerSven Hesse2011-09-14 20:07:17 +0200
commit2edfb693bedbd578c6019970ae66b2d6384509ca (patch)
treea9c4a71a022cfad4c6387facdcb8e7964cf7d952 /engines/gob
parent5caf4ac4003180bcbf897d6bfa1812eba8d5e76c (diff)
downloadscummvm-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')
-rw-r--r--engines/gob/minigames/geisha/evilfish.cpp23
-rw-r--r--engines/gob/minigames/geisha/evilfish.h4
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,