Esempio n. 1
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
        }
Esempio n. 2
0
 protected override void tUpdateAndDraw_Chip_NoSound_Drums(CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip)
 {
     if (!pChip.bHit && (pChip.nDistanceFromBar.Drums < 0))
     {
         pChip.bHit = true;
     }
 }
Esempio n. 3
0
        /// <summary>
        /// Viewer関連の設定のみを更新して、Config.iniに書き出す
        /// </summary>
        public void tUpdateConfigIni()
        {
            CConfigIni cc   = new CConfigIni();
            string     path = CDTXMania.strEXEのあるフォルダ + "Config.ini";

            if (File.Exists(path))
            {
                FileInfo fi = new FileInfo(path);
                if (fi.Length > 0)                      // Config.iniが0byteだったなら、読み込まない
                {
                    try
                    {
                        cc.tファイルから読み込み(path);
                    }
                    catch
                    {
                        //ConfigIni = new CConfigIni();	// 存在してなければ新規生成
                    }
                }
                fi = null;
            }

            cc.nViewerScrollSpeed     = CDTXMania.ConfigIni.n譜面スクロール速度;
            cc.bViewerShowDebugStatus = CDTXMania.ConfigIni.b演奏情報を表示する;
            cc.bViewerVSyncWait       = CDTXMania.ConfigIni.b垂直帰線待ちを行う;
            cc.bViewerTimeStretch     = CDTXMania.ConfigIni.bTimeStretch;
            cc.bViewerDrums有効         = true;

            cc.t書き出し(path);
        }
Esempio n. 4
0
        /// <summary>
        /// Viewer関連の設定のみを更新して、Config.iniに書き出す
        /// </summary>
        public void tUpdateConfigIni()
        {
            CConfigIni cc   = new CConfigIni();
            string     path = CDTXMania.strEXEのあるフォルダ + "Config.ini";

            if (File.Exists(path))
            {
                FileInfo fi = new FileInfo(path);
                if (fi.Length > 0)                      // Config.iniが0byteだったなら、読み込まない
                {
                    try
                    {
                        cc.tファイルから読み込み(path);
                    }
                    catch (Exception e)
                    {
                        //ConfigIni = new CConfigIni();	// 存在してなければ新規生成
                        Trace.TraceError(e.ToString());
                        Trace.TraceError("例外が発生しましたが処理を継続します。 (825f9ba6-9164-4f2e-8c41-edf4d73c06c9)");
                    }
                }
                fi = null;
            }

            cc.nViewerScrollSpeed     = CDTXMania.ConfigIni.n譜面スクロール速度;
            cc.bViewerShowDebugStatus = CDTXMania.ConfigIni.b演奏情報を表示する;
            cc.bViewerVSyncWait       = CDTXMania.ConfigIni.b垂直帰線待ちを行う;
            cc.bViewerTimeStretch     = CDTXMania.ConfigIni.bTimeStretch;
            cc.bViewerDrums有効         = true;

            cc.t書き出し(path);
        }
        internal static void Bind(CConfigIni configIni, SoundGroupLevelController soundGroupLevelController)
        {
            soundGroupLevelController.SetLevel(ESoundGroup.SoundEffect, configIni.SoundEffectLevel);
            soundGroupLevelController.SetLevel(ESoundGroup.Voice, configIni.VoiceLevel);
            soundGroupLevelController.SetLevel(ESoundGroup.SongPreview, configIni.SongPreviewLevel);
            soundGroupLevelController.SetLevel(ESoundGroup.SongPlayback, configIni.SongPlaybackLevel);
            soundGroupLevelController.SetKeyboardSoundLevelIncrement(configIni.KeyboardSoundLevelIncrement);

            configIni.PropertyChanged += (sender, args) =>
            {
                switch (args.PropertyName)
                {
                case nameof(CConfigIni.SoundEffectLevel):
                    soundGroupLevelController.SetLevel(ESoundGroup.SoundEffect, configIni.SoundEffectLevel);
                    break;

                case nameof(CConfigIni.VoiceLevel):
                    soundGroupLevelController.SetLevel(ESoundGroup.Voice, configIni.VoiceLevel);
                    break;

                case nameof(CConfigIni.SongPreviewLevel):
                    soundGroupLevelController.SetLevel(ESoundGroup.SongPreview, configIni.SongPreviewLevel);
                    break;

                case nameof(CConfigIni.SongPlaybackLevel):
                    soundGroupLevelController.SetLevel(ESoundGroup.SongPlayback, configIni.SongPlaybackLevel);
                    break;

                case nameof(CConfigIni.KeyboardSoundLevelIncrement):
                    soundGroupLevelController.SetKeyboardSoundLevelIncrement(configIni.KeyboardSoundLevelIncrement);
                    break;
                }
            };

            soundGroupLevelController.LevelChanged += (sender, args) =>
            {
                switch (args.SoundGroup)
                {
                case ESoundGroup.SoundEffect:
                    configIni.SoundEffectLevel = args.Level;
                    break;

                case ESoundGroup.Voice:
                    configIni.VoiceLevel = args.Level;
                    break;

                case ESoundGroup.SongPreview:
                    configIni.SongPreviewLevel = args.Level;
                    break;

                case ESoundGroup.SongPlayback:
                    configIni.SongPlaybackLevel = args.Level;
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            };
        }
Esempio n. 6
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));
     }
 }
Esempio n. 7
0
 public override int OnUpdateAndDraw()
 {
     if (!base.bNotActivated)
     {
         Device     device    = CDTXMania.app.Device;
         CConfigIni configIni = CDTXMania.ConfigIni;
         if (this.txOptionPanel != null)
         {
             int drums = configIni.nScrollSpeed.Drums;
             if (drums > 15)
             {
                 drums = 15;
             }
             this.txOptionPanel.tDraw2D(device, 0x2e2, 14, this.rc譜面スピード[drums]);
             drums = configIni.nScrollSpeed.Guitar;
             if (drums > 15)
             {
                 drums = 15;
             }
             this.txOptionPanel.tDraw2D(device, 0x2e2, 0x20, this.rc譜面スピード[drums]);
             drums = configIni.nScrollSpeed.Bass;
             if (drums > 15)
             {
                 drums = 15;
             }
             this.txOptionPanel.tDraw2D(device, 0x2e2, 50, this.rc譜面スピード[drums]);
             this.txOptionPanel.tDraw2D(device, 0x312, 14, this.rcHS[(configIni.bHidden.Drums ? 1 : 0) + (configIni.bSudden.Drums ? 2 : 0)]);
             this.txOptionPanel.tDraw2D(device, 0x312, 0x20, this.rcHS[(configIni.bHidden.Guitar ? 1 : 0) + (configIni.bSudden.Guitar ? 2 : 0)]);
             this.txOptionPanel.tDraw2D(device, 0x312, 50, this.rcHS[(configIni.bHidden.Bass ? 1 : 0) + (configIni.bSudden.Bass ? 2 : 0)]);
             this.txOptionPanel.tDraw2D(device, 0x342, 14, this.rcDark[(int)configIni.eDark]);
             this.txOptionPanel.tDraw2D(device, 0x342, 0x20, this.rcDark[(int)configIni.eDark]);
             this.txOptionPanel.tDraw2D(device, 0x342, 50, this.rcDark[(int)configIni.eDark]);
             this.txOptionPanel.tDraw2D(device, 0x372, 14, this.rcReverse[configIni.bReverse.Drums ? 1 : 0]);
             this.txOptionPanel.tDraw2D(device, 0x372, 0x20, this.rcReverse[configIni.bReverse.Guitar ? 1 : 0]);
             this.txOptionPanel.tDraw2D(device, 0x372, 50, this.rcReverse[configIni.bReverse.Bass ? 1 : 0]);
             this.txOptionPanel.tDraw2D(device, 930, 14, this.rcPosition[(int)configIni.JudgementStringPosition.Drums]);
             this.txOptionPanel.tDraw2D(device, 930, 0x20, this.rcPosition[(int)configIni.JudgementStringPosition.Guitar]);
             this.txOptionPanel.tDraw2D(device, 930, 50, this.rcPosition[(int)configIni.JudgementStringPosition.Bass]);
             this.txOptionPanel.tDraw2D(device, 0x3d2, 14, this.rcTight[configIni.bTight ? 1 : 0]);
             this.txOptionPanel.tDraw2D(device, 0x3d2, 0x20, this.rcRandom[(int)configIni.eRandom.Guitar]);
             this.txOptionPanel.tDraw2D(device, 0x3d2, 50, this.rcRandom[(int)configIni.eRandom.Bass]);
             this.txOptionPanel.tDraw2D(device, 0x402, 14, this.rcComboPos[(int)configIni.ドラムコンボ文字の表示位置]);
             this.txOptionPanel.tDraw2D(device, 0x402, 0x20, this.rcLight[configIni.bLight.Guitar ? 1 : 0]);
             this.txOptionPanel.tDraw2D(device, 0x402, 50, this.rcLight[configIni.bLight.Bass ? 1 : 0]);
             this.txOptionPanel.tDraw2D(device, 0x432, 0x20, this.rcLeft[configIni.bLeft.Guitar ? 1 : 0]);
             this.txOptionPanel.tDraw2D(device, 0x432, 50, this.rcLeft[configIni.bLeft.Bass ? 1 : 0]);
         }
     }
     return(0);
 }
Esempio n. 8
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());
                    }
                }
            }
        }
Esempio n. 9
0
        protected override void tDraw_LoopLine(CConfigIni configIni, bool bIsEnd)
        {
            const double speed             = 286;   // BPM150の時の1小節の長さ[dot]
            double       ScrollSpeedGuitar = (this.actScrollSpeed.db現在の譜面スクロール速度.Guitar + 1.0) * 0.5 * 0.5 * 37.5 * speed / 60000.0;
            double       ScrollSpeedBass   = (this.actScrollSpeed.db現在の譜面スクロール速度.Bass + 1.0) * 0.5 * 0.5 * 37.5 * speed / 60000.0;

            int nDistanceFromBarGuitar = (int)(((bIsEnd ? this.LoopEndMs : this.LoopBeginMs) - CSoundManager.rcPerformanceTimer.nCurrentTime) * ScrollSpeedGuitar);
            int nDistanceFromBarBass   = (int)(((bIsEnd ? this.LoopEndMs : this.LoopBeginMs) - CSoundManager.rcPerformanceTimer.nCurrentTime) * ScrollSpeedBass);

            if (configIni.bGuitarEnabled)
            {
                int y = CDTXMania.ConfigIni.bReverse.Guitar ? ((this.nJudgeLinePosY.Guitar - nDistanceFromBarGuitar) + 0) : ((this.nJudgeLinePosY.Guitar + nDistanceFromBarGuitar) + 9);
                if ((CDTXMania.DTX.bチップがある.Guitar && (y > 104)) && ((y < 670) && (this.txChip != null)))
                {
                    //Display Loop Begin/Loop End text
                    CDTXMania.actDisplayString.tPrint(60, y - 16, CCharacterConsole.EFontType.White, (bIsEnd ? "End loop" : "Begin loop"));

                    if (CDTXMania.ConfigIni.nLaneDisp.Guitar == 0 || CDTXMania.ConfigIni.nLaneDisp.Guitar == 1)
                    {
                        this.txChip.tDraw2D(CDTXMania.app.Device, 88, y - 1, new Rectangle(0, 20, 193, 2));
                        this.txChip.tDraw2D(CDTXMania.app.Device, 88, y + 1, new Rectangle(0, 20, 193, 2));
                    }
                }
                y = CDTXMania.ConfigIni.bReverse.Bass ? ((this.nJudgeLinePosY.Bass - nDistanceFromBarBass) + 0) : ((this.nJudgeLinePosY.Bass + nDistanceFromBarBass) + 9);
                if ((CDTXMania.DTX.bチップがある.Bass && (y > 104)) && ((y < 670) && (this.txChip != null)))
                {
                    //Display Loop Begin/Loop End text
                    CDTXMania.actDisplayString.tPrint(930, y - 16, CCharacterConsole.EFontType.White, (bIsEnd ? "End loop" : "Begin loop"));

                    if (CDTXMania.ConfigIni.nLaneDisp.Bass == 0 || CDTXMania.ConfigIni.nLaneDisp.Bass == 1)
                    {
                        this.txChip.tDraw2D(CDTXMania.app.Device, 959, y - 1, new Rectangle(0, 20, 193, 2));
                        this.txChip.tDraw2D(CDTXMania.app.Device, 959, y + 1, new Rectangle(0, 20, 193, 2));
                    }
                }
            }
        }
Esempio n. 10
0
        internal static void Bind(CConfigIni configIni, SongGainController songGainController)
        {
            songGainController.ApplyLoudnessMetadata = configIni.ApplyLoudnessMetadata;
            songGainController.TargetLoudness        = new Lufs(configIni.TargetLoudness);
            songGainController.ApplySongVol          = configIni.ApplySongVol;

            configIni.PropertyChanged += (sender, args) =>
            {
                switch (args.PropertyName)
                {
                case nameof(CConfigIni.ApplyLoudnessMetadata):
                    songGainController.ApplyLoudnessMetadata = configIni.ApplyLoudnessMetadata;
                    break;

                case nameof(CConfigIni.TargetLoudness):
                    songGainController.TargetLoudness = new Lufs(configIni.TargetLoudness);
                    break;

                case nameof(CConfigIni.ApplySongVol):
                    songGainController.ApplySongVol = configIni.ApplySongVol;
                    break;
                }
            };
        }
Esempio n. 11
0
 public override int On進行描画()
 {
     if (!base.b活性化してない)
     {
         Device     device    = CDTXMania.app.Device;
         CConfigIni configIni = CDTXMania.ConfigIni;
         if (this.txオプションパネル != null)
         {
             #region [ ScrollSpeed ]
             int drums = configIni.n譜面スクロール速度.Drums;
             if (drums > 15)
             {
                 drums = 15;
             }
             this.txオプションパネル.t2D描画(device, 0x171, 12, this.rc譜面スピード[drums]);
             int guitar = configIni.n譜面スクロール速度.Guitar;
             if (guitar > 15)
             {
                 guitar = 15;
             }
             this.txオプションパネル.t2D描画(device, 0x171, 0x18, this.rc譜面スピード[guitar]);
             int bass = configIni.n譜面スクロール速度.Bass;
             if (bass > 15)
             {
                 bass = 15;
             }
             this.txオプションパネル.t2D描画(device, 0x171, 0x24, this.rc譜面スピード[bass]);
             #endregion
             #region [ Sud/Hid/Invisible ]
             this.txオプションパネル.t2D描画(device, 0x189, 12, this.rcHS[(configIni.bHidden.Drums ? 1 : 0) + (configIni.bSudden.Drums ? 2 : 0) +
                                                                (configIni.eInvisible.Drums == EInvisible.SEMI ? 4 : 0) +
                                                                (configIni.eInvisible.Drums == EInvisible.FULL ? 5 : 0)]);
             this.txオプションパネル.t2D描画(device, 0x189, 0x18, this.rcHS[(configIni.bHidden.Guitar ? 1 : 0) + (configIni.bSudden.Guitar ? 2 : 0) +
                                                                  (configIni.eInvisible.Guitar == EInvisible.SEMI ? 4 : 0) +
                                                                  (configIni.eInvisible.Guitar == EInvisible.FULL ? 5 : 0)]);
             this.txオプションパネル.t2D描画(device, 0x189, 0x24, this.rcHS[(configIni.bHidden.Bass ? 1 : 0) + (configIni.bSudden.Bass ? 2 : 0) +
                                                                  (configIni.eInvisible.Bass == EInvisible.SEMI ? 4 : 0) +
                                                                  (configIni.eInvisible.Bass == EInvisible.FULL ? 5 : 0)]);
             #endregion
             #region [ Dark ]
             this.txオプションパネル.t2D描画(device, 0x1a1, 12, this.rcDark[(int)configIni.eDark]);
             this.txオプションパネル.t2D描画(device, 0x1a1, 0x18, this.rcDark[(int)configIni.eDark]);
             this.txオプションパネル.t2D描画(device, 0x1a1, 0x24, this.rcDark[(int)configIni.eDark]);
             #endregion
             #region [ Reverse ]
             this.txオプションパネル.t2D描画(device, 0x1b9, 12, this.rcReverse[configIni.bReverse.Drums ? 1 : 0]);
             this.txオプションパネル.t2D描画(device, 0x1b9, 0x18, this.rcReverse[configIni.bReverse.Guitar ? 1 : 0]);
             this.txオプションパネル.t2D描画(device, 0x1b9, 0x24, this.rcReverse[configIni.bReverse.Bass ? 1 : 0]);
             #endregion
             #region [ Position ]
             this.txオプションパネル.t2D描画(device, 0x1d1, 12, this.rcPosition[(int)configIni.判定文字表示位置.Drums]);
             this.txオプションパネル.t2D描画(device, 0x1d1, 0x18, this.rcPosition[(int)configIni.判定文字表示位置.Guitar]);
             this.txオプションパネル.t2D描画(device, 0x1d1, 0x24, this.rcPosition[(int)configIni.判定文字表示位置.Bass]);
             #endregion
             #region [ Tight ]
             this.txオプションパネル.t2D描画(device, 0x1e9, 12, this.rcTight[configIni.bTight ? 1 : 0]);
             #endregion
             #region [ Random ]
             this.txオプションパネル.t2D描画(device, 0x1e9, 0x18, this.rcRandom[(int)configIni.eRandom.Guitar]);
             this.txオプションパネル.t2D描画(device, 0x1e9, 0x24, this.rcRandom[(int)configIni.eRandom.Bass]);
             #endregion
             #region [ ComboPosition ]
             this.txオプションパネル.t2D描画(device, 0x201, 12, new Rectangle(0, 0, 0, 0));
             #endregion
             #region [ Light ]
             this.txオプションパネル.t2D描画(device, 0x201, 0x18, this.rcLight[configIni.bLight.Guitar ? 1 : 0]);
             this.txオプションパネル.t2D描画(device, 0x201, 0x24, this.rcLight[configIni.bLight.Bass ? 1 : 0]);
             #endregion
             #region [ Left ]
             this.txオプションパネル.t2D描画(device, 0x219, 0x18, this.rcLeft[configIni.bLeft.Guitar ? 1 : 0]);
             this.txオプションパネル.t2D描画(device, 0x219, 0x24, this.rcLeft[configIni.bLeft.Bass ? 1 : 0]);
             #endregion
         }
     }
     return(0);
 }
Esempio n. 12
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);
            }
        }
Esempio n. 13
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));
     }
 }
Esempio n. 14
0
        // コンストラクタ

        internal CPad(CConfigIni configIni, CInput管理 mgrInput)
        {
            this.rConfigIni = configIni;
            this.rInput管理   = mgrInput;
            this.st検知したデバイス.Clear();
        }
Esempio n. 15
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));
            }
        }
Esempio n. 16
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);
 }
Esempio n. 17
0
        // コンストラクタ

        internal CPad(CConfigIni configIni, CInputManager mgrInput)
        {
            this.rConfigIni    = configIni;
            this.rInputManager = mgrInput;
            this.stDetectedDevices.Clear();
        }