• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

dtxmania 中文


Commit MetaInfo

Revision4620806cb388ca8997b85e102030d45641749e44 (tree)
Zeit2016-08-09 00:22:30
Autoryyagi <yyagi@16f4...>
Commiteryyagi

Log Message

#34016 LP使用譜面の読み込み機能を追加。

git-svn-id: http://svn.osdn.jp/svnroot/dtxmania/trunk@1028 16f42ceb-6dc6-49c8-ba94-f2d53467949d

Ändern Zusammenfassung

  • delete: "DTXMania\343\203\227\343\203\255\343\202\270\343\202\247\343\202\257\343\203\210/\343\202\263\343\203\274\343\203\211/\343\202\271\343\202\263\343\202\242\343\200\201\346\233\262/CChip.cs"
  • delete: "DTXMania\343\203\227\343\203\255\343\202\270\343\202\247\343\202\257\343\203\210/\343\202\263\343\203\274\343\203\211/\343\202\271\343\202\263\343\202\242\343\200\201\346\233\262/CDTXInput.cs"
  • delete: "DTXMania\343\203\227\343\203\255\343\202\270\343\202\247\343\202\257\343\203\210/\343\202\263\343\203\274\343\203\211/\343\202\271\343\203\206\343\203\274\343\202\270/06.\346\233\262\350\252\255\343\201\277\350\276\274\343\201\277/CStage\346\233\262\350\252\255\343\201\277\350\276\274\343\201\277.cs"
  • delete: "DTXMania\343\203\227\343\203\255\343\202\270\343\202\247\343\202\257\343\203\210/\343\202\263\343\203\274\343\203\211/\343\202\271\343\203\206\343\203\274\343\202\270/CStage.cs"
  • delete: "DTXMania\343\203\227\343\203\255\343\202\270\343\202\247\343\202\257\343\203\210/\343\202\263\343\203\274\343\203\211/\345\205\250\344\275\223/C\345\256\232\346\225\260.cs"
  • delete: "\345\256\237\350\241\214\346\231\202\343\203\225\343\202\251\343\203\253\343\203\200/DTXManiaGR.exe"

Diff

--- "a/DTXMania\343\203\227\343\203\255\343\202\270\343\202\247\343\202\257\343\203\210/\343\202\263\343\203\274\343\203\211/\343\202\271\343\202\263\343\202\242\343\200\201\346\233\262/CChip.cs"
+++ "b/DTXMania\343\203\227\343\203\255\343\202\270\343\202\247\343\202\257\343\203\210/\343\202\263\343\203\274\343\203\211/\343\202\271\343\202\263\343\202\242\343\200\201\346\233\262/CChip.cs"
@@ -22,7 +22,7 @@ namespace DTXMania
2222 public EAVIType eAVI種別 { get; private set; }
2323 public EBGAType eBGA種別 { get; private set; }
2424 public EPart e楽器パート { get; private set; }
25- public EChannel eチャンネル番号 { get; private set; }
25+ public EChannel eチャンネル番号 { get; set; }
2626
2727 /// <summary>
2828 /// バーからの距離(スクロールスピードを反映したチップの発声時刻)
@@ -1265,6 +1265,32 @@ namespace DTXMania
12651265 return (int)(nDuration / _db再生速度);
12661266 }
12671267
1268+ public string GetSoundFilename()
1269+ {
1270+ if ( this.bWAVを使うチャンネルである ) // WAV
1271+ {
1272+ CDTX.CWAV wc;
1273+ CDTXMania.Instance.DTX.listWAV.TryGetValue( this.n整数値_内部番号, out wc );
1274+ if ( wc == null )
1275+ {
1276+ return null;
1277+ }
1278+ else if ( wc.rSound[ 0 ] == null )
1279+ {
1280+ return null;
1281+ }
1282+ else
1283+ {
1284+ return wc.rSound[ 0 ].strファイル名;
1285+ }
1286+ }
1287+ //else if ( this.eチャンネル番号 == EChannel.Movie || this.eチャンネル番号 == EChannel.MovieFull ) // AVI
1288+ //{
1289+ //}
1290+
1291+ return null;
1292+ }
1293+
12681294 #region [ IComparable 実装 ]
12691295 //-----------------
12701296 public int CompareTo(CChip other)
--- "a/DTXMania\343\203\227\343\203\255\343\202\270\343\202\247\343\202\257\343\203\210/\343\202\263\343\203\274\343\203\211/\343\202\271\343\202\263\343\202\242\343\200\201\346\233\262/CDTXInput.cs"
+++ "b/DTXMania\343\203\227\343\203\255\343\202\270\343\202\247\343\202\257\343\203\210/\343\202\263\343\203\274\343\203\211/\343\202\271\343\202\263\343\202\242\343\200\201\346\233\262/CDTXInput.cs"
@@ -277,7 +277,7 @@ namespace DTXMania
277277 //span = (TimeSpan) ( DateTime.Now - timeBeginLoad );
278278 //Trace.TraceInformation( "空打確認時間: {0}", span.ToString() );
279279 //timeBeginLoad = DateTime.Now;
280- #region [ 拍子・拍線の挿入 ]
280+ #region [ 拍子・拍線の挿入と、クリック音の挿入 ]
281281 if (this.listChip.Count > 0)
282282 {
283283 this.listChip.Sort(); // 高速化のためにはこれを削りたいが、listChipの最後がn発声位置の終端である必要があるので、
@@ -515,7 +515,7 @@ namespace DTXMania
515515 this.strハッシュofDTXファイル = "00000000000000000000000000000000";
516516 }
517517 #endregion
518-
518+
519519 // #36177 使用レーン数の表示 add ikanick 16.03.20
520520 #region [ 使用レーン数カウント ]
521521
@@ -559,7 +559,9 @@ namespace DTXMania
559559 if ( this.n使用レーン数.Bass == EUseLanes.Other ) this.n使用レーン数.Bass = EUseLanes.GB_3;
560560 }
561561 }
562-
562+ Trace.TraceInformation( "LeftPedal使用=" + this.bチップがある.LeftPedal );
563+ Trace.TraceInformation( "LeftBass使用 =" + this.bチップがある.LeftBassDrum );
564+ Trace.TraceInformation( "Lane Type =" + this.n使用レーン数.Drums );
563565 #endregion
564566
565567 //span = (TimeSpan) ( DateTime.Now - timeBeginLoad );
@@ -612,6 +614,139 @@ namespace DTXMania
612614 }
613615 }
614616 }
617+
618+ /// <summary>
619+ /// #34016 LP/LBD使用譜面の吸収
620+ /// </summary>
621+ public void ReassignLP()
622+ {
623+ if ( this.bチップがある.LeftPedal )
624+ {
625+ if ( this.bチップがある.LeftBassDrum )
626+ { // LP かつ LBDがある場合
627+ // → * LBDはBDに割り当て
628+ // * LPは、HO(foot splash)に割り当て。あるいは、HO(foot splash)とHC(close)のいずれかに割り当てる。
629+ // BPMから4分音符の長さを計算し、それより長いかどうかでHO/HCの仕分けを決定。
630+ // * チップ音にサウンドファイルが割り当てられていない場合は、HCに割り当て
631+ // * HO未使用の譜面の場合は、HCに割り当て
632+
633+ double bpm = this.BPM + this.BASEBPM;
634+ double dbBarLength = 1.0;
635+ double nLen4thNoteMs = (int) ( ( 60.0 / bpm / dbBarLength ) * 10 * 10 * 10 );
636+
637+ for ( int i = 0; i < this.listChip.Count; i++ )
638+ {
639+ // switch-caseにすると、listchip[i]の書き換えができないので、if-elseで記述
640+ if ( this.listChip[ i ].eチャンネル番号 == EChannel.LeftBassDrum )
641+ {
642+ this.listChip[ i ].eチャンネル番号 = EChannel.BassDrum;
643+ }
644+ else if ( this.listChip[ i ].eチャンネル番号 == EChannel.LeftPedal )
645+ {
646+ int len = this.listChip[ i ].GetDuration(); // WAV未割当の場合は0が返る
647+ // HHOpen未使用の譜面であれば、無条件にHHCloseに落としこむ
648+ this.listChip[ i ].eチャンネル番号 = ( len < nLen4thNoteMs || !this.bチップがある.HHOpen ) ? EChannel.HiHatClose : EChannel.HiHatOpen;
649+ }
650+ else if ( this.listChip[ i ].eチャンネル番号 == EChannel.BPM )
651+ {
652+ bpm = this.BPM + this.BASEBPM;
653+ nLen4thNoteMs = (int) ( ( 60.0 / bpm / dbBarLength / 2 ) * 10 * 10 * 10 );
654+ }
655+ else if ( this.listChip[ i ].eチャンネル番号 == EChannel.BPMEx )
656+ {
657+ int n内部番号 = listChip[ i ].n整数値_内部番号;
658+ if ( listBPM.ContainsKey( n内部番号 ) )
659+ {
660+ bpm = ( ( listBPM[ n内部番号 ].n表記上の番号 == 0 ) ? 0.0 : this.BASEBPM ) + listBPM[ n内部番号 ].dbBPM値;
661+ }
662+ }
663+ else if ( this.listChip[ i ].eチャンネル番号 == EChannel.BarLength )
664+ {
665+ dbBarLength = this.listChip[ i ].db実数値;
666+ }
667+ }
668+ }
669+ else
670+ { // LPしかない場合
671+ // → LPを、BD, HO, HCに割り当てる必要がある。
672+ // * BDへの割り当ては、BDレーンで同じ音を使っているかどうかで決定
673+ // * HO, HCへの割り当ては、(BDの可能性を除いた後) HOにアサイン、あるいはチップの長さを見てHC/HOにアサイン
674+ // * チップ音にサウンドファイルが割り当てられていない場合は、HCに割り当て
675+ // * HO未使用の譜面の場合は、HCに割り当て
676+
677+ double bpm = this.BPM + this.BASEBPM;
678+ double dbBarLength = 1.0;
679+ double nLen4thNoteMs = (int) ( ( 60.0 / bpm / dbBarLength ) * 10 * 10 * 10 );
680+
681+ #region [ BassDrumのファイル名一覧を作成 ]
682+ List<string> listBDFilenames = new List<string>();
683+ foreach ( CChip chip in listChip )
684+ {
685+ if (chip.eチャンネル番号 == EChannel.BassDrum)
686+ {
687+ string s = chip.GetSoundFilename();
688+ if (s != null && !listBDFilenames.Contains(s))
689+ {
690+ listBDFilenames.Add(s);
691+ }
692+ }
693+ }
694+ #endregion
695+
696+ for ( int i = 0; i < this.listChip.Count; i++ )
697+ {
698+ if ( this.listChip[ i ].eチャンネル番号 == EChannel.LeftPedal )
699+ {
700+ string s = listChip[i].GetSoundFilename();
701+ if (listBDFilenames.Contains(s))
702+ {
703+ this.listChip[i].eチャンネル番号 = EChannel.BassDrum;
704+ }
705+ else
706+ {
707+ int len = this.listChip[ i ].GetDuration(); // WAV未割当の場合は0が返る
708+ // HHOpen未使用の譜面であれば、無条件にHHCloseに落としこむ
709+ this.listChip[ i ].eチャンネル番号 = ( len < nLen4thNoteMs || !this.bチップがある.HHOpen ) ? EChannel.HiHatClose : EChannel.HiHatOpen;
710+ }
711+ }
712+ else if ( this.listChip[ i ].eチャンネル番号 == EChannel.BPM )
713+ {
714+ bpm = this.BPM + this.BASEBPM;
715+ nLen4thNoteMs = (int) ( ( 60.0 / bpm / dbBarLength / 2 ) * 10 * 10 * 10 );
716+ }
717+ else if ( this.listChip[ i ].eチャンネル番号 == EChannel.BPMEx )
718+ {
719+ int n内部番号 = listChip[ i ].n整数値_内部番号;
720+ if ( listBPM.ContainsKey( n内部番号 ) )
721+ {
722+ bpm = ( ( listBPM[ n内部番号 ].n表記上の番号 == 0 ) ? 0.0 : this.BASEBPM ) + listBPM[ n内部番号 ].dbBPM値;
723+ }
724+ }
725+ else if ( this.listChip[ i ].eチャンネル番号 == EChannel.BarLength )
726+ {
727+ dbBarLength = this.listChip[ i ].db実数値;
728+ }
729+ }
730+ listBDFilenames.Clear();
731+ listBDFilenames = null;
732+ }
733+ }
734+ else if ( this.bチップがある.LeftBassDrum )
735+ { // LBDのみがある場合
736+ // → そのままBDに割り当て
737+ for ( int i = 0; i < this.listChip.Count; i++ )
738+ {
739+ if ( this.listChip[ i ].eチャンネル番号 == EChannel.LeftBassDrum )
740+ {
741+ this.listChip[ i ].eチャンネル番号 = EChannel.BassDrum;
742+ }
743+ }
744+ }
745+ else
746+ { // LPもLBDもない場合
747+ // → 何もしない
748+ }
749+ }
615750 private bool t入力_コマンド文字列を抜き出す(ref CharEnumerator ce, ref StringBuilder sb文字列)
616751 {
617752 if (!this.t入力_空白をスキップする(ref ce))
--- "a/DTXMania\343\203\227\343\203\255\343\202\270\343\202\247\343\202\257\343\203\210/\343\202\263\343\203\274\343\203\211/\343\202\271\343\203\206\343\203\274\343\202\270/06.\346\233\262\350\252\255\343\201\277\350\276\274\343\201\277/CStage\346\233\262\350\252\255\343\201\277\350\276\274\343\201\277.cs"
+++ "b/DTXMania\343\203\227\343\203\255\343\202\270\343\202\247\343\202\257\343\203\210/\343\202\263\343\203\274\343\203\211/\343\202\271\343\203\206\343\203\274\343\202\270/06.\346\233\262\350\252\255\343\201\277\350\276\274\343\201\277/CStage\346\233\262\350\252\255\343\201\277\350\276\274\343\201\277.cs"
@@ -460,8 +460,6 @@ namespace DTXMania
460460 span = (TimeSpan)(DateTime.Now - timeBeginLoadBMPAVI);
461461 Trace.TraceInformation("BMP/AVI読込所要時間({0,4}): {1}", (CDTXMania.Instance.DTX.listBMP.Count + CDTXMania.Instance.DTX.listBMPTEX.Count + CDTXMania.Instance.DTX.listAVI.Count), span.ToString());
462462
463- span = (TimeSpan)(DateTime.Now - timeBeginLoad);
464- Trace.TraceInformation("総読込時間: {0}", span.ToString());
465463
466464 if (bitmapFilename != null)
467465 {
@@ -479,10 +477,25 @@ namespace DTXMania
479477 ftFilename = null;
480478 }
481479 CDTXMania.Instance.Timer.t更新();
482- base.eフェーズID = CStage.Eフェーズ.NOWLOADING_システムサウンドBGMの完了を待つ;
480+ base.eフェーズID = CStage.Eフェーズ.NOWLOADING_LPを再配置する;
483481 return (int)E曲読込画面の戻り値.継続;
484482 }
485483
484+ case CStage.Eフェーズ.NOWLOADING_LPを再配置する:
485+ {
486+ TimeSpan span;
487+ DateTime timeReassignLP = DateTime.Now;
488+ CDTXMania.Instance.DTX.ReassignLP();
489+
490+ span = (TimeSpan) ( DateTime.Now - timeReassignLP );
491+ Trace.TraceInformation( "LP再配置所要時間: {0}", span.ToString() );
492+
493+ span = (TimeSpan) ( DateTime.Now - timeBeginLoad );
494+ Trace.TraceInformation( "総読込時間: {0}", span.ToString() );
495+
496+ base.eフェーズID = CStage.Eフェーズ.NOWLOADING_システムサウンドBGMの完了を待つ;
497+ return (int) E曲読込画面の戻り値.継続;
498+ }
486499 case CStage.Eフェーズ.NOWLOADING_システムサウンドBGMの完了を待つ:
487500 {
488501 long nCurrentTime = CDTXMania.Instance.Timer.n現在時刻;
--- "a/DTXMania\343\203\227\343\203\255\343\202\270\343\202\247\343\202\257\343\203\210/\343\202\263\343\203\274\343\203\211/\343\202\271\343\203\206\343\203\274\343\202\270/CStage.cs"
+++ "b/DTXMania\343\203\227\343\203\255\343\202\270\343\202\247\343\202\257\343\203\210/\343\202\263\343\203\274\343\203\211/\343\202\271\343\203\206\343\203\274\343\202\270/CStage.cs"
@@ -58,6 +58,7 @@ namespace DTXMania
5858 NOWLOADING_DTXファイルを読み込む,
5959 NOWLOADING_WAVファイルを読み込む,
6060 NOWLOADING_BMPファイルを読み込む,
61+ NOWLOADING_LPを再配置する,
6162 NOWLOADING_システムサウンドBGMの完了を待つ,
6263 演奏_STAGE_FAILED,
6364 演奏_STAGE_FAILED_フェードアウト,
--- "a/DTXMania\343\203\227\343\203\255\343\202\270\343\202\247\343\202\257\343\203\210/\343\202\263\343\203\274\343\203\211/\345\205\250\344\275\223/C\345\256\232\346\225\260.cs"
+++ "b/DTXMania\343\203\227\343\203\255\343\202\270\343\202\247\343\202\257\343\203\210/\343\202\263\343\203\274\343\203\211/\345\205\250\344\275\223/C\345\256\232\346\225\260.cs"
@@ -1333,7 +1333,7 @@ namespace DTXMania
13331333 case EChannel.HiHatOpen: return ELane.HH;
13341334 case EChannel.RideCymbal: return ELane.CY;
13351335 case EChannel.LeftCymbal: return ELane.LC;
1336- case EChannel.LeftPedal: return ELane.HH; // LPは仮にHHに落とし込む 後日、CDTXInputで別Laneに割り振るようにした後、このcaseは削除する
1336+ //case EChannel.LeftPedal: return ELane.HH; // LPは仮にHHに落とし込む 後日、CDTXInputで別Laneに割り振るようにした後、このcaseは削除する
13371337 }
13381338 throw new IndexOutOfRangeException();
13391339 }
Binary files "a/\345\256\237\350\241\214\346\231\202\343\203\225\343\202\251\343\203\253\343\203\200/DTXManiaGR.exe" and "b/\345\256\237\350\241\214\346\231\202\343\203\225\343\202\251\343\203\253\343\203\200/DTXManiaGR.exe" differ