From: ikanick Date: Sun, 20 Mar 2016 03:13:24 +0000 (+0000) Subject: #36176 204x269プレビュー画像をアスペクト比維持させる仕様変更。結果画面もコードを少し修正。 X-Git-Tag: Release099f~3^2~95 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e012df5aba5342b519ccf1bf359a3ecc432bcd9e;p=dtxmania%2Fdtxmania.git #36176 204x269プレビュー画像をアスペクト比維持させる仕様変更。結果画面もコードを少し修正。 #36177 選曲画面にドラムの使用レーン数の表示を追加。これに伴いノードリスト登録時のCDTXのヘッダのみ読み込みが不可能になりました… git-svn-id: http://svn.osdn.jp/svnroot/dtxmania/trunk@938 16f42ceb-6dc6-49c8-ba94-f2d53467949d --- diff --git a/DTXManiaプロジェクト/コード/スコア、曲/CDTX.cs b/DTXManiaプロジェクト/コード/スコア、曲/CDTX.cs index 452c94f7..1db22703 100644 --- a/DTXManiaプロジェクト/コード/スコア、曲/CDTX.cs +++ b/DTXManiaプロジェクト/コード/スコア、曲/CDTX.cs @@ -75,6 +75,7 @@ namespace DTXMania public bool bUse556x710BGAAVI; public STDGBVALUE> listAutoGhostLag; public STDGBVALUE> listTargetGhsotLag; + public STDGBVALUE n使用レーン数; #if TEST_NOTEOFFMODE public STLANEVALUE b演奏で直前の音を消音する; @@ -216,6 +217,7 @@ namespace DTXMania this.nPolyphonicSounds = CDTXMania.Instance.ConfigIni.nPoliphonicSounds; this.dbDTXVPlaySpeed = 1.0f; this.bUse556x710BGAAVI = false; + this.n使用レーン数 = new STDGBVALUE(); #if TEST_NOTEOFFMODE this.bHH演奏で直前のHHを消音する = true; diff --git a/DTXManiaプロジェクト/コード/スコア、曲/CDTXInput.cs b/DTXManiaプロジェクト/コード/スコア、曲/CDTXInput.cs index 9d106f87..6e94d883 100644 --- a/DTXManiaプロジェクト/コード/スコア、曲/CDTXInput.cs +++ b/DTXManiaプロジェクト/コード/スコア、曲/CDTXInput.cs @@ -536,6 +536,49 @@ namespace DTXMania } } #endregion + + // #36177 使用レーン数の表示 add ikanick 16.03.20 + #region [ 使用レーン数カウント ] + + for (E楽器パート inst = E楽器パート.DRUMS; inst <= E楽器パート.BASS; ++inst) + { + this.n使用レーン数[inst] = 0; + } + this.n使用レーン数.Drums = 0; + foreach (CChip chip in this.listChip) + { + int ch = (int)chip.eチャンネル番号; + if (chip.bDrums可視チップ) { + if ( this.n使用レーン数.Drums == 0 ) this.n使用レーン数.Drums = 6; + if ( this.n使用レーン数.Drums < 10 ) { + if ( ( chip.eチャンネル番号 == Ech定義.FloorTom ) + || ( chip.eチャンネル番号 == Ech定義.HiHatOpen ) + || ( chip.eチャンネル番号 == Ech定義.RideCymbal ) + || ( chip.eチャンネル番号 == Ech定義.LeftCymbal ) ) + { + this.n使用レーン数.Drums = 10; + } + } + if ( this.n使用レーン数.Drums < 12 ) { + if ( ( chip.eチャンネル番号 == Ech定義.LeftPedal ) + || ( chip.eチャンネル番号 == Ech定義.LeftBassDrum ) ) + { + this.n使用レーン数.Drums = 12; + } + } + } + if (chip.bGuitar可視チップ) { + // 5レーン未対応 + //if ( this.n使用レーン数.Guitar == 0 ) this.n使用レーン数.Guitar = 3; + } + if (chip.bBass可視チップ) { + // 5レーン未対応 + //if ( this.n使用レーン数.Bass == 0 ) this.n使用レーン数.Bass = 3; + } + } + + #endregion + } } } diff --git a/DTXManiaプロジェクト/コード/スコア、曲/CSong管理.cs b/DTXManiaプロジェクト/コード/スコア、曲/CSong管理.cs index 79bce9cf..e3b8d8ce 100644 --- a/DTXManiaプロジェクト/コード/スコア、曲/CSong管理.cs +++ b/DTXManiaプロジェクト/コード/スコア、曲/CSong管理.cs @@ -782,6 +782,9 @@ namespace DTXMania cスコア.譜面情報.曲種別 = (EDTX種別)br.ReadInt32(); cスコア.譜面情報.Bpm = br.ReadDouble(); cスコア.譜面情報.Duration = br.ReadInt32(); + cスコア.譜面情報.使用レーン数.Drums = br.ReadInt32(); + cスコア.譜面情報.使用レーン数.Guitar = br.ReadInt32(); + cスコア.譜面情報.使用レーン数.Bass = br.ReadInt32(); //Debug.WriteLine( "songs.db: " + cスコア.ファイル情報.ファイルの絶対パス ); return cスコア; @@ -812,14 +815,14 @@ namespace DTXMania { if ((c曲リストノード.arスコア[i] != null) && !c曲リストノード.arスコア[i].bSongDBにキャッシュがあった) { - #region [ DTX ファイルのヘッダだけ読み込み、Cスコア.譜面情報 を設定する ] + #region [ Cスコア.譜面情報 を設定する ] //----------------- string path = c曲リストノード.arスコア[i].ファイル情報.ファイルの絶対パス; if (File.Exists(path)) { try { - CDTX cdtx = new CDTX(c曲リストノード.arスコア[i].ファイル情報.ファイルの絶対パス, true); + CDTX cdtx = new CDTX(c曲リストノード.arスコア[i].ファイル情報.ファイルの絶対パス,false);//DTX ファイルのヘッダだけ読み込んでいたが、使用レーン数の集計の為全て読み込みに変更 c曲リストノード.arスコア[i].譜面情報.タイトル = cdtx.TITLE; c曲リストノード.arスコア[i].譜面情報.アーティスト名 = cdtx.ARTIST; c曲リストノード.arスコア[i].譜面情報.コメント = cdtx.COMMENT; @@ -835,6 +838,9 @@ namespace DTXMania c曲リストノード.arスコア[i].譜面情報.曲種別 = cdtx.e種別; c曲リストノード.arスコア[i].譜面情報.Bpm = cdtx.BPM; c曲リストノード.arスコア[i].譜面情報.Duration = 0; // (cdtx.listChip == null)? 0 : cdtx.listChip[ cdtx.listChip.Count - 1 ].n発声時刻ms; + c曲リストノード.arスコア[i].譜面情報.使用レーン数.Drums = cdtx.n使用レーン数.Drums; + c曲リストノード.arスコア[i].譜面情報.使用レーン数.Guitar = cdtx.n使用レーン数.Guitar; + c曲リストノード.arスコア[i].譜面情報.使用レーン数.Bass = cdtx.n使用レーン数.Bass; this.nファイルから反映できたスコア数++; cdtx.On非活性化(); //Debug.WriteLine( "★" + this.nファイルから反映できたスコア数 + " " + c曲リストノード.arスコア[ i ].譜面情報.タイトル ); @@ -859,6 +865,9 @@ namespace DTXMania sb.Append(", type=" + c曲リストノード.arスコア[i].譜面情報.曲種別); sb.Append(", bpm=" + c曲リストノード.arスコア[i].譜面情報.Bpm); // sb.Append( ", duration=" + c曲リストノード.arスコア[ i ].譜面情報.Duration ); + sb.Append(", lnDr=" + c曲リストノード.arスコア[i].譜面情報.使用レーン数.Drums); + sb.Append(", lnGt=" + c曲リストノード.arスコア[i].譜面情報.使用レーン数.Guitar); + sb.Append(", lnBs=" + c曲リストノード.arスコア[i].譜面情報.使用レーン数.Bass); Trace.TraceInformation(sb.ToString()); } //----------------- @@ -1127,6 +1136,9 @@ namespace DTXMania bw.Write((int)node.arスコア[i].譜面情報.曲種別); bw.Write(node.arスコア[i].譜面情報.Bpm); bw.Write(node.arスコア[i].譜面情報.Duration); + bw.Write(node.arスコア[i].譜面情報.使用レーン数.Drums); + bw.Write(node.arスコア[i].譜面情報.使用レーン数.Guitar); + bw.Write(node.arスコア[i].譜面情報.使用レーン数.Bass); this.nSongsDBへ出力できたスコア数++; } } diff --git a/DTXManiaプロジェクト/コード/スコア、曲/Cスコア.cs b/DTXManiaプロジェクト/コード/スコア、曲/Cスコア.cs index 35b2974b..6ffdcda7 100644 --- a/DTXManiaプロジェクト/コード/スコア、曲/Cスコア.cs +++ b/DTXManiaプロジェクト/コード/スコア、曲/Cスコア.cs @@ -63,6 +63,7 @@ namespace DTXMania public STDGBVALUE 最大スキル; public STDGBVALUE フルコンボ; public STDGBVALUE 演奏回数; + public STDGBVALUE 使用レーン数; public STHISTORY 演奏履歴; public bool レベルを非表示にする; public EDTX種別 曲種別; @@ -178,6 +179,7 @@ namespace DTXMania this.譜面情報.曲種別 = EDTX種別.DTX; this.譜面情報.Bpm = 120.0; this.譜面情報.Duration = 0; + this.譜面情報.使用レーン数 = new STDGBVALUE(); } } } diff --git a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectPreimageパネル.cs b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectPreimageパネル.cs index 02682510..f7177bb7 100644 --- a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectPreimageパネル.cs +++ b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectPreimageパネル.cs @@ -545,8 +545,8 @@ namespace DTXMania { if (!CDTXMania.Instance.stage選曲.bスクロール中 && (((this.ct遅延表示 != null) && (this.ct遅延表示.n現在の値 > 0)) && !this.b新しいプレビューファイルをまだ読み込んでいない)) { - int x = this.n本体X + (int)(0x12 * Scale.X); - int y = this.n本体Y + (int)(0x10 * Scale.Y); + int x = this.n本体X + (int)(18 * Scale.X); + int y = this.n本体Y + (int)(16 * Scale.Y); if (this.rAVI != null) { @@ -565,11 +565,11 @@ namespace DTXMania int width = cmg.width; int height = cmg.height; - this.r表示するプレビュー画像.vc拡大縮小倍率.X = cmg.magX; // ( num4 * Scale.X ) / WIDTH_HD_SET; - this.r表示するプレビュー画像.vc拡大縮小倍率.Y = cmg.magY; // ( num4 * Scale.X ) / WIDTH_HD_SET; + this.r表示するプレビュー画像.vc拡大縮小倍率.X = cmg.magX; + this.r表示するプレビュー画像.vc拡大縮小倍率.Y = cmg.magY; - x += (width - ((int)(width * mag))) / 2; - y += (height - ((int)(height * mag))) / 2; + x += (int)((612 - width * cmg.magX ) / 2 ); + y += (int)((605 - height * cmg.magY ) / 2 ); this.r表示するプレビュー画像.n透明度 = (int)(255f * num3); this.r表示するプレビュー画像.t2D描画(CDTXMania.Instance.Device, x, y); } diff --git a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelect曲リスト.cs b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelect曲リスト.cs index aec5c79b..8edb44f6 100644 --- a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelect曲リスト.cs +++ b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelect曲リスト.cs @@ -304,6 +304,7 @@ namespace DTXMania for (E楽器パート m = E楽器パート.DRUMS; m <= E楽器パート.BASS; m++) { this.stバー情報[index].nスキル値[m] = (int)song.arスコア[this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す(song)].譜面情報.最大スキル[m]; + this.stバー情報[index].n使用レーン数[m] = (int)song.arスコア[this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す(song)].譜面情報.使用レーン数[m]; } song = this.r次の曲(song); } @@ -468,8 +469,9 @@ namespace DTXMania this.tx選曲バー.Score = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSelect bar score selected.png"), false); this.tx選曲バー.Box = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSelect bar box selected.png"), false); this.tx選曲バー.Other = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSelect bar other selected.png"), false); - + this.txスキル数字 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSelect skill number on list.png"), false); + this.tx使用レーン数数字 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSelect skill number on gauge etc.png"), false); for (int i = 0; i < 13; i++) this.t曲名バーの生成(i, this.stバー情報[i].strタイトル文字列, this.stバー情報[i].col文字色); @@ -539,8 +541,9 @@ namespace DTXMania for (int i = 0; i < 13; i++) TextureFactory.t安全にDisposeする(ref this.stバー情報[i].txタイトル名); - + TextureFactory.t安全にDisposeする(ref this.txスキル数字); + TextureFactory.t安全にDisposeする(ref this.tx使用レーン数数字); TextureFactory.t安全にDisposeする(ref this.txEnumeratingSongs); TextureFactory.t安全にDisposeする(ref this.txSongNotFound); TextureFactory.t安全にDisposeする(ref this.tx曲名バー.Score); @@ -709,6 +712,7 @@ namespace DTXMania for (E楽器パート i = E楽器パート.DRUMS; i <= E楽器パート.BASS; i++) { this.stバー情報[index].nスキル値[i] = (int)song.arスコア[this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す(song)].譜面情報.最大スキル[i]; + this.stバー情報[index].n使用レーン数[i] = (int)song.arスコア[this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す(song)].譜面情報.使用レーン数[i]; } // 1行(100カウント)移動完了。 @@ -766,6 +770,7 @@ namespace DTXMania for (E楽器パート i = E楽器パート.DRUMS; i <= E楽器パート.BASS; i++) { this.stバー情報[index].nスキル値[i] = (int)song.arスコア[this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す(song)].譜面情報.最大スキル[i]; + this.stバー情報[index].n使用レーン数[i] = (int)song.arスコア[this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す(song)].譜面情報.使用レーン数[i]; } @@ -864,6 +869,12 @@ namespace DTXMania this.tスキル値の描画(x + (int)(28 * Scale.X), y + (int)(59), this.stバー情報[nパネル番号].nスキル値[this.e楽器パート]); //----------------- #endregion + #region [ 使用レーン数を描画。] + //----------------- + if ((this.stバー情報[nパネル番号].eバー種別 == Eバー種別.Score) && (this.e楽器パート != E楽器パート.UNKNOWN)) + this.t使用レーン数の描画(x + (int)(0 * Scale.X), y + (int)53, this.stバー情報[nパネル番号].n使用レーン数[this.e楽器パート]); + //----------------- + #endregion } else { @@ -893,6 +904,12 @@ namespace DTXMania this.tスキル値の描画(x + (int)(14 * Scale.X), y + (int)(14 * Scale.Y), this.stバー情報[nパネル番号].nスキル値[this.e楽器パート]); //----------------- #endregion + #region [ 使用レーン数を描画。] + //----------------- + if ((this.stバー情報[nパネル番号].eバー種別 == Eバー種別.Score) && (this.e楽器パート != E楽器パート.UNKNOWN)) + this.t使用レーン数の描画(x + (int)(-14 * Scale.X), y + (int)(11 * Scale.Y), this.stバー情報[nパネル番号].n使用レーン数[this.e楽器パート]); + //----------------- + #endregion } } } @@ -946,6 +963,16 @@ namespace DTXMania ); //----------------- #endregion + #region [ 使用レーン数を描画。] + //----------------- + if ((this.stバー情報[nパネル番号].eバー種別 == Eバー種別.Score) && (this.e楽器パート != E楽器パート.UNKNOWN)) + this.t使用レーン数の描画( + (int)(216 * Scale.X), + (int)(208 * Scale.Y), + this.stバー情報[nパネル番号].n使用レーン数[this.e楽器パート] + ); + //----------------- + #endregion } else { @@ -972,6 +999,12 @@ namespace DTXMania this.tスキル値の描画(x + (int)(14 * Scale.X), y + (int)(14 * Scale.Y), this.stバー情報[nパネル番号].nスキル値[this.e楽器パート]); //----------------- #endregion + #region [ 使用レーン数を描画。] + //----------------- + if ((this.stバー情報[nパネル番号].eバー種別 == Eバー種別.Score) && (this.e楽器パート != E楽器パート.UNKNOWN)) + this.t使用レーン数の描画(x + (int)(-14 * Scale.X), y + (int)(11 * Scale.Y), this.stバー情報[nパネル番号].n使用レーン数[this.e楽器パート]); + //----------------- + #endregion } } //----------------- @@ -1059,6 +1092,7 @@ namespace DTXMania public string strタイトル文字列; public CTexture txタイトル名; public STDGBVALUE nスキル値; + public STDGBVALUE n使用レーン数; public Color col文字色; } @@ -1132,6 +1166,7 @@ namespace DTXMania private STバー情報[] stバー情報 = new STバー情報[13]; private CTexture txSongNotFound, txEnumeratingSongs; private CTexture txスキル数字; + private CTexture tx使用レーン数数字; private CTexture txアイテム数数字; private STバー tx曲名バー; private ST選曲バー tx選曲バー; @@ -1266,6 +1301,7 @@ namespace DTXMania for (E楽器パート j = E楽器パート.DRUMS; j <= E楽器パート.BASS; j++) { this.stバー情報[i].nスキル値[j] = (int)song.arスコア[this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す(song)].譜面情報.最大スキル[j]; + this.stバー情報[i].n使用レーン数[j] = (int)song.arスコア[this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す(song)].譜面情報.使用レーン数[j]; } song = this.r次の曲(song); @@ -1442,7 +1478,35 @@ namespace DTXMania } if (this.txアイテム数数字 != null) { - this.txアイテム数数字.t2D描画(CDTXMania.Instance.Device, x, y, new Rectangle(dx, dy, (int)(8 * Scale.X), (int)(12 * Scale.Y))); + this.txアイテム数数字.t2D描画(CDTXMania.Instance.Device, x, y, new Rectangle(dx, dy, (int)(8 * Scale.X), (int)(10 * Scale.Y))); + } + } + + private void t使用レーン数の描画(int x, int y, int n使用レーン数) + { + // #36177 使用レーン数の表示 add ikanick 16.03.20 + if ( n使用レーン数 == 0 ) + return; + + int n十の位 = n使用レーン数 / 10; + int n一の位 = n使用レーン数 % 10; + + // 十の位の描画。 + if ( n十の位 != 0 ) + this.t使用レーン数の描画_1桁描画(x + (int)(8 * Scale.X), y, n十の位); + + // 一の位の描画。 + this.t使用レーン数の描画_1桁描画(x + (int)(13 * Scale.X), y, n一の位); + } + private void t使用レーン数の描画_1桁描画(int x, int y, int n数値) + { + int dx, dy; + dx = (n数値 % 6) * (int)(8 * Scale.X); + dy = (n数値 / 6) * (int)(11 * Scale.Y); + + if (this.tx使用レーン数数字 != null) + { + this.tx使用レーン数数字.t2D描画(CDTXMania.Instance.Device, x, y, new Rectangle(dx, dy, (int)(8 * Scale.X), (int)(10 * Scale.Y))); } } //----------------- diff --git a/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultImage.cs b/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultImage.cs index 5734be73..f62deda0 100644 --- a/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultImage.cs +++ b/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultImage.cs @@ -147,8 +147,8 @@ namespace DTXMania this.n本体Y * Scale.Y ); } - int x = this.n本体X + 0x11; - int y = this.n本体Y + 0x10; + int x = (int)(( this.n本体X + 17 ) * Scale.X); + int y = (int)(( this.n本体Y + 16 ) * Scale.Y); //if ( ( ( this.nAVI再生開始時刻 != -1 ) && ( this.avi != null ) ) && ( this.sfリザルトAVI画像 != null ) ) if (this.rAVI != null) { @@ -160,12 +160,14 @@ namespace DTXMania CPreviewMagnifier cmg = new CPreviewMagnifier(); cmg.GetMagnifier(this.r表示するリザルト画像.sz画像サイズ.Width, this.r表示するリザルト画像.sz画像サイズ.Height, 1.0f, 1.0f, true); - if (cmg.width < 0xcc) x += (204 - cmg.width) / 2; - if (cmg.height < 269) y += (269 - cmg.height) / 2; this.r表示するリザルト画像.vc拡大縮小倍率.X = cmg.magX; this.r表示するリザルト画像.vc拡大縮小倍率.Y = cmg.magY; this.r表示するリザルト画像.vc拡大縮小倍率.Z = 1f; - this.r表示するリザルト画像.t2D描画(CDTXMania.Instance.Device, x * Scale.X, y * Scale.Y); + x += (int)((612 - cmg.width * cmg.magX ) / 2 ); + y += (int)((605 - cmg.height * cmg.magY ) / 2 ); + this.r表示するリザルト画像.t2D描画(CDTXMania.Instance.Device, x, y); + + } #endregion if ((CDTXMania.Instance.DTX.GENRE != null) && (CDTXMania.Instance.DTX.GENRE.Length > 0)) diff --git a/DTXManiaプロジェクト/コード/全体/CPreviewMagnifier.cs b/DTXManiaプロジェクト/コード/全体/CPreviewMagnifier.cs index 73d44e1e..80c06581 100644 --- a/DTXManiaプロジェクト/コード/全体/CPreviewMagnifier.cs +++ b/DTXManiaプロジェクト/コード/全体/CPreviewMagnifier.cs @@ -66,10 +66,16 @@ namespace DTXMania this.bIsPreview = bIsPreview; // #35820 画像サイズに関係なく、プレビュー領域に合わせる add ikanick 15.12.08 - this.width = width_fhd_set; - this.height = height_fhd_set; - this.magX = magX_org * width_vga_set / width_org * Scale.X; - this.magY = magY_org * height_vga_set / height_org * Scale.Y; + // #36176 プレビュー画像については、前仕様(204x269)画像はアスペクト比を維持する change ikanick 16.03.20 + + this.width = width_org; + this.height = height_org; + this.magX = magX_org * width_fhd_set / width_org; + this.magY = magY_org * height_fhd_set / height_org; + if (bIsPreview && width_org == 204 && height_org == 269) + { + this.magX = magX_org * width_fhd_set / width_org * ( 204f / 269 ); + } return; #if false // FHD対応の名残