public EntityEntryController(EntryChunkController entrychunkcontroller,EntityEntry entityentry)
     : base(entrychunkcontroller,entityentry)
 {
     this.entityentry = entityentry;
     Node.Text = string.Format("Entity Entry ({0})",entityentry.EIDString);
     Node.ImageKey = "entityentry";
     Node.SelectedImageKey = "entityentry";
     AddNode(new ItemController(null,entityentry.Unknown1));
     AddNode(new ItemController(null,entityentry.Unknown2));
     foreach (Entity entity in entityentry.Entities)
     {
         AddNode(new EntityController(this,entity));
     }
 }
 protected override Control CreateEditor()
 {
     int linkedsceneryentrycount = BitConv.FromInt32(entityentry.Unknown1,0);
     SceneryEntry[] linkedsceneryentries = new SceneryEntry [linkedsceneryentrycount];
     for (int i = 0;i < linkedsceneryentrycount;i++)
     {
         linkedsceneryentries[i] = FindEID<SceneryEntry>(BitConv.FromInt32(entityentry.Unknown1,4 + i * 48));
     }
     int linkedentityentrycount = BitConv.FromInt32(entityentry.Unknown1,400);
     EntityEntry[] linkedentityentries = new EntityEntry [linkedentityentrycount];
     for (int i = 0;i < linkedentityentrycount;i++)
     {
         linkedentityentries[i] = FindEID<EntityEntry>(BitConv.FromInt32(entityentry.Unknown1,404 + i * 4));
     }
     return new UndockableControl(new EntityEntryViewer(entityentry,linkedsceneryentries,linkedentityentries));
 }
Beispiel #3
0
 public EntityEntryViewer(EntityEntry entry,SceneryEntry[] linkedsceneryentries,EntityEntry[] linkedentries)
     : base(linkedsceneryentries)
 {
     this.entry = entry;
     this.linkedentries = linkedentries;
 }
Beispiel #4
0
 private void RenderEntry(EntityEntry entry)
 {
     int xoffset = BitConv.FromInt32(entry.Unknown2,0);
     int yoffset = BitConv.FromInt32(entry.Unknown2,4);
     int zoffset = BitConv.FromInt32(entry.Unknown2,8);
     GL.PushMatrix();
     GL.Translate(xoffset,yoffset,zoffset);
     GL.Scale(4,4,4);
     foreach (Entity entity in entry.Entities)
     {
         if (entity.Name != null)
         {
             RenderEntity(entity);
         }
     }
     GL.PopMatrix();
 }