public void SetSize(byte Size) { var SaveFile = MainForm.Save_File; var ShopOffsets = ShopInfo.GetShopOffsets(SaveFile.Save_Type); if (ShopOffsets != null) { switch (SaveFile.Save_Generation) { case SaveGeneration.N64: case SaveGeneration.GCN: SaveFile.Write(SaveFile.Save_Data_Start_Offset + ShopOffsets.FurnitureShopUpgrade, (byte)((SaveFile.ReadByte(SaveFile.Save_Data_Start_Offset + ShopOffsets.FurnitureShopUpgrade) & 0x3F) | ((Size & 3) << 6))); break; case SaveGeneration.N3DS: SaveFile.Write(SaveFile.Save_Data_Start_Offset + ShopOffsets.FurnitureShopUpgrade, Size); break; } } }
public void SetSize(byte size) { var saveFile = MainForm.SaveFile; var shopOffsets = ShopInfo.GetShopOffsets(saveFile.SaveType); if (shopOffsets == null) { return; } switch (saveFile.SaveGeneration) { case SaveGeneration.N64: case SaveGeneration.GCN: saveFile.Write(saveFile.SaveDataStartOffset + shopOffsets.FurnitureShopUpgrade, (byte)((saveFile.ReadByte(saveFile.SaveDataStartOffset + shopOffsets.FurnitureShopUpgrade) & 0x3F) | ((size & 3) << 6))); break; case SaveGeneration.N3DS: saveFile.Write(saveFile.SaveDataStartOffset + shopOffsets.FurnitureShopUpgrade, size); break; } }
public byte GetSize(SaveGeneration Generation) { var SaveFile = MainForm.Save_File; var ShopOffsets = ShopInfo.GetShopOffsets(SaveFile.Save_Type); if (ShopOffsets != null) { switch (Generation) { case SaveGeneration.N64: case SaveGeneration.GCN: return((byte)(SaveFile.ReadByte(SaveFile.Save_Data_Start_Offset + ShopOffsets.FurnitureShopUpgrade) >> 6)); case SaveGeneration.N3DS: return(SaveFile.ReadByte(SaveFile.Save_Data_Start_Offset + ShopOffsets.FurnitureShopUpgrade)); default: return(0); } } return(0); }
public byte GetSize(SaveGeneration generation) { var saveFile = MainForm.SaveFile; var shopOffsets = ShopInfo.GetShopOffsets(saveFile.SaveType); if (shopOffsets == null) { return(0); } switch (generation) { case SaveGeneration.N64: case SaveGeneration.GCN: return((byte)(saveFile.ReadByte(saveFile.SaveDataStartOffset + shopOffsets.FurnitureShopUpgrade) >> 6)); case SaveGeneration.N3DS: return(saveFile.ReadByte(saveFile.SaveDataStartOffset + shopOffsets.FurnitureShopUpgrade)); default: return(0); } }
public Shop(Save saveFile, int offset) { SaveFile = saveFile; Offset = offset; ShopOffsets = ShopInfo.GetShopOffsets(SaveFile.Save_Type); }