public SaveFile( Stream inputstream, string name ) { FileName = name; try { A = new GameSave( inputstream ); B = new GameSave( inputstream ); _tail = GrabTail( inputstream ); } finally { inputstream.Close(); } Latest.PropertyChanged += ( a, e ) => { InvokePropertyChanged( "Latest" ); if( e.PropertyName == "IsDirty" ) InvokePropertyChanged( "IsDirty" ); }; }
public DexEntry( int index, GameSave save ) { _save = save; Index = index; Name = DexNames.Get( (uint) index ); }
public void Setup() { using( var fs = File.OpenRead( "p2.sav" ) ) { _saveA = new GameSave( fs ); } }
public void MakeOwn( GameSave save ) { OriginalTrainerId = save.TrainerId; OriginalTrainerGender = save.Gender; OriginalTrainerName = save.Name; GameOfOrigin = (uint) save.GameTypeGuess; }
public void Merge( GameSave external ) { var ml = Team.Concat( PcBuffer ).ToList(); var externallist = external.Team.Concat( external.PcBuffer ).ToList(); var toadd = externallist.Where( e => !( ml.Any( m => m.MonsterId == e.MonsterId ) ) ).ToList(); var l = LastEmptyIndex( PcBuffer.Count - 1 ); foreach( var entry in toadd ) { if( l == -1 ) break; PcBuffer[l].RawData = entry.RawData; l = LastEmptyIndex( l ); } }