diff options
-rw-r--r-- | engines/pink/objects/actions/action_loop.cpp | 13 | ||||
-rw-r--r-- | engines/pink/objects/actions/action_loop.h | 6 |
2 files changed, 14 insertions, 5 deletions
diff --git a/engines/pink/objects/actions/action_loop.cpp b/engines/pink/objects/actions/action_loop.cpp index dd80b48f4e..6ea41100a7 100644 --- a/engines/pink/objects/actions/action_loop.cpp +++ b/engines/pink/objects/actions/action_loop.cpp @@ -31,8 +31,17 @@ void ActionLoop::deserialize(Archive &archive) { ActionPlay::deserialize(archive); uint32 style; archive >> _intro >> style; - assert(style <= 2); - _style = static_cast<Style>(style); + switch (style) { + case kPingPong: + _style = kPingPong; + break; + case kRandom: + _style = kRandom; + break; + default: + _style = kForward; + } + //_style = static_cast<Style>(style); } void ActionLoop::toConsole() { diff --git a/engines/pink/objects/actions/action_loop.h b/engines/pink/objects/actions/action_loop.h index 659a21d63c..0612f51e36 100644 --- a/engines/pink/objects/actions/action_loop.h +++ b/engines/pink/objects/actions/action_loop.h @@ -35,9 +35,9 @@ public: private: enum Style { - kPingPong = 0, - kRandom = 1, - kForward = 2 + kPingPong = 2, + kRandom = 3, + kForward // unknown }; uint _intro; Style _style; |