Esempio n. 1
0
 public Reflexive(Map Map, string Label, int Count,int Base, int Offset, int Size,XmlReader Reader)
 {
     this.Map = Map;
     this.Label = Label;
     this.Count = Count;
     this.Base = Base;
     this.Offset = Offset;
     this.ChunkSize = Size;
     this.Reader = Reader;
     if (Base != 0)
     {
         Map.Reader.BaseStream.Position = ((Offset + Base) - Map.Index.SecondaryMagic) + 4;
         this.RawTranslation = Map.Reader.ReadInt32();
     }
     else
         this.RawTranslation = 0;
     InitializeComponent();
     for (int i = 0; i < Count; i++)
         comboBox1.Items.Add(i.ToString());
     label1.Text = Label;
     ReadControls();
     if (Count == 0)
     {
         button1.Text = "+";
         panel1.Hide();
         hidden = true;
     }
     else
     {
         comboBox1.SelectedIndex = 0;
         this.Height += panel1.Height;
     }
 }
Esempio n. 2
0
 public TagTable(Map Map)
 {
     this.Map = Map;
     bool Go = true;
     int tmp = 1;
     Map.Reader.BaseStream.Position = Map.Index.TagStart;
     while (Go)
     {
         if (this.Count == 0)
         {
             byte[] Buffer = new byte[] { 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
             byte[] Buffer1 = Map.Reader.ReadBytes(16);
             while (Buffer1[0] == Buffer[0] & Buffer1[1] == Buffer[1] & Buffer[2] == Buffer1[2])
             {
                 Buffer1 = Map.Reader.ReadBytes(16);
                 tmp += 1;
             }
             Map.Reader.BaseStream.Position -= 16;
             tmp -= 1;
         }
         else
         {
             byte[] Buffer = new byte[] { 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
             byte[] Buffer1 = Map.Reader.ReadBytes(16);
             if (Buffer1[0] == Buffer[0] && Buffer1[1] == Buffer[1] && Buffer1[2] == Buffer[2])
                 break;
             else
                 Map.Reader.BaseStream.Position -= 16;
         }
         TagObject t = new TagObject();
         t.Class = Globals.ReverseStr(new string(Map.Reader.ReadChars(4)));
         t.Identifier = Map.Reader.ReadInt32();
         t.RawMetaOffset = Map.Reader.ReadInt32();
         t.MetaSize = Map.Reader.ReadInt32();
         t.MetaOffset = t.RawMetaOffset - Map.Index.SecondaryMagic;
         t.Index = tmp;
         tmp += 1;
         if (this.Count < 15065 && (uint)t.Identifier != 0xFFFFFFFF && tmp < 15065)
         {
             List.Add(t);
             if (!this.TagTypes.Contains(t.Class)) this.TagTypes.Add(t.Class);
         }
         if (tmp == 15064 || t.Class == "ugh!") Go = false;
     }
     Map.Header.TagCount = this.Count;
     Map.Reader.BaseStream.Position = Map.Header.FileTableOffset;
     for (int i = 0; i < this.Count; i++)
     {
         char c;
         while ((c = Map.Reader.ReadChar()) != '\0') this[i].Path += c;
     }
 }
Esempio n. 3
0
 public Value(string Label, Type Type, object Value,int length, int Base, int Offset, Map Map)
 {
     this.Label = Label;
     this.Type = Type;
     this.value = Value;
     this.length = length;
     this.Base = Base;
     this.Offset = Offset;
     this.Map = Map;
     InitializeComponent();
     label1.Text = Label;
     if (value.ToString() == "")
         Update(0);
 }
Esempio n. 4
0
 public Value(string Label, Type Type, object Value,int Base, int Offset, Map Map)
 {
     this.Label = Label;
     this.Type = Type;
     this.value = Value;
     this.Base = Base;
     this.Offset = Offset;
     this.Map = Map;
     InitializeComponent();
     label1.Text = Label;
     textBox1.Text = Value.ToString();
     if((int)value == 0)
     Update(0);
     if (Program.Devmode)
         button2.Visible = true;
 }
Esempio n. 5
0
 public Ident(string Class, int ident,int Base, int Offset, string Label, Map Map)
 {
     this.Class = Class;
     this.ident = ident;
     this.Base = Base;
     this.Offset = Offset;
     this.Label = Label;
     this.Map = Map;
     InitializeComponent();
     comboBox1.Sorted = true;
     foreach (string s in Map.Tags.TagTypes)
         comboBox1.Items.Add(s);
     comboBox1.Items.Add("Null");
     label1.Text = Label;
     if (Program.Devmode)
         button2.Visible = true;
 }
Esempio n. 6
0
 public Enum(string Label,int Base, int Offset, Type Type, List<string> Items, List<int> Values, int Index, Map Map)
 {
     this.Label = Label;
     this.Base = Base;
     this.Offset = Offset;
     this.Type = Type;
     this.Items = Items;
     this.Values = Values;
     this.Index = Index;
     this.Map = Map;
     InitializeComponent();
     label1.Text = Label;
     foreach (string s in Items)
         comboBox1.Items.Add(s);
     if (Index == 0)
         Update(0);
     if (Program.Devmode)
         button2.Visible = true;
 }
Esempio n. 7
0
 public MapDetails(Map map)
 {
     this.Map = map;
     InitializeComponent();
     toolStripComboBox1.SelectedIndex = 0;
 }