Example #1
0
 private StaticItem(short ItemID, sbyte Z, int serial)
 {
     this.m_ID     = ItemID;
     this.m_RealID = (short)((this.m_ID & 0x3fff) | 0x4000);
     this.m_ID     = (short)(this.m_ID & 0x3fff);
     this.m_ID     = (short)(this.m_ID + 0x4000);
     this.m_Z      = Z;
     this.m_Height = Map.GetHeight(this.m_ID);
     this.m_Hue    = Hues.Default;
     this.Serial   = serial;
     this.m_vPool  = VertexConstructor.Create();
 }
Example #2
0
 private unsafe StaticItem(byte *pvSrc, int si, int serial)
 {
     this.m_ID            = *((short *)pvSrc);
     this.m_Z             = *((sbyte *)(pvSrc + 4));
     this.m_RealID        = (short)((this.m_ID & 0x3fff) | 0x4000);
     this.m_ID            = (short)(this.m_ID & 0x3fff);
     this.m_ID            = (short)(this.m_ID + 0x4000);
     this.m_Hue           = Hues.GetItemHue(this.m_ID, *((ushort *)(pvSrc + 5)));
     this.m_Height        = Map.GetHeight(this.m_ID);
     this.m_SortInfluence = si;
     this.Serial          = serial;
     this.m_vPool         = VertexConstructor.Create();
 }
Example #3
0
 private StaticItem(HuedTile tile, int influence, int serial)
 {
     this.m_ID            = (short)tile.ID;
     this.m_Z             = (sbyte)tile.Z;
     this.m_RealID        = (short)((tile.ID & 0x3fff) | 0x4000);
     this.m_ID            = (short)(this.m_ID & 0x3fff);
     this.m_ID            = (short)(this.m_ID + 0x4000);
     this.m_Hue           = Hues.GetItemHue(this.m_ID, tile.Hue);
     this.m_Height        = Map.GetHeight(this.m_ID);
     this.m_SortInfluence = influence;
     this.Serial          = serial;
     this.m_vPool         = VertexConstructor.Create();
 }
Example #4
0
        private GContextMenu(object owner, PopupEntry[] list) : base(100, 100)
        {
            this.m_VertexPool = VertexConstructor.Create();
            this.m_Owner      = owner;
            base.m_GUID       = "MobilePopup";
            int     num      = 0;
            int     num2     = 0;
            int     length   = list.Length;
            IFont   uniFont  = Engine.GetUniFont(3);
            IHue    bright   = Hues.Bright;
            IHue    focusHue = Hues.Load(0x35);
            IHue    hue      = Hues.Default;
            OnClick onClick  = new OnClick(this.Entry_OnClick);

            for (int i = 0; i < length; i++)
            {
                PopupEntry entry = list[i];
                GLabel     toAdd = null;
                if (entry.Flags == 1)
                {
                    toAdd = new GLabel(entry.Text, uniFont, hue, 7, 7 + num2);
                }
                else
                {
                    toAdd = new GTextButton(entry.Text, uniFont, bright, focusHue, 7, 7 + num2, onClick);
                    toAdd.SetTag("EntryID", entry.EntryID);
                }
                toAdd.X -= toAdd.Image.xMin;
                toAdd.Y -= toAdd.Image.yMin;
                num2    += (toAdd.Image.yMax - toAdd.Image.yMin) + 4;
                if (((toAdd.Image.xMax - toAdd.Image.xMin) + 1) > num)
                {
                    num = (toAdd.Image.xMax - toAdd.Image.xMin) + 1;
                }
                base.m_Children.Add(toAdd);
            }
            num2         -= 3;
            this.m_Width  = num + 14;
            this.m_Height = num2 + 14;
        }
Example #5
0
 public AnimationVertexCache() : this(VertexConstructor.Create())
 {
 }
Example #6
0
 public VertexCache() : this(VertexConstructor.Create())
 {
 }