From 956182a2d14b86f16607041c967c75b88cecfffc Mon Sep 17 00:00:00 2001 From: ikanick Date: Sat, 5 Feb 2011 14:24:45 +0000 Subject: [PATCH 1/1] =?utf8?q?#24074=20=E3=82=B0=E3=83=A9=E3=83=95?= =?utf8?q?=E3=81=A7=E6=B3=A1=E3=81=A3=E3=81=BD=E3=81=84=E3=81=AE=E3=81=A8?= =?utf8?q?=E7=B0=A1=E6=98=93=E3=82=A8=E3=83=95=E3=82=A7=E3=82=AF=E3=83=88?= =?utf8?q?=E3=81=AE=E8=BF=BD=E5=8A=A0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.osdn.jp/svnroot/dtxmania/trunk@103 16f42ceb-6dc6-49c8-ba94-f2d53467949d --- .../ドラム画面/CAct演奏Drumsグラフ.cs | 181 ++++++++++++++++++--- .../ドラム画面/CStage演奏ドラム画面.cs | 1 - 2 files changed, 160 insertions(+), 22 deletions(-) diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsグラフ.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsグラフ.cs index d31b7f14..30088c6c 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsグラフ.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsグラフ.cs @@ -17,8 +17,9 @@ namespace DTXMania // ・目標を超えると現在が光る // ・オート時には描画しない // 要望・実装予定 - // ・グラフを波打たせるなどの視覚の向上 - + // ・グラフを波打たせるなどの視覚の向上→実装済 + // 修正等 + // ・画像がないと落ちる→修正済 // プロパティ @@ -87,62 +88,183 @@ namespace DTXMania { if( base.b初めての進行描画 ) { + for( int k = 0; k < 64; k++ ) + { + this.stキラキラ[ k ].x = 0 + CDTXMania.Random.Next( 8 ); + this.stキラキラ[ k ].fScale = 1f + ( CDTXMania.Random.Next( 9 ) * 0.2f ); + this.stキラキラ[ k ].Trans = 0 + CDTXMania.Random.Next( 32 ) ; + if (k < 32) + { + this.stキラキラ[ k ].ct進行 = new CCounter(0, 230, 10 + CDTXMania.Random.Next(20), CDTXMania.Timer); + } + else if (k < 64) + { + this.stキラキラ[ k ].ct進行 = new CCounter(0, 230, 20 + CDTXMania.Random.Next(50), CDTXMania.Timer); + } + this.stキラキラ[ k ].ct進行.n現在の値 = CDTXMania.Random.Next(230); + } + for( int k = 0; k < 16; k++ ) + { + this.stフラッシュ[ k ].y = -1; + this.stフラッシュ[ k ].Trans = 0; + } base.b初めての進行描画 = false; } // 背景暗幕 + Rectangle rectangle = new Rectangle(22, 0, 1, 1); if (this.txグラフ != null) { - this.txグラフ.n透明度 = 128; this.txグラフ.vc拡大縮小倍率 = new Vector3(38f, 230f, 1f); + this.txグラフ.n透明度 = 128; + this.txグラフ.t2D描画(CDTXMania.app.Device, 345, 88, rectangle); } - Rectangle rectangle = new Rectangle(22, 0, 1, 1); - this.txグラフ.t2D描画(CDTXMania.app.Device, 345, 88, rectangle); // 基準線 + rectangle = new Rectangle(20, 0, 1, 1); + if (this.txグラフ != null) + { + this.txグラフ.n透明度 = 32; + this.txグラフ.vc拡大縮小倍率 = new Vector3(38f, 1f, 1f); + for (int i = 0; i < 20; i++) + { + this.txグラフ.t2D描画(CDTXMania.app.Device, 345, 88 + (int)(11.5 * i), rectangle); + } + this.txグラフ.vc拡大縮小倍率 = new Vector3(1f, 230f, 1f); + for (int i = 0; i < 2; i++) + { + this.txグラフ.t2D描画(CDTXMania.app.Device, 349 + i * 18, 88 , rectangle); + this.txグラフ.t2D描画(CDTXMania.app.Device, 360 + i * 18, 88 , rectangle); + } + } if (this.txグラフ != null) { - this.txグラフ.n透明度 = 192; this.txグラフ.vc拡大縮小倍率 = new Vector3(38f, 1f, 1f); } - for (int i = 0; i < 4; i++) + for (int i = 0; i < 5; i++) { - // 基準線を越えたら黄色くなる + // 基準線を越えたら線が黄色くなる if (this.dbグラフ値現在 >= (100 - i * 10)) { - rectangle = new Rectangle(21, 0, 1, 1); + rectangle = new Rectangle(21, 0, 1, 1);//黄色 + this.txグラフ.n透明度 = 224; } else { rectangle = new Rectangle(20, 0, 1, 1); + this.txグラフ.n透明度 = 160; } - this.txグラフ.t2D描画(CDTXMania.app.Device, 345, 88+i*23, rectangle); - } + if (this.txグラフ != null) + { + this.txグラフ.t2D描画(CDTXMania.app.Device, 345, 88 + i * 23, rectangle); + } + } // グラフ // --現在値 + if (this.dbグラフ値現在_表示 < this.dbグラフ値現在) + { + this.dbグラフ値現在_表示 += (this.dbグラフ値現在 - this.dbグラフ値現在_表示) / 5 + 0.01; + } + if (this.dbグラフ値現在_表示 >= this.dbグラフ値現在) + { + this.dbグラフ値現在_表示 = this.dbグラフ値現在; + } + rectangle = new Rectangle(0, 0, 10, (int)(230f * this.dbグラフ値現在_表示 / 100)); if (this.txグラフ != null) { - this.txグラフ.n透明度 = 192; this.txグラフ.vc拡大縮小倍率 = new Vector3(1f, 1f, 1f); + this.txグラフ.n透明度 = 192; + this.txグラフ.t2D描画(CDTXMania.app.Device, 350, 318 - (int)(230f * this.dbグラフ値現在_表示 / 100), rectangle); } - rectangle = new Rectangle(0, 0, 10, (int)(230f * this.dbグラフ値現在 / 100)); - this.txグラフ.t2D描画(CDTXMania.app.Device, 350, 318 - (int)(230f * this.dbグラフ値現在 / 100), rectangle); - if (dbグラフ値現在 >= dbグラフ値目標) + for( int k = 0; k < 32; k++ ) + { + rectangle = new Rectangle(20, 0, 1, 1); + if (this.txグラフ != null) + { + this.stキラキラ[ k ].ct進行.t進行Loop(); + int num1 = (int)this.stキラキラ[ k ].x; + int num2 = this.stキラキラ[ k ].ct進行.n現在の値; + this.txグラフ.vc拡大縮小倍率 = new Vector3(this.stキラキラ[ k ].fScale, this.stキラキラ[ k ].fScale, this.stキラキラ[ k ].fScale); + this.txグラフ.n透明度 = 138 - 2 * this.stキラキラ[ k ].Trans; + if ( num2 < (2.3f * this.dbグラフ値現在_表示) ) + { + this.txグラフ.t2D描画(CDTXMania.app.Device, 350+num1, 318-num2, rectangle); + } + } + } + // --現在値_追加エフェクト + if (this.dbグラフ値直前 != this.dbグラフ値現在) { - this.txグラフ.vc拡大縮小倍率 = new Vector3(1.2f, 1f, 1f); - this.txグラフ.n透明度 = 64; + this.stフラッシュ[ nグラフフラッシュct ].y = 0; + this.stフラッシュ[ nグラフフラッシュct ].Trans = 224; + nグラフフラッシュct ++; + if (nグラフフラッシュct >= 16) + { + nグラフフラッシュct = 0; + } + } + this.dbグラフ値直前 = this.dbグラフ値現在; + for (int m = 0; m < 16; m++) + { + rectangle = new Rectangle(20, 0, 1, 1); + if ((this.stフラッシュ[ m ].y >= 0) && (this.stフラッシュ[ m ].y+3 < (int)(230f * this.dbグラフ値現在_表示 / 100)) && (this.txグラフ != null)) + { + this.txグラフ.vc拡大縮小倍率 = new Vector3(10f, 1f, 1f); + this.txグラフ.n透明度 = this.stフラッシュ[ m ].Trans; + this.txグラフ.t2D描画(CDTXMania.app.Device, 350, this.stフラッシュ[ m ].y + (318 - (int)(230f * this.dbグラフ値現在_表示 / 100)), rectangle); + this.txグラフ.n透明度 = this.stフラッシュ[ m ].Trans; + this.txグラフ.t2D描画(CDTXMania.app.Device, 350, this.stフラッシュ[ m ].y + 2 + (318 - (int)(230f * this.dbグラフ値現在_表示 / 100)), rectangle); + } + this.stフラッシュ[ m ].y += 4; + this.stフラッシュ[ m ].Trans -= 4; + } + // --現在値_目標越 + rectangle = new Rectangle(0, 0, 10, (int)(230f * this.dbグラフ値現在_表示 / 100)); + if ((dbグラフ値現在 >= dbグラフ値目標) && (this.txグラフ != null)) + { + this.txグラフ.vc拡大縮小倍率 = new Vector3(1.4f, 1f, 1f); + this.txグラフ.n透明度 = 128; this.txグラフ.b加算合成 = true; - this.txグラフ.t2D描画(CDTXMania.app.Device, 349, 318 - (int)(230f * this.dbグラフ値現在 / 100), rectangle); + this.txグラフ.t2D描画(CDTXMania.app.Device, 348, 318 - (int)(230f * this.dbグラフ値現在_表示 / 100), rectangle); + this.txグラフ.b加算合成 = false; } // --目標値 + if (this.dbグラフ値目標_表示 < this.dbグラフ値目標) + { + this.dbグラフ値目標_表示 += (this.dbグラフ値目標 - this.dbグラフ値目標_表示) / 5 + 0.01; + } + if (this.dbグラフ値目標_表示 >= this.dbグラフ値目標) + { + this.dbグラフ値目標_表示 = this.dbグラフ値目標; + } + rectangle = new Rectangle(10, 0, 10, (int)(230f * this.dbグラフ値目標_表示 / 100)); if (this.txグラフ != null) { - this.txグラフ.n透明度 = 192; this.txグラフ.vc拡大縮小倍率 = new Vector3(1f, 1f, 1f); + this.txグラフ.n透明度 = 192; + this.txグラフ.t2D描画(CDTXMania.app.Device, 368, 318 - (int)(230f * this.dbグラフ値目標_表示 / 100), rectangle); + this.txグラフ.vc拡大縮小倍率 = new Vector3(1.4f, 1f, 1f); + this.txグラフ.n透明度 = 48; + this.txグラフ.b加算合成 = true; + this.txグラフ.t2D描画(CDTXMania.app.Device, 366, 318 - (int)(230f * this.dbグラフ値目標_表示 / 100), rectangle); this.txグラフ.b加算合成 = false; } - rectangle = new Rectangle(10, 0, 10, (int)(230f * this.dbグラフ値目標 / 100)); - this.txグラフ.t2D描画(CDTXMania.app.Device, 368, 318 - (int)(230f * this.dbグラフ値目標 / 100), rectangle); + for( int k = 32; k < 64; k++ ) + { + rectangle = new Rectangle(20, 0, 1, 1); + if (this.txグラフ != null) + { + this.stキラキラ[ k ].ct進行.t進行Loop(); + int num1 = (int)this.stキラキラ[ k ].x; + int num2 = this.stキラキラ[ k ].ct進行.n現在の値; + this.txグラフ.vc拡大縮小倍率 = new Vector3(this.stキラキラ[ k ].fScale, this.stキラキラ[ k ].fScale, this.stキラキラ[ k ].fScale); + this.txグラフ.n透明度 = 138 - 2 * this.stキラキラ[ k ].Trans; + if ( num2 < (2.3f * this.dbグラフ値目標_表示) ) + { + this.txグラフ.t2D描画(CDTXMania.app.Device, 368+num1, 318-num2, rectangle); + } + } + } } return 0; @@ -153,8 +275,25 @@ namespace DTXMania #region [ private ] //---------------- + [StructLayout( LayoutKind.Sequential )] + private struct STキラキラ + { + public int x; + public int y; + public float fScale; + public int Trans; + public CCounter ct進行; + } + private STキラキラ[] stキラキラ = new STキラキラ[ 64 ]; + private STキラキラ[] stフラッシュ = new STキラキラ[ 16 ]; + private double dbグラフ値目標; + private double dbグラフ値目標_表示; private double dbグラフ値現在; + private double dbグラフ値現在_表示; + private double dbグラフ値直前; + private int nグラフフラッシュct; + private CTexture txグラフ; //----------------- #endregion diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CStage演奏ドラム画面.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CStage演奏ドラム画面.cs index 29a4bddd..eaabe31a 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CStage演奏ドラム画面.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CStage演奏ドラム画面.cs @@ -1677,7 +1677,6 @@ namespace DTXMania private void t進行描画・グラフ() { if ( !CDTXMania.ConfigIni.bストイックモード && !CDTXMania.ConfigIni.bドラムが全部オートプレイである && CDTXMania.ConfigIni.bGraph.Drums ) -// if ( !CDTXMania.ConfigIni.bストイックモード && CDTXMania.ConfigIni.bGraph.Drums ) { this.actGraph.On進行描画(); } -- 2.11.0