Beispiel #1
0
        public void Draw(int transparency, Graphics g)
        {
            for (int i = 0; i < 78; i++)
            {
                g.CompositingMode = CompositingMode.SourceOver;
                ExitOW e = jsonData.exitsOWs[i];

                if (e.mapId < scene.offset + 64 && e.mapId >= scene.offset)
                {
                    Brush bgrBrush   = new SolidBrush(Color.FromArgb((int)transparency, 222, 222, 222));
                    Pen   contourPen = new Pen(Color.FromArgb((int)transparency, 0, 0, 0));
                    Brush fontBrush  = Brushes.Black;

                    if (selectedExit == null)
                    {
                        if (lastselectedExit == e)
                        {
                            g.CompositingMode = CompositingMode.SourceOver;
                            bgrBrush          = new SolidBrush(Color.FromArgb((int)transparency, 160, 160, 160));
                            g.FillRectangle(bgrBrush, new Rectangle(e.playerX, e.playerY, 16, 16));
                            g.DrawRectangle(contourPen, new Rectangle(e.playerX, e.playerY, 16, 16));
                            scene.DrawText(g, i.ToString("X2"), new Point(e.playerX - 1, e.playerY + 1));

                            g.DrawRectangle(Pens.LightPink, new Rectangle(e.xScroll, e.yScroll, 256, 224));
                            g.DrawLine(Pens.Blue, e.cameraX - 8, e.cameraY, e.cameraX + 8, e.cameraY);
                            g.DrawLine(Pens.Blue, e.cameraX, e.cameraY - 8, e.cameraX, e.cameraY + 8);
                            g.CompositingMode = CompositingMode.SourceCopy;
                            continue;
                        }
                        g.FillRectangle(bgrBrush, new Rectangle(e.playerX, e.playerY, 16, 16));
                        g.DrawRectangle(contourPen, new Rectangle(e.playerX, e.playerY, 16, 16));
                        scene.DrawText(g, i.ToString("X2"), new Point(e.playerX - 1, e.playerY + 1));
                    }
                    else
                    {
                        if (selectedExit == e)
                        {
                            g.CompositingMode = CompositingMode.SourceOver;
                            g.DrawImage(jsonData.linkGfx, e.playerX, e.playerY, new Rectangle(16, 0, 16, 16), GraphicsUnit.Pixel);
                            g.DrawImage(jsonData.linkGfx, e.playerX, e.playerY + 8, new Rectangle(48, 16, 16, 16), GraphicsUnit.Pixel);
                            g.CompositingMode = CompositingMode.SourceCopy;

                            g.DrawRectangle(Pens.LightPink, new Rectangle(e.xScroll, e.yScroll, 256, 224));
                            g.DrawLine(Pens.Blue, e.cameraX - 8, e.cameraY, e.cameraX + 8, e.cameraY);
                            g.DrawLine(Pens.Blue, e.cameraX, e.cameraY - 8, e.cameraX, e.cameraY + 8);
                        }
                        else
                        {
                            g.FillRectangle(bgrBrush, new Rectangle(e.playerX, e.playerY, 16, 16));
                            g.DrawRectangle(contourPen, new Rectangle(e.playerX, e.playerY, 16, 16));
                            scene.DrawText(g, i.ToString("X2"), new Point(e.playerX - 1, e.playerY + 1));
                        }
                    }
                }
            }
            g.CompositingMode = CompositingMode.SourceCopy;
        }
Beispiel #2
0
        public void Draw(int transparency, Graphics g)
        {
            for (int i = 0; i < 0x13; i++)
            {
                g.CompositingMode = CompositingMode.SourceOver;
                EntranceOWEditor e        = jsonData.holesOWsEditor[i];
                Brush            bgrBrush = new SolidBrush(Color.FromArgb((int)transparency, 20, 20, 20));
                Pen contourPen            = new Pen(Color.FromArgb((int)transparency, 0, 0, 0));
                if (e.mapId < scene.offset + 64 && e.mapId >= scene.offset)
                {
                    if (selectedHole != null)
                    {
                        if (e == selectedHole)
                        {
                            bgrBrush = new SolidBrush(Color.FromArgb((int)transparency, 0, 55, 240));
                        }
                        else
                        {
                            bgrBrush = new SolidBrush(Color.FromArgb((int)transparency, 255, 200, 16));
                        }
                    }

                    g.FillRectangle(bgrBrush, new Rectangle((e.x), (e.y), 16, 16));
                    g.DrawRectangle(contourPen, new Rectangle((e.x), (e.y), 16, 16));
                    scene.DrawText(g, e.entranceId.ToString("X2") + "- " + scene.roomsNames[jsonData.entrances[e.entranceId].room], new Point((e.x), (e.y)));
                    g.CompositingMode = CompositingMode.SourceCopy;
                }
            }
        }
Beispiel #3
0
        public void Draw(int transparency, Graphics g)
        {
            Brush bgrBrush   = new SolidBrush(Color.FromArgb((int)transparency, 200, 0, 0));
            Pen   contourPen = new Pen(Color.FromArgb((int)transparency, 0, 0, 0));

            foreach (RoomPotSaveEditor item in jsonData.itemsOWEditor)
            {
                if (item.roomMapId >= scene.offset && item.roomMapId < scene.offset + 64)
                {
                    g.CompositingMode = CompositingMode.SourceOver;
                    if (selectedItem == item)
                    {
                        bgrBrush   = new SolidBrush(Color.FromArgb((int)transparency, 00, 200, 200));
                        contourPen = new Pen(Color.FromArgb((int)transparency, 0, 0, 0));
                    }
                    else
                    {
                        bgrBrush   = new SolidBrush(Color.FromArgb((int)transparency, 200, 0, 0));
                        contourPen = new Pen(Color.FromArgb((int)transparency, 0, 0, 0));
                    }
                    g.FillRectangle(bgrBrush, new Rectangle((item.x), (item.y), 16, 16));
                    g.DrawRectangle(contourPen, new Rectangle((item.x), (item.y), 16, 16));
                    byte nid = item.id;
                    if ((item.id & 0x80) == 0x80)
                    {
                        nid = (byte)(((item.id - 0x80) / 2) + 0x17);
                    }
                    scene.DrawText(g, item.id.ToString("X2") + " - " + ItemsNames.name[nid], new Point((item.x) - 1, (item.y) + 1));
                }
            }
            g.CompositingMode = CompositingMode.SourceCopy;
        }
Beispiel #4
0
        public void Draw(int transparency, Graphics g)
        {
            Brush bgrBrush   = new SolidBrush(Color.FromArgb((int)transparency, 255, 0, 255));
            Pen   contourPen = new Pen(Color.FromArgb((int)transparency, 0, 0, 0));

            byte spriteState = scene.sceneState;

            if (spriteState == 2)
            {
                spriteState = 1;
            }
            else if (spriteState == 3)
            {
                spriteState = 2;
            }
            foreach (Room_SpriteOWEditor spr in jsonData.spritesOWEditor[spriteState])
            {
                if (spr.roomMapId >= scene.offset && spr.roomMapId < scene.offset + 64)
                {
                    g.CompositingMode = CompositingMode.SourceOver;
                    if (selectedSprite == spr)
                    {
                        bgrBrush   = new SolidBrush(Color.FromArgb((int)transparency, 00, 255, 0));
                        contourPen = new Pen(Color.FromArgb((int)transparency, 0, 0, 0));
                    }
                    else if (lastselectedSprite == spr)
                    {
                        bgrBrush   = new SolidBrush(Color.FromArgb((int)transparency, 0, 180, 0));
                        contourPen = new Pen(Color.FromArgb((int)transparency, 0, 0, 0));
                    }
                    else
                    {
                        bgrBrush   = new SolidBrush(Color.FromArgb((int)transparency, 255, 0, 255));
                        contourPen = new Pen(Color.FromArgb((int)transparency, 0, 0, 0));
                    }
                    g.FillRectangle(bgrBrush, new Rectangle((spr.x), (spr.y), 16, 16));
                    g.DrawRectangle(contourPen, new Rectangle((spr.x), (spr.y), 16, 16));
                    scene.DrawText(g, spr.name, new Point((spr.x) - 1, (spr.y) + 1));
                }
            }
            g.CompositingMode = CompositingMode.SourceCopy;
        }