예제 #1
0
        public int StoreData()
        {
            var shopdic  = Shops.ToDictionary(s => s.Index);
            var shopdata = new List <byte>();

            for (int i = 0; i < 70; i++)
            {
                if (shopdic.TryGetValue(i, out var shop))
                {
                    Index.Data[i] = (ushort)(ShopNullPointer + 1 + shopdata.Count);

                    if (shop.Type == ShopType.Clinic || shop.Type == ShopType.Inn)
                    {
                        shopdata.Add((byte)(shop.Price & 0xFF));
                        shopdata.Add((byte)((shop.Price >> 8) & 0xFF));
                        shopdata.Add(0);
                    }
                    else
                    {
                        shopdata.AddRange(shop.Entries.Cast <byte>());
                        shopdata.Add(0);
                    }
                }
                else
                {
                    Index.Data[i] = ShopNullPointer;
                }

                Index.StoreTable();
                rom.Put(ShopPointerBase + ShopNullPointer + 1, shopdata.Cast <byte>().ToArray());
            }

            return(241 - shopdata.Count());
        }
예제 #2
0
 public void StoreData()
 {
     TileProperties.StoreTable();
     TileAttributes.StoreTable();
     TopLeftTiles.StoreTable();
     TopRightTiles.StoreTable();
     BottomLeftTiles.StoreTable();
     BottomRightTiles.StoreTable();
 }
        public void StoreData()
        {
            for (int i = 0; i < 128; i++)
            {
                TileProperties[2 * i]     = Data[i].Byte1;
                TileProperties[2 * i + 1] = Data[i].Byte2;
            }

            TileProperties.StoreTable();
        }
 public void StoreData()
 {
     TeleX.StoreTable();
     TeleY.StoreTable();
 }