Example #1
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            for (int i = 0; i < m_numEntries; i++)
            {
                HiscoreData hiscoreData = new HiscoreData();
                if (i == NumEntries - 1)
                {
                    HiscoreDataLast hsdl = new HiscoreDataLast();
                    hsdl = (HiscoreDataLast)HiConvert.RawDeserialize(m_data, i * Marshal.SizeOf(typeof(HiscoreData)), typeof(HiscoreDataLast));

                    retString += String.Format("{0}|{1}|{2}|{3}",
                        i + 1,
                        HiConvert.ByteArrayHexToInt(hsdl.Score).ToString().PadLeft(8, '0'),
                        ByteArrayToString(hsdl.Name),
                        GetRound((int)hsdl.Round)) + Environment.NewLine;
                }
                else
                {
                    hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, i * Marshal.SizeOf(typeof(HiscoreData)), typeof(HiscoreData));

                    retString += String.Format("{0}|{1}|{2}|{3}",
                        i + 1,
                        HiConvert.ByteArrayHexToInt(hiscoreData.Score).ToString().PadLeft(8, '0'),
                        ByteArrayToString(hiscoreData.Name),
                        GetRound((int)hiscoreData.Round)) + Environment.NewLine;
                }
            }

            return retString;
        }
Example #2
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}|{1}|{2}|{3}", 1, HiConvert.ByteArrayHexToInt(hiscoreData.Score1), ByteArrayToString(hiscoreData.Name1), hiscoreData.Level1) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 2, HiConvert.ByteArrayHexToInt(hiscoreData.Score2), ByteArrayToString(hiscoreData.Name2), hiscoreData.Level2) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 3, HiConvert.ByteArrayHexToInt(hiscoreData.Score3), ByteArrayToString(hiscoreData.Name3), hiscoreData.Level3) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 4, HiConvert.ByteArrayHexToInt(hiscoreData.Score4), ByteArrayToString(hiscoreData.Name4), hiscoreData.Level4) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 5, HiConvert.ByteArrayHexToInt(hiscoreData.Score5), ByteArrayToString(hiscoreData.Name5), hiscoreData.Level5) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 6, HiConvert.ByteArrayHexToInt(hiscoreData.Score6), ByteArrayToString(hiscoreData.Name6), hiscoreData.Level6) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 7, HiConvert.ByteArrayHexToInt(hiscoreData.Score7), ByteArrayToString(hiscoreData.Name7), hiscoreData.Level7) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 8, HiConvert.ByteArrayHexToInt(hiscoreData.Score8), ByteArrayToString(hiscoreData.Name8), hiscoreData.Level8) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 9, HiConvert.ByteArrayHexToInt(hiscoreData.Score9), ByteArrayToString(hiscoreData.Name9), hiscoreData.Level9) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 10, HiConvert.ByteArrayHexToInt(hiscoreData.Score10), ByteArrayToString(hiscoreData.Name10), hiscoreData.Level10) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 11, HiConvert.ByteArrayHexToInt(hiscoreData.Score11), ByteArrayToString(hiscoreData.Name11), hiscoreData.Level11) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 12, HiConvert.ByteArrayHexToInt(hiscoreData.Score12), ByteArrayToString(hiscoreData.Name12), hiscoreData.Level12) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 13, HiConvert.ByteArrayHexToInt(hiscoreData.Score13), ByteArrayToString(hiscoreData.Name13), hiscoreData.Level13) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 14, HiConvert.ByteArrayHexToInt(hiscoreData.Score14), ByteArrayToString(hiscoreData.Name14), hiscoreData.Level14) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 15, HiConvert.ByteArrayHexToInt(hiscoreData.Score15), ByteArrayToString(hiscoreData.Name15), hiscoreData.Level15) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 16, HiConvert.ByteArrayHexToInt(hiscoreData.Score16), ByteArrayToString(hiscoreData.Name16), hiscoreData.Level16) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 17, HiConvert.ByteArrayHexToInt(hiscoreData.Score17), ByteArrayToString(hiscoreData.Name17), hiscoreData.Level17) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 18, HiConvert.ByteArrayHexToInt(hiscoreData.Score18), ByteArrayToString(hiscoreData.Name18), hiscoreData.Level18) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 19, HiConvert.ByteArrayHexToInt(hiscoreData.Score19), ByteArrayToString(hiscoreData.Name19), hiscoreData.Level19) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 20, HiConvert.ByteArrayHexToInt(hiscoreData.Score20), ByteArrayToString(hiscoreData.Name20), hiscoreData.Level20) + Environment.NewLine;

            return retString;
        }
Example #3
0
        public override void SetHiScore(string[] args)
        {
            int rankGiven = Convert.ToInt32(args[0]);
            int score = System.Convert.ToInt32(args[1]);
            string name = args[2];
            int round = System.Convert.ToInt32(args[3]);

            int rank = NumEntries;
            int offset;

            HiscoreData hiscoreData = new HiscoreData();
            //Do not change the below.
            hiscoreData.Score = HiConvert.IntToByteArrayHex(score, 4);
            hiscoreData.Name = new byte[6];
            hiscoreData.Round = (byte)round;
            HiConvert.ByteArrayCopy(hiscoreData.Name, StringToByteArray(name));
            byte[] byteArray = HiConvert.RawSerialize(hiscoreData);

            #region DETERMINE RANK
            for (int i = 0; i < NumEntries; i++)
            {
                offset = i * Marshal.SizeOf(typeof(HiscoreData));
                byte[] tmp = { m_data[offset], m_data[offset + 1], m_data[offset + 2], m_data[offset + 3] };

                int scoreToCompare = HiConvert.ByteArrayHexToInt(tmp);
                if (score > scoreToCompare)
                {
                    rank = i;
                    break;
                }
            }
            #endregion

            #region ADJUST
            int adjust = -1;
            if (rank < NumEntries - 1)
                adjust = NumEntries - 2;
            for (int i = adjust; i >= 0; i--)
            {
                if (rank > i)
                    break;

                int offsetOldLoc = i * Marshal.SizeOf(typeof(HiscoreData));
                int offsetNewLoc = (i + 1) * Marshal.SizeOf(typeof(HiscoreData));

                for (int j = 0; j < byteArray.Length; j++)
                    m_data[offsetNewLoc + j] = m_data[offsetOldLoc + j];
            }
            #endregion

            #region REPLACE NEW
            if (rank < NumEntries)
            {
                offset = rank * Marshal.SizeOf(typeof(HiscoreData));

                for (int i = 0; i < byteArray.Length; i++)
                    m_data[offset + i] = byteArray[i];
            }
            #endregion
        }
Example #4
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));
            int offset;

            for (int i = 0; i < m_numEntries; i++)
            {
                offset = i * 8; //The size of each score, and name.
                byte[] score = {
                    hiscoreData.EntryArray[offset],
                    hiscoreData.EntryArray[offset + 1],
                    hiscoreData.EntryArray[offset + 2],
                    hiscoreData.EntryArray[offset + 3]};
                byte[] name = {
                    hiscoreData.EntryArray[offset + 4],
                    hiscoreData.EntryArray[offset + 5],
                    hiscoreData.EntryArray[offset + 6] };

                retString += String.Format("{0}|{1}|{2}|{3}",
                    i + 1,
                    HiConvert.ByteArrayHexToInt(score),
                    ByteArrayToString(name),
                    GetArea(Int32.Parse(hiscoreData.EntryArray[offset + 7].ToString("X2")))) + Environment.NewLine;
            }

            return retString;
        }
Example #5
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format(
                         "{0}|{1}|{2}|{3}|{4}|{5}|{6}",
                         1,
                         HiConvert.ByteArrayHexToInt(hiscoreData.Score1) * 10 + HiConvert.ByteArrayHexToInt(hiscoreData.LastScore1),
                         ByteArrayToString(hiscoreData.Name1),
                         AreaToString(HiConvert.ByteArrayHexToInt(hiscoreData.AreaPartA1), HiConvert.ByteArrayHexToInt(hiscoreData.AreaPartB1)),
                         hiscoreData.Character1,
                         hiscoreData.Powerup1,
                         HiConvert.ByteArrayHexToInt(hiscoreData.MaxHit1))
                            + Environment.NewLine;
            retString += String.Format(
                         "{0}|{1}|{2}|{3}|{4}|{5}|{6}",
                         2,
                         HiConvert.ByteArrayHexToInt(hiscoreData.Score2) * 10 + HiConvert.ByteArrayHexToInt(hiscoreData.LastScore2),
                         ByteArrayToString(hiscoreData.Name2),
                         AreaToString(HiConvert.ByteArrayHexToInt(hiscoreData.AreaPartA2), HiConvert.ByteArrayHexToInt(hiscoreData.AreaPartB2)),
                         hiscoreData.Character2,
                         hiscoreData.Powerup2,
                         HiConvert.ByteArrayHexToInt(hiscoreData.MaxHit2))
                            + Environment.NewLine;
            retString += String.Format(
                         "{0}|{1}|{2}|{3}|{4}|{5}|{6}",
                         3,
                         HiConvert.ByteArrayHexToInt(hiscoreData.Score3) * 10 + HiConvert.ByteArrayHexToInt(hiscoreData.LastScore3),
                         ByteArrayToString(hiscoreData.Name3),
                         AreaToString(HiConvert.ByteArrayHexToInt(hiscoreData.AreaPartA3), HiConvert.ByteArrayHexToInt(hiscoreData.AreaPartB3)),
                         hiscoreData.Character3,
                         hiscoreData.Powerup3,
                         HiConvert.ByteArrayHexToInt(hiscoreData.MaxHit3))
                            + Environment.NewLine;
            retString += String.Format(
                         "{0}|{1}|{2}|{3}|{4}|{5}|{6}",
                         4,
                         HiConvert.ByteArrayHexToInt(hiscoreData.Score4) * 10 + HiConvert.ByteArrayHexToInt(hiscoreData.LastScore4),
                         ByteArrayToString(hiscoreData.Name4),
                         AreaToString(HiConvert.ByteArrayHexToInt(hiscoreData.AreaPartA4), HiConvert.ByteArrayHexToInt(hiscoreData.AreaPartB4)),
                         hiscoreData.Character4,
                         hiscoreData.Powerup4,
                         HiConvert.ByteArrayHexToInt(hiscoreData.MaxHit4))
                            + Environment.NewLine;
            retString += String.Format(
                         "{0}|{1}|{2}|{3}|{4}|{5}|{6}",
                         5,
                         HiConvert.ByteArrayHexToInt(hiscoreData.Score5) * 10 + HiConvert.ByteArrayHexToInt(hiscoreData.LastScore5),
                         ByteArrayToString(hiscoreData.Name5),
                         AreaToString(HiConvert.ByteArrayHexToInt(hiscoreData.AreaPartA5), HiConvert.ByteArrayHexToInt(hiscoreData.AreaPartB5)),
                         hiscoreData.Character5,
                         hiscoreData.Powerup5,
                         HiConvert.ByteArrayHexToInt(hiscoreData.MaxHit5))
                            + Environment.NewLine;

            return retString;
        }
Example #6
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}|{1}", HiConvert.ByteArrayHexAsHexToInt(hiscoreData.ScorePart1) * 1000 + HiConvert.ByteArrayHexAsHexToInt(hiscoreData.ScorePart2), ByteArrayToString(hiscoreData.Name)) + Environment.NewLine;

            return retString;
        }
Example #7
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}", ConvertScore(hiscoreData.HiScore)) + Environment.NewLine;

            return retString;
        }
Example #8
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            for (int i = 0; i < NumEntries; i++)
            {
                int rankPointer = Convert.ToInt32(hiscoreData.Ranks[i]);
                switch (rankPointer)
                {
                    case 0x23:
                        retString += String.Format(
                            "{0}|{1}|{2}",
                            i + 1,
                            HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.ScoreE)),
                            ByteArrayToString(hiscoreData.NameE)) + Environment.NewLine;
                        break;
                    case 0x1d:
                        retString += String.Format(
                            "{0}|{1}|{2}",
                            i + 1,
                            HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.ScoreD)),
                            ByteArrayToString(hiscoreData.NameD)) + Environment.NewLine;
                        break;
                    case 0x17:
                        retString += String.Format(
                            "{0}|{1}|{2}",
                            i + 1,
                            HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.ScoreC)),
                            ByteArrayToString(hiscoreData.NameC)) + Environment.NewLine;
                        break;
                    case 0x11:
                        retString += String.Format(
                            "{0}|{1}|{2}",
                            i + 1,
                            HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.ScoreB)),
                            ByteArrayToString(hiscoreData.NameB)) + Environment.NewLine;
                        break;
                    case 0x0b:
                        retString += String.Format(
                            "{0}|{1}|{2}",
                            i + 1,
                            HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.ScoreA)),
                            ByteArrayToString(hiscoreData.NameA)) + Environment.NewLine;
                        break;
                    default:
                        break;
                }
            }

            return retString;
        }
Example #9
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}", HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.HiScore)) * 100) + Environment.NewLine;

            return retString;
        }
Example #10
0
        private int GetLargestScore(HiscoreData hiscoreData)
        {
            int p1 = HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.ScoreP1));
            int p2 = HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.ScoreP2));
            int hi = HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.HiScore));

            if (p1 >= p2 && p1 >= hi)
                return p1;
            else if (p2 >= p1 && p2 >= hi)
                return p2;
            else
                return hi;
        }
Example #11
0
        public override string HiToString()
        {
            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            string retString = AltFormat[0] + Environment.NewLine;
            retString += String.Format("{0}", HiConvert.ByteArrayHexAsHexToInt(hiscoreData.SoloScorePart1) * 10000 + HiConvert.ByteArrayHexAsHexToInt(hiscoreData.SoloScorePart2) * 10) + Environment.NewLine;

            retString += Environment.NewLine + AltFormat[1] + Environment.NewLine;
            retString += String.Format("{0}", HiConvert.ByteArrayHexAsHexToInt(hiscoreData.TeamScorePart1) * 10000 + HiConvert.ByteArrayHexAsHexToInt(hiscoreData.TeamScorePart2) * 10) + Environment.NewLine;

            return retString;
        }
Example #12
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}|{1}", 1, ByteArrayToString(hiscoreData.Score1)) + Environment.NewLine;
            retString += String.Format("{0}|{1}", 2, ByteArrayToString(hiscoreData.Score2)) + Environment.NewLine;
            retString += String.Format("{0}|{1}", 3, ByteArrayToString(hiscoreData.Score3)) + Environment.NewLine;

            return retString;
        }
Example #13
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            List<DisplayData> formatting = new List<DisplayData>();
            formatting.Add(new DisplayData(null, DisplayData.CannedDisplay.AscendingFrom1));
            formatting.Add(new DisplayData(new Regex("^Score.*$"), ConvertScore));
            retString += HTTF.HiToString(hiscoreData, formatting);

            return retString;
        }
Example #14
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;
            int TempScore;
            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            TempScore = HiConvert.ByteArrayHexToInt(hiscoreData.Score1);
            if (TempScore > 0)
                retString += String.Format("{0}|{1}|{2}", 1, TempScore, ByteArrayToString(hiscoreData.Name1)) + Environment.NewLine;

            TempScore = HiConvert.ByteArrayHexToInt(hiscoreData.Score2);
            if (TempScore > 0)
                retString += String.Format("{0}|{1}|{2}", 2, TempScore, ByteArrayToString(hiscoreData.Name2)) + Environment.NewLine;

            TempScore = HiConvert.ByteArrayHexToInt(hiscoreData.Score3);
            if (TempScore > 0)
                retString += String.Format("{0}|{1}|{2}", 3, TempScore, ByteArrayToString(hiscoreData.Name3)) + Environment.NewLine;

            TempScore = HiConvert.ByteArrayHexToInt(hiscoreData.Score4);
            if (TempScore > 0)
                retString += String.Format("{0}|{1}|{2}", 4, TempScore, ByteArrayToString(hiscoreData.Name4)) + Environment.NewLine;

            TempScore = HiConvert.ByteArrayHexToInt(hiscoreData.Score5);
            if (TempScore > 0)
                retString += String.Format("{0}|{1}|{2}", 5, TempScore, ByteArrayToString(hiscoreData.Name5)) + Environment.NewLine;

            TempScore = HiConvert.ByteArrayHexToInt(hiscoreData.Score6);
            if (TempScore > 0)
                retString += String.Format("{0}|{1}|{2}", 6, TempScore, ByteArrayToString(hiscoreData.Name6)) + Environment.NewLine;

            TempScore = HiConvert.ByteArrayHexToInt(hiscoreData.Score7);
            if (TempScore > 0)
                retString += String.Format("{0}|{1}|{2}", 7, TempScore, ByteArrayToString(hiscoreData.Name7)) + Environment.NewLine;

            TempScore = HiConvert.ByteArrayHexToInt(hiscoreData.Score8);
            if (TempScore > 0)
                retString += String.Format("{0}|{1}|{2}", 8, TempScore, ByteArrayToString(hiscoreData.Name8)) + Environment.NewLine;

            TempScore = HiConvert.ByteArrayHexToInt(hiscoreData.Score9);
            if (TempScore > 0)
                retString += String.Format("{0}|{1}|{2}", 9, TempScore, ByteArrayToString(hiscoreData.Name9)) + Environment.NewLine;

            TempScore = HiConvert.ByteArrayHexToInt(hiscoreData.Score10);
            if (TempScore > 0)
                retString += String.Format("{0}|{1}|{2}", 10, TempScore, ByteArrayToString(hiscoreData.Name10)) + Environment.NewLine;

            return retString;
        }
Example #15
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}|{1}|{2}|{3}", 1, HiConvert.ByteArrayHexToInt(hiscoreData.Score1) * 10, ByteArrayToString(hiscoreData.Name1), System.Convert.ToInt32(hiscoreData.Round1.ToString("X2"))) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 2, HiConvert.ByteArrayHexToInt(hiscoreData.Score2) * 10, ByteArrayToString(hiscoreData.Name2), System.Convert.ToInt32(hiscoreData.Round2.ToString("X2"))) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 3, HiConvert.ByteArrayHexToInt(hiscoreData.Score3) * 10, ByteArrayToString(hiscoreData.Name3), System.Convert.ToInt32(hiscoreData.Round3.ToString("X2"))) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 4, HiConvert.ByteArrayHexToInt(hiscoreData.Score4) * 10, ByteArrayToString(hiscoreData.Name4), System.Convert.ToInt32(hiscoreData.Round4.ToString("X2"))) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 5, HiConvert.ByteArrayHexToInt(hiscoreData.Score5) * 10, ByteArrayToString(hiscoreData.Name5), System.Convert.ToInt32(hiscoreData.Round5.ToString("X2"))) + Environment.NewLine;

            return retString;
        }
Example #16
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}|{1}|{2}|{3}", 1, HiConvert.ByteArrayHexToInt(hiscoreData.Score1), ByteArrayToString(new byte[] { hiscoreData.NameFirst1[0], hiscoreData.NameMid1[0], hiscoreData.NameLast1[0] }), (int)hiscoreData.Area1) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 2, HiConvert.ByteArrayHexToInt(hiscoreData.Score2), ByteArrayToString(new byte[] { hiscoreData.NameFirst2[0], hiscoreData.NameMid2[0], hiscoreData.NameLast2[0] }), (int)hiscoreData.Area2) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 3, HiConvert.ByteArrayHexToInt(hiscoreData.Score3), ByteArrayToString(new byte[] { hiscoreData.NameFirst3[0], hiscoreData.NameMid3[0], hiscoreData.NameLast3[0] }), (int)hiscoreData.Area3) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 4, HiConvert.ByteArrayHexToInt(hiscoreData.Score4), ByteArrayToString(new byte[] { hiscoreData.NameFirst4[0], hiscoreData.NameMid4[0], hiscoreData.NameLast4[0] }), (int)hiscoreData.Area4) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 5, HiConvert.ByteArrayHexToInt(hiscoreData.Score5), ByteArrayToString(new byte[] { hiscoreData.NameFirst5[0], hiscoreData.NameMid5[0], hiscoreData.NameLast5[0] }), (int)hiscoreData.Area5) + Environment.NewLine;

            return retString;
        }
Example #17
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}|{1}", 1, HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.Score1)).ToString().PadLeft(6, '0')) + Environment.NewLine;
            retString += String.Format("{0}|{1}", 2, HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.Score2)).ToString().PadLeft(6, '0')) + Environment.NewLine;
            retString += String.Format("{0}|{1}", 3, HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.Score3)).ToString().PadLeft(6, '0')) + Environment.NewLine;
            retString += String.Format("{0}|{1}", 4, HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.Score4)).ToString().PadLeft(6, '0')) + Environment.NewLine;
            retString += String.Format("{0}|{1}", 5, HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.Score5)).ToString().PadLeft(6, '0')) + Environment.NewLine;

            return retString;
        }
Example #18
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}|{1}|{2}", 1, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score1), ByteArrayToString(hiscoreData.Name1)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 2, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score2), ByteArrayToString(hiscoreData.Name2)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 3, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score3), ByteArrayToString(hiscoreData.Name3)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 4, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score4), ByteArrayToString(hiscoreData.Name4)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 5, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score5), ByteArrayToString(hiscoreData.Name5)) + Environment.NewLine;

            return retString;
        }
Example #19
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 1, HiConvert.ByteArrayHexToInt(hiscoreData.Score1) * 10, ByteArrayToString(hiscoreData.Name1), hiscoreData.Level1, hiscoreData.Stars1) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 2, HiConvert.ByteArrayHexToInt(hiscoreData.Score2) * 10, ByteArrayToString(hiscoreData.Name2), hiscoreData.Level2, hiscoreData.Stars2) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 3, HiConvert.ByteArrayHexToInt(hiscoreData.Score3) * 10, ByteArrayToString(hiscoreData.Name3), hiscoreData.Level3, hiscoreData.Stars3) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 4, HiConvert.ByteArrayHexToInt(hiscoreData.Score4) * 10, ByteArrayToString(hiscoreData.Name4), hiscoreData.Level4, hiscoreData.Stars4) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 5, HiConvert.ByteArrayHexToInt(hiscoreData.Score5) * 10, ByteArrayToString(hiscoreData.Name5), hiscoreData.Level5, hiscoreData.Stars5) + Environment.NewLine;

            return retString;
        }
Example #20
0
        public override string HiToString()
        {
            string retString = "RANK|SCORE|NAME|RATING" + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}|{1}|{2}|{3}", 1, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score1Part1) * 10000 + HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score1Part2) * 10, ByteArrayToString(hiscoreData.Name1), GetRating(HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score1Part1) * 10000 + HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score1Part2) * 10)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 2, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score2Part1) * 10000 + HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score2Part2) * 10, ByteArrayToString(hiscoreData.Name2), GetRating(HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score2Part1) * 10000 + HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score2Part2) * 10)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 3, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score3Part1) * 10000 + HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score3Part2) * 10, ByteArrayToString(hiscoreData.Name3), GetRating(HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score3Part1) * 10000 + HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score3Part2) * 10)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 4, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score4Part1) * 10000 + HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score4Part2) * 10, ByteArrayToString(hiscoreData.Name4), GetRating(HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score4Part1) * 10000 + HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score4Part2) * 10)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 5, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score5Part1) * 10000 + HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score5Part2) * 10, ByteArrayToString(hiscoreData.Name5), GetRating(HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score5Part1) * 10000 + HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score5Part2) * 10)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 6, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score6Part1) * 10000 + HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score6Part2) * 10, ByteArrayToString(hiscoreData.Name6), GetRating(HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score6Part1) * 10000 + HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score6Part2) * 10)) + Environment.NewLine;

            return retString;
        }
Example #21
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 1, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score1), ByteArrayToString(new byte[] { hiscoreData.NameFirst1, hiscoreData.NameMid1, hiscoreData.NameLast1 }), GetCharacter((int)hiscoreData.Character1), GetLevel((int)hiscoreData.Level1)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 2, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score2), ByteArrayToString(new byte[] { hiscoreData.NameFirst2, hiscoreData.NameMid2, hiscoreData.NameLast2 }), GetCharacter((int)hiscoreData.Character2), GetLevel((int)hiscoreData.Level2)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 3, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score3), ByteArrayToString(new byte[] { hiscoreData.NameFirst3, hiscoreData.NameMid3, hiscoreData.NameLast3 }), GetCharacter((int)hiscoreData.Character3), GetLevel((int)hiscoreData.Level3)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 4, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score4), ByteArrayToString(new byte[] { hiscoreData.NameFirst4, hiscoreData.NameMid4, hiscoreData.NameLast4 }), GetCharacter((int)hiscoreData.Character4), GetLevel((int)hiscoreData.Level4)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 5, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score5), ByteArrayToString(new byte[] { hiscoreData.NameFirst5, hiscoreData.NameMid5, hiscoreData.NameLast5 }), GetCharacter((int)hiscoreData.Character5), GetLevel((int)hiscoreData.Level5)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 6, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score6), ByteArrayToString(new byte[] { hiscoreData.NameFirst6, hiscoreData.NameMid6, hiscoreData.NameLast6 }), GetCharacter((int)hiscoreData.Character6), GetLevel((int)hiscoreData.Level6)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 7, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score7), ByteArrayToString(new byte[] { hiscoreData.NameFirst7, hiscoreData.NameMid7, hiscoreData.NameLast7 }), GetCharacter((int)hiscoreData.Character7), GetLevel((int)hiscoreData.Level7)) + Environment.NewLine;

            return retString;
        }
Example #22
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            List<DisplayData> formatting = new List<DisplayData>();
            formatting.Add(new DisplayData(null, DisplayData.CannedDisplay.AscendingFrom1));
            formatting.Add(new DisplayData(new Regex("^Score.*$"), HiToStr.Standard));
            formatting.Add(new DisplayData(new Regex("^Name.*$"), HiToStr.ConvertName(tParams)));
            formatting.Add(new DisplayData(new Regex("^Character.*$"), HiToStr.ConvertSwitch(switchMap)));

            retString += HTTF.HiToString(hiscoreData, formatting);

            return retString;
        }
Example #23
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            for (int i = 0; i < m_numEntries; i++)
            {
                HiscoreData hiscoreData = new HiscoreData();
                hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, i * Marshal.SizeOf(typeof(HiscoreData)), typeof(HiscoreData));

                retString += String.Format("{0}|{1}|{2}",
                    i + 1,
                    HiConvert.ByteArrayHexToInt(hiscoreData.Score) * 10,
                    ByteArrayToString(hiscoreData.Name)) + Environment.NewLine;
            }

            return retString;
        }
Example #24
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            for (int i = NumEntries - 1; i >= 0; i--)
            {
                retString += String.Format("{0}|{1}|{2}",
                    NumEntries - i,
                    HiConvert.ByteArrayHexToInt(new byte[] { hiscoreData.ScoreFirst[i], hiscoreData.ScoreMid[i], hiscoreData.ScoreLast[i] }),
                    ByteArrayToString(new byte[] { hiscoreData.NameFirst[i], hiscoreData.NameMid[i], hiscoreData.NameLast[i] })) + Environment.NewLine;
            }

            return retString;
        }
Example #25
0
        public override void EmptyScores()
        {
            byte[] data_converted = DecryptArray(m_data);

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(data_converted, 0, typeof(HiscoreData));

            HiConvert.ByteArrayCopy(hiscoreData.Score1, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Score1.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Score2, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Score2.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Score3, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Score3.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Score4, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Score4.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Score5, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Score5.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Score6, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Score6.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Score7, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Score7.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Score8, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Score8.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Score9, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Score9.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Score10, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Score10.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Score11, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Score11.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Score12, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Score12.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Score13, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Score13.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Score14, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Score14.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Score15, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Score15.Length));

            HiConvert.ByteArrayCopy(hiscoreData.Wins1, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Wins1.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Wins2, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Wins2.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Wins3, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Wins3.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Wins4, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Wins4.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Wins5, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Wins5.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Wins6, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Wins6.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Wins7, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Wins7.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Wins8, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Wins8.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Wins9, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Wins9.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Wins10, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Wins10.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Wins11, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Wins11.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Wins12, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Wins12.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Wins13, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Wins13.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Wins14, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Wins14.Length));
            HiConvert.ByteArrayCopy(hiscoreData.Wins15, HiConvert.IntToByteArrayHexAsHex(0, hiscoreData.Wins15.Length));

            data_converted = HiConvert.RawSerialize(hiscoreData);

            EncryptArray(m_data, data_converted);

            SaveData();
        }
Example #26
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;
            for (int i = NumEntries - 1; i >= 0; i--)
            {
                HiscoreData hiscoreData = new HiscoreData();
                hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, i * Marshal.SizeOf(typeof(HiscoreData)), typeof(HiscoreData));

                retString += String.Format("{0}|{1}|{2}|{3}|{4}",
                    NumEntries - i,
                    HiConvert.ByteArrayHexToInt(hiscoreData.Score),
                    ByteArrayToString(hiscoreData.Name),
                    GetCharacter((int)hiscoreData.Character),
                    GetStage(hiscoreData.Stage)) + Environment.NewLine;
            }

            return retString;
        }
Example #27
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 1, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score1), ByteArrayToString(hiscoreData.Name1), HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Jewels1), HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Level1)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 2, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score2), ByteArrayToString(hiscoreData.Name2), HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Jewels2), HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Level2)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 3, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score3), ByteArrayToString(hiscoreData.Name3), HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Jewels3), HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Level3)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 4, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score4), ByteArrayToString(hiscoreData.Name4), HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Jewels4), HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Level4)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 5, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score5), ByteArrayToString(hiscoreData.Name5), HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Jewels5), HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Level5)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 6, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score6), ByteArrayToString(hiscoreData.Name6), HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Jewels6), HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Level6)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 7, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score7), ByteArrayToString(hiscoreData.Name7), HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Jewels7), HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Level7)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 8, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score8), ByteArrayToString(hiscoreData.Name8), HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Jewels8), HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Level8)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 9, HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Score9), ByteArrayToString(hiscoreData.Name9), HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Jewels9), HiConvert.ByteArrayHexAsHexToInt(hiscoreData.Level9)) + Environment.NewLine;

            return retString;
        }
Example #28
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 1, HiConvert.ByteArrayHexToInt(hiscoreData.Score1), ByteArrayToString(hiscoreData.Name1), hiscoreData.Round1, GetTime(HiConvert.ByteArrayHexToInt(hiscoreData.Time1))) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 2, HiConvert.ByteArrayHexToInt(hiscoreData.Score2), ByteArrayToString(hiscoreData.Name2), hiscoreData.Round2, GetTime(HiConvert.ByteArrayHexToInt(hiscoreData.Time2))) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 3, HiConvert.ByteArrayHexToInt(hiscoreData.Score3), ByteArrayToString(hiscoreData.Name3), hiscoreData.Round3, GetTime(HiConvert.ByteArrayHexToInt(hiscoreData.Time3))) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 4, HiConvert.ByteArrayHexToInt(hiscoreData.Score4), ByteArrayToString(hiscoreData.Name4), hiscoreData.Round4, GetTime(HiConvert.ByteArrayHexToInt(hiscoreData.Time4))) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 5, HiConvert.ByteArrayHexToInt(hiscoreData.Score5), ByteArrayToString(hiscoreData.Name5), hiscoreData.Round5, GetTime(HiConvert.ByteArrayHexToInt(hiscoreData.Time5))) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 6, HiConvert.ByteArrayHexToInt(hiscoreData.Score6), ByteArrayToString(hiscoreData.Name6), hiscoreData.Round6, GetTime(HiConvert.ByteArrayHexToInt(hiscoreData.Time6))) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 7, HiConvert.ByteArrayHexToInt(hiscoreData.Score7), ByteArrayToString(hiscoreData.Name7), hiscoreData.Round7, GetTime(HiConvert.ByteArrayHexToInt(hiscoreData.Time7))) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 8, HiConvert.ByteArrayHexToInt(hiscoreData.Score8), ByteArrayToString(hiscoreData.Name8), hiscoreData.Round8, GetTime(HiConvert.ByteArrayHexToInt(hiscoreData.Time8))) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 9, HiConvert.ByteArrayHexToInt(hiscoreData.Score9), ByteArrayToString(hiscoreData.Name9), hiscoreData.Round9, GetTime(HiConvert.ByteArrayHexToInt(hiscoreData.Time9))) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}|{4}", 10, HiConvert.ByteArrayHexToInt(hiscoreData.Score10), ByteArrayToString(hiscoreData.Name10), hiscoreData.Round10, GetTime(HiConvert.ByteArrayHexToInt(hiscoreData.Time10))) + Environment.NewLine;

            return retString;
        }
Example #29
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}|{1}|{2}", 1, HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.Score1)), ByteArrayToString(hiscoreData.Initials1)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 2, HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.Score2)), ByteArrayToString(hiscoreData.Initials2)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 3, HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.Score3)), ByteArrayToString(hiscoreData.Initials3)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 4, HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.Score4)), ByteArrayToString(hiscoreData.Initials4)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 5, HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.Score5)), ByteArrayToString(hiscoreData.Initials5)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 6, HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.Score6)), ByteArrayToString(hiscoreData.Initials6)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 7, HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.Score7)), ByteArrayToString(hiscoreData.Initials7)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 8, HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.Score8)), ByteArrayToString(hiscoreData.Initials8)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 9, HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.Score9)), ByteArrayToString(hiscoreData.Initials9)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 10, HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.Score10)), ByteArrayToString(hiscoreData.Initials10)) + Environment.NewLine;

            return retString;
        }
Example #30
0
        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}|{1}|{2}", 1, HiConvert.ByteArraySingleBCDToLong(HiConvert.ReverseByteArray(hiscoreData.Score1)) * 10, ByteArrayToString(hiscoreData.Name1)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 2, HiConvert.ByteArraySingleBCDToLong(HiConvert.ReverseByteArray(hiscoreData.Score2)) * 10, ByteArrayToString(hiscoreData.Name2)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 3, HiConvert.ByteArraySingleBCDToLong(HiConvert.ReverseByteArray(hiscoreData.Score3)) * 10, ByteArrayToString(hiscoreData.Name3)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 4, HiConvert.ByteArraySingleBCDToLong(HiConvert.ReverseByteArray(hiscoreData.Score4)) * 10, ByteArrayToString(hiscoreData.Name4)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 5, HiConvert.ByteArraySingleBCDToLong(HiConvert.ReverseByteArray(hiscoreData.Score5)) * 10, ByteArrayToString(hiscoreData.Name5)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 6, HiConvert.ByteArraySingleBCDToLong(HiConvert.ReverseByteArray(hiscoreData.Score6)) * 10, ByteArrayToString(hiscoreData.Name6)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 7, HiConvert.ByteArraySingleBCDToLong(HiConvert.ReverseByteArray(hiscoreData.Score7)) * 10, ByteArrayToString(hiscoreData.Name7)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 8, HiConvert.ByteArraySingleBCDToLong(HiConvert.ReverseByteArray(hiscoreData.Score8)) * 10, ByteArrayToString(hiscoreData.Name8)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 9, HiConvert.ByteArraySingleBCDToLong(HiConvert.ReverseByteArray(hiscoreData.Score9)) * 10, ByteArrayToString(hiscoreData.Name9)) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}", 10, HiConvert.ByteArraySingleBCDToLong(HiConvert.ReverseByteArray(hiscoreData.Score10)) * 10, ByteArrayToString(hiscoreData.Name10)) + Environment.NewLine;

            return retString;
        }