private bool tプレビュー画像の指定があれば構築する() { Cスコア cスコア = TJAPlayer4.stage選曲.r現在選択中のスコア; if ((cスコア == null) || string.IsNullOrEmpty(cスコア.譜面情報.Preimage)) { return(false); } string str = cスコア.ファイル情報.フォルダの絶対パス + cスコア.譜面情報.Preimage; if (!str.Equals(this.str現在のファイル名)) { TJAPlayer4.tテクスチャの解放(ref this.txプレビュー画像); this.str現在のファイル名 = str; if (!File.Exists(this.str現在のファイル名)) { Trace.TraceWarning("ファイルが存在しません。({0})", new object[] { this.str現在のファイル名 }); return(false); } this.txプレビュー画像 = TJAPlayer4.tテクスチャの生成(this.str現在のファイル名, false); if (this.txプレビュー画像 != null) { this.r表示するプレビュー画像 = this.txプレビュー画像; } else { this.r表示するプレビュー画像 = this.txプレビュー画像がないときの画像; } } return(true); }
public override void OnManagedリソースの解放() { if (!base.b活性化してない) { TJAPlayer4.tテクスチャの解放(ref this.txDANGER); base.OnManagedリソースの解放(); } }
// CActivity 実装 public override void On非活性化() { if (!base.b活性化してない) { TJAPlayer4.tテクスチャの解放(ref this.txオプションパネル); base.On非活性化(); } }
public override void OnManagedリソースの解放() { if (!base.b活性化してない) { TJAPlayer4.tテクスチャの解放(ref this.txArtist); TJAPlayer4.tテクスチャの解放(ref this.txComment); base.OnManagedリソースの解放(); } }
public override void OnManagedリソースの解放() { if (!base.b活性化してない) { //CDTXMania.tテクスチャの解放( ref this.txパネル本体 ); TJAPlayer4.tテクスチャの解放(ref this.tx文字列パネル); base.OnManagedリソースの解放(); } }
public override void OnManagedリソースの解放() { if (!base.b活性化してない) { TJAPlayer4.tテクスチャの解放(ref this.txInfo_Back); TJAPlayer4.tテクスチャの解放(ref this.txInfo[0]); TJAPlayer4.tテクスチャの解放(ref this.txInfo[1]); base.OnManagedリソースの解放(); } }
public override void OnManagedリソースの解放() { if (!base.b活性化してない) { TJAPlayer4.tテクスチャの解放(ref this.tx背景); TJAPlayer4.tテクスチャの解放(ref this.txタイトル); //CDTXMania.tテクスチャの解放( ref this.txSongnamePlate ); TJAPlayer4.tテクスチャの解放(ref this.txサブタイトル); base.OnManagedリソースの解放(); } }
public override void On非活性化() { TJAPlayer4.tテクスチャの解放(ref this.txArtist); TJAPlayer4.tテクスチャの解放(ref this.txComment); if (this.ft描画用フォント != null) { this.ft描画用フォント.Dispose(); this.ft描画用フォント = null; } this.ctComment = null; base.On非活性化(); }
public override void OnManagedリソースの解放() { if (!base.b活性化してない) { TJAPlayer4.t安全にDisposeする(ref this.pfMusicName); TJAPlayer4.tテクスチャの解放(ref this.txMusicName); TJAPlayer4.t安全にDisposeする(ref this.pfStageText); TJAPlayer4.tテクスチャの解放(ref this.txStageText); base.OnManagedリソースの解放(); } }
public override void OnManagedリソースの解放() { if (!base.b活性化してない) { TJAPlayer4.tテクスチャの解放(ref this.txPanel); TJAPlayer4.tテクスチャの解放(ref this.txMusicName); TJAPlayer4.tテクスチャの解放(ref this.txGENRE); TJAPlayer4.tテクスチャの解放(ref this.txPanel); TJAPlayer4.tテクスチャの解放(ref this.tx歌詞テクスチャ); TJAPlayer4.t安全にDisposeする(ref this.pfMusicName); TJAPlayer4.t安全にDisposeする(ref this.pf歌詞フォント); base.OnManagedリソースの解放(); } }
public override void OnManagedリソースの解放() { if (!base.b活性化してない) { TJAPlayer4.tテクスチャの解放(ref this.txパネル本体); TJAPlayer4.tテクスチャの解放(ref this.txセンサ); TJAPlayer4.tテクスチャの解放(ref this.txセンサ光); TJAPlayer4.tテクスチャの解放(ref this.txプレビュー画像); TJAPlayer4.tテクスチャの解放(ref this.txプレビュー画像がないときの画像); if (this.sfAVI画像 != null) { this.sfAVI画像.Dispose(); this.sfAVI画像 = null; } base.OnManagedリソースの解放(); } }
private bool tプレビュー画像の指定があれば構築する() { if (string.IsNullOrEmpty(TJAPlayer4.DTX[0].PREIMAGE)) { return(false); } TJAPlayer4.tテクスチャの解放(ref this.txリザルト画像); this.r表示するリザルト画像 = null; string path = TJAPlayer4.DTX[0].strフォルダ名 + TJAPlayer4.DTX[0].PREIMAGE; if (!File.Exists(path)) { Trace.TraceWarning("ファイルが存在しません。({0})", new object[] { path }); return(false); } this.txリザルト画像 = TJAPlayer4.tテクスチャの生成(path); this.r表示するリザルト画像 = this.txリザルト画像; return(this.r表示するリザルト画像 != null); }
public override void OnManagedリソースの解放() // OPTIONと同じ(COnfig.iniの書き出しタイミングのみ異なるが、無視して良い) { if (!base.b活性化してない) { //CDTXMania.tテクスチャの解放( ref this.tx背景 ); //CDTXMania.tテクスチャの解放( ref this.tx上部パネル ); //CDTXMania.tテクスチャの解放( ref this.tx下部パネル ); //CDTXMania.tテクスチャの解放( ref this.txMenuカーソル ); TJAPlayer4.tテクスチャの解放(ref this.tx説明文パネル); for (int i = 0; i < txMenuItemLeft.GetLength(0); i++) { txMenuItemLeft[i, 0].Dispose(); txMenuItemLeft[i, 0] = null; txMenuItemLeft[i, 1].Dispose(); txMenuItemLeft[i, 1] = null; } txMenuItemLeft = null; base.OnManagedリソースの解放(); } }
public override void OnManagedリソースの解放() { if (this.b活性化してない) { return; } TJAPlayer4.tテクスチャの解放(ref this.tx背景); TJAPlayer4.tテクスチャの解放(ref this.txヘッダー); TJAPlayer4.tテクスチャの解放(ref this.txフッター); TJAPlayer4.tテクスチャの解放(ref this.tx説明背景); TJAPlayer4.tテクスチャの解放(ref this.tx説明1); TJAPlayer4.t安全にDisposeする(ref this.soundSelectAnnounce); for (int i = 0; i < (int)Difficulty.Total; i++) { TJAPlayer4.tテクスチャの解放(ref this.tx踏み台[i]); } base.OnManagedリソースの解放(); }
public void DisposeTexture() { TJAPlayer4.tテクスチャの解放(ref Title_Background); TJAPlayer4.tテクスチャの解放(ref Title_Menu); #region 共通 TJAPlayer4.tテクスチャの解放(ref Tile_Black); TJAPlayer4.tテクスチャの解放(ref Tile_White); TJAPlayer4.tテクスチャの解放(ref Menu_Title); TJAPlayer4.tテクスチャの解放(ref Menu_Highlight); TJAPlayer4.tテクスチャの解放(ref Enum_Song); TJAPlayer4.tテクスチャの解放(ref Scanning_Loudness); TJAPlayer4.tテクスチャの解放(ref Overlay); for (int i = 0; i < 2; i++) { TJAPlayer4.tテクスチャの解放(ref NamePlate[i]); } #endregion #region 1_タイトル画面 TJAPlayer4.tテクスチャの解放(ref Title_Background); TJAPlayer4.tテクスチャの解放(ref Title_Menu); #endregion #region 2_コンフィグ画面 TJAPlayer4.tテクスチャの解放(ref Config_Background); TJAPlayer4.tテクスチャの解放(ref Config_Cursor); TJAPlayer4.tテクスチャの解放(ref Config_ItemBox); TJAPlayer4.tテクスチャの解放(ref Config_Arrow); TJAPlayer4.tテクスチャの解放(ref Config_KeyAssign); TJAPlayer4.tテクスチャの解放(ref Config_Font); TJAPlayer4.tテクスチャの解放(ref Config_Font_Bold); TJAPlayer4.tテクスチャの解放(ref Config_Enum_Song); #endregion #region 3_選曲画面 TJAPlayer4.tテクスチャの解放(ref SongSelect_Background); TJAPlayer4.tテクスチャの解放(ref SongSelect_Header); TJAPlayer4.tテクスチャの解放(ref SongSelect_Footer); TJAPlayer4.tテクスチャの解放(ref SongSelect_Difficulty); TJAPlayer4.tテクスチャの解放(ref SongSelect_Auto); TJAPlayer4.tテクスチャの解放(ref SongSelect_Level); TJAPlayer4.tテクスチャの解放(ref SongSelect_Branch); TJAPlayer4.tテクスチャの解放(ref SongSelect_Branch_Text); TJAPlayer4.tテクスチャの解放(ref SongSelect_Frame_Score); TJAPlayer4.tテクスチャの解放(ref SongSelect_Frame_Box); TJAPlayer4.tテクスチャの解放(ref SongSelect_Frame_BackBox); TJAPlayer4.tテクスチャの解放(ref SongSelect_Frame_Random); TJAPlayer4.tテクスチャの解放(ref SongSelect_Score_Select); TJAPlayer4.tテクスチャの解放(ref SongSelect_GenreText); TJAPlayer4.tテクスチャの解放(ref SongSelect_Cursor_Left); TJAPlayer4.tテクスチャの解放(ref SongSelect_Cursor_Right); for (int i = 0; i < SongSelect_Bar_Center.Length; i++) { TJAPlayer4.tテクスチャの解放(ref SongSelect_Bar_Center[i]); } for (int i = 0; i < SongSelect_Bar_Genre.Length; i++) { TJAPlayer4.tテクスチャの解放(ref SongSelect_Bar_Genre[i]); } for (int i = 0; i < (int)Difficulty.Total; i++) { TJAPlayer4.tテクスチャの解放(ref SongSelect_ScoreWindow[i]); } for (int i = 0; i < SongSelect_GenreBack.Length; i++) { TJAPlayer4.tテクスチャの解放(ref SongSelect_GenreBack[i]); } TJAPlayer4.tテクスチャの解放(ref SongSelect_ScoreWindow_Text); #endregion #region 4_読み込み画面 TJAPlayer4.tテクスチャの解放(ref SongLoading_Plate); TJAPlayer4.tテクスチャの解放(ref SongLoading_FadeIn); TJAPlayer4.tテクスチャの解放(ref SongLoading_FadeOut); #endregion #region 5_演奏画面 #region 共通 TJAPlayer4.tテクスチャの解放(ref Notes); TJAPlayer4.tテクスチャの解放(ref Judge_Frame); TJAPlayer4.tテクスチャの解放(ref SENotes); TJAPlayer4.tテクスチャの解放(ref Notes_Arm); TJAPlayer4.tテクスチャの解放(ref Judge); TJAPlayer4.tテクスチャの解放(ref Judge_Meter); TJAPlayer4.tテクスチャの解放(ref Bar); TJAPlayer4.tテクスチャの解放(ref Bar_Branch); #endregion #region キャラクター for (int nPlayer = 0; nPlayer < 2; nPlayer++) { for (int i = 0; i < TJAPlayer4.Skin.Game_Chara_Ptn_Normal[nPlayer]; i++) { TJAPlayer4.tテクスチャの解放(ref Chara_Normal[nPlayer][i]); } for (int i = 0; i < TJAPlayer4.Skin.Game_Chara_Ptn_Clear[nPlayer]; i++) { TJAPlayer4.tテクスチャの解放(ref Chara_Normal_Cleared[nPlayer][i]); TJAPlayer4.tテクスチャの解放(ref Chara_Normal_Maxed[nPlayer][i]); } for (int i = 0; i < TJAPlayer4.Skin.Game_Chara_Ptn_GoGo[nPlayer]; i++) { TJAPlayer4.tテクスチャの解放(ref Chara_GoGoTime[nPlayer][i]); TJAPlayer4.tテクスチャの解放(ref Chara_GoGoTime_Maxed[nPlayer][i]); } for (int i = 0; i < TJAPlayer4.Skin.Game_Chara_Ptn_10combo[nPlayer]; i++) { TJAPlayer4.tテクスチャの解放(ref Chara_10Combo[nPlayer][i]); } for (int i = 0; i < TJAPlayer4.Skin.Game_Chara_Ptn_10combo_Max[nPlayer]; i++) { TJAPlayer4.tテクスチャの解放(ref Chara_10Combo_Maxed[nPlayer][i]); } for (int i = 0; i < TJAPlayer4.Skin.Game_Chara_Ptn_GoGoStart[nPlayer]; i++) { TJAPlayer4.tテクスチャの解放(ref Chara_GoGoStart[nPlayer][i]); } for (int i = 0; i < TJAPlayer4.Skin.Game_Chara_Ptn_GoGoStart_Max[nPlayer]; i++) { TJAPlayer4.tテクスチャの解放(ref Chara_GoGoStart_Maxed[nPlayer][i]); } for (int i = 0; i < TJAPlayer4.Skin.Game_Chara_Ptn_ClearIn[nPlayer]; i++) { TJAPlayer4.tテクスチャの解放(ref Chara_Become_Cleared[nPlayer][i]); } for (int i = 0; i < TJAPlayer4.Skin.Game_Chara_Ptn_SoulIn[nPlayer]; i++) { TJAPlayer4.tテクスチャの解放(ref Chara_Become_Maxed[nPlayer][i]); } for (int i = 0; i < TJAPlayer4.Skin.Game_Chara_Ptn_Balloon_Breaking[nPlayer]; i++) { TJAPlayer4.tテクスチャの解放(ref Chara_Balloon_Breaking[nPlayer][i]); } for (int i = 0; i < TJAPlayer4.Skin.Game_Chara_Ptn_Balloon_Broke[nPlayer]; i++) { TJAPlayer4.tテクスチャの解放(ref Chara_Balloon_Broke[nPlayer][i]); } for (int i = 0; i < TJAPlayer4.Skin.Game_Chara_Ptn_Balloon_Miss[nPlayer]; i++) { TJAPlayer4.tテクスチャの解放(ref Chara_Balloon_Miss[nPlayer][i]); } } #endregion #region り子 for (int i = 0; i < 5; i++) { for (int p = 0; p < TJAPlayer4.Skin.Game_Dancer_Ptn; p++) { TJAPlayer4.tテクスチャの解放(ref Dancer[i][p]); } } #endregion #region モブ for (int i = 0; i < TJAPlayer4.Skin.Game_Mob_Ptn; i++) { TJAPlayer4.tテクスチャの解放(ref Mob[i]); } #endregion #region フッター TJAPlayer4.tテクスチャの解放(ref Mob_Footer); #endregion #region 背景 TJAPlayer4.tテクスチャの解放(ref Background); TJAPlayer4.tテクスチャの解放(ref Background_Up[0]); TJAPlayer4.tテクスチャの解放(ref Background_Up[1]); TJAPlayer4.tテクスチャの解放(ref Background_Up_Clear[0]); TJAPlayer4.tテクスチャの解放(ref Background_Up_Clear[1]); TJAPlayer4.tテクスチャの解放(ref Background_Down); TJAPlayer4.tテクスチャの解放(ref Background_Down_Clear); TJAPlayer4.tテクスチャの解放(ref Background_Down_Scroll); #endregion #region 太鼓 TJAPlayer4.tテクスチャの解放(ref Taiko_Background[0]); TJAPlayer4.tテクスチャの解放(ref Taiko_Background[1]); TJAPlayer4.tテクスチャの解放(ref Taiko_Frame[0]); TJAPlayer4.tテクスチャの解放(ref Taiko_Frame[1]); TJAPlayer4.tテクスチャの解放(ref Taiko_PlayerNumber[0]); TJAPlayer4.tテクスチャの解放(ref Taiko_PlayerNumber[1]); TJAPlayer4.tテクスチャの解放(ref Taiko_NamePlate[0]); TJAPlayer4.tテクスチャの解放(ref Taiko_NamePlate[1]); TJAPlayer4.tテクスチャの解放(ref Taiko_Base); TJAPlayer4.tテクスチャの解放(ref Taiko_Don_Left); TJAPlayer4.tテクスチャの解放(ref Taiko_Don_Right); TJAPlayer4.tテクスチャの解放(ref Taiko_Ka_Left); TJAPlayer4.tテクスチャの解放(ref Taiko_Ka_Right); TJAPlayer4.tテクスチャの解放(ref Taiko_LevelUp); TJAPlayer4.tテクスチャの解放(ref Taiko_LevelDown); TJAPlayer4.tテクスチャの解放(ref Couse_Symbol); TJAPlayer4.tテクスチャの解放(ref Taiko_Score[0]); TJAPlayer4.tテクスチャの解放(ref Taiko_Score[1]); TJAPlayer4.tテクスチャの解放(ref Taiko_Score[2]); TJAPlayer4.tテクスチャの解放(ref Taiko_Combo[0]); TJAPlayer4.tテクスチャの解放(ref Taiko_Combo[1]); TJAPlayer4.tテクスチャの解放(ref Taiko_Combo_Effect); TJAPlayer4.tテクスチャの解放(ref Taiko_Combo_Text); #endregion #region ゲージ TJAPlayer4.tテクスチャの解放(ref Gauge[0]); TJAPlayer4.tテクスチャの解放(ref Gauge[1]); TJAPlayer4.tテクスチャの解放(ref Gauge_Base[0]); TJAPlayer4.tテクスチャの解放(ref Gauge_Base[1]); TJAPlayer4.tテクスチャの解放(ref Gauge_Line[0]); TJAPlayer4.tテクスチャの解放(ref Gauge_Line[1]); for (int i = 0; i < TJAPlayer4.Skin.Game_Gauge_Rainbow_Ptn; i++) { TJAPlayer4.tテクスチャの解放(ref Gauge_Rainbow[i]); } TJAPlayer4.tテクスチャの解放(ref Gauge_Soul); TJAPlayer4.tテクスチャの解放(ref Gauge_Soul_Fire); TJAPlayer4.tテクスチャの解放(ref Gauge_Soul_Explosion[0]); TJAPlayer4.tテクスチャの解放(ref Gauge_Soul_Explosion[1]); #endregion #region 吹き出し TJAPlayer4.tテクスチャの解放(ref Balloon_Combo[0]); TJAPlayer4.tテクスチャの解放(ref Balloon_Combo[1]); TJAPlayer4.tテクスチャの解放(ref Balloon_Roll); TJAPlayer4.tテクスチャの解放(ref Balloon_Balloon); TJAPlayer4.tテクスチャの解放(ref Balloon_Number_Roll); TJAPlayer4.tテクスチャの解放(ref Balloon_Number_Combo[0]); TJAPlayer4.tテクスチャの解放(ref Balloon_Number_Combo[1]); for (int i = 0; i < 6; i++) { TJAPlayer4.tテクスチャの解放(ref Balloon_Breaking[i]); } #endregion #region エフェクト TJAPlayer4.tテクスチャの解放(ref Effects_Hit_Explosion); TJAPlayer4.tテクスチャの解放(ref Effects_Hit_Explosion_Big); TJAPlayer4.tテクスチャの解放(ref Effects_Hit_FireWorks); TJAPlayer4.tテクスチャの解放(ref Effects_Fire); TJAPlayer4.tテクスチャの解放(ref Effects_Rainbow); TJAPlayer4.tテクスチャの解放(ref Effects_GoGoSplash); TJAPlayer4.tテクスチャの解放(ref Effects_Hit_Great); TJAPlayer4.tテクスチャの解放(ref Effects_Hit_Great_Big); TJAPlayer4.tテクスチャの解放(ref Effects_Hit_Good); TJAPlayer4.tテクスチャの解放(ref Effects_Hit_Good_Big); for (int i = 0; i < TJAPlayer4.Skin.Game_Effect_Roll_Ptn; i++) { TJAPlayer4.tテクスチャの解放(ref Effects_Roll[i]); } #endregion #region レーン for (int i = 0; i < 3; i++) { TJAPlayer4.tテクスチャの解放(ref Lane_Base[i]); TJAPlayer4.tテクスチャの解放(ref Lane_Text[i]); } TJAPlayer4.tテクスチャの解放(ref Lane_Red); TJAPlayer4.tテクスチャの解放(ref Lane_Blue); TJAPlayer4.tテクスチャの解放(ref Lane_Yellow); TJAPlayer4.tテクスチャの解放(ref Lane_Background_Main); TJAPlayer4.tテクスチャの解放(ref Lane_Background_Sub); TJAPlayer4.tテクスチャの解放(ref Lane_Background_GoGo); #endregion #region 終了演出 for (int i = 0; i < 5; i++) { TJAPlayer4.tテクスチャの解放(ref End_Clear_L[i]); TJAPlayer4.tテクスチャの解放(ref End_Clear_R[i]); } TJAPlayer4.tテクスチャの解放(ref End_Clear_Text); TJAPlayer4.tテクスチャの解放(ref End_Clear_Text_Effect); #endregion #region ゲームモード TJAPlayer4.tテクスチャの解放(ref GameMode_Timer_Tick); TJAPlayer4.tテクスチャの解放(ref GameMode_Timer_Frame); #endregion #region ステージ失敗 TJAPlayer4.tテクスチャの解放(ref Failed_Game); TJAPlayer4.tテクスチャの解放(ref Failed_Stage); #endregion #region ランナー TJAPlayer4.tテクスチャの解放(ref Runner); #endregion #region DanC DanC_Background?.Dispose(); for (int i = 0; i < 4; i++) { DanC_Gauge[i]?.Dispose(); } DanC_Base?.Dispose(); DanC_Failed?.Dispose(); DanC_Number?.Dispose(); DanC_ExamRange?.Dispose(); DanC_ExamUnit?.Dispose(); DanC_ExamType?.Dispose(); DanC_Screen?.Dispose(); #endregion #region PuchiChara TJAPlayer4.tテクスチャの解放(ref PuchiChara); #endregion #endregion #region 6_結果発表 TJAPlayer4.tテクスチャの解放(ref Result_Judge); TJAPlayer4.tテクスチャの解放(ref Result_Number); TJAPlayer4.tテクスチャの解放(ref Result_Panel); TJAPlayer4.tテクスチャの解放(ref Result_Score_Text); TJAPlayer4.tテクスチャの解放(ref Result_Score_Number); TJAPlayer4.tテクスチャの解放(ref Result_Dan); for (int i = 0; i < 2; i++) { TJAPlayer4.tテクスチャの解放(ref Result_Gauge[i]); TJAPlayer4.tテクスチャの解放(ref Result_Gauge_Base[i]); TJAPlayer4.tテクスチャの解放(ref Result_Header[i]); TJAPlayer4.tテクスチャの解放(ref Result_Background[i]); TJAPlayer4.tテクスチャの解放(ref Result_FadeIn[i]); } #endregion #region 7_終了画面 TJAPlayer4.tテクスチャの解放(ref Exit_Background); #endregion }
// メソッド /// <summary> /// 右上の曲名、曲数表示の更新を行います。 /// </summary> /// <param name="songName">曲名</param> /// <param name="genreName">ジャンル名</param> /// <param name="stageText">曲数</param> public void SetPanelString(string songName, string genreName, string stageText = null) { if (base.b活性化してる) { TJAPlayer4.tテクスチャの解放(ref this.txPanel); if ((songName != null) && (songName.Length > 0)) { try { using (var bmpSongTitle = pfMusicName.DrawPrivateFont(songName, TJAPlayer4.Skin.Game_MusicName_ForeColor, TJAPlayer4.Skin.Game_MusicName_BackColor)) { this.txMusicName = TJAPlayer4.tテクスチャの生成(bmpSongTitle, false); } if (txMusicName != null) { this.txMusicName.vc拡大縮小倍率.X = TJAPlayer4.GetSongNameXScaling(ref txMusicName); } Bitmap bmpDiff; string strDiff = ""; if (TJAPlayer4.Skin.eDiffDispMode == E難易度表示タイプ.n曲目に表示) { switch (TJAPlayer4.stage選曲.n確定された曲の難易度[0]) { case 0: strDiff = "かんたん "; break; case 1: strDiff = "ふつう "; break; case 2: strDiff = "むずかしい "; break; case 3: strDiff = "おに "; break; case 4: strDiff = "えでぃと "; break; default: strDiff = "おに "; break; } bmpDiff = pfMusicName.DrawPrivateFont(strDiff + stageText, TJAPlayer4.Skin.Game_StageText_ForeColor, TJAPlayer4.Skin.Game_StageText_BackColor); } else { bmpDiff = pfMusicName.DrawPrivateFont(stageText, TJAPlayer4.Skin.Game_StageText_ForeColor, TJAPlayer4.Skin.Game_StageText_BackColor); } using (bmpDiff) { this.tx難易度とステージ数 = TJAPlayer4.tテクスチャの生成(bmpDiff, false); } } catch (CTextureCreateFailedException e) { Trace.TraceError(e.ToString()); Trace.TraceError("パネル文字列テクスチャの生成に失敗しました。"); this.txPanel = null; } } if (!string.IsNullOrEmpty(genreName)) { if (genreName.Equals("アニメ")) { this.txGENRE = TJAPlayer4.Tx.TxCGen("Anime"); } else if (genreName.Equals("J-POP")) { this.txGENRE = TJAPlayer4.Tx.TxCGen("J-POP"); } else if (genreName.Equals("ゲームミュージック")) { this.txGENRE = TJAPlayer4.Tx.TxCGen("Game"); } else if (genreName.Equals("ナムコオリジナル")) { this.txGENRE = TJAPlayer4.Tx.TxCGen("Namco"); } else if (genreName.Equals("クラシック")) { this.txGENRE = TJAPlayer4.Tx.TxCGen("Classic"); } else if (genreName.Equals("どうよう")) { this.txGENRE = TJAPlayer4.Tx.TxCGen("Child"); } else if (genreName.Equals("バラエティ")) { this.txGENRE = TJAPlayer4.Tx.TxCGen("Variety"); } else if (genreName.Equals("ボーカロイド") || genreName.Equals("VOCALOID")) { this.txGENRE = TJAPlayer4.Tx.TxCGen("Vocaloid"); } else { using (var bmpDummy = new Bitmap(1, 1)) { this.txGENRE = TJAPlayer4.tテクスチャの生成(bmpDummy, true); } } } this.ct進行用 = new CCounter(0, 2000, 2, TJAPlayer4.Timer); this.Start(); } }
public void t選択曲が変更された() { Cスコア cスコア = TJAPlayer4.stage選曲.r現在選択中のスコア; if (cスコア != null) { Bitmap image = new Bitmap(1, 1); TJAPlayer4.tテクスチャの解放(ref this.txArtist); this.strArtist = cスコア.譜面情報.アーティスト名; if ((this.strArtist != null) && (this.strArtist.Length > 0)) { Graphics graphics = Graphics.FromImage(image); graphics.PageUnit = GraphicsUnit.Pixel; SizeF ef = graphics.MeasureString(this.strArtist, this.ft描画用フォント); graphics.Dispose(); if (ef.Width > SampleFramework.GameWindowSize.Width) { ef.Width = SampleFramework.GameWindowSize.Width; } try { Bitmap bitmap2 = new Bitmap((int)Math.Ceiling((double)ef.Width), (int)Math.Ceiling((double)this.ft描画用フォント.Size)); graphics = Graphics.FromImage(bitmap2); graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias; graphics.DrawString(this.strArtist, this.ft描画用フォント, Brushes.White, ( float )0f, ( float )0f); graphics.Dispose(); this.txArtist = new CTexture(TJAPlayer4.app.Device, bitmap2, TJAPlayer4.TextureFormat); this.txArtist.vc拡大縮小倍率 = new Vector3(0.5f, 0.5f, 1f); bitmap2.Dispose(); } catch (CTextureCreateFailedException e) { Trace.TraceError(e.ToString()); Trace.TraceError("ARTISTテクスチャの生成に失敗しました。"); this.txArtist = null; } } TJAPlayer4.tテクスチャの解放(ref this.txComment); //this.strComment = cスコア.譜面情報.コメント; this.strComment = cスコア.譜面情報.ジャンル; if ((this.strComment != null) && (this.strComment.Length > 0)) { Graphics graphics2 = Graphics.FromImage(image); graphics2.PageUnit = GraphicsUnit.Pixel; SizeF ef2 = graphics2.MeasureString(this.strComment, this.ft描画用フォント); Size size = new Size((int)Math.Ceiling((double)ef2.Width), (int)Math.Ceiling((double)ef2.Height)); graphics2.Dispose(); this.nテクスチャの最大幅 = TJAPlayer4.app.Device.Capabilities.MaxTextureWidth; int maxTextureHeight = TJAPlayer4.app.Device.Capabilities.MaxTextureHeight; Bitmap bitmap3 = new Bitmap(size.Width, (int)Math.Ceiling((double)this.ft描画用フォント.Size)); graphics2 = Graphics.FromImage(bitmap3); graphics2.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias; graphics2.DrawString(this.strComment, this.ft描画用フォント, Brushes.White, ( float )0f, ( float )0f); graphics2.Dispose(); this.nComment行数 = 1; this.nComment最終行の幅 = size.Width; while (this.nComment最終行の幅 > this.nテクスチャの最大幅) { this.nComment行数++; this.nComment最終行の幅 -= this.nテクスチャの最大幅; } while ((this.nComment行数 * ((int)Math.Ceiling((double)this.ft描画用フォント.Size))) > maxTextureHeight) { this.nComment行数--; this.nComment最終行の幅 = this.nテクスチャの最大幅; } Bitmap bitmap4 = new Bitmap((this.nComment行数 > 1) ? this.nテクスチャの最大幅 : this.nComment最終行の幅, this.nComment行数 * ((int)Math.Ceiling((double)this.ft描画用フォント.Size))); graphics2 = Graphics.FromImage(bitmap4); Rectangle srcRect = new Rectangle(); Rectangle destRect = new Rectangle(); for (int i = 0; i < this.nComment行数; i++) { srcRect.X = i * this.nテクスチャの最大幅; srcRect.Y = 0; srcRect.Width = ((i + 1) == this.nComment行数) ? this.nComment最終行の幅 : this.nテクスチャの最大幅; srcRect.Height = bitmap3.Height; destRect.X = 0; destRect.Y = i * bitmap3.Height; destRect.Width = srcRect.Width; destRect.Height = srcRect.Height; graphics2.DrawImage(bitmap3, destRect, srcRect, GraphicsUnit.Pixel); } graphics2.Dispose(); try { this.txComment = new CTexture(TJAPlayer4.app.Device, bitmap4, TJAPlayer4.TextureFormat); this.txComment.vc拡大縮小倍率 = new Vector3(0.5f, 0.5f, 1f); } catch (CTextureCreateFailedException e) { Trace.TraceError(e.ToString()); Trace.TraceError("COMMENTテクスチャの生成に失敗しました。"); this.txComment = null; } bitmap4.Dispose(); bitmap3.Dispose(); } image.Dispose(); if (this.txComment != null) { this.ctComment = new CCounter(-740, (int)((((this.nComment行数 - 1) * this.nテクスチャの最大幅) + this.nComment最終行の幅) * this.txComment.vc拡大縮小倍率.X), 10, TJAPlayer4.Timer); } } }
private bool t背景画像があればその一部からプレビュー画像を構築する() { Cスコア cスコア = TJAPlayer4.stage選曲.r現在選択中のスコア; if ((cスコア == null) || string.IsNullOrEmpty(cスコア.譜面情報.Backgound)) { return(false); } string path = cスコア.ファイル情報.フォルダの絶対パス + cスコア.譜面情報.Backgound; if (!path.Equals(this.str現在のファイル名)) { if (!File.Exists(path)) { Trace.TraceWarning("ファイルが存在しません。({0})", new object[] { path }); return(false); } TJAPlayer4.tテクスチャの解放(ref this.txプレビュー画像); this.str現在のファイル名 = path; Bitmap image = null; Bitmap bitmap2 = null; Bitmap bitmap3 = null; try { image = new Bitmap(this.str現在のファイル名); bitmap2 = new Bitmap(SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height); Graphics graphics = Graphics.FromImage(bitmap2); int x = 0; for (int i = 0; i < SampleFramework.GameWindowSize.Height; i += image.Height) { for (x = 0; x < SampleFramework.GameWindowSize.Width; x += image.Width) { graphics.DrawImage(image, x, i, image.Width, image.Height); } } graphics.Dispose(); bitmap3 = new Bitmap(0xcc, 0x10d); graphics = Graphics.FromImage(bitmap3); graphics.DrawImage(bitmap2, 5, 5, new Rectangle(0x157, 0x6d, 0xcc, 0x10d), GraphicsUnit.Pixel); graphics.Dispose(); this.txプレビュー画像 = new CTexture(TJAPlayer4.app.Device, bitmap3, TJAPlayer4.TextureFormat); this.r表示するプレビュー画像 = this.txプレビュー画像; } catch (Exception e) { Trace.TraceError(e.ToString()); Trace.TraceError("背景画像の読み込みに失敗しました。({0})", new object[] { this.str現在のファイル名 }); this.r表示するプレビュー画像 = this.txプレビュー画像がないときの画像; return(false); } finally { if (image != null) { image.Dispose(); } if (bitmap2 != null) { bitmap2.Dispose(); } if (bitmap3 != null) { bitmap3.Dispose(); } } } return(true); }