Example #1
0
        //=========== LOADING ============
        #region Loading

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

            LandTiles = new PaletteImage[5];
            graphicsData.paletteImages.CopyTo(LandTiles);
        }
Example #2
0
        //=========== LOADING ============
        #region Loading

        /** <summary> Loads the color remapping resources. </summary> */
        public static void LoadResources()
        {
            /*ImageDirectory imageDirectory = new ImageDirectory();
             * GraphicsData graphicsData = new GraphicsData(imageDirectory);
             *
             * BinaryReader reader = new BinaryReader(new MemoryStream(Resources.RemapStrips));
             * imageDirectory.Read(reader);
             * graphicsData.Read(reader);*/
            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;
            }
        }