public void Test01() { DDCurtain.SetCurtain(); DDEngine.FreezeInput(); foreach (DDScene scene in DDSceneUtils.Create(600)) { if (DDInput.A.GetInput() == 1) { break; } { double xRate = DDConsts.Screen_W * 1.0 / Ground.I.Picture.Pic0001.Get_W(); double yRate = DDConsts.Screen_H * 1.0 / Ground.I.Picture.Pic0001.Get_H(); DDDraw.DrawBegin(Ground.I.Picture.Pic0001, DDConsts.Screen_W / 2, DDConsts.Screen_H / 2); DDDraw.DrawZoom(Math.Max(xRate, yRate)); DDDraw.DrawEnd(); DDCurtain.DrawCurtain(-0.5); DDDraw.DrawBegin(Ground.I.Picture.Pic0001, DDConsts.Screen_W / 2, DDConsts.Screen_H / 2); DDDraw.DrawZoom(Math.Min(xRate, yRate)); DDDraw.DrawEnd(); } DDEngine.EachFrame(); } DDEngine.FreezeInput(); }
public static void Enter() { for (int x = 0; x < PIECES_W; x++) { for (int y = 0; y < PIECES_H; y++) { PieceTable[x, y].ChangeDrawScreen(); DX.DrawRectGraph( 0, 0, x * PIECE_XY_STEP, y * PIECE_XY_STEP, x * PIECE_XY_STEP + PIECE_WH, y * PIECE_XY_STEP + PIECE_WH, P_Field.GetHandle(), 0 ); } } DDGround.MainScreen.ChangeDrawScreen(); Func <bool> f1 = new DrawPieceTask(0, 0, 1, 0, false).Task; Func <bool> f2 = new DrawPieceTask(1, 0, 2, 0, true).Task; Func <bool> f3 = new DrawPieceTask(2, 0, 2, 1, false).Task; Func <bool> f4 = new DrawPieceTask(2, 1, 2, 2, false).Task; Func <bool> f5 = new DrawPieceTask(2, 2, 1, 2, false).Task; Func <bool> f6 = new DrawPieceTask(1, 2, 0, 2, false).Task; Func <bool> f7 = new DrawPieceTask(0, 2, 0, 1, false).Task; Func <bool> f8 = new DrawPieceTask(0, 1, 0, 0, false).Task; Func <bool> f9 = new DrawPieceTask(1, 1, 1, 1, false).Task; DDCurtain.SetCurtain(0, 1.0); DDCurtain.SetCurtain(20); for (; ;) { DrawWall(); if (!f1()) { break; } f2(); f3(); f4(); f5(); f6(); f7(); f8(); f9(); DDEngine.EachFrame(); } DDCurtain.SetCurtain(0, 0.5); DDCurtain.SetCurtain(10); }
/// <summary> /// スキップモード・オートモードを解除する。 /// 両モード中、何か入力があれば解除されるのが自然だと思う。 /// どこで解除しているか分かるようにメソッド化した。 /// </summary> //public void CancelSkipAutoMode() //{ // this.SkipMode = false; // this.AutoMode = false; //} /// <summary> /// <para>主たる画面描画</para> /// <para>色々な場所(モード)から呼び出されるだろう。</para> /// </summary> public void DrawSurfaces() { DDCurtain.DrawCurtain(); // 画面クリア // Z-オーダー順 Novel.I.Status.Surfaces.Sort((a, b) => { int ret = a.Z - b.Z; if (ret != 0) { return(ret); } ret = SCommon.Comp(a.X, b.X); if (ret != 0) { return(ret); } ret = SCommon.Comp(a.Y, b.Y); return(ret); }); foreach (Surface surface in Novel.I.Status.Surfaces) // キャラクタ・オブジェクト・壁紙 { if (!surface.Act.Draw()) { surface.Draw(); } } }
private void Setting_SnapshotCountMax() { DDCurtain.SetCurtain(); DDEngine.FreezeInput(); int selectIndex = Ground.I.StartSnapshotCount; for (; ;) { string[] items = Enumerable.Range(Consts.START_SNAPSHOT_COUNT_MIN, Consts.START_SNAPSHOT_COUNT_MAX - Consts.START_SNAPSHOT_COUNT_MIN + 1) .Select(v => (v == Ground.I.StartSnapshotCount ? "*" : " ") + " " + v + (v == Consts.START_SNAPSHOT_COUNT_DEF ? " (デフォルト)" : "")) .Concat(new string[] { "戻る" }) .ToArray(); selectIndex = this.SimpleMenu.Perform("スナップショット・ストック数(リスポーン地点設置回数)の設定", items, selectIndex, false, 132, 20, 34); if (selectIndex == items.Length - 1) // ? 戻る { break; } Ground.I.StartSnapshotCount = selectIndex; } DDEngine.FreezeInput(); }
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 Test01() { int rot = 0; for (; ;) { DDCurtain.DrawCurtain(); DDMouse.UpdatePos(); rot += DDMouse.Rot; DDPrint.SetPrint(); DDPrint.Print(string.Join( ", " , DDMouse.L.GetInput() , DDMouse.R.GetInput() , DDMouse.M.GetInput() , DDMouse.L.IsPound() ? 1 : 0 , DDMouse.R.IsPound() ? 1 : 0 , DDMouse.M.IsPound() ? 1 : 0 , DDMouse.X , DDMouse.Y //, DDMouse.Rot , rot )); DDEngine.EachFrame(); } }
/// <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 void Test01() { for (; ;) { if (DDInput.PAUSE.GetInput() == 1) { Ground.I.Music.MUS_TITLE.Play(); } if (DDInput.A.GetInput() == 1) { Ground.I.Music.MUS_STAGE_01.Play(); } if (DDInput.B.GetInput() == 1) { Ground.I.Music.MUS_BOSS_01.Play(); } if (DDInput.C.GetInput() == 1) { Ground.I.Music.MUS_STAGE_02.Play(); } if (DDInput.D.GetInput() == 1) { Ground.I.Music.MUS_BOSS_02.Play(); } DDCurtain.DrawCurtain(); DDPrint.SetPrint(); DDPrint.Print("音量テスト"); DDEngine.EachFrame(); } }
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); } }
// // copied the source file by https://github.com/stackprobe/Factory/blob/master/SubTools/CopyLib.c // public CrashView() { using (this.MyScreen.Section()) { DDCurtain.DrawCurtain(); } }
protected override IEnumerable <int> Script() { // TODO: 背景 // TODO: BGM // _#Include_Resource // for t20201023_GitHubRepositoriesSolve yield return(240); DDGround.EL.Add(SCommon.Supplier(DrawString(50, 200, "\u751f\u9084\u3057\u305f\u30a2\u30bf\u30b7\u306e\u4e16\u754c\u306b\u306f\u8272\u304c\u306a\u304b\u3063\u305f\u3002", 1200))); yield return(440); DDGround.EL.Add(SCommon.Supplier(DrawString(50, 250, "\u3067\u3082\u3001\u6291\u3048\u3088\u3046\u306e\u306a\u3044\u9ed2\u3044\u708e\u304c\u5fc3\u306e\u4e2d\u3067\u71c3\u3048\u76db\u308a\u3001", 800))); yield return(240); DDGround.EL.Add(SCommon.Supplier(DrawString(50, 300, "\u6050\u308d\u3057\u3044\u307b\u3069\u306e\u539f\u52d5\u529b\u3092\u751f\u3093\u3067\u3044\u305f\u3002"))); yield return(600); DDGround.EL.Add(SCommon.Supplier(DrawString(20, 250, "\u305d\u306e\u529b\u306b\u3001\u5fc3\u306b\u5f93\u3046\u3053\u3068\u3067\u30a2\u30bf\u30b7\u306e\u4e16\u754c\u306b\u4e00\u8272\u3060\u3051\u8272\u304c\u623b\u3063\u305f\u3002"))); yield return(600); DDGround.EL.Add(SCommon.Supplier(DrawString(320, 250, "\u300c \u30a2\u30ab\u8272 \u300d \u3060\u3051\u304c\u3002"))); yield return(800); DDCurtain.SetCurtain(30, -1.0); DDMusicUtils.Fade(); yield return(40); }
public static void Leave() { DDCurtain.SetCurtain(0, 1.0); DDCurtain.SetCurtain(20); DDGround.EL.Add(SCommon.Supplier(E_Leave())); }
public void Perform() { DDUtils.SetMouseDispMode(false); DDEngine.FreezeInput(10); double x = DDConsts.Screen_W / 2; double y = DDConsts.Screen_H / 2; double speed = SPEED_DEF; for (; ;) { DDMouse.UpdateMove(); x += DDMouse.MoveX * speed; y += DDMouse.MoveY * speed; DDUtils.ToRange(ref x, 0, DDConsts.Screen_W - 1); DDUtils.ToRange(ref y, 0, DDConsts.Screen_H - 1); int ix = DoubleTools.ToInt(x); int iy = DoubleTools.ToInt(y); if (DDKey.IsPound(DX.KEY_INPUT_Z)) { speed += SPEED_CHANGE_STEP; } if (DDKey.IsPound(DX.KEY_INPUT_X)) { speed -= SPEED_CHANGE_STEP; } DDUtils.ToRange(ref speed, SPEED_MIN, SPEED_MAX); if (DDMouse.L.GetInput() == -1) { break; } DDCurtain.DrawCurtain(); DDPrint.SetPrint(0, 0, 24); DDPrint.PrintLine("★マウスカーソルを奪う"); DDPrint.PrintLine("X=" + x.ToString("F3")); DDPrint.PrintLine("Y=" + y.ToString("F3")); DDPrint.PrintLine("Speed=" + speed); DDPrint.PrintLine("左クリックでメニューに戻る。"); DDPrint.PrintLine("Zキー:速度上げ"); DDPrint.PrintLine("Xキー:速度下げ"); DDDraw.SetBright(new I3Color(255, 128, 0)); DDDraw.DrawRect(DDGround.GeneralResource.WhiteBox, ix, iy - CROSS_WH / 2, 1, CROSS_WH); DDDraw.DrawRect(DDGround.GeneralResource.WhiteBox, ix - CROSS_WH / 2, iy, CROSS_WH, 1); DDDraw.Reset(); DDEngine.EachFrame(); } DDUtils.SetMouseDispMode(true); }
private IEnumerable <bool> E_フラッシュ() { foreach (DDScene scene in DDSceneUtils.Create(40)) { DDCurtain.DrawCurtain((1.0 - scene.Rate) * 0.5); yield return(true); } }
public static IEnumerable <bool> Heavyフラッシュ() { foreach (DDScene scene in DDSceneUtils.Create(90)) { DDCurtain.DrawCurtain((1.0 - scene.Rate) * 0.9); yield return(true); } }
private void TitleMenu_Test02() { DDCurtain.SetCurtain(0, -1.0); // 一旦暗転する。 DDUtils.SetMouseDispMode(true); new TitleMenu().Perform(); DDUtils.SetMouseDispMode(false); }
private void ReturnTitleMenu() { Ground.I.Music.Title.Play(); DDCurtain.SetCurtain(); GC.Collect(); }
protected override IEnumerable <bool> E_Draw() { for (; ;) { DDCurtain.DrawCurtain(); yield return(true); } }
protected override IEnumerable <int> Script() { // reset { Wall_GB = 1.0; Wall_GB_Target = 1.0; } DDGround.EL.Add(() => { DDUtils.Approach(ref Wall_GB, Wall_GB_Target, 0.998); return(true); }); ClearAllSubScreen(); Ground.I.Music.Ending_復讐.Play(); DrawWall drawWall = new DrawWall(); drawWall.DrawPictures.Add(new DrawWall.DrawPicture() { Picture = Ground.I.Picture.Ending_復讐_背景_01, YAdd = -0.02 }); DDGround.EL.Add(drawWall.Task); // _#Include_Resource // for t20201023_GitHubRepositoriesSolve yield return(240); DDGround.EL.Add(SCommon.Supplier(DrawString(480, 200, "\u751f\u9084\u3057\u305f\u30a2\u30bf\u30b7\u306e\u4e16\u754c\u306b\u306f\u8272\u304c\u306a\u304b\u3063\u305f\u3002", 1200))); yield return(440); DDGround.EL.Add(SCommon.Supplier(DrawString(480, 250, "\u3067\u3082\u3001\u6291\u3048\u3088\u3046\u306e\u306a\u3044\u9ed2\u3044\u708e\u304c\u5fc3\u306e\u4e2d\u3067\u71c3\u3048\u76db\u308a\u3001", 800))); yield return(240); DDGround.EL.Add(SCommon.Supplier(DrawString(480, 300, "\u6050\u308d\u3057\u3044\u307b\u3069\u306e\u539f\u52d5\u529b\u3092\u751f\u3093\u3067\u3044\u305f\u3002"))); yield return(600); DDGround.EL.Add(SCommon.Supplier(DrawString(480, 250, "\u305d\u306e\u529b\u306b\u3001\u5fc3\u306b\u5f93\u3046\u3053\u3068\u3067\u30a2\u30bf\u30b7\u306e\u4e16\u754c\u306b\u4e00\u8272\u3060\u3051\u8272\u304c\u623b\u3063\u305f\u3002"))); yield return(600); DDGround.EL.Add(SCommon.Supplier(DrawString(480, 250, "\u300c \u30a2\u30ab\u8272 \u300d \u3060\u3051\u304c\u3002", 600, new I3Color(255, 0, 0)))); Wall_GB_Target = 0.0; yield return(1200); DDCurtain.SetCurtain(600, -1.0); yield return(300); DDMusicUtils.Fade(300); yield return(330); ClearAllSubScreen(); }
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(); } }
/// <summary> /// throws Cancelled /// </summary> public static void Perform() { DDUtils.SetMouseDispMode(true); DDCurtain.SetCurtain(0, -1.0); DDCurtain.SetCurtain(10); foreach (DDScene scene in DDSceneUtils.Create(30)) { DDDraw.DrawSimple(Ground.I.Picture.箱から出る_背景, 0, 0); DDDraw.DrawCenter(Ground.I.Picture.箱から出る_箱0001, DDConsts.Screen_W / 2, DDConsts.Screen_H - Ground.I.Picture.箱から出る_箱0001.Get_H() / 2); P_EachFrame(); } for (int c = 0; c < 2; c++) { foreach (DDScene scene in DDSceneUtils.Create(30)) { double x = DDConsts.Screen_W / 2; double y = DDConsts.Screen_H - Ground.I.Picture.箱から出る_箱0001.Get_H() / 2; //double buruSpan = 20.0 * (1.0 - scene.Rate) + 10.0; double buruSpan = 30.0 * (1.0 - scene.Rate); double xBuru = DDUtils.Random.Real() * buruSpan - buruSpan / 2; double yBuru = DDUtils.Random.Real() * buruSpan; double z = 1.0 + 0.2 * (1.0 - scene.Rate); DDDraw.DrawSimple(Ground.I.Picture.箱から出る_背景, 0, 0); DDDraw.DrawBegin(Ground.I.Picture.箱から出る_箱0001, x + xBuru, y + yBuru); DDDraw.DrawZoom(z); DDDraw.DrawEnd(); P_EachFrame(); } } foreach (DDScene scene in DDSceneUtils.Create(50)) { if (scene.Numer == 30) { DDCurtain.SetCurtain(20, -1.0); } double x = DDConsts.Screen_W / 2; double y = DDConsts.Screen_H - Ground.I.Picture.箱から出る_箱0002.Get_H() / 2; double zure = scene.Rate * 10.0; double xZure = zure; double yZure = zure; double z = 1.0 + 0.1 * (1.0 - scene.Rate); DDDraw.DrawSimple(Ground.I.Picture.箱から出る_背景, 0, 0); DDDraw.DrawBegin(Ground.I.Picture.箱から出る_箱0002, x + xZure, y + yZure); DDDraw.DrawZoom(z); DDDraw.DrawEnd(); P_EachFrame(); } }
public static void SaveGame(GameStatus gameStatus) { SaveGame_幕間(); DDEngine.FreezeInput(); DDCurtain.SetCurtain(); DDEngine.FreezeInput(); DDSimpleMenu simpleMenu = new DDSimpleMenu(); simpleMenu.BorderColor = new I3Color(0, 128, 0); simpleMenu.WallColor = new I3Color(128, 64, 0); int selectIndex = 0; for (; ;) { // セーブしたら戻ってくるので、毎回更新する。 string[] items = Ground.I.SaveDataSlots.Select(v => v.GameStatus == null ? "----" : "[" + v.TimeStamp + "] " + v.Description).Concat(new string[] { "戻る" }).ToArray(); selectIndex = simpleMenu.Perform("セーブ画面", items, selectIndex); if (selectIndex < Consts.SAVE_DATA_SLOT_NUM) { if (new Confirm() { BorderColor = Ground.I.SaveDataSlots[selectIndex].GameStatus != null ? new I3Color(200, 0, 0) : new I3Color(100, 100, 0) } .Perform( Ground.I.SaveDataSlots[selectIndex].GameStatus != null ? "スロット " + (selectIndex + 1) + " のデータを上書きします。" : "スロット " + (selectIndex + 1) + " にセーブします。", "はい", "いいえ") == 0) { Ground.P_SaveDataSlot saveDataSlot = Ground.I.SaveDataSlots[selectIndex]; saveDataSlot.TimeStamp = DateTime.Now.ToString("yyyy/MM/dd (ddd) HH:mm:ss"); saveDataSlot.Description = "@@@~~~@@@~~~@@@~~~@@@~~~@@@"; saveDataSlot.MapName = GameCommon.GetMapName(Game.I.Map.MapFile, "t0001"); saveDataSlot.GameStatus = gameStatus; } } else // [戻る] { break; } //DDEngine.EachFrame(); // 不要 } SaveGame_幕間(); DDEngine.FreezeInput(); }
private void ReturnTitleMenu() { DDCurtain.SetCurtain(); Ground.I.Music.Title.Play(); DDEngine.FreezeInput(GameConsts.LONG_INPUT_SLEEP); GC.Collect(); }
private Ground.P_SaveDataSlot LoadGame() // ret: null == キャンセル, ret.GameStatus を使用する際は GetClone を忘れずに! { Ground.P_SaveDataSlot saveDataSlot = null; DDEngine.FreezeInput(); DDCurtain.SetCurtain(); DDEngine.FreezeInput(); // old //DDSimpleMenu simpleMenu = new DDSimpleMenu() //{ // BorderColor = new I3Color(0, 128, 0), // WallDrawer = () => // { // DDDraw.SetBright(new I3Color(64, 64, 128)); // DDDraw.DrawRect(Ground.I.Picture.WhiteBox, 0, 0, DDConsts.Screen_W, DDConsts.Screen_H); // DDDraw.Reset(); // }, //}; string[] items = Ground.I.SaveDataSlots.Select(v => v.GameStatus == null ? "----" : "[" + v.TimeStamp + "] " + v.Description).Concat(new string[] { "戻る" }).ToArray(); int selectIndex = 0; for (; ;) { selectIndex = this.SimpleMenu.Perform(18, 18, 32, 24, "ロード", items, selectIndex); if (selectIndex < Consts.SAVE_DATA_SLOT_NUM) { if (Ground.I.SaveDataSlots[selectIndex].GameStatus != null) { if (new Confirm() { BorderColor = new I3Color(50, 100, 200) } .Perform("スロット " + (selectIndex + 1) + " のデータをロードします。", "はい", "いいえ") == 0) { saveDataSlot = Ground.I.SaveDataSlots[selectIndex]; break; } } } else // [戻る] { break; } //DDEngine.EachFrame(); // 不要 } DDEngine.FreezeInput(); return(saveDataSlot); }
public void Test01() { int index = 0; for (; ;) { if (DDInput.DIR_8.IsPound()) { index -= Consts.SCREEN_MAP_W; } if (DDInput.DIR_4.IsPound()) { index--; } if (DDInput.DIR_6.IsPound()) { index++; } if (DDInput.DIR_2.IsPound()) { index += Consts.SCREEN_MAP_W; } index += MapTileManager.GetCount(); index %= MapTileManager.GetCount(); // 描画 ... DDCurtain.DrawCurtain(); { int i = index; for (int y = 0; y < Consts.SCREEN_MAP_H; y++) { for (int x = 0; x < Consts.SCREEN_MAP_W; x++) { DDDraw.DrawSimple(MapTileManager.GetTile(MapTileManager.GetNames()[i]).Picture, x * MapTile.WH, y * MapTile.WH); i++; i %= MapTileManager.GetCount(); } } } DDPrint.SetPrint(); DDPrint.SetBorder(new I3Color(0, 64, 0)); for (int i = 0; i < 40; i++) { DDPrint.PrintLine("[" + i.ToString("D2") + "] " + MapTileManager.GetNames()[(index + i) % MapTileManager.GetCount()]); } DDPrint.Reset(); DDEngine.EachFrame(); } }
private void ReturnTitleMenu() { DDTouch.Touch(); // 曲再生の前に -- .Play() で Touch した曲を解放してしまわないように Ground.I.Music.Title.Play(); //DDCurtain.SetCurtain(0, -1.0); DDCurtain.SetCurtain(); GC.Collect(); }
public override IEnumerable <bool> E_Draw() { this.FilledFlag = true; for (; ;) { DDCurtain.DrawCurtain(); yield return(true); } }
public void Perform() { DDUtils.SetMouseDispMode(true); string line1 = ""; string line2 = ""; string line3 = ""; for (; ;) { DDMouse.UpdatePos(); if (DDMouse.L.GetInput() == 1) { if (DDUtils.IsOut(new D2Point(DDMouse.X, DDMouse.Y), new D4Rect(50, 50, 50, 16)) == false) { line1 = EditString("LINE-1 (70 bytes)", line1, 70, '-'); } else if (DDUtils.IsOut(new D2Point(DDMouse.X, DDMouse.Y), new D4Rect(50, 150, 50, 16)) == false) { line2 = EditString("LINE-2 (ASCII only, 50 bytes)", line2, 50, 'A'); } else if (DDUtils.IsOut(new D2Point(DDMouse.X, DDMouse.Y), new D4Rect(50, 250, 50, 16)) == false) { line3 = EditString("LINE-3 (DIGIT only, 10 bytes)", line3, 10, '9'); } } DDCurtain.DrawCurtain(); DX.DrawBox(0, 0, DDConsts.Screen_W, 100, DX.GetColor(60, 60, 60), 1); DX.DrawBox(0, 100, DDConsts.Screen_W, 200, DX.GetColor(60, 90, 30), 1); DX.DrawBox(0, 200, DDConsts.Screen_W, 300, DX.GetColor(60, 30, 90), 1); DDPrint.SetPrint(50, 50); DDPrint.Print("[EDIT]"); DDPrint.SetPrint(150, 50); DDPrint.Print(line1); DDPrint.SetPrint(50, 150); DDPrint.Print("[EDIT]"); DDPrint.SetPrint(150, 150); DDPrint.Print(line2); DDPrint.SetPrint(50, 250); DDPrint.Print("[EDIT]"); DDPrint.SetPrint(150, 250); DDPrint.Print(line3); DDEngine.EachFrame(); } }
private void SelectStage() { DDCurtain.SetCurtain(); DDEngine.FreezeInput(); // 値: // 0 == LAYER 9 // 1 == LAYER 8 // 2 == LAYER 7 // ... // 8 == LAYER 1 // 9 == 戻る // int selectIndex = Math.Min(Math.Max(0, Ground.I.ReachedStageIndex - 1), 8); for (; ;) { string[] items = Enumerable.Range(1, 9) .Select(stageIndex => "LAYER " + (10 - stageIndex) + (Math.Max(1, Ground.I.ReachedStageIndex) < stageIndex ? " (未到達)" : "")) .Concat(new string[] { "戻る" }) .ToArray(); selectIndex = this.SimpleMenu.Perform("コンテニュー", items, selectIndex); if (selectIndex == items.Length - 1) // ? 戻る { break; } // 値: // 0 == テストステージ -- 選択出来ない。 // 1 == LAYER 9 // 2 == LAYER 8 // 3 == LAYER 7 // ... // 9 == LAYER 1 // int selectedStageIndex = selectIndex + 1; if (selectedStageIndex <= Ground.I.ReachedStageIndex || DDConfig.LOG_ENABLED) { this.LeaveTitleMenu(); using (new GameProgressMaster()) { GameProgressMaster.I.StartStageIndex = selectedStageIndex; GameProgressMaster.I.Perform(); } this.ReturnTitleMenu(); //break; // タイトルメニューへ戻っておく。 } } DDEngine.FreezeInput(); }
public override void DrawWall(double cam_x, double cam_y, double cam_xRate, double cam_yRate) { this.DrawWall(this.WallPicture_01, this.Color_01, cam_xRate, cam_yRate); this.DrawWall(this.WallPicture_02, this.Color_02, cam_xRate, cam_yRate); this.DrawWall(this.WallPicture_03, this.Color_03, cam_xRate, cam_yRate); if (Game.I.FinalZone != null) { DDCurtain.DrawCurtain(Game.I.FinalZone.Rate * -0.5); } }