1
0
mirror of synced 2025-02-12 00:43:04 +01:00
This commit is contained in:
0auBSQ 2023-10-15 19:15:05 +09:00
commit 05f8752c1c
41 changed files with 692 additions and 646 deletions

View File

@ -79,6 +79,11 @@ namespace FDK
} }
} }
public static bool FontExists(string fontpath)
{
return SKFontManager.Default.FontFamilies.Contains(fontpath) || File.Exists(fontpath);
}
#region [ ] #region [ ]
public CFontRenderer(string fontpath, int pt, FontStyle style) public CFontRenderer(string fontpath, int pt, FontStyle style)
{ {

View File

@ -1747,7 +1747,7 @@ namespace TJAPlayer3
//---------------------------------------- //----------------------------------------
#endif #endif
this.strDTXManiaのバージョン = "Unknown"; this.strDTXManiaのバージョン = "Unknown";
this.str曲データ検索パス = @"." + Path.DirectorySeparatorChar; this.str曲データ検索パス = @"." + Path.DirectorySeparatorChar + "Songs" + Path.DirectorySeparatorChar;
this.b全画面モード = false; this.b全画面モード = false;
this.b垂直帰線待ちを行う = true; this.b垂直帰線待ちを行う = true;
this.n初期ウィンドウ開始位置X = 100; // #30675 2013.02.04 ikanick add this.n初期ウィンドウ開始位置X = 100; // #30675 2013.02.04 ikanick add

View File

@ -1105,6 +1105,22 @@ namespace TJAPlayer3
Resolution[i] = int.Parse(strSplit[i]); Resolution[i] = int.Parse(strSplit[i]);
} }
} }
else if (strCommand == "FontName")
{
strParam = strParam.Replace('/', System.IO.Path.DirectorySeparatorChar);
strParam = strParam.Replace('\\', System.IO.Path.DirectorySeparatorChar);
if (HPrivateFastFont.FontExists(strParam)) FontName = strParam;
strParam = Path(strParam);
if (HPrivateFastFont.FontExists(strParam)) FontName = strParam;
}
else if (strCommand == "BoxFontName")
{
strParam = strParam.Replace('/', System.IO.Path.DirectorySeparatorChar);
strParam = strParam.Replace('\\', System.IO.Path.DirectorySeparatorChar);
if (HPrivateFastFont.FontExists(strParam)) BoxFontName = strParam;
strParam = Path(strParam);
if (HPrivateFastFont.FontExists(Path(strParam))) BoxFontName = strParam;
}
#endregion #endregion
#region [Background Scroll] #region [Background Scroll]
@ -8343,6 +8359,8 @@ namespace TJAPlayer3
public string Skin_Version = "Unknown"; public string Skin_Version = "Unknown";
public string Skin_Creator = "Unknown"; public string Skin_Creator = "Unknown";
public int[] Resolution = new int[] { 1280, 720 }; public int[] Resolution = new int[] { 1280, 720 };
public string FontName = TJAPlayer3.ConfigIni.FontName;
public string BoxFontName = TJAPlayer3.ConfigIni.BoxFontName;
#endregion #endregion
#region Config #region Config

View File

@ -646,6 +646,7 @@ namespace TJAPlayer3
} }
[Serializable]
[StructLayout( LayoutKind.Sequential )] [StructLayout( LayoutKind.Sequential )]
public struct STAUTOPLAY // Eレーンとindexを一致させること public struct STAUTOPLAY // Eレーンとindexを一致させること
{ {

View File

@ -164,20 +164,10 @@ namespace TJAPlayer3
&& _pfModalTitleFull != null) && _pfModalTitleFull != null)
return; return;
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName)) _pfModalContentHalf = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Modal_Font_ModalContentHalf_Size);
{ _pfModalTitleHalf = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Modal_Font_ModalTitleHalf_Size);
_pfModalContentHalf = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Modal_Font_ModalContentHalf_Size); _pfModalContentFull = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Modal_Font_ModalContentFull_Size);
_pfModalTitleHalf = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Modal_Font_ModalTitleHalf_Size); _pfModalTitleFull = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Modal_Font_ModalTitleFull_Size);
_pfModalContentFull = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Modal_Font_ModalContentFull_Size);
_pfModalTitleFull = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Modal_Font_ModalTitleFull_Size);
}
else
{
_pfModalContentHalf = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Modal_Font_ModalContentHalf_Size);
_pfModalTitleHalf = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Modal_Font_ModalTitleHalf_Size);
_pfModalContentFull = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Modal_Font_ModalContentFull_Size);
_pfModalTitleFull = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Modal_Font_ModalTitleFull_Size);
}
} }
#region [Enum definitions] #region [Enum definitions]

View File

@ -3090,6 +3090,7 @@ for (int i = 0; i < 3; i++) {
Trace.TraceInformation( "■ アプリケーションの終了" ); Trace.TraceInformation( "■ アプリケーションの終了" );
#region [ ] #region [ ]
//--------------------- //---------------------
if ( actEnumSongs != null ) if ( actEnumSongs != null )
{ {
Trace.TraceInformation( "曲検索actの終了処理を行います。" ); Trace.TraceInformation( "曲検索actの終了処理を行います。" );
@ -3172,6 +3173,15 @@ for (int i = 0; i < 3; i++) {
Trace.Indent(); Trace.Indent();
try try
{ {
#pragma warning disable SYSLIB0011
if (EnumSongs.IsSongListEnumCompletelyDone)
{
BinaryFormatter songlistdb_ = new BinaryFormatter();
using Stream songlistdb = File.OpenWrite($"{TJAPlayer3.strEXEのあるフォルダ}songlist.db");
songlistdb_.Serialize(songlistdb, Songs管理.listSongsDB);
}
#pragma warning restore SYSLIB0011
Songs管理 = null; Songs管理 = null;
Trace.TraceInformation( "曲リストの終了処理を完了しました。" ); Trace.TraceInformation( "曲リストの終了処理を完了しました。" );
} }

View File

@ -12,21 +12,26 @@ namespace TJAPlayer3
{ {
static string DefaultFont = CFontRenderer.DefaultFontName; static string DefaultFont = CFontRenderer.DefaultFontName;
public static bool FontExists(string fontpath)
{
return CFontRenderer.FontExists(fontpath);
}
public static CCachedFontRenderer tInstantiateFont(string fontName, int scale) public static CCachedFontRenderer tInstantiateFont(string fontName, int scale)
{ {
if (!string.IsNullOrEmpty(fontName)) if (FontExists(fontName))
return (new CCachedFontRenderer(fontName, scale)); return (new CCachedFontRenderer(fontName, scale));
return (new CCachedFontRenderer(DefaultFont, scale)); return (new CCachedFontRenderer(DefaultFont, scale));
} }
public static CCachedFontRenderer tInstantiateMainFont(int scale) public static CCachedFontRenderer tInstantiateMainFont(int scale)
{ {
return tInstantiateFont(TJAPlayer3.ConfigIni.FontName, scale); return tInstantiateFont(TJAPlayer3.Skin.FontName, scale);
} }
public static CCachedFontRenderer tInstantiateBoxFont(int scale) public static CCachedFontRenderer tInstantiateBoxFont(int scale)
{ {
return tInstantiateFont(TJAPlayer3.ConfigIni.BoxFontName, scale); return tInstantiateFont(TJAPlayer3.Skin.BoxFontName, scale);
} }
} }
} }

View File

@ -175,6 +175,7 @@ namespace TJAPlayer3
public bool bHit; public bool bHit;
public bool b可視 = true; public bool b可視 = true;
public bool bHideBarLine = true; public bool bHideBarLine = true;
public bool bProcessed = false;
public bool bShow; public bool bShow;
public bool bShowRoll; public bool bShowRoll;
public bool bBranch = false; public bool bBranch = false;
@ -655,9 +656,12 @@ namespace TJAPlayer3
#endregion #endregion
} }
[Serializable]
public class DanSongs public class DanSongs
{ {
[NonSerialized]
public CTexture TitleTex; public CTexture TitleTex;
[NonSerialized]
public CTexture SubTitleTex; public CTexture SubTitleTex;
public string Title; public string Title;
public string SubTitle; public string SubTitle;
@ -670,6 +674,8 @@ namespace TJAPlayer3
public static int Number = 0; public static int Number = 0;
public bool bTitleShow; public bool bTitleShow;
public Dan_C[] Dan_C = new Dan_C[CExamInfo.cMaxExam]; public Dan_C[] Dan_C = new Dan_C[CExamInfo.cMaxExam];
[NonSerialized]
public CWAV Wave; public CWAV Wave;
public DanSongs() public DanSongs()
@ -1212,7 +1218,7 @@ namespace TJAPlayer3
public List<SKBitmap> listLyric; //歌詞を格納していくリスト。スペル忘れた(ぉい public List<SKBitmap> listLyric; //歌詞を格納していくリスト。スペル忘れた(ぉい
public List<STLYRIC> listLyric2; public List<STLYRIC> listLyric2;
public Dictionary<double, CChip> kusudaMAP = new Dictionary<double, CChip>(); //public Dictionary<double, CChip> kusudaMAP = new Dictionary<double, CChip>();
public bool usingLyricsFile; //If lyric file is used (VTT/LRC), ignore #LYRIC tags & do not parse other lyric file tags public bool usingLyricsFile; //If lyric file is used (VTT/LRC), ignore #LYRIC tags & do not parse other lyric file tags
@ -1600,6 +1606,7 @@ namespace TJAPlayer3
// Replace non-shared kusudamas by balloons // Replace non-shared kusudamas by balloons
#region [Sync check] #region [Sync check]
/*
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++) for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{ {
CDTX dtx = dtxarr[i]; CDTX dtx = dtxarr[i];
@ -1620,10 +1627,12 @@ namespace TJAPlayer3
} }
} }
} }
*/
#endregion #endregion
// Stack balloon values to all remining (= existing) kusudamas to player 1 // Stack balloon values to all remining (= existing) kusudamas to player 1
#region [Accumulation] #region [Accumulation]
/*
CDTX dtx1 = dtxarr[0]; CDTX dtx1 = dtxarr[0];
if (dtx1 == null) return; if (dtx1 == null) return;
foreach (KeyValuePair<double, CChip> kvp in dtx1.kusudaMAP) foreach (KeyValuePair<double, CChip> kvp in dtx1.kusudaMAP)
@ -1653,6 +1662,7 @@ namespace TJAPlayer3
} }
} }
*/
#endregion #endregion
} }
@ -2427,6 +2437,8 @@ namespace TJAPlayer3
case 0x15: case 0x15:
case 0x16: case 0x16:
case 0x17: case 0x17:
case 0x19:
case 0x1D:
case 0x20: case 0x20:
case 0x21: case 0x21:
{ {
@ -6469,6 +6481,7 @@ namespace TJAPlayer3
int? nReturnChip = null; int? nReturnChip = null;
//--して取得しないとだめよ~ダメダメ💛 //--して取得しないとだめよ~ダメダメ💛
//:damedane:
for (int i = listChips.Count - 1; i >= 0; i--) for (int i = listChips.Count - 1; i >= 0; i--)
{ {
if (b分岐前の連打開始) if (b分岐前の連打開始)
@ -6705,13 +6718,11 @@ namespace TJAPlayer3
{ {
if (IsEndedBranching) if (IsEndedBranching)
{ {
if (!this.kusudaMAP.ContainsKey(chip.n発声時刻ms))
kusudaMAP[chip.n発声時刻ms] = chip;
} }
else else
{ {
// Balloon in branches // Balloon in branches
chip.nチャンネル番号 = 0x17; chip.nチャンネル番号 = 0x19;
} }
} }

View File

@ -12,12 +12,15 @@ using TJAPlayer3;
namespace TJAPlayer3 namespace TJAPlayer3
{ {
[Serializable]
public class CScoreIni public class CScoreIni
{ {
// プロパティ // プロパティ
// [File] セクション // [File] セクション
public STファイル stファイル; public STファイル stファイル;
[Serializable]
[StructLayout( LayoutKind.Sequential )] [StructLayout( LayoutKind.Sequential )]
public struct STファイル public struct STファイル
{ {
@ -42,6 +45,8 @@ namespace TJAPlayer3
// 演奏記録セクション9種類 // 演奏記録セクション9種類
public STセクション stセクション; public STセクション stセクション;
[Serializable]
[StructLayout( LayoutKind.Sequential )] [StructLayout( LayoutKind.Sequential )]
public struct STセクション public struct STセクション
{ {
@ -161,6 +166,8 @@ namespace TJAPlayer3
E = 6, E = 6,
UNKNOWN = 99 UNKNOWN = 99
} }
[Serializable]
public class C演奏記録 public class C演奏記録
{ {
public STAUTOPLAY bAutoPlay; public STAUTOPLAY bAutoPlay;

View File

@ -42,6 +42,7 @@ namespace TJAPlayer3
#endregion #endregion
[Serializable]
public class Data public class Data
{ {
public string id = ""; public string id = "";

View File

@ -9,6 +9,7 @@ using System.Threading;
using TJAPlayer3.C曲リストードComparers; using TJAPlayer3.C曲リストードComparers;
using FDK; using FDK;
using System.Drawing; using System.Drawing;
using System.Security.Cryptography;
namespace TJAPlayer3 namespace TJAPlayer3
{ {
@ -47,8 +48,7 @@ namespace TJAPlayer3
get; get;
set; set;
} }
/*[NonSerialized] public Dictionary<string, C曲リストード> listSongsDB; // songs.dbから構築されるlist
public List<Cスコア> listSongsDB;*/ // songs.dbから構築されるlist
public List<C曲リストード> list曲ルート; // 起動時にフォルダ検索して構築されるlist public List<C曲リストード> list曲ルート; // 起動時にフォルダ検索して構築されるlist
public List<C曲リストード> list曲ルート_Dan = new List<C曲リストード>(); // 起動時にフォルダ検索して構築されるlist public List<C曲リストード> list曲ルート_Dan = new List<C曲リストード>(); // 起動時にフォルダ検索して構築されるlist
public List<C曲リストード> list曲ルート_Tower = new List<C曲リストード>(); // 起動時にフォルダ検索して構築されるlist public List<C曲リストード> list曲ルート_Tower = new List<C曲リストード>(); // 起動時にフォルダ検索して構築されるlist
@ -83,7 +83,7 @@ namespace TJAPlayer3
public CSongs管理() public CSongs管理()
{ {
//this.listSongsDB = new List<Cスコア>(); this.listSongsDB = new ();
this.list曲ルート = new List<C曲リストード>(); this.list曲ルート = new List<C曲リストード>();
this.n検索された曲ード数 = 0; this.n検索された曲ード数 = 0;
this.n検索されたスコア数 = 0; this.n検索されたスコア数 = 0;
@ -151,7 +151,6 @@ namespace TJAPlayer3
t曲を検索してリストを作成する(path, true, downloadBox.list子リスト, downloadBox); t曲を検索してリストを作成する(path, true, downloadBox.list子リスト, downloadBox);
this.t曲リストへ後処理を適用する(downloadBox.list子リスト, $"/{downloadBox.strタイトル}/"); this.t曲リストへ後処理を適用する(downloadBox.list子リスト, $"/{downloadBox.strタイトル}/");
tSongsDBになかった曲をファイルから読み込んで反映する(downloadBox.list子リスト);
downloadBox.list子リスト.Insert(0, CSongDict.tGenerateBackButton(downloadBox, $"/{downloadBox.strタイトル}/")); downloadBox.list子リスト.Insert(0, CSongDict.tGenerateBackButton(downloadBox, $"/{downloadBox.strタイトル}/"));
} }
} }
@ -204,7 +203,6 @@ namespace TJAPlayer3
#region[ ] #region[ ]
CDTX dtx = new CDTX( fileinfo.FullName, false, 1.0, 0, 1 );
C曲リストード c曲リストード = new C曲リストード(); C曲リストード c曲リストード = new C曲リストード();
c曲リストード.eード種別 = C曲リストード.Eード種別.SCORE; c曲リストード.eード種別 = C曲リストード.Eード種別.SCORE;
@ -212,6 +210,7 @@ namespace TJAPlayer3
bool b = false; bool b = false;
for( int n = 0; n < (int)Difficulty.Total; n++ ) for( int n = 0; n < (int)Difficulty.Total; n++ )
{ {
CDTX dtx = new CDTX( fileinfo.FullName, false, 1.0, 0, 1 );
if( dtx.b譜面が存在する[ n ] ) if( dtx.b譜面が存在する[ n ] )
{ {
c曲リストード.nスコア数++; c曲リストード.nスコア数++;
@ -284,6 +283,9 @@ namespace TJAPlayer3
c曲リストード.arスコア[ n ].ScoreIni情報. = infoScoreIni.Length; c曲リストード.arスコア[ n ].ScoreIni情報. = infoScoreIni.Length;
c曲リストード.arスコア[ n ].ScoreIni情報. = infoScoreIni.LastWriteTime; c曲リストード.arスコア[ n ].ScoreIni情報. = infoScoreIni.LastWriteTime;
} }
LoadChartInfo(c曲リストード, dtx, n);
if( b == false ) if( b == false )
{ {
this.n検索されたスコア数++; this.n検索されたスコア数++;
@ -293,7 +295,6 @@ namespace TJAPlayer3
} }
} }
} }
dtx = null;
} }
#endregion #endregion
} }
@ -332,7 +333,30 @@ namespace TJAPlayer3
//} //}
#region[ ] #region[ ]
CDTX dtx = new CDTX( str基点フォルダ + fileinfo.Name, false, 1.0, 0, 0 );
string filePath = str基点フォルダ + fileinfo.Name;
using SHA1 hashProvider = SHA1.Create();
var fs = File.OpenRead(filePath);
byte[] rawhash = hashProvider.ComputeHash(fs);
string hash = "";
for (int i = 0; i < rawhash.Length; i++) {
hash += string.Format("{0:X2}", rawhash[i]);
}
fs.Dispose();
if (listSongsDB.TryGetValue(filePath + hash, out C曲リストード value))
{
this.n検索されたスコア数++;
listードリスト.Add( value );
CSongDict.tAddSongNode(value.uniqueId, value);
value.r親ード = node親;
this.n検索された曲ード数++;
}
else
{
CDTX dtx = new CDTX(filePath , false, 1.0, 0, 0 );
C曲リストード c曲リストード = new C曲リストード(); C曲リストード c曲リストード = new C曲リストード();
c曲リストード.eード種別 = C曲リストード.Eード種別.SCORE; c曲リストード.eード種別 = C曲リストード.Eード種別.SCORE;
@ -352,8 +376,19 @@ namespace TJAPlayer3
c曲リストード.nSide = dtx.SIDE; c曲リストード.nSide = dtx.SIDE;
c曲リストード.bExplicit = dtx.EXPLICIT; c曲リストード.bExplicit = dtx.EXPLICIT;
if (dtx.TITLE == "例2")
{
}
c曲リストード.DanSongs = new ();
if (dtx.List_DanSongs != null) if (dtx.List_DanSongs != null)
c曲リストード.DanSongs = dtx.List_DanSongs; {
for(int i = 0; i < dtx.List_DanSongs.Count; i++)
{
c曲リストード.DanSongs.Add(dtx.List_DanSongs[i]);
}
}
if (dtx.Dan_C != null) if (dtx.Dan_C != null)
c曲リストード.Dan_C = dtx.Dan_C; c曲リストード.Dan_C = dtx.Dan_C;
@ -493,10 +528,14 @@ namespace TJAPlayer3
c曲リストード.arスコア[ n ].ScoreIni情報. = infoScoreIni.Length; c曲リストード.arスコア[ n ].ScoreIni情報. = infoScoreIni.Length;
c曲リストード.arスコア[ n ].ScoreIni情報. = infoScoreIni.LastWriteTime; c曲リストード.arスコア[ n ].ScoreIni情報. = infoScoreIni.LastWriteTime;
} }
LoadChartInfo(c曲リストード, dtx, n);
if( b == false ) if( b == false )
{ {
this.n検索されたスコア数++; this.n検索されたスコア数++;
listードリスト.Add( c曲リストード ); listードリスト.Add( c曲リストード );
if (!listSongsDB.ContainsKey(filePath + hash)) listSongsDB.Add(filePath + hash, c曲リストード );
this.n検索された曲ード数++; this.n検索された曲ード数++;
b = true; b = true;
} }
@ -528,6 +567,7 @@ namespace TJAPlayer3
} }
} }
} }
}
#endregion #endregion
} }
} }
@ -732,27 +772,7 @@ namespace TJAPlayer3
//----------------- //-----------------
#endregion #endregion
#region [ SongsDBになかった曲をファイルから読み込んで反映する ] private void LoadChartInfo(C曲リストード c曲リストード, CDTX cdtx, int i)
//-----------------
public void tSongsDBになかった曲をファイルから読み込んで反映する()
{
this.nファイルから反映できたスコア数 = 0;
this.tSongsDBになかった曲をファイルから読み込んで反映する( this.list曲ルート );
}
private void tSongsDBになかった曲をファイルから読み込んで反映する( List<C曲リストード> )
{
foreach( C曲リストード c曲リストード in )
{
SlowOrSuspendSearchTask(); // #27060 中断要求があったら、解除要求が来るまで待機, #PREMOVIE再生中は検索負荷を落とす
if( c曲リストード.eード種別 == C曲リストード.Eード種別.BOX )
{
this.tSongsDBになかった曲をファイルから読み込んで反映する( c曲リストード.list子リスト );
}
else if( ( c曲リストード.eード種別 == C曲リストード.Eード種別.SCORE )
|| ( c曲リストード.eード種別 == C曲リストード.Eード種別.SCORE_MIDI ) )
{
for( int i = 0; i < (int)Difficulty.Total; i++ )
{ {
if( ( c曲リストード.arスコア[ i ] != null ) && !c曲リストード.arスコア[ i ].bSongDBにキャッシュがあった ) if( ( c曲リストード.arスコア[ i ] != null ) && !c曲リストード.arスコア[ i ].bSongDBにキャッシュがあった )
{ {
@ -763,10 +783,6 @@ namespace TJAPlayer3
{ {
try try
{ {
CDTX cdtx = new CDTX( c曲リストード.arスコア[ i ].., true, 0, 0, 0 );
if( File.Exists( c曲リストード.arスコア[ i ].. + "set.def" ) )
cdtx = new CDTX( c曲リストード.arスコア[ i ].., true, 0, 0, 1 );
c曲リストード.arスコア[ i ].. = cdtx.TITLE; c曲リストード.arスコア[ i ].. = cdtx.TITLE;
@ -866,12 +882,7 @@ namespace TJAPlayer3
//----------------- //-----------------
try try
{ {
var scoreIniPath = c曲リストード.arスコア[i]..;// + ".score.ini"; this.tScoreIniを読み込んで譜面情報を設定する(c曲リストード.arスコア[i].., c曲リストード.arスコア[i]);
if( File.Exists( scoreIniPath ) )
{
this.tScoreIniを読み込んで譜面情報を設定する(scoreIniPath, c曲リストード.arスコア[i]);
}
// Legacy save files from DTX mania // Legacy save files from DTX mania
/* /*
else else
@ -894,11 +905,6 @@ namespace TJAPlayer3
#endregion #endregion
} }
} }
}
}
}
//-----------------
#endregion
#region [ ] #region [ ]
//----------------- //-----------------
@ -953,14 +959,18 @@ namespace TJAPlayer3
this.t曲リストへ後処理を適用する(this.list曲ルート); this.t曲リストへ後処理を適用する(this.list曲ルート);
foreach (C曲リストード c曲リストード in list曲ルート) for (int p = 0; p < list曲ルート.Count; p++)
{ {
var c曲リストード = list曲ルート[p];
if (c曲リストード.eード種別 == C曲リストード.Eード種別.BOX) if (c曲リストード.eード種別 == C曲リストード.Eード種別.BOX)
{ {
if (c曲リストード.strジャンル == "段位道場") if (c曲リストード.strジャンル == "段位道場")
{ {
if (TJAPlayer3.ConfigIni.bDanTowerHide) if (TJAPlayer3.ConfigIni.bDanTowerHide)
{
list曲ルート.Remove(c曲リストード); list曲ルート.Remove(c曲リストード);
p--;
}
// Add to dojo // Add to dojo
list曲ルート_Dan = c曲リストード.list子リスト; list曲ルート_Dan = c曲リストード.list子リスト;
@ -978,7 +988,10 @@ namespace TJAPlayer3
else if (c曲リストード.strジャンル == "太鼓タワー") else if (c曲リストード.strジャンル == "太鼓タワー")
{ {
if (TJAPlayer3.ConfigIni.bDanTowerHide) if (TJAPlayer3.ConfigIni.bDanTowerHide)
{
list曲ルート.Remove(c曲リストード); list曲ルート.Remove(c曲リストード);
p--;
}
list曲ルート_Tower = c曲リストード.list子リスト; list曲ルート_Tower = c曲リストード.list子リスト;
} }
@ -1461,6 +1474,38 @@ Debug.WriteLine( dBPM + ":" + c曲リストード.strタイトル );
{ {
//var ini = new CScoreIni( strScoreIniファイルパス ); //var ini = new CScoreIni( strScoreIniファイルパス );
/*
CScoreIni getScoreIni(string filePath)
{
if (!File.Exists(filePath))
{
var result = new CScoreIni(filePath);
return result;
}
using SHA1 hashProvider = SHA1.Create();
var fs = File.OpenRead(filePath);
byte[] rawhash = hashProvider.ComputeHash(fs);
string hash = "";
for (int i = 0; i < rawhash.Length; i++) {
hash += string.Format("{0:X2}", rawhash[i]);
}
fs.Dispose();
if (listScoreDB.TryGetValue(hash, out CScoreIni value))
{
return value;
}
else
{
var result = new CScoreIni(filePath);
listScoreDB.Add(hash, result);
return result;
}
}
*/
CScoreIni[] csi = CScoreIni[] csi =
{ {
//new CScoreIni(fp[mainFile]), //new CScoreIni(fp[mainFile]),

View File

@ -8,6 +8,7 @@ namespace TJAPlayer3
/// <summary> /// <summary>
/// 段位認定を管理するクラス。 /// 段位認定を管理するクラス。
/// </summary> /// </summary>
[Serializable]
public class Dan_C public class Dan_C
{ {
public Dan_C() public Dan_C()

View File

@ -59,6 +59,7 @@ namespace TJAPlayer3
{ {
if ( this.IsDeActivated ) if ( this.IsDeActivated )
return; return;
base.DeActivate(); base.DeActivate();
this.ctNowEnumeratingSongs = null; this.ctNowEnumeratingSongs = null;
} }

View File

@ -289,47 +289,6 @@ namespace TJAPlayer3
Trace.TraceInformation( "コンパクトモードなので残りの起動処理は省略します。" ); Trace.TraceInformation( "コンパクトモードなので残りの起動処理は省略します。" );
return; return;
} }
#region [ 00) songlist.dbの読み込みによる曲リストの構築 ]
//-----------------------------
TJAPlayer3.stage起動.eフェーズID = CStage.Eフェーズ.00_songlistから曲リストを作成する;
Trace.TraceInformation( "1) songlist.dbを読み込みます。" );
Trace.Indent();
try
{
if ( !TJAPlayer3.ConfigIni.bConfigIniがないかDTXManiaのバージョンが異なる )
{
CSongs管理 s = new CSongs管理();
s = Deserialize( strPathSongList ); // 直接this.Songs管理にdeserialize()結果を代入するのは避ける。nullにされてしまうことがあるため。
if ( s != null )
{
this.Songs管理 = s;
}
int scores = this.Songs管理.n検索されたスコア数;
Trace.TraceInformation( "songlist.db の読み込みを完了しました。[{0}スコア]", scores );
lock ( TJAPlayer3.stage起動.list進行文字列 )
{
TJAPlayer3.stage起動.list進行文字列.Add( "SONG LIST...OK" );
}
}
else
{
Trace.TraceInformation( "初回の起動であるかまたはDTXManiaのバージョンが上がったため、songlist.db の読み込みをスキップします。" );
lock ( TJAPlayer3.stage起動.list進行文字列 )
{
TJAPlayer3.stage起動.list進行文字列.Add( "SONG LIST...SKIPPED" );
}
}
}
finally
{
Trace.Unindent();
}
#endregion
} }
finally finally
{ {
@ -359,6 +318,7 @@ namespace TJAPlayer3
try try
{ {
Deserialize();
#region [ 2) ] #region [ 2) ]
//----------------------------- //-----------------------------
@ -426,6 +386,7 @@ namespace TJAPlayer3
//----------------------------- //-----------------------------
// base.eフェーズID = CStage.Eフェーズ.起動4_スコアキャッシュになかった曲をファイルから読み込んで反映する; // base.eフェーズID = CStage.Eフェーズ.起動4_スコアキャッシュになかった曲をファイルから読み込んで反映する;
/*
int num2 = this.Songs管理.n検索されたスコア数 - this.Songs管理.nスコアキャッシュから反映できたスコア数; int num2 = this.Songs管理.n検索されたスコア数 - this.Songs管理.nスコアキャッシュから反映できたスコア数;
Trace.TraceInformation( "{0}, {1}", this.Songs管理.n検索されたスコア数, this.Songs管理.nスコアキャッシュから反映できたスコア数 ); Trace.TraceInformation( "{0}, {1}", this.Songs管理.n検索されたスコア数, this.Songs管理.nスコアキャッシュから反映できたスコア数 );
@ -450,6 +411,7 @@ namespace TJAPlayer3
// { // {
// this.list進行文字列.Add( string.Format( "{0} ... {1}/{2}", "Loading score properties from files", CDTXMania.Songs管理_裏読.nファイルから反映できたスコア数, CDTXMania.Songs管理_裏読.n検索されたスコア数 - cs.nスコアキャッシュから反映できたスコア数 ) ); // this.list進行文字列.Add( string.Format( "{0} ... {1}/{2}", "Loading score properties from files", CDTXMania.Songs管理_裏読.nファイルから反映できたスコア数, CDTXMania.Songs管理_裏読.n検索されたスコア数 - cs.nスコアキャッシュから反映できたスコア数 ) );
// } // }
*/
//----------------------------- //-----------------------------
#endregion #endregion
#region [ 5) ] #region [ 5) ]
@ -485,7 +447,7 @@ namespace TJAPlayer3
Trace.TraceInformation( "enum7) 曲データの情報を songlist.db へ出力します。" ); Trace.TraceInformation( "enum7) 曲データの情報を songlist.db へ出力します。" );
Trace.Indent(); Trace.Indent();
SerializeSongList( this.Songs管理, strPathSongList ); SerializeSongList();
Trace.TraceInformation("songlist.db への出力を完了しました。"); Trace.TraceInformation("songlist.db への出力を完了しました。");
Trace.Unindent(); Trace.Unindent();
//----------------------------- //-----------------------------
@ -507,42 +469,15 @@ namespace TJAPlayer3
} }
#pragma warning disable SYSLIB0011
/// <summary> /// <summary>
/// 曲リストのserialize /// 曲リストのserialize
/// </summary> /// </summary>
private static void SerializeSongList( CSongs管理 cs, string strPathSongList ) private void SerializeSongList()
{ {
bool bSucceededSerialize = true; BinaryFormatter songlistdb_ = new BinaryFormatter();
try using Stream songlistdb = File.OpenWrite($"{TJAPlayer3.strEXEのあるフォルダ}songlist.db");
{ songlistdb_.Serialize(songlistdb, Songs管理.listSongsDB);
using(StreamWriter stream = new StreamWriter(strPathSongList))
{
string temp = JsonSerializer.Serialize(cs);
stream.Write(temp);
}
}
catch ( Exception e )
{
bSucceededSerialize = false;
Trace.TraceError( e.ToString() );
Trace.TraceError( "例外が発生しましたが処理を継続します。 (9ad477a4-d922-412c-b87d-e3a49a608e92)" );
}
finally
{
if ( !bSucceededSerialize )
{
try
{
File.Delete( strPathSongList ); // serializeに失敗したら、songs2.dbファイルを消しておく
}
catch ( Exception e )
{
Trace.TraceError( e.ToString() );
Trace.TraceError( "例外が発生しましたが処理を継続します。 (62860c67-b44f-46f4-b4fc-999c6fe18cce)" );
}
}
}
} }
/// <summary> /// <summary>
@ -550,42 +485,25 @@ namespace TJAPlayer3
/// </summary> /// </summary>
/// <param name="songs管理"></param> /// <param name="songs管理"></param>
/// <param name="strPathSongList"></param> /// <param name="strPathSongList"></param>
private CSongs管理 Deserialize( string strPathSongList ) public void Deserialize()
{ {
try try
{ {
#region [ SongListDB(songlist.db) ] if (File.Exists($"{TJAPlayer3.strEXEのあるフォルダ}songlist.db"))
if (!File.Exists(strPathSongList))
{ {
return null; BinaryFormatter songlistdb_ = new BinaryFormatter();
using Stream songlistdb = File.OpenRead($"{TJAPlayer3.strEXEのあるフォルダ}songlist.db");
this.Songs管理.listSongsDB = (Dictionary<string, C曲リストード>)songlistdb_.Deserialize(songlistdb);
} }
}
// byte[] buf = File.ReadAllBytes( SongListDBファイル名 ); // 一旦メモリにまとめ読みしてからdeserializeした方が高速かと思ったら全く変わらなかったので削除 catch(Exception exception)
// using ( MemoryStream input = new MemoryStream(buf, false) )
using ( StreamReader input = new StreamReader(strPathSongList) )
{ {
try this.Songs管理.listSongsDB = new();
}
finally
{ {
return JsonSerializer.Deserialize<CSongs管理>(input.ReadToEnd());
}
catch ( Exception e )
{
// songs管理 = null;
Trace.TraceError( e.ToString() );
Trace.TraceError( "例外が発生しましたが処理を継続します。 (a4289e34-7140-4b67-b821-3b5370a725e1)" );
} }
} }
#endregion #pragma warning restore SYSLIB0011
}
catch (Exception e)
{
Trace.TraceError( "songlist.db の読み込みに失敗しました。" );
Trace.TraceError( e.ToString() );
Trace.TraceError( "例外が発生しましたが処理を継続します。 (5a907ed2-f849-4bc4-acd0-d2a6aa3c9c87)" );
}
return null;
}
} }
} }

View File

@ -113,15 +113,8 @@ namespace TJAPlayer3
public override void CreateManagedResource() public override void CreateManagedResource()
{ {
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName)) this.pfMenuTitle = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Title_ModeSelect_Title_Scale[0]);
this.pfMenuTitle = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Title_ModeSelect_Title_Scale[0]); this.pfBoxText = HPrivateFastFont.tInstantiateBoxFont(TJAPlayer3.Skin.Title_ModeSelect_Title_Scale[1]);
else
this.pfMenuTitle = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Title_ModeSelect_Title_Scale[0]);
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.BoxFontName))
this.pfBoxText = new CCachedFontRenderer(TJAPlayer3.ConfigIni.BoxFontName, TJAPlayer3.Skin.Title_ModeSelect_Title_Scale[1]);
else
this.pfBoxText = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Title_ModeSelect_Title_Scale[1]);
base.CreateManagedResource(); base.CreateManagedResource();
} }

View File

@ -1002,10 +1002,7 @@ namespace TJAPlayer3
} }
public override void CreateManagedResource() public override void CreateManagedResource()
{ {
if ( !string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName)) this.prvFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Config_Font_Scale); // t項目リストの設定 の前に必要
this.prvFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Config_Font_Scale); // t項目リストの設定 の前に必要
else
this.prvFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Config_Font_Scale);
//this.tx通常項目行パネル = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\4_itembox.png" ), false ); //this.tx通常項目行パネル = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\4_itembox.png" ), false );
//this.txその他項目行パネル = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\4_itembox other.png" ), false ); //this.txその他項目行パネル = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\4_itembox other.png" ), false );

View File

@ -146,7 +146,7 @@ namespace TJAPlayer3
txMenuItemLeft = new CTexture[strMenuItem.Length, 2]; txMenuItemLeft = new CTexture[strMenuItem.Length, 2];
using (var prvFont = new CCachedFontRenderer(string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName) ? CFontRenderer.DefaultFontName : TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Config_Font_Scale)) using (var prvFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Config_Font_Scale))
{ {
for (int i = 0; i < strMenuItem.Length; i++) for (int i = 0; i < strMenuItem.Length; i++)
{ {
@ -172,9 +172,9 @@ namespace TJAPlayer3
public override void CreateManagedResource() // OPTIONと画像以外共通 public override void CreateManagedResource() // OPTIONと画像以外共通
{ {
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName)) if (HPrivateFastFont.FontExists(TJAPlayer3.Skin.FontName))
{ {
this.ftフォント = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, (int)TJAPlayer3.Skin.Config_Font_Scale_Description, CFontRenderer.FontStyle.Bold); this.ftフォント = new CCachedFontRenderer(TJAPlayer3.Skin.FontName, (int)TJAPlayer3.Skin.Config_Font_Scale_Description, CFontRenderer.FontStyle.Bold);
} }
else else
{ {

View File

@ -73,15 +73,8 @@ namespace TJAPlayer3
public override void CreateManagedResource() public override void CreateManagedResource()
{ {
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName)) this.pfDanSong = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.DaniSelect_Font_DanSong_Size);
pfDanSong = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.DaniSelect_Font_DanSong_Size); this.pfExamFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.DaniSelect_Font_Exam_Size);
else
pfDanSong = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.DaniSelect_Font_DanSong_Size);
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
this.pfExamFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.DaniSelect_Font_Exam_Size);
else
this.pfExamFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.DaniSelect_Font_Exam_Size);
base.CreateManagedResource(); base.CreateManagedResource();
} }
@ -337,7 +330,7 @@ namespace TJAPlayer3
)); ));
if (pfDanPlateTitle == null) if (pfDanPlateTitle == null)
pfDanPlateTitle = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.DaniSelect_DanPlateTitle_Size); pfDanPlateTitle = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.DaniSelect_DanPlateTitle_Size);
string titleTmp = ""; string titleTmp = "";
@ -358,7 +351,7 @@ namespace TJAPlayer3
public static void tDisplayDanIcon(int count, float x, float y, int opacity, float scale, bool showFade = false) public static void tDisplayDanIcon(int count, float x, float y, int opacity, float scale, bool showFade = false)
{ {
if (pfDanIconTitle == null) if (pfDanIconTitle == null)
pfDanIconTitle = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.DaniSelect_DanIconTitle_Size); pfDanIconTitle = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.DaniSelect_DanIconTitle_Size);
string ex = "th"; string ex = "th";
switch (count) switch (count)

View File

@ -140,7 +140,7 @@ namespace TJAPlayer3
} }
public override void CreateManagedResource() public override void CreateManagedResource()
{ {
OptionFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.SongSelect_Option_Font_Scale); OptionFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.SongSelect_Option_Font_Scale);
base.CreateManagedResource(); base.CreateManagedResource();
} }

View File

@ -45,16 +45,8 @@ namespace TJAPlayer3
public override void CreateManagedResource() public override void CreateManagedResource()
{ {
// Ressource allocation // Ressource allocation
pfTitleFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.SongSelect_DanInfo_Title_Size);
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName)) pfExamFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.SongSelect_DanInfo_Exam_Size);
pfTitleFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.SongSelect_DanInfo_Title_Size);
else
pfTitleFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.SongSelect_DanInfo_Title_Size);
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
pfExamFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.SongSelect_DanInfo_Exam_Size);
else
pfExamFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.SongSelect_DanInfo_Exam_Size);
base.CreateManagedResource(); base.CreateManagedResource();
} }

View File

@ -96,10 +96,7 @@ namespace TJAPlayer3
{ {
if (prvFont == null) if (prvFont == null)
{ {
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName)) prvFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.PopupMenu_Font_Size);
prvFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.PopupMenu_Font_Size);
else
prvFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.PopupMenu_Font_Size);
} }
} }

View File

@ -1008,8 +1008,7 @@ namespace TJAPlayer3
} }
public override void CreateManagedResource() public override void CreateManagedResource()
{ {
CFontRenderer.FontStyle regular = CFontRenderer.FontStyle.Regular; this.ft曲リスト用フォント = HPrivateFastFont.tInstantiateMainFont(40);
this.ft曲リスト用フォント = new CCachedFontRenderer( TJAPlayer3.ConfigIni.FontName, 40, regular );
int c = ( CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja" ) ? 0 : 1; int c = ( CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja" ) ? 0 : 1;
@ -2957,7 +2956,7 @@ namespace TJAPlayer3
{ {
if (i >= 2) continue; if (i >= 2) continue;
displayTowerStatus(x + TJAPlayer3.Skin.SongSelect_DanStatus_Offset_X[i], y + TJAPlayer3.Skin.SongSelect_DanStatus_Offset_Y[i], Math.Min([i][0], 7) - 1, 0.3f); displayTowerStatus(x + TJAPlayer3.Skin.SongSelect_TowerStatus_Offset_X[i], y + TJAPlayer3.Skin.SongSelect_TowerStatus_Offset_Y[i], Math.Min([i][0], 7) - 1, 0.3f);
} }
} }
else else
@ -2968,7 +2967,7 @@ namespace TJAPlayer3
{ {
if (i >= 2) continue; if (i >= 2) continue;
displayRegularCrowns(x + TJAPlayer3.Skin.SongSelect_DanStatus_Offset_X[i], y + TJAPlayer3.Skin.SongSelect_DanStatus_Offset_Y[i], [i], [i], 0.8f); displayRegularCrowns(x + TJAPlayer3.Skin.SongSelect_RegularCrowns_Offset_X[i], y + TJAPlayer3.Skin.SongSelect_RegularCrowns_Offset_Y[i], [i], [i], 0.8f);
} }
} }

View File

@ -151,16 +151,8 @@ namespace TJAPlayer3
} }
public override void CreateManagedResource() public override void CreateManagedResource()
{ {
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName)) this.pfTitle = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.SongSelect_MusicName_Scale);
{ this.pfSubTitle = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.SongSelect_Subtitle_Scale);
this.pfTitle = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.SongSelect_MusicName_Scale);
this.pfSubTitle = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.SongSelect_Subtitle_Scale);
}
else
{
this.pfTitle = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.SongSelect_MusicName_Scale);
this.pfSubTitle = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.SongSelect_Subtitle_Scale);
}
// this.soundSelectAnnounce = TJAPlayer3.Sound管理.tサウンドを生成する( CSkin.Path( @"Sounds{Path.DirectorySeparatorChar}DiffSelect.ogg" ), ESoundGroup.SoundEffect ); // this.soundSelectAnnounce = TJAPlayer3.Sound管理.tサウンドを生成する( CSkin.Path( @"Sounds{Path.DirectorySeparatorChar}DiffSelect.ogg" ), ESoundGroup.SoundEffect );

View File

@ -181,27 +181,10 @@ namespace TJAPlayer3
} }
public override void CreateManagedResource() public override void CreateManagedResource()
{ {
if( !string.IsNullOrEmpty( TJAPlayer3.ConfigIni.FontName ) ) this.pfTITLE = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.SongLoading_Title_FontSize );
{ this.pfSUBTITLE = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.SongLoading_SubTitle_FontSize);
this.pfTITLE = new CCachedFontRenderer( TJAPlayer3.ConfigIni.FontName , TJAPlayer3.Skin.SongLoading_Title_FontSize ); pfDanTitle = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Game_DanC_Title_Size);
this.pfSUBTITLE = new CCachedFontRenderer( TJAPlayer3.ConfigIni.FontName , TJAPlayer3.Skin.SongLoading_SubTitle_FontSize); pfDanSubTitle = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Game_DanC_SubTitle_Size);
}
else
{
this.pfTITLE = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.SongLoading_Title_FontSize);
this.pfSUBTITLE = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.SongLoading_SubTitle_FontSize);
}
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
{
pfDanTitle = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Game_DanC_Title_Size);
pfDanSubTitle = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Game_DanC_SubTitle_Size);
}
else
{
pfDanTitle = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Game_DanC_Title_Size);
pfDanSubTitle = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Game_DanC_SubTitle_Size);
}
this.tx背景 = TJAPlayer3.tテクスチャの生成( this.strSTAGEFILE, false ); this.tx背景 = TJAPlayer3.tテクスチャの生成( this.strSTAGEFILE, false );
//this.txSongnamePlate = CDTXMania.tテクスチャの生成( CSkin.Path( @$"Graphics{Path.DirectorySeparatorChar}6_SongnamePlate.png" ) ); //this.txSongnamePlate = CDTXMania.tテクスチャの生成( CSkin.Path( @$"Graphics{Path.DirectorySeparatorChar}6_SongnamePlate.png" ) );

View File

@ -147,10 +147,7 @@ namespace TJAPlayer3
this.txGENRE.color4 = CConversion.ColorToColor4(stageColor); this.txGENRE.color4 = CConversion.ColorToColor4(stageColor);
} }
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName)) pfGENRE = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Game_GenreText_FontSize);
pfGENRE = new CCachedFontRenderer(TJAPlayer3.ConfigIni.BoxFontName, TJAPlayer3.Skin.Game_GenreText_FontSize);
else
pfGENRE = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Game_GenreText_FontSize);
this.ttkGENRE = new TitleTextureKey(genreName, this.pfGENRE, Color.White, Color.Black, 1000); this.ttkGENRE = new TitleTextureKey(genreName, this.pfGENRE, Color.White, Color.Black, 1000);

View File

@ -100,6 +100,7 @@ namespace TJAPlayer3
public override void Activate() public override void Activate()
{ {
listChip = new List<CDTX.CChip>[ 5 ]; listChip = new List<CDTX.CChip>[ 5 ];
List<CDTX.CChip>[] balloonChips = new List<CDTX.CChip>[5];
for( int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++ ) for( int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++ )
{ {
nNoteCount[i] = 0; nNoteCount[i] = 0;
@ -126,6 +127,20 @@ namespace TJAPlayer3
break; break;
} }
if (TJAPlayer3.ConfigIni.nPlayerCount >= 2)
{
balloonChips[i] = new();
for(int j = 0; j < listChip[i].Count; j++)
{
var chip = listChip[i][j];
if (NotesManager.IsGenericBalloon(chip))
{
balloonChips[i].Add(chip);
}
}
}
int n整数値管理 = 0; int n整数値管理 = 0;
if (r指定時刻に一番近い未ヒットChipを過去方向優先で検索する(0, i) != null) //2020.07.08 Mr-Ojii 未ヒットチップがないときの例外の発生回避 <-(KabanFriends)コード借りましたごめんなさい(´・ω・`) if (r指定時刻に一番近い未ヒットChipを過去方向優先で検索する(0, i) != null) //2020.07.08 Mr-Ojii 未ヒットチップがないときの例外の発生回避 <-(KabanFriends)コード借りましたごめんなさい(´・ω・`)
{ {
@ -168,6 +183,58 @@ namespace TJAPlayer3
break; break;
} }
if (TJAPlayer3.ConfigIni.nPlayerCount >= 2)
{
for(int j = 0; j < balloonChips[i].Count; j++)
{
var chip = balloonChips[i][j];
if (NotesManager.IsKusudama(chip))
{
for(int p = 0; p < TJAPlayer3.ConfigIni.nPlayerCount; p++)
{
if (p == i) continue;
var chip2 = balloonChips[p].Find(x => Math.Abs(x.db発声時刻ms - chip.db発声時刻ms) < 100);
if (chip2 == null)
{
var chip3 = listChip[p].Find(x => Math.Abs(x.db発声時刻ms - chip.db発声時刻ms) < 100);
if (!NotesManager.IsKusudama(chip3))
{
chip.nチャンネル番号 = 0x17;
}
}
else if (!NotesManager.IsKusudama(chip2))
{
chip.nチャンネル番号 = 0x17;
}
}
}
}
/*
for(int p = 0; p < TJAPlayer3.ConfigIni.nPlayerCount; p++)
{
for(int j = 0; j < balloonChips[p].Count; j++)
{
var chip = balloonChips[i].Find(x => Math.Abs(x.db発声時刻ms - balloonChips[p][j].db発声時刻ms) < 100);
if (chip == null)
{
var chip2 = listChip[i].Find(x => Math.Abs(x.db発声時刻ms - balloonChips[p][j].db発声時刻ms) < 100);
if (NotesManager.IsKusudama(chip2))
{
chip.nチャンネル番号 = NotesManager.GetNoteValueFromChar("7");
}
}
else if (NotesManager.IsKusudama(chip) && !NotesManager.IsKusudama(balloonChips[p][j]))
{
chip.nチャンネル番号 = balloonChips[p][j].nチャンネル番号;
}
}
}
*/
}
int _totalNotes = 0; int _totalNotes = 0;
int _totalBalloons = 0; int _totalBalloons = 0;
double _totalRolls = 0; double _totalRolls = 0;
@ -202,7 +269,7 @@ namespace TJAPlayer3
_totalBalloons += Math.Min(_chip.nBalloon, _expectedHits); _totalBalloons += Math.Min(_chip.nBalloon, _expectedHits);
} }
if (NotesManager.IsRoll(_chip)) if (NotesManager.IsRoll(_chip) || NotesManager.IsFuzeRoll(_chip))
_totalRolls += (_chip.nーツ終了時刻ms - _chip.n発声時刻ms) / 1000.0; _totalRolls += (_chip.nーツ終了時刻ms - _chip.n発声時刻ms) / 1000.0;
} }
@ -363,6 +430,8 @@ namespace TJAPlayer3
this.bUseBranch = new bool[]{ false, false, false, false, false }; this.bUseBranch = new bool[]{ false, false, false, false, false };
this.n現在のコース = new CDTX.ECourse[5]; this.n現在のコース = new CDTX.ECourse[5];
this.n次回のコース = new CDTX.ECourse[5]; this.n次回のコース = new CDTX.ECourse[5];
nCurrentKusudamaRollCount = 0;
nCurrentKusudamaCount = 0;
for (int i = 0; i < 5; i++) for (int i = 0; i < 5; i++)
{ {
@ -933,6 +1002,8 @@ namespace TJAPlayer3
public double nBranch条件数値A; public double nBranch条件数値A;
public double nBranch条件数値B; public double nBranch条件数値B;
private readonly int[] NowProcessingChip = new int[] { 0, 0, 0, 0, 0 }; private readonly int[] NowProcessingChip = new int[] { 0, 0, 0, 0, 0 };
protected int nCurrentKusudamaRollCount;
protected int nCurrentKusudamaCount;
private float _AIBattleState; private float _AIBattleState;
private Queue<float>[] _AIBattleStateBatch; private Queue<float>[] _AIBattleStateBatch;
@ -1161,7 +1232,7 @@ namespace TJAPlayer3
pChip.nLag = (int) ( nTime - pChip.n発声時刻ms ); // #23580 2011.1.3 yyagi: add "nInputAdjustTime" to add input timing adjust feature pChip.nLag = (int) ( nTime - pChip.n発声時刻ms ); // #23580 2011.1.3 yyagi: add "nInputAdjustTime" to add input timing adjust feature
int nDeltaTime = Math.Abs( pChip.nLag ); int nDeltaTime = Math.Abs( pChip.nLag );
//Debug.WriteLine("nAbsTime=" + (nTime - pChip.n発声時刻ms) + ", nDeltaTime=" + (nTime + nInputAdjustTime - pChip.n発声時刻ms)); //Debug.WriteLine("nAbsTime=" + (nTime - pChip.n発声時刻ms) + ", nDeltaTime=" + (nTime + nInputAdjustTime - pChip.n発声時刻ms));
if(NotesManager.IsRoll(pChip)) if(NotesManager.IsRoll(pChip) || NotesManager.IsFuzeRoll(pChip))
{ {
if ((SoundManager.PlayTimer.NowTimeMs * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)) > pChip.n発声時刻ms && (SoundManager.PlayTimer.NowTimeMs * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)) < pChip.nーツ終了時刻ms) if ((SoundManager.PlayTimer.NowTimeMs * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)) > pChip.n発声時刻ms && (SoundManager.PlayTimer.NowTimeMs * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)) < pChip.nーツ終了時刻ms)
{ {
@ -1236,7 +1307,7 @@ namespace TJAPlayer3
//while ( nIndex_NearestChip_Future < count ) // 未来方向への検索 //while ( nIndex_NearestChip_Future < count ) // 未来方向への検索
for ( ; nIndex_NearestChip_Future < count; nIndex_NearestChip_Future++) for ( ; nIndex_NearestChip_Future < count; nIndex_NearestChip_Future++)
{ {
if ( ( ( 0x11 <= nChannel ) && ( nChannel <= 0x17 ) ) ) if ( ( ( 0x11 <= nChannel ) && ( nChannel <= 0x17 ) ) || nChannel == 0x19 )
{ {
CDTX.CChip chip = playerListChip[ nIndex_NearestChip_Future ]; CDTX.CChip chip = playerListChip[ nIndex_NearestChip_Future ];
@ -1261,7 +1332,7 @@ namespace TJAPlayer3
//while ( nIndex_NearestChip_Past >= 0 ) // 過去方向への検索 //while ( nIndex_NearestChip_Past >= 0 ) // 過去方向への検索
for ( ; nIndex_NearestChip_Past >= 0; nIndex_NearestChip_Past-- ) for ( ; nIndex_NearestChip_Past >= 0; nIndex_NearestChip_Past-- )
{ {
if ( (( 0x15 <= nChannel ) && ( nChannel <= 0x17 ) || (nChannel == 0x20 || nChannel == 0x21)) ) if ( ((( 0x15 <= nChannel ) && ( nChannel <= 0x17 ) || nChannel == 0x19) || (nChannel == 0x20 || nChannel == 0x21)) )
{ {
CDTX.CChip chip = playerListChip[ nIndex_NearestChip_Past ]; CDTX.CChip chip = playerListChip[ nIndex_NearestChip_Past ];
@ -1532,35 +1603,44 @@ namespace TJAPlayer3
bool IsKusudama = NotesManager.IsKusudama(pChip); bool IsKusudama = NotesManager.IsKusudama(pChip);
bool IsFuze = NotesManager.IsFuzeRoll(pChip); bool IsFuze = NotesManager.IsFuzeRoll(pChip);
ref int rollCount = ref pChip.nRollCount; int rollCount = pChip.nRollCount;
int balloon = pChip.nBalloon; int balloon = pChip.nBalloon;
if (IsKusudama) if (IsKusudama)
{ {
var ts = pChip.db発声時刻ms; nCurrentKusudamaRollCount++;
var km = TJAPlayer3.DTX.kusudaMAP; rollCount = nCurrentKusudamaRollCount;
balloon = nCurrentKusudamaCount;
if (km.ContainsKey(ts))
{
rollCount = ref km[ts].nRollCount;
balloon = km[ts].nBalloon;
}
} }
if ((int)nowTime >= pChip.n発声時刻ms if ((int)nowTime >= pChip.n発声時刻ms
&& (int)nowTime <= pChip.nーツ終了時刻ms) && (int)nowTime <= pChip.nーツ終了時刻ms)
{ {
if (rollCount == 0 && this.bPAUSE == false)
{
if (IsKusudama) if (IsKusudama)
{ {
this.n風船残り[0] = balloon; if (nCurrentKusudamaCount > 0)
{
for(int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
this.b連打中[i] = true;
actChara.ChangeAnime(i, CAct演奏Drumsキャラクター.Anime.Balloon_Breaking, true);
if (this.actBalloon.ct風船アニメ[i].IsUnEnded)
{
this.actBalloon.ct風船アニメ[i] = new CCounter(0, 9, 14, TJAPlayer3.Timer);
this.actBalloon.ct風船アニメ[i].CurrentValue = 1;
} }
else else
{ {
this.n風船残り[player] = balloon; this.actBalloon.ct風船アニメ[i] = new CCounter(0, 9, 14, TJAPlayer3.Timer);
} }
} }
}
}
else
{
this.b連打中[player] = true; this.b連打中[player] = true;
actChara.ChangeAnime(player, CAct演奏Drumsキャラクター.Anime.Balloon_Breaking, true); actChara.ChangeAnime(player, CAct演奏Drumsキャラクター.Anime.Balloon_Breaking, true);
@ -1574,18 +1654,26 @@ namespace TJAPlayer3
{ {
this.actBalloon.ct風船アニメ[player] = new CCounter(0, 9, 14, TJAPlayer3.Timer); this.actBalloon.ct風船アニメ[player] = new CCounter(0, 9, 14, TJAPlayer3.Timer);
} }
}
this.eRollState = E連打State.balloon; this.eRollState = E連打State.balloon;
rollCount++;
if (IsKusudama) if (IsKusudama)
{ {
this.n風船残り[0]--; //pChip.nRollCount = nCurrentKusudamaRollCount;
for(int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
pChip.nRollCount = nCurrentKusudamaRollCount;
this.n風船残り[i] = balloon - rollCount;
}
} }
else else
{ {
this.n風船残り[player]--; pChip.nRollCount++;
rollCount = pChip.nRollCount;
this.n風船残り[player] = balloon - rollCount;
} }
if (TJAPlayer3.stage選曲.n確定された曲の難易度[0] == (int)Difficulty.Dan) if (TJAPlayer3.stage選曲.n確定された曲の難易度[0] == (int)Difficulty.Dan)
@ -1625,29 +1713,35 @@ namespace TJAPlayer3
this.soundRed[pChip.nPlayerSide]?.PlayStart(); this.soundRed[pChip.nPlayerSide]?.PlayStart();
if (balloon == rollCount) if (this.n風船残り[player] <= 0)
{ {
if (IsKusudama) if (IsKusudama)
{
//パァーン
/*
for(int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{ {
TJAPlayer3.Skin.soundBalloon.t再生する(); TJAPlayer3.Skin.soundBalloon.t再生する();
var ts = pChip.db発声時刻ms; pChip.bHit = true;
for (int j = 0; j < TJAPlayer3.ConfigIni.nPlayerCount; j++) pChip.IsHitted = true;
chip現在処理中の連打チップ[i].bHit = true;
pChip.b可視 = false;
nCurrentKusudamaCount = 0;
{ {
var _dtx = new CDTX[5] { TJAPlayer3.DTX, TJAPlayer3.DTX_2P, TJAPlayer3.DTX_3P, TJAPlayer3.DTX_4P, TJAPlayer3.DTX_5P }; actChara.ChangeAnime(i, CAct演奏Drumsキャラクター.Anime.Balloon_Broke, true);
var km = _dtx[j].kusudaMAP; if (actChara.CharaAction_Balloon_Delay[i] != null) actChara.CharaAction_Balloon_Delay[i] = new CCounter(0, TJAPlayer3.Skin.Characters_Balloon_Delay[actChara.iCurrentCharacter[i]] - 1, 1, TJAPlayer3.Timer);
if (km.ContainsKey(ts))
{
var tChip = km[ts];
tChip.bHit = true;
tChip.IsHitted = true;
chip現在処理中の連打チップ[j].bHit = true;
tChip.b可視 = false;
{
actChara.ChangeAnime(j, CAct演奏Drumsキャラクター.Anime.Balloon_Broke, true);
if (actChara.CharaAction_Balloon_Delay[j] != null) actChara.CharaAction_Balloon_Delay[j] = new CCounter(0, TJAPlayer3.Skin.Characters_Balloon_Delay[actChara.iCurrentCharacter[j]] - 1, 1, TJAPlayer3.Timer);
}
} }
}*/
TJAPlayer3.Skin.soundBalloon.t再生する();
pChip.bHit = true;
pChip.IsHitted = true;
chip現在処理中の連打チップ[player].bHit = true;
pChip.b可視 = false;
nCurrentKusudamaCount = 0;
{
actChara.ChangeAnime(player, CAct演奏Drumsキャラクター.Anime.Balloon_Broke, true);
if (actChara.CharaAction_Balloon_Delay[player] != null) actChara.CharaAction_Balloon_Delay[player] = new CCounter(0, TJAPlayer3.Skin.Characters_Balloon_Delay[actChara.iCurrentCharacter[player]] - 1, 1, TJAPlayer3.Timer);
} }
} }
else else
@ -1673,11 +1767,25 @@ namespace TJAPlayer3
} }
} }
else else
{
if (IsKusudama)
{
for(int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
if (chip現在処理中の連打チップ[i] != null)
chip現在処理中の連打チップ[i].bHit = true;
this.b連打中[i] = false;
this.actChara.b風船連打中[i] = false;
nCurrentKusudamaCount = 0;
}
}
else
{ {
if (chip現在処理中の連打チップ[player] != null) if (chip現在処理中の連打チップ[player] != null)
chip現在処理中の連打チップ[player].bHit = true; chip現在処理中の連打チップ[player].bHit = true;
this.b連打中[player] = false; this.b連打中[player] = false;
this.actChara.b風船連打中[player] = false; this.actChara.b風船連打中[player] = false;
}
return false; return false;
} }
return true; return true;
@ -1792,17 +1900,33 @@ namespace TJAPlayer3
{ {
#region [ Balloon ] #region [ Balloon ]
bool IsKusudama = NotesManager.IsKusudama(pChip);
if (IsKusudama)
{
if (nCurrentKusudamaCount > 0)
{
for(int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
this.b連打中[i] = true;
this.actChara.b風船連打中[i] = true;
}
}
}
else
{
this.b連打中[nPlayer] = true; this.b連打中[nPlayer] = true;
this.actChara.b風船連打中[nPlayer] = true; this.actChara.b風船連打中[nPlayer] = true;
}
if (bAutoPlay || rollEffectHit) if (bAutoPlay || rollEffectHit)
{ {
bool IsKusudama = NotesManager.IsKusudama(pChip);
int rollCount = pChip.nRollCount; int rollCount = pChip.nRollCount;
int balloon = pChip.nBalloon; int balloon = pChip.nBalloon;
if (IsKusudama) if (IsKusudama)
{ {
/*
var ts = pChip.db発声時刻ms; var ts = pChip.db発声時刻ms;
var km = TJAPlayer3.DTX.kusudaMAP; var km = TJAPlayer3.DTX.kusudaMAP;
@ -1811,6 +1935,10 @@ namespace TJAPlayer3
rollCount = km[ts].nRollCount; rollCount = km[ts].nRollCount;
balloon = km[ts].nBalloon; balloon = km[ts].nBalloon;
} }
*/
rollCount = nCurrentKusudamaRollCount;
balloon = nCurrentKusudamaCount;
} }
if (balloon != 0 && this.bPAUSE == false) if (balloon != 0 && this.bPAUSE == false)
@ -1835,17 +1963,32 @@ namespace TJAPlayer3
} }
} }
if (!bAutoPlay && !rollEffectHit) if (!bAutoPlay && !rollEffectHit)
{
if (!IsKusudama || nCurrentKusudamaCount > 0)
{ {
this.tBalloonProcess(pChip, (SoundManager.PlayTimer.NowTime * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)), nPlayer); this.tBalloonProcess(pChip, (SoundManager.PlayTimer.NowTime * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)), nPlayer);
} }
}
break; break;
#endregion #endregion
} }
else if (NotesManager.IsRollEnd(pChip)) else if (NotesManager.IsRollEnd(pChip))
{ {
if (pChip.nーツ終了時刻ms <= (SoundManager.PlayTimer.NowTime * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0))) if (pChip.nーツ終了時刻ms <= (SoundManager.PlayTimer.NowTime * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)))
{
if (NotesManager.IsKusudama(pChip))
{
for(int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
chip現在処理中の連打チップ[i].bHit = true;
this.b連打中[i] = false;
}
}
else
{ {
this.b連打中[nPlayer] = false; this.b連打中[nPlayer] = false;
}
// this.actChara.b風船連打中[nPlayer] = false; // this.actChara.b風船連打中[nPlayer] = false;
@ -3596,6 +3739,15 @@ namespace TJAPlayer3
this.chip現在処理中の連打チップ[ nPlayer ] = pChip; this.chip現在処理中の連打チップ[ nPlayer ] = pChip;
} }
} }
if ( !pChip.bProcessed && ( pChip.nバーからの距離dot.Drums < 0 ) )
{
if (NotesManager.IsKusudama(pChip))
{
nCurrentKusudamaRollCount = 0;
nCurrentKusudamaCount += pChip.nBalloon;
pChip.bProcessed = true;
}
}
if (pChip.n描画優先度 <= 0) if (pChip.n描画優先度 <= 0)
this.t進行描画_チップ_Taiko連打(configIni, ref dTX, ref pChip, nPlayer); this.t進行描画_チップ_Taiko連打(configIni, ref dTX, ref pChip, nPlayer);
} }
@ -3611,6 +3763,8 @@ namespace TJAPlayer3
pChip.bHit = true; pChip.bHit = true;
if( chip現在処理中の連打チップ[ nPlayer ] != null ) if( chip現在処理中の連打チップ[ nPlayer ] != null )
{ {
nCurrentKusudamaRollCount = 0;
nCurrentKusudamaCount = 0;
chip現在処理中の連打チップ[ nPlayer ].bHit = true; chip現在処理中の連打チップ[ nPlayer ].bHit = true;
if (chip現在処理中の連打チップ[nPlayer].nBalloon > chip現在処理中の連打チップ[nPlayer].nRollCount if (chip現在処理中の連打チップ[nPlayer].nBalloon > chip現在処理中の連打チップ[nPlayer].nRollCount
&& chip現在処理中の連打チップ[nPlayer].nRollCount > 0) && chip現在処理中の連打チップ[nPlayer].nRollCount > 0)
@ -5214,6 +5368,8 @@ namespace TJAPlayer3
NowProcessingChip[i] = 0; NowProcessingChip[i] = 0;
} }
} }
nCurrentKusudamaCount = 0;
nCurrentKusudamaRollCount = 0;
this.ReSetScore(TJAPlayer3.DTX.nScoreInit[0, TJAPlayer3.stage選曲.n確定された曲の難易度[0]], TJAPlayer3.DTX.nScoreDiff[TJAPlayer3.stage選曲.n確定された曲の難易度[0]]); this.ReSetScore(TJAPlayer3.DTX.nScoreInit[0, TJAPlayer3.stage選曲.n確定された曲の難易度[0]], TJAPlayer3.DTX.nScoreDiff[TJAPlayer3.stage選曲.n確定された曲の難易度[0]]);
this.nHand = new int[]{ 0, 0, 0, 0, 0 }; this.nHand = new int[]{ 0, 0, 0, 0, 0 };
@ -5256,6 +5412,7 @@ namespace TJAPlayer3
dTX.listChip[i].bHit = false; dTX.listChip[i].bHit = false;
dTX.listChip[i].bShow = true; dTX.listChip[i].bShow = true;
dTX.listChip[i].bProcessed = false;
dTX.listChip[i].b可視 = true; dTX.listChip[i].b可視 = true;
dTX.listChip[i].IsHitted = false; dTX.listChip[i].IsHitted = false;
dTX.listChip[i].IsMissed = false; dTX.listChip[i].IsMissed = false;

View File

@ -204,9 +204,20 @@ namespace TJAPlayer3
//CDTXMania.act文字コンソール.tPrint( 0, 0, C文字コンソール.Eフォント種別.白, n連打数.ToString() ); //CDTXMania.act文字コンソール.tPrint( 0, 0, C文字コンソール.Eフォント種別.白, n連打数.ToString() );
} }
if (n連打数 == 0 && TJAPlayer3.stage演奏ドラム画面.actChara.b風船連打中[player]) if (n連打数 == 0 && TJAPlayer3.stage演奏ドラム画面.actChara.b風船連打中[player])
{
if (btype == EBalloonType.KUSUDAMA)
{
for(int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
TJAPlayer3.stage演奏ドラム画面.actChara.b風船連打中[i] = false;
TJAPlayer3.stage演奏ドラム画面.b連打中[i] = false;
}
}
else
{ {
TJAPlayer3.stage演奏ドラム画面.actChara.b風船連打中[player] = false; TJAPlayer3.stage演奏ドラム画面.actChara.b風船連打中[player] = false;
TJAPlayer3.stage演奏ドラム画面.b連打中[player] = false; TJAPlayer3.stage演奏ドラム画面.b連打中[player] = false;
}
} }

View File

@ -2583,13 +2583,10 @@ namespace TJAPlayer3
if (chkChip.n発声時刻ms <= (int)nowTime if (chkChip.n発声時刻ms <= (int)nowTime
&& chkChip.nーツ終了時刻ms + 500 >= (int)nowTime) && chkChip.nーツ終了時刻ms + 500 >= (int)nowTime)
{ {
if (i == 0 && chkChip.nRollCount == 0 && NotesManager.IsKusudama(chkChip)) var balloon = NotesManager.IsKusudama(chkChip) ? nCurrentKusudamaCount : chkChip.nBalloon;
{
this.n風船残り[0] = chkChip.nBalloon;
}
if (!NotesManager.IsFuzeRoll(chkChip)) chkChip.bShow = false; if (!NotesManager.IsFuzeRoll(chkChip)) chkChip.bShow = false;
this.actBalloon.On進行描画( this.actBalloon.On進行描画(
chkChip.nBalloon, balloon,
this.n風船残り[i], this.n風船残り[i],
i, i,
NotesManager.IsFuzeRoll(chkChip) NotesManager.IsFuzeRoll(chkChip)

View File

@ -124,10 +124,7 @@ namespace TJAPlayer3
this.ct虹アニメ = new CCounter(0, TJAPlayer3.Skin.Game_Gauge_Dan_Rainbow_Ptn - 1, 30, TJAPlayer3.Timer); this.ct虹アニメ = new CCounter(0, TJAPlayer3.Skin.Game_Gauge_Dan_Rainbow_Ptn - 1, 30, TJAPlayer3.Timer);
this.ct虹透明度 = new CCounter(0, TJAPlayer3.Skin.Game_Gauge_Rainbow_Timer - 1, 1, TJAPlayer3.Timer); this.ct虹透明度 = new CCounter(0, TJAPlayer3.Skin.Game_Gauge_Rainbow_Timer - 1, 1, TJAPlayer3.Timer);
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName)) this.pfExamFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Game_DanC_ExamFont_Size);
this.pfExamFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Game_DanC_ExamFont_Size);
else
this.pfExamFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Game_DanC_ExamFont_Size);
this.ttkExams = new TitleTextureKey[(int)Exam.Type.Total]; this.ttkExams = new TitleTextureKey[(int)Exam.Type.Total];
for (int i = 0; i < this.ttkExams.Length; i++) for (int i = 0; i < this.ttkExams.Length; i++)

View File

@ -26,7 +26,7 @@ namespace TJAPlayer3
["6"] = 6, // Big roll start | Konga pink roll ["6"] = 6, // Big roll start | Konga pink roll
["7"] = 7, // Balloon ["7"] = 7, // Balloon
["8"] = 8, // Roll/Balloon end ["8"] = 8, // Roll/Balloon end
["9"] = 7, // Kusudama ["9"] = 9, // Kusudama
["A"] = 10, // Joint Big Don (2P) ["A"] = 10, // Joint Big Don (2P)
["B"] = 11, // Joint Big Ka (2P) ["B"] = 11, // Joint Big Ka (2P)
["C"] = 12, // Mine ["C"] = 12, // Mine

View File

@ -284,8 +284,8 @@ namespace TJAPlayer3
} }
public override void CreateManagedResource() public override void CreateManagedResource()
{ {
pfSpeechText = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Result_Speech_Text_Size); pfSpeechText = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Result_Speech_Text_Size);
pfAISectionText = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Result_AIBattle_SectionText_Scale); pfAISectionText = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Result_AIBattle_SectionText_Scale);
base.CreateManagedResource(); base.CreateManagedResource();
} }

View File

@ -60,14 +60,7 @@ namespace TJAPlayer3
} }
public override void CreateManagedResource() public override void CreateManagedResource()
{ {
if( !string.IsNullOrEmpty( TJAPlayer3.ConfigIni.FontName) ) this.pfMusicName = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Result_MusicName_FontSize);
{
this.pfMusicName = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Result_MusicName_FontSize);
}
else
{
this.pfMusicName = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Result_MusicName_FontSize);
}
base.CreateManagedResource(); base.CreateManagedResource();
} }
public override void ReleaseManagedResource() public override void ReleaseManagedResource()

View File

@ -869,27 +869,11 @@ namespace TJAPlayer3
} }
public override void CreateManagedResource() public override void CreateManagedResource()
{ {
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName)) this.pfTowerText = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.TowerResult_Font_TowerText);
{ this.pfTowerText48 = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.TowerResult_Font_TowerText48);
this.pfTowerText = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.TowerResult_Font_TowerText); this.pfTowerText72 = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.TowerResult_Font_TowerText72);
this.pfTowerText48 = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.TowerResult_Font_TowerText48);
this.pfTowerText72 = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.TowerResult_Font_TowerText72);
}
else
{
this.pfTowerText = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.TowerResult_Font_TowerText);
this.pfTowerText48 = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.TowerResult_Font_TowerText48);
this.pfTowerText72 = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.TowerResult_Font_TowerText72);
}
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName)) this.pfDanTitles = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.DanResult_Font_DanTitles_Size);
{
this.pfDanTitles = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.DanResult_Font_DanTitles_Size);
}
else
{
this.pfDanTitles = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.DanResult_Font_DanTitles_Size);
}
base.CreateManagedResource(); base.CreateManagedResource();
} }

View File

@ -41,11 +41,7 @@ namespace TJAPlayer3
bInSongPlayed = false; bInSongPlayed = false;
this.pfHeyaFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Heya_Font_Scale);
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
this.pfHeyaFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Heya_Font_Scale);
else
this.pfHeyaFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Heya_Font_Scale);
ScrollCounter = new CCounter(0, 1000, 0.15f, TJAPlayer3.Timer); ScrollCounter = new CCounter(0, 1000, 0.15f, TJAPlayer3.Timer);

View File

@ -119,17 +119,8 @@ namespace TJAPlayer3
{ {
// Ressource allocation // Ressource allocation
this.pfOLFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.OnlineLounge_Font_OLFont);
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName)) this.pfOLFontLarge = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.OnlineLounge_Font_OLFontLarge);
{
this.pfOLFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.OnlineLounge_Font_OLFont);
this.pfOLFontLarge = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.OnlineLounge_Font_OLFontLarge);
}
else
{
this.pfOLFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.OnlineLounge_Font_OLFont);
this.pfOLFontLarge = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.OnlineLounge_Font_OLFontLarge);
}
base.CreateManagedResource(); base.CreateManagedResource();
} }

View File

@ -59,15 +59,8 @@ namespace TJAPlayer3
{ {
// Ressource allocation // Ressource allocation
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName)) pfTitleFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.TowerSelect_Title_Size);
pfTitleFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.TowerSelect_Title_Size); pfSubTitleFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.TowerSelect_SubTitle_Size);
else
pfTitleFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.TowerSelect_Title_Size);
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
pfSubTitleFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.TowerSelect_SubTitle_Size);
else
pfSubTitleFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.TowerSelect_SubTitle_Size);
base.CreateManagedResource(); base.CreateManagedResource();
} }

View File

@ -32,14 +32,7 @@ namespace TJAPlayer3
private void tReloadFonts() private void tReloadFonts()
{ {
_pfEncyclopediaMenu?.Dispose(); _pfEncyclopediaMenu?.Dispose();
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName)) _pfEncyclopediaMenu = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.OpenEncyclopedia_Font_EncyclopediaMenu_Size);
{
_pfEncyclopediaMenu = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.OpenEncyclopedia_Font_EncyclopediaMenu_Size);
}
else
{
_pfEncyclopediaMenu = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.OpenEncyclopedia_Font_EncyclopediaMenu_Size);
}
} }
#endregion #endregion

View File

@ -218,11 +218,7 @@ namespace TJAPlayer3
public override void CreateManagedResource() public override void CreateManagedResource()
{ {
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName)) this.MenuFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Heya_Font_Scale);
this.MenuFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Heya_Font_Scale);
else
this.MenuFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Heya_Font_Scale);
base.CreateManagedResource(); base.CreateManagedResource();
} }

View File

@ -17,35 +17,17 @@ namespace TJAPlayer3
{ {
this.pfName[player]?.Dispose(); this.pfName[player]?.Dispose();
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
{
if (TJAPlayer3.SaveFileInstances[player].data.Title == "" || TJAPlayer3.SaveFileInstances[player].data.Title == null) if (TJAPlayer3.SaveFileInstances[player].data.Title == "" || TJAPlayer3.SaveFileInstances[player].data.Title == null)
this.pfName[player] = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.NamePlate_Font_Name_Size_Normal); this.pfName[player] = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.NamePlate_Font_Name_Size_Normal);
else else
this.pfName[player] = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.NamePlate_Font_Name_Size_WithTitle); this.pfName[player] = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.NamePlate_Font_Name_Size_WithTitle);
}
else
{
if (TJAPlayer3.SaveFileInstances[player].data.Title == "" || TJAPlayer3.SaveFileInstances[player].data.Title == null)
this.pfName[player] = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.NamePlate_Font_Name_Size_Normal);
else
this.pfName[player] = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.NamePlate_Font_Name_Size_WithTitle);
}
} }
this.pfTitle?.Dispose(); this.pfTitle?.Dispose();
this.pfdan?.Dispose(); this.pfdan?.Dispose();
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName)) this.pfTitle = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.NamePlate_Font_Title_Size);
{ this.pfdan = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.NamePlate_Font_Dan_Size);
this.pfTitle = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.NamePlate_Font_Title_Size);
this.pfdan = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.NamePlate_Font_Dan_Size);
}
else
{
this.pfTitle = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.NamePlate_Font_Title_Size);
this.pfdan = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.NamePlate_Font_Dan_Size);
}
} }
public CNamePlate() public CNamePlate()