// JJ2 Fur Patch Generator coded by Neurotic[iT] // Include some libraries to gain access to certain functions. #include #include using namespace std; //Declare the obligatory main function. int main() { // Create the variables string gamever; string playername; string colour1; string colour2; string colour3; string colour4; string playerchar; string playercharhex; string patchdata; string patchdata2; string patchdata3; //Introduce the program. cout << "Welcome to the JJ2 Fur and Name Patch Generator."; // Request the Version, Name, and Character and store in the appropriate variables. cout << "\nVersion:"; cin >> gamever; cout << "Name:"; cin >> playername; cout << "Character:"; cin >> playerchar; //Detect the selected character and load the appropriate hex value to the playercharhex variable. Also prompt for fur colours and store in variables. if ( playerchar == "spaz" ) { playercharhex = "59,00,00,00"; cout << "Main colour:"; cin >> colour1; cout << "Belly colour:"; cin >> colour2; cout << "Gun colour:"; cin >> colour3; cout << "Shoe and armband colour:"; cin >> colour4; } else if ( playerchar == "jazz" ) { playercharhex = "55,00,00,00"; cout << "Main colour:"; cin >> colour1; cout << "Gun colour:"; cin >> colour3; cout << "Headband colour:"; cin >> colour2; cout << "Armband colour:"; cin >> colour4; } //Start preparing to write the patch. patchdata = "Windows Registry Editor Version 5.00"; //Write the appropriate second line for the selected version. if ( gamever == "jj2" ) { patchdata.append("\n[HKEY_CURRENT_USER\\Software\\Epic MegaGames\\Jazz Jackrabbit 2\\1.23\\Player0]"); } else if( gamever == "tsf" ) { patchdata.append("\n[HKEY_CURRENT_USER\\Software\\Epic MegaGames\\Jazz Jackrabbit 2 Secret Files\\1.24\\Player0]"); } //Prepare the rest of the patch file. patchdata.append("\n\"Name\"=\""); patchdata2 = "\n\"Color\"=hex:"; patchdata3 = "\n\"Char\"=hex:"; //Set the output file, and output the collected data in the correct format. ofstream furPatch("furpatch.reg"); furPatch << patchdata << playername << "\"" << patchdata2 << colour1 << "," << colour2 << "," << colour3 << "," << colour4 << patchdata3 << playercharhex << "\n\n"; //Close the output file. furPatch.close(); //Indicate a successful run of the program. return 0; }