コード例 #1
0
        // point update for animations
        internal void ResetTile(Loc loc)
        {
            Image img = Refs.mf.MainBitmap.Image;

            SetBlank(img, Refs.m.TileByLoc(loc));
            TileDraw.AddForegroundStuff(img, Refs.m.TileByLoc(loc));
        }
コード例 #2
0
        public Bitmap AsBitmap()
        {
            Bitmap   bmp = new Bitmap((int)(800), (int)(400));
            Graphics gr  = Graphics.FromImage(bmp);

            // clear the canvas to dark
            Rectangle pgRect = new Rectangle(0, 0, bmp.Width, bmp.Height);

            using (var solidBlack = new SolidBrush(Color.DarkSlateBlue))
            {
                gr.FillRectangle(solidBlack, pgRect);
            }

            // frame the image with a black border
            Rectangle rc = new Rectangle(5, 5, bmp.Width - 10, bmp.Height - 10);

            using (var whitePen = new Pen(Color.White, 4))
            {
                gr.DrawRectangle(whitePen, rc);
            }

            // do all backgrounds here (includes flow, los, glow effects)
            Refs.m.RunLos();
            Refs.m.RunGlows();
            foreach (MapTile t in tiles)
            {
                TileDraw.AddBackgroundStuff(bmp, t);
            }

            // add walls, nectar
            foreach (MapTile t in tiles)
            {
                TileDraw.AddForegroundStuff(bmp, t);
            }

            // add specials
            TileDraw.AddCharSpecial(bmp, "⛤");

            // add mobiles, player and harem
            TileDraw.AddCharMobile(bmp, Refs.p);
            foreach (Cubi c in Refs.h.roster)
            {
                TileDraw.AddCharMobile(bmp, c);
            }

            return(bmp);
        }
コード例 #3
0
        // point update for animations
        public void CubiSingleTileUpdate(Cubi c)
        {
            Image img = Refs.mf.MainBitmap.Image;

            TileDraw.AddCharMobile(img, c);
        }