#include <stdio.h>   // rename, sprintf
#include <process.h> // system

int main(int argc, char* argv[])
{
	char buffer[80], buffer2[80];
    unsigned short i = 0, j = 0;
    
    rename("tiles007.art", "bart07.ar_"); 
    rename("tiles015.art", "bart15.ar_");
    rename("CPART07.AR_", "tiles007.art");
    rename("CPART15.AR_", "tiles015.art");
    
    if (argc > 1)
    {
        for (i = 1; i < argc; i++)
        j += sprintf(buffer + j, "%s ", argv[i] );
        
    }

    sprintf(buffer2, "%s%s%s", "blood.exe ", buffer, " -ini cryptic.ini");

    system (buffer2);

    rename("tiles007.art", "CPART07.AR_"); 
    rename("tiles015.art", "CPART15.AR_"); 
    rename("bart07.ar_", "tiles007.art");
    rename("bart15.ar_", "tiles015.art");
    return 0;
}
