1
0
mirror of synced 2024-11-24 07:30:21 +01:00

(Pre. v.0.4.1) Fix issue #5 (Difficulty icons disapearing), memory leak while playing the clear song, and the ura-only map icon display

This commit is contained in:
0aubsq 2021-10-12 00:38:42 +02:00
parent 62fbbe8061
commit 7f5cc53780
6 changed files with 133 additions and 106 deletions

View File

@ -133,7 +133,7 @@ Discord以外で配布しておりません。
</details>
# 短期で実装する予定機能
## 短期で実装する予定機能
```
☐ 段位道場結果画面を実装し切る
☐ コイン(ドンメダル)を貯蓄可能にする機能を実装+ドンメダル商店

View File

@ -134,6 +134,8 @@ namespace TJAPlayer3
return 0;
}
#region [private]
private CCounter ctExamConditionsAnim;
private bool DaniInAnime;
@ -386,5 +388,9 @@ namespace TJAPlayer3
}
}
}
#endregion
}
}

View File

@ -666,7 +666,10 @@ namespace TJAPlayer3
TJAPlayer3.t安全にDisposeする( ref this.ft曲リスト用フォント );
this.ct三角矢印アニメ = null;
this.ttk選択している曲の曲名 = null;
this.ttk選択している曲のサブタイトル = null;
this.ct三角矢印アニメ = null;
base.On非活性化();
}
@ -1432,96 +1435,97 @@ namespace TJAPlayer3
// 難易度がTower、Danではない
if (TJAPlayer3.stage選曲.n現在選択中の曲の難易度 != (int)Difficulty.Tower && TJAPlayer3.stage選曲.n現在選択中の曲の難易度 != (int)Difficulty.Dan)
{
#region [Display difficulty boxes]
bool uraExists = TJAPlayer3.stage選曲.r現在選択中のスコア..nレベル[(int)Difficulty.Edit] >= 0;
bool omoteExists = TJAPlayer3.stage選曲.r現在選択中のスコア..nレベル[(int)Difficulty.Oni] >= 0;
for (int i = 0; i < (int)Difficulty.Edit + 1; i++)
{
if (ctBarOpen.n現在の値 >= 100)
{
if (TJAPlayer3.stage選曲.r現在選択中のスコア..nレベル[i] >= 0)
{
#region [Skip conditions]
// Don't even bother process the Ura box if there isn't one
if (!uraExists && i == (int)Difficulty.Edit)
break;
// Don't process oni box if ura exists but not oni
else if (uraExists && !omoteExists && i == (int)Difficulty.Oni)
continue;
#endregion
// avaliable : bool (Chart exists)
#region [Gray box if stage isn't avaliable]
bool avaliable = TJAPlayer3.stage選曲.r現在選択中のスコア..nレベル[i] >= 0;
if (avaliable)
TJAPlayer3.Tx.SongSelect_Frame_Score.color4 = new Color4(1f, 1f, 1f);
int opacity = 0;
if(BarAnimeCount == 62)
{
if (ctScoreFrameAnime.n現在の値 <= 3000 - 255)
opacity = 0;
else if (ctScoreFrameAnime.n現在の値 <= 3000)
opacity = ctScoreFrameAnime.n現在の値 - (3000 - 255);
else if (ctScoreFrameAnime.n現在の値 <= 6000 - 255)
opacity = 255;
else
opacity = 255 - (ctScoreFrameAnime.n現在の値 - (6000 - 255));
}
if (i == 4)
{
if (!TJAPlayer3.stage選曲.act難易度選択画面.bIsDifficltSelect)
TJAPlayer3.Tx.SongSelect_Frame_Score.Opacity = BarAnimeCount < 62 ? 0 : opacity;
else if (ctDifficultyIn.n現在の値 >= 1000)
TJAPlayer3.Tx.SongSelect_Frame_Score.Opacity = (int)255.0f - (ctDifficultyIn.n現在の値 - 1000);
TJAPlayer3.Tx.SongSelect_Frame_Score.t2D下中央基準描画(TJAPlayer3.app.Device, 494 + (3 * 122) - 31, TJAPlayer3.Skin.SongSelect_Overall_Y + 465, new Rectangle(122 * i, 0, 122, 360));
}
else if (i != 4)
{
if (!TJAPlayer3.stage選曲.act難易度選択画面.bIsDifficltSelect)
TJAPlayer3.Tx.SongSelect_Frame_Score.Opacity = (int)(BarAnimeCount * 4.25f);
else if (ctDifficultyIn.n現在の値 >= 1000)
TJAPlayer3.Tx.SongSelect_Frame_Score.Opacity = (int)255.0f - (ctDifficultyIn.n現在の値 - 1000);
TJAPlayer3.Tx.SongSelect_Frame_Score.t2D下中央基準描画(TJAPlayer3.app.Device, 494 + (i * 122) - 31, TJAPlayer3.Skin.SongSelect_Overall_Y + 465, new Rectangle(122 * i, 0, 122, 360));
}
if (i == 4)
{
if (!TJAPlayer3.stage選曲.act難易度選択画面.bIsDifficltSelect)
TJAPlayer3.Tx.SongSelect_Level_Number.Opacity = BarAnimeCount < 62 ? 0 : opacity;
else if (ctDifficultyIn.n現在の値 >= 1000)
TJAPlayer3.Tx.SongSelect_Level_Number.Opacity = (int)255.0f - (ctDifficultyIn.n現在の値 - 1000);
t小文字表示(TJAPlayer3.stage選曲.r現在選択中のスコア..nレベル[4] < 10 ? 497 + (3 * 122) - 5 : 492 + (3 * 122) - 5, TJAPlayer3.Skin.SongSelect_Overall_Y + 277, TJAPlayer3.stage選曲.r現在選択中のスコア..nレベル[4].ToString());
}
else if (i != 4)
{
if (!TJAPlayer3.stage選曲.act難易度選択画面.bIsDifficltSelect)
TJAPlayer3.Tx.SongSelect_Level_Number.Opacity = (int)(BarAnimeCount * 4.25f);
else if (ctDifficultyIn.n現在の値 >= 1000)
TJAPlayer3.Tx.SongSelect_Level_Number.Opacity = (int)255.0f - (ctDifficultyIn.n現在の値 - 1000);
t小文字表示(TJAPlayer3.stage選曲.r現在選択中のスコア..nレベル[i] < 10 ? 497 + (i * 122) - 5 : 492 + (i * 122) - 5, TJAPlayer3.Skin.SongSelect_Overall_Y + 277, TJAPlayer3.stage選曲.r現在選択中のスコア..nレベル[i].ToString());
}
}
else
{
// レベルが0未満 = 譜面がないとみなす
TJAPlayer3.Tx.SongSelect_Frame_Score.color4 = new Color4(0.5f, 0.5f, 0.5f);
if (i == 4 && TJAPlayer3.stage選曲.n現在選択中の曲の難易度 == 4)
{
if (!TJAPlayer3.stage選曲.act難易度選択画面.bIsDifficltSelect)
TJAPlayer3.Tx.SongSelect_Frame_Score.Opacity = (int)(BarAnimeCount * 4.25f);
else if (ctDifficultyIn.n現在の値 >= 1000)
TJAPlayer3.Tx.SongSelect_Frame_Score.Opacity = (int)255.0f - (ctDifficultyIn.n現在の値 - 1000);
// エディット
TJAPlayer3.Tx.SongSelect_Frame_Score.t2D下中央基準描画(TJAPlayer3.app.Device, 494 + (3 * 122) - 31, TJAPlayer3.Skin.SongSelect_Overall_Y + 465, new Rectangle(122 * i, 0, 122, 360));
}
else if (i != 4)
{
if (!TJAPlayer3.stage選曲.act難易度選択画面.bIsDifficltSelect)
TJAPlayer3.Tx.SongSelect_Frame_Score.Opacity = (int)(BarAnimeCount * 4.25f);
else if (ctDifficultyIn.n現在の値 >= 1000)
TJAPlayer3.Tx.SongSelect_Frame_Score.Opacity = (int)255.0f - (ctDifficultyIn.n現在の値 - 1000);
TJAPlayer3.Tx.SongSelect_Frame_Score.t2D下中央基準描画(TJAPlayer3.app.Device, 494 + (i * 122) - 31, TJAPlayer3.Skin.SongSelect_Overall_Y + 465, new Rectangle(122 * i, 0, 122, 360));
}
#endregion
// opacity : int (Box and scores opacity)
#region [Opacity management]
int opacity = 0;
if (avaliable && BarAnimeCount == 62)
{
if (ctScoreFrameAnime.n現在の値 <= 3000)
opacity = Math.Max(0, ctScoreFrameAnime.n現在の値 - 2745);
else
opacity = Math.Min(255, 255 - (ctScoreFrameAnime.n現在の値 - 5745));
}
#endregion
#region [Display box parameters]
int difSelectOpacity = (i == (int)Difficulty.Edit && omoteExists) ? (BarAnimeCount < 62 ? 0 : opacity) : (int)(BarAnimeCount * 4.25f);
if (!TJAPlayer3.stage選曲.act難易度選択画面.bIsDifficltSelect || ctDifficultyIn.n現在の値 < 1000)
{
TJAPlayer3.Tx.SongSelect_Frame_Score.Opacity = difSelectOpacity;
TJAPlayer3.Tx.SongSelect_Level_Number.Opacity = difSelectOpacity;
}
else if (ctDifficultyIn.n現在の値 >= 1000)
{
int difInOpacity = (int)((float)((int)255.0f - (ctDifficultyIn.n現在の値 - 1000)) * ((i == (int)Difficulty.Edit && omoteExists) ? (float)difSelectOpacity / 255f : 1f));
TJAPlayer3.Tx.SongSelect_Frame_Score.Opacity = difInOpacity;
TJAPlayer3.Tx.SongSelect_Level_Number.Opacity = difInOpacity;
}
#endregion
#region [Displayables]
int displayingDiff = Math.Min(i, (int)Difficulty.Oni);
int positionalOffset = displayingDiff * 122;
TJAPlayer3.Tx.SongSelect_Frame_Score.t2D下中央基準描画(TJAPlayer3.app.Device, 494
+ positionalOffset - 31, TJAPlayer3.Skin.SongSelect_Overall_Y + 465, new Rectangle(122 * i, 0, 122, 360));
if (avaliable)
t小文字表示(TJAPlayer3.stage選曲.r現在選択中のスコア..nレベル[i] < 10 ? 497
+ positionalOffset - 5 : 492 + positionalOffset - 5, TJAPlayer3.Skin.SongSelect_Overall_Y + 277,
TJAPlayer3.stage選曲.r現在選択中のスコア..nレベル[i].ToString());
#endregion
}
}
}
else
#endregion
}
else
{
// To replace (Generate a display bug for tower maps
// To replace (Generate a display bug for tower mapc)
if (TJAPlayer3.stage選曲.r現在選択中のスコア..nレベル[TJAPlayer3.stage選曲.n現在選択中の曲の難易度] >= 0)
{
@ -2081,7 +2085,9 @@ namespace TJAPlayer3
public int nStrジャンルtoNum(string strジャンル)
{
// Magic number to change
int nGenre = 8;
for (int i = 0; i < TJAPlayer3.Skin.SongSelect_GenreName.Length; i++)
{
if (TJAPlayer3.Skin.SongSelect_GenreName[i] == strジャンル)
@ -2106,7 +2112,9 @@ namespace TJAPlayer3
public int nStrジャンルtoNumBox(string strジャンル)
{
// Magic number to change
int nGenre = 8;
for (int i = 0; i < TJAPlayer3.Skin.SongSelect_GenreName.Length; i++)
{
if (TJAPlayer3.Skin.SongSelect_GenreName[i] == strジャンル)

View File

@ -747,6 +747,10 @@ namespace TJAPlayer3
}
}
// Would be good to have a separate class for Don + Puchichara + Nameplate
#region [Donchan & PuchiChara]
if (this.ctDonchan_Select.b終了値に達してない)
{
if (TJAPlayer3.ConfigIni.nPlayerCount == 2)
@ -786,6 +790,9 @@ namespace TJAPlayer3
}
#endregion
for (int i = 0; i < 10; i++)
{
tBoardNumberDraw(this.ptBoardNumber[i].X - 10, this.ptBoardNumber[i].Y, i < 7 ? this.act曲リスト.ScoreRankCount[i].ToString() : this.act曲リスト.CrownCount[i - 7].ToString());

View File

@ -96,24 +96,30 @@ namespace TJAPlayer3
public override void OnManagedリソースの作成()
{
this.b再生済み = false;
this.soundClear = TJAPlayer3.Sound管理.tサウンドを生成する(CSkin.Path(@"Sounds\Clear.ogg"), ESoundGroup.SoundEffect);
this.soundFailed = TJAPlayer3.Sound管理.tサウンドを生成する(CSkin.Path(@"Sounds\Failed.ogg"), ESoundGroup.SoundEffect);
this.soundFullCombo = TJAPlayer3.Sound管理.tサウンドを生成する(CSkin.Path(@"Sounds\Full combo.ogg"), ESoundGroup.SoundEffect);
this.soundDondaFullCombo = TJAPlayer3.Sound管理.tサウンドを生成する(CSkin.Path(@"Sounds\Donda Full Combo.ogg"), ESoundGroup.SoundEffect);
base.OnManagedリソースの作成();
if (!base.b活性化してない)
{
this.soundClear = TJAPlayer3.Sound管理.tサウンドを生成する(CSkin.Path(@"Sounds\Clear.ogg"), ESoundGroup.SoundEffect);
this.soundFailed = TJAPlayer3.Sound管理.tサウンドを生成する(CSkin.Path(@"Sounds\Failed.ogg"), ESoundGroup.SoundEffect);
this.soundFullCombo = TJAPlayer3.Sound管理.tサウンドを生成する(CSkin.Path(@"Sounds\Full combo.ogg"), ESoundGroup.SoundEffect);
this.soundDondaFullCombo = TJAPlayer3.Sound管理.tサウンドを生成する(CSkin.Path(@"Sounds\Donda Full Combo.ogg"), ESoundGroup.SoundEffect);
base.OnManagedリソースの作成();
}
}
public override void OnManagedリソースの解放()
{
if (this.soundClear != null)
this.soundClear.t解放する();
if (this.soundFailed != null)
this.soundFailed.t解放する();
if (this.soundFullCombo != null)
this.soundFullCombo.t解放する();
if (this.soundDondaFullCombo != null)
this.soundDondaFullCombo.t解放する();
base.OnManagedリソースの解放();
if (!base.b活性化してない)
{
if (this.soundClear != null)
this.soundClear.t解放する();
if (this.soundFailed != null)
this.soundFailed.t解放する();
if (this.soundFullCombo != null)
this.soundFullCombo.t解放する();
if (this.soundDondaFullCombo != null)
this.soundDondaFullCombo.t解放する();
base.OnManagedリソースの解放();
}
}
#region [effects]

Binary file not shown.