private void PopulateProperties( GraphicStructure paletteStructure, IList<GraphicStructure> pixelStructures ) { Palette = new Palette( paletteStructure.Pixels, Palette.ColorDepth._16bit ); List<byte> pix = new List<byte>(); pixelStructures.ForEach( p => pix.AddRange( p.Pixels ) ); Pixels = pix.AsReadOnly(); }
private void PopulateProperties(GraphicStructure paletteStructure, IList <GraphicStructure> pixelStructures) { Palette = new Palette(paletteStructure.Pixels, Palette.ColorDepth._16bit); List <byte> pix = new List <byte>(); pixelStructures.ForEach(p => pix.AddRange(p.Pixels)); Pixels = pix.AsReadOnly(); }
private int maxBalls = 20; // maximális metalabdák száma public Blob(Vector3 pos, GraphicsDevice device, Effect effect) { int width = 256; int height = 256; sprite = new EntitySprite(device, width, height); Pivot = pos; this.effect = effect; sprite.WorldPos = pos; graphicStructure = new GraphicStructure(maxBalls); }
public GraphicStructureList(IList <byte> bytes #if DEBUG , int startIndex #endif ) { Count = (UInt16)((bytes[1] << 8) + bytes[0]); Unknown = (UInt16)((bytes[3] << 8) + bytes[2]); GraphicStructure[] structs = new GraphicStructure[Count]; int currentIndex = 4; for (int i = 0; i < Count; i++) { int consumed = 0; structs[i] = GraphicStructure.GetStructure(bytes.Sub(currentIndex), out consumed); #if DEBUG Console.Out.WriteLine("{0} from {1}-{2}", structs[i].Bounds, startIndex + currentIndex + 8, startIndex + currentIndex + consumed); #endif currentIndex += consumed; } Structures = structs.AsReadOnly(); }
public GraphicsStructureImage( GraphicStructure paletteStructure, IList<GraphicStructure> pixelStructures ) { PopulateProperties( paletteStructure, pixelStructures ); }
public GraphicStructureList( IList<byte> bytes #if DEBUG , int startIndex #endif ) { Count = (UInt16)( ( bytes[1] << 8 ) + bytes[0] ); Unknown = (UInt16)( ( bytes[3] << 8 ) + bytes[2] ); GraphicStructure[] structs = new GraphicStructure[Count]; int currentIndex = 4; for ( int i = 0; i < Count; i++ ) { int consumed = 0; structs[i] = GraphicStructure.GetStructure( bytes.Sub( currentIndex ), out consumed ); #if DEBUG Console.Out.WriteLine( "{0} from {1}-{2}", structs[i].Bounds, startIndex + currentIndex+8, startIndex + currentIndex + consumed ); #endif currentIndex += consumed; } Structures = structs.AsReadOnly(); }
public GraphicsStructureImage(GraphicStructure paletteStructure, IList <GraphicStructure> pixelStructures) { PopulateProperties(paletteStructure, pixelStructures); }