Add Calibration function in Config menu (#631)
* W.I.P. - Add Calibration Menu * Oops wait, need to add these temp assets * Finish up Calibration feature * Update TextureLoader.cs * wait wait WAIT * fix spelling error
@ -38,4 +38,8 @@ Config_Selected_Menu_Text_Grad_Color_2=#404FF6
|
|||||||
Config_ExplanationPanel=67,570
|
Config_ExplanationPanel=67,570
|
||||||
|
|
||||||
|
|
||||||
Config_SkinSample1=200,660
|
Config_SkinSample1=200,660
|
||||||
|
|
||||||
|
Config_Calibration_OffsetText=300,288
|
||||||
|
Config_Calibration_InfoText=8,550
|
||||||
|
Config_Calibration_Highlights=371,724,371,209,774,724,371,209,1179,724,371,209
|
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 52 KiB |
@ -12,6 +12,7 @@ SongSelect_Bar_Y=-125,-35,55,145,235,325,415,505,595,685,775,865,955,1045,1135
|
|||||||
SongSelect_Bar_Select=276,501
|
SongSelect_Bar_Select=276,501
|
||||||
SongSelect_Bar_Anim_X=0,360,320,280,240,200,160,0,-160,-200,-240,-280,-320,-360,0
|
SongSelect_Bar_Anim_X=0,360,320,280,240,200,160,0,-160,-200,-240,-280,-320,-360,0
|
||||||
SongSelect_Bar_Anim_Y=0,2700,2400,2100,1800,1500,1200,0,-1200,-1500,-1800,-2100,-2400,-2700,0
|
SongSelect_Bar_Anim_Y=0,2700,2400,2100,1800,1500,1200,0,-1200,-1500,-1800,-2100,-2400,-2700,0
|
||||||
|
SongSelect_FavoriteStatus_Offset=730,40
|
||||||
|
|
||||||
SongSelect_BoxExplanation_X=1365
|
SongSelect_BoxExplanation_X=1365
|
||||||
SongSelect_BoxExplanation_Y=463
|
SongSelect_BoxExplanation_Y=463
|
||||||
|
BIN
OpenTaiko/System/Open-World Memories/Sounds/Calibrate.ogg
Normal file
@ -421,6 +421,8 @@ namespace TJAPlayer3
|
|||||||
public CSystemSound[] soundExToExtra = null;
|
public CSystemSound[] soundExToExtra = null;
|
||||||
public CSystemSound[] soundExtraToEx = null;
|
public CSystemSound[] soundExtraToEx = null;
|
||||||
|
|
||||||
|
public CSystemSound calibrationTick = null;
|
||||||
|
|
||||||
public CSystemSound[] soundModal = null;
|
public CSystemSound[] soundModal = null;
|
||||||
|
|
||||||
public CSystemSound soundCrownIn = null;
|
public CSystemSound soundCrownIn = null;
|
||||||
@ -809,6 +811,8 @@ namespace TJAPlayer3
|
|||||||
soundExToExtra = new CSystemSound[1] { new CSystemSound(@$"Sounds{System.IO.Path.DirectorySeparatorChar}SongSelect{System.IO.Path.DirectorySeparatorChar}0{System.IO.Path.DirectorySeparatorChar}ExToExtra.ogg", false, false, false, ESoundGroup.SoundEffect) }; // Placeholder until Komi decides
|
soundExToExtra = new CSystemSound[1] { new CSystemSound(@$"Sounds{System.IO.Path.DirectorySeparatorChar}SongSelect{System.IO.Path.DirectorySeparatorChar}0{System.IO.Path.DirectorySeparatorChar}ExToExtra.ogg", false, false, false, ESoundGroup.SoundEffect) }; // Placeholder until Komi decides
|
||||||
soundExtraToEx = new CSystemSound[1] { new CSystemSound(@$"Sounds{System.IO.Path.DirectorySeparatorChar}SongSelect{System.IO.Path.DirectorySeparatorChar}0{System.IO.Path.DirectorySeparatorChar}ExtraToEx.ogg", false, false, false, ESoundGroup.SoundEffect) }; // what to do with it lol
|
soundExtraToEx = new CSystemSound[1] { new CSystemSound(@$"Sounds{System.IO.Path.DirectorySeparatorChar}SongSelect{System.IO.Path.DirectorySeparatorChar}0{System.IO.Path.DirectorySeparatorChar}ExtraToEx.ogg", false, false, false, ESoundGroup.SoundEffect) }; // what to do with it lol
|
||||||
|
|
||||||
|
calibrationTick = new CSystemSound(@$"Sounds{System.IO.Path.DirectorySeparatorChar}Calibrate.ogg", false, false, false, ESoundGroup.SoundEffect);
|
||||||
|
|
||||||
soundModal = new CSystemSound[6];
|
soundModal = new CSystemSound[6];
|
||||||
for (int i = 0; i < soundModal.Length - 1; i++)
|
for (int i = 0; i < soundModal.Length - 1; i++)
|
||||||
{
|
{
|
||||||
@ -1805,6 +1809,34 @@ namespace TJAPlayer3
|
|||||||
Config_KeyAssign_Move = int.Parse(strParam);
|
Config_KeyAssign_Move = int.Parse(strParam);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case nameof(Config_Calibration_OffsetText):
|
||||||
|
{
|
||||||
|
string[] strSplit = strParam.Split(',');
|
||||||
|
for (int i = 0; i < 2; i++)
|
||||||
|
{
|
||||||
|
Config_Calibration_OffsetText[i] = int.Parse(strSplit[i]);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case nameof(Config_Calibration_InfoText):
|
||||||
|
{
|
||||||
|
string[] strSplit = strParam.Split(',');
|
||||||
|
for (int i = 0; i < 2; i++)
|
||||||
|
{
|
||||||
|
Config_Calibration_InfoText[i] = int.Parse(strSplit[i]);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case nameof(Config_Calibration_Highlights):
|
||||||
|
{
|
||||||
|
string[] strSplit = strParam.Split(',');
|
||||||
|
int recs = Math.Min(strSplit.Length, 12);
|
||||||
|
for (int i = 0; i+3 < recs; i+=4)
|
||||||
|
{
|
||||||
|
Config_Calibration_Highlights[i/4] = new Rectangle(int.Parse(strSplit[i]), int.Parse(strSplit[i+1]), int.Parse(strSplit[i+2]), int.Parse(strSplit[i+3]));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region [Mod Icons]
|
#region [Mod Icons]
|
||||||
@ -9513,6 +9545,14 @@ namespace TJAPlayer3
|
|||||||
public int[] Config_KeyAssign_Font = new int[] { 308, 64 };
|
public int[] Config_KeyAssign_Font = new int[] { 308, 64 };
|
||||||
public int Config_KeyAssign_Move = 20;
|
public int Config_KeyAssign_Move = 20;
|
||||||
|
|
||||||
|
public int[] Config_Calibration_OffsetText = new int[] { 300, 288 };
|
||||||
|
public int[] Config_Calibration_InfoText = new int[] { 8, 550 };
|
||||||
|
public Rectangle[] Config_Calibration_Highlights = new Rectangle[] {
|
||||||
|
new Rectangle(371, 724, 371, 209),
|
||||||
|
new Rectangle(774, 724, 371, 209),
|
||||||
|
new Rectangle(1179, 724, 371, 209)
|
||||||
|
};
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Puchichara
|
#region Puchichara
|
||||||
|
@ -125,7 +125,7 @@ namespace TJAPlayer3
|
|||||||
//-----------------
|
//-----------------
|
||||||
private Rectangle[,] rc文字の矩形領域;
|
private Rectangle[,] rc文字の矩形領域;
|
||||||
private const string str表記可能文字 = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ";
|
private const string str表記可能文字 = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ";
|
||||||
private int nFontWidth = 8, nFontHeight = 16;
|
public int nFontWidth = 8, nFontHeight = 16;
|
||||||
private CTexture[] txフォント8x16 = new CTexture[ 2 ];
|
private CTexture[] txフォント8x16 = new CTexture[ 2 ];
|
||||||
//-----------------
|
//-----------------
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -51,30 +51,32 @@ namespace TJAPlayer3
|
|||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
|
|
||||||
var preset = (_ps != null
|
bool sectionIsValid = _ps != null ? ((Dictionary<string, DBSkinPreset.SkinScene>)_ps).Count > 0 : false;
|
||||||
|
|
||||||
|
var preset = (sectionIsValid
|
||||||
&& TJAPlayer3.stageSongSelect.rChoosenSong.strScenePreset != null
|
&& TJAPlayer3.stageSongSelect.rChoosenSong.strScenePreset != null
|
||||||
&& ((Dictionary<string, DBSkinPreset.SkinScene>)_ps).ContainsKey(TJAPlayer3.stageSongSelect.rChoosenSong.strScenePreset))
|
&& ((Dictionary<string, DBSkinPreset.SkinScene>)_ps).ContainsKey(TJAPlayer3.stageSongSelect.rChoosenSong.strScenePreset))
|
||||||
? ((Dictionary<string,DBSkinPreset.SkinScene>)_ps)[TJAPlayer3.stageSongSelect.rChoosenSong.strScenePreset]
|
? ((Dictionary<string,DBSkinPreset.SkinScene>)_ps)[TJAPlayer3.stageSongSelect.rChoosenSong.strScenePreset]
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
if (_ps != null
|
if (sectionIsValid
|
||||||
&& TJAPlayer3.DTX.scenePreset != null
|
&& TJAPlayer3.DTX.scenePreset != null
|
||||||
&& ((Dictionary<string, DBSkinPreset.SkinScene>)_ps).ContainsKey(TJAPlayer3.DTX.scenePreset)) // If currently selected song has valid SCENEPRESET metadata within TJA
|
&& ((Dictionary<string, DBSkinPreset.SkinScene>)_ps).ContainsKey(TJAPlayer3.DTX.scenePreset)) // If currently selected song has valid SCENEPRESET metadata within TJA
|
||||||
{
|
{
|
||||||
preset = ((Dictionary<string, DBSkinPreset.SkinScene>)_ps)[TJAPlayer3.DTX.scenePreset];
|
preset = ((Dictionary<string, DBSkinPreset.SkinScene>)_ps)[TJAPlayer3.DTX.scenePreset];
|
||||||
}
|
}
|
||||||
else if (_ps != null
|
else if (sectionIsValid
|
||||||
&& TJAPlayer3.stageSongSelect.rChoosenSong.strScenePreset != null
|
&& TJAPlayer3.stageSongSelect.rChoosenSong.strScenePreset != null
|
||||||
&& ((Dictionary<string, DBSkinPreset.SkinScene>)_ps).ContainsKey(TJAPlayer3.stageSongSelect.rChoosenSong.strScenePreset))
|
&& ((Dictionary<string, DBSkinPreset.SkinScene>)_ps).ContainsKey(TJAPlayer3.stageSongSelect.rChoosenSong.strScenePreset))
|
||||||
{
|
{
|
||||||
preset = ((Dictionary<string, DBSkinPreset.SkinScene>)_ps)[TJAPlayer3.stageSongSelect.rChoosenSong.strScenePreset];
|
preset = ((Dictionary<string, DBSkinPreset.SkinScene>)_ps)[TJAPlayer3.stageSongSelect.rChoosenSong.strScenePreset];
|
||||||
}
|
}
|
||||||
else if (_ps != null
|
else if (sectionIsValid
|
||||||
&& ((Dictionary<string, DBSkinPreset.SkinScene>)_ps).ContainsKey(""))
|
&& ((Dictionary<string, DBSkinPreset.SkinScene>)_ps).ContainsKey(""))
|
||||||
{
|
{
|
||||||
preset = ((Dictionary<string, DBSkinPreset.SkinScene>)_ps)[""];
|
preset = ((Dictionary<string, DBSkinPreset.SkinScene>)_ps)[""];
|
||||||
}
|
}
|
||||||
else if (_ps != null)
|
else if (sectionIsValid)
|
||||||
{
|
{
|
||||||
var cstps = (Dictionary<string, DBSkinPreset.SkinScene>)_ps;
|
var cstps = (Dictionary<string, DBSkinPreset.SkinScene>)_ps;
|
||||||
Random rand = new Random();
|
Random rand = new Random();
|
||||||
|
@ -29,7 +29,7 @@ namespace TJAPlayer3
|
|||||||
[10149] = "Clean the existing database and\n" +
|
[10149] = "Clean the existing database and\n" +
|
||||||
"reload the song folder from scratch.",
|
"reload the song folder from scratch.",
|
||||||
[6] = "Player Count",
|
[6] = "Player Count",
|
||||||
[7] = "Select how many players you want to play with. Up to 5 players can be active at once.",
|
[7] = "Select how many players you want to play with.\nUp to 5 players can be active at once.",
|
||||||
[8] = "Kanpeki Mode",
|
[8] = "Kanpeki Mode",
|
||||||
[9] = "Choose how many BADs are allowed\nbefore a song is automatically failed.\nSet this to 0 to disable the mode.",
|
[9] = "Choose how many BADs are allowed\nbefore a song is automatically failed.\nSet this to 0 to disable the mode.",
|
||||||
[10] = "Song Playback Speed",
|
[10] = "Song Playback Speed",
|
||||||
@ -380,6 +380,9 @@ namespace TJAPlayer3
|
|||||||
[10190] = "Jump to Last Measure",
|
[10190] = "Jump to Last Measure",
|
||||||
[10191] = "Drums key assign:\nAssign any key for jumping to the last measure.",
|
[10191] = "Drums key assign:\nAssign any key for jumping to the last measure.",
|
||||||
|
|
||||||
|
[10192] = "Calibrate Offset",
|
||||||
|
[10193] = "Calibrate your offset.\nGlobal Offset will be overwritten if saved.",
|
||||||
|
|
||||||
[100] = "Taiko Mode",
|
[100] = "Taiko Mode",
|
||||||
[101] = "Dan-i Dojo",
|
[101] = "Dan-i Dojo",
|
||||||
[102] = "Taiko Towers",
|
[102] = "Taiko Towers",
|
||||||
|
@ -251,6 +251,9 @@ namespace TJAPlayer3
|
|||||||
[10189] = "Drums key assign:\nAssign any key for jumping to the first measure.",
|
[10189] = "Drums key assign:\nAssign any key for jumping to the first measure.",
|
||||||
[10190] = "Jump to Last Measure",
|
[10190] = "Jump to Last Measure",
|
||||||
[10191] = "Drums key assign:\nAssign any key for jumping to the last measure.",
|
[10191] = "Drums key assign:\nAssign any key for jumping to the last measure.",
|
||||||
|
|
||||||
|
[10192] = "Calibrate Offset",
|
||||||
|
[10193] = "Calibrate your offset.\nGlobal Offset will be overwritten if saved.",
|
||||||
// Please translate the text above!
|
// Please translate the text above!
|
||||||
|
|
||||||
[99] = "Rojo izquierdo",
|
[99] = "Rojo izquierdo",
|
||||||
|
@ -224,6 +224,9 @@ namespace TJAPlayer3
|
|||||||
[10189] = "Drums key assign:\nAssign any key for jumping to the first measure.",
|
[10189] = "Drums key assign:\nAssign any key for jumping to the first measure.",
|
||||||
[10190] = "Jump to Last Measure",
|
[10190] = "Jump to Last Measure",
|
||||||
[10191] = "Drums key assign:\nAssign any key for jumping to the last measure.",
|
[10191] = "Drums key assign:\nAssign any key for jumping to the last measure.",
|
||||||
|
|
||||||
|
[10192] = "Calibrate Offset",
|
||||||
|
[10193] = "Calibrate your offset.\nGlobal Offset will be overwritten if saved.",
|
||||||
// Please translate the text above!
|
// Please translate the text above!
|
||||||
|
|
||||||
[99] = "Rouge gauche",
|
[99] = "Rouge gauche",
|
||||||
|
@ -279,6 +279,9 @@ namespace TJAPlayer3
|
|||||||
[10190] = "Jump to Last Measure",
|
[10190] = "Jump to Last Measure",
|
||||||
[10191] = "Drums key assign:\nAssign any key for jumping to the last measure.",
|
[10191] = "Drums key assign:\nAssign any key for jumping to the last measure.",
|
||||||
|
|
||||||
|
[10192] = "Calibrate Offset",
|
||||||
|
[10193] = "Calibrate your offset.\nGlobal Offset will be overwritten if saved.",
|
||||||
|
|
||||||
[99] = "LeftRed",
|
[99] = "LeftRed",
|
||||||
|
|
||||||
[9992] = "太鼓の数字がアニメーションしなくなります\n" +
|
[9992] = "太鼓の数字がアニメーションしなくなります\n" +
|
||||||
|
@ -376,6 +376,9 @@ namespace TJAPlayer3
|
|||||||
[10189] = "Drums key assign:\nAssign any key for jumping to the first measure.",
|
[10189] = "Drums key assign:\nAssign any key for jumping to the first measure.",
|
||||||
[10190] = "Jump to Last Measure",
|
[10190] = "Jump to Last Measure",
|
||||||
[10191] = "Drums key assign:\nAssign any key for jumping to the last measure.",
|
[10191] = "Drums key assign:\nAssign any key for jumping to the last measure.",
|
||||||
|
|
||||||
|
[10192] = "Calibrate Offset",
|
||||||
|
[10193] = "Calibrate your offset.\nGlobal Offset will be overwritten if saved.",
|
||||||
// Please translate the text above!
|
// Please translate the text above!
|
||||||
|
|
||||||
[100] = "Taiko Mode",
|
[100] = "Taiko Mode",
|
||||||
|
@ -376,6 +376,9 @@ namespace TJAPlayer3
|
|||||||
[10189] = "Drums key assign:\nAssign any key for jumping to the first measure.",
|
[10189] = "Drums key assign:\nAssign any key for jumping to the first measure.",
|
||||||
[10190] = "Jump to Last Measure",
|
[10190] = "Jump to Last Measure",
|
||||||
[10191] = "Drums key assign:\nAssign any key for jumping to the last measure.",
|
[10191] = "Drums key assign:\nAssign any key for jumping to the last measure.",
|
||||||
|
|
||||||
|
[10192] = "Calibrate Offset",
|
||||||
|
[10193] = "Calibrate your offset.\nGlobal Offset will be overwritten if saved.",
|
||||||
// Please translate the text above!
|
// Please translate the text above!
|
||||||
|
|
||||||
[100] = "Taiko Mode",
|
[100] = "Taiko Mode",
|
||||||
|
@ -423,6 +423,9 @@ namespace TJAPlayer3
|
|||||||
[10190] = "跳转至最后一小节",
|
[10190] = "跳转至最后一小节",
|
||||||
[10191] = "鼓按键分配:\n分配跳转至最后一小节按键。",
|
[10191] = "鼓按键分配:\n分配跳转至最后一小节按键。",
|
||||||
|
|
||||||
|
[10192] = "Calibrate Offset",
|
||||||
|
[10193] = "Calibrate your offset.\nGlobal Offset will be overwritten if saved.",
|
||||||
|
|
||||||
[100] = "演奏模式",
|
[100] = "演奏模式",
|
||||||
[101] = "段位道场",
|
[101] = "段位道场",
|
||||||
[102] = "太鼓塔",
|
[102] = "太鼓塔",
|
||||||
|
@ -142,6 +142,9 @@ namespace TJAPlayer3
|
|||||||
|
|
||||||
public void LoadTexture()
|
public void LoadTexture()
|
||||||
{
|
{
|
||||||
|
CalibrateFG = TxC(CONFIG + $@"Calibration{Path.DirectorySeparatorChar}FG.png");
|
||||||
|
CalibrateBG = TxC(CONFIG + $@"Calibration{Path.DirectorySeparatorChar}BG.png");
|
||||||
|
|
||||||
#region 共通
|
#region 共通
|
||||||
Tile_Black = TxC(@$"Tile_Black.png");
|
Tile_Black = TxC(@$"Tile_Black.png");
|
||||||
Menu_Title = TxC(@$"Menu_Title.png");
|
Menu_Title = TxC(@$"Menu_Title.png");
|
||||||
@ -2544,6 +2547,12 @@ namespace TJAPlayer3
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#region Calibration
|
||||||
|
|
||||||
|
public CTexture CalibrateFG,
|
||||||
|
CalibrateBG;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 共通
|
#region 共通
|
||||||
public CTexture Tile_Black,
|
public CTexture Tile_Black,
|
||||||
|
232
OpenTaiko/src/Stages/04.Config/CActCalibrationMode.cs
Normal file
@ -0,0 +1,232 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using FDK;
|
||||||
|
|
||||||
|
namespace TJAPlayer3
|
||||||
|
{
|
||||||
|
internal class CActCalibrationMode : CActivity
|
||||||
|
{
|
||||||
|
public CActCalibrationMode() { }
|
||||||
|
|
||||||
|
public override void Activate()
|
||||||
|
{
|
||||||
|
//hitSound = TJAPlayer3.SoundManager.tCreateSound($@"Global{Path.DirectorySeparatorChar}HitSounds{Path.DirectorySeparatorChar}" + TJAPlayer3.Skin.hsHitSoundsInformations.don[0], ESoundGroup.SoundEffect);
|
||||||
|
font = HPrivateFastFont.tInstantiateMainFont(30);
|
||||||
|
base.Activate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void DeActivate()
|
||||||
|
{
|
||||||
|
Stop();
|
||||||
|
Offsets.Clear();
|
||||||
|
font.Dispose();
|
||||||
|
offsettext.Dispose();
|
||||||
|
//hitSound?.tDispose();
|
||||||
|
|
||||||
|
base.DeActivate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Start()
|
||||||
|
{
|
||||||
|
CalibrateTick = new CCounter(0, 500, 1, TJAPlayer3.Timer);
|
||||||
|
UpdateText();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Stop()
|
||||||
|
{
|
||||||
|
CalibrateTick = new CCounter();
|
||||||
|
Offsets.Clear();
|
||||||
|
LastOffset = 0;
|
||||||
|
buttonIndex = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Update()
|
||||||
|
{
|
||||||
|
if (IsDeActivated || CalibrateTick.IsStoped)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
CalibrateTick.Tick();
|
||||||
|
|
||||||
|
bool decide = TJAPlayer3.Pad.bPressed(EInstrumentPad.DRUMS, EPad.Decide) ||
|
||||||
|
TJAPlayer3.Pad.bPressed(EInstrumentPad.DRUMS, EPad.RRed) ||
|
||||||
|
TJAPlayer3.Pad.bPressed(EInstrumentPad.DRUMS, EPad.LRed) ||
|
||||||
|
TJAPlayer3.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.Return);
|
||||||
|
|
||||||
|
if (CalibrateTick.IsEnded)
|
||||||
|
{
|
||||||
|
TJAPlayer3.Skin.calibrationTick.tPlay();
|
||||||
|
CalibrateTick.Start(0, 500, 1, TJAPlayer3.Timer);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TJAPlayer3.Pad.bPressed(EInstrumentPad.DRUMS, EPad.LeftChange) ||
|
||||||
|
TJAPlayer3.Pad.bPressed(EInstrumentPad.DRUMS, EPad.LBlue) ||
|
||||||
|
TJAPlayer3.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.LeftArrow))
|
||||||
|
{
|
||||||
|
buttonIndex = Math.Max(buttonIndex - 1, 0);
|
||||||
|
TJAPlayer3.Skin.soundChangeSFX.tPlay();
|
||||||
|
}
|
||||||
|
else if (TJAPlayer3.Pad.bPressed(EInstrumentPad.DRUMS, EPad.RightChange) ||
|
||||||
|
TJAPlayer3.Pad.bPressed(EInstrumentPad.DRUMS, EPad.RBlue) ||
|
||||||
|
TJAPlayer3.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.RightArrow))
|
||||||
|
{
|
||||||
|
buttonIndex = Math.Min(buttonIndex + 1, 2);
|
||||||
|
TJAPlayer3.Skin.soundChangeSFX.tPlay();
|
||||||
|
}
|
||||||
|
else if (buttonIndex == 0 && decide) // Cancel
|
||||||
|
{
|
||||||
|
TJAPlayer3.Skin.soundCancelSFX.tPlay();
|
||||||
|
Stop();
|
||||||
|
}
|
||||||
|
else if (buttonIndex == 1 && decide) // Hit!
|
||||||
|
{
|
||||||
|
//hitSound?.PlayStart();
|
||||||
|
AddOffset();
|
||||||
|
UpdateText();
|
||||||
|
}
|
||||||
|
else if (buttonIndex == 2 && decide) // Save
|
||||||
|
{
|
||||||
|
TJAPlayer3.ConfigIni.nGlobalOffsetMs = GetMedianOffset();
|
||||||
|
TJAPlayer3.stageコンフィグ.actList.iGlobalOffsetMs.n現在の値 = GetMedianOffset();
|
||||||
|
TJAPlayer3.Skin.soundDecideSFX.tPlay();
|
||||||
|
Stop();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else if (TJAPlayer3.ConfigIni.KeyAssign.KeyIsPressed(TJAPlayer3.ConfigIni.KeyAssign.System.Cancel) ||
|
||||||
|
TJAPlayer3.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.Escape))
|
||||||
|
{
|
||||||
|
TJAPlayer3.Skin.soundCancelSFX.tPlay();
|
||||||
|
Stop();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int Draw()
|
||||||
|
{
|
||||||
|
if (IsDeActivated || CalibrateTick.IsStoped)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
if (TJAPlayer3.Tx.Tile_Black != null)
|
||||||
|
{
|
||||||
|
TJAPlayer3.Tx.Tile_Black.Opacity = 128;
|
||||||
|
for (int i = 0; i <= SampleFramework.GameWindowSize.Width; i += TJAPlayer3.Tx.Tile_Black.szTextureSize.Width)
|
||||||
|
{
|
||||||
|
for (int j = 0; j <= SampleFramework.GameWindowSize.Height; j += TJAPlayer3.Tx.Tile_Black.szTextureSize.Height)
|
||||||
|
{
|
||||||
|
TJAPlayer3.Tx.Tile_Black.t2D描画(i, j);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
TJAPlayer3.Tx.Tile_Black.Opacity = 255;
|
||||||
|
}
|
||||||
|
|
||||||
|
TJAPlayer3.Tx.CalibrateBG?.t2D描画(TJAPlayer3.Skin.Config_Calibration_Highlights[buttonIndex].X,
|
||||||
|
TJAPlayer3.Skin.Config_Calibration_Highlights[buttonIndex].Y,
|
||||||
|
TJAPlayer3.Skin.Config_Calibration_Highlights[buttonIndex]);
|
||||||
|
TJAPlayer3.Tx.CalibrateFG?.t2D描画(0, 0);
|
||||||
|
|
||||||
|
TJAPlayer3.Tx.Lane_Background_Main?.t2D描画(TJAPlayer3.Skin.Game_Lane_X[0], TJAPlayer3.Skin.Game_Lane_Y[0]);
|
||||||
|
TJAPlayer3.Tx.Lane_Background_Sub?.t2D描画(TJAPlayer3.Skin.Game_Lane_Sub_X[0], TJAPlayer3.Skin.Game_Lane_Sub_Y[0]);
|
||||||
|
TJAPlayer3.Tx.Taiko_Frame[2]?.t2D描画(TJAPlayer3.Skin.Game_Taiko_Frame_X[0], TJAPlayer3.Skin.Game_Taiko_Frame_Y[0]);
|
||||||
|
|
||||||
|
TJAPlayer3.Tx.Notes[0]?.t2D描画(TJAPlayer3.Skin.nScrollFieldX[0], TJAPlayer3.Skin.nScrollFieldY[0], new RectangleF(0, 0, TJAPlayer3.Skin.Game_Notes_Size[0], TJAPlayer3.Skin.Game_Notes_Size[1]));
|
||||||
|
|
||||||
|
for (int x = TJAPlayer3.Skin.nScrollFieldX[0]; x < SampleFramework.GameWindowSize.Width + 500; x += 500)
|
||||||
|
{
|
||||||
|
TJAPlayer3.Tx.Bar?.t2D描画(
|
||||||
|
(x - CalibrateTick.CurrentValue) + ((TJAPlayer3.Skin.Game_Notes_Size[0] - TJAPlayer3.Tx.Bar.szTextureSize.Width) / 2),
|
||||||
|
TJAPlayer3.Skin.nScrollFieldY[0],
|
||||||
|
new Rectangle(0, 0, TJAPlayer3.Tx.Bar.szTextureSize.Width, TJAPlayer3.Skin.Game_Notes_Size[1])
|
||||||
|
);
|
||||||
|
TJAPlayer3.Tx.Notes[0]?.t2D描画(
|
||||||
|
(x - CalibrateTick.CurrentValue),
|
||||||
|
TJAPlayer3.Skin.nScrollFieldY[0],
|
||||||
|
new Rectangle(TJAPlayer3.Skin.Game_Notes_Size[0], TJAPlayer3.Skin.Game_Notes_Size[1], TJAPlayer3.Skin.Game_Notes_Size[0], TJAPlayer3.Skin.Game_Notes_Size[1])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TJAPlayer3.P1IsBlue())
|
||||||
|
TJAPlayer3.Tx.Taiko_Background[4]?.t2D描画(TJAPlayer3.Skin.Game_Taiko_Background_X[0], TJAPlayer3.Skin.Game_Taiko_Background_Y[0]);
|
||||||
|
else
|
||||||
|
TJAPlayer3.Tx.Taiko_Background[0]?.t2D描画(TJAPlayer3.Skin.Game_Taiko_Background_X[0], TJAPlayer3.Skin.Game_Taiko_Background_Y[0]);
|
||||||
|
|
||||||
|
#region Calibration Info
|
||||||
|
|
||||||
|
offsettext?.t2D描画(TJAPlayer3.Skin.Config_Calibration_OffsetText[0] - offsettext.szTextureSize.Width, TJAPlayer3.Skin.Config_Calibration_OffsetText[1]);
|
||||||
|
|
||||||
|
TJAPlayer3.act文字コンソール.tPrint(TJAPlayer3.Skin.Config_Calibration_InfoText[0], TJAPlayer3.Skin.Config_Calibration_InfoText[1], C文字コンソール.Eフォント種別.赤,
|
||||||
|
"MEDIAN OFFSET : " + GetMedianOffset() + "ms\n");
|
||||||
|
TJAPlayer3.act文字コンソール.tPrint(TJAPlayer3.Skin.Config_Calibration_InfoText[0], TJAPlayer3.Skin.Config_Calibration_InfoText[1] + TJAPlayer3.act文字コンソール.nFontHeight, C文字コンソール.Eフォント種別.白,
|
||||||
|
"MIN OFFSET : " + GetLowestOffset() + "ms\n" +
|
||||||
|
"MAX OFFSET : " + GetHighestOffset() + "ms\n" +
|
||||||
|
"LAST OFFSET : " + LastOffset + "ms\n" +
|
||||||
|
"OFFSET COUNT : " + (Offsets != null ? Offsets.Count : 0));
|
||||||
|
TJAPlayer3.act文字コンソール.tPrint(TJAPlayer3.Skin.Config_Calibration_InfoText[0], TJAPlayer3.Skin.Config_Calibration_InfoText[1] + (TJAPlayer3.act文字コンソール.nFontHeight * 5), C文字コンソール.Eフォント種別.白,
|
||||||
|
"CURRENT OFFSET: " + CurrentOffset() + "ms");
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddOffset() { Offsets.Add(CurrentOffset()); LastOffset = CurrentOffset(); }
|
||||||
|
|
||||||
|
public int GetMedianOffset()
|
||||||
|
{
|
||||||
|
if (Offsets != null)
|
||||||
|
if (Offsets.Count > 0)
|
||||||
|
{
|
||||||
|
Offsets.Sort();
|
||||||
|
return Offsets[Offsets.Count / 2];
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
public int GetLowestOffset()
|
||||||
|
{
|
||||||
|
if (Offsets != null)
|
||||||
|
return Offsets.Count > 0 ? Offsets.Min() : 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
public int GetHighestOffset()
|
||||||
|
{
|
||||||
|
if (Offsets != null)
|
||||||
|
return Offsets.Count > 0 ? Offsets.Max() : 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
public int CurrentOffset()
|
||||||
|
{
|
||||||
|
return CalibrateTick.CurrentValue > 250 ? CalibrateTick.CurrentValue - 500 : CalibrateTick.CurrentValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateText()
|
||||||
|
{
|
||||||
|
offsettext?.Dispose();
|
||||||
|
offsettext = new CTexture(font.DrawText("OFFSET: " + GetMedianOffset().ToString(), Color.White, Color.Black, null, 32));
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsStarted { get { return CalibrateTick.IsStarted; } }
|
||||||
|
#region Private
|
||||||
|
private CCounter CalibrateTick = new CCounter();
|
||||||
|
private List<int> Offsets = new List<int>();
|
||||||
|
private int LastOffset = 0;
|
||||||
|
private CCachedFontRenderer font;
|
||||||
|
private CTexture offsettext;
|
||||||
|
|
||||||
|
//private CSound hitSound;
|
||||||
|
|
||||||
|
private int buttonIndex = 1;
|
||||||
|
private Rectangle[] BGs = new Rectangle[3]
|
||||||
|
{
|
||||||
|
new Rectangle(371, 724, 371, 209),
|
||||||
|
new Rectangle(774, 724, 371, 209),
|
||||||
|
new Rectangle(1179, 724, 371, 209)
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -330,6 +330,10 @@ namespace TJAPlayer3
|
|||||||
CLangManager.LangInstance.GetString(3));
|
CLangManager.LangInstance.GetString(3));
|
||||||
this.list項目リスト.Add( this.iDrumsReturnToMenu );
|
this.list項目リスト.Add( this.iDrumsReturnToMenu );
|
||||||
|
|
||||||
|
this.iDrumsGoToCalibration = new CItemBase(CLangManager.LangInstance.GetString(10192), CItemBase.EPanelType.Other,
|
||||||
|
CLangManager.LangInstance.GetString(10193));
|
||||||
|
this.list項目リスト.Add(this.iDrumsGoToCalibration);
|
||||||
|
|
||||||
this.iRollsPerSec = new CItemInteger(CLangManager.LangInstance.GetString(60), 0, 1000, TJAPlayer3.ConfigIni.nRollsPerSec,
|
this.iRollsPerSec = new CItemInteger(CLangManager.LangInstance.GetString(60), 0, 1000, TJAPlayer3.ConfigIni.nRollsPerSec,
|
||||||
CLangManager.LangInstance.GetString(61));
|
CLangManager.LangInstance.GetString(61));
|
||||||
this.list項目リスト.Add(this.iRollsPerSec);
|
this.list項目リスト.Add(this.iRollsPerSec);
|
||||||
@ -782,6 +786,10 @@ namespace TJAPlayer3
|
|||||||
tConfigIniへ記録する();
|
tConfigIniへ記録する();
|
||||||
t項目リストの設定_KeyAssignTraining();
|
t項目リストの設定_KeyAssignTraining();
|
||||||
}
|
}
|
||||||
|
else if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iDrumsGoToCalibration )
|
||||||
|
{
|
||||||
|
TJAPlayer3.stageコンフィグ.actCalibrationMode.Start();
|
||||||
|
}
|
||||||
else if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignDrumsReturnToMenu ||
|
else if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignDrumsReturnToMenu ||
|
||||||
this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignTrainingReturnToMenu ) // #24525 2011.3.15 yyagi
|
this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignTrainingReturnToMenu ) // #24525 2011.3.15 yyagi
|
||||||
{
|
{
|
||||||
@ -1827,9 +1835,10 @@ namespace TJAPlayer3
|
|||||||
private int nSkinSampleIndex; //
|
private int nSkinSampleIndex; //
|
||||||
private int nSkinIndex; //
|
private int nSkinIndex; //
|
||||||
|
|
||||||
|
private CItemBase iDrumsGoToCalibration;
|
||||||
private CItemBase iDrumsGoToKeyAssign;
|
private CItemBase iDrumsGoToKeyAssign;
|
||||||
private CItemBase iDrumsGoToTrainingKeyAssign;
|
private CItemBase iDrumsGoToTrainingKeyAssign;
|
||||||
private CItemBase iSystemGoToKeyAssign; // #24609
|
private CItemBase iSystemGoToKeyAssign;
|
||||||
private CItemInteger iCommonPlaySpeed;
|
private CItemInteger iCommonPlaySpeed;
|
||||||
|
|
||||||
private CItemInteger iLayoutType;
|
private CItemInteger iLayoutType;
|
||||||
@ -1873,7 +1882,7 @@ namespace TJAPlayer3
|
|||||||
CItemInteger TokkunMashInterval;
|
CItemInteger TokkunMashInterval;
|
||||||
|
|
||||||
private CItemInteger iInputAdjustTimeMs;
|
private CItemInteger iInputAdjustTimeMs;
|
||||||
private CItemInteger iGlobalOffsetMs;
|
public CItemInteger iGlobalOffsetMs;
|
||||||
|
|
||||||
private CItemList iSystemSkinSubfolder; // #28195 2012.5.2 yyagi
|
private CItemList iSystemSkinSubfolder; // #28195 2012.5.2 yyagi
|
||||||
private CItemBase iSystemReloadDTX; // #32081 2013.10.21 yyagi
|
private CItemBase iSystemReloadDTX; // #32081 2013.10.21 yyagi
|
||||||
|
@ -15,6 +15,7 @@ namespace TJAPlayer3
|
|||||||
// プロパティ
|
// プロパティ
|
||||||
|
|
||||||
public CActDFPFont actFont { get; private set; }
|
public CActDFPFont actFont { get; private set; }
|
||||||
|
public CActCalibrationMode actCalibrationMode;
|
||||||
|
|
||||||
|
|
||||||
// コンストラクタ
|
// コンストラクタ
|
||||||
@ -30,6 +31,7 @@ namespace TJAPlayer3
|
|||||||
base.ChildActivities.Add( this.actList = new CActConfigList() );
|
base.ChildActivities.Add( this.actList = new CActConfigList() );
|
||||||
base.ChildActivities.Add( this.actKeyAssign = new CActConfigKeyAssign() );
|
base.ChildActivities.Add( this.actKeyAssign = new CActConfigKeyAssign() );
|
||||||
base.ChildActivities.Add( this.actオプションパネル = new CActオプションパネル() );
|
base.ChildActivities.Add( this.actオプションパネル = new CActオプションパネル() );
|
||||||
|
base.ChildActivities.Add( this.actCalibrationMode = new CActCalibrationMode() );
|
||||||
base.IsDeActivated = true;
|
base.IsDeActivated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -404,10 +406,21 @@ namespace TJAPlayer3
|
|||||||
|| TJAPlayer3.act現在入力を占有中のプラグイン != null )
|
|| TJAPlayer3.act現在入力を占有中のプラグイン != null )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// 曲データの一覧取得中は、キー入力を無効化する
|
if (actCalibrationMode.IsStarted)
|
||||||
if ( !TJAPlayer3.EnumSongs.IsEnumerating || TJAPlayer3.actEnumSongs.bコマンドでの曲データ取得 != true )
|
|
||||||
{
|
{
|
||||||
if ( ( TJAPlayer3.InputManager.Keyboard.KeyPressed( (int)SlimDXKeys.Key.Escape ) || TJAPlayer3.Pad.bPressed( EInstrumentPad.DRUMS, EPad.FT ) ) || TJAPlayer3.Pad.bPressedGB( EPad.FT ) )
|
if (TJAPlayer3.Skin.bgmコンフィグ画面.bIsPlaying)
|
||||||
|
TJAPlayer3.Skin.bgmコンフィグ画面.tStop();
|
||||||
|
|
||||||
|
actCalibrationMode.Update();
|
||||||
|
actCalibrationMode.Draw();
|
||||||
|
}
|
||||||
|
// 曲データの一覧取得中は、キー入力を無効化する
|
||||||
|
else if ( !TJAPlayer3.EnumSongs.IsEnumerating || TJAPlayer3.actEnumSongs.bコマンドでの曲データ取得 != true )
|
||||||
|
{
|
||||||
|
if (!TJAPlayer3.Skin.bgmコンフィグ画面.bIsPlaying)
|
||||||
|
TJAPlayer3.Skin.bgmコンフィグ画面.tPlay();
|
||||||
|
|
||||||
|
if ( ( TJAPlayer3.InputManager.Keyboard.KeyPressed( (int)SlimDXKeys.Key.Escape ) || TJAPlayer3.Pad.bPressed( EInstrumentPad.DRUMS, EPad.FT ) ) || TJAPlayer3.Pad.bPressedGB( EPad.FT ) )
|
||||||
{
|
{
|
||||||
TJAPlayer3.Skin.soundCancelSFX.tPlay();
|
TJAPlayer3.Skin.soundCancelSFX.tPlay();
|
||||||
if ( !this.bメニューにフォーカス中 )
|
if ( !this.bメニューにフォーカス中 )
|
||||||
@ -553,7 +566,7 @@ namespace TJAPlayer3
|
|||||||
//private CCounter ctBackgroundAnime;
|
//private CCounter ctBackgroundAnime;
|
||||||
private CActFIFOWhite actFIFO;
|
private CActFIFOWhite actFIFO;
|
||||||
private CActConfigKeyAssign actKeyAssign;
|
private CActConfigKeyAssign actKeyAssign;
|
||||||
private CActConfigList actList;
|
public CActConfigList actList;
|
||||||
private CActオプションパネル actオプションパネル;
|
private CActオプションパネル actオプションパネル;
|
||||||
private bool bメニューにフォーカス中;
|
private bool bメニューにフォーカス中;
|
||||||
private STキー反復用カウンタ ctキー反復用;
|
private STキー反復用カウンタ ctキー反復用;
|
||||||
|