1
0
mirror of synced 2024-11-28 01:10:53 +01:00

(Pre. v0.5.0, last before release) Added Accuracy type EXAM for Dan charts and parse TOWERTYPE parameters for Tower charts

This commit is contained in:
0aubsq 2021-10-23 13:50:48 +02:00
parent f6f87634e2
commit 0367f5ca8e
8 changed files with 43 additions and 10 deletions

View File

@ -1189,6 +1189,8 @@ namespace TJAPlayer3
// Tower lifes
public int LIFE;
public int TOWERTYPE;
public Dictionary<int, CAVI> listAVI;
public Dictionary<int, CAVIPAN> listAVIPAN;
public Dictionary<int, CDirectShow> listDS;
@ -3025,7 +3027,7 @@ namespace TJAPlayer3
private static readonly Regex regexForPrefixingCommaStartingLinesWithZero = new Regex(@"^,", RegexOptions.Multiline | RegexOptions.Compiled);
private static readonly Regex regexForStrippingHeadingLines = new Regex(
@"^(?!(TITLE|LEVEL|BPM|WAVE|OFFSET|BALLOON|EXAM1|EXAM2|EXAM3|EXAM4|EXAM5|EXAM6|EXAM7|RENREN22|RENREN23|RENREN32|RENREN33|RENREN42|RENREN43|BALLOONNOR|BALLOONEXP|BALLOONMAS|SONGVOL|SEVOL|SCOREINIT|SCOREDIFF|COURSE|STYLE|GAME|LIFE|DEMOSTART|SIDE|SUBTITLE|SCOREMODE|GENRE|MOVIEOFFSET|BGIMAGE|BGMOVIE|HIDDENBRANCH|GAUGEINCR|LYRICFILE|#HBSCROLL|#BMSCROLL)).+\n",
@"^(?!(TITLE|LEVEL|BPM|WAVE|OFFSET|BALLOON|EXAM1|EXAM2|EXAM3|EXAM4|EXAM5|EXAM6|EXAM7|RENREN22|RENREN23|RENREN32|RENREN33|RENREN42|RENREN43|BALLOONNOR|BALLOONEXP|BALLOONMAS|SONGVOL|SEVOL|SCOREINIT|SCOREDIFF|COURSE|STYLE|TOWERTYPE|GAME|LIFE|DEMOSTART|SIDE|SUBTITLE|SCOREMODE|GENRE|MOVIEOFFSET|BGIMAGE|BGMOVIE|HIDDENBRANCH|GAUGEINCR|LYRICFILE|#HBSCROLL|#BMSCROLL)).+\n",
RegexOptions.Multiline | RegexOptions.Compiled);
/// <summary>
@ -4717,6 +4719,9 @@ namespace TJAPlayer3
case "c":
examType = Exam.Type.Combo;
break;
case "a":
examType = Exam.Type.Accuracy;
break;
default:
examType = Exam.Type.Gauge;
break;
@ -4891,6 +4896,11 @@ namespace TJAPlayer3
var life = (int)Convert.ToDouble(strCommandParam);
this.LIFE = life;
}
else if (strCommandName.Equals("TOWERTYPE"))
{
var tt = (int)Convert.ToDouble(strCommandParam);
this.TOWERTYPE = tt;
}
else if (strCommandName.Equals("BPM"))
{
if (strCommandParam.IndexOf(",") != -1)

View File

@ -208,6 +208,8 @@ namespace TJAPlayer3
// LIFE here
c曲リストード.nLife = dtx.LIFE;
c曲リストード.nTowerType = dtx.TOWERTYPE;
// Total count of floors for a tower chart
c曲リストード.nTotalFloor = 0;
@ -1060,6 +1062,8 @@ namespace TJAPlayer3
// Tower Lives
c曲リストード.arスコア[i]..nLife = cdtx.LIFE;
c曲リストード.arスコア[i]..nTowerType = cdtx.TOWERTYPE;
c曲リストード.arスコア[i]..nTotalFloor = 0;
for (int k = 0; k < cdtx.listChip.Count; k++)
{

View File

@ -84,6 +84,7 @@ namespace TJAPlayer3
// Tower lifes
public int nLife;
public int nTotalFloor;
public int nTowerType;
[Serializable]
[StructLayout( LayoutKind.Sequential )]

View File

@ -75,6 +75,7 @@ namespace TJAPlayer3
// Tower Lives
public int nLife = 5;
public int nTotalFloor = 140;
public int nTowerType = 0;
public string[] strBoxText = new string[3];
public Eジャンル eジャンル = Eジャンル.None;

View File

@ -72,6 +72,9 @@ namespace TJAPlayer3
case Exam.Type.Combo:
SetCleared();
break;
case Exam.Type.Accuracy:
SetCleared();
break;
default:
break;
}
@ -237,6 +240,7 @@ namespace TJAPlayer3
case Exam.Type.Roll:
case Exam.Type.Hit:
case Exam.Type.Combo:
case Exam.Type.Accuracy:
percent = 1.0 * GetAmount() / GetValue(false);
break;
default:
@ -255,6 +259,7 @@ namespace TJAPlayer3
case Exam.Type.Roll:
case Exam.Type.Hit:
case Exam.Type.Combo:
case Exam.Type.Accuracy:
percent = (1.0 * (GetValue(false) - GetAmount())) / GetValue(false);
break;
default:
@ -351,7 +356,8 @@ namespace TJAPlayer3
Score,
Roll,
Hit,
Combo
Combo,
Accuracy
}
/// <summary>

View File

@ -1655,9 +1655,8 @@ namespace TJAPlayer3
if (!r現在選択中の曲.isChangedBoxChara)
boxType = this.nStrジャンルtoNumBox(r現在選択中の曲.strジャンル);
// If BoxChara < 0, don't display any character
if (boxType >= 0)
if (boxType >= 0 && boxType < TJAPlayer3.Skin.SongSelect_Box_Chara_Count)
{
if (!ctBoxOpen.b終了値に達した)
TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].Opacity = (int)(ctBoxOpen.n現在の値 >= 1200 && ctBoxOpen.n現在の値 <= 1620 ? 255 - (ctBoxOpen.n現在の値 - 1200) * 2.55f :
@ -1677,11 +1676,11 @@ namespace TJAPlayer3
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,
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,
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));
}

View File

@ -141,19 +141,25 @@ namespace TJAPlayer3
if (Challenge[i] == null || !Challenge[i].GetEnable()) continue;
var oldReached = Challenge[i].GetReached();
var isChangedAmount = false;
int totalGoods = (int)TJAPlayer3.stage演奏ドラム画面.nヒット数_Auto含む.Drums.Perfect + TJAPlayer3.stage演奏ドラム画面.nヒット数_Auto含まない.Drums.Perfect;
int totalOks = (int)TJAPlayer3.stage演奏ドラム画面.nヒット数_Auto含む.Drums.Great + TJAPlayer3.stage演奏ドラム画面.nヒット数_Auto含まない.Drums.Great;
int totalBads = (int)TJAPlayer3.stage演奏ドラム画面.nヒット数_Auto含まない.Drums.Miss;
double accuracy = (totalGoods * 100 + totalOks * 50) / (double)(totalGoods + totalOks + totalBads);
switch (Challenge[i].GetExamType())
{
case Exam.Type.Gauge:
isChangedAmount = Challenge[i].Update((int)TJAPlayer3.stage演奏ドラム画面.actGauge.db現在のゲージ値[0]);
break;
case Exam.Type.JudgePerfect:
isChangedAmount = Challenge[i].Update(ExamChange[i] ? TJAPlayer3.stage演奏ドラム画面.n良[NowShowingNumber] : (int)TJAPlayer3.stage演奏ドラム画面.nヒット数_Auto含む.Drums.Perfect + TJAPlayer3.stage演奏ドラム画面.nヒット数_Auto含まない.Drums.Perfect);
isChangedAmount = Challenge[i].Update(ExamChange[i] ? TJAPlayer3.stage演奏ドラム画面.n良[NowShowingNumber] : totalGoods);
break;
case Exam.Type.JudgeGood:
isChangedAmount = Challenge[i].Update(ExamChange[i] ? TJAPlayer3.stage演奏ドラム画面.n可[NowShowingNumber] : (int)TJAPlayer3.stage演奏ドラム画面.nヒット数_Auto含む.Drums.Great + TJAPlayer3.stage演奏ドラム画面.nヒット数_Auto含まない.Drums.Great);
isChangedAmount = Challenge[i].Update(ExamChange[i] ? TJAPlayer3.stage演奏ドラム画面.n可[NowShowingNumber] : totalOks);
break;
case Exam.Type.JudgeBad:
isChangedAmount = Challenge[i].Update(ExamChange[i] ? TJAPlayer3.stage演奏ドラム画面.n不可[NowShowingNumber] : (int)TJAPlayer3.stage演奏ドラム画面.nヒット数_Auto含まない.Drums.Miss);
isChangedAmount = Challenge[i].Update(ExamChange[i] ? TJAPlayer3.stage演奏ドラム画面.n不可[NowShowingNumber] : totalBads);
break;
case Exam.Type.Score:
isChangedAmount = Challenge[i].Update((int)TJAPlayer3.stage演奏ドラム画面.actScore.GetScore(0));
@ -167,6 +173,9 @@ namespace TJAPlayer3
case Exam.Type.Combo:
isChangedAmount = Challenge[i].Update((int)TJAPlayer3.stage演奏ドラム画面.actCombo.n現在のコンボ数.[0]);
break;
case Exam.Type.Accuracy:
isChangedAmount = Challenge[i].Update((int)accuracy);
break;
default:
break;
}
@ -206,6 +215,9 @@ namespace TJAPlayer3
case Exam.Type.Score:
if (Challenge[i].Amount < Challenge[i].Value[0]) Challenge[i].SetReached(true);
break;
case Exam.Type.Accuracy:
if (Challenge[i].Amount < Challenge[i].Value[0]) Challenge[i].SetReached(true);
break;
default:
// 何もしない
break;

@ -1 +1 @@
Subproject commit 57f4944c2817bedf708c6e42e553911cfb603052
Subproject commit ff42a91bb881329a52588a35cefddc33aebc6f9e