public OldAnimationEntryViewer(OldFrame frame,OldModelEntry model)
 {
     this.frames = new List<OldFrame>();
     this.frames.Add(frame);
     this.model = model;
     this.frameid = 0;
 }
 public OldFrameController(OldAnimationEntryController oldanimationentrycontroller,OldFrame oldframe)
 {
     this.oldanimationentrycontroller = oldanimationentrycontroller;
     this.oldframe = oldframe;
     Node.Text = "Frame";
     Node.ImageKey = "oldframe";
     Node.SelectedImageKey = "oldframe";
     AddMenu("Export as OBJ",Menu_Export_OBJ);
 }
 public override Entry Load(byte[][] items,int eid)
 {
     if (items == null)
         throw new ArgumentNullException("items");
     OldFrame[] frames = new OldFrame [items.Length];
     for (int i = 0;i < frames.Length;i++)
     {
         frames[i] = OldFrame.Load(items[i]);
     }
     return new OldAnimationEntry(frames,eid);
 }
Exemple #4
0
 public override Entry Load(byte[][] items, int eid)
 {
     if (items == null)
     {
         throw new ArgumentNullException("items");
     }
     OldFrame[] frames = new OldFrame [items.Length];
     for (int i = 0; i < frames.Length; i++)
     {
         frames[i] = OldFrame.Load(items[i]);
     }
     return(new OldAnimationEntry(frames, eid));
 }
 private void RenderFrame(OldFrame frame)
 {
     if (model != null)
     {
         GL.Begin(BeginMode.Triangles);
         foreach (OldModelPolygon polygon in model.Polygons)
         {
             int coloroffset = 20 + (polygon.Unknown & 0x7FFF) * 4;
             byte r = model.Info[coloroffset + 0];
             byte g = model.Info[coloroffset + 1];
             byte b = model.Info[coloroffset + 2];
             GL.Color3(r,g,b);
             RenderVertex(frame.Vertices[polygon.VertexA / 6]);
             RenderVertex(frame.Vertices[polygon.VertexB / 6]);
             RenderVertex(frame.Vertices[polygon.VertexC / 6]);
         }
         GL.End();
     }
     else
     {
         GL.Begin(BeginMode.Points);
         foreach (OldFrameVertex vertex in frame.Vertices)
         {
             RenderVertex(vertex);
         }
         GL.End();
     }
 }