DTXManiaXG(Ver.K)4.00Series
修訂 | fdbdb9cdbb25eb42817a36b6b5140e82a5b57340 (tree) |
---|---|
時間 | 2022-08-15 23:41:12 |
作者 | ![]() |
Commiter | kairera0467 |
#xxxxx matixx演奏画面のステータスパネル画像を作り直し
#xxxxx matixx演奏画面のステータスパネルの座標を大幅調整
#xxxxx matixx演奏画面のステータスパネルに称号名を表示できるよう変更(グループ名と同じ場所で変更する)
#xxxxx matixx演奏画面のステータスパネルの3D描画している場所の座標を、基準座標からの相対位置で扱えるよう変更(表への影響はありません)
@@ -20,7 +20,8 @@ namespace DTXMania | ||
20 | 20 | |
21 | 21 | public override void On活性化() |
22 | 22 | { |
23 | - this.pfPlayerNameFont = new CPrivateFastFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 18, FontStyle.Regular ); | |
23 | + this.pfPlayerNameFont = new CPrivateFastFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 15, FontStyle.Regular ); | |
24 | + this.pfGroupNameFont = new CPrivateFastFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 11, FontStyle.Regular ); | |
24 | 25 | this.pfSongTitleFont = new CPrivateFastFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 14, FontStyle.Regular ); |
25 | 26 | this.pfSongArtistFont = new CPrivateFastFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 9, FontStyle.Regular ); |
26 | 27 | base.On活性化(); |
@@ -48,6 +49,7 @@ namespace DTXMania | ||
48 | 49 | this.txArtistName = this.t指定された文字テクスチャを生成する_小( strArtistName ); |
49 | 50 | |
50 | 51 | Bitmap bmpCardName = new Bitmap(1, 1); |
52 | + Bitmap bmpTitleName = new Bitmap(1, 1); | |
51 | 53 | #region[ ネームカラー ] |
52 | 54 | //-------------------- |
53 | 55 | Color clNameColor = Color.White; |
@@ -138,7 +140,9 @@ namespace DTXMania | ||
138 | 140 | #endregion |
139 | 141 | #region[ 名前、グループ名 ] |
140 | 142 | bmpCardName = this.pfPlayerNameFont.DrawPrivateFont( CDTXMania.ConfigIni.strGetCardName( E楽器パート.DRUMS ), Color.White, Color.Transparent ); |
143 | + bmpTitleName = this.pfGroupNameFont.DrawPrivateFont( CDTXMania.ConfigIni.strGetGroupName( E楽器パート.DRUMS ), Color.White, Color.Transparent ); | |
141 | 144 | this.txPlayerName = CDTXMania.tテクスチャの生成( bmpCardName, false ); |
145 | + this.txTitleName = CDTXMania.tテクスチャの生成( bmpTitleName, false ); | |
142 | 146 | #endregion |
143 | 147 | #region[ 難易度数値 ] |
144 | 148 | string str = string.Format( "{0:0.00}", ( (float)CDTXMania.DTX.LEVEL.Drums) / 10f ); |
@@ -178,10 +182,10 @@ namespace DTXMania | ||
178 | 182 | |
179 | 183 | #region[ 難易度ラベル/パート表記 ] |
180 | 184 | // 難易度ラベル/パート表記 |
181 | - // TODO:パート表記のフォントが3D描画の都合で汚くなってしまう。ここでテクスチャを合成したほうがよさそうかも... | |
182 | 185 | Image diff = CDTXMania.tテクスチャをImageで読み込む( CSkin.Path( @"Graphics\7_Difficulty.png" ) ); |
183 | 186 | Image part = CDTXMania.tテクスチャをImageで読み込む( CSkin.Path( @"Graphics\7_Part.png" ) ); |
184 | 187 | Image number = CDTXMania.tテクスチャをImageで読み込む( CSkin.Path( @"Graphics\7_Difficulty_number.png" ) ); |
188 | + //Image test = CDTXMania.tテクスチャをImageで読み込む(CSkin.Path(@"Graphics\0.png")); | |
185 | 189 | Bitmap bDiff = new Bitmap( 68, 68 ); |
186 | 190 | Graphics gDiff = Graphics.FromImage( bDiff ); |
187 | 191 | gDiff.PageUnit = GraphicsUnit.Pixel; |
@@ -207,14 +211,17 @@ namespace DTXMania | ||
207 | 211 | } |
208 | 212 | } |
209 | 213 | |
214 | + //gDiff.DrawImage( test, 40, 34, new Rectangle(0, 0, 18, 25), GraphicsUnit.Pixel ); | |
215 | + | |
216 | + // bDiff.Save("test.png"); | |
217 | + | |
210 | 218 | this.tx難易度ラベル = new CTexture( CDTXMania.app.Device, bDiff, CDTXMania.TextureFormat, false ); |
211 | - //this.tx難易度ラベル = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\7_Difficulty.png" ) ); | |
212 | - //this.txパート = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\7_Part.png" ) ); | |
213 | 219 | |
214 | 220 | gDiff?.Dispose(); |
215 | 221 | diff?.Dispose(); |
216 | 222 | part?.Dispose(); |
217 | 223 | number?.Dispose(); |
224 | + //test.Dispose(); | |
218 | 225 | bDiff?.Dispose(); |
219 | 226 | #endregion |
220 | 227 |
@@ -235,6 +242,7 @@ namespace DTXMania | ||
235 | 242 | CDTXMania.t安全にDisposeする( ref this.iRisky ); |
236 | 243 | CDTXMania.t安全にDisposeする( ref this.iDrumspeed ); |
237 | 244 | CDTXMania.t安全にDisposeする( ref this.pfPlayerNameFont ); |
245 | + CDTXMania.t安全にDisposeする( ref this.pfGroupNameFont ); | |
238 | 246 | CDTXMania.t安全にDisposeする( ref this.pfSongTitleFont ); |
239 | 247 | CDTXMania.t安全にDisposeする( ref this.pfSongArtistFont ); |
240 | 248 | CDTXMania.tテクスチャの解放( ref this.txJacket ); |
@@ -244,6 +252,7 @@ namespace DTXMania | ||
244 | 252 | CDTXMania.tテクスチャの解放( ref this.tx達成率数字_整数 ); |
245 | 253 | |
246 | 254 | CDTXMania.tテクスチャの解放( ref this.txPlayerName ); |
255 | + CDTXMania.tテクスチャの解放( ref this.txTitleName ); | |
247 | 256 | |
248 | 257 | CDTXMania.tテクスチャの解放( ref this.tx難易度ラベル ); |
249 | 258 | CDTXMania.tテクスチャの解放( ref this.txパート ); |
@@ -271,17 +280,18 @@ namespace DTXMania | ||
271 | 280 | #endif |
272 | 281 | this.b初めての進行描画 = false; |
273 | 282 | } |
274 | - //if ( CDTXMania.ConfigIni.bShowMusicInfo ) | |
275 | - if( this.txNamePlate != null ) | |
276 | - { | |
277 | - //this.txNamePlate.t3D描画( CDTXMania.app.Device, identity ); | |
278 | - } | |
283 | + | |
284 | + // スキルパネルの設置座標からの相対距離 | |
285 | + float f基準X = -465; | |
286 | + float f基準Y = -45; | |
287 | + float f基準角 = -38; | |
288 | + | |
279 | 289 | if( this.txスキルパネル != null ) |
280 | 290 | { |
281 | 291 | Matrix matSkillPanel = Matrix.Identity; |
282 | - matSkillPanel *= Matrix.Scaling( 0.6f, 1.0f, 1 ); | |
292 | + matSkillPanel *= Matrix.Scaling( 0.6f, 0.95f, 1 ); | |
283 | 293 | matSkillPanel *= Matrix.RotationY( C変換.DegreeToRadian( -38 ) ); |
284 | - matSkillPanel *= Matrix.Translation( -465, -25, 0 ); | |
294 | + matSkillPanel *= Matrix.Translation( f基準X, f基準Y, 0 ); | |
285 | 295 | this.txスキルパネル.t3D描画( CDTXMania.app.Device, matSkillPanel ); |
286 | 296 | } |
287 | 297 | if( this.txPlayerName != null ) |
@@ -289,10 +299,17 @@ namespace DTXMania | ||
289 | 299 | Matrix matPlayerName = Matrix.Identity; |
290 | 300 | matPlayerName *= Matrix.Scaling( 0.6f, 1, 1 ); |
291 | 301 | matPlayerName *= Matrix.RotationY( C変換.DegreeToRadian( -38 ) ); |
292 | - matPlayerName *= Matrix.Translation( -578 + ( this.txPlayerName.szテクスチャサイズ.Width / 2.0f ), 161, 0 ); | |
302 | + matPlayerName *= Matrix.Translation( f基準X - 110 + ( this.txPlayerName.szテクスチャサイズ.Width / 2.0f ), f基準Y + 180, 0 ); | |
293 | 303 | this.txPlayerName.t3D描画( CDTXMania.app.Device, matPlayerName ); |
294 | 304 | } |
295 | - | |
305 | + if( this.txTitleName != null ) | |
306 | + { | |
307 | + Matrix matTitleName = Matrix.Identity; | |
308 | + matTitleName *= Matrix.Scaling( 0.6f, 1, 1 ); | |
309 | + matTitleName *= Matrix.RotationY( C変換.DegreeToRadian( -38 ) ); | |
310 | + matTitleName *= Matrix.Translation( f基準X - 118 + ( this.txTitleName.szテクスチャサイズ.Width / 2.0f ), f基準Y + 198, 0 ); | |
311 | + this.txTitleName.t3D描画( CDTXMania.app.Device, matTitleName); | |
312 | + } | |
296 | 313 | #if DEBUG |
297 | 314 | if( CDTXMania.Input管理.Keyboard.bキーが押された( (int)SlimDXKey.F1 ) ) |
298 | 315 | { |
@@ -452,27 +469,23 @@ namespace DTXMania | ||
452 | 469 | // this.tx判定数数字.t3D描画(CDTXMania.app.Device, matScoreXG, rectangle); |
453 | 470 | //} |
454 | 471 | |
455 | - this.t判定数文字描画( -476, 107, CDTXMania.stage演奏ドラム画面GITADORA.nヒット数_Auto含む.Drums.Perfect ); | |
456 | - this.t判定数文字描画( -476, 77, CDTXMania.stage演奏ドラム画面GITADORA.nヒット数_Auto含む.Drums.Great ); | |
457 | - this.t判定数文字描画( -476, 47, CDTXMania.stage演奏ドラム画面GITADORA.nヒット数_Auto含む.Drums.Good ); | |
458 | - this.t判定数文字描画( -476, 17, CDTXMania.stage演奏ドラム画面GITADORA.nヒット数_Auto含む.Drums.Poor ); | |
459 | - this.t判定数文字描画( -476, -13, CDTXMania.stage演奏ドラム画面GITADORA.nヒット数_Auto含む.Drums.Miss ); | |
460 | - this.t判定数文字描画( -476, -43, CDTXMania.stage演奏ドラム画面GITADORA.actCombo.n現在のコンボ数.Drums最高値 ); | |
461 | - | |
462 | - this.t判定率文字描画( -435, 107, nowtotal == 0 ? " 0%" : string.Format("{0,3:##0}%", (CDTXMania.stage演奏ドラム画面GITADORA.nヒット数_Auto含む.Drums.Perfect / (float)nowtotal) * 100.0f ) ); | |
463 | - this.t判定率文字描画( -435, 77, nowtotal == 0 ? " 0%" : string.Format("{0,3:##0}%", (CDTXMania.stage演奏ドラム画面GITADORA.nヒット数_Auto含む.Drums.Great / (float)nowtotal) * 100.0f ) ); | |
464 | - this.t判定率文字描画( -435, 47, nowtotal == 0 ? " 0%" : string.Format("{0,3:##0}%", (CDTXMania.stage演奏ドラム画面GITADORA.nヒット数_Auto含む.Drums.Good / (float)nowtotal) * 100.0f ) ); | |
465 | - this.t判定率文字描画( -435, 17, nowtotal == 0 ? " 0%" : string.Format("{0,3:##0}%", (CDTXMania.stage演奏ドラム画面GITADORA.nヒット数_Auto含む.Drums.Poor / (float)nowtotal) * 100.0f ) ); | |
466 | - this.t判定率文字描画( -435, -13, nowtotal == 0 ? " 0%" : string.Format("{0,3:##0}%", (CDTXMania.stage演奏ドラム画面GITADORA.nヒット数_Auto含む.Drums.Miss / (float)nowtotal) * 100.0f ) ); | |
467 | - this.t判定率文字描画( -435, -43, nowtotal == 0 ? " 0%" : string.Format("{0,3:##0}%", (CDTXMania.stage演奏ドラム画面GITADORA.actCombo.n現在のコンボ数.Drums最高値 / (float)nowtotal) * 100.0f ) ); | |
472 | + this.t判定数文字描画( f基準X + -11, f基準Y + 130, CDTXMania.stage演奏ドラム画面GITADORA.nヒット数_Auto含む.Drums.Perfect ); | |
473 | + this.t判定数文字描画( f基準X + -11, f基準Y + 101, CDTXMania.stage演奏ドラム画面GITADORA.nヒット数_Auto含む.Drums.Great ); | |
474 | + this.t判定数文字描画( f基準X + -11, f基準Y + 72, CDTXMania.stage演奏ドラム画面GITADORA.nヒット数_Auto含む.Drums.Good ); | |
475 | + this.t判定数文字描画( f基準X + -11, f基準Y + 43, CDTXMania.stage演奏ドラム画面GITADORA.nヒット数_Auto含む.Drums.Poor ); | |
476 | + this.t判定数文字描画( f基準X + -11, f基準Y + 14, CDTXMania.stage演奏ドラム画面GITADORA.nヒット数_Auto含む.Drums.Miss ); | |
477 | + this.t判定数文字描画( f基準X + -11, f基準Y + -15, CDTXMania.stage演奏ドラム画面GITADORA.actCombo.n現在のコンボ数.Drums最高値 ); | |
468 | 478 | |
469 | - // 達成率 | |
479 | + this.t判定率文字描画( f基準X + 25, f基準Y + 130, nowtotal == 0 ? " 0%" : string.Format("{0,3:##0}%", (CDTXMania.stage演奏ドラム画面GITADORA.nヒット数_Auto含む.Drums.Perfect / (float)nowtotal) * 100.0f ) ); | |
480 | + this.t判定率文字描画( f基準X + 25, f基準Y + 101, nowtotal == 0 ? " 0%" : string.Format("{0,3:##0}%", (CDTXMania.stage演奏ドラム画面GITADORA.nヒット数_Auto含む.Drums.Great / (float)nowtotal) * 100.0f ) ); | |
481 | + this.t判定率文字描画( f基準X + 25, f基準Y + 72, nowtotal == 0 ? " 0%" : string.Format("{0,3:##0}%", (CDTXMania.stage演奏ドラム画面GITADORA.nヒット数_Auto含む.Drums.Good / (float)nowtotal) * 100.0f ) ); | |
482 | + this.t判定率文字描画( f基準X + 25, f基準Y + 43, nowtotal == 0 ? " 0%" : string.Format("{0,3:##0}%", (CDTXMania.stage演奏ドラム画面GITADORA.nヒット数_Auto含む.Drums.Poor / (float)nowtotal) * 100.0f ) ); | |
483 | + this.t判定率文字描画( f基準X + 25, f基準Y + 14, nowtotal == 0 ? " 0%" : string.Format("{0,3:##0}%", (CDTXMania.stage演奏ドラム画面GITADORA.nヒット数_Auto含む.Drums.Miss / (float)nowtotal) * 100.0f ) ); | |
484 | + this.t判定率文字描画( f基準X + 25, f基準Y + -15, nowtotal == 0 ? " 0%" : string.Format("{0,3:##0}%", (CDTXMania.stage演奏ドラム画面GITADORA.actCombo.n現在のコンボ数.Drums最高値 / (float)nowtotal) * 100.0f ) ); | |
470 | 485 | |
486 | + // TODO: 達成率 | |
471 | 487 | } |
472 | 488 | #endregion |
473 | - | |
474 | - | |
475 | - | |
476 | 489 | if ( this.txSongNamePlate != null ) |
477 | 490 | { |
478 | 491 | this.txSongNamePlate.t2D描画( CDTXMania.app.Device, 969, -2 ); |
@@ -492,35 +505,34 @@ namespace DTXMania | ||
492 | 505 | } |
493 | 506 | |
494 | 507 | #region[ 難易度ラベル ] |
495 | - if( /*this.txパート != null &&*/ this.tx難易度ラベル != null ) | |
508 | + if( this.tx難易度ラベル != null ) | |
496 | 509 | { |
497 | 510 | Matrix matPart = Matrix.Identity; |
498 | 511 | matPart *= Matrix.Scaling( 0.6f, 1, 1 ); |
499 | - matPart *= Matrix.RotationY( C変換.DegreeToRadian( -38 ) ); | |
500 | - matPart *= Matrix.Translation( -528, -110, 0 ); | |
512 | + matPart *= Matrix.RotationY( C変換.DegreeToRadian( f基準角 ) ); | |
513 | + matPart *= Matrix.Translation( f基準X + -65, f基準Y + -86, 0 ); | |
501 | 514 | this.tx難易度ラベル.t3D描画( CDTXMania.app.Device, matPart ); |
502 | - //this.tx難易度ラベル.t3D描画( CDTXMania.app.Device, matPart, new Rectangle( 0, 68 * CDTXMania.stage選曲GITADORA.n確定された曲の難易度, 68, 68 ) ); | |
503 | - //this.txパート.t3D描画( CDTXMania.app.Device, matPart, new Rectangle( 0, 0, 68, 68 ) ); // DrumsだけなのでRectangle.Xは0で固定 | |
515 | + // this.tx難易度ラベル.n透明度 = (int)(255 * 0.3); | |
504 | 516 | } |
505 | 517 | #endregion |
506 | 518 | #region[ HSアイコン ] |
507 | - //ハイスピはここで描画させる。 | |
508 | - if( this.nCurrentDrumspeed != CDTXMania.ConfigIni.n譜面スクロール速度.Drums && this.iDrumspeed != null ) | |
509 | - { | |
510 | - Graphics gNamePlate = Graphics.FromImage( this.bNamePlate ); | |
511 | - this.nCurrentDrumspeed = CDTXMania.ConfigIni.n譜面スクロール速度.Drums; | |
512 | - if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.A ) | |
513 | - { | |
514 | - gNamePlate.DrawImage( this.iDrumspeed, new Rectangle( 209, 156, 42, 48 ), new Rectangle( 0, ( ( this.nCurrentDrumspeed > 15 ) ? 15 : this.nCurrentDrumspeed ) * 0x30, 0x2a, 0x30 ), GraphicsUnit.Pixel ); | |
515 | - } | |
516 | - else if(CDTXMania.ConfigIni.eNamePlateType == Eタイプ.B) | |
517 | - { | |
518 | - gNamePlate.DrawImage( this.iDrumspeed, new Rectangle( 210, 141, 42, 48 ), new Rectangle( 0, ( ( this.nCurrentDrumspeed > 15 ) ? 15 : this.nCurrentDrumspeed ) * 0x30, 0x2a, 0x30 ), GraphicsUnit.Pixel ); | |
519 | - } | |
520 | - gNamePlate.Dispose(); | |
521 | - this.txNamePlate.Dispose(); | |
522 | - this.txNamePlate = new CTexture( CDTXMania.app.Device, this.bNamePlate, CDTXMania.TextureFormat, false ); | |
523 | - } | |
519 | + //ハイスピはここで描画させる。 | |
520 | + if( this.nCurrentDrumspeed != CDTXMania.ConfigIni.n譜面スクロール速度.Drums && this.iDrumspeed != null ) | |
521 | + { | |
522 | + Graphics gNamePlate = Graphics.FromImage( this.bNamePlate ); | |
523 | + this.nCurrentDrumspeed = CDTXMania.ConfigIni.n譜面スクロール速度.Drums; | |
524 | + if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.A ) | |
525 | + { | |
526 | + gNamePlate.DrawImage( this.iDrumspeed, new Rectangle( 209, 156, 42, 48 ), new Rectangle( 0, ( ( this.nCurrentDrumspeed > 15 ) ? 15 : this.nCurrentDrumspeed ) * 0x30, 0x2a, 0x30 ), GraphicsUnit.Pixel ); | |
527 | + } | |
528 | + else if(CDTXMania.ConfigIni.eNamePlateType == Eタイプ.B) | |
529 | + { | |
530 | + gNamePlate.DrawImage( this.iDrumspeed, new Rectangle( 210, 141, 42, 48 ), new Rectangle( 0, ( ( this.nCurrentDrumspeed > 15 ) ? 15 : this.nCurrentDrumspeed ) * 0x30, 0x2a, 0x30 ), GraphicsUnit.Pixel ); | |
531 | + } | |
532 | + gNamePlate.Dispose(); | |
533 | + this.txNamePlate.Dispose(); | |
534 | + this.txNamePlate = new CTexture( CDTXMania.app.Device, this.bNamePlate, CDTXMania.TextureFormat, false ); | |
535 | + } | |
524 | 536 | #endregion |
525 | 537 | #region[ スコア表示 ] |
526 | 538 | this.n表示スコア.Drums = (long)CDTXMania.stage演奏ドラム画面GITADORA.actScore.n現在表示中のスコア.Drums; |
@@ -568,7 +568,7 @@ namespace DTXMania | ||
568 | 568 | public STDGBVALUE<int> nShutterInSide; |
569 | 569 | public STDGBVALUE<int> nShutterOutSide; |
570 | 570 | private STDGBVALUE<string> strCardName; |
571 | - public STDGBVALUE<string> strGroupName; | |
571 | + private STDGBVALUE<string> strGroupName; | |
572 | 572 | public string strResultSongNameFont; |
573 | 573 | public STDGBVALUE<string> strShutterImageName; // #36144 kairera0467 シャッター画像のパスではなくcsvに登録した名前を格納する。 |
574 | 574 | public STDGBVALUE<Eタイプ> eNumOfLanes; |
@@ -588,11 +588,22 @@ namespace DTXMania | ||
588 | 588 | /// <returns>プレイヤー名</returns> |
589 | 589 | public string strGetCardName( E楽器パート epart ) |
590 | 590 | { |
591 | - return String.IsNullOrEmpty( this.strCardName[ (int)epart ] ) ? "GUEST" : this.strCardName[ (int)epart ]; | |
591 | + return string.IsNullOrEmpty( this.strCardName[ (int)epart ] ) ? "GUEST" : this.strCardName[ (int)epart ]; | |
592 | 592 | } |
593 | - #endregion | |
594 | 593 | |
595 | - public bool bConfigIniがないかDTXManiaのバージョンが異なる | |
594 | + /// <summary> | |
595 | + /// Config.iniからグループ名,称号を取得する。 | |
596 | + /// Config.iniが空だった場合は空白 | |
597 | + /// </summary> | |
598 | + /// <param name="epart">取得する楽器パート</param> | |
599 | + /// <returns>グループ名,称号</returns> | |
600 | + public string strGetGroupName(E楽器パート epart) | |
601 | + { | |
602 | + return string.IsNullOrEmpty(this.strGroupName[(int)epart]) ? "" : this.strGroupName[(int)epart]; | |
603 | + } | |
604 | + #endregion | |
605 | + | |
606 | + public bool bConfigIniがないかDTXManiaのバージョンが異なる | |
596 | 607 | { |
597 | 608 | get |
598 | 609 | { |