Esempio n. 1
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);
        }
Esempio n. 2
0
        internal static LodPreset Parse(IniParser parser)
        {
            var result = new LodPreset
            {
                Level     = parser.ParseEnum <LodType>(),
                CpuType   = parser.ParseEnum <CpuType>(),
                MHz       = parser.ParseInteger(),
                GpuType   = parser.ParseEnum <GpuType>(),
                GpuMemory = parser.ParseInteger()
            };

            if (parser.SageGame >= SageGame.Bfme)
            {
                result.Unknown          = parser.ParseInteger();
                result.ResolutionWidth  = parser.ParseInteger();
                result.ResolutionHeight = parser.ParseInteger();
            }
            return(result);
        }