public override void CommitChanges(BMSSVFile bmssvFile)
 {
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.ItemsCollectedByArea, ChunkIDs.Surface).SetValue(SurfaceItems);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.ItemsCollectedByArea, ChunkIDs.Area1).SetValue(Area1Items);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.ItemsCollectedByArea, ChunkIDs.Area2).SetValue(Area2Items);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.ItemsCollectedByArea, ChunkIDs.Area3).SetValue(Area3Items);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.ItemsCollectedByArea, ChunkIDs.Area4).SetValue(Area4Items);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.ItemsCollectedByArea, ChunkIDs.Area5).SetValue(Area5Items);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.ItemsCollectedByArea, ChunkIDs.Area6).SetValue(Area6Items);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.ItemsCollectedByArea, ChunkIDs.Area7).SetValue(Area7Items);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.ItemsCollectedByArea, ChunkIDs.Area8).SetValue(Area8Items);
 }
 protected override void LoadData(BMSSVFile bmssvFile)
 {
     SurfaceItems = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.ItemsCollectedByArea, ChunkIDs.Surface)?.Value;
     Area1Items   = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.ItemsCollectedByArea, ChunkIDs.Area1)?.Value;
     Area2Items   = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.ItemsCollectedByArea, ChunkIDs.Area2)?.Value;
     Area3Items   = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.ItemsCollectedByArea, ChunkIDs.Area3)?.Value;
     Area4Items   = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.ItemsCollectedByArea, ChunkIDs.Area4)?.Value;
     Area5Items   = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.ItemsCollectedByArea, ChunkIDs.Area5)?.Value;
     Area6Items   = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.ItemsCollectedByArea, ChunkIDs.Area6)?.Value;
     Area7Items   = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.ItemsCollectedByArea, ChunkIDs.Area7)?.Value;
     Area8Items   = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.ItemsCollectedByArea, ChunkIDs.Area8)?.Value;
 }
 public override void CommitChanges(BMSSVFile bmssvFile)
 {
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.MiscData, ChunkIDs.MissionTime).SetValue((float)MissionTime.TotalSeconds);
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.AmiiboFunctionalityUnlocked).SetValue(Convert.ToByte(AmiiboFunctionalityUnlocked));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.EnergyReserveTankUnlocked).SetValue(Convert.ToByte(EnergyReserveTankUnlocked));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.IsEnergyReserveTankFull).SetValue(Convert.ToByte(IsEnergyReserveTankFull));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.AeionEnergyReserveTankUnlocked).SetValue(Convert.ToByte(AeionEnergyReserveTankUnlocked));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.IsAeionEnergyReserveTankFull).SetValue(Convert.ToByte(IsAeionEnergyReserveTankFull));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.MissileReserveTankUnlocked).SetValue(Convert.ToByte(MissileReserveTankUnlocked));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.IsMissileReserveTankFull).SetValue(Convert.ToByte(IsMissileReserveTankFull));
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.SurfaceCollectedItemsCount).SetValue(SurfaceCollectedItemsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area1CollectedItemsCount).SetValue(Area1CollectedItemsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area2CollectedItemsCount).SetValue(Area2CollectedItemsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area3CollectedItemsCount).SetValue(Area3CollectedItemsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area4CollectedItemsCount).SetValue(Area4CollectedItemsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area5CollectedItemsCount).SetValue(Area5CollectedItemsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area6CollectedItemsCount).SetValue(Area6CollectedItemsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area7CollectedItemsCount).SetValue(Area7CollectedItemsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area8CollectedItemsCount).SetValue(Area8CollectedItemsCount);
     bmssvFile.GetChunk <StringChunk>(BlockIDs.MiscData, ChunkIDs.CurrentEvent).SetValue(CurrentEvent);
     bmssvFile.GetChunk <StringChunk>(BlockIDs.MiscData, ChunkIDs.CurrentEventLocation).SetValue(CurrentEventLocation);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.MetroidsToKillInCurrentArea).SetValue(MetroidsToKillInCurrentArea);
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.SurfaceAlphaMetroidKilled).SetValue(Convert.ToByte(SurfaceAlphaMetroidKilled));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.Area1AlphaMetroid1Killed).SetValue(Convert.ToByte(Area1AlphaMetroid1Killed));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.Area1AlphaMetroid2Killed).SetValue(Convert.ToByte(Area1AlphaMetroid2Killed));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.Area1AlphaMetroid3Killed).SetValue(Convert.ToByte(Area1AlphaMetroid3Killed));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.Area1AlphaMetroid4Killed).SetValue(Convert.ToByte(Area1AlphaMetroid4Killed));
 }
 public override void CommitChanges(BMSSVFile bmssvFile)
 {
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.GameDifficulty).SetValue((uint)GameDifficulty);
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.EnergyReserveTankUnlocked).SetValue(Convert.ToByte(EnergyReserveTankUnlocked));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.IsEnergyReserveTankFull).SetValue(Convert.ToByte(IsEnergyReserveTankFull));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.AeionEnergyReserveTankUnlocked).SetValue(Convert.ToByte(AeionEnergyReserveTankUnlocked));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.IsAeionEnergyReserveTankFull).SetValue(Convert.ToByte(IsAeionEnergyReserveTankFull));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.MissileReserveTankUnlocked).SetValue(Convert.ToByte(MissileReserveTankUnlocked));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.IsMissileReserveTankFull).SetValue(Convert.ToByte(IsMissileReserveTankFull));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.AmiiboFunctionalityUnlocked).SetValue(Convert.ToByte(AmiiboFunctionalityUnlocked));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.HasAmiiboOptionUnlockedMsgDisplayed).SetValue(Convert.ToByte(HasAmiiboOptionUnlockedMsgDisplayed));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.HasGameBeenCompleted).SetValue(Convert.ToByte(HasGameBeenCompleted));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.Metroid2GalleryUnlocked).SetValue(Convert.ToByte(Metroid2GalleryUnlocked));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ConceptArtGalleryUnlocked).SetValue(Convert.ToByte(ConceptArtGalleryUnlocked));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.SoundTestUnlocked).SetValue(Convert.ToByte(SoundTestUnlocked));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.FusionModeUnlocked).SetValue(Convert.ToByte(FusionModeUnlocked));
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage1PartsCount).SetValue(ChozoMemoriesPage1PartsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage2PartsCount).SetValue(ChozoMemoriesPage2PartsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage3PartsCount).SetValue(ChozoMemoriesPage3PartsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage4PartsCount).SetValue(ChozoMemoriesPage4PartsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage5PartsCount).SetValue(ChozoMemoriesPage5PartsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage6PartsCount).SetValue(ChozoMemoriesPage6PartsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage7PartsCount).SetValue(ChozoMemoriesPage7PartsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage8PartsCount).SetValue(ChozoMemoriesPage8PartsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage9PartsCount).SetValue(ChozoMemoriesPage9PartsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage10PartsCount).SetValue(ChozoMemoriesPage10PartsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage11PartsCount).SetValue(ChozoMemoriesPage11PartsCount);
 }
 protected override void LoadData(BMSSVFile bmssvFile)
 {
     MissionTime = TimeSpan.FromSeconds((float)bmssvFile.GetChunk <Float32Chunk>(BlockIDs.MiscData, ChunkIDs.MissionTime)?.Value);
     AmiiboFunctionalityUnlocked    = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.AmiiboFunctionalityUnlocked)?.Value);
     EnergyReserveTankUnlocked      = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.EnergyReserveTankUnlocked)?.Value);
     IsEnergyReserveTankFull        = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.IsEnergyReserveTankFull)?.Value);
     AeionEnergyReserveTankUnlocked = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.AeionEnergyReserveTankUnlocked)?.Value);
     IsAeionEnergyReserveTankFull   = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.IsAeionEnergyReserveTankFull)?.Value);
     MissileReserveTankUnlocked     = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.MissileReserveTankUnlocked)?.Value);
     IsMissileReserveTankFull       = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.IsMissileReserveTankFull)?.Value);
     SurfaceCollectedItemsCount     = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.SurfaceCollectedItemsCount)?.Value;
     Area1CollectedItemsCount       = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area1CollectedItemsCount)?.Value;
     Area2CollectedItemsCount       = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area2CollectedItemsCount)?.Value;
     Area3CollectedItemsCount       = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area3CollectedItemsCount)?.Value;
     Area4CollectedItemsCount       = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area4CollectedItemsCount)?.Value;
     Area5CollectedItemsCount       = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area5CollectedItemsCount)?.Value;
     Area6CollectedItemsCount       = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area6CollectedItemsCount)?.Value;
     Area7CollectedItemsCount       = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area7CollectedItemsCount)?.Value;
     Area8CollectedItemsCount       = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area8CollectedItemsCount)?.Value;
     CurrentEvent                = Convert.ToString(bmssvFile.GetChunk <StringChunk>(BlockIDs.MiscData, ChunkIDs.CurrentEvent)?.Value);
     CurrentEventLocation        = Convert.ToString(bmssvFile.GetChunk <StringChunk>(BlockIDs.MiscData, ChunkIDs.CurrentEventLocation)?.Value);
     MetroidsToKillInCurrentArea = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.MetroidsToKillInCurrentArea)?.Value;
     SurfaceAlphaMetroidKilled   = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.SurfaceAlphaMetroidKilled)?.Value);
     Area1AlphaMetroid1Killed    = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.Area1AlphaMetroid1Killed)?.Value);
     Area1AlphaMetroid2Killed    = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.Area1AlphaMetroid2Killed)?.Value);
     Area1AlphaMetroid3Killed    = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.Area1AlphaMetroid3Killed)?.Value);
     Area1AlphaMetroid4Killed    = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.MiscData, ChunkIDs.Area1AlphaMetroid4Killed)?.Value);
 }
 protected override void LoadData(BMSSVFile bmssvFile)
 {
     GameDifficulty                      = (GameDifficulties)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.GameDifficulty)?.Value;
     EnergyReserveTankUnlocked           = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.EnergyReserveTankUnlocked)?.Value);
     IsEnergyReserveTankFull             = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.IsEnergyReserveTankFull)?.Value);
     AeionEnergyReserveTankUnlocked      = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.AeionEnergyReserveTankUnlocked)?.Value);
     IsAeionEnergyReserveTankFull        = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.IsAeionEnergyReserveTankFull)?.Value);
     MissileReserveTankUnlocked          = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.MissileReserveTankUnlocked)?.Value);
     IsMissileReserveTankFull            = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.IsMissileReserveTankFull)?.Value);
     AmiiboFunctionalityUnlocked         = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.AmiiboFunctionalityUnlocked)?.Value);
     HasAmiiboOptionUnlockedMsgDisplayed = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.HasAmiiboOptionUnlockedMsgDisplayed)?.Value);
     HasGameBeenCompleted                = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.HasGameBeenCompleted)?.Value);
     Metroid2GalleryUnlocked             = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.Metroid2GalleryUnlocked)?.Value);
     ConceptArtGalleryUnlocked           = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ConceptArtGalleryUnlocked)?.Value);
     SoundTestUnlocked                   = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.SoundTestUnlocked)?.Value);
     FusionModeUnlocked                  = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.FusionModeUnlocked)?.Value);
     ChozoMemoriesPage1PartsCount        = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage1PartsCount)?.Value;
     ChozoMemoriesPage2PartsCount        = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage2PartsCount)?.Value;
     ChozoMemoriesPage3PartsCount        = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage3PartsCount)?.Value;
     ChozoMemoriesPage4PartsCount        = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage4PartsCount)?.Value;
     ChozoMemoriesPage5PartsCount        = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage5PartsCount)?.Value;
     ChozoMemoriesPage6PartsCount        = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage6PartsCount)?.Value;
     ChozoMemoriesPage7PartsCount        = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage7PartsCount)?.Value;
     ChozoMemoriesPage8PartsCount        = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage8PartsCount)?.Value;
     ChozoMemoriesPage9PartsCount        = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage9PartsCount)?.Value;
     ChozoMemoriesPage10PartsCount       = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage10PartsCount)?.Value;
     ChozoMemoriesPage11PartsCount       = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.ChozoMemoriesPage11PartsCount)?.Value;
 }
Exemple #7
0
 public override void CommitChanges(BMSSVFile bmssvFile)
 {
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.MaxEnergy).SetValue(MaxEnergy);
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.CurrentEnergy).SetValue(CurrentEnergy);
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.EnergyReserveTankUnlocked).SetValue(Convert.ToByte(EnergyReserveTankUnlocked));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.IsEnergyReserveTankFull).SetValue(Convert.ToByte(IsEnergyReserveTankFull));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.AeionEnergyReserveTankUnlocked).SetValue(Convert.ToByte(AeionEnergyReserveTankUnlocked));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.IsAeionEnergyReserveTankFull).SetValue(Convert.ToByte(IsAeionEnergyReserveTankFull));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.MissileReserveTankUnlocked).SetValue(Convert.ToByte(MissileReserveTankUnlocked));
     bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.IsMissileReserveTankFull).SetValue(Convert.ToByte(IsMissileReserveTankFull));
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.MetroidsKilled).SetValue(MetroidsKilled);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.GameDifficulty).SetValue((uint)GameDifficulty);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.SurfaceCollectedItemsCount).SetValue(SurfaceCollectedItemsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area1CollectedItemsCount).SetValue(Area1CollectedItemsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area2CollectedItemsCount).SetValue(Area2CollectedItemsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area3CollectedItemsCount).SetValue(Area3CollectedItemsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area4CollectedItemsCount).SetValue(Area4CollectedItemsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area5CollectedItemsCount).SetValue(Area5CollectedItemsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area6CollectedItemsCount).SetValue(Area6CollectedItemsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area7CollectedItemsCount).SetValue(Area7CollectedItemsCount);
     bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area8CollectedItemsCount).SetValue(Area8CollectedItemsCount);
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.MiscData, ChunkIDs.MissionTime).SetValue((float)MissionTime.TotalSeconds);
 }
Exemple #8
0
 protected override void LoadData(BMSSVFile bmssvFile)
 {
     MaxEnergy                      = (uint)bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.MaxEnergy)?.Value;
     CurrentEnergy                  = (uint)bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.CurrentEnergy)?.Value;
     EnergyReserveTankUnlocked      = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.EnergyReserveTankUnlocked)?.Value);
     IsEnergyReserveTankFull        = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.IsEnergyReserveTankFull)?.Value);
     AeionEnergyReserveTankUnlocked = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.AeionEnergyReserveTankUnlocked)?.Value);
     IsAeionEnergyReserveTankFull   = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.IsAeionEnergyReserveTankFull)?.Value);
     MissileReserveTankUnlocked     = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.MissileReserveTankUnlocked)?.Value);
     IsMissileReserveTankFull       = Convert.ToBoolean(bmssvFile.GetChunk <UInt8Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.IsMissileReserveTankFull)?.Value);
     MetroidsKilled                 = (uint)bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.MetroidsKilled)?.Value;
     GameDifficulty                 = (GameDifficulties)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.UnlockablesGameDifficulty, ChunkIDs.GameDifficulty)?.Value;
     SurfaceCollectedItemsCount     = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.SurfaceCollectedItemsCount)?.Value;
     Area1CollectedItemsCount       = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area1CollectedItemsCount)?.Value;
     Area2CollectedItemsCount       = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area2CollectedItemsCount)?.Value;
     Area3CollectedItemsCount       = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area3CollectedItemsCount)?.Value;
     Area4CollectedItemsCount       = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area4CollectedItemsCount)?.Value;
     Area5CollectedItemsCount       = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area5CollectedItemsCount)?.Value;
     Area6CollectedItemsCount       = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area6CollectedItemsCount)?.Value;
     Area7CollectedItemsCount       = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area7CollectedItemsCount)?.Value;
     Area8CollectedItemsCount       = (uint)bmssvFile.GetChunk <UInt32Chunk>(BlockIDs.MiscData, ChunkIDs.Area8CollectedItemsCount)?.Value;
     MissionTime                    = TimeSpan.FromSeconds((float)bmssvFile.GetChunk <Float32Chunk>(BlockIDs.MiscData, ChunkIDs.MissionTime)?.Value);
 }
 public override void CommitChanges(BMSSVFile bmssvFile)
 {
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.MaxEnergy).SetValue(MaxEnergy);
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.CurrentEnergy).SetValue(CurrentEnergy);
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.MaxAeionEnergy).SetValue(MaxAeionEnergy);
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.CurrentAeionEnergy).SetValue(CurrentAeionEnergy);
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.MaxMissiles).SetValue(MaxMissiles);
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.CurrentMissiles).SetValue(CurrentMissiles);
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.MaxSuperMissiles).SetValue(MaxSuperMissiles);
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.CurrentSuperMissiles).SetValue(CurrentSuperMissiles);
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.MaxPowerBombs).SetValue(MaxPowerBombs);
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.CurrentPowerBombs).SetValue(CurrentPowerBombs);
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.ScanPulse).SetValue(Convert.ToSingle(HasScanPulse));
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.LightningArmor).SetValue(Convert.ToSingle(HasLightningArmor));
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.BeamBurst).SetValue(Convert.ToSingle(HasBeamBurst));
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.PhaseDrift).SetValue(Convert.ToSingle(HasPhaseDrift));
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.ChargeBeam).SetValue(Convert.ToSingle(HasChargeBeam));
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.WaveBeam).SetValue(Convert.ToSingle(HasWaveBeam));
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.SpazerBeam).SetValue(Convert.ToSingle(HasSpazerBeam));
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.PlasmaBeam).SetValue(Convert.ToSingle(HasPlasmaBeam));
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.IceBeam).SetValue(Convert.ToSingle(HasIceBeam));
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.GrappleBeam).SetValue(Convert.ToSingle(HasGrappleBeam));
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.MorphBall).SetValue(Convert.ToSingle(HasMorphBall));
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.MorphBallBomb).SetValue(Convert.ToSingle(HasMorphBallBomb));
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.SpringBall).SetValue(Convert.ToSingle(HasSpringBall));
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.SpiderBall).SetValue(Convert.ToSingle(HasSpiderBall));
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.HighJumpBoots).SetValue(Convert.ToSingle(HasHighJumpBoots));
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.SpaceJump).SetValue(Convert.ToSingle(HasSpaceJump));
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.ScrewAttack).SetValue(Convert.ToSingle(HasScrewAttack));
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.VariaSuit).SetValue(Convert.ToSingle(HasVariaSuit));
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.GravitySuit).SetValue(Convert.ToSingle(HasGravitySuit));
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.TotalMetroids).SetValue(TotalMetroids);
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.MetroidsKilled).SetValue(MetroidsKilled);
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.CurrentMetroidDNA).SetValue(CurrentMetroidDNA);
     bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.BabyMetroid).SetValue(Convert.ToSingle(HasBabyMetroid));
 }
 protected override void LoadData(BMSSVFile bmssvFile)
 {
     MaxEnergy            = (uint)bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.MaxEnergy)?.Value;
     CurrentEnergy        = (uint)bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.CurrentEnergy)?.Value;
     MaxAeionEnergy       = (uint)bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.MaxAeionEnergy)?.Value;
     CurrentAeionEnergy   = (uint)bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.CurrentAeionEnergy).Value;
     MaxMissiles          = (uint)bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.MaxMissiles)?.Value;
     CurrentMissiles      = (uint)bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.CurrentMissiles)?.Value;
     MaxSuperMissiles     = (uint)bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.MaxSuperMissiles)?.Value;
     CurrentSuperMissiles = (uint)bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.CurrentSuperMissiles)?.Value;
     MaxPowerBombs        = (uint)bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.MaxPowerBombs)?.Value;
     CurrentPowerBombs    = (uint)bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.CurrentPowerBombs)?.Value;
     HasScanPulse         = Convert.ToBoolean(bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.ScanPulse)?.Value);
     HasLightningArmor    = Convert.ToBoolean(bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.LightningArmor)?.Value);
     HasBeamBurst         = Convert.ToBoolean(bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.BeamBurst)?.Value);
     HasPhaseDrift        = Convert.ToBoolean(bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.PhaseDrift)?.Value);
     HasChargeBeam        = Convert.ToBoolean(bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.ChargeBeam)?.Value);
     HasWaveBeam          = Convert.ToBoolean(bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.WaveBeam)?.Value);
     HasSpazerBeam        = Convert.ToBoolean(bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.SpazerBeam)?.Value);
     HasPlasmaBeam        = Convert.ToBoolean(bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.PlasmaBeam)?.Value);
     HasIceBeam           = Convert.ToBoolean(bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.IceBeam)?.Value);
     HasGrappleBeam       = Convert.ToBoolean(bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.GrappleBeam)?.Value);
     HasMorphBall         = Convert.ToBoolean(bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.MorphBall)?.Value);
     HasMorphBallBomb     = Convert.ToBoolean(bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.MorphBallBomb)?.Value);
     HasSpringBall        = Convert.ToBoolean(bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.SpringBall)?.Value);
     HasSpiderBall        = Convert.ToBoolean(bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.SpiderBall)?.Value);
     HasHighJumpBoots     = Convert.ToBoolean(bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.HighJumpBoots)?.Value);
     HasSpaceJump         = Convert.ToBoolean(bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.SpaceJump)?.Value);
     HasScrewAttack       = Convert.ToBoolean(bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.ScrewAttack)?.Value);
     HasVariaSuit         = Convert.ToBoolean(bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.VariaSuit)?.Value);
     HasGravitySuit       = Convert.ToBoolean(bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.GravitySuit)?.Value);
     TotalMetroids        = (uint)bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.TotalMetroids)?.Value;
     MetroidsKilled       = (uint)bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.MetroidsKilled)?.Value;
     CurrentMetroidDNA    = (uint)bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.CurrentMetroidDNA)?.Value;
     HasBabyMetroid       = Convert.ToBoolean(bmssvFile.GetChunk <Float32Chunk>(BlockIDs.Inventory, ChunkIDs.BabyMetroid)?.Value);
 }