NScumm.Dump.ScriptParser8.Wait C# (CSharp) Method

Wait() protected method

protected Wait ( ) : Statement
return Statement
        protected override Statement Wait()
        {
            var subOp = ReadByte();
            switch (subOp)
            {
                case 0x1E:      // SO_WAIT_FOR_ACTOR Wait for actor (to finish current action?)
                    {
                        var offset = ReadWordSigned();
                        var actor = Pop();
                        return new MethodInvocation("WaitForActor").AddArguments(actor, offset.ToLiteral()).ToStatement();
                    }
                case 0x1F:      // SO_WAIT_FOR_MESSAGE Wait for message
                    return new MethodInvocation("WaitForMessage").ToStatement();
                case 0x20:      // SO_WAIT_FOR_CAMERA Wait for camera (to finish current action?)
                    return new MethodInvocation("WaitForCamera").ToStatement();
                case 0x21:      // SO_WAIT_FOR_SENTENCE
                    return new MethodInvocation("WaitForSentence").ToStatement();
                case 0x22:      // SO_WAIT_FOR_ANIMATION
                    {
                        var offset = ReadWordSigned();
                        var actor = Pop();
                        return new MethodInvocation("WaitForAnimation").AddArguments(actor, offset.ToLiteral()).ToStatement();
                    }
                case 0x23:      // SO_WAIT_FOR_TURN
                    {
                        var offset = ReadWordSigned();
                        var actor = Pop();
                        return new MethodInvocation("WaitForTurn").AddArguments(actor, offset.ToLiteral()).ToStatement();
                    }
                default:
                    throw new NotSupportedException(string.Format("Wait: default case 0x{0:X}", subOp));
            }
        }