Exemplo n.º 1
0
        private void Read_OBJT(BinaryReader reader)
        {
            int len = reader.ReadInt32();

            Objects = new List <YYObject>(len);
            for (int i = 0; i < len; i++)
            {
                var obj = new YYObject();
                obj.ID          = reader.ReadInt32();
                obj.Flags       = reader.ReadInt32();
                obj.SpriteIndex = reader.ReadInt32();
                obj.MaskIndex   = reader.ReadInt32();
                obj.Depth       = reader.ReadInt32();
                obj.Parent      = reader.ReadInt32();
                obj.Name        = Read_String(reader);
                obj.Events      = new List <YYEvent> [15];
                for (int j = 0; j <= 14; j++)
                {
                    obj.Events[j] = new List <YYEvent>();
                    int ev_len = reader.ReadInt32();
                    for (int k = 0; k < ev_len; k++)
                    {
                        var ev = new YYEvent();
                        ev.Load(reader, obj);
                        obj.Events[j].Add(ev);
                    }
                }


                Objects.Add(obj);
            }
        }
Exemplo n.º 2
0
 public void Load(BinaryReader reader, YYObject _obj = null)
 {
     SubEvent       = reader.ReadInt32();
     ScriptIndex    = reader.ReadInt32();
     ScriptBaseAddr = reader.ReadUInt64();
     ScriptName     = Read_String(reader);
     Object         = _obj;
 }