public void Draw(Graphics g)
        {
            int   transparency = 200;
            Brush bgrBrush     = new SolidBrush(Color.FromArgb(transparency, 255, 200, 16));
            Pen   contourPen   = new Pen(Color.FromArgb(transparency, 0, 0, 0));

            g.CompositingMode = CompositingMode.SourceOver;
            for (int i = 0; i < scene.ow.allentrances.Length; i++)
            {
                EntranceOWEditor e = scene.ow.allentrances[i];

                if (e.mapId < 64 + scene.ow.worldOffset && e.mapId >= scene.ow.worldOffset)
                {
                    if (selectedEntrance != null)
                    {
                        if (e == selectedEntrance)
                        {
                            bgrBrush = new SolidBrush(Color.FromArgb((int)transparency, 0, 55, 240));
                            scene.drawText(g, e.x - 1, e.y + 16, "map : " + e.mapId.ToString());
                            scene.drawText(g, e.x - 1, e.y + 26, "entrance : " + e.entranceId.ToString());
                            scene.drawText(g, e.x - 1, e.y + 36, "mpos : " + e.mapPos.ToString());
                        }
                        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.x - 1, e.y + 1, e.entranceId.ToString("X2") + "- " + scene.mainForm.all_rooms[scene.mainForm.entrances[e.entranceId].Room].name);
                }
            }

            for (int i = 0; i < scene.ow.allholes.Length; i++)
            {
                EntranceOWEditor e = scene.ow.allholes[i];
                bgrBrush = new SolidBrush(Color.FromArgb((int)transparency, 32, 32, 32));
                if (e.mapId < 64 + scene.ow.worldOffset && e.mapId >= scene.ow.worldOffset)
                {
                    if (selectedEntrance != null)
                    {
                        if (e == selectedEntrance)
                        {
                            bgrBrush = new SolidBrush(Color.FromArgb((int)transparency, 0, 55, 240));
                        }
                    }

                    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.x - 1, e.y + 1, e.entranceId.ToString("X2") + "- " + scene.mainForm.all_rooms[scene.mainForm.entrances[e.entranceId].Room].name);
                }
            }
            g.CompositingMode = CompositingMode.SourceCopy;
        }
Esempio n. 2
0
        public void Draw(Graphics g)
        {
            int   transparency = 200;
            Brush bgrBrush     = new SolidBrush(Color.FromArgb((int)transparency, 255, 0, 255));
            Pen   contourPen   = new Pen(Color.FromArgb((int)transparency, 0, 0, 0));

            g.CompositingMode = CompositingMode.SourceOver;
            for (int i = scene.ow.worldOffset; i < 64 + scene.ow.worldOffset; i++)
            {
                int gs = scene.ow.gameState;
                if (i >= 64)
                {
                    gs = 0;
                }
                foreach (Sprite spr in scene.ow.allmaps[i].sprites[gs])
                {
                    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.map_x), spr.map_y, 16, 16));
                    g.DrawRectangle(contourPen, new Rectangle(spr.map_x, spr.map_y, 16, 16));
                    scene.drawText(g, spr.map_x + 4, spr.map_y + 4, spr.name);
                }
            }

            if (scene.selectedFormSprite != null)
            {
                g.FillRectangle(bgrBrush, new Rectangle((scene.selectedFormSprite.map_x), (scene.selectedFormSprite.map_y), 16, 16));
                g.DrawRectangle(contourPen, new Rectangle((scene.selectedFormSprite.map_x), (scene.selectedFormSprite.map_y), 16, 16));
                scene.drawText(g, (scene.selectedFormSprite.map_x) + 4, (scene.selectedFormSprite.map_y) + 4, scene.selectedFormSprite.name);
            }
            g.CompositingMode = CompositingMode.SourceCopy;
        }
Esempio n. 3
0
        public void Draw(Graphics g)
        {
            int   transparency = 200;
            Brush bgrBrush     = new SolidBrush(Color.FromArgb(transparency, 48, 188, 142));
            Pen   contourPen   = new Pen(Color.FromArgb(transparency, 0, 0, 0));

            g.CompositingMode = CompositingMode.SourceOver;
            for (int i = 0; i < scene.ow.allWhirlpools.Count; i++)
            {
                TransportOW e = scene.ow.allWhirlpools[i];

                if (e.mapId < 64 + scene.ow.worldOffset && e.mapId >= scene.ow.worldOffset)
                {
                    if (selectedTransport != null)
                    {
                        if (e == selectedTransport)
                        {
                            bgrBrush = new SolidBrush(Color.FromArgb((int)transparency, 0, 55, 240));
                            scene.drawText(g, e.playerX - 1, e.playerY + 16, "map : " + e.mapId.ToString());
                            //scene.drawText(g, e.playerX - 1, e.playerY + 26, "entrance : " + e.mapId.ToString());
                            scene.drawText(g, e.playerX - 4, e.playerY + 36, "mpos : " + e.vramLocation.ToString());
                        }
                        else
                        {
                            bgrBrush = new SolidBrush(Color.FromArgb((int)transparency, 255, 200, 16));
                        }
                    }

                    g.FillRectangle(bgrBrush, new Rectangle(e.playerX, e.playerY, 16, 16));
                    g.DrawRectangle(contourPen, new Rectangle(e.playerX, e.playerY, 16, 16));
                    if (i > 8)
                    {
                        scene.drawText(g, e.playerX + 4, e.playerY + 4, i.ToString("X2") + " - Whirlpool");
                    }
                    else
                    {
                        scene.drawText(g, e.playerX + 4, e.playerY + 4, i.ToString("X2") + " - Flute");
                    }
                }
            }
        }
Esempio n. 4
0
        public void Draw(Graphics g)
        {
            int transparency = 200;
            Pen bgrBrush     = new Pen(Color.FromArgb(transparency, 222, 16, 145));

            g.CompositingMode = CompositingMode.SourceOver;

            for (int i = 0; i < scene.ow.graves.Length; i++)
            {
                Gravestone e = scene.ow.graves[i];

                if (selectedGrave != null)
                {
                    if (e == selectedGrave)
                    {
                        bgrBrush = new Pen(Color.FromArgb((int)transparency, 14, 224, 146));
                        //scene.drawText(g, e.xTilePos + 8, e.yTilePos + 8, "ID : " + i.ToString("X2"));
                    }
                    else
                    {
                        bgrBrush = new Pen(Color.FromArgb((int)transparency, 222, 16, 145));
                    }
                }

                g.DrawRectangle(bgrBrush, new Rectangle(e.xTilePos, e.yTilePos, 32, 32));
                scene.drawText(g, e.xTilePos + 8, e.yTilePos + 8, i.ToString("X2"));

                //scene.drawText(g, e.xTilePos + 8, e.yTilePos + 40, e.tilemapPos.ToString("X4"));
                if (i == 0x0D) //stairs
                {
                    scene.drawText(g, e.xTilePos + 8, e.yTilePos + 16, "SPECIAL STAIRS");
                }

                if (i == 0x0E) //hole
                {
                    scene.drawText(g, e.xTilePos + 8, e.yTilePos + 16, "SPECIAL HOLE");
                }
            }
        }
Esempio n. 5
0
        public void Draw(Graphics g)
        {
            int   transparency = 200;
            Brush bgrBrush     = new SolidBrush(Color.FromArgb((int)transparency, 200, 0, 0));
            Pen   contourPen   = new Pen(Color.FromArgb((int)transparency, 0, 0, 0));

            g.CompositingMode = CompositingMode.SourceOver;
            foreach (RoomPotSaveEditor item in scene.ow.allitems)
            {
                if (item.roomMapId >= (0 + scene.ow.worldOffset) && item.roomMapId < (64 + scene.ow.worldOffset))
                {
                    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.x) - 1, (item.y) + 1, item.id.ToString("X2") + " - " + ItemsNames.name[nid]);
                }
            }
            g.CompositingMode = CompositingMode.SourceCopy;
        }
Esempio n. 6
0
        public void Draw(Graphics g)
        {
            int transparency = 200;

            if (scene.lowEndMode)
            {
                for (int i = 0; i < 78; i++)
                {
                    g.CompositingMode = CompositingMode.SourceOver;
                    ExitOW ex = scene.ow.allexits[i];
                    if (ex.mapId != scene.ow.allmaps[scene.selectedMap].parent)
                    {
                        continue;
                    }

                    if (ex.mapId < 64 + scene.ow.worldOffset && ex.mapId >= scene.ow.worldOffset)
                    {
                        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 == ex)
                            {
                                g.CompositingMode = CompositingMode.SourceOver;
                                bgrBrush          = new SolidBrush(Color.FromArgb((int)transparency, 160, 160, 160));
                                g.FillRectangle(bgrBrush, new Rectangle(ex.playerX, ex.playerY, 16, 16));
                                g.DrawRectangle(contourPen, new Rectangle(ex.playerX, ex.playerY, 16, 16));
                                scene.drawText(g, ex.playerX + 4, ex.playerY + 4, i.ToString("X2"));

                                int sy = ex.mapId / 8;
                                int sx = ex.mapId - (sy * 8);

                                g.DrawRectangle(Pens.LightPink, new Rectangle(ex.xScroll, ex.yScroll, 256, 224));
                                g.DrawLine(Pens.Blue, ex.cameraX - 8, ex.cameraY, ex.cameraX + 8, ex.cameraY);
                                g.DrawLine(Pens.Blue, ex.cameraX, ex.cameraY - 8, ex.cameraX, ex.cameraY + 8);
                                g.CompositingMode = CompositingMode.SourceCopy;
                                continue;
                            }

                            g.FillRectangle(bgrBrush, new Rectangle(ex.playerX, ex.playerY, 16, 16));
                            g.DrawRectangle(contourPen, new Rectangle(ex.playerX, ex.playerY, 16, 16));
                            scene.drawText(g, ex.playerX + 4, ex.playerY + 4, i.ToString("X2"));
                        }
                        else
                        {
                            if (selectedExit == ex)
                            {
                                g.CompositingMode = CompositingMode.SourceOver;

                                //g.DrawImage(jsonData.linkGfx, ex.playerX, ex.playerY, new Rectangle(16, 0, 16, 16), GraphicsUnit.Pixel);
                                //g.DrawImage(jsonData.linkGfx, ex.playerX, ex.playerY + 8, new Rectangle(48, 16, 16, 16), GraphicsUnit.Pixel);
                                g.CompositingMode = CompositingMode.SourceOver;
                                bgrBrush          = new SolidBrush(Color.FromArgb((int)transparency, 160, 160, 160));
                                g.FillRectangle(bgrBrush, new Rectangle(ex.playerX, ex.playerY, 16, 16));
                                g.DrawRectangle(contourPen, new Rectangle(ex.playerX, ex.playerY, 16, 16));
                                scene.drawText(g, ex.playerX + 4, ex.playerY + 4, i.ToString("X2"));
                                g.CompositingMode = CompositingMode.SourceCopy;
                                int sy = ex.mapId / 8;
                                int sx = ex.mapId - (sy * 8);
                                g.DrawRectangle(Pens.LightPink, new Rectangle(ex.xScroll, ex.yScroll, 256, 224));
                                g.DrawLine(Pens.Blue, ex.cameraX - 8, ex.cameraY, ex.cameraX + 8, ex.cameraY);
                                g.DrawLine(Pens.Blue, ex.cameraX, ex.cameraY - 8, ex.cameraX, ex.cameraY + 8);
                            }
                            else
                            {
                                g.FillRectangle(bgrBrush, new Rectangle(ex.playerX, ex.playerY, 16, 16));
                                g.DrawRectangle(contourPen, new Rectangle(ex.playerX, ex.playerY, 16, 16));

                                scene.drawText(g, ex.playerX + 4, ex.playerY + 4, i.ToString("X2"));
                            }
                        }
                    }
                }

                g.CompositingMode = CompositingMode.SourceCopy;
            }
            else
            {
                for (int i = 0; i < 78; i++)
                {
                    g.CompositingMode = CompositingMode.SourceOver;
                    ExitOW ex = scene.ow.allexits[i];

                    if (ex.mapId < 64 + scene.ow.worldOffset && ex.mapId >= scene.ow.worldOffset)
                    {
                        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 == ex)
                            {
                                g.CompositingMode = CompositingMode.SourceOver;
                                bgrBrush          = new SolidBrush(Color.FromArgb((int)transparency, 160, 160, 160));
                                g.FillRectangle(bgrBrush, new Rectangle(ex.playerX, ex.playerY, 16, 16));
                                g.DrawRectangle(contourPen, new Rectangle(ex.playerX, ex.playerY, 16, 16));
                                scene.drawText(g, ex.playerX + 4, ex.playerY + 4, i.ToString("X2"));

                                int sy = ex.mapId / 8;
                                int sx = ex.mapId - (sy * 8);

                                g.DrawRectangle(Pens.LightPink, new Rectangle(ex.xScroll, ex.yScroll, 256, 224));
                                g.DrawLine(Pens.Blue, ex.cameraX - 8, ex.cameraY, ex.cameraX + 8, ex.cameraY);
                                g.DrawLine(Pens.Blue, ex.cameraX, ex.cameraY - 8, ex.cameraX, ex.cameraY + 8);
                                g.CompositingMode = CompositingMode.SourceCopy;
                                continue;
                            }

                            g.FillRectangle(bgrBrush, new Rectangle(ex.playerX, ex.playerY, 16, 16));
                            g.DrawRectangle(contourPen, new Rectangle(ex.playerX, ex.playerY, 16, 16));
                            scene.drawText(g, ex.playerX + 4, ex.playerY + 4, i.ToString("X2"));
                        }
                        else
                        {
                            if (selectedExit == ex)
                            {
                                g.CompositingMode = CompositingMode.SourceOver;

                                //g.DrawImage(jsonData.linkGfx, ex.playerX, ex.playerY, new Rectangle(16, 0, 16, 16), GraphicsUnit.Pixel);
                                //g.DrawImage(jsonData.linkGfx, ex.playerX, ex.playerY + 8, new Rectangle(48, 16, 16, 16), GraphicsUnit.Pixel);
                                g.CompositingMode = CompositingMode.SourceOver;
                                bgrBrush          = new SolidBrush(Color.FromArgb((int)transparency, 160, 160, 160));
                                g.FillRectangle(bgrBrush, new Rectangle(ex.playerX, ex.playerY, 16, 16));
                                g.DrawRectangle(contourPen, new Rectangle(ex.playerX, ex.playerY, 16, 16));
                                scene.drawText(g, ex.playerX + 4, ex.playerY + 4, i.ToString("X2"));
                                g.CompositingMode = CompositingMode.SourceCopy;
                                int sy = ex.mapId / 8;
                                int sx = ex.mapId - (sy * 8);
                                g.DrawRectangle(Pens.LightPink, new Rectangle(ex.xScroll, ex.yScroll, 256, 224));
                                g.DrawLine(Pens.Blue, ex.cameraX - 8, ex.cameraY, ex.cameraX + 8, ex.cameraY);
                                g.DrawLine(Pens.Blue, ex.cameraX, ex.cameraY - 8, ex.cameraX, ex.cameraY + 8);
                            }
                            else
                            {
                                g.FillRectangle(bgrBrush, new Rectangle(ex.playerX, ex.playerY, 16, 16));
                                g.DrawRectangle(contourPen, new Rectangle(ex.playerX, ex.playerY, 16, 16));

                                scene.drawText(g, ex.playerX + 4, ex.playerY + 4, i.ToString("X2"));
                            }
                        }
                    }
                }

                g.CompositingMode = CompositingMode.SourceCopy;
            }
        }
Esempio n. 7
0
        public void Draw(Graphics g)
        {
            if (scene.lowEndMode)
            {
                int   transparency = 200;
                Brush bgrBrush     = new SolidBrush(Color.FromArgb(transparency, 255, 0, 255));
                Pen   contourPen   = new Pen(Color.FromArgb(transparency, 0, 0, 0));
                g.CompositingMode = CompositingMode.SourceOver;

                for (int i = 0; i < scene.ow.allsprites[scene.ow.gameState].Count; i++)
                {
                    Sprite spr = scene.ow.allsprites[scene.ow.gameState][i];

                    if (spr.mapid != scene.ow.allmaps[scene.selectedMap].parent)
                    {
                        continue;
                    }

                    if (spr.mapid < 64 + scene.ow.worldOffset && spr.mapid >= scene.ow.worldOffset)
                    {
                        /*if (selectedEntrance != null)
                         * {
                         *  if (e == selectedEntrance)
                         *  {
                         *      bgrBrush = new SolidBrush(Color.FromArgb((int)transparency, 0, 55, 240));
                         *      scene.drawText(g, e.x - 1, e.y + 16, "map : " + e.mapId.ToString());
                         *      scene.drawText(g, e.x - 1, e.y + 26, "entrance : " + e.entranceId.ToString());
                         *      scene.drawText(g, e.x - 1, e.y + 36, "mpos : " + e.mapPos.ToString());
                         *  }
                         *  else
                         *  {
                         *      bgrBrush = new SolidBrush(Color.FromArgb((int)transparency, 255, 200, 16));
                         *  }
                         * }*/

                        g.FillRectangle(bgrBrush, new Rectangle(spr.map_x, spr.map_y, 16, 16));
                        g.DrawRectangle(contourPen, new Rectangle(spr.map_x, spr.map_y, 16, 16));
                        scene.drawText(g, spr.map_x + 4, spr.map_y + 4, spr.name);
                    }
                }

                g.CompositingMode = CompositingMode.SourceCopy;
            }
            else
            {
                int   transparency = 200;
                Brush bgrBrush     = new SolidBrush(Color.FromArgb(transparency, 255, 0, 255));
                Pen   contourPen   = new Pen(Color.FromArgb(transparency, 0, 0, 0));
                g.CompositingMode = CompositingMode.SourceOver;
                for (int i = 0; i < scene.ow.allsprites[scene.ow.gameState].Count; i++)
                {
                    Sprite spr = scene.ow.allsprites[scene.ow.gameState][i];

                    if (spr.mapid < 64 + scene.ow.worldOffset && spr.mapid >= scene.ow.worldOffset)
                    {
                        /*if (selectedEntrance != null)
                         * {
                         *  if (e == selectedEntrance)
                         *  {
                         *      bgrBrush = new SolidBrush(Color.FromArgb((int)transparency, 0, 55, 240));
                         *      scene.drawText(g, e.x - 1, e.y + 16, "map : " + e.mapId.ToString());
                         *      scene.drawText(g, e.x - 1, e.y + 26, "entrance : " + e.entranceId.ToString());
                         *      scene.drawText(g, e.x - 1, e.y + 36, "mpos : " + e.mapPos.ToString());
                         *  }
                         *  else
                         *  {
                         *      bgrBrush = new SolidBrush(Color.FromArgb((int)transparency, 255, 200, 16));
                         *  }
                         * }*/

                        g.FillRectangle(bgrBrush, new Rectangle(spr.map_x, spr.map_y, 16, 16));
                        g.DrawRectangle(contourPen, new Rectangle(spr.map_x, spr.map_y, 16, 16));
                        scene.drawText(g, spr.map_x + 4, spr.map_y + 4, spr.name);
                    }
                }

                g.CompositingMode = CompositingMode.SourceCopy;
            }
        }