示例#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;

            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);
                }
            }
        }
        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;

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

                DrawBounds2(d, x2, y2, x1, y1, Transparency, SystemColors.White, SystemColors.Transparent);
            }
        }
示例#3
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;
            int  aniID     = (int)entity.attributesMap["aniID"].ValueUInt8;
            int  attribute = (int)entity.attributesMap["attribute"].ValueUInt8;

            RSDKv5.Position parallaxFactor = entity.attributesMap["parallaxFactor"].ValueVector2;
            RSDKv5.Position loopPoint      = entity.attributesMap["loopPoint"].ValueVector2;

            if (ParallaxSpritePath == "")
            {
                ParallaxSpritePath = GetParallaxSpritePath();
            }

            if (Methods.Solution.SolutionState.Main.ShowParallaxSprites)
            {
                var editorAnim = LoadAnimation("EditorIcons2", d, 0, 12);
                DrawTexturePivotNormal(d, editorAnim, editorAnim.RequestedAnimID, editorAnim.RequestedFrameID, x, y, Transparency);
            }
            else
            {
                var editorAnim = LoadAnimation(ParallaxSpritePath, d, aniID, 0);
                DrawTexturePivotNormal(d, editorAnim, editorAnim.RequestedAnimID, editorAnim.RequestedFrameID, x, y, 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;

            bool finish = e.attributesMap["finishLine"].ValueBool;

            var Animation1 = LoadAnimation("Global/SpeedGate.bin", d, 0, 0);

            DrawTexturePivotNormal(Properties.Graphics, Animation1, Animation1.RequestedAnimID, Animation1.RequestedFrameID, x, y, Transparency);
            var Animation2 = LoadAnimation("Global/SpeedGate.bin", d, 1, 0);

            DrawTexturePivotNormal(Properties.Graphics, Animation2, Animation2.RequestedAnimID, Animation2.RequestedFrameID, x, y, Transparency);

            var Animation3 = LoadAnimation("Global/SpeedGate.bin", d, (finish ? 4 : 3), 0);

            for (int FrameID = 0; FrameID < Animation3.RequestedAnimation.Frames.Count; FrameID++)
            {
                DrawTexturePivotNormal(Properties.Graphics, Animation3, Animation3.RequestedAnimID, FrameID, x, y, 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;

            RenderingTransparency = Properties.Transparency;

            bool fliph = false;
            bool flipv = false;

            Width  = (int)e.attributesMap["size"].ValueVector2.X.High;
            Height = (int)e.attributesMap["size"].ValueVector2.Y.High;
            int offsetX = (int)e.attributesMap["offset"].ValueVector2.X.High;
            int offsetY = (int)e.attributesMap["offset"].ValueVector2.Y.High;

            int real_x = (x != 0 ? ((x / 16) * 16) : 0);
            int real_y = (y != 0 ? ((y / 16) * 16) : 0);

            DrawTileMap(d, real_x, real_y, offsetX * 16, offsetY * 16, Width * 16, Height * 16, RenderingTransparency);

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

            DrawTexturePivotNormal(Properties.Graphics, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, RenderingTransparency);
        }
        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 animID   = (int)e.attributesMap["type"].ValueEnum;
            var flipFlag = e.attributesMap["flipFlag"].ValueEnum;

            // Handle springs being flipped in both planes
            // Down
            if ((flipFlag & 0x02) == 0x02)
            {
                flipv = true;
            }
            // Left
            if ((flipFlag & 0x01) == 0x01)
            {
                fliph = true;
            }


            var Animation = LoadAnimation("PSZ2/IceSpring.bin", d, animID % 3, 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  dir          = e.attributesMap["dir"].ValueUInt8;
            int  frameID      = 0;

            switch (dir)
            {
            case 1:
                fliph   = true;
                frameID = 4;
                break;
            }

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

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

            Animation = LoadAnimation(GetSetupAnimation(), d, 0, 0);
            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, fliph, flipv);

            Animation = LoadAnimation(GetSetupAnimation(), d, 1, 0);
            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x - (fliph ? 6 : 0), 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;

            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);
            }
        }
        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);
        }
示例#10
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);
            }
        }
示例#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 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);
        }
示例#12
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 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);
        }
示例#14
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);
            }
        }
示例#15
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;

            var editorAnimInside = LoadAnimation("AIZ/SchrodingersCapsule.bin", d, 0, 2);

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

            var mightyAnim = LoadAnimation("AIZ/SchrodingersCapsule.bin", d, 3, 0);

            DrawTexturePivotNormal(d, mightyAnim, mightyAnim.RequestedAnimID, mightyAnim.RequestedFrameID, x + 15, y, Transparency);
            var rayAnim = LoadAnimation("AIZ/SchrodingersCapsule.bin", d, 4, 0);

            DrawTexturePivotNormal(d, rayAnim, rayAnim.RequestedAnimID, rayAnim.RequestedFrameID, x - 15, y, Transparency);

            var editorAnim = LoadAnimation("AIZ/SchrodingersCapsule.bin", d, 0, 0);

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

            var editorAnim2 = LoadAnimation("AIZ/SchrodingersCapsule.bin", d, 0, 1);

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

            var editorAnimExclamation = LoadAnimation("AIZ/SchrodingersCapsule.bin", d, 0, 3);

            DrawTexturePivotNormal(d, editorAnimExclamation, editorAnimExclamation.RequestedAnimID, editorAnimExclamation.RequestedFrameID, x, y, Transparency);
            var editorAnimButton = LoadAnimation("AIZ/SchrodingersCapsule.bin", d, 1, 0);

            DrawTexturePivotNormal(d, editorAnimButton, editorAnimButton.RequestedAnimID, editorAnimButton.RequestedFrameID, x, y, 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;
            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 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 direction = (int)e.attributesMap["direction"].ValueUInt8;
            int animID;

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


            var Animation = LoadAnimation("PSZ2/Woodrow.bin", d, animID, 0);

            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x + (fliph ? -Animation.RequestedFrame.PivotX - 6 : 0), y + (flipv ? 0 : 0), Transparency, fliph, flipv);
        }
        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 void DrawSubType(Structures.EntityRenderProp Properties, Func <DevicePanel, int, int, int, System.Drawing.Color, bool> DrawCall)
        {
            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  type       = (int)e.attributesMap["type"].ValueEnum;
            int  amplitudeX = (int)e.attributesMap["amplitude"].ValueVector2.X.High;
            int  amplitudeY = (int)e.attributesMap["amplitude"].ValueVector2.Y.High;
            int  childCount = (int)e.attributesMap["childCount"].ValueEnum;
            bool hasTension = e.attributesMap["hasTension"].ValueBool;
            int  speed      = Methods.Entities.AttributeHandler.AttributesMapVar("speed", e);

            int FrameIDAttribute = 0;

            switch (e.attributesMap["frameID"].Type)
            {
            case AttributeTypes.UINT8:
                FrameIDAttribute = e.attributesMap["frameID"].ValueUInt8;
                break;

            case AttributeTypes.INT8:
                FrameIDAttribute = e.attributesMap["frameID"].ValueInt8;
                break;

            case AttributeTypes.ENUM:
                FrameIDAttribute = (int)e.attributesMap["frameID"].ValueEnum;
                break;
            }

            if (type == 1)
            {
                DrawFallingPlatform(d, x, y, Transparency, amplitudeX, amplitudeY, angle, hasTension, FrameIDAttribute, DrawCall);
            }
            else if (type == 2)
            {
                DrawStandardMovingPlatform(d, x, y, Transparency, amplitudeX, amplitudeY, angle, hasTension, FrameIDAttribute, DrawCall);
            }
            else if (type == 3)
            {
                DrawNormalTensionPlatform(d, x, y, Transparency, amplitudeX, amplitudeY, angle, hasTension, FrameIDAttribute, DrawCall);
            }
            else if (type == 4)
            {
                DrawTensionBallPlatform(d, x, y, Transparency, amplitudeX, amplitudeY, angle, hasTension, FrameIDAttribute, DrawCall);
            }
            else if (type == 7)
            {
                DrawMovingPlatformSeven(d, x, y, Transparency, amplitudeX, amplitudeY, angle, hasTension, FrameIDAttribute, DrawCall);
            }
            else
            {
                DrawStandardPlatform(d, x, y, Transparency, FrameIDAttribute, DrawCall);
            }
        }
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            Classes.Scene.EditorEntity e = Properties.EditorObject;
            DevicePanel d            = Properties.Graphics;
            int         x            = Properties.DrawX;
            int         y            = Properties.DrawY;
            int         Transparency = Properties.Transparency;

            bool fliph = false;
            bool flipv = false;

            int ropeSize = (int)e.attributesMap["ropeSize"].ValueUInt8 + 1;


            var Animation   = Methods.Drawing.ObjectDrawing.LoadAnimation(Properties.Graphics, GetSetupAnimation(), 0, 0);
            int frameHeight = Animation.RequestedFrame.Height;

            for (int i = 0; i < ropeSize; i++)
            {
                DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y + frameHeight * i, Transparency, fliph, flipv);
            }
            Animation = Methods.Drawing.ObjectDrawing.LoadAnimation(Properties.Graphics, GetSetupAnimation(), 2, 0);
            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, fliph, flipv);
            Animation = Methods.Drawing.ObjectDrawing.LoadAnimation(Properties.Graphics, GetSetupAnimation(), 1, 0);
            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y + frameHeight * ropeSize, 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;

            string text         = "UI/Text" + Methods.Solution.SolutionState.Main.CurrentManiaUILanguage + ".bin";
            int    frameID      = (int)e.attributesMap["frameID"].ValueEnum;
            int    listID       = (int)e.attributesMap["listID"].ValueEnum;
            int    align        = (int)e.attributesMap["align"].ValueEnum;
            int    width        = (int)e.attributesMap["size"].ValueVector2.X.High;
            int    height       = (int)e.attributesMap["size"].ValueVector2.Y.High;
            bool   invisible    = e.attributesMap["invisible"].ValueBool;
            double alignmentVal = 0;
            var    editorAnim   = Methods.Drawing.ObjectDrawing.LoadAnimation(d, text, listID, frameID);

            switch (align)
            {
            case 0:
                alignmentVal = -((width / 2)) - editorAnim.RequestedFrame.PivotY;
                break;

            default:
                alignmentVal = editorAnim.RequestedFrame.PivotX + (22 / 2);
                break;
            }
            d.DrawQuad(x - (width / 2) - height, y - (height / 2), x + (width / 2) + height, y + (height / 2), System.Drawing.Color.FromArgb(Transparency, System.Drawing.Color.Black), System.Drawing.Color.FromArgb(Transparency, System.Drawing.Color.Black), 0);
            DrawTexture(d, editorAnim, listID, frameID, x + (int)alignmentVal, y + editorAnim.RequestedFrame.PivotY, Transparency);
        }
示例#22
0
        public override void Draw(Structures.EntityRenderProp properties)
        {
            Methods.Draw.GraphicsHandler d = properties.Graphics;
            SceneEntity entity             = properties.Object;

            Classes.Scene.Sets.EditorEntity e = properties.EditorObject;
            int x                  = properties.X;
            int y                  = properties.Y;
            int Transparency       = properties.Transparency;
            int index              = properties.Index;
            int previousChildCount = properties.PreviousChildCount;
            int platformAngle      = properties.PlatformAngle;

            Methods.Entities.EntityAnimator Animation = properties.Animations;
            bool selected   = properties.isSelected;
            int  aniID      = (int)entity.attributesMap["aniID"].ValueUInt8;
            int  frameID    = (int)entity.attributesMap["frameID"].ValueUInt8;
            bool fliph      = false;
            bool flipv      = false;
            var  editorAnim = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("GigaMetal", d.DevicePanel, aniID, frameID, fliph, flipv, false);

            if (editorAnim != null && editorAnim.Frames.Count != 0)
            {
                var frame = editorAnim.Frames[Animation.index];

                Animation.ProcessAnimation(frame.Entry.SpeedMultiplyer, frame.Entry.Frames.Count, frame.Frame.Delay);

                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame),
                             x + frame.Frame.PivotX - (fliph ? (frame.Frame.Width - editorAnim.Frames[0].Frame.Width) : 0),
                             y + frame.Frame.PivotY + (flipv ? (frame.Frame.Height - editorAnim.Frames[0].Frame.Height) : 0),
                             frame.Frame.Width, frame.Frame.Height, false, Transparency);
            }
        }
示例#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  animID       = (int)e.attributesMap["type"].ValueEnum;
            var  flipFlag     = e.attributesMap["flipFlag"].ValueEnum;
            bool fliph        = false;
            bool flipv        = false;

            // Handle springs being flipped in both planes
            // Down
            if ((flipFlag & 0x02) == 0x02)
            {
                flipv = true;
            }
            // Left
            if ((flipFlag & 0x01) == 0x01)
            {
                fliph = true;
            }

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

            if (EntityRenderer.IsValidated(Animation, new System.Tuple <int, int>(animID, 0)))
            {
                var frame = Animation.Animation.Animations[animID].Frames[0];
                d.DrawBitmap(Animation.Spritesheets.ElementAt(frame.SpriteSheet).Value, x + frame.PivotX, y + frame.PivotY, frame.X, frame.Y, frame.Width, frame.Height, false, Transparency, fliph, flipv);
            }
        }
示例#24
0
        public override void Draw(Structures.EntityRenderProp properties)
        {
            Methods.Draw.GraphicsHandler d = properties.Graphics;
            SceneEntity entity             = properties.Object;

            Classes.Scene.Sets.EditorEntity e = properties.EditorObject;
            int x                  = properties.X;
            int y                  = properties.Y;
            int Transparency       = properties.Transparency;
            int index              = properties.Index;
            int previousChildCount = properties.PreviousChildCount;
            int platformAngle      = properties.PlatformAngle;

            Methods.Entities.EntityAnimator Animation = properties.Animations;
            bool selected        = properties.isSelected;
            var  editorAnim      = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("MSPanel", d.DevicePanel, 0, 0, false, false, false);
            var  editorAnimPanel = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("MSPanel", d.DevicePanel, 1, -1, false, false, false);

            if (editorAnim != null && editorAnim.Frames.Count != 0 && editorAnimPanel != null && editorAnimPanel.Frames.Count != 0)
            {
                var frame      = editorAnim.Frames[0];
                var framePanel = editorAnimPanel.Frames[Animation.index];

                Animation.ProcessAnimation(framePanel.Entry.SpeedMultiplyer, framePanel.Entry.Frames.Count, framePanel.Frame.Delay);

                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame),
                             x + frame.Frame.PivotX,
                             y + frame.Frame.PivotY,
                             frame.Frame.Width, frame.Frame.Height, false, Transparency);
                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(framePanel),
                             x + framePanel.Frame.PivotX,
                             y + framePanel.Frame.PivotY,
                             framePanel.Frame.Width, framePanel.Frame.Height, false, 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;

            bool fliph = false;
            bool flipv = false;

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

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

            var Animation = LoadAnimation("MSZ/Seltzer.bin", d, 0, 0);

            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, fliph, flipv);
            Animation = LoadAnimation("MSZ/Seltzer.bin", d, 1, 0);
            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, fliph, flipv);
            Animation = LoadAnimation("MSZ/Seltzer.bin", d, 0, 1);
            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, fliph, flipv);
            Animation = LoadAnimation("MSZ/Seltzer.bin", d, 0, 2);
            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, fliph, flipv);
            Animation = LoadAnimation("MSZ/Seltzer.bin", d, 0, 3);
            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, fliph, flipv);
            Animation = LoadAnimation("MSZ/Seltzer.bin", d, 0, 5);
            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x + (fliph ? 10 : 0), y, Transparency, fliph, flipv);
            Animation = LoadAnimation("MSZ/Seltzer.bin", d, 0, 4);
            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, false, false);
        }
示例#26
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"].ValueEnum;
            int frameID = 0;

            if (type == 2)
            {
                frameID = 3;
            }
            if (type == 1)
            {
                frameID = 1;
            }
            var Animation = LoadAnimation("FBZ/Missile.bin", d, 1, 0);

            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, fliph, flipv);
        }
示例#27
0
        public override void Draw(Structures.EntityRenderProp Properties)
        {
            if (HUDLevelSelectChar == null)
            {
                HUDLevelSelectChar = HUDLevelSelectCharS.ToCharArray();
            }

            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;

            string text          = e.attributesMap["text"].ValueString;
            bool   selectable    = e.attributesMap["selectable"].ValueBool;
            bool   highlighted   = e.attributesMap["highlighted"].ValueBool;
            int    spacingAmount = 0;

            foreach (char symb in text)
            {
                int animID    = (highlighted ? 1 : 0);
                var Animation = GetFrameID(d, symb, animID);
                if (Animation != null)
                {
                    DrawTexturePivotPlus(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, spacingAmount, 0, Transparency, fliph, flipv);
                    spacingAmount = spacingAmount + Animation.RequestedFrame.Width;
                }
            }
        }
示例#28
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  direction = (int)e.attributesMap["direction"].ValueUInt8;
            bool hasSaw    = e.attributesMap["hasSaw"].ValueBool;
            int  animID;

            if (direction == 2)
            {
                if (hasSaw)
                {
                    animID = 4;
                }
                else
                {
                    animID = 3;
                }
            }
            else if (direction == 3)
            {
                fliph = true;
                if (hasSaw)
                {
                    animID = 4;
                }
                else
                {
                    animID = 3;
                }
            }
            else
            {
                if (hasSaw)
                {
                    animID = 1;
                }
                else
                {
                    animID = 0;
                }
            }
            if (direction == 1)
            {
                flipv = true;
            }


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

            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x + (fliph ? (hasSaw ? (38) : 16) : 0), y + (flipv ? (hasSaw ? (37) : 15) : 0), 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;


            var height_value = (int)(e.attributesMap["size"].ValueEnum);
            var height       = (height_value > 0 ? height_value / 2 : height_value);
            var width        = 6;

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

                DrawBounds2(d, x1, y1, x2, y2, Transparency, SystemColors.White, SystemColors.Transparent);
            }

            var Animation = LoadAnimation("EditorIcons", d, 0, 6);

            DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency);
        }
示例#30
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);
        }