Beispiel #1
0
        public TagBlock(string name, int definitionSize, int maxBlocks, EngineManager.HaloEngine engine, MetaNode[] definition)
            : base(name, (engine == EngineManager.HaloEngine.Halo2 ? 8 : 12), FieldType.TagBlock, engine)
        {
            // Set fields to default values.
            this.definitionSize = definitionSize;
            this.maxBlockCount  = maxBlocks;
            this.definition     = definition;

#if (SANITY_CHECK)
            // Manually compute the definition size.
            int size = 0;
            for (int i = 0; i < definition.Length; i++)
            {
                size += definition[i].FieldSize;
            }

            // Check the computed size and runtime size match.
            if (size != definitionSize)
            {
                // Size mismatch error.
                Console.WriteLine("TagBlock \"{0}\" has definition size mismatch, expected {1} but computed {2}!",
                                  base.Name, definitionSize, size);
            }
#endif
        }
Beispiel #2
0
 public StringId(string name, EngineManager.HaloEngine engine)
     : base(name, FieldSize, FieldType.StringId, engine)
 {
     // Set fields to default values.
     this.handle    = Blam.Objects.DataTypes.string_id._string_id_empty;
     stringConstant = "";
 }
Beispiel #3
0
 public MetaNode(string name, int fieldSize, FieldType fieldType, EngineManager.HaloEngine engine)
 {
     // Set fields.
     this.name      = name;
     this.fieldSize = fieldSize;
     this.fieldType = fieldType;
     this.engine    = engine;
 }
Beispiel #4
0
 public TagReference(string name, string groupTag, EngineManager.HaloEngine engine)
     : base(name, (engine == EngineManager.HaloEngine.Halo2 ? 8 : 16), FieldType.TagReference, engine)
 {
     this.groupTag = groupTag;
 }