예제 #1
0
 private void Load(IReader reader, EngineDescription buildInfo, string buildString)
 {
     _header    = LoadHeader(reader, buildInfo, buildString);
     _tags      = LoadTagTable(reader, buildInfo);
     _fileNames = LoadFileNames(reader, buildInfo);
     _stringIDs = LoadStringIDs(reader, buildInfo);
 }
예제 #2
0
 private void LoadStringIDs(IReader reader)
 {
     if (_header.StringIDCount > 0)
     {
         var stringTable = new IndexedStringTable(reader, _header.StringIDCount, _header.StringIDIndexTable,
                                                  _header.StringIDData, _buildInfo.StringIDKey);
         _stringIds = new IndexedStringIDSource(stringTable, _buildInfo.StringIDs);
     }
 }
예제 #3
0
 private void LoadStringIDs(IReader reader, StringIDNamespaceResolver resolver = null)
 {
     if (_header.StringIDCount > 0)
     {
         var stringTable = new IndexedStringTable(reader, _header.StringIDCount, _header.StringIDIndexTable,
                                                  _header.StringIDData, _buildInfo.StringIDKey);
         _stringIds = new IndexedStringIDSource(stringTable, resolver != null ? resolver : _buildInfo.StringIDs);
     }
 }
예제 #4
0
        private void Load(IReader reader)
        {
            _header    = LoadHeader(reader);
            _tags      = LoadTagTable(reader);
            _fileNames = LoadFileNames(reader);
            _stringIDs = LoadStringIDs(reader);

            LoadLanguageGlobals(reader);
            LoadScriptFiles();
            LoadSimulationDefinitions(reader);
        }
예제 #5
0
        private void Load(IReader reader, EngineDescription buildInfo, string buildString)
        {
            _header    = LoadHeader(reader, buildInfo, buildString);
            _tags      = LoadTagTable(reader, buildInfo);
            _fileNames = LoadFileNames(reader, buildInfo);
            _stringIDs = LoadStringIDs(reader, buildInfo);

            LoadLanguageGlobals(reader);
            LoadScriptFiles();
            LoadSimulationDefinitions(reader);
        }
예제 #6
0
        private void Load(IReader reader)
        {
            _header    = LoadHeader(reader, out uint mask);
            _tags      = LoadTagTable(reader, mask);
            _fileNames = LoadFileNames(reader);

            _stringIDs = LoadStringIDs(reader);

            //header doesn't contain a scenario path, but later engines do so might as well grab it
            ITag scenario = _tags.GetGlobalTag(CharConstant.FromString("scnr"));

            _header.ScenarioName = _fileNames.GetTagName(scenario.Index);

            LoadScriptFiles();
        }
예제 #7
0
        private void Load(IReader reader, EngineDescription buildInfo, string buildString)
        {
            _header    = LoadHeader(reader, buildInfo, buildString);
            _tags      = LoadTagTable(reader, buildInfo);
            _fileNames = LoadFileNames(reader, buildInfo);

            // firstgen has no StringIDs
            _stringIDs = LoadStringIDs(reader, buildInfo);

            // hack to get scenario name
            reader.SeekTo(MetaArea.Offset);
            StructureValueCollection values = StructureReader.ReadStructure(reader, buildInfo.Layouts.GetLayout("meta header"));

            // TODO (Dragon): idk if we should mask this like this
            var scenarioIndex = (int)values.GetInteger("scenario datum index") & 0xFFFF;

            _header.ScenarioName = _fileNames.GetTagName(scenarioIndex);
        }
예제 #8
0
        private void Load(IReader reader)
        {
            _header    = LoadHeader(reader, out uint primaryMask);
            _tags      = LoadTagTable(reader, primaryMask);
            _fileNames = LoadFileNames(reader);
            _stringIDs = LoadStringIDs(reader);

            LoadLanguageGlobals(reader);
            LoadScriptFiles();
            LoadSimulationDefinitions(reader);

            if (string.IsNullOrEmpty(_header.ScenarioName))
            {
                //header didn't contain a scenario path yet, but later engines do so might as well grab it
                ITag scenario = _tags.GetGlobalTag(CharConstant.FromString("scnr"));
                _header.ScenarioName = _fileNames.GetTagName(scenario.Index);
            }
        }
예제 #9
0
		private void LoadStringIDs(IReader reader)
		{
			if (_header.StringIDCount > 0)
			{
				var stringTable = new IndexedStringTable(reader, _header.StringIDCount, _header.StringIDIndexTable,
					_header.StringIDData, _buildInfo.StringIDKey);
				_stringIds = new IndexedStringIDSource(stringTable, _buildInfo.StringIDs);
			}
		}
예제 #10
0
 private void Load(IReader reader, EngineDescription buildInfo, string buildString)
 {
     _header = LoadHeader(reader, buildInfo, buildString);
     _tags = LoadTagTable(reader, buildInfo);
     _fileNames = LoadFileNames(reader, buildInfo);
     _stringIDs = LoadStringIDs(reader, buildInfo);
 }
예제 #11
0
 private void LoadStringIDs(IReader reader)
 {
     if (_header.StringIDCount > 0)
         _stringIds = new IndexedStringIDSource(new IndexedStringTable(reader, _header.StringIDCount, _header.StringIDIndexTable, _header.StringIDData, _buildInfo.StringIDKey), _buildInfo.StringIDResolver);
 }