NScumm.Scumm.Audio.IMuse.IMuseInternal.EnqueueCommand C# (CSharp) Method

EnqueueCommand() protected method

protected EnqueueCommand ( int a, int b, int c, int d, int e, int f, int g ) : int
a int
b int
c int
d int
e int
f int
g int
return int
        protected int EnqueueCommand(int a, int b, int c, int d, int e, int f, int g)
        {
            var i = _queue_pos;

            if (i == _queue_end)
                return -1;

            if (a == -1)
            {
                _queue_adding = false;
                _trigger_count++;
                return 0;
            }

            var p = _cmd_queue[_queue_pos].array;
            p[0] = CommandId;
            p[1] = a;
            p[2] = b;
            p[3] = c;
            p[4] = d;
            p[5] = e;
            p[6] = f;
            p[7] = g;

            i = (uint)((i + 1) % _cmd_queue.Length);

            if (_queue_end != i)
            {
                _queue_pos = i;
                return 0;
            }
            else
            {
                _queue_pos = (uint)((i - 1) % _cmd_queue.Length);
                return -1;
            }
        }