private IEnumerable <bool> GetLayer04(string imgFile) { DDPicture img = DDPictureLoaders.Standard(imgFile); // g double y = -190.0; double a = 0.0; double spa = 0.0; SpectrumScreen0001 spScr = new SpectrumScreen0001(); for (int frmcnt = 0; ; frmcnt++) { DDDraw.DrawBegin(img, DDConsts.Screen_W / 2, DDConsts.Screen_H / 2 - y); DDDraw.DrawZoom(1.353); DDDraw.SetAlpha(a); DDDraw.DrawEnd(); spScr.Draw(this.SpData.Rows[this.Frame]); DDDraw.DrawBegin(DDPictureLoaders2.Wrapper(spScr.Screen), 1500, 400); DDDraw.SetAlpha(spa); DDDraw.DrawZoom(0.75); DDDraw.DrawEnd(); DDUtils.Approach(ref y, 190.0, 0.9995); DDUtils.Approach(ref a, 1.0, 0.9); if (60 < frmcnt) { DDUtils.Approach(ref spa, 1.0, 0.95); } yield return(true); } }
/// <summary> /// ゲーム中のロード画面 /// </summary> private void LoadMenu() { using (new SaveOrLoadMenu()) { SaveDataSlot sdSlot = SaveOrLoadMenu.I.Load(() => { DDPicture picture = Ground.I.Picture.Title; DDDraw.DrawRect( picture, DDUtils.AdjustRectExterior(picture.GetSize().ToD2Size(), new D4Rect(0, 0, DDConsts.Screen_W, DDConsts.Screen_H)) ); DDCurtain.DrawCurtain(-0.5); }); if (sdSlot != null) { this.Status = GameStatus.Deserialize(sdSlot.SerializedGameStatus); this.CurrPage = this.Status.Scenario.Pages[this.Status.CurrPageIndex]; this.DispSubtitleCharCount = 0; this.DispCharCount = 0; this.DispPageEndedCount = 0; this.DispFastMode = false; } } DDEngine.FreezeInput(GameConsts.LONG_INPUT_SLEEP); }
public override IEnumerable <bool> E_Task() { DDPicture picture = Ground.I.Picture.TitleMenuItems[this.SelfIndex]; double targX = ITEM_UNSEL_X; double targA = ITEM_UNSEL_A; double x = targX; double y = ITEM_Y + this.SelfIndex * ITEM_Y_STEP; double a = targA; for (; ;) { targX = TitleMenu.I.TopMenu.SelectIndex == this.SelfIndex ? ITEM_SEL_X : ITEM_UNSEL_X; targA = TitleMenu.I.TopMenu.SelectIndex == this.SelfIndex ? ITEM_SEL_A : ITEM_UNSEL_A; DDUtils.Approach(ref x, targX, 0.93); DDUtils.Approach(ref a, targA, 0.93); DDDraw.SetAlpha(a); DDDraw.DrawCenter(picture, x, y); DDDraw.Reset(); yield return(true); } }
public void Test02() { DDPicture title_wall = DDPictureLoaders.Standard("title_wall.png"); for (; ;) { DDDraw.DrawFree( title_wall, new D2Point( Math.Cos(DDEngine.ProcFrame / 11.0) * 100 + 100, Math.Sin(DDEngine.ProcFrame / 11.0) * 100 + 100 ), new D2Point( Math.Cos(DDEngine.ProcFrame / 13.0) * 100 + 700, Math.Sin(DDEngine.ProcFrame / 13.0) * 100 + 100 ), new D2Point( Math.Cos(DDEngine.ProcFrame / 17.0) * 100 + 700, Math.Sin(DDEngine.ProcFrame / 17.0) * 100 + 500 ), new D2Point( Math.Cos(DDEngine.ProcFrame / 19.0) * 100 + 100, Math.Sin(DDEngine.ProcFrame / 19.0) * 100 + 500 ) ); DDEngine.EachFrame(); } }
private void Draw(DDPicture src, string colorOrder, DDSubScreen dest) { Func <char, int> a_charToBlend = chr => { switch (chr) { case 'R': return(DX.DX_RGBA_SELECT_BLEND_R); case 'G': return(DX.DX_RGBA_SELECT_BLEND_G); case 'B': return(DX.DX_RGBA_SELECT_BLEND_B); default: throw null; // never } }; DX.GraphBlend( dest.GetHandle(), // ソース画像かつ出力先 src.GetHandle(), // ブレンド画像 255, DX.DX_GRAPH_BLEND_RGBA_SELECT_MIX, a_charToBlend(colorOrder[0]), // 出力先に適用する R 値 a_charToBlend(colorOrder[1]), // 出力先に適用する G 値 a_charToBlend(colorOrder[2]), // 出力先に適用する B 値 DX.DX_RGBA_SELECT_SRC_A // 出力先に適用する A 値 ); }
/// <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(); } }
private IEnumerable <bool> E_DrawItem(int selfIndex) { DDPicture picture = Ground.I.Picture2.TitleMenuItem[0, selfIndex]; const double ITEM_UNSEL_X = 120.0; const double ITEM_UNSEL_A = 0.5; const double ITEM_SEL_X = 140.0; const double ITEM_SEL_A = 1.0; const double ITEM_Y = 195.0; const double ITEM_Y_STEP = 50.0; double x = ITEM_SEL_X; double y = ITEM_Y + selfIndex * ITEM_Y_STEP; double a = ITEM_UNSEL_A; double realX = -100.0 - selfIndex * 200.0; double realY = y; double realA = a; for (; ;) { x = this.SelectIndex == selfIndex ? ITEM_SEL_X : ITEM_UNSEL_X; a = this.SelectIndex == selfIndex ? ITEM_SEL_A : ITEM_UNSEL_A; DDUtils.Approach(ref realX, x, 0.93); DDUtils.Approach(ref realA, a, 0.93); DDDraw.SetAlpha(realA); DDDraw.DrawCenter(picture, realX, realY); DDDraw.Reset(); yield return(true); } }
public override IEnumerable <bool> E_Task() { DDTaskList el = new DDTaskList(); //el.Add(SCommon.Supplier(this.Effect_0001(1, 2, 3))); //el.Add(SCommon.Supplier(this.Effect_0001(4, 5, 6))); //el.Add(SCommon.Supplier(this.Effect_0001(7, 8, 9))); for (int frame = 0; ; frame++) { DDPicture picture = Ground.I.Picture.Title; DDDraw.DrawRect( picture, DDUtils.AdjustRectExterior(picture.GetSize().ToD2Size(), new D4Rect(0, 0, DDConsts.Screen_W, DDConsts.Screen_H)) ); DDCurtain.DrawCurtain(-0.8); if (!this.TopMenuLeaved) { DDPrint.SetBorder(new I3Color(128, 0, 0)); DDPrint.SetPrint(75, 110, 0, 60); DDPrint.Print("横スクロール アクション(仮)"); DDPrint.Reset(); } el.ExecuteAllTask_Reverse(); yield return(true); } }
public override IEnumerable <bool> E_Task() { DDPicture picture = new DDPicture[] { Ground.I.Picture.TitleMenuItem_はじめから, Ground.I.Picture.TitleMenuItem_つづきから, Ground.I.Picture.TitleMenuItem_設定, Ground.I.Picture.TitleMenuItem_終了, } [this.SelfIndex]; double targX = ITEM_X; double targA = ITEM_A; double x = targX; double y = ITEM_Y + this.SelfIndex * ITEM_Y_STEP; double a = targA; for (; ;) { targX = TitleMenu.I.TopMenu.SelectIndex == this.SelfIndex ? ITEM_SEL_X : ITEM_X; targA = TitleMenu.I.TopMenu.SelectIndex == this.SelfIndex ? ITEM_SEL_A : ITEM_A; DDUtils.Approach(ref x, targX, 0.93); DDUtils.Approach(ref a, targA, 0.93); DDDraw.SetAlpha(a); DDDraw.DrawCenter(picture, x, y); DDDraw.Reset(); this.Selected = !DDUtils.IsOut(new D2Point(DDMouse.X, DDMouse.Y), new D4Rect(ITEM_X - ITEM_W / 2, y - ITEM_H / 2, ITEM_W, ITEM_H)); yield return(true); } }
// ---- public Design_0001( DDPicture wallPicture_01, DDPicture wallPicture_02, DDPicture wallPicture_03, I3Color color_01, I3Color color_02, I3Color color_03, I3Color color_a, I3Color color_b, I3Color enemyColor_arkanoid, I3Color enemyColor_cookie, I3Color enemyColor_death_a, I3Color enemyColor_death_b, I3Color enemyColor_pata, double wallAlpha, bool 市松tic, Action <Design_0001> extendedCtor ) { this.WallPicture_01 = wallPicture_01; this.WallPicture_02 = wallPicture_02; this.WallPicture_03 = wallPicture_03; this.Color_01 = color_01; this.Color_02 = color_02; this.Color_03 = color_03; this.Color_A = color_a; this.Color_B = color_b; this.EnemyColor_Arkanoid = enemyColor_arkanoid; this.EnemyColor_Cookie = enemyColor_cookie; this.EnemyColor_Death_A = enemyColor_death_a; this.EnemyColor_Death_B = enemyColor_death_b; this.EnemyColor_Pata = enemyColor_pata; this.WallAlpha = wallAlpha; this.市松tic = 市松tic; }
public override IEnumerable <bool> E_Task() { DDPicture picture = Ground.I.Picture.Title; double slideRate = 0.0; double leaveRate = 0.0; double z = 1.0; for (; ;) { DDUtils.Approach(ref slideRate, 1.0, 0.9999); DDUtils.Approach(ref leaveRate, this.TopMenuLeaved ? 1.0 : 0.0, 0.95); DDUtils.Approach(ref z, this.TopMenuLeaved ? 1.02 : 1.0, 0.9); D4Rect drawRect = DDUtils.AdjustRectExterior( picture.GetSize().ToD2Size(), new D4Rect(0, 0, DDConsts.Screen_W, DDConsts.Screen_H), slideRate ); DDDraw.DrawBeginRect(Ground.I.Picture.Title, drawRect.L, drawRect.T, drawRect.W, drawRect.H); DDDraw.DrawZoom(z); DDDraw.DrawEnd(); if (0.01 < leaveRate) { ぼかし効果.Perform(leaveRate); DDCurtain.DrawCurtain(-0.6 * leaveRate); } yield return(true); } }
public void Main01() { DDPicture img = DDPictureLoaders.Standard(@"C:\wb2\20200708_動画テストデータ\ss\0020.png"); // g FileTools.Delete(W_DIR); FileTools.CreateDir(W_DIR); this.SpData_L = new SpectrumData(Path.Combine(R_DIR, "Spectrum_L.csv")); this.SpData_R = new SpectrumData(Path.Combine(R_DIR, "Spectrum_R.csv")); SpectrumScreen0002 spScr = new SpectrumScreen0002(); double z = 1.2; double cLv = -1.0; double fowLv = 0.0; while (this.Frame < this.SpData_L.Rows.Length) { double[] row_L = this.SpData_L.Rows[this.Frame]; double[] row_R = this.SpData_R.Rows[this.Frame]; DDDraw.DrawBegin(img, DDConsts.Screen_W / 2, DDConsts.Screen_H / 2 + 80); DDDraw.DrawZoom(z * 1.353); DDDraw.DrawEnd(); DDCurtain.DrawCurtain(Math.Min(cLv, fowLv)); spScr.Draw(row_L); DDDraw.SetAlpha(0.8); DDDraw.DrawBegin(DDPictureLoaders2.Wrapper(spScr.Screen), DDConsts.Screen_W / 2, 180); DDDraw.DrawZoom(-0.9); DDDraw.DrawEnd(); DDDraw.Reset(); spScr.Draw(row_R); DDDraw.SetAlpha(0.8); DDDraw.DrawBegin(DDPictureLoaders2.Wrapper(spScr.Screen), DDConsts.Screen_W / 2, 900); DDDraw.DrawZoom(0.9); DDDraw.DrawEnd(); DDDraw.Reset(); if (this.SpData_L.Rows.Length - 40 < this.Frame) { DDUtils.Approach(ref fowLv, -1.0, 0.9); } if (40 < this.Frame) { DDUtils.Approach(ref cLv, 1.0, 0.99); } DDUtils.Approach(ref z, 1.0, 0.999); this.MG_EachFrame(); } }
private static void Add(DDPicture picture, string name) { Names.Add(name); Tiles.Add(name, new MapTile() { Name = name, Picture = picture, }); }
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(); } }
private IEnumerable <bool> E_Run() { DDPicture[] pictures = new DDPicture[] { Ground.I.Picture.Teki_a02_Run01, Ground.I.Picture.Teki_a02_Run02, Ground.I.Picture.Teki_a02_Run03, }; for (int frame = 0; ; frame++) { if ( 30 < frame && this.Random.Real() < ( DDUtils.GetDistance(new D2Point(Game.I.Player.X, Game.I.Player.Y), new D2Point(this.X, this.Y)) < 400.0 ? 0.0001 : 0.03 )) { break; } if (this.Random.Real() < 0.05) { this.FacingLeft = Game.I.Player.X < this.X; } if (this.FacingLeft) { if (!Game.I.Map.GetCell(GameCommon.ToTablePoint(this.X - 30.0, this.Y + 20.0)).Tile.IsGround()) { this.FacingLeft = false; } } else { if (!Game.I.Map.GetCell(GameCommon.ToTablePoint(this.X + 30.0, this.Y + 20.0)).Tile.IsGround()) { this.FacingLeft = true; } } const double SPEED = 6.0; this.X += this.FacingLeft ? -SPEED : SPEED; DDDraw.DrawBegin(pictures[frame / 6 % 3], this.X - DDGround.ICamera.X, this.Y - 32 - DDGround.ICamera.Y); DDDraw.DrawZoom_X(this.FacingLeft ? 1.0 : -1.0); DDDraw.DrawEnd(); yield return(true); } this.WaitFrame = 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(); } }
public void Test01() { DDPicture title_wall = DDPictureLoaders.Standard("title_wall.png"); for (; ;) { //DDDraw.DrawSimple(title_wall, 0, 0); DDDraw.DrawRect(title_wall, 0, 0, DDConsts.Screen_W, DDConsts.Screen_H); DDEngine.EachFrame(); } }
protected override IEnumerable <bool> E_Draw() { double r; switch (this.TamaKind) { case EnemyCommon.TAMA_KIND_e.NORMAL: r = 8.0; break; case EnemyCommon.TAMA_KIND_e.BIG: r = 12.0; break; case EnemyCommon.TAMA_KIND_e.LARGE: r = 30.0; break; // TODO: その他の敵弾についてもここへ追加.. default: throw null; // never } double xAdd; double yAdd; DDUtils.MakeXYSpeed(this.X, this.Y, Game.I.Player.X, Game.I.Player.Y, this.Speed, out xAdd, out yAdd); DDUtils.Rotate(ref xAdd, ref yAdd, this.Angle); DDPicture picture = EnemyCommon.GetTamaPicture(this.TamaKind, this.TamaColor); for (; ;) { this.X += xAdd; this.Y += yAdd; DDDraw.DrawCenter(picture, this.X, this.Y); if (this.AbsorbableWeapon != -1) // ? 吸収可能 { DDDraw.SetAlpha(0.5); DDDraw.SetBright(0.0, 0.5, 1.0); DDDraw.DrawBegin(Ground.I.Picture2.D_MAHOJIN_HAJIKE_00[5], this.X, this.Y); DDDraw.DrawRotate(DDEngine.ProcFrame / 30.0); DDDraw.DrawZoom(0.5); DDDraw.DrawEnd(); DDDraw.Reset(); DDPrint.SetPrint((int)this.X, (int)this.Y); DDPrint.SetBorder(new I3Color(0, 0, 100)); DDPrint.Print("[" + this.AbsorbableWeapon + "]"); DDPrint.Reset(); } this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), r); yield return(!EnemyCommon.IsEvacuated(this)); } }
public static IEnumerable <bool> Standard(Wall wall, DDPicture picture, int xSpeed, int ySpeed, int xOrigin, int yOrigin, double a_add, double a_max, bool fillable, double brightLevel = 1.0) { double a = 0.0; for (; ;) { a += a_add; if (a_max < a) { a = a_max; if (fillable) { wall.Filled = true; } } xOrigin += xSpeed; yOrigin += ySpeed; int orig_x = xOrigin % picture.Get_W(); int orig_y = yOrigin % picture.Get_H(); if (0 < orig_x) { orig_x -= picture.Get_W(); } if (0 < orig_y) { orig_y -= picture.Get_H(); } DDDraw.SetAlpha(a); DDDraw.SetBright(brightLevel, brightLevel, brightLevel); for (int x = orig_x; x < GameConsts.FIELD_W; x += picture.Get_W()) { for (int y = orig_y; y < GameConsts.FIELD_H; y += picture.Get_H()) { DDDraw.DrawSimple(picture, x, y); } } DDDraw.Reset(); //DDCurtain.DrawCurtain(darkLevel); // -> SetBright yield return(true); } }
/// <summary> /// 森林系のタイルを生成する。 /// </summary> /// <param name="pictbl">画像テーブル(画像はタイル(32x32)であること)</param> /// <param name="密集_l">「密集」画像の左上(X-座標)</param> /// <param name="密集_t">「密集」画像の左上(Y-座標)</param> /// <param name="単独_l">「単独」画像の左上(X-座標)</param> /// <param name="単独_t">「単独」画像の左上(Y-座標)</param> /// <param name="groundPicture">地面の画像</param> /// <param name="単独セルPicture">密集・単独を使用出来ないマップセル用の画像</param> public Tile_森林系(DDPicture[,] pictbl, int 密集_l, int 密集_t, int 単独_l, int 単独_t, DDPicture groundPicture, DDPicture 単独セルPicture) { _draw = new DrawTask() { PictureTable = pictbl, 単独_L = 単独_l, 単独_T = 単独_t, 密集_L = 密集_l, 密集_T = 密集_t, GroundPicture = groundPicture, 単独セルPicture = 単独セルPicture, F_IsFriend = this.IsFriend, }; }
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(); } }
private void DrawDigit(int l, int t, int w, int h, int digColor, int digIndex) { DDPicture[][] pictureTable = new DDPicture[][] { Ground.I.Picture2.D_DIGITS_W_00, Ground.I.Picture2.D_DIGITS_DDY_00, Ground.I.Picture2.D_DIGITS_DY_00, Ground.I.Picture2.D_DIGITS_Y_00, }; DDDraw.SetMosaic(); DDDraw.DrawRect(pictureTable[digColor][digIndex], new D4Rect(l, t, w, h)); DDDraw.Reset(); }
private IEnumerable <bool> GetLayer03(string imgFile) { DDPicture img = DDPictureLoaders.Standard(imgFile); // g double a = 0.0; double z = 2.0; double t1x = 100; double t2x = 100; double t3x = 100; for (int frmcnt = 0; ; frmcnt++) { DDDraw.DrawBegin(img, DDConsts.Screen_W / 2, DDConsts.Screen_H / 2); DDDraw.DrawZoom(1.353); DDDraw.SetAlpha(a); DDDraw.DrawEnd(); DDDraw.DrawBegin(img, DDConsts.Screen_W / 2, DDConsts.Screen_H / 2); DDDraw.DrawZoom(1.353 * z); DDDraw.SetAlpha(a / 2.0); DDDraw.DrawEnd(); I3Color color = new I3Color((int)(255 * a), (int)(255 * a), (int)(255 * a)); if (10 < frmcnt) { DDFontUtils.DrawString((int)(1000 + t1x), 620, "TOKYO", DDFontUtils.GetFont("Ink Free", 100), false, color); DDUtils.Approach(ref t1x, 0.0, 0.8); } if (15 < frmcnt) { DDFontUtils.DrawString((int)(1200 + t2x), 720, "LOVE", DDFontUtils.GetFont("Ink Free", 200), false, color); DDUtils.Approach(ref t2x, 0.0, 0.8); } if (20 < frmcnt) { DDFontUtils.DrawString((int)(1000 + t3x), 900, "STORY 1991", DDFontUtils.GetFont("Ink Free", 100), false, color); DDUtils.Approach(ref t3x, 0.0, 0.8); } DDUtils.Approach(ref a, 1.0, 0.98); DDUtils.Approach(ref z, 1.0, 0.98); yield return(true); } }
public ResourcePicture() { for (int x = 0; x < 5; x++) { PlayerStands[x] = new DDPicture[2]; PlayerTalks[x] = new DDPicture[2]; for (int y = 0; y < 2; y++) { for (int k = 0; k < 2; k++) { new[] { PlayerStands, PlayerTalks } } }
private void DrawWall(DDPicture picture, I3Color color, double xRate, double yRate) { int xSpan = picture.Get_W() - DDConsts.Screen_W; int ySpan = picture.Get_H() - DDConsts.Screen_H; int span = Math.Min(xSpan, ySpan); DDDraw.SetBright(color); DDDraw.DrawCenter( picture, DDConsts.Screen_W / 2 - (xRate - 0.5) * span, DDConsts.Screen_H / 2 - (yRate - 0.5) * span ); DDDraw.Reset(); }
private void BeforeDrawContents() { if (DDMouse.L.GetInput() == 1) // ? 左ボタン押下開始 { this.LastActiveTrackBar = this.LastHoveringTrackBar; } if (DDMouse.L.GetInput() == 0) // ? 左ボタン押下終了 { this.LastActiveTrackBar = null; } this.LastHoveringButton = null; this.LastHoveringTrackBar = null; this.DrawWall(); }
// <---- 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(); }
/// <summary> /// ゲーム中のセーブ画面 /// </summary> private void SaveMenu() { using (new SaveOrLoadMenu()) { SaveOrLoadMenu.I.Save(() => { DDPicture picture = Ground.I.Picture.Title; DDDraw.DrawRect( picture, DDUtils.AdjustRectExterior(picture.GetSize().ToD2Size(), new D4Rect(0, 0, DDConsts.Screen_W, DDConsts.Screen_H)) ); DDCurtain.DrawCurtain(-0.5); }); } DDEngine.FreezeInput(GameConsts.LONG_INPUT_SLEEP); }
private void DrawButton(int x, int y, DDPicture picture, bool activeFlag) { DDDraw.SetAlpha(activeFlag ? 1.0 : 0.5); DDDraw.DrawBegin(picture, x, y); DDCrash drawedCrash = DDDraw.DrawGetCrash(); DDDraw.DrawEnd(); DDDraw.Reset(); if (drawedCrash.IsCrashed(DDCrashUtils.Point(new D2Point(DDMouse.X, DDMouse.Y)))) { this.LastHoveringButton = picture; this.LastButtonHoveringFlag = true; } else { this.LastButtonHoveringFlag = false; } }
private IEnumerable <bool> E_地面に落ちた(double x, double y) { DDPicture[] pictures = new DDPicture[] { Ground.I.Picture.Stage02_Chip_g04_02, Ground.I.Picture.Stage02_Chip_g04_03, Ground.I.Picture.Stage02_Chip_g04_04, }; foreach (DDPicture picture in pictures) { for (int c = 0; c < 4; c++) { DDDraw.DrawCenter(picture, x - DDGround.ICamera.X, y - DDGround.ICamera.Y); yield return(true); } } }