• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Meta.Meta类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中HaloMap.Meta.Meta的典型用法代码示例。如果您正苦于以下问题:C# Meta类的具体用法?C# Meta怎么用?C# Meta使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Meta类属于HaloMap.Meta命名空间,在下文中一共展示了Meta类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: MetaEditorControlPage

        public MetaEditorControlPage(Meta meta, MapForms.MapForm mapForm)
        {
            InitializeComponent();

            // Try to draw treeview nodes to "hide" "disabled" nodes; fail. Still leaves space where node is
            //treeViewTagReflexives.DrawMode = TreeViewDrawMode.OwnerDrawAll;
            //treeViewTagReflexives.DrawNode += new DrawTreeNodeEventHandler(myTreeView_DrawNode);

            this.MapForm = mapForm;
            this.map = mapForm.map;

            this.meta = meta;
            this.BR = new BinaryReader(meta.MS);
            // Create a backup of the Tags memory stream, for restoring, comparing, etc
            msBackup = new MemoryStream(meta.MS.ToArray());
            msDebug = new MemoryStream((int)meta.MS.Length);

            mainReflexive = createReflexiveList();  // Done
            refreshTreeListing(mainReflexive);      // Done

            this.treeViewTagReflexives.Sort();
            treeViewTagReflexives.SelectedNode = treeViewTagReflexives.Nodes[0];
            // Default Peek/Poke to "Single Value"
            this.tscbApplyTo.SelectedIndex = 0;
        }
开发者ID:troymac1ure,项目名称:Entity,代码行数:25,代码来源:MetaEditorControlPage.cs


示例2: DataValues

 public DataValues(Meta meta, string iEntName, Map map, int iOffsetInChunk, IFPIO.ObjectEnum type, int iLineNumber)
 {
     this.meta = meta;
     this.LineNumber = iLineNumber;
     this.chunkOffset = iOffsetInChunk;
     this.map = map;
     this.EntName = iEntName;
     InitializeComponent();
     this.Dock = DockStyle.Top;
     this.Controls[0].Text = EntName;
     this.Controls[2].Text = type.ToString();
     this.ValueType = type;
     switch (this.ValueType)
     {
         case IFPIO.ObjectEnum.Byte:
             this.size = 1;
             break;
         case IFPIO.ObjectEnum.Short:
         case IFPIO.ObjectEnum.UShort:
             this.size = 2;
             break;
         case IFPIO.ObjectEnum.Int:
         case IFPIO.ObjectEnum.UInt:
         case IFPIO.ObjectEnum.Float:
         case IFPIO.ObjectEnum.Unknown:
             this.size = 4;
             break;
         case IFPIO.ObjectEnum.Unused:
             this.size = 0;
             break;
     }
     this.AutoSize = false;
 }
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:33,代码来源:DataValues.cs


示例3: H2ParsedPRTM

        /// <summary>
        /// The h 2 parsed prtm.
        /// </summary>
        /// <param name="meta">The meta.</param>
        /// <remarks></remarks>
        public void H2ParsedPRTM(ref Meta meta)
        {
            string[] temps = meta.name.Split('\\');
            name = temps[temps.Length - 1];

            BoundingBox = new BoundingBoxContainer();

            BinaryReader BR = new BinaryReader(meta.MS);

            RawDataMetaChunks = new RawDataMetaChunk[1];
            RawDataMetaChunks[0] = new PRTMRawDataMetaChunk(ref meta);

            BR.BaseStream.Position = 28;
            int tempshad = BR.ReadInt32();
            int shadid = meta.Map.Functions.ForMeta.FindMetaByID(tempshad);
            Shaders = new ShaderContainer();
            Shaders.Shader = new ShaderInfo[1];
            Shaders.Shader[0] = new ShaderInfo(shadid, meta.Map);

            // LOD = new LODInfo(ref meta, meta.Map, ref RawDataMetaChunks);
            Display = new DisplayedInfo();
            Display.Chunk.Add(0);
            Display.ShaderIndex = new int[1];
            Display.ShaderIndex[0] = 0;

            // MessageBox.Show("test");
        }
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:32,代码来源:PRTMModel.cs


示例4: argb_color

        /// <summary>
        /// Creates a color wheel with associated (A)RGB text boxes
        /// </summary>
        /// <param name="meta"></param>
        /// <param name="iEntName">Control display name</param>
        /// <param name="map"></param>
        /// <param name="iOffsetInChunk"></param>
        /// <param name="hasAlphaChannel">True if ARGB, False for RGB</param>
        /// <param name="valueType">Float for 0f-1f, Int for 0-255</param>
        /// <param name="iLineNumber"></param>
        public argb_color(Meta meta, string iEntName, Map map, int iOffsetInChunk, bool hasAlphaChannel, IFPIO.ObjectEnum valueType,int iLineNumber)
        {
            InitializeComponent();

            this.meta = meta;
            this.LineNumber = iLineNumber;
            this.chunkOffset = iOffsetInChunk;
            this.map = map;
            this.EntName = " " + iEntName + " ";
            this.Dock = DockStyle.Top;
            this.Controls[0].Text = EntName;
            this.hasAlpha = hasAlphaChannel;
            this.ValueType = valueType;
            switch (valueType)
            {
                case IFPIO.ObjectEnum.Byte:
                    this.eachSize = 1;
                    break;
                case IFPIO.ObjectEnum.Short:
                case IFPIO.ObjectEnum.UShort:
                    this.eachSize = 2;
                    break;
                case IFPIO.ObjectEnum.Int:
                case IFPIO.ObjectEnum.UInt:
                case IFPIO.ObjectEnum.Float:
                case IFPIO.ObjectEnum.Unknown:
                    this.eachSize = 4;
                    break;
            }
            this.size = (hasAlpha ? eachSize * 4 : eachSize * 3);

            CW = new ColorWheel();
            CW.Location = new Point(180, 5);

            Red = new DataValues(meta, "Red", map, iOffsetInChunk, valueType, iLineNumber);
            Red.BackColor = System.Drawing.Color.DarkRed;
            CW.setTextBox(Red.textBox1, Color.Red);

            Blue = new DataValues(meta, "Blue", map, iOffsetInChunk + eachSize, valueType, iLineNumber);
            Blue.BackColor = System.Drawing.Color.DarkBlue;
            CW.setTextBox(Blue.textBox1, Color.Blue);

            Green = new DataValues(meta, "Green", map, iOffsetInChunk + eachSize * 2, valueType, iLineNumber);
            Green.BackColor = System.Drawing.Color.FromArgb(10, 80, 35);
            CW.setTextBox(Green.textBox1, Color.Green);

            if (hasAlpha)
            {
                Alpha = new DataValues(meta, "Alpha", map, iOffsetInChunk + eachSize * 3, valueType, iLineNumber);
                Alpha.BackColor = System.Drawing.Color.Gray;
                CW.setTextBox(Alpha.textBox1, Color.White);
                gbRGBColor.Controls.Add(Alpha);
            }

            gbRGBColor.Controls.Add(CW);
            CW.BringToFront();
            gbRGBColor.Controls.Add(Green);
            gbRGBColor.Controls.Add(Blue);
            gbRGBColor.Controls.Add(Red);
        }
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:70,代码来源:rgb_color.cs


示例5: Enums

 public Enums(Meta meta, string iEntName, Map map, int iOffsetInChunk, int iType, object[] ioptions, int iLineNumber)
 {
     this.meta = meta;
     this.LineNumber = iLineNumber;
     this.Options = ioptions;
     this.enumType = iType;
     this.size = iType / 8;
     this.chunkOffset = iOffsetInChunk;
     this.map = map;
     this.EntName = iEntName;
     InitializeComponent();
     this.Size = this.PreferredSize;
     this.Dock = DockStyle.Top;
     this.Controls[0].Text = EntName;
     switch (iType)
     {
         case 8:
             {
                 this.Controls[2].Text = "Enum8";
                 break;
             }
         case 16:
             {
                 this.Controls[2].Text = "Enum16";
                 break;
             }
         case 32:
             {
                 this.Controls[2].Text = "Enum32";
                 break;
             }
     }
     this.AutoSize = false;
 }
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:34,代码来源:Enums.cs


示例6: GetFramesFromHalo2Model

        /// <summary>
        /// The get frames from halo 2 model.
        /// </summary>
        /// <param name="meta">The meta.</param>
        /// <remarks></remarks>
        public void GetFramesFromHalo2Model(ref Meta meta)
        {
            BinaryReader BR = new BinaryReader(meta.MS);
            BR.BaseStream.Position = 72;
            int tempc = BR.ReadInt32();
            int tempr = BR.ReadInt32() - meta.magic - meta.offset;
            for (int x = 0; x < tempc; x++)
            {
                FrameInfo f = new FrameInfo();
                BR.BaseStream.Position = tempr + (96 * x);
                f.Name = meta.Map.Strings.Name[BR.ReadUInt16()];
                BR.ReadUInt16();
                f.Parent = BR.ReadInt16();
                f.Child = BR.ReadInt16();
                f.Sibling = BR.ReadInt16();
                BR.BaseStream.Position = tempr + (96 * x) + 12;
                f.x = BR.ReadSingle();
                f.y = BR.ReadSingle();
                f.z = BR.ReadSingle();
                f.i = BR.ReadSingle();
                f.j = BR.ReadSingle();
                f.k = BR.ReadSingle();
                f.w = BR.ReadSingle();
                f.matrix = Matrix.Identity;

                Quaternion q = new Quaternion(f.i, f.j, f.k, f.w);
                f.matrix.Multiply(Matrix.Translation(f.x, f.y, f.z));
                f.matrix.RotateQuaternion(q);

                BR.ReadSingle();

                f.skinweightmatrix = Matrix.Identity;
                f.skinweightmatrix.M11 = BR.ReadSingle();
                f.skinweightmatrix.M12 = BR.ReadSingle();
                f.skinweightmatrix.M13 = BR.ReadSingle();
                f.skinweightmatrix.M14 = 0.0f;

                f.skinweightmatrix.M21 = BR.ReadSingle();
                f.skinweightmatrix.M22 = BR.ReadSingle();
                f.skinweightmatrix.M23 = BR.ReadSingle();
                f.skinweightmatrix.M24 = 0.0f;

                f.skinweightmatrix.M31 = BR.ReadSingle();
                f.skinweightmatrix.M32 = BR.ReadSingle();
                f.skinweightmatrix.M33 = BR.ReadSingle();
                f.skinweightmatrix.M34 = 0.0f;

                f.skinweightmatrix.M41 = BR.ReadSingle();
                f.skinweightmatrix.M42 = BR.ReadSingle();
                f.skinweightmatrix.M43 = BR.ReadSingle();
                f.skinweightmatrix.M44 = 1.0f;

                f.DistanceFromParent = BR.ReadSingle();

                // f.matrix.MultiplyTranspose(f.skinweightmatrix);//=Matrix.Transformation(new Vector3(0, 0, 0), new Quaternion(),new Vector3(1,1,1), new Vector3(0, 0, 0), q, new Vector3(f.x, f.y, f.z));
                Frame.Add(f);
            }
        }
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:63,代码来源:FrameHierarchy.cs


示例7: loadMeta

        public void loadMeta(Meta meta, HaloVersionEnum HaloVersion, string FileName)
        {
            this.fileName = fileName;
            this.HaloVersion = HaloVersion;
            this.meta = meta;

            loadFile();

            createTreeListing();
        }
开发者ID:nolenfelten,项目名称:Entity,代码行数:10,代码来源:TagTreeView.cs


示例8: BuildMeta

        /// <summary>
        /// The build meta.
        /// </summary>
        /// <param name="metasplit">The metasplit.</param>
        /// <param name="map">The map.</param>
        /// <returns></returns>
        /// <remarks></remarks>
        public static Meta BuildMeta(MetaSplitter metasplit, Map map)
        {
            metasize = 0;
            MetaStream = new MemoryStream(metasplit.Header.chunksize);
            BinaryWriter BW = new BinaryWriter(MetaStream);

            // BW.BaseStream.Position = 0;
            // BW.Write(metasplit.Header.MS.ToArray(), 0, metasplit.Header.chunksize);
            metasize += metasplit.Header.chunksize;

            TagIndex = metasplit.TagIndex;

            Meta m = new Meta(map);

            List<Meta.Item> NewItems = new List<Meta.Item>();

            // Major error here! Size is not calculated right!
            RecursivelyAddPiecesToMeta(metasplit.Header, ref NewItems, ref BW);

            m.items = NewItems;
            if (MetaStream.Length % 4 != 0)
            {
                metasize += (int)MetaStream.Length % 4;
                MetaStream.SetLength(MetaStream.Length + MetaStream.Length % 4);
            }

            m.MS = MetaStream;
            m.size = metasize;
            m.type = metasplit.type;
            m.name = metasplit.name;
            m.rawType = metasplit.rawtype;
            m.raw = metasplit.raw;
            m.magic = metasplit.magic;
            m.offset = metasplit.offset;

            m.TagIndex = TagIndex;
            m.RelinkReferences();
            m.WriteReferences();

            // m.items.Clear();
            // MetaScanner Ms = new MetaScanner();
            if (m.rawType != RawDataContainerType.Empty)
            {
                map.OpenMap(MapTypes.Internal);
                m.raw = map.Functions.ForMeta.ReadRaw(m.TagIndex, false);
                map.CloseMap();
            }

            // map.OpenMap(MapTypes.Internal);
            // IFPIO ifp=IFP.IFPHashMap.GetIfp(m.type);
            // m.parsed = true;
            // Ms.ScanWithIFP(ref ifp, ref m, map) ;
            // map.CloseMap();
            return m;
        }
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:62,代码来源:MetaBuilder.cs


示例9: StringBox

 public StringBox(Meta meta, string iEntName, Map map, int iOffsetInChunk, int iLineNumber, int chunkCount)
 {
     this.meta = meta;
     this.LineNumber = iLineNumber;
     this.chunkOffset = iOffsetInChunk;
     this.map = map;
     this.EntName = iEntName;
     this.size = chunkCount;
     InitializeComponent();
     this.Size = this.PreferredSize;
     this.Dock = DockStyle.Top;
     this.label3.Text = EntName;
     this.AutoSize = false;
 }
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:14,代码来源:StringBox.cs


示例10: ParsedBitmap

 /// <summary>
 /// Initializes a new instance of the <see cref="ParsedBitmap"/> class.
 /// </summary>
 /// <param name="meta">The meta.</param>
 /// <param name="map">The map.</param>
 /// <remarks></remarks>
 public ParsedBitmap(ref Meta meta, Map map)
 {
     BitmapHeader = new HaloBitmapHeader(ref meta);
     switch (map.HaloVersion)
     {
         case HaloVersionEnum.Halo2:
         case HaloVersionEnum.Halo2Vista:
             ReadH2ParsedBitmap(ref meta);
             break;
         case HaloVersionEnum.HaloCE:
         case HaloVersionEnum.Halo1:
             ReadCEParsedBitmap(ref meta);
             break;
     }
 }
开发者ID:troymac1ure,项目名称:Entity,代码行数:21,代码来源:ParsedBitmap.cs


示例11: Add

        /// <summary>
        /// The add.
        /// </summary>
        /// <param name="tagIndex">Index of the tag.</param>
        /// <param name="metasplit">The metasplit.</param>
        /// <remarks></remarks>
        public void Add(int tagIndex, MetaSplitter metasplit)
        {
            // TagIndex - Global Variable
            this.TagIndex = tagIndex;

            ArrayList metas = new ArrayList(0);

            for (int x = 0; x < map.IndexHeader.metaCount; x++)
            {
                // sender.setProgressBar(x / map.IndexHeader.metaCount);
                Meta m = new Meta(map);
                m.ReadMetaFromMap(x, true);

                // Read meta layout of TAG from .ENT file
                IFPIO ifpx = IFPHashMap.GetIfp(m.type, map.HaloVersion);

                m.headersize = ifpx.headerSize;

                if (m.type == "sbsp")
                {
                }
                else
                {
                    // anything but "sbsp"
                    m.scanner.ScanWithIFP(ref ifpx);

                    // metaScanner.ScanManually(ref m, ref map);
                }

                metas.Add(m);
            }

            // sender.setProgressBar(0);
            Meta targetTag = (Meta)metas[tagIndex];

            Meta tempm = MetaBuilder.BuildMeta(metasplit, map); // (Meta) metas[TagIndex];
            metas[tagIndex] = tempm;

            // ((Meta)metas[TagIndex]).RelinkReferences(map);
            SizeOfShift = tempm.size - targetTag.size;

            // Map IS already open? I guess it's a safety check.
            map.OpenMap(MapTypes.Internal);
            FixReflexives(metas);

            map.CloseMap();
        }
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:53,代码来源:ChunkAdder.cs


示例12: EntStrings

 /// <summary>
 /// Creates a new EntStrings class for a set-length unicode or ASCII string.
 /// </summary>
 /// <param name="meta">The controls meta data</param>
 /// <param name="iEntName">The identifying name of the meta string</param>
 /// <param name="map">The metas map file</param>
 /// <param name="iOffsetInChunk">The offset to the string in the memory stream</param>
 /// <param name="ilength">The set length of the string (usually 32, 64 or 256, but will handle any length strings)</param>
 /// <param name="itype">Set to false for ASCII strings, true for Unicode (UTF-8) strings</param>
 /// <param name="iLineNumber">The associated line number</param>
 public EntStrings(Meta meta, string iEntName, Map map, int iOffsetInChunk, int ilength, bool itype, int iLineNumber)
 {
     this.meta = meta;
     this.LineNumber = iLineNumber;
     this._entUnicode = itype;
     this._length = ilength;
     this.size = this._length;
     this.map = map;
     this.EntName = iEntName;
     this.chunkOffset = iOffsetInChunk;
     InitializeComponent();
     this.label2.Text = EntName;
     this.Dock = DockStyle.Top;
     this.Size = this.PreferredSize;
     this.AutoSize = false;
     this.Leave += new EventHandler(String_Leave);
 }
开发者ID:troymac1ure,项目名称:Entity,代码行数:27,代码来源:EntStrings.cs


示例13: MetaEditorControlPage

        public MetaEditorControlPage(Meta meta, MapForms.MapForm mapForm)
        {
            InitializeComponent();

            this.MapForm = mapForm;
            this.map = mapForm.map;

            this.meta = meta;
            this.BR = new BinaryReader(meta.MS);
            // Create a backup of the Tags memory stream, for restoring, comparing, etc
            msBackup = new MemoryStream(meta.MS.ToArray());
            msDebug = new MemoryStream((int)meta.MS.Length);

            createTreeListing();
            this.treeViewTagReflexives.Sort();
            treeViewTagReflexives.SelectedNode = treeViewTagReflexives.Nodes[0];
        }
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:17,代码来源:MetaEditorControlPage.cs


示例14: SID

        public SID(Meta meta, string iEntName, Map map, int iOffsetInChunk,int iLineNumber)
        {
            this.meta = meta;
            this.LineNumber = iLineNumber;
            this.chunkOffset = iOffsetInChunk;
            this.map = map;
            this.EntName = iEntName;
            this.size = 4;
            InitializeComponent();
            this.Size = this.PreferredSize;
            this.Dock = DockStyle.Top;
            this.Controls[0].Text = EntName;
            this.AutoSize = false;

            //this.comboBox1.DataSource = map.Strings.Name;
            this.comboBox1.DataSource = null;    // Loading data source takes a long time. Only do it when needed.
        }
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:17,代码来源:SID.cs


示例15: SplitWithIFP

        /// <summary>
        /// The split with ifp.
        /// </summary>
        /// <param name="ifp">The ifp.</param>
        /// <param name="meta">The meta.</param>
        /// <param name="map">The map.</param>
        /// <remarks></remarks>
        public void SplitWithIFP(ref IFPIO ifp, ref Meta meta, Map map)
        {
            this.type = meta.type;
            this.TagIndex = meta.TagIndex;
            this.name = meta.name;
            this.offset = meta.offset;
            this.magic = meta.magic;
            this.raw = meta.raw;
            this.rawtype = meta.rawType;
            map.OpenMap(MapTypes.Internal);
            if (ifp.items != null)
            {
                map.BR.BaseStream.Position = meta.offset;
                Header = new SplitReflexive();
                Header.offset = 0;
                Header.Chunks = new List<SplitReflexive>();
                Header.translation = 0;

                // Header.MS = new MemoryStream(ifp.headerSize);
                // Header.MS.Write(map.BR.ReadBytes(ifp.headerSize), 0, ifp.headerSize);
                Header.chunksize = ifp.headerSize;
                Header.chunkcount = 1;
                Header.splitReflexiveType = SplitReflexive.SplitReflexiveType.Container;
                Header.realtranslation = meta.offset;
                if (meta.type == "sbsp")
                {
                    int p = map.BSP.FindBSPNumberByBSPIdent(meta.ident);
                    CycleElements(
                        ref Header, ifp.items, ref meta, meta.offset, map, meta.TagIndex, map.BSP.sbsp[p].magic);
                }
                else if (meta.type == "ltmp")
                {
                    int p = map.BSP.FindBSPNumberByLightMapIdent(meta.ident);
                    CycleElements(
                        ref Header, ifp.items, ref meta, meta.offset, map, meta.TagIndex, map.BSP.sbsp[p].magic);
                }
                else
                {
                    // not "sbsp" or "ltmp"
                    CycleElements(ref Header, ifp.items, ref meta, meta.offset, map, meta.TagIndex, map.SecondaryMagic);
                }
            }

            map.CloseMap();
        }
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:52,代码来源:MetaSplitter.cs


示例16: MetaItemComparer

        /// <summary>
        /// Initializes a new instance of the <see cref="MetaItemComparer"/> class.
        /// </summary>
        /// <param name="currentForm">The current form.</param>
        /// <remarks></remarks>
        public MetaItemComparer(MapForm currentForm)
        {
            Map map = currentForm.map;

            int counter = 0;
            for (counter = 0; counter < map.MapHeader.fileCount; counter++)
            {
                currentForm.SetProgressBar(counter * 100 / map.MapHeader.fileCount);

                ifpMeta = new Meta(map);
                manualMeta = new Meta(map);
                manualMeta.ReadMetaFromMap(counter, false);
                ifpMeta.ReadMetaFromMap(counter, false);

                // parse ifp and scan meta with it
                try
                {
                    IFPIO io = IFPHashMap.GetIfp(ifpMeta.type, map.HaloVersion);

                    ifpMeta.headersize = io.headerSize;
                    manualMeta.headersize = io.headerSize;
                    try
                    {
                        ifpMeta.scanner.ScanWithIFP(ref io);
                    }
                    catch (Exception ex)
                    {
                        Global.ShowErrorMsg("Broken IFP - " + ifpMeta.type, ex);
                    }

                    manualMeta.scanner.ScanManually();
                    check(map);
                }
                catch (Exception ex)
                {
                    Globals.Global.ShowErrorMsg(string.Empty, ex);
                }

            }

            currentForm.SetProgressBar(0);
        }
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:47,代码来源:MetaItemComparer.cs


示例17: Ident

        /// <summary>
        /// The (Tag Type &) Ident Class
        /// </summary>
        /// <param name="meta">The controls meta data</param>
        /// <param name="iEntName">The identifying name of the meta string</param>
        /// <param name="map">The metas map file</param>
        /// <param name="iOffsetInChunk">The offset to the string in the memory stream</param>
        /// <param name="idoesHaveTagType">States whether there is a preceding Tag Type or just an Ident</param>
        /// <param name="iLineNumber">The associated line number</param>
        public Ident(Meta meta, string iEntName, Map map, int iOffsetInChunk, bool idoesHaveTagType, int iLineNumber)
        {
            InitializeComponent();
            this.meta = meta;
            this.LineNumber = iLineNumber;
            this.doesHaveTagType = idoesHaveTagType;

            // Even though !iDoesHaveTagType does not save a Tag Type, it is still loaded through the Ident
            if (!idoesHaveTagType)
                this.label1.Text = "Ident";
            this.size = 4 + (this.doesHaveTagType ? 4 : 0);
            this.map = map;
            this.EntName = iEntName;
            // Offset - 4 to account for Tag Type if applicable
            this.chunkOffset = iOffsetInChunk - (idoesHaveTagType ? 4 : 0);
            this.label4.Text = EntName;
            this.Dock = DockStyle.Top;
            //this.Size = this.PreferredSize;
            this.AutoSize = false;
        }
开发者ID:troymac1ure,项目名称:Entity,代码行数:29,代码来源:Ident.cs


示例18: addNewTab

        /// <summary>
        /// Opens a new tab and loads the meta into it
        /// </summary>
        /// <param name="meta">The meta to load into the new tab</param>
        /// <param name="allowDuplicate">if false, will look for a tab with the same meta and activate.
        /// if true, will open a new tab with a duplicated meta</param>
        /// <returns>Page Number of active tab</returns>
        public int addNewTab( Meta meta, bool allowDuplicate)
        {
            string typeAndTag = "[" + meta.type.ToLower() + "] " + meta.name.Substring(meta.name.LastIndexOf('\\') + 1);

            if (!allowDuplicate)
                for (int i = 0; i < this.tabs.Tabs.Count; i++)
                    if (this.tabs.Tabs[i].Text == typeAndTag)
                    {
                        this.tabs.SelectedTabIndex = i;
                        //this.tabs.SelectedTab.Focus();
                        return i;
                    }

            MetaEditorControlPage mecp = new MetaEditorControlPage(meta, mapForm);
            this.BackColor = bgColor;
            this.ForeColor = fgColor;
            mecp.setFormColors(fgColor, bgColor);

            // mapName = map.filePath.Substring(map.filePath.LastIndexOf('\\') + 1).ToUpper() +
            TabItem tp = tabs.CreateTab(typeAndTag);
            mecp.Parent = tp.AttachedControl;
            mecp.Dock = DockStyle.Fill;
            tp.Tooltip = "[" + @meta.type.ToLower() + "] " + @meta.name;

            this.tabs.AllowDrop = true;
            //this.tabs.DragDrop += new DragEventHandler(tp_DragDrop);
            //this.tabs.DragEnter += new DragEventHandler(tp_DragEnter);
            //this.tabs.DragLeave += new EventHandler(tp_DragLeave);
            //// These tabs don't change selected index till MouseUp, so do it on MouseDown!
            //this.tabs.MouseDown += new MouseEventHandler(tabControl1_MouseDown);
            //this.tabs.MouseMove += new MouseEventHandler(tabControl1_MouseMove);

            this.tabs.SelectedTabIndex = tabs.Tabs.IndexOf(tp);

            this.WindowState = FormWindowState.Normal;
            this.Show();
            this.Focus();

            return tabs.Tabs.IndexOf(tp);
        }
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:47,代码来源:MetaEditor.cs


示例19: Bitmask

 /// <summary>
 /// The Bitmask class
 /// </summary>
 /// <param name="meta">The controls meta data</param>
 /// <param name="iEntName">The identifying name of the meta string</param>
 /// <param name="map">The metas map file</param>
 /// <param name="iOffsetInChunk">The offset to the string in the memory stream</param>
 /// <param name="iBitCount">8 for Bitmask8, 16 for Bitmask16, 32 for Bitmask32 types</param>
 /// <param name="ioptions">The array of options available</param>
 /// <param name="iLineNumber"></param>
 public Bitmask(Meta meta, string iEntName, Map map, int iOffsetInChunk, int iBitCount, IFPIO.Option[] ioptions, int iLineNumber)
 {
     this.meta = meta;
     this.LineNumber = iLineNumber;
     this.Options = ioptions;
     this.Bits = new bool[iBitCount];
     this.visibleBits = new bool[iBitCount];
     this.bitCount = iBitCount;
     this.size = iBitCount / 8;
     this.chunkOffset = iOffsetInChunk;
     this.map = map;
     this.EntName = iEntName;
     InitializeComponent();
     this.label1.Text = "Bitmask" + iBitCount.ToString();
     this.label1.Left -= iBitCount.ToString().Length * 8;
     this.getLongestName();
     this.MakeControls();
     this.Size = this.PreferredSize;
     this.Dock = DockStyle.Top;
     this.Controls[0].Text = EntName;
     this.AutoSize = true;
 }
开发者ID:troymac1ure,项目名称:Entity,代码行数:32,代码来源:Bitmask.cs


示例20: DissectMeta

        /// <summary>
        /// The dissect meta.
        /// </summary>
        /// <param name="m">The m.</param>
        /// <remarks></remarks>
        public static void DissectMeta(ref Meta m)
        {
            object tempobject = Results[m.type];
            if (tempobject == null)
            {
                MetaResult mr = new MetaResult();
                IFPIO io = IFPHashMap.GetIfp(m.type, m.Map.HaloVersion);
                mr.IFP = io;
                Results.Add(m.type, mr);
                tempobject = Results[m.type];
            }

            MetaResult CurrentResult = tempobject as MetaResult;

            // figure out headersize for current meta
            int headersize = m.size;
            for (int x = 0; x < m.items.Count; x++)
            {
                if (m.items[x].type == Meta.ItemType.Reflexive)
                {
                    Meta.Reflexive tempr = m.items[x] as Meta.Reflexive;
                    if (tempr.translation < headersize && tempr.intag == m.TagIndex)
                    {
                        headersize = tempr.translation;
                    }
                }
            }

            if (CurrentResult.HeaderSizes.IndexOf(headersize) == -1)
            {
                CurrentResult.HeaderSizes.Add(headersize);
            }

            //
            AnalyzeReferences(ref m);
        }
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:41,代码来源:MakeIFP.cs



注:本文中的HaloMap.Meta.Meta类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Hammock.RestRequest类代码示例发布时间:2022-05-26
下一篇:
C# Map.Map类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap