NScumm.Scumm.ScummEngine3.SetClass C# (CSharp) Метод

SetClass() приватный Метод

private SetClass ( ) : void
Результат void
        void SetClass()
        {
            int obj = GetVarOrDirectWord(OpCodeParameter.Param1);
            int cls;

            while ((_opCode = ReadByte()) != 0xFF)
            {
                cls = GetVarOrDirectWord(OpCodeParameter.Param1);

                // WORKAROUND bug #1668393: Due to a script bug, the wrong opcode is
                // used to test and set the state of various objects (e.g. the inside
                // door (object 465) of the of the Hostel on Mars), when opening the
                // Hostel door from the outside.
                if (cls == 0)
                {
                    // Class '0' means: clean all class data
                    ClassData[obj] = 0;
                    if (Game.Version < 5 && IsActor(obj))
                    {
                        var a = Actors[obj];
                        a.IgnoreBoxes = false;
                        a.ForceClip = 0;
                    }
                }
                else
                {
                    PutClass(obj, cls, (cls & 0x80) != 0);
                }
            }
        }