1
0
mirror of synced 2024-11-14 19:07:36 +01:00

(Pre. v0.5.0) Add the #BOXCHARA option to box.def to choose manually the chara displaying on the song select screen, allows to display no chara by setting #BOXCHARA to a negative number

This commit is contained in:
0aubsq 2021-10-23 11:53:04 +02:00
parent a1196f1711
commit f6f87634e2
5 changed files with 78 additions and 28 deletions

View File

@ -33,7 +33,7 @@ using System.Resources;
// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
// 既定値にすることができます:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.4.0")]
[assembly: AssemblyVersion("0.5.0")]
[assembly: AssemblyFileVersion("1.4.5.3")]
[assembly: NeutralResourcesLanguage("ja-JP")]

View File

@ -27,6 +27,8 @@ namespace TJAPlayer3
public int BgType;
public bool IsChangedBoxType;
public bool IsChangedBgType;
public int BoxChara;
public bool IsChangedBoxChara;
// コンストラクタ
@ -41,6 +43,7 @@ namespace TJAPlayer3
BoxColor = Color.White;
BoxType = 0;
BgType = 0;
BoxChara = 0;
BgColor = Color.White;
}
public CBoxDef( string boxdefファイル名 )
@ -116,6 +119,11 @@ namespace TJAPlayer3
this.BoxType = int.Parse(str.Substring(8).Trim(ignoreChars));
IsChangedBoxType = true;
}
else if (str.StartsWith("#BOXCHARA", StringComparison.OrdinalIgnoreCase))
{
this.BoxChara = int.Parse(str.Substring(9).Trim(ignoreChars));
IsChangedBoxChara = true;
}
else
{
for(int i = 0; i < 3; i++)

View File

@ -396,6 +396,11 @@ namespace TJAPlayer3
c曲リストード.BoxType = c曲リストード.r親ード.BoxType;
c曲リストード.isChangedBoxType = true;
}
if (c曲リストード.r親ード.isChangedBoxChara)
{
c曲リストード.BoxChara = c曲リストード.r親ード.BoxChara;
c曲リストード.isChangedBoxChara = true;
}
}
@ -569,6 +574,10 @@ namespace TJAPlayer3
if (boxdef.IsChangedBoxType)
{
c曲リストード.BoxType = boxdef.BoxType;
}
if (boxdef.IsChangedBoxChara)
{
c曲リストード.BoxChara = boxdef.BoxChara;
}
}
@ -674,6 +683,11 @@ namespace TJAPlayer3
c曲リストード.BoxType = boxdef.BoxType;
c曲リストード.isChangedBoxType = true;
}
if (boxdef.IsChangedBoxChara)
{
c曲リストード.BoxChara = boxdef.BoxChara;
c曲リストード.isChangedBoxChara = true;
}
for (int i = 0; i < 3; i++)
@ -781,6 +795,10 @@ namespace TJAPlayer3
{
sb.Append(", BgType=" + c曲リストード.BgType.ToString());
}
if (c曲リストード.isChangedBoxChara)
{
sb.Append(", BoxChara=" + c曲リストード.BoxChara.ToString());
}
Trace.TraceInformation( sb.ToString() );
}
finally

View File

@ -45,6 +45,8 @@ namespace TJAPlayer3
public bool isChangedBoxType;
public int BoxType;
public int BgType;
public int BoxChara;
public bool isChangedBoxChara;
public bool IsChangedForeColor;
public bool IsChangedBackColor;

View File

@ -928,6 +928,9 @@ namespace TJAPlayer3
this.stバー情報[index].BgTypeChanged = song.isChangedBgType;
this.stバー情報[index].BoxTypeChanged = song.isChangedBoxType;
this.stバー情報[index].BoxChara = song.BoxChara;
this.stバー情報[index].BoxCharaChanged = song.isChangedBoxChara;
this.stバー情報[index].strジャンル = song.strジャンル;
this.stバー情報[index].strサブタイトル = song.strサブタイトル;
this.stバー情報[index].ar難易度 = song.nLevel;
@ -1032,6 +1035,9 @@ namespace TJAPlayer3
this.stバー情報[index].BgTypeChanged = song.isChangedBgType;
this.stバー情報[index].BoxTypeChanged = song.isChangedBoxType;
this.stバー情報[index].BoxChara = song.BoxChara;
this.stバー情報[index].BoxCharaChanged = song.isChangedBoxChara;
this.stバー情報[index].strサブタイトル = song.strサブタイトル;
this.stバー情報[index].strジャンル = song.strジャンル;
this.stバー情報[index].ar難易度 = song.nLevel;
@ -1640,33 +1646,45 @@ namespace TJAPlayer3
this.txBoxText[j].vc拡大縮小倍率.X = 510f / this.txBoxText[j].szテクスチャサイズ.Width;
this.txBoxText[j].t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, 640 + TJAPlayer3.Skin.SongSelect_BoxExplanation_X, 360 + j * TJAPlayer3.Skin.SongSelect_BoxExplanation_Interval + TJAPlayer3.Skin.SongSelect_BoxExplanation_Y);
}
// Chara here
int boxType = r現在選択中の曲.BoxChara;
if (!r現在選択中の曲.isChangedBoxChara)
boxType = this.nStrジャンルtoNumBox(r現在選択中の曲.strジャンル);
// If BoxChara < 0, don't display any character
if (boxType >= 0)
{
if (!ctBoxOpen.b終了値に達した)
TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].Opacity = (int)(ctBoxOpen.n現在の値 >= 1200 && ctBoxOpen.n現在の値 <= 1620 ? 255 - (ctBoxOpen.n現在の値 - 1200) * 2.55f :
ctBoxOpen.n現在の値 >= 2000 ? (ctBoxOpen.n現在の値 - 2000) * 2.55f : ctBoxOpen.n現在の値 <= 1200 ? 255 : 0);
else
{
if (!TJAPlayer3.stage選曲.act難易度選択画面.bIsDifficltSelect)
TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].Opacity = (int)(BarAnimeCount * 4.25f);
else if (ctDifficultyIn.n現在の値 >= 1000)
TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].Opacity = (int)255.0f - (ctDifficultyIn.n現在の値 - 1000);
}
float anime = 0;
if (BarAnimeCount <= 45)
anime = BarAnimeCount * 3.333333333f;
else
anime = 150 - (BarAnimeCount - 45) * 2.11764705f;
TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].t2D中心基準描画(TJAPlayer3.app.Device, 640 - TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].szテクスチャサイズ.Width / 4 + 114 - anime, 360,
new Rectangle(0, 0, TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].szテクスチャサイズ.Width / 2,
TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].szテクスチャサイズ.Height));
TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].t2D中心基準描画(TJAPlayer3.app.Device, 640 + TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].szテクスチャサイズ.Width / 4 - 114 + anime, 360,
new Rectangle(TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].szテクスチャサイズ.Width / 2, 0,
TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].szテクスチャサイズ.Width / 2, TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].szテクスチャサイズ.Height));
}
// Chara here
if (!ctBoxOpen.b終了値に達した)
TJAPlayer3.Tx.SongSelect_Box_Chara[this.nStrジャンルtoNumBox(r現在選択中の曲.strジャンル)].Opacity = (int)(ctBoxOpen.n現在の値 >= 1200 && ctBoxOpen.n現在の値 <= 1620 ? 255 - (ctBoxOpen.n現在の値 - 1200) * 2.55f :
ctBoxOpen.n現在の値 >= 2000 ? (ctBoxOpen.n現在の値 - 2000) * 2.55f : ctBoxOpen.n現在の値 <= 1200 ? 255 : 0);
else
{
if (!TJAPlayer3.stage選曲.act難易度選択画面.bIsDifficltSelect)
TJAPlayer3.Tx.SongSelect_Box_Chara[this.nStrジャンルtoNumBox(r現在選択中の曲.strジャンル)].Opacity = (int)(BarAnimeCount * 4.25f);
else if (ctDifficultyIn.n現在の値 >= 1000)
TJAPlayer3.Tx.SongSelect_Box_Chara[this.nStrジャンルtoNumBox(r現在選択中の曲.strジャンル)].Opacity = (int)255.0f - (ctDifficultyIn.n現在の値 - 1000);
}
float anime = 0;
if(BarAnimeCount <= 45)
anime = BarAnimeCount * 3.333333333f;
else
anime = 150 - (BarAnimeCount - 45) * 2.11764705f;
TJAPlayer3.Tx.SongSelect_Box_Chara[this.nStrジャンルtoNumBox(r現在選択中の曲.strジャンル)].t2D中心基準描画(TJAPlayer3.app.Device, 640 - TJAPlayer3.Tx.SongSelect_Box_Chara[this.nStrジャンルtoNumBox(r現在選択中の曲.strジャンル)].szテクスチャサイズ.Width / 4 + 114 - anime, 360,
new Rectangle(0, 0, TJAPlayer3.Tx.SongSelect_Box_Chara[this.nStrジャンルtoNumBox(r現在選択中の曲.strジャンル)].szテクスチャサイズ.Width / 2, TJAPlayer3.Tx.SongSelect_Box_Chara[this.nStrジャンルtoNumBox(r現在選択中の曲.strジャンル)].szテクスチャサイズ.Height));
TJAPlayer3.Tx.SongSelect_Box_Chara[this.nStrジャンルtoNumBox(r現在選択中の曲.strジャンル)].t2D中心基準描画(TJAPlayer3.app.Device, 640 + TJAPlayer3.Tx.SongSelect_Box_Chara[this.nStrジャンルtoNumBox(r現在選択中の曲.strジャンル)].szテクスチャサイズ.Width / 4 - 114 + anime, 360,
new Rectangle(TJAPlayer3.Tx.SongSelect_Box_Chara[this.nStrジャンルtoNumBox(r現在選択中の曲.strジャンル)].szテクスチャサイズ.Width / 2, 0, TJAPlayer3.Tx.SongSelect_Box_Chara[this.nStrジャンルtoNumBox(r現在選択中の曲.strジャンル)].szテクスチャサイズ.Width / 2, TJAPlayer3.Tx.SongSelect_Box_Chara[this.nStrジャンルtoNumBox(r現在選択中の曲.strジャンル)].szテクスチャサイズ.Height));
}
break;
@ -1862,10 +1880,11 @@ namespace TJAPlayer3
public Color BgColor;
public int BoxType;
public int BgType;
public int BoxChara;
public bool BoxTypeChanged;
public bool BgTypeChanged;
public bool BoxCharaChanged;
public int[] ar難易度;
public bool[] b分岐;
@ -2060,6 +2079,9 @@ namespace TJAPlayer3
this.stバー情報[i].BgTypeChanged = song.isChangedBgType;
this.stバー情報[i].BoxTypeChanged = song.isChangedBoxType;
this.stバー情報[i].BoxChara = song.BoxChara;
this.stバー情報[i].BoxCharaChanged = song.isChangedBoxChara;
this.stバー情報[ i ].eバー種別 = this.e曲のバー種別を返す( song );
this.stバー情報[ i ].strサブタイトル = song.strサブタイトル;
this.stバー情報[ i ].ar難易度 = song.nLevel;