Ejemplo n.º 1
0
        //========= CONSTRUCTORS =========
        #region Constructors

        /**<summary>Loads the terrain resources.</summary>*/
        static Terrain()
        {
            GraphicsData graphicsData = GraphicsData.FromBuffer(Resources.Terrain);

            LandTiles = new PaletteImage[5];
            graphicsData.paletteImages.CopyTo(LandTiles);
        }
Ejemplo n.º 2
0
        //========= CONSTRUCTORS =========
        #region Constructors

        /**<summary>Loads the water resources.</summary>*/
        static Water()
        {
            GraphicsData graphicsData = GraphicsData.FromBuffer(Resources.Water);

            WaterSprites = new PaletteImage[5];
            graphicsData.CopyTo(WaterSprites);
        }
Ejemplo n.º 3
0
        //========= CONSTRUCTORS =========
        #region Constructors

        /**<summary>Loads the color remapping resources.</summary>*/
        static ColorRemapping()
        {
            GraphicsData graphicsData = GraphicsData.FromBuffer(Resources.RemapStrips);

            for (int i = 0; i < 32; i++)
            {
                RemapPalette remaps = new RemapPalette(12);
                for (int j = 0; j < 12; j++)
                {
                    remaps.remapIndexes[j] = graphicsData.paletteImages[4915 + i - 4915].Pixels[243 + j, 0];
                }
                RemapPalettes[i] = remaps;
            }
            for (int i = 0; i < 32; i++)
            {
                RemapPalette remaps = new RemapPalette(256);
                for (int j = 0; j < 256; j++)
                {
                    remaps.remapIndexes[j] = graphicsData.paletteImages[5016 + i - 4915].Pixels[j, 0];
                }
                GlassPalettes[i] = remaps;
            }
            for (int i = 0; i < 5; i++)
            {
                RemapPalette remaps = new RemapPalette(256);
                for (int j = 0; j < 256; j++)
                {
                    remaps.remapIndexes[j] = graphicsData.paletteImages[4947 - 4915].Pixels[j, i];
                }
                WaterPalettes[i] = remaps;
            }
            for (int i = 0; i < 4; i++)
            {
                RemapPalette remaps = new RemapPalette(256);
                for (int j = 0; j < 256; j++)
                {
                    remaps.remapIndexes[j] = graphicsData.paletteImages[4951 + i - 4915].Pixels[j, 0];
                }
                DarknessPalettes[i] = remaps;
            }
        }