1
0
mirror of synced 2024-11-27 17:00:50 +01:00

More convenient save files management, few 5P bug fixes

This commit is contained in:
0auBSQ 2023-02-17 02:59:12 +09:00
parent cf9197af82
commit 2c0b60a6a3
24 changed files with 649 additions and 336 deletions

1
.gitignore vendored
View File

@ -22,6 +22,7 @@
/Test/RecentlyPlayedSongs.json
/Test/SongsIgnored/*
/Test/SongsIgnored2/*
/Test/Saves
/Test/xadec.dll
/Test/SoundDecoder.dll
/Test/msvcr90.dll

View File

@ -29,7 +29,7 @@ namespace TJAPlayer3
private static bool _usesSubstituteTexture(int player, ECharacterAnimation eca)
{
int _charaId = TJAPlayer3.NamePlateConfig.data.Character[TJAPlayer3.GetActualPlayer(player)];
int _charaId = TJAPlayer3.SaveFileInstances[TJAPlayer3.GetActualPlayer(player)].data.Character;
if (_charaId >= 0 && _charaId < TJAPlayer3.Skin.Characters_Ptn)
{
@ -73,7 +73,7 @@ namespace TJAPlayer3
public static CTexture[] _getReferenceArray(int player, ECharacterAnimation eca)
{
int _charaId = TJAPlayer3.NamePlateConfig.data.Character[TJAPlayer3.GetActualPlayer(player)];
int _charaId = TJAPlayer3.SaveFileInstances[TJAPlayer3.GetActualPlayer(player)].data.Character;
if (_charaId >= 0 && _charaId < TJAPlayer3.Skin.Characters_Ptn)
{
@ -216,7 +216,7 @@ namespace TJAPlayer3
public static void tMenuDisplayCharacter(int player, int x, int y, ECharacterAnimation eca, int opacity = 255)
{
int _charaId = TJAPlayer3.NamePlateConfig.data.Character[TJAPlayer3.GetActualPlayer(player)];
int _charaId = TJAPlayer3.SaveFileInstances[TJAPlayer3.GetActualPlayer(player)].data.Character;
CTexture[] _ref = _getReferenceArray(player, eca);
CCounter[] _ctref = _getReferenceCounter(eca);
bool _substitute = _usesSubstituteTexture(player, eca);

View File

@ -44,7 +44,7 @@ namespace TJAPlayer3
private static bool _usesSubstituteTexture(int player, ECharacterResult eca)
{
int _charaId = TJAPlayer3.NamePlateConfig.data.Character[TJAPlayer3.GetActualPlayer(player)];
int _charaId = TJAPlayer3.SaveFileInstances[TJAPlayer3.GetActualPlayer(player)].data.Character;
if (_charaId >= 0 && _charaId < TJAPlayer3.Skin.Characters_Ptn)
{
@ -82,7 +82,7 @@ namespace TJAPlayer3
public static CTexture[] _getReferenceArray(int player, ECharacterResult eca)
{
int _charaId = TJAPlayer3.NamePlateConfig.data.Character[TJAPlayer3.GetActualPlayer(player)];
int _charaId = TJAPlayer3.SaveFileInstances[TJAPlayer3.GetActualPlayer(player)].data.Character;
if (_charaId >= 0 && _charaId < TJAPlayer3.Skin.Characters_Ptn)
{
@ -205,7 +205,7 @@ namespace TJAPlayer3
public static void tMenuDisplayCharacter(int player, int x, int y, ECharacterResult eca, int pos = 0, int opacity = 255)
{
int _charaId = TJAPlayer3.NamePlateConfig.data.Character[TJAPlayer3.GetActualPlayer(player)];
int _charaId = TJAPlayer3.SaveFileInstances[TJAPlayer3.GetActualPlayer(player)].data.Character;
CTexture[] _ref = _getReferenceArray(player, eca);
CCounter[] _ctref = _getReferenceCounter(eca);
bool _substitute = _usesSubstituteTexture(player, eca);

View File

@ -36,7 +36,7 @@ namespace TJAPlayer3
public static int tGetPuchiCharaIndexByName(int p)
{
var _pc = TJAPlayer3.NamePlateConfig.data.PuchiChara[p];
var _pc = TJAPlayer3.SaveFileInstances[p].data.PuchiChara;
var _pcs = TJAPlayer3.Skin.Puchicharas_Name;
int puriChar = 0;
if (_pcs.Contains(_pc))

View File

@ -7,14 +7,15 @@ using System.IO;
using System.Diagnostics;
using FDK;
using FDK.ExtensionMethods;
using System.Linq;
namespace TJAPlayer3
{
internal class CConfigIni : INotifyPropertyChanged
{
private const int MinimumKeyboardSoundLevelIncrement = 1;
private const int MaximumKeyboardSoundLevelIncrement = 20;
private const int DefaultKeyboardSoundLevelIncrement = 5;
private const int MinimumKeyboardSoundLevelIncrement = 1;
private const int MaximumKeyboardSoundLevelIncrement = 20;
private const int DefaultKeyboardSoundLevelIncrement = 5;
// クラス
@ -286,7 +287,7 @@ namespace TJAPlayer3
{
this.padRBlue = value;
}
}
}
public CConfigIni.CKeyAssign.STKEYASSIGN[] LeftRed2P
{
get
@ -330,7 +331,7 @@ namespace TJAPlayer3
{
this.padRBlue2P = value;
}
}
}
public CConfigIni.CKeyAssign.STKEYASSIGN[] LeftRed3P
{
@ -551,70 +552,70 @@ namespace TJAPlayer3
}
}
public CConfigIni.CKeyAssign.STKEYASSIGN[] this[ int index ]
public CConfigIni.CKeyAssign.STKEYASSIGN[] this[int index]
{
get
{
switch ( index )
switch (index)
{
case (int) EKeyConfigPad.HH:
case (int)EKeyConfigPad.HH:
return this.padHH_R;
case (int) EKeyConfigPad.SD:
case (int)EKeyConfigPad.SD:
return this.padSD_G;
case (int) EKeyConfigPad.BD:
case (int)EKeyConfigPad.BD:
return this.padBD_B;
case (int) EKeyConfigPad.HT:
case (int)EKeyConfigPad.HT:
return this.padHT_Pick;
case (int) EKeyConfigPad.LT:
case (int)EKeyConfigPad.LT:
return this.padLT_Wail;
case (int) EKeyConfigPad.FT:
case (int)EKeyConfigPad.FT:
return this.padFT_Cancel;
case (int) EKeyConfigPad.CY:
case (int)EKeyConfigPad.CY:
return this.padCY_Decide;
case (int) EKeyConfigPad.HHO:
case (int)EKeyConfigPad.HHO:
return this.padHHO;
case (int) EKeyConfigPad.RD:
case (int)EKeyConfigPad.RD:
return this.padRD;
case (int) EKeyConfigPad.LC:
case (int)EKeyConfigPad.LC:
return this.padLC;
case (int) EKeyConfigPad.LP: // #27029 2012.1.4 from
return this.padLP; //
case (int)EKeyConfigPad.LP: // #27029 2012.1.4 from
return this.padLP; //
case (int) EKeyConfigPad.LBD: // #27029 2012.1.4 from
return this.padLBD; //
case (int)EKeyConfigPad.LBD: // #27029 2012.1.4 from
return this.padLBD; //
case (int) EKeyConfigPad.LRed:
case (int)EKeyConfigPad.LRed:
return this.padLRed;
case (int) EKeyConfigPad.RRed:
case (int)EKeyConfigPad.RRed:
return this.padRRed;
case (int) EKeyConfigPad.LBlue:
case (int)EKeyConfigPad.LBlue:
return this.padLBlue;
case (int) EKeyConfigPad.RBlue:
case (int)EKeyConfigPad.RBlue:
return this.padRBlue;
case (int) EKeyConfigPad.LRed2P:
case (int)EKeyConfigPad.LRed2P:
return this.padLRed2P;
case (int) EKeyConfigPad.RRed2P:
case (int)EKeyConfigPad.RRed2P:
return this.padRRed2P;
case (int) EKeyConfigPad.LBlue2P:
case (int)EKeyConfigPad.LBlue2P:
return this.padLBlue2P;
case (int) EKeyConfigPad.RBlue2P:
case (int)EKeyConfigPad.RBlue2P:
return this.padRBlue2P;
case (int)EKeyConfigPad.LRed3P:
@ -674,94 +675,94 @@ namespace TJAPlayer3
case (int)EKeyConfigPad.RightChange:
return this.padRightChange;
case (int) EKeyConfigPad.Capture:
case (int)EKeyConfigPad.Capture:
return this.padCapture;
}
throw new IndexOutOfRangeException();
}
set
{
switch ( index )
switch (index)
{
case (int) EKeyConfigPad.HH:
case (int)EKeyConfigPad.HH:
this.padHH_R = value;
return;
case (int) EKeyConfigPad.SD:
case (int)EKeyConfigPad.SD:
this.padSD_G = value;
return;
case (int) EKeyConfigPad.BD:
case (int)EKeyConfigPad.BD:
this.padBD_B = value;
return;
case (int) EKeyConfigPad.Pick:
case (int)EKeyConfigPad.Pick:
this.padHT_Pick = value;
return;
case (int) EKeyConfigPad.LT:
case (int)EKeyConfigPad.LT:
this.padLT_Wail = value;
return;
case (int) EKeyConfigPad.FT:
case (int)EKeyConfigPad.FT:
this.padFT_Cancel = value;
return;
case (int) EKeyConfigPad.CY:
case (int)EKeyConfigPad.CY:
this.padCY_Decide = value;
return;
case (int) EKeyConfigPad.HHO:
case (int)EKeyConfigPad.HHO:
this.padHHO = value;
return;
case (int) EKeyConfigPad.RD:
case (int)EKeyConfigPad.RD:
this.padRD = value;
return;
case (int) EKeyConfigPad.LC:
case (int)EKeyConfigPad.LC:
this.padLC = value;
return;
case (int) EKeyConfigPad.LP:
case (int)EKeyConfigPad.LP:
this.padLP = value;
return;
case (int) EKeyConfigPad.LBD:
case (int)EKeyConfigPad.LBD:
this.padLBD = value;
return;
case (int) EKeyConfigPad.LRed:
this.padLRed = value;
return;
case (int)EKeyConfigPad.LRed:
this.padLRed = value;
return;
case (int) EKeyConfigPad.RRed:
this.padRRed = value;
return;
case (int) EKeyConfigPad.LBlue:
this.padLBlue = value;
return;
case (int)EKeyConfigPad.RRed:
this.padRRed = value;
return;
case (int) EKeyConfigPad.RBlue:
this.padRBlue = value;
return;
case (int)EKeyConfigPad.LBlue:
this.padLBlue = value;
return;
case (int) EKeyConfigPad.LRed2P:
this.padLRed2P = value;
return;
case (int)EKeyConfigPad.RBlue:
this.padRBlue = value;
return;
case (int) EKeyConfigPad.RRed2P:
this.padRRed2P = value;
return;
case (int) EKeyConfigPad.LBlue2P:
this.padLBlue2P = value;
return;
case (int)EKeyConfigPad.LRed2P:
this.padLRed2P = value;
return;
case (int) EKeyConfigPad.RBlue2P:
this.padRBlue2P = value;
return;
case (int)EKeyConfigPad.RRed2P:
this.padRRed2P = value;
return;
case (int)EKeyConfigPad.LBlue2P:
this.padLBlue2P = value;
return;
case (int)EKeyConfigPad.RBlue2P:
this.padRBlue2P = value;
return;
case (int)EKeyConfigPad.LRed3P:
this.padLRed3P = value;
@ -839,7 +840,7 @@ namespace TJAPlayer3
this.padRightChange = value;
return;
case (int) EKeyConfigPad.Capture:
case (int)EKeyConfigPad.Capture:
this.padCapture = value;
return;
}
@ -900,13 +901,13 @@ namespace TJAPlayer3
#endregion
}
[StructLayout( LayoutKind.Sequential )]
[StructLayout(LayoutKind.Sequential)]
public struct STKEYASSIGN
{
public E入力デバイス ;
public int ID;
public int ;
public STKEYASSIGN( E入力デバイス DeviceType, int nID, int nCode )
public STKEYASSIGN(E入力デバイス DeviceType, int nID, int nCode)
{
this. = DeviceType;
this.ID = nID;
@ -919,50 +920,50 @@ namespace TJAPlayer3
public CKeyAssignPad Guitar = new CKeyAssignPad();
public CKeyAssignPad Taiko = new CKeyAssignPad();
public CKeyAssignPad System = new CKeyAssignPad();
public CKeyAssignPad this[ int index ]
public CKeyAssignPad this[int index]
{
get
{
switch( index )
switch (index)
{
case (int) EKeyConfigPart.DRUMS:
case (int)EKeyConfigPart.DRUMS:
return this.Drums;
case (int) EKeyConfigPart.GUITAR:
case (int)EKeyConfigPart.GUITAR:
return this.Guitar;
case (int) EKeyConfigPart.BASS:
case (int)EKeyConfigPart.BASS:
return this.Bass;
case (int) EKeyConfigPart.TAIKO:
return this.Taiko;
case (int)EKeyConfigPart.TAIKO:
return this.Taiko;
case (int) EKeyConfigPart.SYSTEM:
case (int)EKeyConfigPart.SYSTEM:
return this.System;
}
throw new IndexOutOfRangeException();
}
set
{
switch( index )
switch (index)
{
case (int) EKeyConfigPart.DRUMS:
case (int)EKeyConfigPart.DRUMS:
this.Drums = value;
return;
case (int) EKeyConfigPart.GUITAR:
case (int)EKeyConfigPart.GUITAR:
this.Guitar = value;
return;
case (int) EKeyConfigPart.BASS:
case (int)EKeyConfigPart.BASS:
this.Bass = value;
return;
case (int) EKeyConfigPart.TAIKO:
this.Taiko = value;
return;
case (int)EKeyConfigPart.TAIKO:
this.Taiko = value;
return;
case (int) EKeyConfigPart.SYSTEM:
case (int)EKeyConfigPart.SYSTEM:
this.System = value;
return;
}
@ -980,12 +981,12 @@ namespace TJAPlayer3
ASIO,
WASAPI_Exclusive,
WASAPI_Shared,
Unknown =99
Unknown = 99
}
// プロパティ
public class CAIPerformances
{
{
public int nGoodOdds;
public int nPerfectOdds;
public int nBadOdds;
@ -993,32 +994,32 @@ namespace TJAPlayer3
public int nMineHitOdds;
public CAIPerformances(int po, int go, int bo, int rp, int mho = 0)
{
{
nGoodOdds = go;
nPerfectOdds = po;
nBadOdds = bo;
nRollSpeed = rp;
nMineHitOdds = mho;
}
}
}
}
public class CTimingZones
{
{
public int nGoodZone;
public int nOkZone;
public int nBadZone;
public CTimingZones(int gz, int oz, int bz)
{
{
nGoodZone = gz;
nOkZone = oz;
nBadZone = bz;
}
}
}
}
#if false // #23625 2011.1.11 Config.iniからダメージ/回復値の定数変更を行う場合はここを有効にする 087リリースに合わせ機能無効化
#if false // #23625 2011.1.11 Config.iniからダメージ/回復値の定数変更を行う場合はここを有効にする 087リリースに合わせ機能無効化
//----------------------------------------
public float[,] fGaugeFactor = new float[5,2];
public float[] fDamageLevelFactor = new float[3];
@ -1037,7 +1038,7 @@ namespace TJAPlayer3
public STDGBVALUE<bool> bReverse;
public E判定表示優先度 e判定表示優先度;
public STDGBVALUE<E判定位置> e判定位置; // #33891 2014.6.26 yyagi
public STDGBVALUE<E判定位置> e判定位置; // #33891 2014.6.26 yyagi
public bool bScoreIniを出力する;
public bool bDanTowerHide;
@ -1054,123 +1055,123 @@ namespace TJAPlayer3
public bool b垂直帰線待ちを行う;
public bool b全画面モード;
public int n初期ウィンドウ開始位置X; // #30675 2013.02.04 ikanick add
public int n初期ウィンドウ開始位置Y;
public int nウインドウwidth; // #23510 2010.10.31 yyagi add
public int nウインドウheight; // #23510 2010.10.31 yyagi add
public int n初期ウィンドウ開始位置Y;
public int nウインドウwidth; // #23510 2010.10.31 yyagi add
public int nウインドウheight; // #23510 2010.10.31 yyagi add
public Dictionary<int, string> dicJoystick;
public Eダークモード eDark;
public Eランダムモード[] eRandom;
public Eダメージレベル eダメージレベル;
public CKeyAssign KeyAssign;
public CKeyAssign KeyAssign;
public int n非フォーカス時スリープms; // #23568 2010.11.04 ikanick add
public int nフレーム毎スリープms; // #xxxxx 2011.11.27 yyagi add
public int n演奏速度;
public int nフレーム毎スリープms; // #xxxxx 2011.11.27 yyagi add
public int n演奏速度;
public bool b演奏速度が一倍速であるとき以外音声を再生しない;
public int n曲が選択されてからプレビュー音が鳴るまでのウェイトms;
public int n曲が選択されてからプレビュー画像が表示開始されるまでのウェイトms;
private bool _applyLoudnessMetadata;
private bool _applyLoudnessMetadata;
public bool ApplyLoudnessMetadata
{
get => _applyLoudnessMetadata;
set => SetProperty(ref _applyLoudnessMetadata, value, nameof(ApplyLoudnessMetadata));
}
public bool ApplyLoudnessMetadata
{
get => _applyLoudnessMetadata;
set => SetProperty(ref _applyLoudnessMetadata, value, nameof(ApplyLoudnessMetadata));
}
private double _targetLoudness;
private double _targetLoudness;
public double TargetLoudness
{
get => _targetLoudness;
set => SetProperty(ref _targetLoudness, value, nameof(TargetLoudness));
}
public double TargetLoudness
{
get => _targetLoudness;
set => SetProperty(ref _targetLoudness, value, nameof(TargetLoudness));
}
private bool _applySongVol;
private bool _applySongVol;
public bool ApplySongVol
{
get => _applySongVol;
set => SetProperty(ref _applySongVol, value, nameof(ApplySongVol));
}
public bool ApplySongVol
{
get => _applySongVol;
set => SetProperty(ref _applySongVol, value, nameof(ApplySongVol));
}
private int _soundEffectLevel;
private int _soundEffectLevel;
public int SoundEffectLevel
{
get => _soundEffectLevel;
set => SetProperty(ref _soundEffectLevel, value, nameof(SoundEffectLevel));
}
public int SoundEffectLevel
{
get => _soundEffectLevel;
set => SetProperty(ref _soundEffectLevel, value, nameof(SoundEffectLevel));
}
private int _voiceLevel;
private int _voiceLevel;
public int VoiceLevel
{
get => _voiceLevel;
set => SetProperty(ref _voiceLevel, value, nameof(VoiceLevel));
}
public int VoiceLevel
{
get => _voiceLevel;
set => SetProperty(ref _voiceLevel, value, nameof(VoiceLevel));
}
private int _songPreviewLevel;
private int _songPreviewLevel;
public int SongPreviewLevel
{
get => _songPreviewLevel;
set => SetProperty(ref _songPreviewLevel, value, nameof(SongPreviewLevel));
}
public int SongPreviewLevel
{
get => _songPreviewLevel;
set => SetProperty(ref _songPreviewLevel, value, nameof(SongPreviewLevel));
}
private int _songPlaybackLevel;
private int _songPlaybackLevel;
public int SongPlaybackLevel
{
get => _songPlaybackLevel;
set => SetProperty(ref _songPlaybackLevel, value, nameof(SongPlaybackLevel));
}
public int SongPlaybackLevel
{
get => _songPlaybackLevel;
set => SetProperty(ref _songPlaybackLevel, value, nameof(SongPlaybackLevel));
}
private int _keyboardSoundLevelIncrement;
private int _keyboardSoundLevelIncrement;
public int KeyboardSoundLevelIncrement
{
get => _keyboardSoundLevelIncrement;
set => SetProperty(
ref _keyboardSoundLevelIncrement,
value.Clamp(MinimumKeyboardSoundLevelIncrement, MaximumKeyboardSoundLevelIncrement),
nameof(KeyboardSoundLevelIncrement));
}
public int KeyboardSoundLevelIncrement
{
get => _keyboardSoundLevelIncrement;
set => SetProperty(
ref _keyboardSoundLevelIncrement,
value.Clamp(MinimumKeyboardSoundLevelIncrement, MaximumKeyboardSoundLevelIncrement),
nameof(KeyboardSoundLevelIncrement));
}
public STDGBVALUE<int> n表示可能な最小コンボ数;
public STDGBVALUE<int> n表示可能な最小コンボ数;
public int[] nScrollSpeed;
public int[] nTimingZones;
public EGameType[] nGameType;
public EFunMods[] nFunMods;
public string strDTXManiaのバージョン;
public string str曲データ検索パス;
public string FontName;
public string FontName;
public string BoxFontName;
public bool bBranchGuide;
public int nScoreMode;
public int nDefaultCourse; //2017.01.30 DD デフォルトでカーソルをあわせる難易度
public bool bBranchGuide;
public int nScoreMode;
public int nDefaultCourse; //2017.01.30 DD デフォルトでカーソルをあわせる難易度
private int _nPlayerCount;
public int nPlayerCount
{
get
{
public int nPlayerCount
{
get
{
if (bAIBattleMode)
{
{
return 2;
}
else
{
}
else
{
return _nPlayerCount;
}
}
set
{
}
}
set
{
_nPlayerCount = value;
}
}
}
public bool[] b太鼓パートAutoPlay = new bool[5];
public bool bAuto先生の連打;
public int nRollsPerSec;
public int nAILevel;
@ -1184,7 +1185,7 @@ namespace TJAPlayer3
new CAIPerformances(800, 180, 20, 10, 70),
new CAIPerformances(850, 135, 15, 12, 50),
new CAIPerformances(900, 90, 10, 14, 30),
new CAIPerformances(910, 85, 5, 16, 20),
new CAIPerformances(920, 75, 5, 16, 20),
new CAIPerformances(950, 49, 1, 22, 10),
new CAIPerformances(975, 25, 0, 26, 5),
new CAIPerformances(1000, 0, 0, 30, 0)
@ -1201,9 +1202,9 @@ namespace TJAPlayer3
new CTimingZones(17, 42, 108) // Lv6 (Hard-Extreme + "Rigorous" mod)
};
public bool b大音符判定;
public int n両手判定の待ち時間;
public int nBranchAnime;
public bool b大音符判定;
public int n両手判定の待ち時間;
public int nBranchAnime;
// I18N choosen language
public string sLang;
@ -1217,30 +1218,39 @@ namespace TJAPlayer3
// 各画像の表示・非表示設定
public bool ShowChara;
public bool ShowDancer;
public bool ShowRunner;
public bool ShowFooter;
public bool ShowMob;
public bool ShowPuchiChara; // リザーブ
//
public bool ShowDancer;
public bool ShowRunner;
public bool ShowFooter;
public bool ShowMob;
public bool ShowPuchiChara; // リザーブ
//
public EScrollMode eScrollMode = EScrollMode.Normal;
public bool bスクロールモードを上書き = false;
public EScrollMode eScrollMode = EScrollMode.Normal;
public bool bスクロールモードを上書き = false;
public bool bHispeedRandom;
public Eステルスモード[] eSTEALTH;
public bool bNoInfo;
public bool bHispeedRandom;
public Eステルスモード[] eSTEALTH;
public bool bNoInfo;
public int nDefaultSongSort;
public int nDefaultSongSort;
public int nRecentlyPlayedMax;
public EGame eGameMode;
public EGame eGameMode;
public int TokkunSkipMeasures;
public int TokkunMashInterval;
public bool bSuperHard = false;
public bool bTokkunMode = false;
public int[] bJust = new int[5] { 0, 0, 0, 0, 0 };
public bool bTokkunMode = false;
public int[] bJust = new int[5] { 0, 0, 0, 0, 0 };
public int[] nHitSounds = new int[5] { 0, 0, 0, 0, 0 };
public int[][] nPanning = new int[5][]
{
new int[1] { 0 },
new int[2] { -100, 100 },
new int[3] { -100, 0, 100 },
new int[4] { -75, -25, 25, 75 },
new int[5] { -100, -50, 0, 50, 100 },
};
public string[] sSaveFile = new string[5] { "1P", "2P", "3P", "4P", "5P" };
public bool bEndingAnime = false; // 2017.01.27 DD 「また遊んでね」画面の有効/無効オプション追加
@ -2064,10 +2074,18 @@ namespace TJAPlayer3
sw.WriteLine("LayoutType={0}", this.nLayoutType);
sw.WriteLine();
#endregion
#endregion
#region [ Window関連 ]
sw.WriteLine( "; 画面モード(0:ウィンドウ, 1:全画面)" );
#region [Save Files]
sw.WriteLine("; File paths on the Saves folder.");
sw.WriteLine("SaveFileName={0}", String.Join(",", this.sSaveFile));
sw.WriteLine();
#endregion
#region [ Window関連 ]
sw.WriteLine( "; 画面モード(0:ウィンドウ, 1:全画面)" );
sw.WriteLine( "; Screen mode. (0:Window, 1:Fullscreen)" );
sw.WriteLine( "FullScreen={0}", this.b全画面モード ? 1 : 0 );
sw.WriteLine();
@ -2843,6 +2861,20 @@ namespace TJAPlayer3
this.nLayoutType = int.Parse(str4);
}
else if (str3.Equals("SaveFileName"))
{
var _s = str4.Split(new char[] { ',' });
// Ignore custom save file names if duplicates
if (!_s.GroupBy(x => x).Any(g => g.Count() > 1))
{
for (int i = 0; i < Math.Min(5, _s.Length); i++)
{
this.sSaveFile[i] = _s[i];
}
}
}
#region [ skin関係 ]
else if ( str3.Equals( "SkinPath" ) )
{
@ -3256,8 +3288,6 @@ namespace TJAPlayer3
//-----------------------------
#endregion
#region [ [Log] ]
//-----------------------------
case Eセクション種別.Log:

View File

@ -305,7 +305,8 @@ namespace TJAPlayer3
if (song.eード種別 == C曲リストード.Eード種別.SCORE
&& song.strジャンル != "最近遊んだ曲"
&& song.strジャンル != "Favorite")
&& song.strジャンル != "Favorite"
&& song.strジャンル != "SearchD")
{
var score = song.arスコア[TJAPlayer3.stage選曲.act曲リスト.n現在のアンカ難易度レベルに最も近い難易度レベルを返す(song)];

View File

@ -1,4 +1,5 @@
using System.Text;
using System.IO;
using System.Text;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
@ -49,6 +50,7 @@ namespace TJAPlayer3
/// <param name="filePath">ファイル名。</param>
public static void SaveConfig(object obj, string filePath)
{
(new FileInfo(filePath)).Directory.Create();
using (var stream = new System.IO.StreamWriter(filePath, false, Encoding.UTF8))
{
stream.Write(JsonConvert.SerializeObject(obj, Formatting.Indented, Settings));

View File

@ -247,7 +247,7 @@ namespace TJAPlayer3
reference,
CLangManager.LangInstance.GetString(306),
CLangManager.LangInstance.GetString(307),
TJAPlayer3.NamePlateConfig.data.Medals[player]
TJAPlayer3.SaveFileInstances[player].data.Medals
);
}

View File

@ -6,15 +6,19 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Newtonsoft.Json;
using radio42.Multimedia.Midi;
namespace TJAPlayer3
{
class NamePlateConfig
{
public void tNamePlateConfig()
{
// Deprecated, only converts to new format
/*
if (!File.Exists("NamePlate.json"))
tSaveFile();
*/
tLoadFile();
}
@ -63,7 +67,7 @@ namespace TJAPlayer3
int cs = clearStatus;
if (TJAPlayer3.NamePlateConfig.data.DanTitles[player] == null)
TJAPlayer3.NamePlateConfig.data.DanTitles[player] = new Dictionary<string, CDanTitle>();
TJAPlayer3.NamePlateConfig.data.DanTitles[player] = new Dictionary<string, SaveFile.CDanTitle>();
if (TJAPlayer3.NamePlateConfig.data.DanTitles[player].ContainsKey(title))
{
@ -87,7 +91,7 @@ namespace TJAPlayer3
}
CDanTitle danTitle = new CDanTitle(iG, cs);
SaveFile.CDanTitle danTitle = new SaveFile.CDanTitle(iG, cs);
TJAPlayer3.NamePlateConfig.data.DanTitles[player][title] = danTitle;
@ -184,10 +188,10 @@ namespace TJAPlayer3
public string[] CharacterName = { "0", "0", "0", "0", "0" };
[JsonProperty("danTitles")]
public Dictionary<string, CDanTitle>[] DanTitles = new Dictionary<string, CDanTitle>[5];
public Dictionary<string, SaveFile.CDanTitle>[] DanTitles = new Dictionary<string, SaveFile.CDanTitle>[5];
[JsonProperty("namePlateTitles")]
public Dictionary<string, CNamePlateTitle>[] NamePlateTitles = new Dictionary<string, CNamePlateTitle>[5];
public Dictionary<string, SaveFile.CNamePlateTitle>[] NamePlateTitles = new Dictionary<string, SaveFile.CNamePlateTitle>[5];
[JsonProperty("unlockedPuchicharas")]
public List<string>[] UnlockedPuchicharas = new List<string>[5]
@ -212,7 +216,34 @@ namespace TJAPlayer3
private void tLoadFile()
{
data = ConfigManager.GetConfig<Data>(@"NamePlate.json");
//data = ConfigManager.GetConfig<Data>(@"NamePlate.json");
if (!File.Exists("NamePlate.json"))
return;
var _data = ConfigManager.GetConfig<Data>(@"NamePlate.json");
for (int i = 0; i < _data.Name.Length; i++)
{
var _sf = new SaveFile();
_sf.tSaveFile((i + 1) + "P");
_sf.data.Name = _data.Name[i];
_sf.data.Title = _data.Title[i];
_sf.data.Dan = _data.Dan[i];
_sf.data.DanGold = _data.DanGold[i];
_sf.data.DanType = _data.DanType[i];
_sf.data.TitleType = _data.TitleType[i];
_sf.data.PuchiChara = _data.PuchiChara[i];
_sf.data.Medals = _data.Medals[i];
_sf.data.Character = _data.Character[i];
_sf.data.CharacterName = _data.CharacterName[i];
_sf.data.DanTitles = _data.DanTitles[i];
_sf.data.NamePlateTitles = _data.NamePlateTitles[i];
_sf.data.UnlockedPuchicharas = _data.UnlockedPuchicharas[i];
_sf.tApplyHeyaChanges();
}
System.IO.File.Move(@"NamePlate.json", @"NamePlate_old.json");
}
#endregion

View File

@ -0,0 +1,211 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Newtonsoft.Json;
namespace TJAPlayer3
{
internal class SaveFile
{
public void tSaveFile(string filename)
{
path = @"Saves/" + filename + @".json";
name = filename;
if (!File.Exists(path))
{
this.data.Name = filename;
tSaveFile();
}
tLoadFile();
}
#region [Medals]
public void tEarnCoins(int amount)
{
data.Medals += amount;
tSaveFile();
}
// Return false if the current amount of coins is to low
public bool tSpendCoins(int amount)
{
if (data.Medals < amount)
return false;
data.Medals -= amount;
tSaveFile();
return true;
}
#endregion
#region [Dan titles]
public bool tUpdateDanTitle(string title, bool isGold, int clearStatus)
{
bool changed = false;
bool iG = isGold;
int cs = clearStatus;
if (this.data.DanTitles == null)
this.data.DanTitles = new Dictionary<string, CDanTitle>();
if (this.data.DanTitles.ContainsKey(title))
{
if (this.data.DanTitles[title].clearStatus > cs)
cs = this.data.DanTitles[title].clearStatus;
if (this.data.DanTitles[title].isGold)
iG = true;
}
// Automatically set the dan to nameplate if new
// Add a function within the NamePlate.cs file to update the title texture
if (!this.data.DanTitles.ContainsKey(title) || cs != clearStatus || iG != isGold)
{
changed = true;
/*
TJAPlayer3.NamePlateConfig.data.Dan[player] = title;
TJAPlayer3.NamePlateConfig.data.DanGold[player] = iG;
TJAPlayer3.NamePlateConfig.data.DanType[player] = cs;
*/
}
CDanTitle danTitle = new CDanTitle(iG, cs);
this.data.DanTitles[title] = danTitle;
tSaveFile();
return changed;
}
#endregion
#region [Auxilliary classes]
public class CDanTitle
{
public CDanTitle(bool iG, int cs)
{
isGold = iG;
clearStatus = cs;
}
[JsonProperty("isGold")]
public bool isGold;
[JsonProperty("clearStatus")]
public int clearStatus;
}
public class CNamePlateTitle
{
public CNamePlateTitle(int type)
{
iType = type;
}
[JsonProperty("iType")]
public int iType;
}
#endregion
#region [Heya]
public void tReindexCharacter(string[] characterNamesList)
{
string character = this.data.CharacterName;
if (characterNamesList.Contains(character))
this.data.Character = characterNamesList.ToList().IndexOf(character);
}
public void tUpdateCharacterName(string newChara)
{
this.data.CharacterName = newChara;
}
public void tApplyHeyaChanges()
{
this.tSaveFile();
}
#endregion
public class Data
{
[JsonProperty("name")]
public string Name = "プレイヤー1";
[JsonProperty("title")]
public string Title = "初心者";
[JsonProperty("dan")]
public string Dan = "新人";
[JsonProperty("danGold")]
public bool DanGold = false;
[JsonProperty("danType")]
public int DanType = 0;
[JsonProperty("titleType")]
public int TitleType = 0;
[JsonProperty("puchiChara")]
public string PuchiChara = "0";
[JsonProperty("medals")]
public int Medals = 0;
[JsonProperty("character")]
public int Character = 0;
[JsonProperty("characterName")]
public string CharacterName = "0";
[JsonProperty("danTitles")]
public Dictionary<string, CDanTitle> DanTitles = new Dictionary<string, CDanTitle>();
[JsonProperty("namePlateTitles")]
public Dictionary<string, CNamePlateTitle> NamePlateTitles = new Dictionary<string, CNamePlateTitle>();
[JsonProperty("unlockedPuchicharas")]
public List<string> UnlockedPuchicharas = new List<string>();
}
public Data data = new Data();
public string path = "Save.json";
public string name = "Save";
#region [private]
private void tSaveFile()
{
ConfigManager.SaveConfig(data, path);
}
private void tLoadFile()
{
data = ConfigManager.GetConfig<Data>(path);
}
#endregion
}
}

View File

@ -488,12 +488,14 @@ namespace TJAPlayer3
// 0 : 1P, 1 : 2P
public static int SaveFile = 0;
public static SaveFile[] SaveFileInstances = new SaveFile[5];
// 0 : Hidari, 1 : Migi (1P only)
public static int PlayerSide = 0;
public static int GetActualPlayer(int player)
{
if (SaveFile == 0)
if (SaveFile == 0 || player > 1)
return player;
if (player == 0)
return 1;
@ -2225,8 +2227,14 @@ for (int i = 0; i < 3; i++) {
Trace.TraceError( e.ToString() );
Trace.TraceError( "例外が発生しましたが処理を継続します。 (b8d93255-bbe4-4ca3-8264-7ee5175b19f3)" );
}
}
this.Window.EnableSystemMenu = TJAPlayer3.ConfigIni.bIsEnabledSystemMenu; // #28200 2011.5.1 yyagi
}
for (int i = 0; i < 5; i++)
{
SaveFileInstances[i] = new SaveFile();
SaveFileInstances[i].tSaveFile(TJAPlayer3.ConfigIni.sSaveFile[i]);
}
this.Window.EnableSystemMenu = TJAPlayer3.ConfigIni.bIsEnabledSystemMenu; // #28200 2011.5.1 yyagi
// 2012.8.22 Config.iniが無いときに初期値が適用されるよう、この設定行をifブロック外に移動
//---------------------

View File

@ -1766,9 +1766,14 @@ Debug.WriteLine( dBPM + ":" + c曲リストード.strタイトル );
// New format
string[] fp =
{
strScoreIniファイルパス + "1P.score.ini",
strScoreIniファイルパス + "2P.score.ini",
};
//strScoreIniファイルパス + "1P.score.ini",
//strScoreIniファイルパス + "2P.score.ini",
strScoreIniファイルパス + TJAPlayer3.SaveFileInstances[0].name + @".score.ini",
strScoreIniファイルパス + TJAPlayer3.SaveFileInstances[1].name + @".score.ini",
strScoreIniファイルパス + TJAPlayer3.SaveFileInstances[2].name + @".score.ini",
strScoreIniファイルパス + TJAPlayer3.SaveFileInstances[3].name + @".score.ini",
strScoreIniファイルパス + TJAPlayer3.SaveFileInstances[4].name + @".score.ini"
};
// Load legacy format if new doesn't exist yet
if (!File.Exists(fp[0]))
@ -1781,14 +1786,16 @@ Debug.WriteLine( dBPM + ":" + c曲リストード.strタイトル );
*/
// Select the main file for the common informations
/*
int mainFile = 0;
if (!File.Exists(fp[0]))
mainFile = 1;
if (!File.Exists(fp[1]) && mainFile == 1)
return;
*/
// Only the necessary scores are read from the auxilliary score file
int auxFile = mainFile ^ 1;
//int auxFile = mainFile ^ 1;
try
{
@ -1796,9 +1803,14 @@ Debug.WriteLine( dBPM + ":" + c曲リストード.strタイトル );
CScoreIni[] csi =
{
new CScoreIni(fp[mainFile]),
File.Exists(fp[auxFile]) ? new CScoreIni(fp[auxFile]) : null,
};
//new CScoreIni(fp[mainFile]),
//File.Exists(fp[auxFile]) ? new CScoreIni(fp[auxFile]) : null,
new CScoreIni(fp[0]),
new CScoreIni(fp[1]),
new CScoreIni(fp[2]),
new CScoreIni(fp[3]),
new CScoreIni(fp[4])
};
var ini = csi[0];
@ -1851,7 +1863,7 @@ Debug.WriteLine( dBPM + ":" + c曲リストード.strタイトル );
}
// Load GPInfo for each save file
for (int i = 0; i < 2; i++)
for (int i = 0; i < 5; i++)
{
if (csi[i] == null)
continue;

View File

@ -1131,8 +1131,8 @@ namespace TJAPlayer3
for (int i = 0; i < 5; i++)
{
TJAPlayer3.NamePlateConfig.tReindexCharacter(i, TJAPlayer3.Skin.Characters_DirName);
this.ReloadCharacter(-1, TJAPlayer3.NamePlateConfig.data.Character[i], i, true);
TJAPlayer3.SaveFileInstances[i].tReindexCharacter(TJAPlayer3.Skin.Characters_DirName);
this.ReloadCharacter(-1, TJAPlayer3.SaveFileInstances[i].data.Character, i, true);
}
@ -1208,14 +1208,12 @@ namespace TJAPlayer3
if (old == newC)
return;
int other = (player == 0) ? 1 : 0;
if (old >= 0 &&
(TJAPlayer3.NamePlateConfig.data.Character[0] != old || player == 0) &&
(TJAPlayer3.NamePlateConfig.data.Character[1] != old || player == 1) &&
(TJAPlayer3.NamePlateConfig.data.Character[2] != old || player == 2) &&
(TJAPlayer3.NamePlateConfig.data.Character[3] != old || player == 3) &&
(TJAPlayer3.NamePlateConfig.data.Character[4] != old || player == 4))
(TJAPlayer3.SaveFileInstances[0].data.Character != old || player == 0) &&
(TJAPlayer3.SaveFileInstances[1].data.Character != old || player == 1) &&
(TJAPlayer3.SaveFileInstances[2].data.Character != old || player == 2) &&
(TJAPlayer3.SaveFileInstances[3].data.Character != old || player == 3) &&
(TJAPlayer3.SaveFileInstances[4].data.Character != old || player == 4))
{
int i = old;
@ -1305,11 +1303,11 @@ namespace TJAPlayer3
string charaPath = TJAPlayer3.strEXEのあるフォルダ + GLOBAL + CHARACTERS + TJAPlayer3.Skin.Characters_DirName[newC];
if ((newC >= 0 &&
TJAPlayer3.NamePlateConfig.data.Character[0] != newC &&
TJAPlayer3.NamePlateConfig.data.Character[1] != newC &&
TJAPlayer3.NamePlateConfig.data.Character[2] != newC &&
TJAPlayer3.NamePlateConfig.data.Character[3] != newC &&
TJAPlayer3.NamePlateConfig.data.Character[4] != newC) || primary)
TJAPlayer3.SaveFileInstances[0].data.Character != newC &&
TJAPlayer3.SaveFileInstances[1].data.Character != newC &&
TJAPlayer3.SaveFileInstances[2].data.Character != newC &&
TJAPlayer3.SaveFileInstances[3].data.Character != newC &&
TJAPlayer3.SaveFileInstances[4].data.Character != newC) || primary)
{
int i = newC;

View File

@ -595,7 +595,7 @@ namespace TJAPlayer3
int _actual = TJAPlayer3.GetActualPlayer(0);
int _charaId = TJAPlayer3.NamePlateConfig.data.Character[_actual];
int _charaId = TJAPlayer3.SaveFileInstances[_actual].data.Character;
int chara_x = TJAPlayer3.Skin.Title_Entry_NamePlate[0] + TJAPlayer3.Tx.NamePlateBase.szテクスチャサイズ.Width / 2;
int chara_y = TJAPlayer3.Skin.Title_Entry_NamePlate[1];
@ -695,7 +695,7 @@ namespace TJAPlayer3
DonchanY = ((float)Math.Sin((90 + (ctどんちゃんイン.n現在の値 / 2)) * (Math.PI / 180)) * 150f);
if (player == 1) DonchanX *= -1;
int _charaId = TJAPlayer3.NamePlateConfig.data.Character[TJAPlayer3.GetActualPlayer(player)];
int _charaId = TJAPlayer3.SaveFileInstances[TJAPlayer3.GetActualPlayer(player)].data.Character;
//int chara_x = (int)(TJAPlayer3.Skin.Characters_Title_Normal_X[_charaId][player] + DonchanX);
//int chara_y = (int)(TJAPlayer3.Skin.Characters_Title_Normal_Y[_charaId][player] - DonchanY);

View File

@ -510,7 +510,7 @@ namespace TJAPlayer3
{
CCounter ___cc = CMenuCharacter._getReferenceCounter(CMenuCharacter.ECharacterAnimation.SELECT)[player];
int _charaId = TJAPlayer3.NamePlateConfig.data.Character[TJAPlayer3.GetActualPlayer(player)];
int _charaId = TJAPlayer3.SaveFileInstances[TJAPlayer3.GetActualPlayer(player)].data.Character;
//int chara_x = TJAPlayer3.Skin.Characters_Menu_X[_charaId][player];
//int chara_y = TJAPlayer3.Skin.Characters_Menu_Y[_charaId][player];
@ -624,8 +624,8 @@ namespace TJAPlayer3
int p = TJAPlayer3.GetActualPlayer(i);
if (TJAPlayer3.NamePlateConfig.data.Medals[p] >= 0)
tBoardNumberDraw(TJAPlayer3.Skin.SongSelect_BoardNumber_X[i][10], TJAPlayer3.Skin.SongSelect_BoardNumber_Y[i][10], TJAPlayer3.NamePlateConfig.data.Medals[p]);
if (TJAPlayer3.SaveFileInstances[p].data.Medals >= 0)
tBoardNumberDraw(TJAPlayer3.Skin.SongSelect_BoardNumber_X[i][10], TJAPlayer3.Skin.SongSelect_BoardNumber_Y[i][10], TJAPlayer3.SaveFileInstances[p].data.Medals);
#region [HiScore plate]

View File

@ -81,7 +81,7 @@ namespace TJAPlayer3
{
#region [Combo voices]
int _charaId = TJAPlayer3.NamePlateConfig.data.Character[TJAPlayer3.GetActualPlayer(i)];
int _charaId = TJAPlayer3.SaveFileInstances[TJAPlayer3.GetActualPlayer(i)].data.Character;
var currentDir = ($@"{TJAPlayer3.strEXEのあるフォルダ}Global\Characters\{TJAPlayer3.Skin.Characters_DirName[_charaId]}\Sounds\Combo\");
if (Directory.Exists(currentDir))
@ -93,6 +93,7 @@ namespace TJAPlayer3
comboVoice.nPlayer = i;
comboVoice.strFilePath = item;
comboVoice.soundComboVoice = TJAPlayer3.Sound管理.tサウンドを生成する(item, ESoundGroup.Voice);
/*
if (TJAPlayer3.ConfigIni.nPlayerCount >= 2) //2020.05.06 Mr-Ojii 左右に出したかったから追加。
{
if (i == 0)
@ -100,6 +101,8 @@ namespace TJAPlayer3
else
comboVoice.soundComboVoice.n位置 = 100;
}
*/
comboVoice.soundComboVoice.n位置 = TJAPlayer3.ConfigIni.nPanning[TJAPlayer3.ConfigIni.nPlayerCount - 1][i];
comboVoice.nCombo = int.Parse(Path.GetFileNameWithoutExtension(item));
ListCombo[i].Add(comboVoice);
}

View File

@ -3531,7 +3531,7 @@ namespace TJAPlayer3
int p = TJAPlayer3.GetActualPlayer(nPlayer);
int chara = Math.Max(0, Math.Min(TJAPlayer3.NamePlateConfig.data.Character[p], TJAPlayer3.Skin.Characters_Ptn - 1));
int chara = Math.Max(0, Math.Min(TJAPlayer3.SaveFileInstances[p].data.Character, TJAPlayer3.Skin.Characters_Ptn - 1));
if (TJAPlayer3.Skin.Characters_Normal_Ptn[chara] != 0)
{
@ -3758,7 +3758,7 @@ namespace TJAPlayer3
int p = TJAPlayer3.GetActualPlayer(nPlayer);
int chara = Math.Max(0, Math.Min(TJAPlayer3.NamePlateConfig.data.Character[p], TJAPlayer3.Skin.Characters_Ptn - 1));
int chara = Math.Max(0, Math.Min(TJAPlayer3.SaveFileInstances[p].data.Character, TJAPlayer3.Skin.Characters_Ptn - 1));
if (TJAPlayer3.Skin.Characters_Normal_Ptn[chara] != 0)
{
@ -4091,10 +4091,13 @@ namespace TJAPlayer3
case 0xF1:
if (!pChip.bHit && (pChip.nバーからの距離dot.Drums < 0))
{
if (dTX.listLyric.Count > ShownLyric[nPlayer] && dTX.nPlayerSide == nPlayer)
if (TJAPlayer3.ConfigIni.nPlayerCount == 1)
{
this.actPanel.t歌詞テクスチャを生成する(dTX.listLyric[ShownLyric[nPlayer]]);
ShownLyric[nPlayer]++;
if (dTX.listLyric.Count > ShownLyric[nPlayer] && dTX.nPlayerSide == nPlayer)
{
this.actPanel.t歌詞テクスチャを生成する(dTX.listLyric[ShownLyric[nPlayer]]);
ShownLyric[nPlayer]++;
}
}
pChip.bHit = true;
}

View File

@ -51,7 +51,7 @@ namespace TJAPlayer3
// Currently used character
int p = TJAPlayer3.GetActualPlayer(i);
this.iCurrentCharacter[i] = Math.Max(0, Math.Min(TJAPlayer3.NamePlateConfig.data.Character[p], TJAPlayer3.Skin.Characters_Ptn - 1));
this.iCurrentCharacter[i] = Math.Max(0, Math.Min(TJAPlayer3.SaveFileInstances[p].data.Character, TJAPlayer3.Skin.Characters_Ptn - 1));
this.b風船連打中[i] = false;

View File

@ -238,7 +238,7 @@ namespace TJAPlayer3
{
int p = TJAPlayer3.GetActualPlayer(nPlayer);
int chara = Math.Max(0, Math.Min(TJAPlayer3.NamePlateConfig.data.Character[p], TJAPlayer3.Skin.Characters_Ptn - 1));
int chara = Math.Max(0, Math.Min(TJAPlayer3.SaveFileInstances[p].data.Character, TJAPlayer3.Skin.Characters_Ptn - 1));
if (TJAPlayer3.Skin.Characters_Normal_Ptn[chara] != 0)
{
@ -368,6 +368,12 @@ namespace TJAPlayer3
this.soundBlue[i] = TJAPlayer3.Sound管理.tサウンドを生成する(CSkin.Path(hs.ka[actual]), ESoundGroup.SoundEffect);
this.soundAdlib[i] = TJAPlayer3.Sound管理.tサウンドを生成する(CSkin.Path(hs.adlib[actual]), ESoundGroup.SoundEffect);
this.soundClap[i] = TJAPlayer3.Sound管理.tサウンドを生成する(CSkin.Path(hs.clap[actual]), ESoundGroup.SoundEffect);
int _panning = TJAPlayer3.ConfigIni.nPanning[TJAPlayer3.ConfigIni.nPlayerCount - 1][i];
this.soundRed[i].n位置 = _panning;
this.soundBlue[i].n位置 = _panning;
this.soundAdlib[i].n位置 = _panning;
this.soundClap[i].n位置 = _panning;
}
/*
this.soundRed = TJAPlayer3.Sound管理.tサウンドを生成する( CSkin.Path( @"Sounds\Taiko\dong.ogg" ), ESoundGroup.SoundEffect );
@ -379,7 +385,7 @@ namespace TJAPlayer3
this.soundAdlib2 = TJAPlayer3.Sound管理.tサウンドを生成する(CSkin.Path(@"Sounds\Taiko\Adlib.ogg"), ESoundGroup.SoundEffect);
*/
/*
if (TJAPlayer3.ConfigIni.nPlayerCount == 2)//2020.05.06 Mr-Ojii左右に出したかったから、追加。
{
this.soundRed[0].n位置 = -100;
@ -389,6 +395,7 @@ namespace TJAPlayer3
this.soundBlue[1].n位置 = 100;
this.soundAdlib[1].n位置 = 100;
}
*/
}
base.OnManagedリソースの作成();

View File

@ -880,7 +880,7 @@ namespace TJAPlayer3
#region [Character Animations]
int _charaId = TJAPlayer3.NamePlateConfig.data.Character[TJAPlayer3.GetActualPlayer(p)];
int _charaId = TJAPlayer3.SaveFileInstances[TJAPlayer3.GetActualPlayer(p)].data.Character;
//int chara_x = TJAPlayer3.Skin.Characters_Result_X[_charaId][pos];
//int chara_y = TJAPlayer3.Skin.Characters_Result_Y[_charaId][pos];

View File

@ -213,15 +213,15 @@ namespace TJAPlayer3
#region [ .score.ini file output ]
//---------------------
int currentSaveFile = TJAPlayer3.SaveFile + 1;
int secondSaveFile = (currentSaveFile == 1) ? 2 : 1;
//int currentSaveFile = TJAPlayer3.SaveFile + 1;
//int secondSaveFile = (currentSaveFile == 1) ? 2 : 1;
string[] str = {
TJAPlayer3.DTX.strファイル名の絶対パス + currentSaveFile.ToString() + "P.score.ini",
TJAPlayer3.DTX.strファイル名の絶対パス + secondSaveFile.ToString() + "P.score.ini",
TJAPlayer3.DTX.strファイル名の絶対パス + 3.ToString() + "P.score.ini",
TJAPlayer3.DTX.strファイル名の絶対パス + 4.ToString() + "P.score.ini",
TJAPlayer3.DTX.strファイル名の絶対パス + 5.ToString() + "P.score.ini"
TJAPlayer3.DTX.strファイル名の絶対パス + TJAPlayer3.SaveFileInstances[TJAPlayer3.GetActualPlayer(0)].name + @".score.ini",
TJAPlayer3.DTX.strファイル名の絶対パス + TJAPlayer3.SaveFileInstances[TJAPlayer3.GetActualPlayer(1)].name + @".score.ini",
TJAPlayer3.DTX.strファイル名の絶対パス + TJAPlayer3.SaveFileInstances[TJAPlayer3.GetActualPlayer(2)].name + @".score.ini",
TJAPlayer3.DTX.strファイル名の絶対パス + TJAPlayer3.SaveFileInstances[TJAPlayer3.GetActualPlayer(3)].name + @".score.ini",
TJAPlayer3.DTX.strファイル名の絶対パス + TJAPlayer3.SaveFileInstances[TJAPlayer3.GetActualPlayer(4)].name + @".score.ini"
};
#region [Transfer legacy file format to new file format (P1)]
@ -269,16 +269,8 @@ namespace TJAPlayer3
#region [Regular saves]
CScoreIni.C演奏記録[] baseScores =
{
ini[0].stセクション[0],
ini[1].stセクション[0]
};
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
var ccf = TJAPlayer3.stage演奏ドラム画面.CChartScore[i];
int diff = TJAPlayer3.stage選曲.n確定された曲の難易度[i];
var clear = Math.Max(ini[i].stセクション[0].nクリア[diff], this.nクリア[i]);
@ -394,11 +386,17 @@ namespace TJAPlayer3
// Unlock dan grade
if (clearValue > 0 && !TJAPlayer3.ConfigIni.b太鼓パートAutoPlay[0])
{
/*
this.newGradeGranted = TJAPlayer3.NamePlateConfig.tUpdateDanTitle(TJAPlayer3.stage選曲.r確定された曲.strタイトル.Substring(0, 2),
clearValue % 2 == 0,
(clearValue - 1) / 2,
TJAPlayer3.SaveFile);
}
*/
this.newGradeGranted = TJAPlayer3.SaveFileInstances[TJAPlayer3.SaveFile].tUpdateDanTitle(TJAPlayer3.stage選曲.r確定された曲.strタイトル.Substring(0, 2),
clearValue % 2 == 0,
(clearValue - 1) / 2);
}
#endregion
@ -635,10 +633,12 @@ namespace TJAPlayer3
this.nEarnedMedalsCount[i] = 0;
if ((TJAPlayer3.ConfigIni.b太鼓パートAutoPlay[i] || TJAPlayer3.ConfigIni.bAIBattleMode) && i == 1)
this.nEarnedMedalsCount[i] = 0;
TJAPlayer3.SaveFileInstances[TJAPlayer3.GetActualPlayer(i)].tEarnCoins(this.nEarnedMedalsCount[i]);
}
TJAPlayer3.NamePlateConfig.tEarnCoins(this.nEarnedMedalsCount);
//TJAPlayer3.NamePlateConfig.tEarnCoins(this.nEarnedMedalsCount);
#endregion

View File

@ -67,8 +67,8 @@ namespace TJAPlayer3
#region [Dan title]
int amount = 1;
if (TJAPlayer3.NamePlateConfig.data.DanTitles[iPlayer] != null)
amount += TJAPlayer3.NamePlateConfig.data.DanTitles[iPlayer].Count;
if (TJAPlayer3.SaveFileInstances[iPlayer].data.DanTitles != null)
amount += TJAPlayer3.SaveFileInstances[iPlayer].data.DanTitles.Count;
this.ttkDanTitles = new TitleTextureKey[amount];
@ -76,9 +76,9 @@ namespace TJAPlayer3
this.ttkDanTitles[0] = new TitleTextureKey("新人", this.pfHeyaFont, Color.White, Color.Black, 1000);
int idx = 1;
if (TJAPlayer3.NamePlateConfig.data.DanTitles[iPlayer] != null)
if (TJAPlayer3.SaveFileInstances[iPlayer].data.DanTitles != null)
{
foreach (var item in TJAPlayer3.NamePlateConfig.data.DanTitles[iPlayer])
foreach (var item in TJAPlayer3.SaveFileInstances[iPlayer].data.DanTitles)
{
if (item.Value.isGold == true)
this.ttkDanTitles[idx] = new TitleTextureKey(item.Key, this.pfHeyaFont, Color.Gold, Color.Black, 1000);
@ -93,8 +93,8 @@ namespace TJAPlayer3
#region [Plate title]
amount = 1;
if (TJAPlayer3.NamePlateConfig.data.NamePlateTitles[iPlayer] != null)
amount += TJAPlayer3.NamePlateConfig.data.NamePlateTitles[iPlayer].Count;
if (TJAPlayer3.SaveFileInstances[iPlayer].data.NamePlateTitles != null)
amount += TJAPlayer3.SaveFileInstances[iPlayer].data.NamePlateTitles.Count;
this.ttkTitles = new TitleTextureKey[amount];
@ -102,9 +102,9 @@ namespace TJAPlayer3
this.ttkTitles[0] = new TitleTextureKey("初心者", this.pfHeyaFont, Color.Black, Color.Transparent, 1000);
idx = 1;
if (TJAPlayer3.NamePlateConfig.data.NamePlateTitles[iPlayer] != null)
if (TJAPlayer3.SaveFileInstances[iPlayer].data.NamePlateTitles != null)
{
foreach (var item in TJAPlayer3.NamePlateConfig.data.NamePlateTitles[iPlayer])
foreach (var item in TJAPlayer3.SaveFileInstances[iPlayer].data.NamePlateTitles)
{
this.ttkTitles[idx] = new TitleTextureKey(item.Key, this.pfHeyaFont, Color.Black, Color.Transparent, 1000);
idx++;
@ -280,7 +280,7 @@ namespace TJAPlayer3
}
if (TJAPlayer3.Tx.Puchichara[pos].unlock != null
&& !TJAPlayer3.NamePlateConfig.data.UnlockedPuchicharas[iPlayer].Contains(TJAPlayer3.Skin.Puchicharas_Name[pos]))
&& !TJAPlayer3.SaveFileInstances[iPlayer].data.UnlockedPuchicharas.Contains(TJAPlayer3.Skin.Puchicharas_Name[pos]))
TJAPlayer3.Tx.Heya_Lock?.t2D拡大率考慮上中央基準描画(TJAPlayer3.app.Device, scroll.Item1, scroll.Item2);
#endregion
@ -367,7 +367,7 @@ namespace TJAPlayer3
int danGrade = 0;
if (pos > 0)
{
danGrade = TJAPlayer3.NamePlateConfig.data.DanTitles[iPlayer][this.ttkDanTitles[pos].str文字].clearStatus;
danGrade = TJAPlayer3.SaveFileInstances[iPlayer].data.DanTitles[this.ttkDanTitles[pos].str文字].clearStatus;
}
var scroll = DrawSide_Menu(i + (TJAPlayer3.Skin.Heya_Side_Menu_Count / 2));
@ -411,9 +411,9 @@ namespace TJAPlayer3
int iType = -1;
if (TJAPlayer3.NamePlateConfig.data.NamePlateTitles[iPlayer] != null &&
TJAPlayer3.NamePlateConfig.data.NamePlateTitles[iPlayer].ContainsKey(this.ttkTitles[pos].str文字))
iType = TJAPlayer3.NamePlateConfig.data.NamePlateTitles[iPlayer][this.ttkTitles[pos].str文字].iType;
if (TJAPlayer3.SaveFileInstances[iPlayer].data.NamePlateTitles != null &&
TJAPlayer3.SaveFileInstances[iPlayer].data.NamePlateTitles.ContainsKey(this.ttkTitles[pos].str文字))
iType = TJAPlayer3.SaveFileInstances[iPlayer].data.NamePlateTitles[this.ttkTitles[pos].str文字].iType;
else if (pos == 0)
iType = 0;
@ -546,8 +546,10 @@ namespace TJAPlayer3
if (ess == ESelectStatus.SELECTED)
{
//PuchiChara.tGetPuchiCharaIndexByName(p);
TJAPlayer3.NamePlateConfig.data.PuchiChara[iPlayer] = TJAPlayer3.Skin.Puchicharas_Name[iPuchiCharaCurrent];// iPuchiCharaCurrent;
TJAPlayer3.NamePlateConfig.tApplyHeyaChanges();
//TJAPlayer3.NamePlateConfig.data.PuchiChara[iPlayer] = TJAPlayer3.Skin.Puchicharas_Name[iPuchiCharaCurrent];// iPuchiCharaCurrent;
//TJAPlayer3.NamePlateConfig.tApplyHeyaChanges();
TJAPlayer3.SaveFileInstances[iPlayer].data.PuchiChara = TJAPlayer3.Skin.Puchicharas_Name[iPuchiCharaCurrent];// iPuchiCharaCurrent;
TJAPlayer3.SaveFileInstances[iPlayer].tApplyHeyaChanges();
TJAPlayer3.Tx.Puchichara[iPuchiCharaCurrent].welcome.t再生する();
iCurrentMenu = -1;
@ -555,8 +557,11 @@ namespace TJAPlayer3
}
else if (ess == ESelectStatus.SUCCESS)
{
TJAPlayer3.NamePlateConfig.data.UnlockedPuchicharas[iPlayer].Add(TJAPlayer3.Skin.Puchicharas_Name[iPuchiCharaCurrent]);
TJAPlayer3.NamePlateConfig.tSpendCoins(TJAPlayer3.Tx.Puchichara[iPuchiCharaCurrent].unlock.Values[0], iPlayer);
//TJAPlayer3.NamePlateConfig.data.UnlockedPuchicharas[iPlayer].Add(TJAPlayer3.Skin.Puchicharas_Name[iPuchiCharaCurrent]);
//TJAPlayer3.NamePlateConfig.tSpendCoins(TJAPlayer3.Tx.Puchichara[iPuchiCharaCurrent].unlock.Values[0], iPlayer);
TJAPlayer3.SaveFileInstances[iPlayer].data.UnlockedPuchicharas.Add(TJAPlayer3.Skin.Puchicharas_Name[iPuchiCharaCurrent]);
TJAPlayer3.SaveFileInstances[iPlayer].tSpendCoins(TJAPlayer3.Tx.Puchichara[iPuchiCharaCurrent].unlock.Values[0]);
}
}
@ -565,18 +570,18 @@ namespace TJAPlayer3
//TJAPlayer3.Tx.Loading?.t2D描画(TJAPlayer3.app.Device, 18, 7);
// Reload character, a bit time expensive but with a O(N) memory complexity instead of O(N * M)
TJAPlayer3.Tx.ReloadCharacter(TJAPlayer3.NamePlateConfig.data.Character[iPlayer], iCharacterCurrent, iPlayer);
TJAPlayer3.NamePlateConfig.data.Character[iPlayer] = iCharacterCurrent;
TJAPlayer3.Tx.ReloadCharacter(TJAPlayer3.SaveFileInstances[iPlayer].data.Character, iCharacterCurrent, iPlayer);
TJAPlayer3.SaveFileInstances[iPlayer].data.Character = iCharacterCurrent;
// Update the character
TJAPlayer3.NamePlateConfig.tUpdateCharacterName(iPlayer, TJAPlayer3.Skin.Characters_DirName[iCharacterCurrent]);
TJAPlayer3.SaveFileInstances[iPlayer].tUpdateCharacterName(TJAPlayer3.Skin.Characters_DirName[iCharacterCurrent]);
// Welcome voice using Sanka
TJAPlayer3.Skin.voiceTitleSanka[iPlayer]?.t再生する();
CMenuCharacter.tMenuResetTimer(CMenuCharacter.ECharacterAnimation.NORMAL);
TJAPlayer3.NamePlateConfig.tApplyHeyaChanges();
TJAPlayer3.SaveFileInstances[iPlayer].tApplyHeyaChanges();
iCurrentMenu = -1;
this.tResetOpts();
@ -589,17 +594,17 @@ namespace TJAPlayer3
if (iDanTitleCurrent > 0)
{
iG = TJAPlayer3.NamePlateConfig.data.DanTitles[iPlayer][this.ttkDanTitles[iDanTitleCurrent].str文字].isGold;
cs = TJAPlayer3.NamePlateConfig.data.DanTitles[iPlayer][this.ttkDanTitles[iDanTitleCurrent].str文字].clearStatus;
iG = TJAPlayer3.SaveFileInstances[iPlayer].data.DanTitles[this.ttkDanTitles[iDanTitleCurrent].str文字].isGold;
cs = TJAPlayer3.SaveFileInstances[iPlayer].data.DanTitles[this.ttkDanTitles[iDanTitleCurrent].str文字].clearStatus;
}
TJAPlayer3.NamePlateConfig.data.Dan[iPlayer] = this.ttkDanTitles[iDanTitleCurrent].str文字;
TJAPlayer3.NamePlateConfig.data.DanGold[iPlayer] = iG;
TJAPlayer3.NamePlateConfig.data.DanType[iPlayer] = cs;
TJAPlayer3.SaveFileInstances[iPlayer].data.Dan = this.ttkDanTitles[iDanTitleCurrent].str文字;
TJAPlayer3.SaveFileInstances[iPlayer].data.DanGold = iG;
TJAPlayer3.SaveFileInstances[iPlayer].data.DanType = cs;
TJAPlayer3.NamePlate.tNamePlateRefreshTitles(iPlayer);
TJAPlayer3.NamePlateConfig.tApplyHeyaChanges();
TJAPlayer3.SaveFileInstances[iPlayer].tApplyHeyaChanges();
iCurrentMenu = -1;
this.tResetOpts();
@ -607,19 +612,19 @@ namespace TJAPlayer3
else if (iCurrentMenu == 3)
{
TJAPlayer3.NamePlateConfig.data.Title[iPlayer] = this.ttkTitles[iTitleCurrent].str文字;
TJAPlayer3.SaveFileInstances[iPlayer].data.Title = this.ttkTitles[iTitleCurrent].str文字;
if (TJAPlayer3.NamePlateConfig.data.NamePlateTitles[iPlayer] != null
&& TJAPlayer3.NamePlateConfig.data.NamePlateTitles[iPlayer].ContainsKey(this.ttkTitles[iTitleCurrent].str文字))
TJAPlayer3.NamePlateConfig.data.TitleType[iPlayer] = TJAPlayer3.NamePlateConfig.data.NamePlateTitles[iPlayer][this.ttkTitles[iTitleCurrent].str文字].iType;
if (TJAPlayer3.SaveFileInstances[iPlayer].data.NamePlateTitles != null
&& TJAPlayer3.SaveFileInstances[iPlayer].data.NamePlateTitles.ContainsKey(this.ttkTitles[iTitleCurrent].str文字))
TJAPlayer3.SaveFileInstances[iPlayer].data.TitleType = TJAPlayer3.SaveFileInstances[iPlayer].data.NamePlateTitles[this.ttkTitles[iTitleCurrent].str文字].iType;
else if (iTitleCurrent == 0)
TJAPlayer3.NamePlateConfig.data.TitleType[iPlayer] = 0;
TJAPlayer3.SaveFileInstances[iPlayer].data.TitleType = 0;
else
TJAPlayer3.NamePlateConfig.data.TitleType[iPlayer] = -1;
TJAPlayer3.SaveFileInstances[iPlayer].data.TitleType = -1;
TJAPlayer3.NamePlate.tNamePlateRefreshTitles(iPlayer);
TJAPlayer3.NamePlateConfig.tApplyHeyaChanges();
TJAPlayer3.SaveFileInstances[iPlayer].tApplyHeyaChanges();
iCurrentMenu = -1;
this.tResetOpts();
@ -709,10 +714,10 @@ namespace TJAPlayer3
private void tResetOpts()
{
// Retrieve titles if they exist
var _titles = TJAPlayer3.NamePlateConfig.data.NamePlateTitles[this.iPlayer];
var _title = TJAPlayer3.NamePlateConfig.data.Title[this.iPlayer];
var _dans = TJAPlayer3.NamePlateConfig.data.DanTitles[this.iPlayer];
var _dan = TJAPlayer3.NamePlateConfig.data.Dan[this.iPlayer];
var _titles = TJAPlayer3.SaveFileInstances[iPlayer].data.NamePlateTitles;
var _title = TJAPlayer3.SaveFileInstances[iPlayer].data.Title;
var _dans = TJAPlayer3.SaveFileInstances[iPlayer].data.DanTitles;
var _dan = TJAPlayer3.SaveFileInstances[iPlayer].data.Dan;
iTitleCurrent = 0;
@ -724,7 +729,7 @@ namespace TJAPlayer3
if (_dans != null && _dans.ContainsKey(_dan))
iDanTitleCurrent = _dans.Keys.ToList().IndexOf(_dan) + 1;
iCharacterCurrent = Math.Max(0, Math.Min(TJAPlayer3.Skin.Characters_Ptn - 1, TJAPlayer3.NamePlateConfig.data.Character[this.iPlayer]));
iCharacterCurrent = Math.Max(0, Math.Min(TJAPlayer3.Skin.Characters_Ptn - 1, TJAPlayer3.SaveFileInstances[iPlayer].data.Character));
//iPuchiCharaCurrent = Math.Max(0, Math.Min(TJAPlayer3.Skin.Puchichara_Ptn - 1, TJAPlayer3.NamePlateConfig.data.PuchiChara[this.iPlayer]));
iPuchiCharaCurrent = PuchiChara.tGetPuchiCharaIndexByName(this.iPlayer);
@ -834,7 +839,7 @@ namespace TJAPlayer3
#region [Check unlockable]
if (TJAPlayer3.Tx.Puchichara[iPuchiCharaCurrent].unlock != null
&& !TJAPlayer3.NamePlateConfig.data.UnlockedPuchicharas[iPlayer].Contains(TJAPlayer3.Skin.Puchicharas_Name[iPuchiCharaCurrent]))
&& !TJAPlayer3.SaveFileInstances[iPlayer].data.UnlockedPuchicharas.Contains(TJAPlayer3.Skin.Puchicharas_Name[iPuchiCharaCurrent]))
{
this.ttkInfoSection = new TitleTextureKey(TJAPlayer3.Tx.Puchichara[iPuchiCharaCurrent].unlock.tConditionMessage()
, this.pfHeyaFont, Color.White, Color.Black, 1000);
@ -850,10 +855,10 @@ namespace TJAPlayer3
// Add "If unlocked" to select directly
if (TJAPlayer3.Tx.Puchichara[iPuchiCharaCurrent].unlock != null
&& !TJAPlayer3.NamePlateConfig.data.UnlockedPuchicharas[iPlayer].Contains(TJAPlayer3.Skin.Puchicharas_Name[iPuchiCharaCurrent]))
&& !TJAPlayer3.SaveFileInstances[iPlayer].data.UnlockedPuchicharas.Contains(TJAPlayer3.Skin.Puchicharas_Name[iPuchiCharaCurrent]))
{
(bool, string) response = TJAPlayer3.Tx.Puchichara[iPuchiCharaCurrent].unlock.tConditionMet(
new int[] { TJAPlayer3.NamePlateConfig.data.Medals[TJAPlayer3.SaveFile] });
new int[] { TJAPlayer3.SaveFileInstances[TJAPlayer3.SaveFile].data.Medals });
Color responseColor = (response.Item1) ? Color.Lime : Color.Red;
// Send coins here for the unlock, considering that only coin-paid puchicharas can be unlocked directly from the Heya menu

View File

@ -19,14 +19,14 @@ namespace TJAPlayer3
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
{
if (TJAPlayer3.NamePlateConfig.data.Title[player] == "" || TJAPlayer3.NamePlateConfig.data.Title[player] == null)
if (TJAPlayer3.SaveFileInstances[player].data.Title == "" || TJAPlayer3.SaveFileInstances[player].data.Title == null)
this.pfName[player] = new CPrivateFastFont(new FontFamily(TJAPlayer3.ConfigIni.FontName), TJAPlayer3.Skin.NamePlate_Font_Name_Size_Normal);
else
this.pfName[player] = new CPrivateFastFont(new FontFamily(TJAPlayer3.ConfigIni.FontName), TJAPlayer3.Skin.NamePlate_Font_Name_Size_WithTitle);
}
else
{
if (TJAPlayer3.NamePlateConfig.data.Title[player] == "" || TJAPlayer3.NamePlateConfig.data.Title[player] == null)
if (TJAPlayer3.SaveFileInstances[player].data.Title == "" || TJAPlayer3.SaveFileInstances[player].data.Title == null)
this.pfName[player] = new CPrivateFastFont(new FontFamily("MS UI Gothic"), TJAPlayer3.Skin.NamePlate_Font_Name_Size_Normal);
else
this.pfName[player] = new CPrivateFastFont(new FontFamily("MS UI Gothic"), TJAPlayer3.Skin.NamePlate_Font_Name_Size_WithTitle);
@ -54,10 +54,10 @@ namespace TJAPlayer3
for (int player = 0; player < 5; player++)
{
if (TJAPlayer3.NamePlateConfig.data.DanType[player] < 0) TJAPlayer3.NamePlateConfig.data.DanType[player] = 0;
else if (TJAPlayer3.NamePlateConfig.data.DanType[player] > 2) TJAPlayer3.NamePlateConfig.data.DanType[player] = 2;
if (TJAPlayer3.SaveFileInstances[player].data.DanType < 0) TJAPlayer3.SaveFileInstances[player].data.DanType = 0;
else if (TJAPlayer3.SaveFileInstances[player].data.DanType > 2) TJAPlayer3.SaveFileInstances[player].data.DanType = 2;
if (TJAPlayer3.NamePlateConfig.data.TitleType[player] < 0) TJAPlayer3.NamePlateConfig.data.TitleType[player] = 0;
if (TJAPlayer3.SaveFileInstances[player].data.TitleType < 0) TJAPlayer3.SaveFileInstances[player].data.TitleType = 0;
tNamePlateRefreshTitles(player);
}
@ -96,9 +96,9 @@ namespace TJAPlayer3
if (!TJAPlayer3.ConfigIni.bAIBattleMode || actualPlayer == 0)
{
name = TJAPlayer3.NamePlateConfig.data.Name[player];
title = TJAPlayer3.NamePlateConfig.data.Title[player];
dan = TJAPlayer3.NamePlateConfig.data.Dan[player];
name = TJAPlayer3.SaveFileInstances[player].data.Name;
title = TJAPlayer3.SaveFileInstances[player].data.Title;
dan = TJAPlayer3.SaveFileInstances[player].data.Dan;
}
txTitle[player] = TJAPlayer3.stage選曲.act曲リスト.ResolveTitleTexture(new TitleTextureKey(title, pfTitle, Color.Black, Color.Empty, 1000));
@ -131,9 +131,9 @@ namespace TJAPlayer3
tNamePlateDisplayNamePlateBase(x, y, 3);
// Upper (title) plate
if (TJAPlayer3.NamePlateConfig.data.Title[player] != "" && TJAPlayer3.NamePlateConfig.data.Title[player] != null)
if (TJAPlayer3.SaveFileInstances[player].data.Title != "" && TJAPlayer3.SaveFileInstances[player].data.Title != null)
{
int tt = TJAPlayer3.NamePlateConfig.data.TitleType[player];
int tt = TJAPlayer3.SaveFileInstances[player].data.TitleType;
if (tt >= 0 && tt < TJAPlayer3.Skin.Config_NamePlate_Ptn_Title)
{
var _tex = TJAPlayer3.Tx.NamePlate_Title[tt][ctAnimatedNamePlateTitle.n現在の値 % TJAPlayer3.Skin.Config_NamePlate_Ptn_Title_Boxes[tt]];
@ -147,10 +147,10 @@ namespace TJAPlayer3
}
// Dan plate
if (TJAPlayer3.NamePlateConfig.data.Dan[player] != "" && TJAPlayer3.NamePlateConfig.data.Dan[player] != null)
if (TJAPlayer3.SaveFileInstances[player].data.Dan != "" && TJAPlayer3.SaveFileInstances[player].data.Dan != null)
{
tNamePlateDisplayNamePlateBase(x, y, 7);
tNamePlateDisplayNamePlateBase(x, y, (8 + TJAPlayer3.NamePlateConfig.data.DanType[player]));
tNamePlateDisplayNamePlateBase(x, y, (8 + TJAPlayer3.SaveFileInstances[player].data.DanType));
}
// Glow
@ -172,7 +172,7 @@ namespace TJAPlayer3
tNamePlateDisplayNamePlateBase(x, y, 1);
// Name text squash (to add to skin config)
if (TJAPlayer3.NamePlateConfig.data.Dan[player] != "" && TJAPlayer3.NamePlateConfig.data.Dan[player] != null)
if (TJAPlayer3.SaveFileInstances[player].data.Dan != "" && TJAPlayer3.SaveFileInstances[player].data.Dan != null)
{
if (txName[player].szテクスチャサイズ.Width >= 120.0f)
txName[player].vc拡大縮小倍率.X = 120.0f / txName[player].szテクスチャサイズ.Width;
@ -188,11 +188,11 @@ namespace TJAPlayer3
txdan[player].vc拡大縮小倍率.X = 66.0f / txdan[player].szテクスチャサイズ.Width;
// Dan text
if (TJAPlayer3.NamePlateConfig.data.Dan[player] != "" && TJAPlayer3.NamePlateConfig.data.Dan[player] != null)
if (TJAPlayer3.SaveFileInstances[player].data.Dan != "" && TJAPlayer3.SaveFileInstances[player].data.Dan != null)
{
this.txdan[player].t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, x + TJAPlayer3.Skin.NamePlate_Dan_Offset[0], y + TJAPlayer3.Skin.NamePlate_Dan_Offset[1]);
if (TJAPlayer3.NamePlateConfig.data.DanGold[player])
if (TJAPlayer3.SaveFileInstances[player].data.DanGold)
{
TJAPlayer3.Tx.NamePlateBase.b乗算合成 = true;
tNamePlateDisplayNamePlateBase(x, y, 11);
@ -201,7 +201,7 @@ namespace TJAPlayer3
}
// Title text
if (TJAPlayer3.NamePlateConfig.data.Title[player] != "" && TJAPlayer3.NamePlateConfig.data.Title[player] != null)
if (TJAPlayer3.SaveFileInstances[player].data.Title != "" && TJAPlayer3.SaveFileInstances[player].data.Title != null)
{
if (txTitle[player].szテクスチャサイズ.Width >= 160)
{
@ -212,7 +212,7 @@ namespace TJAPlayer3
txTitle[player].t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, x + TJAPlayer3.Skin.NamePlate_Title_Offset[0], y + TJAPlayer3.Skin.NamePlate_Title_Offset[1]);
// Name text
if (TJAPlayer3.NamePlateConfig.data.Dan[player] == "" || TJAPlayer3.NamePlateConfig.data.Dan[player] == null)
if (TJAPlayer3.SaveFileInstances[player].data.Dan == "" || TJAPlayer3.SaveFileInstances[player].data.Dan == null)
this.txName[player].t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, x + TJAPlayer3.Skin.NamePlate_Name_Offset_WithTitle[0], y + TJAPlayer3.Skin.NamePlate_Name_Offset_WithTitle[1]);
else
this.txName[player].t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, x + TJAPlayer3.Skin.NamePlate_Name_Offset_Full[0], y + TJAPlayer3.Skin.NamePlate_Name_Offset_Full[1]);
@ -230,9 +230,9 @@ namespace TJAPlayer3
if (Opacity == 0)
return;
if(TJAPlayer3.NamePlateConfig.data.TitleType[player] != 0)
if(TJAPlayer3.SaveFileInstances[player].data.TitleType != 0)
{
int Type = TJAPlayer3.NamePlateConfig.data.TitleType[player] - 1;
int Type = TJAPlayer3.SaveFileInstances[player].data.TitleType - 1;
if (this.ctNamePlateEffect.n現在の値 <= 10)
{
tNamePlateStarDraw(player, 1.0f - (ctNamePlateEffect.n現在の値 / 10f * 1.0f), x + 63, y + 25);
@ -365,7 +365,7 @@ namespace TJAPlayer3
TJAPlayer3.Tx.NamePlate_Effect[TJAPlayer3.NamePlateConfig.data.TitleType[player] + 1].t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, x + 193, y + 6);
*/
int tt = TJAPlayer3.NamePlateConfig.data.TitleType[player];
int tt = TJAPlayer3.SaveFileInstances[player].data.TitleType;
if (tt >= 0 && tt < TJAPlayer3.Skin.Config_NamePlate_Ptn_Title && TJAPlayer3.Tx.NamePlate_Title_Big[tt] != null) {
TJAPlayer3.Tx.NamePlate_Title_Big[tt].Opacity = this.ctNamePlateEffect.n現在の値 >= 112 ? (int)(255 - (this.ctNamePlateEffect.n現在の値 - 112) * 31.875f) : 255;
TJAPlayer3.Tx.NamePlate_Title_Big[tt].vc拡大縮小倍率.X = this.ctNamePlateEffect.n現在の値 >= 112 ? 1.0f : (this.ctNamePlateEffect.n現在の値 - 105) / 8f;
@ -384,7 +384,7 @@ namespace TJAPlayer3
TJAPlayer3.Tx.NamePlate_Effect[TJAPlayer3.NamePlateConfig.data.TitleType[player] - 1].vc拡大縮小倍率.Y = Scale;
TJAPlayer3.Tx.NamePlate_Effect[TJAPlayer3.NamePlateConfig.data.TitleType[player] - 1].t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, x, y);
*/
int tt = TJAPlayer3.NamePlateConfig.data.TitleType[player];
int tt = TJAPlayer3.SaveFileInstances[player].data.TitleType;
if (tt >= 0 && tt < TJAPlayer3.Skin.Config_NamePlate_Ptn_Title && TJAPlayer3.Tx.NamePlate_Title_Small[tt] != null)
{
TJAPlayer3.Tx.NamePlate_Title_Small[tt].vc拡大縮小倍率.X = Scale;

View File

@ -137,6 +137,7 @@
<Compile Include="Common\Discord.cs" />
<Compile Include="Common\Easing.cs" />
<Compile Include="Common\NamePlateConfig.cs" />
<Compile Include="Common\SaveFile.cs" />
<Compile Include="Databases\DBCDN.cs" />
<Compile Include="Databases\DBEncyclopediaMenus.cs" />
<Compile Include="Databases\DBPuchichara.cs" />