From d18c83e8b8b96c3849b7bdd34b17a6bb91da4e78 Mon Sep 17 00:00:00 2001 From: Ľubomír Remák Date: Sun, 3 Feb 2019 23:35:43 +0100 Subject: MUTATIONOFJB: Fix play animation command. --- engines/mutationofjb/commands/playanimationcommand.cpp | 4 ++-- engines/mutationofjb/commands/playanimationcommand.h | 6 +++--- engines/mutationofjb/commands/setobjectframecommand.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'engines/mutationofjb/commands') diff --git a/engines/mutationofjb/commands/playanimationcommand.cpp b/engines/mutationofjb/commands/playanimationcommand.cpp index 60c6f1c3cf..6f70a81aa1 100644 --- a/engines/mutationofjb/commands/playanimationcommand.cpp +++ b/engines/mutationofjb/commands/playanimationcommand.cpp @@ -40,8 +40,8 @@ bool PlayAnimationCommandParser::parse(const Common::String &line, ScriptParseCo if (line.size() < 11 || (!line.hasPrefix("FLB ") && !line.hasPrefix("FLX "))) return false; - const uint8 fromFrame = (uint8) atoi(line.c_str() + 4); - const uint8 toFrame = (uint8) atoi(line.c_str() + 8); + const int fromFrame = atoi(line.c_str() + 4); + const int toFrame = atoi(line.c_str() + 8); command = new PlayAnimationCommand(fromFrame, toFrame); return true; diff --git a/engines/mutationofjb/commands/playanimationcommand.h b/engines/mutationofjb/commands/playanimationcommand.h index da7ff25324..4f0d4d7e69 100644 --- a/engines/mutationofjb/commands/playanimationcommand.h +++ b/engines/mutationofjb/commands/playanimationcommand.h @@ -37,14 +37,14 @@ public: class PlayAnimationCommand : public SeqCommand { public: - PlayAnimationCommand(uint8 fromFrame, uint8 toFrame) : _fromFrame(fromFrame), _toFrame(toFrame) {} + PlayAnimationCommand(int fromFrame, int toFrame) : _fromFrame(fromFrame), _toFrame(toFrame) {} const Common::String &getName() const; virtual ExecuteResult execute(ScriptExecutionContext &scriptExecCtx) override; virtual Common::String debugString() const override; private: - uint8 _fromFrame; - uint8 _toFrame; + int _fromFrame; + int _toFrame; }; } diff --git a/engines/mutationofjb/commands/setobjectframecommand.cpp b/engines/mutationofjb/commands/setobjectframecommand.cpp index 8fcff2be26..9524729733 100644 --- a/engines/mutationofjb/commands/setobjectframecommand.cpp +++ b/engines/mutationofjb/commands/setobjectframecommand.cpp @@ -40,7 +40,7 @@ bool SetObjectFrameCommandParser::parse(const Common::String &line, ScriptParseC return false; const uint8 objectId = (uint8) atoi(line.c_str() + 8); - const uint8 frame = (uint8) atoi(line.c_str() + 11); + const unsigned int frame = atoi(line.c_str() + 11); command = new SetObjectFrameCommand(objectId, frame); return true; -- cgit v1.2.3