Ejemplo n.º 1
0
        public void VisitTagRef(TagRefData field)
        {
            SeekToOffset(field.Offset);

            if (field.WithGroup)
            {
                var values = new StructureValueCollection();
                if (field.Value != null)
                {
                    //hax
                    if (field.Value.RawTag == null)
                    {
                        values.SetInteger("tag group magic", (uint)field.Group.RawGroup.Magic);
                        values.SetInteger("datum index", 0xFFFFFFFF);
                    }
                    else
                    {
                        values.SetInteger("tag group magic", (uint)field.Value.RawTag.Group.Magic);
                        values.SetInteger("datum index", field.Value.RawTag.Index.Value);
                    }
                }
                else
                {
                    values.SetInteger("tag group magic", 0xFFFFFFFF);
                    values.SetInteger("datum index", 0xFFFFFFFF);
                }
                StructureWriter.WriteStructure(values, _tagRefLayout, _writer);
            }
            else
            {
                _writer.WriteUInt32(field.Value == null ? 0xFFFFFFFF : field.Value.RawTag.Index.Value);
            }
        }
Ejemplo n.º 2
0
 public override MetaField CloneValue()
 {
     TagRefData result = new TagRefData(Name, Offset, FieldAddress, _allTags, _showJumpTo, _withClass, base.PluginLine);
     result.Class = _class;
     result.Value = _value;
     return result;
 }
Ejemplo n.º 3
0
        public override MetaField CloneValue()
        {
            var result = new TagRefData(Name, Offset, FieldAddress, _allTags, _showTagOptions, _withGroup, PluginLine, ToolTip);

            result.Group = _group;
            result.Value = _value;
            return(result);
        }
Ejemplo n.º 4
0
        public override MetaField CloneValue()
        {
            var result = new TagRefData(Name, Offset, FieldAddress, _allTags, _showJumpTo, _withClass, base.PluginLine);

            result.Class = _class;
            result.Value = _value;
            return(result);
        }
Ejemplo n.º 5
0
 public void VisitTagRef(TagRefData field)
 {
     if (!FilterString(field, field.Name) && field.Group != null)
     {
         if (!FilterString(field, field.Group.TagGroupMagic) && field.Value != null)
         {
             FilterString(field, field.Value.TagFileName);
         }
     }
 }
Ejemplo n.º 6
0
 public void VisitTagRef(TagRefData field)
 {
     if (!FilterString(field, field.Name) && field.Class != null)
     {
         if (!FilterString(field, field.Class.TagClassMagic) && field.Value != null)
         {
             FilterString(field, field.Value.TagFileName);
         }
     }
 }
Ejemplo n.º 7
0
        public void VisitTagRef(TagRefData field)
        {
            SeekToOffset(field.Offset);

            TagGroup   tagGroup = null;
            DatumIndex index;

            if (field.WithGroup)
            {
                // Read the datum index based upon the layout
                StructureValueCollection values = StructureReader.ReadStructure(_reader, _tagRefLayout);
                index = new DatumIndex(values.GetInteger("datum index"));

                // Check the group, in case the datum index is null
                var magic = values.GetInteger("tag group magic");
                var str   = CharConstant.ToString((int)magic);
                tagGroup = field.Tags.Groups.FirstOrDefault(c => c.TagGroupMagic == str);
            }
            else
            {
                // Just read the datum index at the current position
                index = DatumIndex.ReadFrom(_reader);
            }

            TagEntry tag = null;

            if (index.IsValid && index.Index < field.Tags.Entries.Count)
            {
                tag = field.Tags.Entries[index.Index];
                if (tag == null || tag.RawTag == null || tag.RawTag.Index != index)
                {
                    tag = null;
                }
            }

            if (tag != null)
            {
                field.Group = field.Tags.Groups.FirstOrDefault(c => c.RawGroup == tag.RawTag.Group);
                field.Value = tag;
            }
            else
            {
                field.Group = tagGroup;
                field.Value = null;
            }
        }
Ejemplo n.º 8
0
        public void VisitTagRef(TagRefData field)
        {
            SeekToOffset(field.Offset);

            DatumIndex index;

            if (field.WithClass)
            {
                // Read the datum index based upon the layout
                StructureValueCollection values = StructureReader.ReadStructure(_reader, _tagRefLayout);
                index = new DatumIndex(values.GetInteger("datum index"));
            }
            else
            {
                // Just read the datum index at the current position
                index = DatumIndex.ReadFrom(_reader);
            }

            TagEntry tag = null;

            if (index.IsValid && index.Index < field.Tags.Entries.Count)
            {
                tag = field.Tags.Entries[index.Index];
                if (tag == null || tag.RawTag == null || tag.RawTag.Index != index)
                {
                    tag = null;
                }
            }

            if (tag != null)
            {
                field.Class = field.Tags.Classes.FirstOrDefault(c => c.RawClass == tag.RawTag.Class);
                field.Value = tag;
            }
            else
            {
                field.Class = null;
                field.Value = null;
            }
        }
Ejemplo n.º 9
0
		public void VisitTagRef(TagRefData field)
		{
			if (!FilterString(field, field.Name) && field.Class != null)
			{
				if (!FilterString(field, field.Class.TagClassMagic) && field.Value != null)
					FilterString(field, field.Value.TagFileName);
			}
		}
Ejemplo n.º 10
0
        public void VisitTagRef(TagRefData field)
        {
            SeekToOffset(field.Offset);

            if (field.WithClass)
            {
                var values = new StructureValueCollection();
                if (field.Value != null)
                {
                    values.SetInteger("class magic", (uint)field.Value.RawTag.Class.Magic);
                    values.SetInteger("datum index", field.Value.RawTag.Index.Value);
                }
                else
                {
                    values.SetInteger("class magic", 0xFFFFFFFF);
                    values.SetInteger("datum index", 0xFFFFFFFF);
                }
                StructureWriter.WriteStructure(values, _tagRefLayout, _writer);
            }
            else
            {
                _writer.WriteUInt32(field.Value == null ? 0xFFFFFFFF : field.Value.RawTag.Index.Value);
            }
        }
Ejemplo n.º 11
0
 public void VisitTagRef(TagRefData field)
 {
 }
Ejemplo n.º 12
0
        public void VisitTagRef(TagRefData field)
        {
            SeekToOffset(field.Offset);

            if (field.WithClass)
            {
                if (field.Value == null)
                    _writer.WriteInt32(-1);
                else
                    _writer.WriteInt32(field.Value.RawTag.Class.Magic); // Class magic
                _writer.Skip(2 * 4); // Skip two unused values
            }

            if (field.Value == null)
                _writer.WriteUInt32(0xFFFFFFFF);
            else
                _writer.WriteUInt32(field.Value.RawTag.Index.Value); // Tag datum
        }
Ejemplo n.º 13
0
        public void VisitTagRef(TagRefData field)
        {
            if (field.WithClass)
                SeekToOffset(field.Offset + (0x04 * 3));  // Skip class ID + two uint32 unknowns
            else
                SeekToOffset(field.Offset);

            DatumIndex index = DatumIndex.ReadFrom(_reader);
            if (index.IsValid && index.Index < field.Tags.Entries.Count)
            {
                TagEntry tag = field.Tags.Entries[index.Index];
                field.Class = tag.ParentClass;
                field.Value = tag;
            }
            else
            {
                field.Class = null;
                field.Value = null;
            }
        }
Ejemplo n.º 14
0
 public void VisitTagRef(TagRefData field)
 {
 }
Ejemplo n.º 15
0
 public void VisitTagRef(TagRefData field)
 {
     AddWidth(_tagControl.Width);
 }
Ejemplo n.º 16
0
        public void VisitTagRef(TagRefData field)
        {
            SeekToOffset(field.Offset);

            TagClass tagClass = null;
            DatumIndex index;
            if (field.WithClass)
            {
                // Read the datum index based upon the layout
                StructureValueCollection values = StructureReader.ReadStructure(_reader, _tagRefLayout);
                index = new DatumIndex(values.GetInteger("datum index"));

                // Check the class, in case the datum index is null
                var magic = values.GetInteger("class magic");
                var str = CharConstant.ToString((int)magic);
                tagClass = field.Tags.Classes.FirstOrDefault(c => c.TagClassMagic == str);
            }
            else
            {
                // Just read the datum index at the current position
                index = DatumIndex.ReadFrom(_reader);
            }

            TagEntry tag = null;
            if (index.IsValid && index.Index < field.Tags.Entries.Count)
            {
                tag = field.Tags.Entries[index.Index];
                if (tag == null || tag.RawTag == null || tag.RawTag.Index != index)
                    tag = null;
            }

            if (tag != null)
            {
                field.Class = field.Tags.Classes.FirstOrDefault(c => c.RawClass == tag.RawTag.Class);
                field.Value = tag;
            }
            else
            {
                field.Class = tagClass;
                field.Value = null;
            }
        }
Ejemplo n.º 17
0
        public void VisitTagRef(TagRefData field)
        {
            SeekToOffset(field.Offset);

            DatumIndex index;
            if (field.WithClass)
            {
                // Read the datum index based upon the layout
                StructureValueCollection values = StructureReader.ReadStructure(_reader, _tagRefLayout);
                index = new DatumIndex(values.GetInteger("datum index"));
            }
            else
            {
                // Just read the datum index at the current position
                index = DatumIndex.ReadFrom(_reader);
            }

            TagEntry tag = null;
            if (index.IsValid && index.Index < field.Tags.Entries.Count)
                tag = field.Tags.Entries[index.Index];

            if (tag != null)
            {
                field.Class = tag.ParentClass;
                field.Value = tag;
            }
            else
            {
                field.Class = null;
                field.Value = null;
            }
        }
Ejemplo n.º 18
0
 public void VisitTagRef(TagRefData field)
 {
     AddWidth(_tagControl.Width);
 }