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); } }
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 DrawWall() { DDUtils.Approach(ref WallBokashiRate, WallBokashiRateDest, 0.93); DDUtils.Approach(ref WallZRate, WallZRateDest, 0.9); // --- DDSubScreenUtils.ChangeDrawScreen(WorkScreen); DDDraw.DrawBegin(Ground.I.Picture.TitleWall, DDConsts.Screen_W / 2.0, DDConsts.Screen_H / 2.0); DDDraw.DrawZoom(WallZRate); DDDraw.DrawEnd(); DX.GraphFilter(WorkScreen.GetHandle(), DX.DX_GRAPH_FILTER_GAUSS, 16, DoubleTools.ToInt(WallBokashiRate * 1000.0)); // 1 DX.GraphFilter(WorkScreen.GetHandle(), DX.DX_GRAPH_FILTER_GAUSS, 16, DoubleTools.ToInt(WallBokashiRate * 1000.0)); // 2 DDSubScreenUtils.RestoreDrawScreen(); DDDraw.DrawSimple(DDPictureLoaders2.Wrapper(WorkScreen), 0, 0); }
private IEnumerable <bool> GetLayer01(string imgFile) { DDPicture img = DDPictureLoaders.Standard(imgFile); // g double y = -190.0; double b = 10000.0; double cLv = -1.0; for (; ;) { using (DDSubScreen workScreen = new DDSubScreen(DDConsts.Screen_W, DDConsts.Screen_H)) { DDSubScreenUtils.ChangeDrawScreen(workScreen); DDDraw.DrawBegin(img, DDConsts.Screen_W / 2, DDConsts.Screen_H / 2 + y); DDDraw.DrawZoom(1.353); DDDraw.DrawEnd(); DX.GraphFilter(workScreen.GetHandle(), DX.DX_GRAPH_FILTER_GAUSS, 16, (int)b); // 1 DX.GraphFilter(workScreen.GetHandle(), DX.DX_GRAPH_FILTER_GAUSS, 16, (int)b); // 2 DX.GraphFilter(workScreen.GetHandle(), DX.DX_GRAPH_FILTER_GAUSS, 16, (int)b); // 3 DX.GraphFilter(workScreen.GetHandle(), DX.DX_GRAPH_FILTER_GAUSS, 16, (int)b); // 4 DX.GraphFilter(workScreen.GetHandle(), DX.DX_GRAPH_FILTER_GAUSS, 16, (int)b); // 5 DDSubScreenUtils.RestoreDrawScreen(); DDDraw.DrawSimple(DDPictureLoaders2.Wrapper(workScreen), 0, 0); } DDCurtain.DrawCurtain(cLv); DDUtils.Approach(ref y, 190.0, 0.9); DDUtils.Approach(ref b, 0.0, 0.7); DDUtils.Approach(ref cLv, 0.0, 0.8); yield return(true); } }
public void Draw(double[] spectra) { if (spectra.Length != 90) { throw null; // souteigai !!! } if (this.ShadowSpectra == null) { this.ShadowSpectra = new ShadowSpectraData(); } this.ShadowSpectra.Projection(spectra); DDSubScreenUtils.ChangeDrawScreen(this.GraphScreen); DX.ClearDrawScreen(); for (int c = 0; c < 30; c++) { double v = this.ShadowSpectra.ShadowSpectra[c * 3 + 0] + this.ShadowSpectra.ShadowSpectra[c * 3 + 1] + this.ShadowSpectra.ShadowSpectra[c * 3 + 2]; v /= 3.0; int x1 = c * 30; int x2 = x1 + 10; int y1 = (int)((1.0 - v) * 600); int y2 = 600; if (y1 + 1 < y2) { DDDraw.SetBright(0.4, 0.5, 0.6); DDDraw.DrawRect(DDGround.GeneralResource.WhiteBox, x1, y1, x2 - x1, y2 - y1); DDDraw.Reset(); } } for (int c = 0; c < 30; c++) { double v = spectra[c * 3 + 0] + spectra[c * 3 + 1] + spectra[c * 3 + 2]; v /= 3.0; int x1 = c * 30; int x2 = x1 + 10; int y1 = (int)((1.0 - v) * 600); int y2 = 600; if (y1 + 1 < y2) { DDDraw.DrawRect(DDGround.GeneralResource.WhiteBox, x1, y1, x2 - x1, y2 - y1); } } DDDraw.DrawRect(DDGround.GeneralResource.WhiteBox, 0, 620, 880, 10); DDFontUtils.DrawString(0, 640, "小田和正", DDFontUtils.GetFont("メイリオ", 80)); DDFontUtils.DrawString(270, 740, "ラブ・ストーリーは突然に", DDFontUtils.GetFont("メイリオ", 50)); DDFontUtils.DrawString(30, 840, "『 東京ラブストーリー ( 1991 ) 』 主題歌", DDFontUtils.GetFont("メイリオ", 40)); DDSubScreenUtils.ChangeDrawScreen(this.Screen); DX.ClearDrawScreen(); DDDraw.DrawBegin(DDPictureLoaders2.Wrapper(this.GraphScreen), 500, 500); DDDraw.SetBright(0, 0, 0); DDDraw.DrawEnd(); DDDraw.Reset(); DX.GraphFilter(this.Screen.GetHandle(), DX.DX_GRAPH_FILTER_GAUSS, 16, 1000); DDDraw.DrawCenter(DDPictureLoaders2.Wrapper(this.GraphScreen), 500, 500); DDSubScreenUtils.RestoreDrawScreen(); }
public static void TitleMain() { WorkScreen = new DDSubScreen(DDConsts.Screen_W, DDConsts.Screen_H); foreach (DDScene scene in DDSceneUtils.Create(30)) { DDCurtain.DrawCurtain(); DDEngine.EachFrame(); } foreach (DDScene scene in DDSceneUtils.Create(30)) { double a = -1.0 + scene.Rate; DDDraw.DrawBegin(Ground.I.Picture.Logo, DDConsts.Screen_W / 2.0, DDConsts.Screen_H / 2.0); DDDraw.DrawZoom(1.0 + a * a * 0.1); DDDraw.DrawEnd(); //DDDraw.DrawSimple(Ground.I.Picture.Logo, 0, 0); DDCurtain.DrawCurtain(a); DDEngine.EachFrame(); } foreach (DDScene scene in DDSceneUtils.Create(60)) { DDDraw.DrawSimple(Ground.I.Picture.Logo, 0, 0); DDEngine.EachFrame(); } foreach (DDScene scene in DDSceneUtils.Create(30)) { double a = -scene.Rate; DDDraw.DrawBegin(Ground.I.Picture.Logo, DDConsts.Screen_W / 2.0, DDConsts.Screen_H / 2.0); DDDraw.DrawZoom(1.0 + a * a * 0.1); DDDraw.DrawEnd(); //DDDraw.DrawSimple(Ground.I.Picture.Logo, 0, 0); DDCurtain.DrawCurtain(a); DDEngine.EachFrame(); } foreach (DDScene scene in DDSceneUtils.Create(30)) { DDCurtain.DrawCurtain(); DDEngine.EachFrame(); } const int TITLE_BTN_START_X = 130; const int TITLE_BTN_START_Y = 460; const int TITLE_BTN_CONFIG_X = 830; const int TITLE_BTN_CONFIG_Y = 70; const int TITLE_BTN_EXIT_X = 830; const int TITLE_BTN_EXIT_Y = 460; { double a = 0.0; double z = 1.3; bool titleBackOn = false; double titleBackA = 0.0; double titleBackZ = 0.1; bool titleOn = false; double titleA = 0.0; double titleZ = 1.3; bool[] titleBtnsOn = new bool[] { false, false, false }; double[] titleBtnsA = new double[3] { 0, 0, 0 }; double[] titleBtnsZ = new double[3] { 1.05, 1.1, 1.15 }; foreach (DDScene scene in DDSceneUtils.Create(120)) { if (scene.Numer == 30) { titleBackOn = true; } if (scene.Numer == 60) { titleOn = true; } if (scene.Numer == 90) { titleBtnsOn[0] = true; } if (scene.Numer == 100) { titleBtnsOn[1] = true; } if (scene.Numer == 110) { titleBtnsOn[2] = true; } DDCurtain.DrawCurtain(); // Wall > DDSubScreenUtils.ChangeDrawScreen(WorkScreen.GetHandle()); DDDraw.SetAlpha(a); DDDraw.DrawBegin(Ground.I.Picture.TitleWall, DDConsts.Screen_W / 2, DDConsts.Screen_H / 2); DDDraw.DrawZoom(z); DDDraw.DrawEnd(); DDDraw.Reset(); DX.GraphFilter(WorkScreen.GetHandle(), DX.DX_GRAPH_FILTER_GAUSS, 16, 1000); // 1 DX.GraphFilter(WorkScreen.GetHandle(), DX.DX_GRAPH_FILTER_GAUSS, 16, 1000); // 2 DDSubScreenUtils.RestoreDrawScreen(); DDDraw.DrawSimple(DDPictureLoaders2.Wrapper(WorkScreen), 0, 0); // < Wall DDDraw.SetAlpha(titleBackA); DDDraw.SetBright(0, 0, 0); DDDraw.DrawBeginRect(DDGround.GeneralResource.WhiteBox, TITLE_BACK_L, TITLE_BACK_T, TITLE_BACK_W, TITLE_BACK_H); DDDraw.DrawZoom_X(titleBackZ); DDDraw.DrawEnd(); DDDraw.Reset(); DDDraw.SetAlpha(titleA); DDDraw.DrawBegin(Ground.I.Picture.Title, DDConsts.Screen_W / 2, DDConsts.Screen_H / 2); DDDraw.DrawZoom(titleZ); DDDraw.DrawEnd(); DDDraw.Reset(); DDDraw.SetAlpha(titleBtnsA[0]); DDDraw.DrawBegin(Ground.I.Picture.TitleBtnStart, TITLE_BTN_START_X, TITLE_BTN_START_Y); DDDraw.DrawZoom(titleBtnsZ[0]); DDDraw.DrawEnd(); DDDraw.Reset(); DDDraw.SetAlpha(titleBtnsA[1]); DDDraw.DrawBegin(Ground.I.Picture.TitleBtnConfig, TITLE_BTN_CONFIG_X, TITLE_BTN_CONFIG_Y); DDDraw.DrawZoom(titleBtnsZ[1]); DDDraw.DrawEnd(); DDDraw.Reset(); DDDraw.SetAlpha(titleBtnsA[2]); DDDraw.DrawBegin(Ground.I.Picture.TitleBtnExit, TITLE_BTN_EXIT_X, TITLE_BTN_EXIT_Y); DDDraw.DrawZoom(titleBtnsZ[2]); DDDraw.DrawEnd(); DDDraw.Reset(); DDUtils.Approach(ref a, 1.0, 0.97); DDUtils.Approach(ref z, 1.0, 0.95); if (titleBackOn) { DDUtils.Approach(ref titleBackA, TITLE_BACK_A, 0.95); DDUtils.Approach(ref titleBackZ, 1.0, 0.9); } if (titleOn) { DDUtils.Approach(ref titleA, 1.0, 0.93); DDUtils.Approach(ref titleZ, 1.0, 0.8); } for (int c = 0; c < 3; c++) { if (titleBtnsOn[c]) { DDUtils.Approach(ref titleBtnsA[c], 1.0, 0.77); DDUtils.Approach(ref titleBtnsZ[c], 1.0, 0.73); } } DDEngine.EachFrame(); } } { double selRateStart = 0.0; double selRateConfig = 0.0; double selRateExit = 0.0; returned: DDEngine.FreezeInput(); WallBokashiRateDest = 1.0; P_TitleBackWDest = TITLE_BACK_W; for (; ;) { DrawWall(); DrawTitleBack(); DDDraw.DrawCenter(Ground.I.Picture.Title, DDConsts.Screen_W / 2, DDConsts.Screen_H / 2); DDDraw.DrawBegin(Ground.I.Picture.TitleBtnStart, TITLE_BTN_START_X, TITLE_BTN_START_Y); DDDraw.DrawZoom(1.0 + selRateStart * 0.2); DDDraw.DrawEnd(); NamedCrashMgr.AddLastDrawedCrash("START"); DDDraw.DrawBegin(Ground.I.Picture.TitleBtnConfig, TITLE_BTN_CONFIG_X, TITLE_BTN_CONFIG_Y); DDDraw.DrawZoom(1.0 + selRateConfig * 0.15); DDDraw.DrawEnd(); NamedCrashMgr.AddLastDrawedCrash("CONFIG"); DDDraw.DrawBegin(Ground.I.Picture.TitleBtnExit, TITLE_BTN_EXIT_X, TITLE_BTN_EXIT_Y); DDDraw.DrawZoom(1.0 + selRateExit * 0.15); DDDraw.DrawEnd(); NamedCrashMgr.AddLastDrawedCrash("EXIT"); // <---- 描画 DDMouse.UpdatePos(); string pointingName = NamedCrashMgr.GetName(DDMouse.X, DDMouse.Y); if (pointingName == "START") { DDUtils.Approach(ref selRateStart, 1.0, 0.85); } else { DDUtils.Approach(ref selRateStart, 0.0, 0.9); } if (pointingName == "CONFIG") { DDUtils.Approach(ref selRateConfig, 1.0, 0.9); } else { DDUtils.Approach(ref selRateConfig, 0.0, 0.93); } if (pointingName == "EXIT") { DDUtils.Approach(ref selRateExit, 1.0, 0.9); } else { DDUtils.Approach(ref selRateExit, 0.0, 0.93); } DDEngine.EachFrame(); // ★★★ EachFrame if (DDMouse.L.GetInput() == 1) { if (pointingName == "EXIT") { break; } if (pointingName == "CONFIG") { TitleConfig(); goto returned; } if (pointingName == "START") { TitleDDStart(); selRateStart = 0.0; selRateExit = 1.0; goto returned; } } } } DDCurtain.SetCurtain(30, -1.0); DDMusicUtils.Fade(); foreach (DDScene scene in DDSceneUtils.Create(40)) { DrawWall(); DDEngine.EachFrame(); } }
public void Draw(double[] spectra) { if (spectra.Length != 90) { throw null; // souteigai !!! } if (this.ShadowSpectra == null) { this.ShadowSpectra = new ShadowSpectraData(); } this.ShadowSpectra.Projection(spectra); DDSubScreenUtils.ChangeDrawScreen(this.GraphScreen); DX.ClearDrawScreen(); for (int c = 0; c < 10; c++) { double v = this.ShadowSpectra.ShadowSpectra[c * 9 + 0] + this.ShadowSpectra.ShadowSpectra[c * 9 + 1] + this.ShadowSpectra.ShadowSpectra[c * 9 + 2] + this.ShadowSpectra.ShadowSpectra[c * 9 + 3] + this.ShadowSpectra.ShadowSpectra[c * 9 + 4] + this.ShadowSpectra.ShadowSpectra[c * 9 + 5] + this.ShadowSpectra.ShadowSpectra[c * 9 + 6] + this.ShadowSpectra.ShadowSpectra[c * 9 + 7] + this.ShadowSpectra.ShadowSpectra[c * 9 + 8]; v /= 9.0; v *= 10.0; int iv = DoubleTools.ToInt(v); for (int d = 0; d < iv; d++) { int x1 = (c + 0) * 160; int x2 = (c + 1) * 160; int y1 = (d + 0) * 40; int y2 = (d + 1) * 40; x1 += 5; x2 -= 5; y1 += 3; y2 -= 3; DDDraw.SetBright(0.6, 0.4, 0.4); DDDraw.DrawRect(DDGround.GeneralResource.WhiteBox, x1, y1, x2 - x1, y2 - y1); DDDraw.Reset(); } } for (int c = 0; c < 10; c++) { double v = spectra[c * 9 + 0] + spectra[c * 9 + 1] + spectra[c * 9 + 2] + spectra[c * 9 + 3] + spectra[c * 9 + 4] + spectra[c * 9 + 5] + spectra[c * 9 + 6] + spectra[c * 9 + 7] + spectra[c * 9 + 8]; v /= 9.0; v *= 10.0; int iv = DoubleTools.ToInt(v); for (int d = 0; d < iv; d++) { int x1 = (c + 0) * 160; int x2 = (c + 1) * 160; int y1 = (d + 0) * 40; int y2 = (d + 1) * 40; x1 += 5; x2 -= 5; y1 += 3; y2 -= 3; DDDraw.SetBright(1.0, 0.8, 0.8); DDDraw.DrawRect(DDGround.GeneralResource.WhiteBox, x1, y1, x2 - x1, y2 - y1); DDDraw.Reset(); } } DDSubScreenUtils.ChangeDrawScreen(this.Screen); DX.ClearDrawScreen(); DDDraw.DrawBegin(DDPictureLoaders2.Wrapper(this.GraphScreen), this.Screen.GetSize().W / 2, this.Screen.GetSize().H / 2); DDDraw.SetBright(0, 0, 0); DDDraw.DrawEnd(); DDDraw.Reset(); DX.GraphFilter(this.Screen.GetHandle(), DX.DX_GRAPH_FILTER_GAUSS, 16, 1000); DDDraw.DrawCenter(DDPictureLoaders2.Wrapper(this.GraphScreen), this.Screen.GetSize().W / 2, this.Screen.GetSize().H / 2); DDSubScreenUtils.RestoreDrawScreen(); }