Exemplo 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();
            }
        }
Exemplo n.º 2
0
        private static IEnumerable <DDPicture[]> Get_D_TAMA_00()
        {
            int tamaColorNum = Enum.GetValues(typeof(EnemyCommon.TAMA_COLOR_e)).Length;
            int y            = 0;

            yield return(DDDerivations.GetAnimation_YX(Ground.I.Picture.P_TAMA, 0, y, 10, 10, tamaColorNum, 1).ToArray()); y       += 10;      // SMALL
            yield return(DDDerivations.GetAnimation_YX(Ground.I.Picture.P_TAMA, 0, y, 24, 24, tamaColorNum, 1).ToArray()); y       += 24;      // NORMAL
            yield return(DDDerivations.GetAnimation_YX(Ground.I.Picture.P_TAMA, 0, y, 24, 24, tamaColorNum, 1).ToArray()); y       += 24;      // DOUBLE
            yield return(DDDerivations.GetAnimation_YX(Ground.I.Picture.P_TAMA, 0, y, 30, 30, tamaColorNum, 1).ToArray()); y       += 30;      // BIG
            yield return(DDDerivations.GetAnimation_XY(Ground.I.Picture.P_TAMA_B, 0, y, 64, 64, tamaColorNum / 2, 2).ToArray()); y += 128;     // LARGE

            y = 477;

            yield return(DDDerivations.GetAnimation_YX(Ground.I.Picture.P_TAMA, 0, y, 21, 30, tamaColorNum, 1).ToArray()); y   += 30;          // KNIFE
            yield return(DDDerivations.GetAnimation_YX(Ground.I.Picture.P_TAMA_B, 0, y, 29, 29, tamaColorNum, 1).ToArray()); y += 30;          // ECLIPSE
            yield return(DDDerivations.GetAnimation_YX(Ground.I.Picture.P_TAMA_B, 0, y, 29, 29, tamaColorNum, 1).ToArray()); y += 30;          // ECLIPSE_DOUBLE
        }
Exemplo n.º 3
0
        private static DDTable <DDPicture> GetDerivationTable(DDPicture pic, int w, int h)
        {
            DDTable <DDPicture> table = new DDTable <DDPicture>(w, h);

            int dw = pic.Get_W() / w;
            int dh = pic.Get_H() / h;

            if (dw * w != pic.Get_W())
            {
                throw new DDError();                                    // 2bs
            }
            if (dh * h != pic.Get_H())
            {
                throw new DDError();                                    // 2bs
            }
            for (int x = 0; x < w; x++)
            {
                for (int y = 0; y < h; y++)
                {
                    table[x, y] = DDDerivations.GetPicture(pic, x * dw, y * dh, dw, dh);
                }
            }
            return(table);
        }
Exemplo n.º 4
0
 public PlayerInfo(DDPicture picture)
 {
     this.Picture      = picture;
     this.PictureTable = DDDerivations.GetAnimation(picture, 0, 0, 24, 32);
 }