Ejemplo n.º 1
0
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity e = Properties.EditorObject;
            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int transparency = Properties.Transparency;

            bool fliph = false;
            bool flipv = false;


            int PixelWidth  = (int)e.attributesMap["size"].ValueVector2.X.High;
            int PixelHeight = (int)e.attributesMap["size"].ValueVector2.Y.High;

            int PixelPosX = (int)e.attributesMap["targetPos"].ValueVector2.X.High - (PixelWidth / 2);
            int PixelPosY = (int)e.attributesMap["targetPos"].ValueVector2.Y.High - (PixelHeight / 2);

            if (MoveLayer != null && !ErrorKilled)
            {
                StoreTileMapData(PixelPosX, PixelPosY, PixelWidth, PixelHeight);
                TrueSelf.DrawSubType(Properties, DrawTileMap);
            }
        }
Ejemplo n.º 2
0
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity e = Properties.EditorObject;
            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int Transparency = Properties.Transparency;

            var width  = (int)(e.attributesMap["width"].ValueUInt8);
            var height = (int)(e.attributesMap["height"].ValueUInt8);

            var Animation = Methods.Drawing.ObjectDrawing.LoadAnimation(Properties.Graphics, "Global/ItemBox.bin", 2, 10);

            bool wEven = width % 2 == 0;
            bool hEven = height % 2 == 0;

            for (int xx = 0; xx <= width; ++xx)
            {
                for (int yy = 0; yy <= height; ++yy)
                {
                    int realX = x + (wEven ? Animation.RequestedFrame.PivotX : -Animation.RequestedFrame.Width) + (-width / 2 + xx) * Animation.RequestedFrame.Width;
                    int realY = y + (hEven ? Animation.RequestedFrame.PivotY : -Animation.RequestedFrame.Height) + (-height / 2 + yy) * Animation.RequestedFrame.Height;
                    DrawTexture(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, realX, realY, Transparency);
                }
            }
        }
Ejemplo n.º 3
0
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity e = Properties.EditorObject;
            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int Transparency = Properties.Transparency;

            bool fliph = false;
            bool flipv = false;

            int  letterID   = (int)e.attributesMap["letterID"].ValueUInt8;
            bool controller = e.attributesMap["controller"].ValueBool;

            if (letterID == 0 || controller == true)
            {
                var Animation = LoadAnimation("SPZ2/Letterboard.bin", d, 0, 0);
                DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, fliph, flipv);
            }
            else
            {
                var Animation = LoadAnimation("SPZ2/Letterboard.bin", d, 1, letterID - 1);
                DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, fliph, flipv);
            }
        }
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity e = Properties.EditorObject;
            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int Transparency = Properties.Transparency;

            bool fliph = false;
            bool flipv = false;

            int startOff = (int)e.attributesMap["startOff"].ValueEnum;
            int length   = (int)e.attributesMap["length"].ValueEnum;

            var widthPixels  = (int)(64);
            var heightPixels = (int)(length);
            var width        = (int)widthPixels / 16;
            var height       = (int)heightPixels / 16;

            DrawBounds(d, x, y, widthPixels, heightPixels, Transparency, SystemColors.White, SystemColors.Transparent);

            var Animation = LoadAnimation(GetSetupAnimation(), d, 2, 0);

            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y + (startOff > length ? length / 2 : startOff / 2), Transparency, fliph, flipv);
        }
Ejemplo n.º 5
0
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity e = Properties.EditorObject;
            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int Transparency = Properties.Transparency;

            bool fliph = false;
            bool flipv = false;
            int  size  = (int)e.attributesMap["size"].ValueEnum;



            var Animation = LoadAnimation("SPZ1/DirectorChair.bin", d, 1, 0);

            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, fliph, flipv);
            Animation = LoadAnimation("SPZ1/DirectorChair.bin", d, 1, 0);
            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y - (size * 5 + 8), Transparency, fliph, flipv);
            Animation = LoadAnimation("SPZ1/DirectorChair.bin", d, 1, 1);
            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y - (size * 5 + 8), Transparency, fliph, flipv);
            Animation = LoadAnimation("SPZ1/DirectorChair.bin", d, 1, 2);
            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y - (size * 5 + 8), Transparency, fliph, flipv);
        }
Ejemplo n.º 6
0
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity e = Properties.EditorObject;

            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int Transparency = Properties.Transparency;

            var  value     = e.attributesMap["type"];
            int  direction = (int)e.attributesMap["direction"].ValueUInt8;
            bool fliph     = false;
            bool flipv     = false;

            switch (direction)
            {
            case 0:
                break;

            case 1:
                flipv = true;
                break;

            default:
                break;
            }

            var Animation = Methods.Drawing.ObjectDrawing.LoadAnimation(d, "Global/ItemBox.bin");

            DrawTexturePivotPlus(d, Animation, 0, 0, x, y, 0, 0, Transparency, fliph, flipv);
            DrawTexturePivotPlus(d, Animation, 2, value.ValueEnum, x, y, 0, -(flipv ? (-3) : 3), Transparency, fliph, flipv);
        }
Ejemplo n.º 7
0
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity e = Properties.EditorObject;
            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int Transparency = Properties.Transparency;

            int  type       = (int)e.attributesMap["type"].ValueEnum;
            int  speed      = (int)e.attributesMap["speed"].ValueEnum;
            int  angle      = (int)e.attributesMap["angle"].ValueInt32;
            int  amplitudeX = (int)e.attributesMap["amplitude"].ValueVector2.X.High;
            int  amplitudeY = (int)e.attributesMap["amplitude"].ValueVector2.Y.High;
            bool fliph      = false;
            bool flipv      = false;

            var Animation = LoadAnimation(GetSetupAnimation(), d, 0, 0);

            if (type == 1)
            {
                DrawCircleBumperAlt(d, Animation, x, y, Transparency, amplitudeX, amplitudeY, angle);
            }
            else
            {
                DrawCircleBumperNormal(d, Animation, x, y, Transparency, amplitudeX, amplitudeY, angle);
            }
        }
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity e = Properties.EditorObject;
            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int Transparency = Properties.Transparency;

            bool fliph = false;
            bool flipv = false;

            int letter   = (int)e.attributesMap["letter"].ValueUInt8;
            int duration = (int)e.attributesMap["duration"].ValueUInt16;

            int frameID = 0;

            if (letter >= 11)
            {
                letter = 11;
            }
            if (duration != 0)
            {
                frameID = 4;
            }


            var Animation = LoadAnimation("PSZ1/PrintBlock.bin", d, letter, frameID);

            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, fliph, flipv);
        }
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity e = Properties.EditorObject;
            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int Transparency = Properties.Transparency;

            bool fliph = false;
            bool flipv = false;

            var widthPixels  = (int)(e.attributesMap["subOff2"].ValueVector2.X.High) * 16;
            var heightPixels = (int)(e.attributesMap["subOff2"].ValueVector2.Y.High) * 16;
            var width        = (int)widthPixels / 16;
            var height       = (int)heightPixels / 16;
            int offsetX      = (int)(e.attributesMap["subOff1"].ValueVector2.X.High);
            int offsetY      = (int)(e.attributesMap["subOff1"].ValueVector2.Y.High);

            var Animation = LoadAnimation("OOZ/Hatch.bin", d, 0, 1);

            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, fliph, flipv);
            Animation = LoadAnimation("OOZ/Hatch.bin", d, 0, 0);
            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, fliph, flipv);

            DrawBounds(d, x + offsetX, y + offsetY, widthPixels, heightPixels, Transparency, SystemColors.White, SystemColors.Transparent);
        }
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity e = Properties.EditorObject;
            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int Transparency = Properties.Transparency;

            int  type      = (int)e.attributesMap["type"].ValueUInt8;
            int  direction = (int)e.attributesMap["direction"].ValueUInt8;
            bool fliph     = false;
            bool flipv     = false;
            int  animID;

            if (type == 1)
            {
                animID = 2;
            }
            else
            {
                animID = 0;
            }
            if (direction == 1)
            {
                fliph = true;
            }

            var Animation = Methods.Drawing.ObjectDrawing.LoadAnimation(Properties.Graphics, "GHZ/Newtron.bin", animID, 0);

            DrawTexturePivotNormal(Properties.Graphics, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, fliph, flipv);
        }
Ejemplo n.º 11
0
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity e = Properties.EditorObject;
            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int Transparency = Properties.Transparency;

            bool fliph      = false;
            bool flipv      = false;
            var  editorAnim = LoadAnimation("EditorIcons2", d, 0, 6);
            var  width      = (int)(e.attributesMap["size"].ValueVector2.X.High * 2 - 1);
            var  height     = (int)(e.attributesMap["size"].ValueVector2.Y.High * 2 - 1);

            DrawTexturePivotNormal(d, editorAnim, editorAnim.RequestedAnimID, editorAnim.RequestedFrameID, x, y, Transparency);


            if (width != -1 && height != -1)
            {
                bool wEven = width % 2 == 0;
                bool hEven = height % 2 == 0;

                int x1 = (x + (wEven ? -8 : -16) + (-width / 2 + width) * 16) + 15;
                int x2 = (x + (wEven ? -8 : -16) + (-width / 2) * 16);
                int y1 = (y + (hEven ? -8 : -16) + (-height / 2 + height) * 16) + 15;
                int y2 = (y + (hEven ? -8 : -16) + (-height / 2) * 16);

                DrawBounds2(d, x1, y1, x2, y2, Transparency, SystemColors.White, SystemColors.Transparent);
            }
        }
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            Classes.Scene.EditorEntity e = Properties.EditorObject;
            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int Transparency = Properties.Transparency;

            var size  = (int)(e.attributesMap["size"].ValueEnum) - 1;
            var angle = e.attributesMap["angle"].ValueInt32;

            var editorAnim = LoadAnimation("Global/PlaneSwitch.bin", Properties.Graphics, 0, 4);

            const int pivotOffsetX = -8, pivotOffsetY = 0;
            const int drawOffsetX = 0, drawOffsetY = -8;

            bool hEven = size % 2 == 0;

            for (int yy = 0; yy <= size; ++yy)
            {
                int[] drawCoords = RotatePoints(
                    x - editorAnim.RequestedFrame.Width / 2,
                    (y + (hEven ? editorAnim.RequestedFrame.PivotY : -editorAnim.RequestedFrame.Height) + (-size / 2 + yy) * editorAnim.RequestedFrame.Height),
                    x + pivotOffsetX, y + pivotOffsetY, angle);

                DrawTexture(Properties.Graphics, editorAnim, editorAnim.RequestedAnimID, editorAnim.RequestedFrameID, drawCoords[0] + drawOffsetX, drawCoords[1] + drawOffsetY, Transparency);
            }
        }
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity entity = Properties.EditorObject;

            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int Transparency = Properties.Transparency;


            int  direction = 0;
            bool fliph     = false;
            bool flipv     = false;

            if (entity.AttributeExists("direction", AttributeTypes.UINT8))
            {
                direction = (int)entity.attributesMap["direction"].ValueUInt8;
            }
            if (direction == 1)
            {
                fliph = true;
            }

            var Animation = LoadAnimation(GetSetupAnimation(), d, 1, 0);

            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, fliph, flipv);
        }
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity e = Properties.EditorObject;
            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int Transparency = Properties.Transparency;

            bool fliph = false;
            bool flipv = false;

            int direction = (int)e.attributesMap["direction"].ValueUInt8;
            int flipState = 0;

            if (direction == 1)
            {
                fliph     = true;
                flipState = 3;
            }
            else
            {
                fliph     = false;
                flipState = 2;
            }

            var Animation = LoadAnimation(GetSetupAnimation(), d, 1, 0);

            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x + (direction == 1 ? -104 : 0), y, Transparency, fliph, flipv);
            Animation = LoadAnimation(GetSetupAnimation(), d, 0, 1);
            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x + (direction == 1 ? -104 : 0), y, Transparency, fliph, flipv);
            Animation = LoadAnimation(GetSetupAnimation(), d, 0, flipState);
            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, false, false);
        }
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity e = Properties.EditorObject;
            int  x            = Properties.DrawX;
            int  y            = Properties.DrawY;
            int  Transparency = Properties.Transparency;
            bool fliph        = false;
            bool flipv        = false;
            var  editorAnim   = LoadAnimation("EditorIcons2", d, 0, 3);

            DrawTexturePivotNormal(d, editorAnim, editorAnim.RequestedAnimID, editorAnim.RequestedFrameID, x, y, Transparency, fliph, flipv);


            if (e.Object.Name.Name == "LRZ1Intro")
            {
                editorAnim = LoadAnimation("LRZ1/IntroSub.bin", d, 0, 0);
                DrawTexturePivotNormal(d, editorAnim, editorAnim.RequestedAnimID, editorAnim.RequestedFrameID, x, y, Transparency, fliph, flipv);
            }


            int widthPixels  = Methods.Entities.AttributeHandler.AttributesMapPositionHighX("size", e) * 2;
            var heightPixels = Methods.Entities.AttributeHandler.AttributesMapPositionHighY("size", e) * 2;
            var width        = (int)widthPixels / 16;
            var height       = (int)heightPixels / 16;

            DrawBounds(d, x, y, widthPixels, heightPixels, Transparency, SystemColors.White, SystemColors.Transparent);
        }
        public override bool isObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity entity, int x, int y, int Transparency)
        {
            int type        = (int)entity.attributesMap["type"].ValueUInt8;
            int multiplierX = 0;
            int multiplierY = 0;

            switch (type)
            {
            case 0:
                multiplierX = 2;
                multiplierY = 128;
                break;

            case 1:
                multiplierX = 2;
                multiplierY = 2;
                break;

            case 2:
                multiplierX = 3;
                multiplierY = 3;
                break;
            }
            var widthPixels  = (int)(entity.attributesMap["radius"].ValueEnum) * multiplierX;
            var heightPixels = (int)(entity.attributesMap["height"].ValueEnum) * multiplierY;

            if (widthPixels != 0 && heightPixels != 0)
            {
                return(d.IsObjectOnScreen(x - widthPixels / 2, y - heightPixels / 2, widthPixels, heightPixels));
            }
            else
            {
                return(d.IsObjectOnScreen(x - 16, y - 16, 32, 32));
            }
        }
Ejemplo n.º 17
0
        public override bool isObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity entity, int x, int y, int Transparency)
        {
            var widthPixels  = (int)(entity.attributesMap["size"].ValueVector2.X.High) * 2;
            var heightPixels = (int)(entity.attributesMap["size"].ValueVector2.Y.High) * 2;

            return(d.IsObjectOnScreen(x - widthPixels / 2, y - heightPixels / 2, widthPixels, heightPixels));
        }
Ejemplo n.º 18
0
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity e = Properties.EditorObject;
            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int Transparency = Properties.Transparency;

            bool fliph = false;
            bool flipv = false;

            var Animation = LoadAnimation(GetSetupAnimation(), d, 0, 0);

            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, fliph, flipv);


            Animation = LoadAnimation(GetSetupAnimation(), d, 1, 0);
            for (int i = 0; i < 6; i++)
            {
                DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y - 8 - (i * 4), Transparency, fliph, flipv);
            }

            Animation = LoadAnimation(GetSetupAnimation(), d, 2, 0);
            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y - 44, Transparency, fliph, flipv);
        }
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity e = Properties.EditorObject;
            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int Transparency = Properties.Transparency;

            bool fliph = false;
            bool flipv = false;

            int direction = (int)e.attributesMap["direction"].ValueUInt8;

            if (direction == 0)
            {
                fliph = true;
            }

            var Animation = LoadAnimation("SSZ1/Plants.bin", d, 1, 0);

            int new_x = x + (fliph ? 112 : -112);

            for (int i = 0; i < 8; i++)
            {
                int offset_x = new_x + (fliph ? -(16 * i) : (16 * i));
                DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, offset_x, y, Transparency, fliph, flipv);
            }
        }
Ejemplo n.º 20
0
        public override void Draw(Structures.EntityRenderProp properties)
        {
            DevicePanel d = properties.Graphics;

            Classes.Scene.EditorEntity entity = properties.EditorObject;
            int  x            = properties.DrawX;
            int  y            = properties.DrawY;
            int  Transparency = properties.Transparency;
            int  type         = (int)entity.attributesMap["type"].ValueEnum;
            bool fliph        = false;
            bool flipv        = false;



            if (type == 0)
            {
                var editorAnim = LoadAnimation(GetSetupAnimation(), d, 0, 0);
                DrawTexturePivotNormal(d, editorAnim, editorAnim.RequestedAnimID, editorAnim.RequestedFrameID, x, y, Transparency);
                var editorAnimHead = LoadAnimation(GetSetupAnimation(), d, 1, 0);
                DrawTexturePivotNormal(d, editorAnimHead, editorAnimHead.RequestedAnimID, editorAnimHead.RequestedFrameID, x, y, Transparency);
                var editorAnimBoost = LoadAnimation(GetSetupAnimation(), d, 3, 0);
                DrawTexturePivotNormal(d, editorAnimBoost, editorAnimBoost.RequestedAnimID, editorAnimBoost.RequestedFrameID, x, y, Transparency);
            }
            else if (type == 1)
            {
                var editorAnimRider = LoadAnimation(GetSetupAnimation(), d, 4, 0);
                DrawTexturePivotNormal(d, editorAnimRider, editorAnimRider.RequestedAnimID, editorAnimRider.RequestedFrameID, x, y, Transparency);
            }
        }
Ejemplo n.º 21
0
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity e = Properties.EditorObject;
            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int Transparency = Properties.Transparency;

            bool fliph = false;
            bool flipv = false;


            int type = (int)e.attributesMap["type"].ValueUInt8;
            int animID;

            if (type == 1)
            {
                animID = 1;
            }
            else
            {
                animID = 0;
            }


            var Animation = LoadAnimation("PSZ1/Turntable.bin", d, animID, 0);

            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, fliph, flipv);
        }
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity e = Properties.EditorObject;
            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int Transparency = Properties.Transparency;

            int  direction = (int)e.attributesMap["direction"].ValueUInt8;
            bool fliph     = false;
            bool flipv     = false;

            if (direction == 1)
            {
                flipv = true;
            }

            var Animation = LoadAnimation("FBZ/Clucker.bin", d, 0, 0);

            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, fliph, flipv);
            Animation = LoadAnimation("FBZ/Clucker.bin", d, 0, 1);
            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y + (flipv ? (16) : -16), Transparency, fliph, flipv);
            Animation = LoadAnimation("FBZ/Clucker.bin", d, 0, 2);
            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y + (flipv ? (-4) : -16), Transparency, fliph, flipv);
        }
Ejemplo n.º 23
0
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity e = Properties.EditorObject;
            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int Transparency = Properties.Transparency;

            int  angle  = (int)(e.attributesMap["angle"].ValueInt32);
            int  length = (int)(e.attributesMap["length"].ValueEnum / 1.4);
            bool fliph  = false;
            bool flipv  = false;

            var editorAnim = LoadAnimation("GHZ/ZipLine.bin", d, 0, 0);

            DrawTexturePivotNormal(d, editorAnim, editorAnim.RequestedAnimID, editorAnim.RequestedFrameID, x, y, Transparency);
            var editorAnim2 = LoadAnimation("GHZ/ZipLine.bin", d, 0, 1);

            if (AreValuesDiffrent(x + length, y + length, x, y, -angle + 32))
            {
                LastRotatePoints = RotatePoints(x + length, y + length, x, y, -angle + 32);
            }

            if (length != 0)
            {
                d.DrawLine(x, y, LastRotatePoints[0], LastRotatePoints[1], System.Drawing.Color.FromArgb(255, 49, 48, 115));
                d.DrawLine(x, y - 1, LastRotatePoints[0], LastRotatePoints[1] - 1, System.Drawing.Color.FromArgb(255, 99, 97, 165));
                DrawTexturePivotNormal(d, editorAnim2, editorAnim2.RequestedAnimID, editorAnim2.RequestedFrameID, LastRotatePoints[0], LastRotatePoints[1], Transparency);
            }
        }
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity e = Properties.EditorObject;

            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int Transparency = Properties.Transparency;

            var widthPixels  = (int)(e.attributesMap["size"].ValueVector2.X.High);
            var heightPixels = (int)(e.attributesMap["size"].ValueVector2.Y.High);
            var width        = (int)widthPixels / 16;
            var height       = (int)heightPixels / 16;

            var Animation = Methods.Drawing.ObjectDrawing.LoadAnimation(Properties.Graphics, "EditorAssets", 0, 1);

            if (width != 0 && height != 0)
            {
                int x2 = x + widthPixels / -2;
                int x1 = x + widthPixels / 2 - 1;
                int y2 = y + heightPixels / -2;
                int y1 = y + heightPixels / 2 - 1;

                DrawBounds2(d, x1, y1, x2, y2, Transparency, SystemColors.White, SystemColors.Transparent);
                DrawBounds2(d, x1 - 16, y1 - 16, x2 + 16, y2 + 16, Transparency, SystemColors.Blue, SystemColors.Transparent);
            }
        }
Ejemplo n.º 25
0
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            DevicePanel d = Properties.Graphics;

            Classes.Scene.EditorEntity e = Properties.EditorObject;
            int x            = Properties.DrawX;
            int y            = Properties.DrawY;
            int Transparency = Properties.Transparency;

            bool fliph = false;
            bool flipv = false;

            var  width     = (int)(e.attributesMap["width"].ValueUInt32) - 1;
            var  height    = (int)(e.attributesMap["height"].ValueUInt32) - 1;
            var  Animation = LoadAnimation("Global/PlaneSwitch.bin", d, 0, 0);
            bool wEven     = width % 2 == 0;
            bool hEven     = height % 2 == 0;

            for (int xx = 0; xx <= width; ++xx)
            {
                for (int yy = 0; yy <= height; ++yy)
                {
                    int pos_x = x + (wEven ? Animation.RequestedFrame.PivotX : -Animation.RequestedFrame.Width) + (-width / 2 + xx) * Animation.RequestedFrame.Width;
                    int pos_y = y + (hEven ? Animation.RequestedFrame.PivotY : -Animation.RequestedFrame.Height) + (-height / 2 + yy) * Animation.RequestedFrame.Height;

                    DrawTexture(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, pos_x, pos_y, Transparency, fliph, flipv);
                }
            }
        }
Ejemplo n.º 26
0
        public override void Draw(Structures.EntityRenderProp properties)
        {
            DevicePanel d = properties.Graphics;

            Classes.Scene.EditorEntity entity = properties.EditorObject;
            int  x            = properties.DrawX;
            int  y            = properties.DrawY;
            int  Transparency = properties.Transparency;
            bool fliph        = false;
            bool flipv        = false;

            var editorAnim5 = LoadAnimation("SPZ1/FilmProjector.bin", d, 2, 0);

            DrawTexturePivotNormal(d, editorAnim5, editorAnim5.RequestedAnimID, editorAnim5.RequestedFrameID, x + 42, y - 68, Transparency, false, false);
            DrawTexturePivotNormal(d, editorAnim5, editorAnim5.RequestedAnimID, editorAnim5.RequestedFrameID, x - 60, y - 68, Transparency, false, false);
            var editorAnim4 = LoadAnimation("SPZ1/FilmProjector.bin", d, 1, 0);

            DrawTexturePivotNormal(d, editorAnim4, editorAnim4.RequestedAnimID, editorAnim4.RequestedFrameID, x + 42, y - 68, Transparency, false, false);
            DrawTexturePivotNormal(d, editorAnim4, editorAnim4.RequestedAnimID, editorAnim4.RequestedFrameID, x - 60, y - 68, Transparency, false, false);
            var editorAnim = LoadAnimation("SPZ1/FilmProjector.bin", d, 0, 0);

            DrawTexturePivotNormal(d, editorAnim, editorAnim.RequestedAnimID, editorAnim.RequestedFrameID, x, y, Transparency, false, false);
            var editorAnim2 = LoadAnimation("SPZ1/FilmProjector.bin", d, 0, 1);

            DrawTexturePivotNormal(d, editorAnim2, editorAnim2.RequestedAnimID, editorAnim2.RequestedFrameID, x + 185, y, Transparency, false, false);
            var editorAnim3 = LoadAnimation("SPZ1/FilmProjector.bin", d, 3, 0);

            DrawTexturePivotNormal(d, editorAnim3, editorAnim3.RequestedAnimID, editorAnim3.RequestedFrameID, x + 185, y, Transparency, false, false);
        }
Ejemplo n.º 27
0
 public EntityRenderProp(DevicePanel d, Classes.Scene.EditorEntity e, int X, int Y, int _Transparency)
 {
     Graphics     = d;
     EditorObject = e;
     DrawX        = X;
     DrawY        = Y;
     Transparency = _Transparency;
 }
Ejemplo n.º 28
0
        public override bool isObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity entity, int x, int y, int Transparency)
        {
            int length = (int)entity.attributesMap["length"].ValueUInt8 + 1;
            int gap    = (int)entity.attributesMap["gap"].ValueUInt8;
            int bounds = (48 * length + gap);

            return(d.IsObjectOnScreen(x - bounds / 2, y - bounds / 2, bounds, bounds));
        }
Ejemplo n.º 29
0
        public override bool isObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity entity, int x, int y, int Transparency)
        {
            var length       = entity.attributesMap["length"].ValueUInt8;
            int widthPixels  = length * 16;
            int heightPixels = 16;

            return(d.IsObjectOnScreen(x - widthPixels / 2, y - heightPixels / 2, widthPixels + 15, heightPixels));
        }
        public static void DrawInternal(DevicePanel d, Classes.Scene.EditorEntity _entity)
        {
            int Transparency = GetTransparencyLevel();

            int x = _entity.Position.X.High;
            int y = _entity.Position.Y.High;

            DrawSelectionBox(d, x, y, Transparency, System.Drawing.Color.Transparent, System.Drawing.Color.Red, _entity, "");
        }