예제 #1
0
        private void Load(IReader reader, StructureValueCollection values, MetaAddressConverter addrConverter, IStringIDSource stringIDs, ExpressionTable expressions, BuildInformation buildInfo)
        {
            Name = stringIDs.GetString(new StringID((int)values.GetNumber("name index")));
            ExecutionType = (short)values.GetNumber("execution type");
            ReturnType = (short)values.GetNumber("return type");
            DatumIndex rootExpr = new DatumIndex(values.GetNumber("first expression index"));
            if (rootExpr.IsValid)
                RootExpression = expressions.FindExpression(rootExpr);
            if (Name == null)
                Name = "script_" + rootExpr.Value.ToString("X8");

            Parameters = LoadParameters(reader, values, addrConverter, buildInfo);
        }
예제 #2
0
 public ThirdGenGlobalObject(StructureValueCollection values, IStringIDSource stringIDs)
 {
     Name = stringIDs.GetString(new StringID((int)values.GetNumber("name index")));
     Class = (short)values.GetNumber("type");
     PlacementIndex = (short)values.GetNumber("placement index");
 }