1
0
mirror of synced 2024-11-30 18:24:32 +01:00

(Pre. v0.5.1) Added DANTICK and DANTICKCOLOR options within the .tja files to change the color of the small bar on the dan song select screen

This commit is contained in:
0aubsq 2021-10-31 23:21:52 +01:00
parent a060ad0c1b
commit b365d5a519
5 changed files with 43 additions and 3 deletions

View File

@ -1190,6 +1190,9 @@ namespace TJAPlayer3
public int LIFE; public int LIFE;
public int TOWERTYPE; public int TOWERTYPE;
public int DANTICK = 0;
public Color DANTICKCOLOR = Color.White;
public Dictionary<int, CAVI> listAVI; public Dictionary<int, CAVI> listAVI;
public Dictionary<int, CAVIPAN> listAVIPAN; public Dictionary<int, CAVIPAN> listAVIPAN;
@ -3027,7 +3030,7 @@ namespace TJAPlayer3
private static readonly Regex regexForPrefixingCommaStartingLinesWithZero = new Regex(@"^,", RegexOptions.Multiline | RegexOptions.Compiled); private static readonly Regex regexForPrefixingCommaStartingLinesWithZero = new Regex(@"^,", RegexOptions.Multiline | RegexOptions.Compiled);
private static readonly Regex regexForStrippingHeadingLines = new Regex( 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|TOWERTYPE|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|DANTICK|DANTICKCOLOR|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); RegexOptions.Multiline | RegexOptions.Compiled);
/// <summary> /// <summary>
@ -4901,6 +4904,16 @@ namespace TJAPlayer3
var tt = (int)Convert.ToDouble(strCommandParam); var tt = (int)Convert.ToDouble(strCommandParam);
this.TOWERTYPE = tt; this.TOWERTYPE = tt;
} }
else if (strCommandName.Equals("DANTICK"))
{
var tick = (int)Convert.ToDouble(strCommandParam);
this.DANTICK = tick;
}
else if (strCommandName.Equals("DANTICKCOLOR"))
{
var tickcolor = ColorTranslator.FromHtml(strCommandParam);
this.DANTICKCOLOR = tickcolor;
}
else if (strCommandName.Equals("BPM")) else if (strCommandName.Equals("BPM"))
{ {
if (strCommandParam.IndexOf(",") != -1) if (strCommandParam.IndexOf(",") != -1)

View File

@ -210,6 +210,9 @@ namespace TJAPlayer3
c曲リストード.nTowerType = dtx.TOWERTYPE; c曲リストード.nTowerType = dtx.TOWERTYPE;
c曲リストード.nDanTick = dtx.DANTICK;
c曲リストード.cDanTickColor = dtx.DANTICKCOLOR;
// Total count of floors for a tower chart // Total count of floors for a tower chart
c曲リストード.nTotalFloor = 0; c曲リストード.nTotalFloor = 0;
@ -1064,6 +1067,9 @@ namespace TJAPlayer3
c曲リストード.arスコア[i]..nTowerType = cdtx.TOWERTYPE; c曲リストード.arスコア[i]..nTowerType = cdtx.TOWERTYPE;
c曲リストード.arスコア[i]..nDanTick = cdtx.DANTICK;
c曲リストード.arスコア[i]..cDanTickColor = cdtx.DANTICKCOLOR;
c曲リストード.arスコア[i]..nTotalFloor = 0; c曲リストード.arスコア[i]..nTotalFloor = 0;
for (int k = 0; k < cdtx.listChip.Count; k++) for (int k = 0; k < cdtx.listChip.Count; k++)
{ {

View File

@ -4,6 +4,7 @@ using System.Text;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Runtime.Serialization.Formatters.Binary; using System.Runtime.Serialization.Formatters.Binary;
using FDK; using FDK;
using System.Drawing;
namespace TJAPlayer3 namespace TJAPlayer3
{ {
@ -86,6 +87,9 @@ namespace TJAPlayer3
public int nTotalFloor; public int nTotalFloor;
public int nTowerType; public int nTowerType;
public int nDanTick;
public Color cDanTickColor;
[Serializable] [Serializable]
[StructLayout( LayoutKind.Sequential )] [StructLayout( LayoutKind.Sequential )]
public struct STHISTORY public struct STHISTORY

View File

@ -76,6 +76,9 @@ namespace TJAPlayer3
public int nLife = 5; public int nLife = 5;
public int nTotalFloor = 140; public int nTotalFloor = 140;
public int nTowerType = 0; public int nTowerType = 0;
public int nDanTick = 0;
public Color cDanTickColor = Color.White;
public string[] strBoxText = new string[3]; public string[] strBoxText = new string[3];
public Eジャンル eジャンル = Eジャンル.None; public Eジャンル eジャンル = Eジャンル.None;

View File

@ -157,8 +157,15 @@ namespace TJAPlayer3
#region [Plate background] #region [Plate background]
int tick = Math.Max(0, Math.Min(5, stバー情報[currentSong].nDanTick));
Color tickColor = stバー情報[currentSong].cDanTickColor;
TJAPlayer3.Tx.Dani_Plate.Opacity = 255; TJAPlayer3.Tx.Dani_Plate.Opacity = 255;
TJAPlayer3.Tx.Dani_Plate.t2D拡大率考慮上中央基準描画(TJAPlayer3.app.Device, xPos, yPos, new Rectangle(0, 0, tickWidth, tickHeight)); TJAPlayer3.Tx.Dani_Plate.color4 = tickColor;
TJAPlayer3.Tx.Dani_Plate.t2D拡大率考慮上中央基準描画(TJAPlayer3.app.Device, xPos, yPos, new Rectangle(tickWidth * tick, 0, tickWidth, tickHeight));
// Reset color for plate flash
TJAPlayer3.Tx.Dani_Plate.color4 = Color.White;
#endregion #endregion
@ -231,7 +238,11 @@ namespace TJAPlayer3
public List<CDTX.DanSongs> List_DanSongs; public List<CDTX.DanSongs> List_DanSongs;
public CTexture txBarCenter; public CTexture txBarCenter;
public CTexture txDanPlate; public CTexture txDanPlate;
// Extra parameters
public int clearGrade; public int clearGrade;
public int nDanTick;
public Color cDanTickColor;
} }
private void tDrawDanSelectedLevel(float Anime, int modifier = 0) private void tDrawDanSelectedLevel(float Anime, int modifier = 0)
@ -382,10 +393,13 @@ namespace TJAPlayer3
stバー情報[i].List_DanSongs = song.DanSongs; stバー情報[i].List_DanSongs = song.DanSongs;
} }
// Two char header, will be used for grade unlocking too
string tmp = song.strタイトル.Substring(0, 2); string tmp = song.strタイトル.Substring(0, 2);
stバー情報[i].ttkタイトル[TJAPlayer3.Songs管理.list曲ルート_Dan[i].DanSongs.Count] = new TitleTextureKey(tmp, pfDanSong, Color.Black, Color.Transparent, 700); stバー情報[i].ttkタイトル[TJAPlayer3.Songs管理.list曲ルート_Dan[i].DanSongs.Count] = new TitleTextureKey(tmp, pfDanSong, Color.Black, Color.Transparent, 700);
stバー情報[i].nDanTick = song.arスコア[6]..nDanTick;
stバー情報[i].cDanTickColor = song.arスコア[6]..cDanTickColor;
stバー情報[i].clearGrade = song.arスコア[6]..nクリア[0]; stバー情報[i].clearGrade = song.arスコア[6]..nクリア[0];
stバー情報[i].txBarCenter = TJAPlayer3.tテクスチャの生成(Path.GetDirectoryName(song.arスコア[6]..) + @"\Bar_Center.png"); stバー情報[i].txBarCenter = TJAPlayer3.tテクスチャの生成(Path.GetDirectoryName(song.arスコア[6]..) + @"\Bar_Center.png");
stバー情報[i].txDanPlate = TJAPlayer3.tテクスチャの生成(Path.GetDirectoryName(song.arスコア[6]..) + @"\Dan_Plate.png"); stバー情報[i].txDanPlate = TJAPlayer3.tテクスチャの生成(Path.GetDirectoryName(song.arスコア[6]..) + @"\Dan_Plate.png");