Esempio n. 1
0
        /// <summary>
        /// NG !!!
        /// </summary>
        public void Test03()
        {
            const int DER_WH = 60;
            const int DERS_W = 16;
            const int DERS_H = 9;

            DDPicture wallPicture = DDCCResource.GetPicture(@"dat\テスト用\IMG_20160000_000040.jpg");

            DDSubScreen screen = new DDSubScreen(DDConsts.Screen_W, DDConsts.Screen_H);

            DDPicture[,] ders = DDDerivations.GetAnimation(screen.ToPicture(), 0, 0, DERS_W, DERS_H, DER_WH, DER_WH);

            for (; ;)
            {
                using (screen.Section())
                {
                    DDDraw.DrawCenter(wallPicture, DDConsts.Screen_W / 2, DDConsts.Screen_H / 2);
                }

                for (int x = 0; x < DERS_W; x++)
                {
                    for (int y = 0; y < DERS_H; y++)
                    {
                        DDDraw.DrawRect(ders[x, y], x * DER_WH, y * DER_WH, (x + 1) * DER_WH, (y + 1) * DER_WH);
                    }
                }

                DDEngine.EachFrame();
            }
        }
Esempio n. 2
0
        private void P_Draw()
        {
            const double BASIC_ZOOM = 1.0;

            DDDraw.SetAlpha(this.A);
            DDDraw.DrawBegin(DDCCResource.GetPicture(this.ImageFile), this.X, this.Y + Math.Sin(DDEngine.ProcFrame / 67.0 + this.Draw_Rnd) * 2.0);
            DDDraw.DrawZoom(BASIC_ZOOM * this.Zoom);
            DDDraw.DrawEnd();
            DDDraw.Reset();
        }
Esempio n. 3
0
        public void Test04()
        {
            const int DER_WH = 60;
            const int DERS_W = 16;
            const int DERS_H = 9;

            DDPicture wallPicture = DDCCResource.GetPicture(@"dat\テスト用\IMG_20160000_000040.jpg");

            DDSubScreen screen = new DDSubScreen(DDConsts.Screen_W, DDConsts.Screen_H);

            DDSubScreen[,] ders = new DDSubScreen[DERS_W, DERS_H];

            for (int x = 0; x < DERS_W; x++)
            {
                for (int y = 0; y < DERS_H; y++)
                {
                    ders[x, y] = new DDSubScreen(DER_WH, DER_WH);
                }
            }

            for (; ;)
            {
                DDDraw.DrawCenter(wallPicture, DDConsts.Screen_W / 2, DDConsts.Screen_H / 2);

                for (int x = 0; x < DERS_W; x++)
                {
                    for (int y = 0; y < DERS_H; y++)
                    {
                        using (ders[x, y].Section())
                            DX.DrawRectGraph(0, 0, x * DER_WH, y * DER_WH, (x + 1) * DER_WH, (y + 1) * DER_WH, DDGround.MainScreen.GetHandle(), 0);
                    }
                }

                using (screen.Section())
                {
                    for (int x = 0; x < DERS_W; x++)
                    {
                        for (int y = 0; y < DERS_H; y++)
                        {
                            DDDraw.DrawFree(
                                ders[x, y].ToPicture(),
                                new D2Point((x + 0) * DER_WH, (y + 0) * DER_WH),
                                new D2Point((x + 1) * DER_WH, (y + 0) * DER_WH),
                                new D2Point((x + 1) * DER_WH, (y + 1) * DER_WH),
                                new D2Point((x + 0) * DER_WH, (y + 1) * DER_WH)
                                );
                        }
                    }
                }

                DDDraw.DrawSimple(screen.ToPicture(), 0, 0);

                DDEngine.EachFrame();
            }
        }
Esempio n. 4
0
        public void Test02()
        {
            DDPicture picture = DDCCResource.GetPicture(@"dat\Novel\背景.png");

            DDSubScreen s000 = new DDSubScreen(picture.Get_W(), picture.Get_H());
            DDSubScreen s001 = new DDSubScreen(picture.Get_W(), picture.Get_H());
            DDSubScreen s010 = new DDSubScreen(picture.Get_W(), picture.Get_H());
            DDSubScreen s011 = new DDSubScreen(picture.Get_W(), picture.Get_H());
            DDSubScreen s100 = new DDSubScreen(picture.Get_W(), picture.Get_H());
            DDSubScreen s101 = new DDSubScreen(picture.Get_W(), picture.Get_H());
            DDSubScreen s110 = new DDSubScreen(picture.Get_W(), picture.Get_H());
            DDSubScreen s111 = new DDSubScreen(picture.Get_W(), picture.Get_H());

            Draw(picture, "RRR", s000);
            Draw(picture, "RRG", s001);
            Draw(picture, "RGR", s010);
            Draw(picture, "RGG", s011);
            Draw(picture, "GRR", s100);
            Draw(picture, "GRG", s101);
            Draw(picture, "GGR", s110);
            Draw(picture, "GGG", s111);

            DDSubScreen[] screens = new DDSubScreen[]
            {
                s000,
                s001,
                s010,
                s011,
                s100,
                s101,
                s110,
                s111,
            };

            int displayIndex = 0;

            for (; ;)
            {
                if (DDInput.DIR_8.IsPound())
                {
                    displayIndex--;
                }
                if (DDInput.DIR_2.IsPound())
                {
                    displayIndex++;
                }
                displayIndex += screens.Length;
                displayIndex %= screens.Length;

                DDDraw.DrawSimple(screens[displayIndex].ToPicture(), 0, 0);

                DDEngine.EachFrame();
            }
        }
Esempio n. 5
0
        public void Test01()
        {
            // G,B がほぼ同じなのでバリエーション出ない。

            DDPicture picture = DDCCResource.GetPicture(@"dat\Novel\背景.png");

            DDSubScreen rgb = new DDSubScreen(picture.Get_W(), picture.Get_H());
            DDSubScreen rbg = new DDSubScreen(picture.Get_W(), picture.Get_H());
            DDSubScreen grb = new DDSubScreen(picture.Get_W(), picture.Get_H());
            DDSubScreen gbr = new DDSubScreen(picture.Get_W(), picture.Get_H());
            DDSubScreen brg = new DDSubScreen(picture.Get_W(), picture.Get_H());
            DDSubScreen bgr = new DDSubScreen(picture.Get_W(), picture.Get_H());

            Draw(picture, "RGB", rgb);
            Draw(picture, "RBG", rbg);
            Draw(picture, "GRB", grb);
            Draw(picture, "GBR", gbr);
            Draw(picture, "BRG", brg);
            Draw(picture, "BGR", bgr);

            DDSubScreen[] screens = new DDSubScreen[]
            {
                rgb,
                rbg,
                grb,
                gbr,
                brg,
                bgr,
            };

            int displayIndex = 0;

            for (; ;)
            {
                if (DDInput.DIR_8.IsPound())
                {
                    displayIndex--;
                }
                if (DDInput.DIR_2.IsPound())
                {
                    displayIndex++;
                }
                displayIndex += screens.Length;
                displayIndex %= screens.Length;

                DDDraw.DrawSimple(screens[displayIndex].ToPicture(), 0, 0);

                DDEngine.EachFrame();
            }
        }
Esempio n. 6
0
            // <---- prm

            public void Draw()
            {
                DDUtils.Approach(ref this.SlideRate, this.DestSlideRate, 0.9999);

                DDPicture picture = DDCCResource.GetPicture(this.ImageFile);
                D2Size    size    = DDUtils.AdjustRectExterior(picture.GetSize().ToD2Size(), new D4Rect(0, 0, DDConsts.Screen_W, DDConsts.Screen_H)).Size;

                DDDraw.SetAlpha(this.A);
                DDDraw.DrawRect(
                    picture,
                    (DDConsts.Screen_W - size.W) * this.SlideRate,
                    (DDConsts.Screen_H - size.H) * this.SlideRate,
                    size.W,
                    size.H
                    );
                DDDraw.Reset();
            }
Esempio n. 7
0
 public static DDPicture Get箱から出る背景(int stageIndex)
 {
     return(DDCCResource.GetPicture(@"dat\背景\箱から出る_背景_Floor" + stageIndex + ".png"));
 }
Esempio n. 8
0
        public void Test05()
        {
            const int DER_WH = 60;
            const int DERS_W = 16;
            const int DERS_H = 9;

            DDPicture wallPicture = DDCCResource.GetPicture(@"dat\テスト用\IMG_20160000_000040.jpg");

            DDSubScreen screen = new DDSubScreen(DDConsts.Screen_W, DDConsts.Screen_H);

            DDSubScreen[,] ders = new DDSubScreen[DERS_W, DERS_H];

            for (int x = 0; x < DERS_W; x++)
            {
                for (int y = 0; y < DERS_H; y++)
                {
                    ders[x, y] = new DDSubScreen(DER_WH, DER_WH);
                }
            }

            for (; ;)
            {
                DDDraw.DrawCenter(wallPicture, DDConsts.Screen_W / 2, DDConsts.Screen_H / 2);

                for (int x = 0; x < DERS_W; x++)
                {
                    for (int y = 0; y < DERS_H; y++)
                    {
                        using (ders[x, y].Section())
                            DX.DrawRectGraph(0, 0, x * DER_WH, y * DER_WH, (x + 1) * DER_WH, (y + 1) * DER_WH, DDGround.MainScreen.GetHandle(), 0);
                    }
                }

                using (screen.Section())
                {
                    for (int x = 0; x < DERS_W; x++)
                    {
                        for (int y = 0; y < DERS_H; y++)
                        {
                            D2Point lt = new D2Point((x + 0) * DER_WH, (y + 0) * DER_WH);
                            D2Point rt = new D2Point((x + 1) * DER_WH, (y + 0) * DER_WH);
                            D2Point rb = new D2Point((x + 1) * DER_WH, (y + 1) * DER_WH);
                            D2Point lb = new D2Point((x + 0) * DER_WH, (y + 1) * DER_WH);

                            Func <D2Point, D2Point> f;

                            // -- choose one --

                            //f = Test05_波紋効果による頂点の移動;
                            f = Test05_波紋効果による頂点の移動_高速;

                            // --

                            lt = f(lt);
                            rt = f(rt);
                            rb = f(rb);
                            lb = f(lb);

                            DDDraw.DrawFree(ders[x, y].ToPicture(), lt, rt, rb, lb);
                        }
                    }
                }

                DDDraw.DrawSimple(screen.ToPicture(), 0, 0);

                DDEngine.EachFrame();
            }
        }
Esempio n. 9
0
 private static DDPicture GetPicture(int index)
 {
     return(DDCCResource.GetPicture(PIC_PREFIX + index + PIC_SUFFIX));
 }