Esempio n. 1
0
        public SaveInfo(SourceSave saveFile, Game game)
        {
            SaveFile     = saveFile;
            ParseContext = new ParseContext(0);
            Game         = game;
            TickInterval = game switch {
                Game.PORTAL1_3420 => 0.015f,
                Game.PORTAL2 => 1.0f / 60,
                _ => throw new ArgumentOutOfRangeException(nameof(game), game, "invalid game type")
            };
            DeterminedDatamaps = new List <DeterminedDataMap>();

            // should be last
            DataMapGeneratorInfo info = new DataMapGeneratorInfo(game, false);

            if (!CreatedDataMapLists.TryGetValue(info, out SDataMapLookup !))
            {
                SaveParserDataMapGenerator handler = new SaveParserDataMapGenerator(info);
                IDataMapInfoGeneratorHandler.IterateAllGenerators(handler);
                SDataMapLookup            = handler.CompleteDataMapCollection;      // after iteration, this is the result we need
                CreatedDataMapLists[info] = SDataMapLookup;
            }
        }
        public int TokenTableSize;            // token size

        public SourceFileHeader(SourceSave saveRef) : base(saveRef)
        {
        }