This chunk type collects SPR# and SPR2 resources into a "drawing group" which can be used to display one tile of an object from all directions and zoom levels. Objects which span across multiple tiles have a separate DGRP chunk for each tile. A DGRP chunk always consists of 12 images (one for every direction/zoom level combination), which in turn contain info about one or more sprites.
Inheritance: IffChunk
Esempio n. 1
0
 public DGRP3DMesh Get(DGRP dgrp, GraphicsDevice device)
 {
     if (Cached == null)
     {
         using (var stream = new MemoryStream(data)) {
             Cached = new DGRP3DMesh(dgrp, stream, device);
         }
     }
     data = null;
     return(Cached);
 }
Esempio n. 2
0
 public ObjectComponent(GameObject obj)
 {
     this.Obj = obj;
     renderInfo = new WorldObjectRenderInfo();
     if (obj.OBJ.BaseGraphicID > 0)
     {
         var gid = obj.OBJ.BaseGraphicID;
         this.DrawGroup = obj.Resource.Get<DGRP>(gid);
         dgrp = new DGRPRenderer(this.DrawGroup);
         dgrp.DynamicSpriteBaseID = obj.OBJ.DynamicSpriteBaseId;
         dgrp.NumDynamicSprites = obj.OBJ.NumDynamicSprites;
     }
 }
Esempio n. 3
0
 public DGRPSprite(DGRP parent)
 {
     this.Parent = parent;
 }
Esempio n. 4
0
 public DGRPImage(DGRP parent)
 {
     this.Parent = parent;
 }
Esempio n. 5
0
 public DGRPSprite(DGRP parent)
 {
     this.Parent = parent;
 }
Esempio n. 6
0
 public DGRPImage(DGRP parent)
 {
     this.Parent = parent;
 }
Esempio n. 7
0
 public DGRPRenderer(DGRP group)
 {
     this.DrawGroup = group;
 }