public void t演奏を停止する()
        {
            CDTX dTX = TJAPlayer3.DTX[0];

            TJAPlayer3.stage演奏ドラム画面.actLaneTaiko.t判定枠Reset();

            this.nスクロール後ms = CSoundManager.rc演奏用タイマ.n現在時刻ms;

            TJAPlayer3.stage演奏ドラム画面.On活性化();
            CSoundManager.rc演奏用タイマ.t一時停止();

            for (int i = 0; i < dTX.listChip.Count; i++)
            {
                CDTX.CChip pChip = dTX.listChip[i];
                pChip.bHit = false;
                if (dTX.listChip[i].nチャンネル番号 != 0x50)
                {
                    pChip.bShow = true;
                    pChip.b可視   = true;
                }
            }

            TJAPlayer3.DTX[0].t全チップの再生一時停止();
            TJAPlayer3.stage演奏ドラム画面.bPAUSE = true;
            TJAPlayer3.stage演奏ドラム画面.actPlayInfo.NowMeasure[0] = this.n現在の小節線;
            this.b特訓PAUSE = true;

            this.t譜面の表示位置を合わせる(false);
        }
Ejemplo n.º 2
0
        public override void On活性化()
        {
            this.n現在の小節線  = 0;
            this.b特訓PAUSE = false;

            base.On活性化();

            CDTX dTX = TJAPlayer3.DTX;

            var measureCount = 1;

            for (int i = 0; i < dTX.listChip.Count; i++)
            {
                CDTX.CChip pChip = dTX.listChip[i];

                if (pChip.n整数値_内部番号 > measureCount)
                {
                    measureCount = pChip.n整数値_内部番号;
                }
            }

            this.n小節の総数 = measureCount;

            Trace.TraceInformation("TOKKUN: total measures->" + this.n小節の総数);
        }
Ejemplo n.º 3
0
        protected override void tUpdateAndDraw_Chip_FillIn(CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip)
        {
            if (!pChip.bHit && (pChip.nDistanceFromBar.Drums < 0))
            {
                pChip.bHit = true;
            }
#if TEST_NOTEOFFMODE    // 2011.1.1 yyagi TEST
            switch (pChip.n整数値)
            {
            case 0x04:                          // HH消音あり(従来同等)
                CDTXMania.DTX.b演奏で直前の音を消音する.HH = true;
                break;

            case 0x05:                          // HH消音無し
                CDTXMania.DTX.b演奏で直前の音を消音する.HH = false;
                break;

            case 0x06:                          // ギター消音あり(従来同等)
                CDTXMania.DTX.b演奏で直前の音を消音する.Guitar = true;
                break;

            case 0x07:                          // ギター消音無し
                CDTXMania.DTX.b演奏で直前の音を消音する.Guitar = false;
                break;

            case 0x08:                          // ベース消音あり(従来同等)
                CDTXMania.DTX.b演奏で直前の音を消音する.Bass = true;
                break;

            case 0x09:                          // ベース消音無し
                CDTXMania.DTX.b演奏で直前の音を消音する.Bass = false;
                break;
            }
#endif
        }
Ejemplo n.º 4
0
 protected override void tUpdateAndDraw_Chip_Bonus(CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip)
 {
     if (!pChip.bHit && (pChip.nDistanceFromBar.Drums < 0))
     {
         pChip.bHit = true;
     }
 }
Ejemplo n.º 5
0
 protected override void tUpdateAndDraw_Chip_Drums(CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip)
 {
     // int indexSevenLanes = this.nチャンネル0Atoレーン07[ pChip.nChannelNumber - 0x11 ];
     if (!pChip.bHit && (pChip.nDistanceFromBar.Drums < 0))
     {
         pChip.bHit = true;
         this.tPlaySound(pChip, CSoundManager.rcPerformanceTimer.n前回リセットした時のシステム時刻 + pChip.nPlaybackTimeMs, EInstrumentPart.DRUMS, dTX.nモニタを考慮した音量(EInstrumentPart.DRUMS));
     }
 }
        public void t演奏を再開する()
        {
            CDTX dTX = TJAPlayer3.DTX[0];

            TJAPlayer3.stage演奏ドラム画面.actLaneTaiko.t判定枠Reset();

            this.bスクロール中 = false;
            CSoundManager.rc演奏用タイマ.n現在時刻ms = this.nスクロール後ms;

            int n演奏開始Chip = TJAPlayer3.stage演奏ドラム画面.n現在のトップChip;
            int finalStartBar;

            finalStartBar = this.n現在の小節線 - 2;
            if (finalStartBar < 0)
            {
                finalStartBar = 0;
            }

            TJAPlayer3.stage演奏ドラム画面.t演奏位置の変更(finalStartBar, 0);


            int n少し戻ってから演奏開始Chip = TJAPlayer3.stage演奏ドラム画面.n現在のトップChip;

            TJAPlayer3.stage演奏ドラム画面.actPlayInfo.NowMeasure[0] = 0;
            TJAPlayer3.stage演奏ドラム画面.t数値の初期化(true, true);
            TJAPlayer3.stage演奏ドラム画面.On活性化();

            for (int i = 0; i < dTX.listChip.Count; i++)
            {
                if (i < n演奏開始Chip && (dTX.listChip[i].nチャンネル番号 > 0x10 && dTX.listChip[i].nチャンネル番号 < 0x20))                 //2020.07.08 ノーツだけ消す。 null参照回避のために順番変更
                {
                    dTX.listChip[i].bHit     = true;
                    dTX.listChip[i].IsHitted = true;
                    dTX.listChip[i].b可視      = false;
                    dTX.listChip[i].bShow    = false;
                }
                if (i < n少し戻ってから演奏開始Chip && dTX.listChip[i].nチャンネル番号 == 0x01)
                {
                    dTX.listChip[i].bHit     = true;
                    dTX.listChip[i].IsHitted = true;
                    dTX.listChip[i].b可視      = false;
                    dTX.listChip[i].bShow    = false;
                }
                if (dTX.listChip[i].nチャンネル番号 == 0x50 && dTX.listChip[i].n整数値_内部番号 < finalStartBar)
                {
                    dTX.listChip[i].bHit     = true;
                    dTX.listChip[i].IsHitted = true;
                }
            }

            for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
            {
                TJAPlayer3.stage演奏ドラム画面.chip現在処理中の連打チップ[i] = null;
            }

            this.b特訓PAUSE = false;
        }
Ejemplo n.º 7
0
        // CStage 実装

        public override void On活性化()
        {
            Trace.TraceInformation("曲読み込みステージを活性化します。");
            Trace.Indent();
            try
            {
                this.str曲タイトル      = "";
                this.strSTAGEFILE  = "";
                this.ftタイトル表示用フォント = new Font("MS PGothic", 48f, GraphicsUnit.Pixel);
                if (!string.IsNullOrEmpty(CDTXMania.ConfigIni.strPrivateFontで使うフォント名))
                {
                    this.pfTITLE    = new CPrivateFastFont(new FontFamily(CDTXMania.ConfigIni.strPrivateFontで使うフォント名), 30);
                    this.pfSUBTITLE = new CPrivateFastFont(new FontFamily(CDTXMania.ConfigIni.strPrivateFontで使うフォント名), 22);
                }
                else
                {
                    this.pfTITLE    = new CPrivateFastFont(new FontFamily("MS PGothic"), 30);
                    this.pfSUBTITLE = new CPrivateFastFont(new FontFamily("MS PGothic"), 22);
                }
                this.nBGM再生開始時刻   = -1;
                this.nBGMの総再生時間ms = 0;
                if (this.sd読み込み音 != null)
                {
                    CDTXMania.Sound管理.tサウンドを破棄する(this.sd読み込み音);
                    this.sd読み込み音 = null;
                }

                string strDTXファイルパス = (CDTXMania.bコンパクトモード) ?
                                      CDTXMania.strコンパクトモードファイル : CDTXMania.stage選曲.r確定されたスコア.ファイル情報.ファイルの絶対パス;

                CDTX cdtx = new CDTX(strDTXファイルパス, true, 1.0, 0, 0);
                if (File.Exists(cdtx.strフォルダ名 + @"set.def"))
                {
                    cdtx = new CDTX(strDTXファイルパス, true, 1.0, 0, 1);
                }

                this.str曲タイトル     = cdtx.TITLE;
                this.strサブタイトル    = cdtx.SUBTITLE;
                this.strSTAGEFILE = CSkin.Path(@"Graphics\\6_background.jpg");
                cdtx.On非活性化();
                base.On活性化();
            }
            finally
            {
                Trace.TraceInformation("曲読み込みステージの活性化を完了しました。");
                Trace.Unindent();
            }
        }
        public override void On活性化()
        {
            this.n現在の小節線   = 0;
            this.b特訓PAUSE  = false;
            this.n最終演奏位置ms = 0;

            base.On活性化();

            CDTX dTX = TJAPlayer3.DTX[0];

            var measureCount = 1;
            var bIsInGoGo    = false;
            var length       = (TJAPlayer3.DTX[0].listChip.Count > 0) ? TJAPlayer3.DTX[0].listChip[TJAPlayer3.DTX[0].listChip.Count - 1].n発声時刻ms : 0;

            gogoXList = new List <int>();

            for (int i = 0; i < dTX.listChip.Count; i++)
            {
                CDTX.CChip pChip = dTX.listChip[i];

                if (pChip.n整数値_内部番号 > measureCount)
                {
                    measureCount = pChip.n整数値_内部番号;
                }

                if (pChip.nチャンネル番号 == 0x9E && !bIsInGoGo)
                {
                    bIsInGoGo = true;

                    var current = ((double)(pChip.db発声時刻ms * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)));
                    var width   = 0;
                    if (TJAPlayer3.Tx.Tokkun_ProgressBar != null)
                    {
                        width = TJAPlayer3.Tx.Tokkun_ProgressBar.szテクスチャサイズ.Width;
                    }

                    this.gogoXList.Add((int)(width * (current / length)));
                }
                if (pChip.nチャンネル番号 == 0x9F && bIsInGoGo)
                {
                    bIsInGoGo = false;
                }
            }

            this.n小節の総数 = measureCount;
        }
Ejemplo n.º 9
0
 public override string ToString()
 {
     string[] chToStr =
     {
         "??",           "バックコーラス",         "小節長変更",           "BPM変更",          "BMPレイヤ1",           "??",             "??",                "BMPレイヤ2",
         "BPM変更(拡張)",    "??",              "??",              "??",             "??",                "??",             "??",                "??",
         "??",           "HHClose",         "Snare",           "Kick",           "HiTom",             "LowTom",         "Cymbal",            "FloorTom",
         "HHOpen",       "RideCymbal",      "LeftCymbal",      "LeftPedal",      "LeftBassDrum",      "",               "",                  "ドラム歓声切替",
         "ギターOPEN",      "ギター - - B",       "ギター - G -",       "ギター - G B",      "ギター R - -",         "ギター R - B",      "ギター R G -",         "ギター R G B",
         "ギターWailing",   "??",              "??",              "??",             "??",                "??",             "??",                "ギターWailing音切替",
         "??",           "HHClose(不可視)",    "Snare(不可視)",      "Kick(不可視)",      "HiTom(不可視)",        "LowTom(不可視)",    "Cymbal(不可視)",       "FloorTom(不可視)",
         "HHOpen(不可視)",  "RideCymbal(不可視)", "LeftCymbal(不可視)", "LeftPedal(不可視)", "LeftBassDrum(不可視)", "??",             "??",                "??",
         "??",           "??",              "??",              "??",             "??",                "??",             "??",                "??",
         "??",           "??",              "??",              "??",             "??",                "??",             "??",                "??",
         "小節線",          "拍線",              "MIDIコーラス",        "フィルイン",          "AVI",               "??",             "BMPレイヤ4",           "BMPレイヤ5",
         "BMPレイヤ6",      "BMPレイヤ7",         "AVIWIDE",         "??",             "??",                "??",             "??",                "??",
         "BMPレイヤ8",      "SE01",            "SE02",            "SE03",           "SE04",              "SE05",           "SE06",              "SE07",
         "SE08",         "SE09",            "??",              "??",             "??",                "??",             "??",                "??",
         "SE10",         "SE11",            "SE12",            "SE13",           "SE14",              "SE15",           "SE16",              "SE17",
         "SE18",         "SE19",            "??",              "??",             "??",                "??",             "??",                "??",
         "SE20",         "SE21",            "SE22",            "SE23",           "SE24",              "SE25",           "SE26",              "SE27",
         "SE28",         "SE29",            "??",              "??",             "??",                "??",             "??",                "??",
         "SE30",         "SE31",            "SE32",            "---Y-",          "--BY-",             "-G-Y-",          "-GBY-",             "R--Y-",
         "R-BY-",        "RG-Y",            "RGBY-",           "----P",          "--B-P",             "-G--P",          "-GB-P",             "R---P",
         "ベースOPEN",      "ベース - - B",       "ベース - G -",       "ベース - G B",      "ベース R - -",         "ベース R - B",      "ベース R G -",         "ベース R G B",
         "ベースWailing",   "??",              "??",              "??",             "??",                "??",             "??",                "ベースWailing音切替",
         "??",           "HHClose(空うち)",    "Snare(空うち)",      "Kick(空うち)",      "HiTom(空うち)",        "LowTom(空うち)",    "Cymbal(空うち)",       "FloorTom(空うち)",
         "HHOpen(空うち)",  "RideCymbal(空うち)", "ギター(空打ち)",        "ベース(空打ち)",       "LeftCymbal(空うち)",   "LeftPedal(空うち)", "LeftBassDrum(空うち)", "??",
         "??",           "??",              "??",              "??",             "BGAスコープ画像切替1",      "??",             "??",                "BGAスコープ画像切替2",
         "??",           "??",              "??",              "??",             "??",                "??",             "??",                "??",
         "??",           "??",              "??",              "??",             "??",                "BGAスコープ画像切替3",   "BGAスコープ画像切替4",      "BGAスコープ画像切替5",
         "BGAスコープ画像切替6", "BGAスコープ画像切替7",    "??",              "??",             "??",                "??",             "??",                "??",
         "BGAスコープ画像切替8"
     };
     return(string.Format("CChip: 位置:{0:D4}.{1:D3}, 時刻{2:D6}, Ch:{3:X2}({4}), Pn:{5}({11})(内部{6}), Pd:{7}, Sz:{8}, UseWav:{9}, Auto:{10}",
                          this.nPlaybackPosition / 384, this.nPlaybackPosition % 384,
                          this.nPlaybackTimeMs,
                          this.nChannelNumber, chToStr[(int)this.nChannelNumber],
                          this.nIntegerValue, this.nIntegerValue_InternalNumber,
                          this.db実数値,
                          this.dbChipSizeRatio,
                          this.bWAVを使うチャンネルである,
                          this.b自動再生音チャンネルである,
                          CDTX.tZZ(this.nIntegerValue)));
 }
Ejemplo n.º 10
0
        protected override void tUpdateAndDraw_Chip_BarLine(CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip)
        {
            int n小節番号plus1 = pChip.nPlaybackPosition / 0x180;

            if (!pChip.bHit && (pChip.nDistanceFromBar.Drums < 0))
            {
                pChip.bHit             = true;
                this.actPlayInfo.n小節番号 = n小節番号plus1 - 1;
                if (configIni.bWave再生位置自動調整機能有効 && bIsDirectSound)
                {
                    dTX.tAutoCorrectWavPlaybackPosition();
                }
            }
            if ((pChip.bVisible && configIni.bGuitarEnabled))
            {
                int y = CDTXMania.ConfigIni.bReverse.Guitar ? ((this.nJudgeLinePosY.Guitar - pChip.nDistanceFromBar.Guitar) + 0) : ((this.nJudgeLinePosY.Guitar + pChip.nDistanceFromBar.Guitar) + 9);
                if ((dTX.bチップがある.Guitar && (y > 104)) && ((y < 670) && (this.txChip != null)))
                {
                    if (CDTXMania.ConfigIni.nLaneDisp.Guitar == 0 || CDTXMania.ConfigIni.nLaneDisp.Guitar == 1)
                    {
                        this.txChip.tDraw2D(CDTXMania.app.Device, 88, y, new Rectangle(0, 20, 193, 2));
                    }

                    if (configIni.b演奏情報を表示する)
                    {
                        int n小節番号 = n小節番号plus1 - 1;
                        CDTXMania.actDisplayString.tPrint(60, y - 16, CCharacterConsole.EFontType.White, n小節番号.ToString());
                    }
                }
                y = CDTXMania.ConfigIni.bReverse.Bass ? ((this.nJudgeLinePosY.Bass - pChip.nDistanceFromBar.Bass) + 0) : ((this.nJudgeLinePosY.Bass + pChip.nDistanceFromBar.Bass) + 9);
                if ((dTX.bチップがある.Bass && (y > 104)) && ((y < 670) && (this.txChip != null)))
                {
                    if (CDTXMania.ConfigIni.nLaneDisp.Bass == 0 || CDTXMania.ConfigIni.nLaneDisp.Bass == 1)
                    {
                        this.txChip.tDraw2D(CDTXMania.app.Device, 959, y, new Rectangle(0, 20, 193, 2));
                    }

                    if (configIni.b演奏情報を表示する)
                    {
                        int n小節番号 = n小節番号plus1 - 1;
                        CDTXMania.actDisplayString.tPrint(930, y - 16, CCharacterConsole.EFontType.White, n小節番号.ToString());
                    }
                }
            }
        }
        public void t譜面の表示位置を合わせる(bool doScroll)
        {
            this.nスクロール前ms = CSoundManager.rc演奏用タイマ.n現在時刻ms;

            CDTX dTX = TJAPlayer3.DTX[0];

            bool bSuccessSeek = false;

            for (int i = 0; i < dTX.listChip.Count; i++)
            {
                CDTX.CChip pChip = dTX.listChip[i];

                if (pChip.nチャンネル番号 == 0x50 && pChip.n整数値_内部番号 > n現在の小節線 - 1)
                {
                    bSuccessSeek = true;
                    TJAPlayer3.stage演奏ドラム画面.n現在のトップChip = i;
                    break;
                }
            }
            if (!bSuccessSeek)
            {
                TJAPlayer3.stage演奏ドラム画面.n現在のトップChip = 0;
            }
            else
            {
                while (dTX.listChip[TJAPlayer3.stage演奏ドラム画面.n現在のトップChip].n発声時刻ms == dTX.listChip[TJAPlayer3.stage演奏ドラム画面.n現在のトップChip - 1].n発声時刻ms && TJAPlayer3.stage演奏ドラム画面.n現在のトップChip != 0)
                {
                    TJAPlayer3.stage演奏ドラム画面.n現在のトップChip--;
                }
            }

            if (doScroll)
            {
                this.nスクロール後ms = (long)(dTX.listChip[TJAPlayer3.stage演奏ドラム画面.n現在のトップChip].n発声時刻ms / (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0));
                this.bスクロール中   = true;

                this.ctスクロールカウンター = new CCounter(0, TJAPlayer3.Skin.Game_Training_ScrollTime, 1, TJAPlayer3.Timer);
            }
            else
            {
                CSoundManager.rc演奏用タイマ.n現在時刻ms = (long)(dTX.listChip[TJAPlayer3.stage演奏ドラム画面.n現在のトップChip].n発声時刻ms / (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0));
                this.nスクロール後ms = CSoundManager.rc演奏用タイマ.n現在時刻ms;
            }
        }
Ejemplo n.º 12
0
        public void t演奏を再開する()
        {
            CDTX dTX = TJAPlayer3.DTX;

            this.bスクロール中 = false;
            CSound管理.rc演奏用タイマ.n現在時刻ms = this.nスクロール後ms;

            int n演奏開始Chip = TJAPlayer3.stage演奏ドラム画面.n現在のトップChip;

            int finalStartBar;

            if (this.n現在の小節線 <= 0)
            {
                finalStartBar = this.n現在の小節線;
            }
            else
            {
                finalStartBar = this.n現在の小節線 - 1;
            }

            TJAPlayer3.stage演奏ドラム画面.t演奏位置の変更(finalStartBar, 0);

            for (int i = 0; i < dTX.listChip.Count; i++)
            {
                if (i < n演奏開始Chip)
                {
                    dTX.listChip[i].bHit     = true;
                    dTX.listChip[i].IsHitted = true;
                    dTX.listChip[i].b可視      = false;
                    dTX.listChip[i].bShow    = false;
                }
            }

            TJAPlayer3.stage演奏ドラム画面.t数値の初期化(true, true);
            TJAPlayer3.stage演奏ドラム画面.actAVI.tReset();
            TJAPlayer3.stage演奏ドラム画面.On活性化();

            for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
            {
                TJAPlayer3.stage演奏ドラム画面.chip現在処理中の連打チップ[i] = null;
            }

            this.b特訓PAUSE = false;
        }
Ejemplo n.º 13
0
        public void t譜面の表示位置を合わせる(bool doScroll)
        {
            this.nスクロール前ms = CSound管理.rc演奏用タイマ.n現在時刻ms;

            CDTX dTX = TJAPlayer3.DTX;

            bool bSuccessSeek = false;

            for (int i = 0; i < dTX.listChip.Count; i++)
            {
                CDTX.CChip pChip = dTX.listChip[i];

                if (pChip.n発声位置 < 384 * (n現在の小節線))
                {
                    continue;
                }
                else
                {
                    bSuccessSeek = true;
                    TJAPlayer3.stage演奏ドラム画面.n現在のトップChip = i;
                    break;
                }
            }
            if (!bSuccessSeek)
            {
                TJAPlayer3.stage演奏ドラム画面.n現在のトップChip = 0;
            }

            if (doScroll)
            {
                this.nスクロール後ms = dTX.listChip[TJAPlayer3.stage演奏ドラム画面.n現在のトップChip].n発声時刻ms;
                this.bスクロール中   = true;

                this.ctスクロールカウンター = new CCounter(0, TJAPlayer3.Skin.Game_Training_ScrollTime, 1, TJAPlayer3.Timer);
            }
            else
            {
                CSound管理.rc演奏用タイマ.n現在時刻ms = dTX.listChip[TJAPlayer3.stage演奏ドラム画面.n現在のトップChip].n発声時刻ms;
            }
        }
Ejemplo n.º 14
0
        internal static double t超精密型スキルを計算して返す(CDTX dtx, int nTotal, int nPerfect, int nGood, int nMiss, int Poor, int nMaxLagTime, int nMinLagTimen, int nMaxCombo)
        {
            //演奏成績 最大60点
            //最大コンボ 最大5点
            //空打ち 最大10点(減点あり)
            //最大_最小ズレ時間 最大10点
            //平均ズレ時間 最大5点
            //ボーナスA 最大5点
            //ボーナスB 最大5点

            double db演奏点      = 0;
            double db最大コンボ    = 0;
            double db空打ち      = 0;
            double db最大ズレ時間   = 0;
            double db最小ズレ時間   = 0;
            double db平均最大ズレ時間 = 0;
            double db平均最小ズレ時間 = 0;
            double dbボーナスA    = 0;
            double dbボーナスB    = 0;

            #region [ 演奏点 ]

            #endregion
            #region [ 空打ち ]
            int[] n空打ちArray = new int[] { 1, 2, 3, 5, 10, 15, 20, 30, 40, 50 };
            int   n空打ちpt    = 0;
            for (n空打ちpt = 0; n空打ちpt < 10; n空打ちpt++)
            {
                if (Poor == n空打ちArray[n空打ちpt])
                {
                    break;
                }
            }
            db空打ち = (Poor == 0 ? 10 : 10 - n空打ちpt);
            #endregion

            return(1.0);
        }
Ejemplo n.º 15
0
        public void t演奏を停止する()
        {
            CDTX dTX = TJAPlayer3.DTX;

            this.nスクロール後ms = CSound管理.rc演奏用タイマ.n現在時刻ms;

            TJAPlayer3.stage演奏ドラム画面.actAVI.tReset();
            TJAPlayer3.stage演奏ドラム画面.On活性化();
            CSound管理.rc演奏用タイマ.t一時停止();

            for (int i = 0; i < dTX.listChip.Count; i++)
            {
                CDTX.CChip pChip = dTX.listChip[i];
                pChip.bHit  = false;
                pChip.bShow = true;
                pChip.b可視   = true;
            }

            TJAPlayer3.DTX.t全チップの再生一時停止();
            TJAPlayer3.stage演奏ドラム画面.bPAUSE = true;
            this.b特訓PAUSE = true;

            this.t譜面の表示位置を合わせる(false);
        }
Ejemplo n.º 16
0
        private void tSongsDBになかった曲をファイルから読み込んで反映する(List <C曲リストノード> ノードリスト)
        {
            foreach (C曲リストノード c曲リストノード in ノードリスト)
            {
                SlowOrSuspendSearchTask();                      // #27060 中断要求があったら、解除要求が来るまで待機, #PREMOVIE再生中は検索負荷を落とす

                if (c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.BOX)
                {
                    this.tSongsDBになかった曲をファイルから読み込んで反映する(c曲リストノード.list子リスト);
                }
                else if ((c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE))
                {
                    for (int i = 0; i < (int)Difficulty.Total; i++)
                    {
                        if ((c曲リストノード.arスコア.譜面情報.b譜面が存在する[i] != false))
                        {
                            #region [ DTX ファイルのヘッダだけ読み込み、Cスコア.譜面情報 を設定する ]
                            //-----------------
                            string path = c曲リストノード.arスコア.ファイル情報.ファイルの絶対パス;
                            if (File.Exists(path))
                            {
                                try
                                {
                                    CDTX cdtx = new CDTX(c曲リストノード.arスコア.ファイル情報.ファイルの絶対パス, true, 0, 0);

                                    c曲リストノード.arスコア.譜面情報.タイトル = cdtx.TITLE;


                                    c曲リストノード.arスコア.譜面情報.アーティスト名              = cdtx.ARTIST;
                                    c曲リストノード.arスコア.譜面情報.コメント                 = cdtx.COMMENT;
                                    c曲リストノード.arスコア.譜面情報.ジャンル                 = cdtx.GENRE;
                                    c曲リストノード.arスコア.譜面情報.Backgound            = ((cdtx.BACKGROUND != null) && (cdtx.BACKGROUND.Length > 0)) ? cdtx.BACKGROUND : "";
                                    c曲リストノード.arスコア.譜面情報.Bpm                  = cdtx.BPM;
                                    c曲リストノード.arスコア.譜面情報.Duration             = 0;                                                //  (cdtx.listChip == null)? 0 : cdtx.listChip[ cdtx.listChip.Count - 1 ].n発声時刻ms;
                                    c曲リストノード.arスコア.譜面情報.strBGMファイル名          = cdtx.strBGM_PATH == null ? "" : cdtx.strBGM_PATH; //ここのnullをどうにか--------
                                    c曲リストノード.arスコア.譜面情報.SongVol              = cdtx.SongVol;
                                    c曲リストノード.arスコア.譜面情報.SongLoudnessMetadata = cdtx.SongLoudnessMetadata;
                                    c曲リストノード.arスコア.譜面情報.nデモBGMオフセット          = cdtx.nデモBGMオフセット;
                                    c曲リストノード.arスコア.譜面情報.b譜面分岐[0]             = cdtx.bHIDDENBRANCH ? false : cdtx.bHasBranch[0];
                                    c曲リストノード.arスコア.譜面情報.b譜面分岐[1]             = cdtx.bHIDDENBRANCH ? false : cdtx.bHasBranch[1];
                                    c曲リストノード.arスコア.譜面情報.b譜面分岐[2]             = cdtx.bHIDDENBRANCH ? false : cdtx.bHasBranch[2];
                                    c曲リストノード.arスコア.譜面情報.b譜面分岐[3]             = cdtx.bHIDDENBRANCH ? false : cdtx.bHasBranch[3];
                                    c曲リストノード.arスコア.譜面情報.b譜面分岐[4]             = cdtx.bHIDDENBRANCH ? false : cdtx.bHasBranch[4];
                                    c曲リストノード.arスコア.譜面情報.b譜面分岐[5]             = cdtx.bHIDDENBRANCH ? false : cdtx.bHasBranch[5];
                                    c曲リストノード.arスコア.譜面情報.b譜面分岐[6]             = cdtx.bHIDDENBRANCH ? false : cdtx.bHasBranch[6];
                                    c曲リストノード.arスコア.譜面情報.bPapaMamaSupport[0]  = cdtx.bPapaMamaSupport[0];
                                    c曲リストノード.arスコア.譜面情報.bPapaMamaSupport[1]  = cdtx.bPapaMamaSupport[1];
                                    c曲リストノード.arスコア.譜面情報.bPapaMamaSupport[2]  = cdtx.bPapaMamaSupport[2];
                                    c曲リストノード.arスコア.譜面情報.bPapaMamaSupport[3]  = cdtx.bPapaMamaSupport[3];
                                    c曲リストノード.arスコア.譜面情報.bPapaMamaSupport[4]  = cdtx.bPapaMamaSupport[4];
                                    c曲リストノード.arスコア.譜面情報.bPapaMamaSupport[5]  = cdtx.bPapaMamaSupport[5];
                                    c曲リストノード.arスコア.譜面情報.bPapaMamaSupport[6]  = cdtx.bPapaMamaSupport[6];
                                    c曲リストノード.arスコア.譜面情報.strサブタイトル            = cdtx.SUBTITLE;
                                    c曲リストノード.arスコア.譜面情報.nレベル[0]              = cdtx.LEVELtaiko[0];
                                    c曲リストノード.arスコア.譜面情報.nレベル[1]              = cdtx.LEVELtaiko[1];
                                    c曲リストノード.arスコア.譜面情報.nレベル[2]              = cdtx.LEVELtaiko[2];
                                    c曲リストノード.arスコア.譜面情報.nレベル[3]              = cdtx.LEVELtaiko[3];
                                    c曲リストノード.arスコア.譜面情報.nレベル[4]              = cdtx.LEVELtaiko[4];
                                    c曲リストノード.arスコア.譜面情報.nレベル[5]              = cdtx.LEVELtaiko[5];
                                    c曲リストノード.arスコア.譜面情報.nレベル[6]              = cdtx.LEVELtaiko[6];
                                    c曲リストノード.arスコア.譜面情報.b歌詞あり                = cdtx.bLyrics;
                                    this.nファイルから反映できたスコア数++;
                                    cdtx.On非活性化();
                                    //Debug.WriteLine( "★" + this.nファイルから反映できたスコア数 + " " + c曲リストノード.arスコア[ i ].譜面情報.タイトル );
                                    #region [ 曲検索ログ出力 ]
                                    //-----------------
                                    if (TJAPlayer3.ConfigIni.bLog曲検索ログ出力)
                                    {
                                        StringBuilder sb = new StringBuilder(0x400);
                                        sb.Append(string.Format("曲データファイルから譜面情報を転記しました。({0})", path));
                                        sb.Append("(title=" + c曲リストノード.arスコア.譜面情報.タイトル);
                                        sb.Append(", artist=" + c曲リストノード.arスコア.譜面情報.アーティスト名);
                                        sb.Append(", comment=" + c曲リストノード.arスコア.譜面情報.コメント);
                                        sb.Append(", genre=" + c曲リストノード.arスコア.譜面情報.ジャンル);
                                        sb.Append(", background=" + c曲リストノード.arスコア.譜面情報.Backgound);
                                        sb.Append(", bpm=" + c曲リストノード.arスコア.譜面情報.Bpm);
                                        sb.Append(", lyrics=" + c曲リストノード.arスコア.譜面情報.b歌詞あり);
                                        Trace.TraceInformation(sb.ToString());
                                    }
                                    //-----------------
                                    #endregion
                                }
                                catch (Exception exception)
                                {
                                    Trace.TraceError(exception.ToString());
                                    c曲リストノード.arスコア = null;
                                    c曲リストノード.nスコア数--;
                                    this.n検索されたスコア数--;
                                    Trace.TraceError("曲データファイルの読み込みに失敗しました。({0})", path);
                                }
                            }
                            //-----------------
                            #endregion

                            #region [ 対応する .score.ini が存在していれば読み込み、Cスコア.譜面情報 に追加設定する ]
                            //-----------------
                            try
                            {
                                var scoreIniPath = c曲リストノード.arスコア.ファイル情報.ファイルの絶対パス + ".score.ini";
                                if (File.Exists(scoreIniPath))
                                {
                                    this.tScoreIniを読み込んで譜面情報を設定する(scoreIniPath, c曲リストノード.arスコア);
                                }
                                else
                                {
                                    string[] dtxscoreini = Directory.GetFiles(c曲リストノード.arスコア.ファイル情報.フォルダの絶対パス, "*.dtx.score.ini");
                                    if (dtxscoreini.Length != 0 && File.Exists(dtxscoreini[0]))
                                    {
                                        this.tScoreIniを読み込んで譜面情報を設定する(dtxscoreini[0], c曲リストノード.arスコア);
                                    }
                                }
                            }
                            catch (Exception e)
                            {
                                Trace.TraceError(e.ToString());
                                Trace.TraceError("例外が発生しましたが処理を継続します。 (c8b6538c-46a1-403e-8cc3-fc7e7ff914fb)");
                            }

                            //-----------------
                            #endregion
                        }
                    }
                }
            }
        }
Ejemplo n.º 17
0
        protected override void tUpdateAndDraw_Chip_Bass_Wailing(CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip)
        {
            if (configIni.bGuitarEnabled)
            {
                //if ( configIni.bSudden.Bass )
                //{
                //    pChip.bVisible = pChip.nDistanceFromBar.Bass < 200;
                //}
                //if ( configIni.bHidden.Bass && ( pChip.nDistanceFromBar.Bass < 100 ) )
                //{
                //    pChip.bVisible = false;
                //}

                //
                // 後日、以下の部分を何とかCStage演奏画面共通.csに移したい。
                //
                if (!pChip.bHit && pChip.bVisible)
                {
                    int[] y_base = { 154, 611 };                                // ドラム画面かギター画面かで変わる値
                    int   offset = 0;                                           // ドラム画面かギター画面かで変わる値

                    const int WailingWidth       = 54;                          // 4種全て同じ値
                    const int WailingHeight      = 68;                          // 4種全て同じ値
                    const int baseTextureOffsetX = 0;                           // ドラム画面かギター画面かで変わる値
                    const int baseTextureOffsetY = 22;                          // ドラム画面かギター画面かで変わる値
                    const int drawX = 1155;                                     // 4種全て異なる値

                    const int numA = 34;                                        // 4種全て同じ値
                    int       y    = CDTXMania.ConfigIni.bReverse.Bass ? (y_base[1] - pChip.nDistanceFromBar.Bass) : (y_base[0] + pChip.nDistanceFromBar.Bass);
                    int       numB = y - offset;                                // 4種全て同じ定義
                    int       numC = 0;                                         // 4種全て同じ初期値
                    const int numD = 709;                                       // ドラム画面かギター画面かで変わる値
                    if ((numB < (numD + numA)) && (numB > -numA))               // 以下のロジックは4種全て同じ
                    {
                        int       c    = this.ctWailingChipPatternAnimation.nCurrentValue;
                        Rectangle rect = new Rectangle(baseTextureOffsetX, baseTextureOffsetY, WailingWidth, WailingHeight);
                        if (numB < numA)
                        {
                            rect.Y      += numA - numB;
                            rect.Height -= numA - numB;
                            numC         = numA - numB;
                        }
                        if (numB > (numD - numA))
                        {
                            rect.Height -= numB - (numD - numA);
                        }
                        if ((rect.Bottom > rect.Top) && (this.txChip != null))
                        {
                            this.txChip.tDraw2D(CDTXMania.app.Device, drawX, (y - numA) + numC, rect);
                        }
                    }
                }
                //    if ( !pChip.bHit && ( pChip.nDistanceFromBar.Bass < 0 ) )
                //    {
                //        pChip.bHit = true;
                //        if ( configIni.bAutoPlay.Bass )
                //        {
                //            this.actWailingBonus.Start( EInstrumentPart.BASS, this.r現在の歓声Chip.Bass );
                //        }
                //    }
                //    return;
                //}
                //pChip.bHit = true;
                base.tUpdateAndDraw_Chip_Bass_Wailing(configIni, ref dTX, ref pChip);
            }
        }
Ejemplo n.º 18
0
 protected override void t進行描画_チップ_ベース(CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip)
 {
     if (configIni.bGuitar有効)
     {
         if (configIni.bSudden.Bass)
         {
             pChip.b可視 = pChip.nバーからの距離dot.Bass < 200;
         }
         if (configIni.bHidden.Bass && (pChip.nバーからの距離dot.Bass < 100))
         {
             pChip.b可視 = false;
         }
         if (!pChip.bHit && pChip.b可視)
         {
             int num8 = configIni.bReverse.Bass ? (0x171 - pChip.nバーからの距離dot.Bass) : (40 + pChip.nバーからの距離dot.Bass);
             if ((num8 > 0) && (num8 < 0x199))
             {
                 int num9 = this.ctチップ模様アニメ.Bass.n現在の値;
                 if (pChip.nチャンネル番号 == 160)
                 {
                     if (this.txチップ != null)
                     {
                         this.txチップ.t2D描画(CDTXMania.app.Device, 480, num8 - 4, new Rectangle(0, 0xc0 + ((num9 % 5) * 8), 0x67, 8));
                     }
                 }
                 else if (!configIni.bLeft.Bass)
                 {
                     Rectangle rectangle3 = new Rectangle(0, num9 * 8, 0x20, 8);
                     if (((pChip.nチャンネル番号 & 4) != 0) && (this.txチップ != null))
                     {
                         this.txチップ.t2D描画(CDTXMania.app.Device, 480, num8 - 4, rectangle3);
                     }
                     rectangle3.X += 0x20;
                     if (((pChip.nチャンネル番号 & 2) != 0) && (this.txチップ != null))
                     {
                         this.txチップ.t2D描画(CDTXMania.app.Device, 0x204, num8 - 4, rectangle3);
                     }
                     rectangle3.X += 0x20;
                     if (((pChip.nチャンネル番号 & 1) != 0) && (this.txチップ != null))
                     {
                         this.txチップ.t2D描画(CDTXMania.app.Device, 0x228, num8 - 4, rectangle3);
                     }
                 }
                 else
                 {
                     Rectangle rectangle4 = new Rectangle(0, num9 * 8, 0x20, 8);
                     if (((pChip.nチャンネル番号 & 4) != 0) && (this.txチップ != null))
                     {
                         this.txチップ.t2D描画(CDTXMania.app.Device, 0x228, num8 - 4, rectangle4);
                     }
                     rectangle4.X += 0x20;
                     if (((pChip.nチャンネル番号 & 2) != 0) && (this.txチップ != null))
                     {
                         this.txチップ.t2D描画(CDTXMania.app.Device, 0x204, num8 - 4, rectangle4);
                     }
                     rectangle4.X += 0x20;
                     if (((pChip.nチャンネル番号 & 1) != 0) && (this.txチップ != null))
                     {
                         this.txチップ.t2D描画(CDTXMania.app.Device, 480, num8 - 4, rectangle4);
                     }
                 }
             }
         }
         if ((configIni.bAutoPlay.Bass && !pChip.bHit) && (pChip.nバーからの距離dot.Bass < 0))
         {
             pChip.bHit = true;
             if (((pChip.nチャンネル番号 & 4) != 0) || (pChip.nチャンネル番号 == 0xA0))
             {
                 this.actChipFireGB.Start(3);
             }
             if (((pChip.nチャンネル番号 & 2) != 0) || (pChip.nチャンネル番号 == 0xA0))
             {
                 this.actChipFireGB.Start(4);
             }
             if (((pChip.nチャンネル番号 & 1) != 0) || (pChip.nチャンネル番号 == 0xA0))
             {
                 this.actChipFireGB.Start(5);
             }
             this.tサウンド再生(pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, E楽器パート.BASS, dTX.nモニタを考慮した音量(E楽器パート.BASS));
             this.r次にくるベースChip = null;
             this.tチップのヒット処理(pChip.n発声時刻ms, pChip);
         }
         return;
     }
     if (!pChip.bHit && (pChip.nバーからの距離dot.Bass < 0))
     {
         pChip.bHit = true;
         this.tサウンド再生(pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, E楽器パート.BASS, dTX.nモニタを考慮した音量(E楽器パート.BASS));
     }
 }
Ejemplo n.º 19
0
        private void t曲を検索してリストを作成する(string str基点フォルダ, bool b子BOXへ再帰する, List <C曲リストノード> listノードリスト, C曲リストノード node親)
        {
            if (!str基点フォルダ.EndsWith(@"/"))
            {
                str基点フォルダ = str基点フォルダ + @"/";
            }

            DirectoryInfo info = new DirectoryInfo(str基点フォルダ);

            if (TJAPlayer3.ConfigIni.bLog曲検索ログ出力)
            {
                Trace.TraceInformation("基点フォルダ: " + str基点フォルダ);
            }

            #region [ 個別ファイルからノード作成 ]
            //-----------------------------
            foreach (FileInfo fileinfo in info.GetFiles())
            {
                SlowOrSuspendSearchTask();                      // #27060 中断要求があったら、解除要求が来るまで待機, #PREMOVIE再生中は検索負荷を落とす
                string strExt = fileinfo.Extension.ToLower();

                if ((strExt.Equals(".tja")) || strExt.Equals(".tcm") || strExt.Equals(".tci"))
                {
                    #region [ 新処理 ]
                    CDTX     dtx      = new CDTX(str基点フォルダ + fileinfo.Name, false, 1.0, 0, 0, false);
                    C曲リストノード c曲リストノード = new C曲リストノード();
                    c曲リストノード.eNodeType = C曲リストノード.ENodeType.SCORE;

                    c曲リストノード.r親ノード          = node親;
                    c曲リストノード.strBreadcrumbs = (c曲リストノード.r親ノード == null) ?
                                              str基点フォルダ + fileinfo.Name : c曲リストノード.r親ノード.strBreadcrumbs + " > " + str基点フォルダ + fileinfo.Name;

                    c曲リストノード.strTitle    = dtx.TITLE;
                    c曲リストノード.strSubTitle = dtx.SUBTITLE;
                    if (!string.IsNullOrEmpty(dtx.GENRE))
                    {
                        c曲リストノード.strGenre = dtx.GENRE;
                    }
                    else
                    {
                        if (c曲リストノード.r親ノード != null && c曲リストノード.r親ノード.strGenre != "")
                        {
                            // .tjaのジャンルが存在しなくて、かつ親ノードにジャンルが指定されていればそちらを読み込む。
                            c曲リストノード.strGenre = c曲リストノード.r親ノード.strGenre;
                        }
                    }

                    if (c曲リストノード.r親ノード != null)
                    {
                        c曲リストノード.ForeColor = c曲リストノード.r親ノード.ForeColor;
                        c曲リストノード.BackColor = c曲リストノード.r親ノード.BackColor;
                    }

                    c曲リストノード.ForeColor = TJAPlayer3.Skin.SongSelect_ForeColor[TJAPlayer3.Skin.nStrジャンルtoNum(c曲リストノード.strGenre)];
                    c曲リストノード.BackColor = TJAPlayer3.Skin.SongSelect_BackColor[TJAPlayer3.Skin.nStrジャンルtoNum(c曲リストノード.strGenre)];

                    c曲リストノード.nLevel = dtx.LEVELtaiko;


                    bool b = false;

                    c曲リストノード.arスコア = new Cスコア();
                    c曲リストノード.arスコア.ファイル情報.ファイルの絶対パス = str基点フォルダ + fileinfo.Name;
                    c曲リストノード.arスコア.ファイル情報.フォルダの絶対パス = str基点フォルダ;
                    c曲リストノード.arスコア.ファイル情報.ファイルサイズ   = fileinfo.Length;
                    c曲リストノード.arスコア.ファイル情報.最終更新日時    = fileinfo.LastWriteTime;
                    string strFileNameScoreIni = c曲リストノード.arスコア.ファイル情報.ファイルの絶対パス + ".score.ini";
                    if (File.Exists(strFileNameScoreIni))
                    {
                        FileInfo infoScoreIni = new FileInfo(strFileNameScoreIni);
                        c曲リストノード.arスコア.ScoreIni情報.ファイルサイズ = infoScoreIni.Length;
                        c曲リストノード.arスコア.ScoreIni情報.最終更新日時  = infoScoreIni.LastWriteTime;
                    }

                    c曲リストノード.arスコア.譜面情報.Title                = dtx.TITLE;
                    c曲リストノード.arスコア.譜面情報.Artist               = dtx.ARTIST;
                    c曲リストノード.arスコア.譜面情報.Comment              = dtx.COMMENT;
                    c曲リストノード.arスコア.譜面情報.Genre                = dtx.GENRE;
                    c曲リストノード.arスコア.譜面情報.Backgound            = ((dtx.BACKGROUND != null) && (dtx.BACKGROUND.Length > 0)) ? dtx.BACKGROUND : "";
                    c曲リストノード.arスコア.譜面情報.Bpm                  = dtx.BPM;
                    c曲リストノード.arスコア.譜面情報.Duration             = 0;           //  (cdtx.listChip == null)? 0 : cdtx.listChip[ cdtx.listChip.Count - 1 ].n発声時刻ms;
                    c曲リストノード.arスコア.譜面情報.strBGMファイル名          = dtx.strBGM_PATH == null ? "" : dtx.strBGM_PATH;
                    c曲リストノード.arスコア.譜面情報.SongVol              = dtx.SongVol;
                    c曲リストノード.arスコア.譜面情報.SongLoudnessMetadata = dtx.SongLoudnessMetadata;
                    c曲リストノード.arスコア.譜面情報.nデモBGMオフセット          = dtx.nデモBGMオフセット;
                    c曲リストノード.arスコア.譜面情報.b譜面分岐[0]             = dtx.bHIDDENBRANCH ? false : dtx.bHasBranch[0];
                    c曲リストノード.arスコア.譜面情報.b譜面分岐[1]             = dtx.bHIDDENBRANCH ? false : dtx.bHasBranch[1];
                    c曲リストノード.arスコア.譜面情報.b譜面分岐[2]             = dtx.bHIDDENBRANCH ? false : dtx.bHasBranch[2];
                    c曲リストノード.arスコア.譜面情報.b譜面分岐[3]             = dtx.bHIDDENBRANCH ? false : dtx.bHasBranch[3];
                    c曲リストノード.arスコア.譜面情報.b譜面分岐[4]             = dtx.bHIDDENBRANCH ? false : dtx.bHasBranch[4];
                    c曲リストノード.arスコア.譜面情報.b譜面分岐[5]             = dtx.bHIDDENBRANCH ? false : dtx.bHasBranch[5];
                    c曲リストノード.arスコア.譜面情報.b譜面分岐[6]             = dtx.bHIDDENBRANCH ? false : dtx.bHasBranch[6];
                    c曲リストノード.arスコア.譜面情報.bPapaMamaSupport[0]  = dtx.bPapaMamaSupport[0];
                    c曲リストノード.arスコア.譜面情報.bPapaMamaSupport[1]  = dtx.bPapaMamaSupport[1];
                    c曲リストノード.arスコア.譜面情報.bPapaMamaSupport[2]  = dtx.bPapaMamaSupport[2];
                    c曲リストノード.arスコア.譜面情報.bPapaMamaSupport[3]  = dtx.bPapaMamaSupport[3];
                    c曲リストノード.arスコア.譜面情報.bPapaMamaSupport[4]  = dtx.bPapaMamaSupport[4];
                    c曲リストノード.arスコア.譜面情報.bPapaMamaSupport[5]  = dtx.bPapaMamaSupport[5];
                    c曲リストノード.arスコア.譜面情報.bPapaMamaSupport[6]  = dtx.bPapaMamaSupport[6];
                    c曲リストノード.arスコア.譜面情報.strSubTitle          = dtx.SUBTITLE;
                    c曲リストノード.arスコア.譜面情報.nレベル[0]              = dtx.LEVELtaiko[0];
                    c曲リストノード.arスコア.譜面情報.nレベル[1]              = dtx.LEVELtaiko[1];
                    c曲リストノード.arスコア.譜面情報.nレベル[2]              = dtx.LEVELtaiko[2];
                    c曲リストノード.arスコア.譜面情報.nレベル[3]              = dtx.LEVELtaiko[3];
                    c曲リストノード.arスコア.譜面情報.nレベル[4]              = dtx.LEVELtaiko[4];
                    c曲リストノード.arスコア.譜面情報.nレベル[5]              = dtx.LEVELtaiko[5];
                    c曲リストノード.arスコア.譜面情報.nレベル[6]              = dtx.LEVELtaiko[6];
                    c曲リストノード.arスコア.譜面情報.b歌詞あり                = dtx.bLyrics;
                    for (int n = 0; n < (int)Difficulty.Total; n++)
                    {
                        if (dtx.b譜面が存在する[n])
                        {
                            c曲リストノード.nスコア数++;
                            c曲リストノード.arスコア.譜面情報.b譜面が存在する[n] = true;
                            if (b == false)
                            {
                                this.n検索されたスコア数++;
                                listノードリスト.Add(c曲リストノード);
                                this.n検索された曲ノード数++;
                                b = true;
                            }
                        }
                    }
                    dtx = null;

                    try
                    {
                        var scoreIniPath = c曲リストノード.arスコア.ファイル情報.ファイルの絶対パス + ".score.ini";
                        if (File.Exists(scoreIniPath))
                        {
                            this.tScoreIniを読み込んで譜面情報を設定する(scoreIniPath, c曲リストノード.arスコア);
                        }
                        else
                        {
                            string[] dtxscoreini = Directory.GetFiles(c曲リストノード.arスコア.ファイル情報.フォルダの絶対パス, "*.dtx.score.ini");
                            if (dtxscoreini.Length != 0 && File.Exists(dtxscoreini[0]))
                            {
                                this.tScoreIniを読み込んで譜面情報を設定する(dtxscoreini[0], c曲リストノード.arスコア);
                            }
                        }
                    }
                    catch (Exception e)
                    {
                        Trace.TraceError(e.ToString());
                        Trace.TraceError("An exception has occurred, but processing continues.");
                    }
                    #endregion
                }
            }
            //-----------------------------
            #endregion

            foreach (DirectoryInfo infoDir in info.GetDirectories())
            {
                SlowOrSuspendSearchTask();                      // #27060 中断要求があったら、解除要求が来るまで待機, #PREMOVIE再生中は検索負荷を落とす

                #region [ b.box.def を含むフォルダの場合  ]
                //-----------------------------
                if (File.Exists(infoDir.FullName + @"/box.def"))
                {
                    CBoxDef  boxdef   = new CBoxDef(infoDir.FullName + @"/box.def");
                    C曲リストノード c曲リストノード = new C曲リストノード();
                    c曲リストノード.eNodeType = C曲リストノード.ENodeType.BOX;
                    c曲リストノード.strTitle  = boxdef.Title;
                    c曲リストノード.strGenre  = boxdef.Genre;

                    c曲リストノード.ForeColor = boxdef.ForeColor;
                    c曲リストノード.BackColor = boxdef.BackColor;

                    c曲リストノード.ForeColor = TJAPlayer3.Skin.SongSelect_ForeColor[TJAPlayer3.Skin.nStrジャンルtoNum(c曲リストノード.strGenre)];
                    c曲リストノード.BackColor = TJAPlayer3.Skin.SongSelect_BackColor[TJAPlayer3.Skin.nStrジャンルtoNum(c曲リストノード.strGenre)];

                    c曲リストノード.nスコア数 = 1;
                    c曲リストノード.arスコア = new Cスコア();
                    c曲リストノード.arスコア.ファイル情報.フォルダの絶対パス = infoDir.FullName + @"/";
                    c曲リストノード.arスコア.譜面情報.Title       = boxdef.Title;
                    c曲リストノード.arスコア.譜面情報.Genre       = boxdef.Genre;
                    c曲リストノード.r親ノード     = node親;
                    c曲リストノード.Openindex = 1;

                    c曲リストノード.strBreadcrumbs = (c曲リストノード.r親ノード == null) ?
                                              c曲リストノード.strTitle : c曲リストノード.r親ノード.strBreadcrumbs + " > " + c曲リストノード.strTitle;


                    c曲リストノード.list子リスト = new List <C曲リストノード>();
                    listノードリスト.Add(c曲リストノード);
                    if (b子BOXへ再帰する)
                    {
                        this.t曲を検索してリストを作成する(infoDir.FullName + @"/", b子BOXへ再帰する, c曲リストノード.list子リスト, c曲リストノード);
                    }
                }
                //-----------------------------
                #endregion

                #region [ c.通常フォルダの場合 ]
                //-----------------------------
                else
                {
                    this.t曲を検索してリストを作成する(infoDir.FullName + @"/", b子BOXへ再帰する, listノードリスト, node親);
                }
                //-----------------------------
                #endregion
            }
        }
Ejemplo n.º 20
0
        protected override void t進行描画_チップ_ギターベース(CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip, E楽器パート inst)
        {
            int instIndex = (int)inst;

            if (configIni.bGuitar有効)
            {
                if (configIni.bSudden[instIndex])
                {
                    pChip.b可視 = pChip.nバーからの距離dot[instIndex] < 200;
                }
                if (configIni.bHidden[instIndex] && (pChip.nバーからの距離dot[instIndex] < 100))
                {
                    pChip.b可視 = false;
                }

                bool bChipHasR = ((pChip.nチャンネル番号 & 4) > 0);
                bool bChipHasG = ((pChip.nチャンネル番号 & 2) > 0);
                bool bChipHasB = ((pChip.nチャンネル番号 & 1) > 0);
                bool bChipHasW = ((pChip.nチャンネル番号 & 0x0F) == 0x08);
                bool bChipIsO  = ((pChip.nチャンネル番号 & 0x0F) == 0x00);

                int OPEN = (inst == E楽器パート.GUITAR) ? 0x20 : 0xA0;
                if (!pChip.bHit && pChip.b可視)
                {
                    int y = configIni.bReverse[instIndex] ? (369 - pChip.nバーからの距離dot[instIndex]) : (40 + pChip.nバーからの距離dot[instIndex]);
                    if ((y > 0) && (y < 409))
                    {
                        if (this.txチップ != null)
                        {
                            int nアニメカウンタ現在の値 = this.ctチップ模様アニメ[instIndex].n現在の値;
                            if (pChip.nチャンネル番号 == OPEN)
                            {
                                {
                                    int xo = (inst == E楽器パート.GUITAR) ? 26 : 480;
                                    this.txチップ.t2D描画(CDTXMania.app.Device, xo, y - 4, new Rectangle(0, 192 + ((nアニメカウンタ現在の値 % 5) * 8), 103, 8));
                                }
                            }
                            Rectangle rc = new Rectangle(0, nアニメカウンタ現在の値 * 8, 32, 8);
                            int       x;
                            if (inst == E楽器パート.GUITAR)
                            {
                                x = (configIni.bLeft.Guitar) ? 98 : 26;
                            }
                            else
                            {
                                x = (configIni.bLeft.Bass) ? 552 : 480;
                            }
                            int deltaX = (configIni.bLeft[instIndex]) ? -36 : +36;
                            if (bChipHasR)
                            {
                                this.txチップ.t2D描画(CDTXMania.app.Device, x, y - 4, rc);
                            }
                            rc.X += 32;
                            if (bChipHasG)
                            {
                                this.txチップ.t2D描画(CDTXMania.app.Device, x, y - 4, rc);
                            }
                            rc.X += 32;
                            if (bChipHasB)
                            {
                                this.txチップ.t2D描画(CDTXMania.app.Device, x, y - 4, rc);
                            }
                        }
                    }
                }
                // if ( ( configIni.bAutoPlay.Guitar && !pChip.bHit ) && ( pChip.nバーからの距離dot.Guitar < 0 ) )
                if ((!pChip.bHit) && (pChip.nバーからの距離dot[instIndex] < 0))
                {
                    int  lo    = (inst == E楽器パート.GUITAR) ? 0 : 3;                       // lane offset
                    bool autoR = (inst == E楽器パート.GUITAR) ? bIsAutoPlay.GtR : bIsAutoPlay.BsR;
                    bool autoG = (inst == E楽器パート.GUITAR) ? bIsAutoPlay.GtG : bIsAutoPlay.BsG;
                    bool autoB = (inst == E楽器パート.GUITAR) ? bIsAutoPlay.GtB : bIsAutoPlay.BsB;
                    if ((bChipHasR || bChipIsO) && autoR)
                    {
                        this.actChipFireGB.Start(0 + lo);
                    }
                    if ((bChipHasG || bChipIsO) && autoG)
                    {
                        this.actChipFireGB.Start(1 + lo);
                    }
                    if ((bChipHasB || bChipIsO) && autoB)
                    {
                        this.actChipFireGB.Start(2 + lo);
                    }
                    if ((inst == E楽器パート.GUITAR && bIsAutoPlay.GtPick) || (inst == E楽器パート.BASS && bIsAutoPlay.BsPick))
                    {
                        bool pushingR = CDTXMania.Pad.b押されている(inst, Eパッド.R);
                        bool pushingG = CDTXMania.Pad.b押されている(inst, Eパッド.G);
                        bool pushingB = CDTXMania.Pad.b押されている(inst, Eパッド.B);
                        bool bMiss    = true;
                        if (((bChipIsO == true) && (!pushingR | autoR) && (!pushingG | autoG) && (!pushingB | autoB)) ||
                            ((bChipHasR == (pushingR | autoR)) && (bChipHasG == (pushingG | autoG)) && (bChipHasB == (pushingB | autoB)))
                            )
                        {
                            bMiss = false;
                        }
                        pChip.bHit = true;
                        this.tサウンド再生(pChip, CDTXMania.Timer.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, inst, dTX.nモニタを考慮した音量(inst));
                        this.r次にくるギターChip = null;
                        this.tチップのヒット処理(pChip.n発声時刻ms, pChip);
                    }
                }
                // break;
                return;
            }
            if (!pChip.bHit && (pChip.nバーからの距離dot[instIndex] < 0))
            {
                pChip.bHit = true;
                this.tサウンド再生(pChip, CDTXMania.Timer.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, inst, dTX.nモニタを考慮した音量(inst));
            }
        }
Ejemplo n.º 21
0
 protected override void tUpdateAndDraw_Chip_GuitarBass(CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip, EInstrumentPart inst)
 {
     base.tUpdateAndDraw_Chip_GuitarBass(configIni, ref dTX, ref pChip, inst,
                                         this.nJudgeLinePosY[(int)inst] + 10, this.nJudgeLinePosY[(int)inst] + 1, 104, 670, 0, 0, 0, 11, 196, 10, 38, 38, 1000, 1000, 1000, 38, 38);
 }
Ejemplo n.º 22
0
        private void t曲を検索してリストを作成する(string str基点フォルダ, bool b子BOXへ再帰する, List <C曲リストノード> listノードリスト, C曲リストノード node親)
        {
            if (!str基点フォルダ.EndsWith(@"\"))
            {
                str基点フォルダ = str基点フォルダ + @"\";
            }

            DirectoryInfo info = new DirectoryInfo(str基点フォルダ);

            if (TJAPlayer3.ConfigIni.bLog曲検索ログ出力)
            {
                Trace.TraceInformation("基点フォルダ: " + str基点フォルダ);
            }

            #region [ 個別ファイルからノード作成 ]
            //-----------------------------
            foreach (FileInfo fileinfo in info.GetFiles())
            {
                SlowOrSuspendSearchTask();                      // #27060 中断要求があったら、解除要求が来るまで待機, #PREMOVIE再生中は検索負荷を落とす
                string strExt = fileinfo.Extension.ToLower();

                if ((strExt.Equals(".tja")) || strExt.Equals(".tcm") || strExt.Equals(".tci"))
                {
                    #region [ 新処理 ]
                    CDTX     dtx      = new CDTX(str基点フォルダ + fileinfo.Name, false, 1.0, 0);
                    C曲リストノード c曲リストノード = new C曲リストノード();
                    c曲リストノード.eノード種別 = C曲リストノード.Eノード種別.SCORE;

                    c曲リストノード.r親ノード          = node親;
                    c曲リストノード.strBreadcrumbs = (c曲リストノード.r親ノード == null) ?
                                              str基点フォルダ + fileinfo.Name : c曲リストノード.r親ノード.strBreadcrumbs + " > " + str基点フォルダ + fileinfo.Name;

                    c曲リストノード.strタイトル   = dtx.TITLE;
                    c曲リストノード.strサブタイトル = dtx.SUBTITLE;
                    if (!string.IsNullOrEmpty(dtx.GENRE))
                    {
                        c曲リストノード.strジャンル = dtx.GENRE;
                    }
                    else
                    {
                        if (c曲リストノード.r親ノード != null && c曲リストノード.r親ノード.strジャンル != "")
                        {
                            // .tjaのジャンルが存在しなくて、かつ親ノードにジャンルが指定されていればそちらを読み込む。
                            c曲リストノード.strジャンル = c曲リストノード.r親ノード.strジャンル;
                        }
                    }

                    if (c曲リストノード.r親ノード != null)
                    {
                        if (c曲リストノード.r親ノード.IsChangedForeColor)
                        {
                            c曲リストノード.ForeColor          = c曲リストノード.r親ノード.ForeColor;
                            c曲リストノード.IsChangedForeColor = true;
                        }
                        if (c曲リストノード.r親ノード.IsChangedBackColor)
                        {
                            c曲リストノード.BackColor          = c曲リストノード.r親ノード.BackColor;
                            c曲リストノード.IsChangedBackColor = true;
                        }
                    }

                    c曲リストノード.ForeColor = TJAPlayer3.Skin.SongSelect_ForeColor[TJAPlayer3.Skin.nStrジャンルtoNum(c曲リストノード.strジャンル)];
                    c曲リストノード.BackColor = TJAPlayer3.Skin.SongSelect_BackColor[TJAPlayer3.Skin.nStrジャンルtoNum(c曲リストノード.strジャンル)];

                    c曲リストノード.nLevel = dtx.LEVELtaiko;


                    bool b = false;

                    c曲リストノード.arスコア = new Cスコア();
                    c曲リストノード.arスコア.ファイル情報.ファイルの絶対パス = str基点フォルダ + fileinfo.Name;
                    c曲リストノード.arスコア.ファイル情報.フォルダの絶対パス = str基点フォルダ;
                    c曲リストノード.arスコア.ファイル情報.ファイルサイズ   = fileinfo.Length;
                    c曲リストノード.arスコア.ファイル情報.最終更新日時    = fileinfo.LastWriteTime;
                    string strFileNameScoreIni = c曲リストノード.arスコア.ファイル情報.ファイルの絶対パス + ".score.ini";
                    if (File.Exists(strFileNameScoreIni))
                    {
                        FileInfo infoScoreIni = new FileInfo(strFileNameScoreIni);
                        c曲リストノード.arスコア.ScoreIni情報.ファイルサイズ = infoScoreIni.Length;
                        c曲リストノード.arスコア.ScoreIni情報.最終更新日時  = infoScoreIni.LastWriteTime;
                    }

                    for (int n = 0; n < (int)Difficulty.Total; n++)
                    {
                        if (dtx.b譜面が存在する[n])
                        {
                            c曲リストノード.nスコア数++;
                            c曲リストノード.arスコア.譜面情報.b譜面が存在する[n] = true;
                            if (b == false)
                            {
                                this.n検索されたスコア数++;
                                listノードリスト.Add(c曲リストノード);
                                this.n検索された曲ノード数++;
                                b = true;
                            }
                        }
                    }
                    dtx = null;
                    #endregion
                }
            }
            //-----------------------------
            #endregion

            foreach (DirectoryInfo infoDir in info.GetDirectories())
            {
                SlowOrSuspendSearchTask();                      // #27060 中断要求があったら、解除要求が来るまで待機, #PREMOVIE再生中は検索負荷を落とす

                #region [ b.box.def を含むフォルダの場合  ]
                //-----------------------------
                if (File.Exists(infoDir.FullName + @"\box.def"))
                {
                    CBoxDef  boxdef   = new CBoxDef(infoDir.FullName + @"\box.def");
                    C曲リストノード c曲リストノード = new C曲リストノード();
                    c曲リストノード.eノード種別  = C曲リストノード.Eノード種別.BOX;
                    c曲リストノード.strタイトル = boxdef.Title;
                    c曲リストノード.strジャンル = boxdef.Genre;

                    if (boxdef.IsChangedForeColor)
                    {
                        c曲リストノード.ForeColor          = boxdef.ForeColor;
                        c曲リストノード.IsChangedForeColor = true;
                    }
                    if (boxdef.IsChangedBackColor)
                    {
                        c曲リストノード.BackColor          = boxdef.BackColor;
                        c曲リストノード.IsChangedBackColor = true;
                    }

                    c曲リストノード.ForeColor = TJAPlayer3.Skin.SongSelect_ForeColor[TJAPlayer3.Skin.nStrジャンルtoNum(c曲リストノード.strジャンル)];
                    c曲リストノード.BackColor = TJAPlayer3.Skin.SongSelect_BackColor[TJAPlayer3.Skin.nStrジャンルtoNum(c曲リストノード.strジャンル)];

                    c曲リストノード.nスコア数 = 1;
                    c曲リストノード.arスコア = new Cスコア();
                    c曲リストノード.arスコア.ファイル情報.フォルダの絶対パス = infoDir.FullName + @"\";
                    c曲リストノード.arスコア.譜面情報.タイトル        = boxdef.Title;
                    c曲リストノード.arスコア.譜面情報.ジャンル        = boxdef.Genre;
                    c曲リストノード.r親ノード     = node親;
                    c曲リストノード.Openindex = 1;

                    c曲リストノード.strBreadcrumbs = (c曲リストノード.r親ノード == null) ?
                                              c曲リストノード.strタイトル : c曲リストノード.r親ノード.strBreadcrumbs + " > " + c曲リストノード.strタイトル;


                    c曲リストノード.list子リスト = new List <C曲リストノード>();
                    listノードリスト.Add(c曲リストノード);
                    if (b子BOXへ再帰する)
                    {
                        this.t曲を検索してリストを作成する(infoDir.FullName + @"\", b子BOXへ再帰する, c曲リストノード.list子リスト, c曲リストノード);
                    }
                }
                //-----------------------------
                #endregion

                #region [ c.通常フォルダの場合 ]
                //-----------------------------
                else
                {
                    this.t曲を検索してリストを作成する(infoDir.FullName + @"\", b子BOXへ再帰する, listノードリスト, node親);
                }
                //-----------------------------
                #endregion
            }
        }
        public override void On活性化()
        {
            this.n現在の小節線   = 0;
            this.b特訓PAUSE  = false;
            this.n最終演奏位置ms = 0;

            base.On活性化();

            CDTX dTX = TJAPlayer3.DTX[0];

            var measureCount = 1;
            var bIsInGoGo    = false;

            int endtime   = 1;
            int bgmlength = 1;

            for (int index = 0; index < TJAPlayer3.DTX[0].listChip.Count; index++)
            {
                if (TJAPlayer3.DTX[0].listChip[index].nチャンネル番号 == 0xff)
                {
                    endtime = TJAPlayer3.DTX[0].listChip[index].n発声時刻ms;
                    break;
                }
            }
            for (int index = 0; index < TJAPlayer3.DTX[0].listChip.Count; index++)
            {
                if (TJAPlayer3.DTX[0].listChip[index].nチャンネル番号 == 0x01)
                {
                    bgmlength = TJAPlayer3.DTX[0].listChip[index].GetDuration() + TJAPlayer3.DTX[0].listChip[index].n発声時刻ms;
                    break;
                }
            }

            length = Math.Max(endtime, bgmlength);

            gogoXList     = new List <int>();
            JumpPointList = new List <STJUMPP>();

            for (int i = 0; i < dTX.listChip.Count; i++)
            {
                CDTX.CChip pChip = dTX.listChip[i];

                if (pChip.n整数値_内部番号 > measureCount && pChip.nチャンネル番号 == 0x50)
                {
                    measureCount = pChip.n整数値_内部番号;
                }

                if (pChip.nチャンネル番号 == 0x9E && !bIsInGoGo)
                {
                    bIsInGoGo = true;

                    var current = ((double)(pChip.db発声時刻ms * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)));
                    var width   = 0;
                    if (TJAPlayer3.Tx.Tokkun_ProgressBar != null)
                    {
                        width = TJAPlayer3.Tx.Tokkun_ProgressBar.szTextureSize.Width;
                    }

                    this.gogoXList.Add((int)(width * (current / length)));
                }
                if (pChip.nチャンネル番号 == 0x9F && bIsInGoGo)
                {
                    bIsInGoGo = false;
                }
            }

            this.n小節の総数 = measureCount;
        }
        // CStage 実装

        public override void On活性化()
        {
            Trace.TraceInformation("曲読み込みステージを活性化します。");
            Trace.Indent();
            try
            {
                this.str曲タイトル     = "";
                this.strSTAGEFILE = "";
                if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
                {
                    this.pfTITLE    = new CPrivateFastFont(new FontFamily(TJAPlayer3.ConfigIni.FontName), TJAPlayer3.Skin.SongLoading_Title_FontSize);
                    this.pfSUBTITLE = new CPrivateFastFont(new FontFamily(TJAPlayer3.ConfigIni.FontName), TJAPlayer3.Skin.SongLoading_SubTitle_FontSize);
                }
                else
                {
                    this.pfTITLE    = new CPrivateFastFont(new FontFamily("MS UI Gothic"), TJAPlayer3.Skin.SongLoading_Title_FontSize);
                    this.pfSUBTITLE = new CPrivateFastFont(new FontFamily("MS UI Gothic"), TJAPlayer3.Skin.SongLoading_SubTitle_FontSize);
                }
                this.nBGM再生開始時刻   = -1;
                this.nBGMの総再生時間ms = 0;
                if (this.sd読み込み音 != null)
                {
                    TJAPlayer3.Sound管理.tサウンドを破棄する(this.sd読み込み音);
                    this.sd読み込み音 = null;
                }

                if (TJAPlayer3.bコンパクトモード)
                {
                    string strDTXファイルパス = TJAPlayer3.strコンパクトモードファイル;

                    CDTX cdtx = new CDTX(strDTXファイルパス, true, 1.0, 0, 0);
                    if (File.Exists(cdtx.strフォルダ名 + @"set.def"))
                    {
                        cdtx = new CDTX(strDTXファイルパス, true, 1.0, 0, 1);
                    }

                    this.str曲タイトル  = cdtx.TITLE;
                    this.strサブタイトル = cdtx.SUBTITLE;

                    cdtx.On非活性化();
                }
                else
                {
                    string strDTXファイルパス = TJAPlayer3.stage選曲.r確定されたスコア.ファイル情報.ファイルの絶対パス;

                    var strフォルダ名 = Path.GetDirectoryName(strDTXファイルパス) + @"\";

                    if (File.Exists(strフォルダ名 + @"set.def"))
                    {
                        var cdtx = new CDTX(strDTXファイルパス, true, 1.0, 0, 1);

                        this.str曲タイトル  = cdtx.TITLE;
                        this.strサブタイトル = cdtx.SUBTITLE;

                        cdtx.On非活性化();
                    }
                    else
                    {
                        var 譜面情報 = TJAPlayer3.stage選曲.r確定されたスコア.譜面情報;
                        this.str曲タイトル  = 譜面情報.タイトル;
                        this.strサブタイトル = 譜面情報.strサブタイトル;
                    }
                }

                // For the moment, detect that we are performing
                // calibration via there being an actual single
                // player and the special song title and subtitle
                // of the .tja used to perform input calibration
                TJAPlayer3.IsPerformingCalibration =
                    !TJAPlayer3.ConfigIni.b太鼓パートAutoPlay &&
                    TJAPlayer3.ConfigIni.nPlayerCount == 1 &&
                    str曲タイトル == "Input Calibration" &&
                    strサブタイトル == "TJAPlayer3 Developers";

                this.strSTAGEFILE = CSkin.Path(@"Graphics\4_SongLoading\Background.png");

                base.On活性化();
            }
            finally
            {
                Trace.TraceInformation("曲読み込みステージの活性化を完了しました。");
                Trace.Unindent();
            }
        }