#include <taren.h>
#include <fstream.h>
void main(int argc, char* argv[])
{
	fstream image, patch;
   bool ok=true;

	image.open("hscs.iso",ios::in|ios::out|ios::binary|ios::nocreate);
   if(image.good())
   	cout<<"ISO image opened OK.\n";
   else
   {
   	cout<<"ISO image not found!\n";
      ok=false;
   }

   patch.open("lamour.bin",ios::in|ios::out|ios::binary|ios::nocreate);
   if(patch.good())
   	cout<<"Patch data opened OK.\n";
   else
   {
   	cout<<"Patch data not found!\n";
      ok=false;
   }

   if(!ok)
   	cout<<"One or more errors occurred, aborting.\n";
	else
   {
	   image.seekp(0x22A3DC,ios::beg);
	   char dummy;
	   for(int i=0; i<324; i++)
	   {
	   	patch.get(dummy);
	      image.put(dummy);
	   }

	   image.close();
	   patch.close();
      cout<<"Patch successful!\n";
   }

   cout<<"Press any key to continue.\n";
	getch();
}