public DecorationBlockData(IGameSave gameSave, byte[] data, BlockDataCollection parent)
            : base(gameSave, data, parent)
        {
            if (parent.GameCode == GameCodes.RubySapphire) {
                if (parent.Inventory.Decorations == null)
                    parent.Inventory.AddDecorationInventory();
                AddDecorationContainer(DecorationTypes.Desk, 1952, 10);
                AddDecorationContainer(DecorationTypes.Chair, 1962, 10);
                AddDecorationContainer(DecorationTypes.Plant, 1972, 10);
                AddDecorationContainer(DecorationTypes.Ornament, 1982, 30);
                AddDecorationContainer(DecorationTypes.Mat, 2012, 30);
                AddDecorationContainer(DecorationTypes.Poster, 2042, 10);
                AddDecorationContainer(DecorationTypes.Doll, 2052, 40);
                AddDecorationContainer(DecorationTypes.Cushion, 2092, 10);
                // TODO: Find where the XY values actually are stored.
                for (int i = 0; i < 12; i++) {
                    byte id = raw[1928 + i];
                    if (id != 0) {
                        byte x = ByteHelper.BitsToByte(raw, 1928 + 12 + i, 4, 4);
                        byte y = ByteHelper.BitsToByte(raw, 1928 + 12 + i, 0, 4);
                        parent.Inventory.Decorations.BedroomDecorations.Add(new PlacedDecoration(id, x, y));
                    }
                }

                parent.Mailbox.Load(ByteHelper.SubByteArray(3148, raw, 16 * 36));
            }
            else if (parent.GameCode == GameCodes.Emerald) {
                if (parent.Inventory.Decorations == null)
                    parent.Inventory.AddDecorationInventory();
                AddDecorationContainer(DecorationTypes.Desk, 2100, 10);
                AddDecorationContainer(DecorationTypes.Chair, 2110, 10);
                AddDecorationContainer(DecorationTypes.Plant, 2120, 10);
                AddDecorationContainer(DecorationTypes.Ornament, 2130, 30);
                AddDecorationContainer(DecorationTypes.Mat, 2160, 30);
                AddDecorationContainer(DecorationTypes.Poster, 2190, 10);
                AddDecorationContainer(DecorationTypes.Doll, 2200, 40);
                AddDecorationContainer(DecorationTypes.Cushion, 2240, 10);
                // TODO: Find where the XY values actually are stored.
                for (int i = 0; i < 12; i++) {
                    byte id = raw[2076 + i];
                    if (id != 0) {
                        byte x = ByteHelper.BitsToByte(raw, 2076 + 12 + i, 4, 4);
                        byte y = ByteHelper.BitsToByte(raw, 2076 + 12 + i, 0, 4);
                        parent.Inventory.Decorations.BedroomDecorations.Add(new PlacedDecoration(id, x, y));
                    }
                }

                parent.Mailbox.Load(ByteHelper.SubByteArray(3296, raw, 16 * 36));

                /*sharedSecretBases = new List<SharedSecretBase>();
                for (int i = 0; i < 3; i++) {
                    byte locationID = raw[1596 + i * 160];
                    if (SecretBaseDatabase.GetLocationFromID(locationID) != null)
                        sharedSecretBases.Add(new SharedSecretBase(ByteHelper.SubByteArray(1596 + i * 160, data, 160)));
                }*/
            }
            else if (parent.GameCode == GameCodes.FireRedLeafGreen) {
                parent.Mailbox.LoadPart1(ByteHelper.SubByteArray(3536, raw, 12 * 36));
            }
        }
 public NationalPokedexBAndCBlockData(IGameSave gameSave, byte[] data, BlockDataCollection parent)
     : base(gameSave, data, parent)
 {
     if (parent.GameCode == GameCodes.RubySapphire) {
         if (parent.Inventory.Decorations == null)
             parent.Inventory.AddDecorationInventory();
         for (int i = 0; i < 16; i++) {
             byte id = raw[2714 + i];
             if (id != 0) {
                 byte x = ByteHelper.BitsToByte(raw, 2714 + 16 + i, 4, 4);
                 byte y = ByteHelper.BitsToByte(raw, 2714 + 16 + i, 0, 4);
                 parent.Inventory.Decorations.SecretBaseDecorations.Add(new PlacedDecoration(id, x, y));
             }
         }
     }
     else if (parent.GameCode == GameCodes.Emerald) {
         if (parent.Inventory.Decorations == null)
             parent.Inventory.AddDecorationInventory();
         for (int i = 0; i < 16; i++) {
             byte id = raw[2862 + i];
             if (id != 0) {
                 byte x = ByteHelper.BitsToByte(raw, 2862 + 16 + i, 4, 4);
                 byte y = ByteHelper.BitsToByte(raw, 2862 + 16 + i, 0, 4);
                 parent.Inventory.Decorations.SecretBaseDecorations.Add(new PlacedDecoration(id, x, y));
             }
         }
     }
 }
 public TrainerInfoBlockData(IGameSave gameSave, byte[] data, BlockDataCollection parent)
     : base(gameSave, data, parent)
 {
 }