Exemple #1
0
 public static void PatchPsxIso( Stream iso, PatcherLib.Datatypes.STRPatchedByteArray patch )
 {
     ReplaceStrFile( iso, (Sectors)patch.Sector, patch.GetBytes() );
 }
Exemple #2
0
 public static void ApplyPatch( Stream stream, PspIsoInfo info, PatcherLib.Datatypes.PatchedByteArray patch )
 {
     if (patch.SectorEnum != null)
     {
         if (patch.SectorEnum.GetType() == typeof( PspIso.Sectors ))
         {
             stream.WriteArrayToPosition( patch.GetBytes(), (int)(info[(PspIso.Sectors)patch.SectorEnum] * 2048) + patch.Offset );
         }
         else if (patch.SectorEnum.GetType() == typeof( FFTPack.Files ))
         {
             FFTPack.PatchFile( stream, info, (int)((FFTPack.Files)patch.SectorEnum), (int)patch.Offset, patch.GetBytes() );
         }
         else
         {
             throw new ArgumentException( "invalid type" );
         }
     }
 }
Exemple #3
0
 public static void PatchPsxIso( Stream iso, PatcherLib.Datatypes.PatchedByteArray patch )
 {
     if (patch is STRPatchedByteArray)
     {
         PatchPsxIso( iso, (STRPatchedByteArray)patch );
     }
     else
     {
         IsoPatch.PatchFileAtSector( IsoPatch.IsoType.Mode2Form1, iso, true, patch.Sector,
             patch.Offset, patch.GetBytes(), true );
     }
 }