fCraft.GUI.IsoCat.IsoCat C# (CSharp) Метод

IsoCat() статический приватный Метод

static private IsoCat ( ) : System
Результат System
        static IsoCat()
        {
            using ( Bitmap tilesBmp = Resources.Tileset ) {
                TileX = tilesBmp.Width / 50;
                TileY = tilesBmp.Height;
                TileStride = TileX * TileY * 4;
                Tiles = new byte[50 * TileStride];

                MaxTileDim = Math.Max( TileX, TileY );

                for ( int i = 0; i < 50; i++ ) {
                    for ( int y = 0; y < TileY; y++ ) {
                        for ( int x = 0; x < TileX; x++ ) {
                            int p = i * TileStride + ( y * TileX + x ) * 4;
                            System.Drawing.Color c = tilesBmp.GetPixel( x + i * TileX, y );
                            Tiles[p] = c.B;
                            Tiles[p + 1] = c.G;
                            Tiles[p + 2] = c.R;
                            Tiles[p + 3] = c.A;
                        }
                    }
                }
            }

            using ( Bitmap stilesBmp = Resources.TilesetShadowed ) {
                ShadowTiles = new byte[50 * TileStride];

                for ( int i = 0; i < 50; i++ ) {
                    for ( int y = 0; y < TileY; y++ ) {
                        for ( int x = 0; x < TileX; x++ ) {
                            int p = i * TileStride + ( y * TileX + x ) * 4;
                            System.Drawing.Color c = stilesBmp.GetPixel( x + i * TileX, y );
                            ShadowTiles[p] = c.B;
                            ShadowTiles[p + 1] = c.G;
                            ShadowTiles[p + 2] = c.R;
                            ShadowTiles[p + 3] = c.A;
                        }
                    }
                }
            }
        }

Same methods

IsoCat::IsoCat ( Map map, IsoCatMode mode, int rot ) : System