From 622f7c56d7550db4e63009a56a193fe13896da7b Mon Sep 17 00:00:00 2001 From: yyagi Date: Wed, 2 Feb 2011 17:04:47 +0000 Subject: [PATCH] =?utf8?q?TEST=5FSHOWLAG=20=E3=83=9E=E3=82=AF=E3=83=AD?= =?utf8?q?=E3=82=92=E5=AE=9A=E7=BE=A9=E3=81=97=E3=81=A6=E3=83=93=E3=83=AB?= =?utf8?q?=E3=83=89=E3=81=99=E3=82=8B=E3=81=A8=E3=80=81=E5=88=A4=E5=AE=9A?= =?utf8?q?=E6=96=87=E5=AD=97=E5=88=97(Perfect,=20Great,...)=E3=81=AE?= =?utf8?q?=E4=B8=8B=E3=81=AB=E3=82=B8=E3=83=A3=E3=82=B9=E3=83=88=E3=82=BF?= =?utf8?q?=E3=82=A4=E3=83=9F=E3=83=B3=E3=82=B0=E3=81=8B=E3=82=89=E3=81=AE?= =?utf8?q?=E3=82=BA=E3=83=AC=E6=99=82=E9=96=93(ms)=E3=82=92=E8=A1=A8?= =?utf8?q?=E7=A4=BA=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=97?= =?utf8?q?=E3=81=9F=E3=80=82=20InputAdjust=E3=81=AE=E8=A8=AD=E5=AE=9A?= =?utf8?q?=E3=82=92=E5=8A=A0=E5=91=B3=E3=81=97=E3=81=9F=E4=B8=8A=E3=81=A7?= =?utf8?q?=E3=81=AE=E5=80=A4=E3=81=8C=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C?= =?utf8?q?=E3=82=8B=E3=81=AE=E3=81=A7=E3=80=81InputAdjust=E3=81=AE?= =?utf8?q?=E8=AA=BF=E6=95=B4=E7=94=A8=E3=81=AB=E5=88=A9=E7=94=A8=E3=81=A7?= =?utf8?q?=E3=81=8D=E3=82=8B=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@101 16f42ceb-6dc6-49c8-ba94-f2d53467949d --- .../コード/スコア、曲/CDTX.cs | 11 +-- .../07.演奏/CAct演奏判定文字列共通.cs | 68 +++++++++------- .../CAct演奏Guitar判定文字列.cs | 95 ++++++++++------------ .../ギター画面/CStage演奏ギター画面.cs | 35 ++++---- .../CAct演奏Drums判定文字列.cs | 93 ++++++++++----------- .../ドラム画面/CStage演奏ドラム画面.cs | 15 ++-- 6 files changed, 156 insertions(+), 161 deletions(-) diff --git a/DTXManiaプロジェクト/コード/スコア、曲/CDTX.cs b/DTXManiaプロジェクト/コード/スコア、曲/CDTX.cs index c27418f4..3ccfb0c6 100644 --- a/DTXManiaプロジェクト/コード/スコア、曲/CDTX.cs +++ b/DTXManiaプロジェクト/コード/スコア、曲/CDTX.cs @@ -383,6 +383,7 @@ namespace DTXMania public int n透明度 = 0xff; public int n発声位置; public int n発声時刻ms; + public int nLag; // 2011.2.1 yyagi public CDTX.CAVI rAVI; public CDTX.CAVIPAN rAVIPan; public CDTX.CBGA rBGA; @@ -510,11 +511,10 @@ namespace DTXMania public CChip() { - STDGBVALUE stdgbvalue = new STDGBVALUE(); - stdgbvalue.Drums = 0; - stdgbvalue.Guitar = 0; - stdgbvalue.Bass = 0; - this.nバーからの距離dot = stdgbvalue; + this.nバーからの距離dot = new STDGBVALUE(); + this.nバーからの距離dot.Drums = 0; + this.nバーからの距離dot.Guitar = 0; + this.nバーからの距離dot.Bass = 0; } public void t初期化() { @@ -524,6 +524,7 @@ namespace DTXMania this.db実数値 = 0.0; this.n発声位置 = 0; this.n発声時刻ms = 0; + this.nLag = -999; this.dbチップサイズ倍率 = 1.0; this.bHit = false; this.b可視 = true; diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏判定文字列共通.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏判定文字列共通.cs index 2db4592b..47de33de 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏判定文字列共通.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏判定文字列共通.cs @@ -22,6 +22,7 @@ namespace DTXMania public int n相対X座標; public int n相対Y座標; public int n透明度; + public int nLag; // 2011.2.1 yyagi } protected readonly ST判定文字列[] st判定文字列; @@ -31,51 +32,53 @@ namespace DTXMania public int n画像番号; public Rectangle rc; } + + protected readonly STlag数値[] stLag数値; // 2011.2.1 yyagi + [StructLayout( LayoutKind.Sequential )] + protected struct STlag数値 + { + public Rectangle rc; + } + protected CTexture[] tx判定文字列 = new CTexture[ 3 ]; + protected CTexture txlag数値 = new CTexture(); // 2011.2.1 yyagi // コンストラクタ public CAct演奏判定文字列共通() { - ST判定文字列[] st判定文字列Array = new ST判定文字列[ 7 ]; - ST判定文字列 st判定文字列 = new ST判定文字列(); - st判定文字列.n画像番号 = 0; - st判定文字列.rc = new Rectangle( 0, 0, 0x80, 0x2a ); - st判定文字列Array[ 0 ] = st判定文字列; - ST判定文字列 st判定文字列2 = new ST判定文字列(); - st判定文字列2.n画像番号 = 0; - st判定文字列2.rc = new Rectangle( 0, 0x2b, 0x80, 0x2a ); - st判定文字列Array[ 1 ] = st判定文字列2; - ST判定文字列 st判定文字列3 = new ST判定文字列(); - st判定文字列3.n画像番号 = 0; - st判定文字列3.rc = new Rectangle( 0, 0x56, 0x80, 0x2a ); - st判定文字列Array[ 2 ] = st判定文字列3; - ST判定文字列 st判定文字列4 = new ST判定文字列(); - st判定文字列4.n画像番号 = 1; - st判定文字列4.rc = new Rectangle( 0, 0, 0x80, 0x2a ); - st判定文字列Array[ 3 ] = st判定文字列4; - ST判定文字列 st判定文字列5 = new ST判定文字列(); - st判定文字列5.n画像番号 = 1; - st判定文字列5.rc = new Rectangle( 0, 0x2b, 0x80, 0x2a ); - st判定文字列Array[ 4 ] = st判定文字列5; - ST判定文字列 st判定文字列6 = new ST判定文字列(); - st判定文字列6.n画像番号 = 1; - st判定文字列6.rc = new Rectangle( 0, 0x56, 0x80, 0x2a ); - st判定文字列Array[ 5 ] = st判定文字列6; - ST判定文字列 st判定文字列7 = new ST判定文字列(); - st判定文字列7.n画像番号 = 2; - st判定文字列7.rc = new Rectangle( 0, 0, 0x80, 0x2a ); - st判定文字列Array[ 6 ] = st判定文字列7; - this.st判定文字列 = st判定文字列Array; + this.st判定文字列 = new ST判定文字列[ 7 ]; + Rectangle[] r = new Rectangle[] { + new Rectangle( 0, 0, 0x80, 0x2a ), + new Rectangle( 0, 0x2b, 0x80, 0x2a ), + new Rectangle( 0, 0x56, 0x80, 0x2a ), + new Rectangle( 0, 0, 0x80, 0x2a ), + new Rectangle( 0, 0x2b, 0x80, 0x2a ), + new Rectangle( 0, 0x56, 0x80, 0x2a ), + new Rectangle( 0, 0, 0x80, 0x2a ) + }; + for ( int i = 0; i < 7; i++ ) + { + this.st判定文字列[ i ] = new ST判定文字列(); + this.st判定文字列[ i ].n画像番号 = i / 3; + this.st判定文字列[ i ].rc = r[i]; + } + + this.stLag数値 = new STlag数値[ 12 * 2 ]; // 2011.2.1 yyagi + for ( int i = 0; i < 12; i++ ) + { + this.stLag数値[ i ].rc = new Rectangle( ( i % 4 ) * 15 , ( i / 4 ) * 19 , 15, 19 ); + this.stLag数値[ i + 12 ].rc = new Rectangle( ( i % 4 ) * 15 + 64, ( i / 4 ) * 19 + 64, 15, 19 ); + } base.b活性化してない = true; } // メソッド - public virtual void Start( int nLane, E判定 judge ) + public virtual void Start( int nLane, E判定 judge, int lag ) { if( ( nLane < 0 ) || ( nLane > 11 ) ) { @@ -90,6 +93,7 @@ namespace DTXMania this.st状態[ nLane ].n相対X座標 = 0; this.st状態[ nLane ].n相対Y座標 = 0; this.st状態[ nLane ].n透明度 = 0xff; + this.st状態[ nLane ].nLag = lag; } } @@ -119,6 +123,7 @@ namespace DTXMania this.tx判定文字列[ 0 ] = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay judge strings 1.png" ) ); this.tx判定文字列[ 1 ] = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay judge strings 2.png" ) ); this.tx判定文字列[ 2 ] = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay judge strings 3.png" ) ); + this.txlag数値 = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect level numbers.png" ) ); base.OnManagedリソースの作成(); } } @@ -129,6 +134,7 @@ namespace DTXMania CDTXMania.tテクスチャの解放( ref this.tx判定文字列[ 0 ] ); CDTXMania.tテクスチャの解放( ref this.tx判定文字列[ 1 ] ); CDTXMania.tテクスチャの解放( ref this.tx判定文字列[ 2 ] ); + CDTXMania.tテクスチャの解放( ref this.txlag数値 ); base.OnManagedリソースの解放(); } } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitar判定文字列.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitar判定文字列.cs index eda8737a..5ab18d38 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitar判定文字列.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitar判定文字列.cs @@ -12,57 +12,29 @@ namespace DTXMania public CAct演奏Guitar判定文字列() { - STレーンサイズ[] stレーンサイズArray = new STレーンサイズ[ 12 ]; + this.stレーンサイズ = new STレーンサイズ[ 12 ]; STレーンサイズ stレーンサイズ = new STレーンサイズ(); - stレーンサイズ.x = 0x24; - stレーンサイズ.w = 0x24; - stレーンサイズArray[ 0 ] = stレーンサイズ; - STレーンサイズ stレーンサイズ2 = new STレーンサイズ(); - stレーンサイズ2.x = 0x4d; - stレーンサイズ2.w = 30; - stレーンサイズArray[ 1 ] = stレーンサイズ2; - STレーンサイズ stレーンサイズ3 = new STレーンサイズ(); - stレーンサイズ3.x = 0x6f; - stレーンサイズ3.w = 30; - stレーンサイズArray[ 2 ] = stレーンサイズ3; - STレーンサイズ stレーンサイズ4 = new STレーンサイズ(); - stレーンサイズ4.x = 0x92; - stレーンサイズ4.w = 0x2a; - stレーンサイズArray[ 3 ] = stレーンサイズ4; - STレーンサイズ stレーンサイズ5 = new STレーンサイズ(); - stレーンサイズ5.x = 0xc1; - stレーンサイズ5.w = 30; - stレーンサイズArray[ 4 ] = stレーンサイズ5; - STレーンサイズ stレーンサイズ6 = new STレーンサイズ(); - stレーンサイズ6.x = 0xe3; - stレーンサイズ6.w = 30; - stレーンサイズArray[ 5 ] = stレーンサイズ6; - STレーンサイズ stレーンサイズ7 = new STレーンサイズ(); - stレーンサイズ7.x = 0x105; - stレーンサイズ7.w = 30; - stレーンサイズArray[ 6 ] = stレーンサイズ7; - STレーンサイズ stレーンサイズ8 = new STレーンサイズ(); - stレーンサイズ8.x = 0x127; - stレーンサイズ8.w = 0x24; - stレーンサイズArray[ 7 ] = stレーンサイズ8; - STレーンサイズ stレーンサイズ9 = new STレーンサイズ(); - stレーンサイズ9.x = 0; - stレーンサイズ9.w = 0; - stレーンサイズArray[ 8 ] = stレーンサイズ9; - STレーンサイズ stレーンサイズ10 = new STレーンサイズ(); - stレーンサイズ10.x = 0; - stレーンサイズ10.w = 0; - stレーンサイズArray[ 9 ] = stレーンサイズ10; - STレーンサイズ stレーンサイズ11 = new STレーンサイズ(); - stレーンサイズ11.x = 0x1a; - stレーンサイズ11.w = 0x6f; - stレーンサイズArray[ 10 ] = stレーンサイズ11; - STレーンサイズ stレーンサイズ12 = new STレーンサイズ(); - stレーンサイズ12.x = 480; - stレーンサイズ12.w = 0x6f; - stレーンサイズArray[ 11 ] = stレーンサイズ12; - this.stレーンサイズ = stレーンサイズArray; - base.b活性化してない = true; + int[ , ] sizeXW = new int[ , ] { + { 0x24, 0x24 }, + { 0x4d, 30 }, + { 0x6f, 30 }, + { 0x92, 0x2a }, + { 0xc1, 30 }, + { 0xe3, 30 }, + { 0x105, 30 }, + { 0x127, 0x24 }, + { 0, 0 }, + { 0, 0 }, + { 0x1a, 0x6f }, // 最後2つ(Gt, Bs)がドラムスと異なる + { 480, 0x6f } // + }; + for ( int i = 0; i < 12; i++ ) + { + this.stレーンサイズ[ i ] = new STレーンサイズ(); + this.stレーンサイズ[ i ].x = sizeXW[ i, 0 ]; + this.stレーンサイズ[ i ].w = sizeXW[ i, 1 ]; + } + base.b活性化してない = true; } @@ -170,13 +142,34 @@ namespace DTXMania num5 = ( ( (E判定文字表示位置) CDTXMania.ConfigIni.判定文字表示位置.Guitar ) == E判定文字表示位置.レーン上 ) ? this.stレーンサイズ[ j ].x : 0xaf; num6 = CDTXMania.ConfigIni.bReverse.Guitar ? 0x12b : 190; } - int x = ( ( num5 + base.st状態[ j ].n相対X座標 ) + ( this.stレーンサイズ[ j ].w / 2 ) ) - ( (int) ( ( ( 128f * base.st状態[ j ].fX方向拡大率 ) * 0.8 ) / 2.0 ) ); + int xc = ( ( num5 + base.st状態[ j ].n相対X座標 ) + ( this.stレーンサイズ[ j ].w / 2 ) ); + int x = xc - ( (int) ( ( ( 128f * base.st状態[ j ].fX方向拡大率 ) * 0.8 ) / 2.0 ) ); int y = ( num6 + base.st状態[ j ].n相対Y座標 ) - ( (int) ( ( ( 43f * base.st状態[ j ].fY方向拡大率 ) * 0.8 ) / 2.0 ) ); if( base.tx判定文字列[ index ] != null ) { base.tx判定文字列[ index ].n透明度 = base.st状態[ j ].n透明度; base.tx判定文字列[ index ].vc拡大縮小倍率 = new Vector3( (float) ( base.st状態[ j ].fX方向拡大率 * 0.8 ), (float) ( base.st状態[ j ].fY方向拡大率 * 0.8 ), 1f ); base.tx判定文字列[ index ].t2D描画( CDTXMania.app.Device, x, y, base.st判定文字列[ (int) base.st状態[ j ].judge ].rc ); +#if TEST_SHOWLAG + if (base.txlag数値 != null) // 2011.2.1 yyagi + { + bool minus = false; + int offsetX = 0; + string strDispLag = base.st状態[j].nLag.ToString(); + if (strDispLag[0] == '-') { + minus = true; + } + x = xc - strDispLag.Length * 15 / 2; + for ( int i = 0; i < strDispLag.Length; i++ ) + { + int p = ( strDispLag[ i ] == '-' ) ? 11 : (int) ( strDispLag[ i ] - '0' ); //int.Parse(strDispLag[i]); + p += minus ? 0 : 12; + base.txlag数値.t2D描画( CDTXMania.app.Device, x + offsetX, y + 35, base.stLag数値[ p ].rc ); + offsetX += 15; + } + } +#endif + } Label_06B7: ; } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CStage演奏ギター画面.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CStage演奏ギター画面.cs index f8ced29c..8fa790ca 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CStage演奏ギター画面.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CStage演奏ギター画面.cs @@ -627,23 +627,24 @@ namespace DTXMania private E判定 e指定時刻からChipのJUDGEを返す( long nTime, CDTX.CChip pChip, int nInputAdjustTime ) { - if( pChip != null ) + if ( pChip != null ) { - int nDeltaTime = Math.Abs( (int) ( nTime + nInputAdjustTime - pChip.n発声時刻ms ) ); // #23580 2011.1.3 yyagi: add "nInputAdjustTime" to add input timing adjust feature -//Debug.WriteLine("nAbsTime=" + (nTime - pChip.n発声時刻ms) + ", nDeltaTime=" + (nTime + nInputAdjustTime - pChip.n発声時刻ms)); - if( nDeltaTime <= CDTXMania.nPerfect範囲ms ) + pChip.nLag = (int) ( nTime + nInputAdjustTime - pChip.n発声時刻ms ); // #23580 2011.1.3 yyagi: add "nInputAdjustTime" to add input timing adjust feature + int nDeltaTime = Math.Abs( pChip.nLag ); + //Debug.WriteLine("nAbsTime=" + (nTime - pChip.n発声時刻ms) + ", nDeltaTime=" + (nTime + nInputAdjustTime - pChip.n発声時刻ms)); + if ( nDeltaTime <= CDTXMania.nPerfect範囲ms ) { return E判定.Perfect; } - if( nDeltaTime <= CDTXMania.nGreat範囲ms ) + if ( nDeltaTime <= CDTXMania.nGreat範囲ms ) { return E判定.Great; } - if( nDeltaTime <= CDTXMania.nGood範囲ms ) + if ( nDeltaTime <= CDTXMania.nGood範囲ms ) { return E判定.Good; } - if( nDeltaTime <= CDTXMania.nPoor範囲ms ) + if ( nDeltaTime <= CDTXMania.nPoor範囲ms ) { return E判定.Poor; } @@ -974,13 +975,13 @@ namespace DTXMania switch (pChip.e楽器パート) { case E楽器パート.GUITAR: - eJudgeResult = this.e指定時刻からChipのJUDGEを返す(nHitTime, pChip, bIsAutoPlay ? 0 : this.nInputAdjustTimeMs.Guitar); - this.actJudgeString.Start(10, bIsAutoPlay ? E判定.Auto : eJudgeResult); + eJudgeResult = this.e指定時刻からChipのJUDGEを返す( nHitTime, pChip, bIsAutoPlay ? 0 : this.nInputAdjustTimeMs.Guitar ); + this.actJudgeString.Start( 10, bIsAutoPlay ? E判定.Auto : eJudgeResult, pChip.nLag ); break; case E楽器パート.BASS: - eJudgeResult = this.e指定時刻からChipのJUDGEを返す(nHitTime, pChip, bIsAutoPlay ? 0 : this.nInputAdjustTimeMs.Bass); - this.actJudgeString.Start(11, bIsAutoPlay ? E判定.Auto : eJudgeResult); + eJudgeResult = this.e指定時刻からChipのJUDGEを返す( nHitTime, pChip, bIsAutoPlay ? 0 : this.nInputAdjustTimeMs.Bass ); + this.actJudgeString.Start( 11, bIsAutoPlay ? E判定.Auto : eJudgeResult, pChip.nLag ); break; } if( !bIsAutoPlay ) @@ -1112,12 +1113,12 @@ namespace DTXMania break; case E楽器パート.GUITAR: - this.actJudgeString.Start( 10, E判定.Bad ); + this.actJudgeString.Start( 10, E判定.Bad, 999 ); this.actCombo.n現在のコンボ数.Guitar = 0; return; case E楽器パート.BASS: - this.actJudgeString.Start( 11, E判定.Bad ); + this.actJudgeString.Start( 11, E判定.Bad, 999 ); this.actCombo.n現在のコンボ数.Bass = 0; break; @@ -1306,9 +1307,9 @@ namespace DTXMania //nInputAdjustTime = nInputAdjustTimes[(int)pChip.e楽器パート]; nInputAdjustTime = this.nInputAdjustTimeMs[(int)pChip.e楽器パート]; } - + if( ( ( pChip.e楽器パート != E楽器パート.UNKNOWN ) && !pChip.bHit ) && - ((pChip.nバーからの距離dot.Drums < 0) && (this.e指定時刻からChipのJUDGEを返す(CDTXMania.Timer.n現在時刻, pChip, nInputAdjustTime) == E判定.Miss))) + ((pChip.nバーからの距離dot.Drums < 0) && (this.e指定時刻からChipのJUDGEを返す(CDTXMania.Timer.n現在時刻, pChip, nInputAdjustTime ) == E判定.Miss))) { this.tチップのヒット処理( CDTXMania.Timer.n現在時刻, pChip ); } @@ -2104,7 +2105,7 @@ namespace DTXMania this.t入力メソッド記憶( E楽器パート.GUITAR ); long nTime = event2.nTimeStamp - CDTXMania.Timer.n前回リセットした時のシステム時刻; CDTX.CChip pChip = this.r指定時刻に一番近い未ヒットChip( nTime, 0x2f, this.nInputAdjustTimeMs.Guitar, 0 ); - E判定 e判定 = this.e指定時刻からChipのJUDGEを返す(nTime, pChip, this.nInputAdjustTimeMs.Guitar); + E判定 e判定 = this.e指定時刻からChipのJUDGEを返す(nTime, pChip, this.nInputAdjustTimeMs.Guitar ); if (((pChip != null) && ((pChip.nチャンネル番号 & 15) == flagRGB)) && (e判定 != E判定.Miss)) { if( ( flagR != 0 ) || ( flagRGB == 0 ) ) @@ -2239,7 +2240,7 @@ namespace DTXMania this.t入力メソッド記憶( E楽器パート.BASS ); long nTime = event2.nTimeStamp - CDTXMania.Timer.n前回リセットした時のシステム時刻; CDTX.CChip pChip = this.r指定時刻に一番近い未ヒットChip( nTime, 0xaf, this.nInputAdjustTimeMs.Bass, 0 ); - E判定 e判定 = this.e指定時刻からChipのJUDGEを返す(nTime, pChip, this.nInputAdjustTimeMs.Bass); + E判定 e判定 = this.e指定時刻からChipのJUDGEを返す(nTime, pChip, this.nInputAdjustTimeMs.Bass ); if (((pChip != null) && ((pChip.nチャンネル番号 & 15) == flagRGB)) && (e判定 != E判定.Miss)) { if( ( flagR != 0 ) || ( flagRGB == 0 ) ) diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drums判定文字列.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drums判定文字列.cs index 54d2c244..9e437009 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drums判定文字列.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drums判定文字列.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Text; using System.Runtime.InteropServices; using SlimDX; @@ -12,56 +13,28 @@ namespace DTXMania public CAct演奏Drums判定文字列() { - STレーンサイズ[] stレーンサイズArray = new STレーンサイズ[ 12 ]; + this.stレーンサイズ = new STレーンサイズ[ 12 ]; STレーンサイズ stレーンサイズ = new STレーンサイズ(); - stレーンサイズ.x = 0x24; - stレーンサイズ.w = 0x24; - stレーンサイズArray[ 0 ] = stレーンサイズ; - STレーンサイズ stレーンサイズ2 = new STレーンサイズ(); - stレーンサイズ2.x = 0x4d; - stレーンサイズ2.w = 30; - stレーンサイズArray[ 1 ] = stレーンサイズ2; - STレーンサイズ stレーンサイズ3 = new STレーンサイズ(); - stレーンサイズ3.x = 0x6f; - stレーンサイズ3.w = 30; - stレーンサイズArray[ 2 ] = stレーンサイズ3; - STレーンサイズ stレーンサイズ4 = new STレーンサイズ(); - stレーンサイズ4.x = 0x92; - stレーンサイズ4.w = 0x2a; - stレーンサイズArray[ 3 ] = stレーンサイズ4; - STレーンサイズ stレーンサイズ5 = new STレーンサイズ(); - stレーンサイズ5.x = 0xc1; - stレーンサイズ5.w = 30; - stレーンサイズArray[ 4 ] = stレーンサイズ5; - STレーンサイズ stレーンサイズ6 = new STレーンサイズ(); - stレーンサイズ6.x = 0xe3; - stレーンサイズ6.w = 30; - stレーンサイズArray[ 5 ] = stレーンサイズ6; - STレーンサイズ stレーンサイズ7 = new STレーンサイズ(); - stレーンサイズ7.x = 0x105; - stレーンサイズ7.w = 30; - stレーンサイズArray[ 6 ] = stレーンサイズ7; - STレーンサイズ stレーンサイズ8 = new STレーンサイズ(); - stレーンサイズ8.x = 0x127; - stレーンサイズ8.w = 0x24; - stレーンサイズArray[ 7 ] = stレーンサイズ8; - STレーンサイズ stレーンサイズ9 = new STレーンサイズ(); - stレーンサイズ9.x = 0; - stレーンサイズ9.w = 0; - stレーンサイズArray[ 8 ] = stレーンサイズ9; - STレーンサイズ stレーンサイズ10 = new STレーンサイズ(); - stレーンサイズ10.x = 0; - stレーンサイズ10.w = 0; - stレーンサイズArray[ 9 ] = stレーンサイズ10; - STレーンサイズ stレーンサイズ11 = new STレーンサイズ(); - stレーンサイズ11.x = 0x1fb; - stレーンサイズ11.w = 80; - stレーンサイズArray[ 10 ] = stレーンサイズ11; - STレーンサイズ stレーンサイズ12 = new STレーンサイズ(); - stレーンサイズ12.x = 0x18e; - stレーンサイズ12.w = 80; - stレーンサイズArray[ 11 ] = stレーンサイズ12; - this.stレーンサイズ = stレーンサイズArray; + int[,] sizeXW = new int[,] { + { 0x24, 0x24 }, + { 0x4d, 30 }, + { 0x6f, 30 }, + { 0x92, 0x2a }, + { 0xc1, 30 }, + { 0xe3, 30 }, + { 0x105, 30 }, + { 0x127, 0x24 }, + { 0, 0 }, + { 0, 0 }, + { 0x1fb, 80 }, + { 0x18e, 80 } + }; + for ( int i = 0; i < 12; i++ ) + { + this.stレーンサイズ[i] = new STレーンサイズ(); + this.stレーンサイズ[i].x = sizeXW[i, 0]; + this.stレーンサイズ[i].w = sizeXW[i, 1]; + } base.b活性化してない = true; } @@ -181,13 +154,33 @@ namespace DTXMania num6 = CDTXMania.ConfigIni.bReverse.Guitar ? ( ( ( ( (E判定文字表示位置) CDTXMania.ConfigIni.判定文字表示位置.Guitar ) == E判定文字表示位置.レーン上 ) ? 240 : 100 ) + ( this.n文字の縦表示位置[ j ] * 0x20 ) ) : ( ( ( ( (E判定文字表示位置) CDTXMania.ConfigIni.判定文字表示位置.Guitar ) == E判定文字表示位置.レーン上 ) ? 180 : 300 ) + ( this.n文字の縦表示位置[ j ] * 0x20 ) ); } } - int x = ( ( num5 + base.st状態[ j ].n相対X座標 ) + ( this.stレーンサイズ[ j ].w / 2 ) ) - ( (int) ( ( 64f * base.st状態[ j ].fX方向拡大率 ) * ( ( j < 10 ) ? 1.0 : 0.7 ) ) ); + int xc = ( ( num5 + base.st状態[ j ].n相対X座標 ) + ( this.stレーンサイズ[ j ].w / 2 ) ); // Xcenter座標 + int x = xc - ( (int) ( ( 64f * base.st状態[ j ].fX方向拡大率 ) * ( ( j < 10 ) ? 1.0 : 0.7 ) ) ); int y = ( num6 + base.st状態[ j ].n相対Y座標 ) - ( (int) ( ( ( 43f * base.st状態[ j ].fY方向拡大率 ) * ( ( j < 10 ) ? 1.0 : 0.7 ) ) / 2.0 ) ); if( base.tx判定文字列[ index ] != null ) { base.tx判定文字列[ index ].n透明度 = base.st状態[ j ].n透明度; base.tx判定文字列[ index ].vc拡大縮小倍率 = new Vector3( (float) ( base.st状態[ j ].fX方向拡大率 * ( ( j < 10 ) ? 1.0 : 0.7 ) ), (float) ( base.st状態[ j ].fY方向拡大率 * ( ( j < 10 ) ? 1.0 : 0.7 ) ), 1f ); base.tx判定文字列[ index ].t2D描画( CDTXMania.app.Device, x, y, base.st判定文字列[ (int) base.st状態[ j ].judge ].rc ); +#if TEST_SHOWLAG + if (base.txlag数値 != null) // 2011.2.1 yyagi + { + bool minus = false; + int offsetX = 0; + string strDispLag = base.st状態[j].nLag.ToString(); + if (strDispLag[0] == '-') { + minus = true; + } + x = xc - strDispLag.Length * 15 / 2; + for ( int i = 0; i < strDispLag.Length; i++ ) + { + int p = ( strDispLag[ i ] == '-' ) ? 11 : (int) ( strDispLag[ i ] - '0' ); //int.Parse(strDispLag[i]); + p += minus ? 0 : 12; + base.txlag数値.t2D描画( CDTXMania.app.Device, x + offsetX, y + 37, base.stLag数値[ p ].rc ); + offsetX += 15; + } + } +#endif } Label_07FC: ; } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CStage演奏ドラム画面.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CStage演奏ドラム画面.cs index 5108adb5..29a4bddd 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CStage演奏ドラム画面.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CStage演奏ドラム画面.cs @@ -687,7 +687,8 @@ namespace DTXMania { if( pChip != null ) { - int nDeltaTime = Math.Abs( (int) ( nTime + nInputAdjustTime - pChip.n発声時刻ms ) ); // #23580 2011.1.3 yyagi: add "nInputAdjustTime" to add input timing adjust feature + pChip.nLag = (int) ( nTime + nInputAdjustTime - pChip.n発声時刻ms ); // #23580 2011.1.3 yyagi: add "nInputAdjustTime" to add input timing adjust feature + int nDeltaTime = Math.Abs( pChip.nLag); //Debug.WriteLine("nAbsTime=" + (nTime - pChip.n発声時刻ms) + ", nDeltaTime=" + (nTime + nInputAdjustTime - pChip.n発声時刻ms)); if( nDeltaTime <= CDTXMania.nPerfect範囲ms ) { @@ -1169,7 +1170,7 @@ namespace DTXMania { int nInputAdjustTime = bIsAutoPlay[ this.nチャンネル0Atoレーン07[ pChip.nチャンネル番号 - 0x11 ] ] ? 0 : this.nInputAdjustTimeMs.Drums; eJudgeResult = this.e指定時刻からChipのJUDGEを返す( nHitTime, pChip, nInputAdjustTime ); - this.actJudgeString.Start( this.nチャンネル0Atoレーン07[ pChip.nチャンネル番号 - 0x11 ], bIsAutoPlay[ this.nチャンネル0Atoレーン07[ pChip.nチャンネル番号 - 0x11 ] ] ? E判定.Auto : eJudgeResult ); + this.actJudgeString.Start( this.nチャンネル0Atoレーン07[ pChip.nチャンネル番号 - 0x11 ], bIsAutoPlay[ this.nチャンネル0Atoレーン07[ pChip.nチャンネル番号 - 0x11 ] ] ? E判定.Auto : eJudgeResult, pChip.nLag ); } break; @@ -1177,7 +1178,7 @@ namespace DTXMania { int nInputAdjustTime = bIsAutoPlay.Guitar ? 0 : this.nInputAdjustTimeMs.Guitar; eJudgeResult = this.e指定時刻からChipのJUDGEを返す( nHitTime, pChip, nInputAdjustTime ); - this.actJudgeString.Start( 10, bIsAutoPlay.Guitar ? E判定.Auto : eJudgeResult ); + this.actJudgeString.Start( 10, bIsAutoPlay.Guitar ? E判定.Auto : eJudgeResult, pChip.nLag ); } break; @@ -1185,7 +1186,7 @@ namespace DTXMania { int nInputAdjustTime = bIsAutoPlay.Bass ? 0 : this.nInputAdjustTimeMs.Bass; eJudgeResult = this.e指定時刻からChipのJUDGEを返す( nHitTime, pChip, nInputAdjustTime ); - this.actJudgeString.Start( 11, bIsAutoPlay.Bass ? E判定.Auto : eJudgeResult ); + this.actJudgeString.Start( 11, bIsAutoPlay.Bass ? E判定.Auto : eJudgeResult, pChip.nLag ); } break; } @@ -1346,18 +1347,18 @@ namespace DTXMania case E楽器パート.DRUMS: if( ( nLane >= 0 ) && ( nLane <= 7 ) ) { - this.actJudgeString.Start( nLane, CDTXMania.ConfigIni.bAutoPlay[ nLane ] ? E判定.Auto : E判定.Miss ); + this.actJudgeString.Start( nLane, CDTXMania.ConfigIni.bAutoPlay[ nLane ] ? E判定.Auto : E判定.Miss, 999 ); } this.actCOMBO.n現在のコンボ数.Drums = 0; return; case E楽器パート.GUITAR: - this.actJudgeString.Start( 10, E判定.Bad ); + this.actJudgeString.Start( 10, E判定.Bad, 999 ); this.actCOMBO.n現在のコンボ数.Guitar = 0; return; case E楽器パート.BASS: - this.actJudgeString.Start( 11, E判定.Bad ); + this.actJudgeString.Start( 11, E判定.Bad, 999 ); this.actCOMBO.n現在のコンボ数.Bass = 0; return; } -- 2.11.0