internal static IntRange Parse(IniParser parser) { return(new IntRange { Low = parser.ParseInteger(), High = parser.ParseInteger() }); }
internal static Substitution Parse(IniParser parser) { return(new Substitution { Size = parser.ParseInteger(), ReplacementFontSize = parser.ParseInteger(), ReplacementFontName = parser.ParseString() }); }
internal static LodPreset Parse(IniParser parser) { return(new LodPreset { Level = parser.ParseEnum <GameLodType>(), CpuType = parser.ParseEnum <CpuType>(), MHz = parser.ParseInteger(), GpuType = parser.ParseEnum <GpuType>(), GpuMemory = parser.ParseInteger() }); }
//represents values of type 1 : 1024 etc. internal static Probability Parse(IniParser parser) { var first = parser.ParseInteger(); var colon = parser.GetNextToken(); var second = parser.ParseInteger(); return(new Probability { First = first, Second = second }); }
internal static RgbColorKeyframe Parse(IniParser parser) { return(new RgbColorKeyframe { Color = IniColorRgb.Parse(parser), Time = parser.ParseInteger() }); }
internal static TerrainObject Parse(IniParser parser) { return(new TerrainObject { Name = parser.ParseAssetReference(), Unknown = parser.ParseInteger() }); }
internal static AttackPriorityTarget Parse(IniParser parser) { return(new AttackPriorityTarget { Target = parser.ParseAssetReference(), Value = parser.ParseInteger() }); }
internal static Bonus Parse(IniParser parser) { return(new Bonus { ID = parser.ParseInteger(), Armor = parser.ParseAttributePercentage("Armor") }); }
internal static AutoResolveReinforcementSchedule Parse(IniParser parser) { return(parser.ParseNamedBlock( (x, name) => x.Name = name, FieldParseTable, new IniArbitraryFieldParserProvider <AutoResolveReinforcementSchedule>( (x, id) => x.ArmyAvailableAt.Add(parser.ParseInteger())))); }
internal static RandomAlphaKeyframe Parse(IniParser parser) { return(new RandomAlphaKeyframe { Low = parser.ParseFloat(), High = parser.ParseFloat(), Time = parser.ParseInteger() }); }
internal static IniFont Parse(IniParser parser) { return(new IniFont { FontName = parser.ParseQuotedString(), Size = parser.ParseInteger(), Bold = parser.ParseBoolean() }); }
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); }
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); }
public static int Parse(IniParser parser) { parser.NextToken(IniTokenType.Identifier); parser.NextToken(IniTokenType.Equals); var result = parser.ParseInteger(); parser.NextToken(IniTokenType.EndOfLine); return(result); }
internal static BenchProfile Parse(IniParser parser) { var result = new BenchProfile { CpuType = parser.ParseEnum <CpuType>(), MHz = parser.ParseInteger(), Unknown1 = parser.ParseFloat(), Unknown2 = parser.ParseFloat(), Unknown3 = parser.ParseFloat() }; return(result); }
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); }