Exemplo n.º 1
0
        public ExtraPalettes()
        {
            // TODO: Ice golems
            LightWorldSprites = ReadOnlyIndexCollectionPerRow(0xDD218, 4, 15);
            DarkWorldSprites  = ReadOnlyIndexCollectionPerRow(0xDD290, 4, 15);
            Clothes           = ReadOnlyIndexCollectionPerRow(0xDD308, 5, 15);
            Enemies2          = ReadOnlyIndexCollectionPerRow(0xDD39E, 12, 7);
            OtherSprites      = ReadOnlyIndexCollectionPerRow(0xDD446, 11, 7);
            var enemies1 = new List <IndexCollection>(
                IndexCollectionPerRow(0xDD4E0, 24, 7));

            Sword           = ReadOnlyIndexCollectionPerRow(0xDD630, 4, 3);
            Shield          = ReadOnlyIndexCollectionPerRow(0xDD648, 3, 4);
            HUD             = ReadOnlyIndexCollectionPerRow(0xDD660, 2 * 8, 4);
            PalaceMapSprite = ReadOnlyIndexCollectionPerRow(0xDD70A, 3, 7);

            // Mix Ice Golems with Ice Palace
            var dungeons  = IndexCollectionPerRow(0xDD734, 20, 6 * 15);
            var icePalace = new List <int>(dungeons[4]);

            icePalace.AddRange(enemies1[12]);
            dungeons[4]   = new ListIndexCollection(icePalace);
            enemies1[12]  = IndexCollection.Empty;
            DungeonMainBG = new ReadOnlyCollection <IndexCollection>(dungeons);
            Enemies1      = new ReadOnlyCollection <IndexCollection>(enemies1);

            var builder = new PaletteIndexCollectionBuilder(0xDE544, 16);

            builder.AddFullRows(0, 6);
            DungeonMap = builder.Flush();

            OverworldAuxiliary3 = ReadOnlyIndexCollectionPerRow(0xDE604, 14, 7);
            MainOverworldArea   = ReadOnlyIndexCollectionPerRow(0xDE6C8, 6 * 5, 7);
            OverworldAuxiliary  = ReadOnlyIndexCollectionPerRow(0xDE86C, 20 * 3, 7);
        }
        public OverworldMap(PaletteIndexCollectionBuilder builder)
        {
            if (builder is null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            builder.AddFullRows(0, 8);
            Everything = builder.Flush();

            builder.AddRow(1, 9, 1);
            builder.AddRow(2, 6, 2);
            builder.AddRow(2, 10, 1);
            builder.AddRow(3, 12, 2);
            builder.AddColumn(4, 9, 3);
            builder.AddRow(4, 10, 1);
            Water = builder.Flush();

            builder.AddRow(0, 6, 2);
            builder.AddRow(2, 2, 1);
            builder.AddRow(3, 8, 2);
            builder.AddRow(4, 1, 1);
            builder.AddRow(4, 4, 5);
            builder.AddRow(5, 6, 3);
            builder.AddRow(6, 12, 4);
            HillsAndDirt = builder.Flush();

            builder.AddRow(0, 2, 2);
            builder.AddRow(6, 2, 4);
            builder.AddRow(2, 1, 1);
            builder.AddRow(2, 4, 2);
            builder.AddRow(2, 8, 1);
            builder.AddColumn(2, 11, 6);
            builder.AddRow(3, 6, 2);
            builder.AddRow(3, 10, 1);
            builder.AddRow(4, 2, 2);
            builder.AddRow(4, 15, 1);
            builder.AddRow(5, 2, 3);
            builder.AddRow(5, 10, 1);
            builder.AddRow(6, 1, 1);
            Grass = builder.Flush();

            builder.AddRow(4, 12, 3);
            builder.AddRow(5, 5, 1);
            Flowers = builder.Flush();

            builder.AddRow(6, 6, 3);
            TreeWood = builder.Flush();

            builder.AddRow(0, 8, 8);
            builder.AddRow(1, 4, 1);
            Clouds = builder.Flush();

            builder.AddRow(2, 12, 4);
            HyruleCastle = builder.Flush();

            builder.AddRow(3, 1, 1);
            builder.AddRow(3, 14, 2);
            Sanctuary = builder.Flush();

            builder.AddRow(5, 1, 1);
            builder.AddRow(5, 12, 4);
            Houses = builder.Flush();

            builder.AddRow(0, 1, 1);
            builder.AddRow(0, 4, 1);
            builder.AddRow(1, 8, 1);
            builder.AddRow(3, 2, 4);
            DeathMountain = builder.Flush();

            builder.AddRow(1, 1, 1);
            builder.AddRow(1, 5, 3);
            TowerOfHera = builder.Flush();

            builder.AddRow(1, 10, 6);
            IcePalace = builder.Flush();
        }