Beispiel #1
0
        internal static ChallengeGenerals Parse(IniParser parser)
        {
            parser.NextToken();

            parser.NextToken(IniTokenType.EndOfLine);

            var result = new ChallengeGenerals();

            while (true)
            {
                if (parser.Current.TokenType == IniTokenType.Identifier && parser.Current.StringValue.ToUpper() == "END")
                {
                    parser.NextToken();
                    break;
                }
                else
                {
                    var personaName = parser.Current.StringValue;

                    parser.NextToken();

                    result.Personas[personaName] = GeneralPersona.Parse(parser);

                    parser.NextTokenIf(IniTokenType.EndOfLine);
                }
            }

            parser.NextTokenIf(IniTokenType.EndOfLine);

            return(result);
        }
Beispiel #2
0
        public static int Parse(IniParser parser)
        {
            parser.NextToken(IniTokenType.Identifier);
            parser.NextToken(IniTokenType.Equals);

            var result = parser.ParseInteger();

            parser.NextToken(IniTokenType.EndOfLine);

            return(result);
        }
Beispiel #3
0
        internal static LodPreset Parse(IniParser parser)
        {
            parser.NextToken(IniTokenType.Identifier);
            parser.NextToken(IniTokenType.Equals);

            var result = new LodPreset
            {
                Level     = parser.ParseEnum <StaticGameLodLevel>(),
                CpuType   = parser.ParseEnum <CpuType>(),
                MHz       = parser.ParseInteger(),
                GpuType   = parser.ParseEnum <GpuType>(),
                GpuMemory = parser.ParseInteger()
            };

            parser.NextTokenIf(IniTokenType.EndOfLine);

            return(result);
        }
Beispiel #4
0
        internal static BenchProfile Parse(IniParser parser)
        {
            parser.NextToken(IniTokenType.Identifier);
            parser.NextToken(IniTokenType.Equals);

            var result = new BenchProfile
            {
                CpuType = parser.ParseEnum <CpuType>(),
                MHz     = parser.ParseInteger(),

                Unknown1 = parser.ParseFloat(),
                Unknown2 = parser.ParseFloat(),
                Unknown3 = parser.ParseFloat()
            };

            parser.NextToken(IniTokenType.EndOfLine);

            return(result);
        }