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); }
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); } }
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); } }
private void Load(IReader reader) { _header = LoadHeader(reader); _tags = LoadTagTable(reader); _fileNames = LoadFileNames(reader); _stringIDs = LoadStringIDs(reader); LoadLanguageGlobals(reader); LoadScriptFiles(); LoadSimulationDefinitions(reader); }
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); }
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(); }
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); }
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); } }
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); }