Esempio n. 1
0
        public ThirdGenGlobal(StructureValueCollection values, ExpressionTable allExpressions)
        {
            Name = values.GetString("name");
            Type = (short)values.GetInteger("type");

            DatumIndex valueIndex = new DatumIndex(values.GetInteger("expression index"));
            if (valueIndex.IsValid)
                Value = allExpressions.FindExpression(valueIndex);
        }
Esempio n. 2
0
        private void Load(IReader reader, StructureValueCollection values, FileSegmentGroup metaArea, StringIDSource stringIDs, ExpressionTable expressions, BuildInformation buildInfo)
        {
            Name = stringIDs.GetString(new StringID((int)values.GetInteger("name index")));
            ExecutionType = (short)values.GetInteger("execution type");
            ReturnType = (short)values.GetInteger("return type");
            DatumIndex rootExpr = new DatumIndex(values.GetInteger("first expression index"));
            if (rootExpr.IsValid)
                RootExpression = expressions.FindExpression(rootExpr);
            if (Name == null)
                Name = "script_" + rootExpr.Value.ToString("X8");

            Parameters = LoadParameters(reader, values, metaArea, buildInfo);
        }
 internal void ResolveReferences(ExpressionTable allExpressions)
 {
     if (_nextIndex.IsValid)
         Next = allExpressions.FindExpression(_nextIndex);
 }