public void WriteSaveFile(SavedValues saveFile)
        {
            SavedValues = saveFile;
            // Make some space
            AllocateSaveFileByteArray();

            // Write the header and lead-in
            WriteDeviceSpecificData();
            WriteDeviceAgnosticData();

            // Write the mission data
            WriteMissionData();

            // Write the Kart data
            WriteKartData();

            // Write the Boss data
            WriteBossData();

            // Calculate and write the checksum
            WriteChecksum();

            // Write the save to a file
            CreateSaveFile();
        }
Exemple #2
0
        public void InjestSaveFile(byte[] saveFile)
        {
            SavedValues   = new SavedValues();
            saveFileBytes = saveFile;
            Debug.WriteLine("Save file byte[] length: 0x" + saveFileBytes.Length.ToString("x4"));
            DebugWrite("From save type: " + FromSaveType);
            if (saveFileBytes.Length <= 0)
            {
                Debug.WriteLine("Save file byte[] length <= 0");
            }

            VerifySaveFileType();
            CorrectCustomOffsets();

            ReadDeviceSpecificData();
            ReadDeviceAgnosticData();
            ReadMissionData();
            ReadKartData();
            ReadBossData();
        }