//public override void Start( EInstrumentPart part ) //{ // this.Start( part, null ); //} public override void Start(EInstrumentPart part, CChip r歓声Chip) { if (part != EInstrumentPart.DRUMS) { for (int i = 0; i < 4; i++) { if ((this.ct進行用[(int)part, i] == null) || this.ct進行用[(int)part, i].b停止中) { this.ct進行用[(int)part, i] = new CCounter(0, 300, 2, CDTXMania.Timer); this.ctWailing炎[(int)part, i] = new CCounter(0, this.frames, this.interval, CDTXMania.Timer); if (CDTXMania.ConfigIni.b歓声を発声する) { if (r歓声Chip != null) { CDTXMania.DTX.tPlayChip(r歓声Chip, CSoundManager.rcPerformanceTimer.nシステム時刻, (int)ELane.BGM, CDTXMania.DTX.nモニタを考慮した音量(EInstrumentPart.UNKNOWN)); return; } CDTXMania.Skin.soundAudience.n位置_次に鳴るサウンド = (part == EInstrumentPart.GUITAR) ? -50 : 50; CDTXMania.Skin.soundAudience.tPlay(); return; } break; } } } }
// メソッド //public override void Start( EInstrumentPart part ) //{ // this.Start( part, null ); //} public override void Start(EInstrumentPart part, CChip r歓声Chip) { if ((part == EInstrumentPart.GUITAR) || (part == EInstrumentPart.BASS)) { int num = (int)part; for (int i = 0; i < 4; i++) { if (this.ct進行用[num, i].b停止中) { this.ct進行用[num, i] = new CCounter(0, 300, 2, CDTXMania.Timer); if (CDTXMania.ConfigIni.b歓声を発声する) { if (r歓声Chip != null) { CDTXMania.DTX.tPlayChip(r歓声Chip, CDTXMania.Timer.nシステム時刻, (int)ELane.BGM, CDTXMania.DTX.nモニタを考慮した音量(EInstrumentPart.UNKNOWN)); return; } CDTXMania.Skin.soundAudience.tPlay(); return; } break; } } } }
public void SkipStart(int n移動開始時刻ms) { for (int i = 0; i < CDTXMania.DTX.listChip.Count; i++) { CChip chip = CDTXMania.DTX.listChip[i]; if (chip.nPlaybackTimeMs > n移動開始時刻ms) { return; } switch (chip.eBGA種別) { case EBGAType.BMP: if ((chip.rBMP != null) && (chip.rBMP.tx画像 != null)) { this.Start(chip.nChannelNumber, chip.rBMP, null, chip.rBMP.n幅, chip.rBMP.n高さ, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, chip.nPlaybackTimeMs); } break; case EBGAType.BMPTEX: if ((chip.rBMPTEX != null) && (chip.rBMPTEX.tx画像 != null)) { this.Start(chip.nChannelNumber, null, chip.rBMPTEX, chip.rBMPTEX.tx画像.szImageSize.Width, chip.rBMPTEX.tx画像.szImageSize.Height, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, chip.nPlaybackTimeMs); } break; case EBGAType.BGA: if (chip.rBGA != null) { this.Start(chip.nChannelNumber, chip.rBMP, chip.rBMPTEX, chip.rBGA.pt画像側右下座標.X - chip.rBGA.pt画像側左上座標.X, chip.rBGA.pt画像側右下座標.Y - chip.rBGA.pt画像側左上座標.Y, 0, 0, chip.rBGA.pt画像側左上座標.X, chip.rBGA.pt画像側左上座標.Y, 0, 0, chip.rBGA.pt表示座標.X, chip.rBGA.pt表示座標.Y, 0, 0, 0, chip.nPlaybackTimeMs); } break; case EBGAType.BGAPAN: if (chip.rBGAPan != null) { this.Start(chip.nChannelNumber, chip.rBMP, chip.rBMPTEX, chip.rBGAPan.sz開始サイズ.Width, chip.rBGAPan.sz開始サイズ.Height, chip.rBGAPan.sz終了サイズ.Width, chip.rBGAPan.sz終了サイズ.Height, chip.rBGAPan.pt画像側開始位置.X, chip.rBGAPan.pt画像側開始位置.Y, chip.rBGAPan.pt画像側終了位置.X, chip.rBGAPan.pt画像側終了位置.Y, chip.rBGAPan.pt表示側開始位置.X, chip.rBGAPan.pt表示側開始位置.Y, chip.rBGAPan.pt表示側終了位置.X, chip.rBGAPan.pt表示側終了位置.Y, chip.n総移動時間, chip.nPlaybackTimeMs); } break; } } }
public override int OnUpdateAndDraw() { if (!base.bNotActivated) { int num; if (base.bJustStartedUpdate) { this.ct登場用 = new CCounter(0, 100, 5, CDTXMania.Timer); //Check result to select the correct sound to play int l_outputSoundEnum = 0; //0: Stage Clear 1: FC 2: EXC bool l_newRecord = false; for (int i = 0; i < 3; i++) { if ((((i != 0) || (CDTXMania.DTX.bチップがある.Drums && !CDTXMania.ConfigIni.bGuitarRevolutionMode)) && ((i != 1) || (CDTXMania.DTX.bチップがある.Guitar && CDTXMania.ConfigIni.bGuitarRevolutionMode))) && ((i != 2) || (CDTXMania.DTX.bチップがある.Bass && CDTXMania.ConfigIni.bGuitarRevolutionMode))) { if (bAuto[i] == false) { if (fPerfect率[i] == 100.0) { l_outputSoundEnum = 2; //Excellent } else if (fPoor率[i] == 0.0 && fMiss率[i] == 0.0) { l_outputSoundEnum = 1; //Full Combo } } if (this.bNewRecordSkill[i] == true) { l_newRecord = true; } } } //Play the corresponding sound if (l_outputSoundEnum == 1) { CDTXMania.Skin.soundFullCombo.tPlay(); } else if (l_outputSoundEnum == 2) { CDTXMania.Skin.soundExcellent.tPlay(); } else { CDTXMania.Skin.soundStageClear.tPlay(); } //Create the delay timer of 150 x 10 = 1500 ms to play New Record if (l_newRecord) { this.ctPlayNewRecord = new CCounter(0, 150, 10, CDTXMania.Timer); } this.actFI.tフェードイン開始(false); base.ePhaseID = CStage.EPhase.Common_FadeIn; base.bJustStartedUpdate = false; } //Draw Background video via CActPerfAVI methods this.actBackgroundVideoAVI.tUpdateAndDraw(); //if ( this.ds背景動画 != null ) // { // this.ds背景動画.t再生開始(); // this.ds背景動画.MediaSeeking.GetPositions(out this.lDshowPosition, out this.lStopPosition); // this.ds背景動画.bループ再生 = true; // if (this.lDshowPosition == this.lStopPosition) // { // this.ds背景動画.MediaSeeking.SetPositions( // DsLong.FromInt64((long)(0)), // AMSeekingSeekingFlags.AbsolutePositioning, // 0, // AMSeekingSeekingFlags.NoPositioning); // } // this.ds背景動画.t現時点における最新のスナップイメージをTextureに転写する( this.txBackground ); // } this.bAnimationComplete = true; if (this.ct登場用.b進行中) { this.ct登場用.tUpdate(); if (this.ct登場用.bReachedEndValue) { this.ct登場用.tStop(); } else { this.bAnimationComplete = false; } } //Play new record if available if (this.ctPlayNewRecord != null && this.ctPlayNewRecord.b進行中) { this.ctPlayNewRecord.tUpdate(); if (this.ctPlayNewRecord.bReachedEndValue) { CDTXMania.Skin.soundNewRecord.tPlay(); this.ctPlayNewRecord.tStop(); } } // 描画 if (this.txBackground != null && this.rBackgroundVideoAVI.avi == null) { this.txBackground.tDraw2D(CDTXMania.app.Device, 0, 0); } if (this.ct登場用.b進行中 && (this.txTopPanel != null)) { double num2 = ((double)this.ct登場用.nCurrentValue) / 100.0; double num3 = Math.Sin(Math.PI / 2 * num2); num = ((int)(this.txTopPanel.szImageSize.Height * num3)) - this.txTopPanel.szImageSize.Height; } else { num = 0; } if (this.txTopPanel != null) { this.txTopPanel.tDraw2D(CDTXMania.app.Device, 0, num); } if (this.txBottomPanel != null) { this.txBottomPanel.tDraw2D(CDTXMania.app.Device, 0, 720 - this.txBottomPanel.szImageSize.Height); } if (this.actResultImage.OnUpdateAndDraw() == 0) { this.bAnimationComplete = false; } if (this.actParameterPanel.OnUpdateAndDraw() == 0) { this.bAnimationComplete = false; } if (this.actRank.OnUpdateAndDraw() == 0) { this.bAnimationComplete = false; } if (base.ePhaseID == CStage.EPhase.Common_FadeIn) { if (this.actFI.OnUpdateAndDraw() != 0) { base.ePhaseID = CStage.EPhase.Common_DefaultState; } } else if ((base.ePhaseID == CStage.EPhase.Common_FadeOut)) //&& ( this.actFO.OnUpdateAndDraw() != 0 ) ) { return((int)this.eReturnValueWhenFadeOutCompleted); } #region [ #24609 2011.3.14 yyagi ランク更新or演奏型スキル更新時、リザルト画像をpngで保存する ] if (this.bAnimationComplete == true && this.bIsCheckedWhetherResultScreenShouldSaveOrNot == false && // #24609 2011.3.14 yyagi; to save result screen in case BestRank or HiSkill. CDTXMania.ConfigIni.bScoreIniを出力する && CDTXMania.ConfigIni.bIsAutoResultCapture) // #25399 2011.6.9 yyagi { CheckAndSaveResultScreen(true); this.bIsCheckedWhetherResultScreenShouldSaveOrNot = true; } #endregion // キー入力 if (CDTXMania.actPluginOccupyingInput == null) { if (CDTXMania.ConfigIni.bドラム打音を発声する && CDTXMania.ConfigIni.bDrumsEnabled) { for (int i = 0; i < 11; i++) { List <STInputEvent> events = CDTXMania.Pad.GetEvents(EInstrumentPart.DRUMS, (EPad)i); if ((events != null) && (events.Count > 0)) { foreach (STInputEvent event2 in events) { if (!event2.b押された) { continue; } CChip rChip = this.rEmptyDrumChip[i]; if (rChip == null) { switch (((EPad)i)) { case EPad.HH: rChip = this.rEmptyDrumChip[7]; if (rChip == null) { rChip = this.rEmptyDrumChip[9]; } break; case EPad.FT: rChip = this.rEmptyDrumChip[4]; break; case EPad.CY: rChip = this.rEmptyDrumChip[8]; break; case EPad.HHO: rChip = this.rEmptyDrumChip[0]; if (rChip == null) { rChip = this.rEmptyDrumChip[9]; } break; case EPad.RD: rChip = this.rEmptyDrumChip[6]; break; case EPad.LC: rChip = this.rEmptyDrumChip[0]; if (rChip == null) { rChip = this.rEmptyDrumChip[7]; } break; } } if (((rChip != null) && (rChip.nChannelNumber >= EChannel.HiHatClose)) && (rChip.nChannelNumber <= EChannel.LeftPedal)) { int nLane = this.nチャンネル0Atoレーン07[rChip.nChannelNumber - EChannel.HiHatClose]; if ((nLane == 1) && ((rChip.nChannelNumber == EChannel.HiHatClose) || ((rChip.nChannelNumber == EChannel.HiHatOpen) && (this.n最後に再生したHHのチャンネル番号 != EChannel.HiHatOpen)))) { CDTXMania.DTX.tStopPlayingWav(this.n最後に再生したHHのWAV番号); this.n最後に再生したHHのWAV番号 = rChip.nIntegerValue_InternalNumber; this.n最後に再生したHHのチャンネル番号 = rChip.nChannelNumber; } CDTXMania.DTX.tPlayChip(rChip, CDTXMania.Timer.nシステム時刻, nLane, CDTXMania.ConfigIni.n手動再生音量, CDTXMania.ConfigIni.b演奏音を強調する.Drums); } } } } } if (((CDTXMania.Pad.bPressedDGB(EPad.CY) || CDTXMania.Pad.bPressed(EInstrumentPart.DRUMS, EPad.RD)) || (CDTXMania.Pad.bPressed(EInstrumentPart.DRUMS, EPad.LC) || CDTXMania.InputManager.Keyboard.bKeyPressed((int)SlimDXKey.Return))) && !this.bAnimationComplete) { this.actFI.tフェードイン完了(); // #25406 2011.6.9 yyagi this.actResultImage.tアニメを完了させる(); this.actParameterPanel.tアニメを完了させる(); this.actRank.tアニメを完了させる(); this.ct登場用.tStop(); } #region [ #24609 2011.4.7 yyagi リザルト画面で[F12]を押下すると、リザルト画像をpngで保存する機能は、CDTXManiaに移管。 ] // if ( CDTXMania.InputManager.Keyboard.bKeyPressed( (int) SlimDXKey.F12 ) && // CDTXMania.ConfigIni.bScoreIniを出力する ) // { // CheckAndSaveResultScreen(false); // this.bIsCheckedWhetherResultScreenShouldSaveOrNot = true; // } #endregion if (base.ePhaseID == CStage.EPhase.Common_DefaultState) { if (CDTXMania.InputManager.Keyboard.bKeyPressed((int)SlimDXKey.Escape)) { CDTXMania.Skin.soundCancel.tPlay(); this.actFO.tStartFadeOut(); base.ePhaseID = CStage.EPhase.Common_FadeOut; this.eReturnValueWhenFadeOutCompleted = EReturnValue.Complete; } if (((CDTXMania.Pad.bPressedDGB(EPad.CY) || CDTXMania.Pad.bPressed(EInstrumentPart.DRUMS, EPad.RD)) || (CDTXMania.Pad.bPressed(EInstrumentPart.DRUMS, EPad.LC) || CDTXMania.InputManager.Keyboard.bKeyPressed((int)SlimDXKey.Return))) && this.bAnimationComplete) { CDTXMania.Skin.soundCancel.tPlay(); base.ePhaseID = CStage.EPhase.Common_FadeOut; this.eReturnValueWhenFadeOutCompleted = EReturnValue.Complete; } } } } return(0); }
public abstract void Start(EInstrumentPart part, CChip r歓声Chip);