Esempio n. 1
0
 public RoomViewer(GameDefinition definition, AcsLib.Region region, Room room)
 {
     InitializeComponent();
     this.definition = definition;
     this.region     = region;
     this.room       = room;
     if (this.definition.System == GameDefinition.SystemType.Apple)
     {
         picWidth = 14;
     }
     this.Text = room.Name;
 }
Esempio n. 2
0
        public void UpdateMap(AcsLib.Region region)
        {
            this.Text = "Region " + region.Name;
            Graphics gr    = Graphics.FromImage(bmp);
            Brush    brush = new SolidBrush(Color.Black);

            gr.Clear(Color.White);
            foreach (Room room in region.Rooms)
            {
                if (room.Deleted)
                {
                    continue;
                }
                gr.FillRectangle(brush, room.XPosition * CELLSIZE, room.YPosition * CELLSIZE, room.Width * CELLSIZE, CELLSIZE);
                gr.FillRectangle(brush, room.XPosition * CELLSIZE, room.YPosition * CELLSIZE, CELLSIZE, room.Height * CELLSIZE);
                gr.FillRectangle(brush, room.XPosition * CELLSIZE, room.YPosition * CELLSIZE + room.Height * CELLSIZE - CELLSIZE, room.Width * CELLSIZE, CELLSIZE);
                gr.FillRectangle(brush, room.XPosition * CELLSIZE + room.Width * CELLSIZE - CELLSIZE, room.YPosition * CELLSIZE, CELLSIZE, room.Height * CELLSIZE);
            }

            this.Refresh();
        }