コード例 #1
1
ファイル: WldTex2.cs プロジェクト: Glain/FFTPatcher
 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();
 }
コード例 #2
0
            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();
            }
コード例 #3
0
        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);
        }
コード例 #4
0
            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();
            }
コード例 #5
0
ファイル: WldTex2.cs プロジェクト: Glain/FFTPatcher
 public GraphicsStructureImage( GraphicStructure paletteStructure, IList<GraphicStructure> pixelStructures )
 {
     PopulateProperties( paletteStructure, pixelStructures );
 }
コード例 #6
0
ファイル: WldTex2.cs プロジェクト: Glain/FFTPatcher
            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();
            }
コード例 #7
0
 public GraphicsStructureImage(GraphicStructure paletteStructure, IList <GraphicStructure> pixelStructures)
 {
     PopulateProperties(paletteStructure, pixelStructures);
 }