//A data to process. Edited save data should be returned. //Array size depends on the number of slots that specific save takes (Save header (128 bytes) + Number of slots * 8192 bytes). public byte[] editSaveData(byte[] gameSaveData, string saveProductCode) { //Default fps uint gameFPS = 60; //Check if this is a PAL game if (saveProductCode == "SLES-01370") { gameFPS = 50; } //Check if this is a game data, photo or something else switch (gameSaveData[22]) { default: //Unsupported MessageBox.Show("The selected save is not a MGS game data.", pluginName + " " + pluginVersion, MessageBoxButtons.OK, MessageBoxIcon.Information); return(null); case 67: //Photo MessageBox.Show("Photos cannot be edited by this plugin.", pluginName + " " + pluginVersion, MessageBoxButtons.OK, MessageBoxIcon.Information); return(null); case 71: //Game data //Make a new instance of the main window mainWindow mainDialog = new mainWindow(); //Initialize main dialog return(mainDialog.initDialog(pluginName + " " + pluginVersion, gameSaveData, gameFPS)); case 86: //VR training data MessageBox.Show("Training data cannot be edited by this plugin.", pluginName + " " + pluginVersion, MessageBoxButtons.OK, MessageBoxIcon.Information); return(null); } }
//A data to process. Edited save data should be returned. //Array size depends on the number of slots that specific save takes (Save header (128 bytes) + Number of slots * 8192 bytes). public byte[] editSaveData(byte[] gameSaveData, string saveProductCode) { //Make a new instance of the main window mainWindow mainDialog = new mainWindow(); //Initialize main dialog return(mainDialog.initDialog(pluginName + " " + pluginVersion, gameSaveData)); }
//A data to process. Edited save data should be returned. //Array size depends on the number of slots that specific save takes (Save header (128 bytes) + Number of slots * 8192 bytes). public byte[] editSaveData(byte[] gameSaveData, string saveProductCode) { bool japaneseVersion = false; //Check if this is the Japanese version of the game if (saveProductCode == "SCPS-10118") { japaneseVersion = true; } //Make a new instance of the main window mainWindow mainDialog = new mainWindow(); //Initialize main dialog return(mainDialog.initDialog(pluginName + " " + pluginVersion, gameSaveData, japaneseVersion)); }