Translate japanese variables and code (part 3) (#714)
* refactor: translate CConfigIni * refactor: remove unused CDTXVersion.cs * refactor: ConfigManager * refactor: translate CPad.cs * refactor: translate CTextConsole * refactor: remove unused CVersionList.cs
This commit is contained in:
parent
fe31f0d8f2
commit
a38003bdb2
@ -3313,10 +3313,10 @@ namespace OpenTaiko {
|
|||||||
private void ProcessGuidSection(string key, string value) {
|
private void ProcessGuidSection(string key, string value) {
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case "JoystickID":
|
case "JoystickID":
|
||||||
this.tJoystickIDの取得(value);
|
this.GetJoystickID(value);
|
||||||
break;
|
break;
|
||||||
case "GamepadID":
|
case "GamepadID":
|
||||||
this.tGamepadIDの取得(value);
|
this.GetGamepadID(value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3569,8 +3569,8 @@ namespace OpenTaiko {
|
|||||||
private bool bConfigIniFileExists;
|
private bool bConfigIniFileExists;
|
||||||
private string ConfigIniFileName;
|
private string ConfigIniFileName;
|
||||||
|
|
||||||
private void tJoystickIDの取得(string strキー記述) {
|
private void GetJoystickID(string keyDescription) {
|
||||||
string[] strArray = strキー記述.Split(new char[] { ',' });
|
string[] strArray = keyDescription.Split(new char[] { ',' });
|
||||||
if (strArray.Length >= 2) {
|
if (strArray.Length >= 2) {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
if ((int.TryParse(strArray[0], out result) && (result >= 0)) && (result <= 9)) {
|
if ((int.TryParse(strArray[0], out result) && (result >= 0)) && (result <= 9)) {
|
||||||
@ -3583,8 +3583,8 @@ namespace OpenTaiko {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void tGamepadIDの取得(string strキー記述) {
|
private void GetGamepadID(string keyDescription) {
|
||||||
string[] strArray = strキー記述.Split(new char[] { ',' });
|
string[] strArray = keyDescription.Split(new char[] { ',' });
|
||||||
if (strArray.Length >= 2) {
|
if (strArray.Length >= 2) {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
if ((int.TryParse(strArray[0], out result) && (result >= 0)) && (result <= 9)) {
|
if ((int.TryParse(strArray[0], out result) && (result >= 0)) && (result <= 9)) {
|
||||||
|
@ -1,175 +0,0 @@
|
|||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace OpenTaiko {
|
|
||||||
/// <summary>
|
|
||||||
/// <para>DTXMania のバージョン。</para>
|
|
||||||
/// <para>例1:"078b" → 整数部=078, 小数部=2000000 ('英字'+'yymmdd') </para>
|
|
||||||
/// <para>例2:"078a(100124)" → 整数部=078, 小数部=1100124 ('英字'+'yymmdd')</para>
|
|
||||||
/// </summary>
|
|
||||||
public class CDTXVersion {
|
|
||||||
// Properties
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <para>バージョンが未知のときに true になる。</para>
|
|
||||||
/// </summary>
|
|
||||||
public bool Unknown {
|
|
||||||
get;
|
|
||||||
private set;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <para>DTXMania のバージョンの整数部を表す。</para>
|
|
||||||
/// <para>例1:"078b" → 整数部=078</para>
|
|
||||||
/// <para>例2:"078a(100124)" → 整数部=078</para>
|
|
||||||
/// </summary>
|
|
||||||
public int n整数部;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <para>DTXMania のバージョンの小数部を表す。</para>
|
|
||||||
/// <para>小数部は、'英字(0~26) * 1000000 + 日付(yymmdd)' の式で表される整数。</para>
|
|
||||||
/// <para>例1:"078b" → 小数部=2000000 </para>
|
|
||||||
/// <para>例2:"078a(100124)" → 小数部=1100124</para>
|
|
||||||
/// </summary>
|
|
||||||
public int n小数部;
|
|
||||||
|
|
||||||
|
|
||||||
// Constructor
|
|
||||||
|
|
||||||
public CDTXVersion() {
|
|
||||||
this.n整数部 = 0;
|
|
||||||
this.n小数部 = 0;
|
|
||||||
this.Unknown = true;
|
|
||||||
}
|
|
||||||
public CDTXVersion(int n整数部) {
|
|
||||||
this.n整数部 = n整数部;
|
|
||||||
this.n小数部 = 0;
|
|
||||||
this.Unknown = false;
|
|
||||||
}
|
|
||||||
public CDTXVersion(string Version) {
|
|
||||||
this.n整数部 = 0;
|
|
||||||
this.n小数部 = 0;
|
|
||||||
this.Unknown = true;
|
|
||||||
|
|
||||||
if (Version.ToLower().Equals("unknown")) {
|
|
||||||
this.Unknown = true;
|
|
||||||
} else {
|
|
||||||
int num = 0;
|
|
||||||
int length = Version.Length;
|
|
||||||
if ((num < length) && char.IsDigit(Version[num])) {
|
|
||||||
// 整数部 取得
|
|
||||||
while ((num < length) && char.IsDigit(Version[num])) {
|
|
||||||
this.n整数部 = (this.n整数部 * 10) + CDTXVersion.DIG10.IndexOf(Version[num++]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 小数部(1)英字部分 取得
|
|
||||||
while ((num < length) && ((Version[num] == ' ') || (Version[num] == '('))) {
|
|
||||||
num++;
|
|
||||||
}
|
|
||||||
if ((num < length) && (CDTXVersion.DIG36.IndexOf(Version[num]) >= 10)) {
|
|
||||||
this.n小数部 = CDTXVersion.DIG36.IndexOf(Version[num++]) - 10;
|
|
||||||
if (this.n小数部 >= 0x1a) {
|
|
||||||
this.n小数部 -= 0x1a;
|
|
||||||
}
|
|
||||||
this.n小数部++;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 小数部(2)日付部分(yymmdd) 取得
|
|
||||||
while ((num < length) && ((Version[num] == ' ') || (Version[num] == '('))) {
|
|
||||||
num++;
|
|
||||||
}
|
|
||||||
for (int i = 0; i < 6; i++) {
|
|
||||||
this.n小数部 *= 10;
|
|
||||||
if ((num < length) && char.IsDigit(Version[num])) {
|
|
||||||
this.n小数部 += CDTXVersion.DIG10.IndexOf(Version[num]);
|
|
||||||
}
|
|
||||||
num++;
|
|
||||||
}
|
|
||||||
this.Unknown = false;
|
|
||||||
} else {
|
|
||||||
this.Unknown = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public CDTXVersion(int n整数部, int n小数部) {
|
|
||||||
this.n整数部 = n整数部;
|
|
||||||
this.n小数部 = n小数部;
|
|
||||||
this.Unknown = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// メソッド
|
|
||||||
|
|
||||||
public string toString() {
|
|
||||||
var result = new StringBuilder(32);
|
|
||||||
|
|
||||||
// 整数部
|
|
||||||
result.Append(this.n整数部.ToString("000"));
|
|
||||||
|
|
||||||
// 英字部分(あれば)
|
|
||||||
if (this.n小数部 >= 1000000) {
|
|
||||||
int n英字 = Math.Min(this.n小数部 / 1000000, 26); // 1~26
|
|
||||||
result.Append(CDTXVersion.DIG36[10 + (n英字 - 1)]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 日付部分(あれば)
|
|
||||||
int n日付 = this.n小数部 % 1000000;
|
|
||||||
if (n日付 > 0) {
|
|
||||||
result.Append('(');
|
|
||||||
result.Append(n日付.ToString("000000"));
|
|
||||||
result.Append(')');
|
|
||||||
}
|
|
||||||
|
|
||||||
return result.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool operator ==(CDTXVersion x, CDTXVersion y) {
|
|
||||||
return (((x.n整数部 == y.n整数部) && (x.n小数部 == y.n小数部)) && (x.Unknown == y.Unknown));
|
|
||||||
}
|
|
||||||
public static bool operator >(CDTXVersion x, CDTXVersion y) {
|
|
||||||
return ((x.n整数部 > y.n整数部) || ((x.n整数部 == y.n整数部) && (x.n小数部 > y.n小数部)));
|
|
||||||
}
|
|
||||||
public static bool operator >=(CDTXVersion x, CDTXVersion y) {
|
|
||||||
return ((x.n整数部 > y.n整数部) || ((x.n整数部 == y.n整数部) && (x.n小数部 >= y.n小数部)));
|
|
||||||
}
|
|
||||||
public static bool operator !=(CDTXVersion x, CDTXVersion y) {
|
|
||||||
if ((x.n整数部 == y.n整数部) && (x.n小数部 == y.n小数部)) {
|
|
||||||
return (x.Unknown != y.Unknown);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
public static bool operator <(CDTXVersion x, CDTXVersion y) {
|
|
||||||
return ((x.n整数部 < y.n整数部) || ((x.n整数部 == y.n整数部) && (x.n小数部 < y.n小数部)));
|
|
||||||
}
|
|
||||||
public static bool operator <=(CDTXVersion x, CDTXVersion y) {
|
|
||||||
return ((x.n整数部 < y.n整数部) || ((x.n整数部 == y.n整数部) && (x.n小数部 <= y.n小数部)));
|
|
||||||
}
|
|
||||||
public override bool Equals(object obj) // 2011.1.3 yyagi: warningを無くすために追加
|
|
||||||
{
|
|
||||||
if (obj == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.GetType() != obj.GetType()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
CDTXVersion objCDTXVersion = (CDTXVersion)obj;
|
|
||||||
if (!int.Equals(this.n整数部, objCDTXVersion.n整数部) || !int.Equals(this.n小数部, objCDTXVersion.n小数部)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
public override int GetHashCode() // 2011.1.3 yyagi: warningを無くすために追加
|
|
||||||
{
|
|
||||||
string v = this.toString();
|
|
||||||
return v.GetHashCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
// その他
|
|
||||||
|
|
||||||
#region [ private ]
|
|
||||||
//-----------------
|
|
||||||
private const string DIG36 = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
||||||
private const string DIG10 = "0123456789";
|
|
||||||
//-----------------
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
}
|
|
@ -5,7 +5,7 @@ namespace OpenTaiko {
|
|||||||
public class CPad {
|
public class CPad {
|
||||||
// Properties
|
// Properties
|
||||||
|
|
||||||
internal STHIT st検知したデバイス;
|
internal STHIT detectedDevice;
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
internal struct STHIT {
|
internal struct STHIT {
|
||||||
public bool Keyboard;
|
public bool Keyboard;
|
||||||
@ -21,24 +21,20 @@ namespace OpenTaiko {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
|
|
||||||
internal CPad(CConfigIni configIni, CInputManager mgrInput) {
|
internal CPad(CConfigIni configIni, CInputManager mgrInput) {
|
||||||
this.rConfigIni = configIni;
|
this.rConfigIni = configIni;
|
||||||
this.rInput管理 = mgrInput;
|
this.inputManager = mgrInput;
|
||||||
this.st検知したデバイス.Clear();
|
this.detectedDevice.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Methods
|
||||||
// メソッド
|
|
||||||
|
|
||||||
public List<STInputEvent> GetEvents(EInstrumentPad part, EPad pad) {
|
public List<STInputEvent> GetEvents(EInstrumentPad part, EPad pad) {
|
||||||
CConfigIni.CKeyAssign.STKEYASSIGN[] stkeyassignArray = this.rConfigIni.KeyAssign[(int)part][(int)pad];
|
CConfigIni.CKeyAssign.STKEYASSIGN[] stkeyassignArray = this.rConfigIni.KeyAssign[(int)part][(int)pad];
|
||||||
List<STInputEvent> list = new List<STInputEvent>();
|
List<STInputEvent> list = new List<STInputEvent>();
|
||||||
|
|
||||||
// すべての入力デバイスについて…
|
// すべての入力デバイスについて…
|
||||||
foreach (IInputDevice device in this.rInput管理.InputDevices) {
|
foreach (IInputDevice device in this.inputManager.InputDevices) {
|
||||||
if ((device.InputEvents != null) && (device.InputEvents.Count != 0)) {
|
if ((device.InputEvents != null) && (device.InputEvents.Count != 0)) {
|
||||||
foreach (STInputEvent event2 in device.InputEvents) {
|
foreach (STInputEvent event2 in device.InputEvents) {
|
||||||
for (int i = 0; i < stkeyassignArray.Length; i++) {
|
for (int i = 0; i < stkeyassignArray.Length; i++) {
|
||||||
@ -46,41 +42,40 @@ namespace OpenTaiko {
|
|||||||
case EInputDevice.Keyboard:
|
case EInputDevice.Keyboard:
|
||||||
if ((device.CurrentType == InputDeviceType.Keyboard) && (event2.nKey == stkeyassignArray[i].Code)) {
|
if ((device.CurrentType == InputDeviceType.Keyboard) && (event2.nKey == stkeyassignArray[i].Code)) {
|
||||||
list.Add(event2);
|
list.Add(event2);
|
||||||
this.st検知したデバイス.Keyboard = true;
|
this.detectedDevice.Keyboard = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EInputDevice.MIDIInput:
|
case EInputDevice.MIDIInput:
|
||||||
if (((device.CurrentType == InputDeviceType.MidiIn) && (device.ID == stkeyassignArray[i].ID)) && (event2.nKey == stkeyassignArray[i].Code)) {
|
if (((device.CurrentType == InputDeviceType.MidiIn) && (device.ID == stkeyassignArray[i].ID)) && (event2.nKey == stkeyassignArray[i].Code)) {
|
||||||
list.Add(event2);
|
list.Add(event2);
|
||||||
this.st検知したデバイス.MIDIIN = true;
|
this.detectedDevice.MIDIIN = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EInputDevice.Joypad:
|
case EInputDevice.Joypad:
|
||||||
if (((device.CurrentType == InputDeviceType.Joystick) && (device.ID == stkeyassignArray[i].ID)) && (event2.nKey == stkeyassignArray[i].Code)) {
|
if (((device.CurrentType == InputDeviceType.Joystick) && (device.ID == stkeyassignArray[i].ID)) && (event2.nKey == stkeyassignArray[i].Code)) {
|
||||||
list.Add(event2);
|
list.Add(event2);
|
||||||
this.st検知したデバイス.Joypad = true;
|
this.detectedDevice.Joypad = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EInputDevice.Gamepad:
|
case EInputDevice.Gamepad:
|
||||||
if (((device.CurrentType == InputDeviceType.Gamepad) && (device.ID == stkeyassignArray[i].ID)) && (event2.nKey == stkeyassignArray[i].Code)) {
|
if (((device.CurrentType == InputDeviceType.Gamepad) && (device.ID == stkeyassignArray[i].ID)) && (event2.nKey == stkeyassignArray[i].Code)) {
|
||||||
list.Add(event2);
|
list.Add(event2);
|
||||||
this.st検知したデバイス.Gamepad = true;
|
this.detectedDevice.Gamepad = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EInputDevice.Mouse:
|
case EInputDevice.Mouse:
|
||||||
if ((device.CurrentType == InputDeviceType.Mouse) && (event2.nKey == stkeyassignArray[i].Code)) {
|
if ((device.CurrentType == InputDeviceType.Mouse) && (event2.nKey == stkeyassignArray[i].Code)) {
|
||||||
list.Add(event2);
|
list.Add(event2);
|
||||||
this.st検知したデバイス.Mouse = true;
|
this.detectedDevice.Mouse = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
@ -92,47 +87,47 @@ namespace OpenTaiko {
|
|||||||
for (int i = 0; i < stkeyassignArray.Length; i++) {
|
for (int i = 0; i < stkeyassignArray.Length; i++) {
|
||||||
switch (stkeyassignArray[i].InputDevice) {
|
switch (stkeyassignArray[i].InputDevice) {
|
||||||
case EInputDevice.Keyboard:
|
case EInputDevice.Keyboard:
|
||||||
if (!this.rInput管理.Keyboard.KeyPressed(stkeyassignArray[i].Code))
|
if (!this.inputManager.Keyboard.KeyPressed(stkeyassignArray[i].Code))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
this.st検知したデバイス.Keyboard = true;
|
this.detectedDevice.Keyboard = true;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case EInputDevice.MIDIInput: {
|
case EInputDevice.MIDIInput: {
|
||||||
IInputDevice device2 = this.rInput管理.MidiIn(stkeyassignArray[i].ID);
|
IInputDevice device2 = this.inputManager.MidiIn(stkeyassignArray[i].ID);
|
||||||
if ((device2 == null) || !device2.KeyPressed(stkeyassignArray[i].Code))
|
if ((device2 == null) || !device2.KeyPressed(stkeyassignArray[i].Code))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
this.st検知したデバイス.MIDIIN = true;
|
this.detectedDevice.MIDIIN = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case EInputDevice.Joypad: {
|
case EInputDevice.Joypad: {
|
||||||
if (!this.rConfigIni.dicJoystick.ContainsKey(stkeyassignArray[i].ID))
|
if (!this.rConfigIni.dicJoystick.ContainsKey(stkeyassignArray[i].ID))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
IInputDevice device = this.rInput管理.Joystick(stkeyassignArray[i].ID);
|
IInputDevice device = this.inputManager.Joystick(stkeyassignArray[i].ID);
|
||||||
if ((device == null) || !device.KeyPressed(stkeyassignArray[i].Code))
|
if ((device == null) || !device.KeyPressed(stkeyassignArray[i].Code))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
this.st検知したデバイス.Joypad = true;
|
this.detectedDevice.Joypad = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case EInputDevice.Gamepad: {
|
case EInputDevice.Gamepad: {
|
||||||
if (!this.rConfigIni.dicJoystick.ContainsKey(stkeyassignArray[i].ID))
|
if (!this.rConfigIni.dicJoystick.ContainsKey(stkeyassignArray[i].ID))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
IInputDevice device = this.rInput管理.Gamepad(stkeyassignArray[i].ID);
|
IInputDevice device = this.inputManager.Gamepad(stkeyassignArray[i].ID);
|
||||||
if ((device == null) || !device.KeyPressed(stkeyassignArray[i].Code))
|
if ((device == null) || !device.KeyPressed(stkeyassignArray[i].Code))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
this.st検知したデバイス.Gamepad = true;
|
this.detectedDevice.Gamepad = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case EInputDevice.Mouse:
|
case EInputDevice.Mouse:
|
||||||
if (!this.rInput管理.Mouse.KeyPressed(stkeyassignArray[i].Code))
|
if (!this.inputManager.Mouse.KeyPressed(stkeyassignArray[i].Code))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
this.st検知したデバイス.Mouse = true;
|
this.detectedDevice.Mouse = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -151,27 +146,27 @@ namespace OpenTaiko {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
public bool b押されている(EInstrumentPad part, EPad pad) {
|
public bool IsPressing(EInstrumentPad part, EPad pad) {
|
||||||
if (part != EInstrumentPad.Unknown) {
|
if (part != EInstrumentPad.Unknown) {
|
||||||
CConfigIni.CKeyAssign.STKEYASSIGN[] stkeyassignArray = this.rConfigIni.KeyAssign[(int)part][(int)pad];
|
CConfigIni.CKeyAssign.STKEYASSIGN[] stkeyassignArray = this.rConfigIni.KeyAssign[(int)part][(int)pad];
|
||||||
for (int i = 0; i < stkeyassignArray.Length; i++) {
|
for (int i = 0; i < stkeyassignArray.Length; i++) {
|
||||||
switch (stkeyassignArray[i].InputDevice) {
|
switch (stkeyassignArray[i].InputDevice) {
|
||||||
case EInputDevice.Keyboard:
|
case EInputDevice.Keyboard:
|
||||||
if (!this.rInput管理.Keyboard.KeyPressing(stkeyassignArray[i].Code)) {
|
if (!this.inputManager.Keyboard.KeyPressing(stkeyassignArray[i].Code)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
this.st検知したデバイス.Keyboard = true;
|
this.detectedDevice.Keyboard = true;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case EInputDevice.Joypad: {
|
case EInputDevice.Joypad: {
|
||||||
if (!this.rConfigIni.dicJoystick.ContainsKey(stkeyassignArray[i].ID)) {
|
if (!this.rConfigIni.dicJoystick.ContainsKey(stkeyassignArray[i].ID)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
IInputDevice device = this.rInput管理.Joystick(stkeyassignArray[i].ID);
|
IInputDevice device = this.inputManager.Joystick(stkeyassignArray[i].ID);
|
||||||
if ((device == null) || !device.KeyPressing(stkeyassignArray[i].Code)) {
|
if ((device == null) || !device.KeyPressing(stkeyassignArray[i].Code)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
this.st検知したデバイス.Joypad = true;
|
this.detectedDevice.Joypad = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,27 +174,27 @@ namespace OpenTaiko {
|
|||||||
if (!this.rConfigIni.dicJoystick.ContainsKey(stkeyassignArray[i].ID)) {
|
if (!this.rConfigIni.dicJoystick.ContainsKey(stkeyassignArray[i].ID)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
IInputDevice device = this.rInput管理.Gamepad(stkeyassignArray[i].ID);
|
IInputDevice device = this.inputManager.Gamepad(stkeyassignArray[i].ID);
|
||||||
if ((device == null) || !device.KeyPressing(stkeyassignArray[i].Code)) {
|
if ((device == null) || !device.KeyPressing(stkeyassignArray[i].Code)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
this.st検知したデバイス.Gamepad = true;
|
this.detectedDevice.Gamepad = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case EInputDevice.Mouse:
|
case EInputDevice.Mouse:
|
||||||
if (!this.rInput管理.Mouse.KeyPressing(stkeyassignArray[i].Code)) {
|
if (!this.inputManager.Mouse.KeyPressing(stkeyassignArray[i].Code)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
this.st検知したデバイス.Mouse = true;
|
this.detectedDevice.Mouse = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
public bool b押されているGB(EPad pad) {
|
public bool IsPressingGB(EPad pad) {
|
||||||
if (!this.b押されている(EInstrumentPad.Guitar, pad)) {
|
if (!this.IsPressing(EInstrumentPad.Guitar, pad)) {
|
||||||
return this.b押されている(EInstrumentPad.Bass, pad);
|
return this.IsPressing(EInstrumentPad.Bass, pad);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -210,7 +205,7 @@ namespace OpenTaiko {
|
|||||||
#region [ private ]
|
#region [ private ]
|
||||||
//-----------------
|
//-----------------
|
||||||
private CConfigIni rConfigIni;
|
private CConfigIni rConfigIni;
|
||||||
private CInputManager rInput管理;
|
private CInputManager inputManager;
|
||||||
//-----------------
|
//-----------------
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,6 @@ using FDK;
|
|||||||
|
|
||||||
namespace OpenTaiko {
|
namespace OpenTaiko {
|
||||||
internal class CTextConsole : CActivity {
|
internal class CTextConsole : CActivity {
|
||||||
// 定数
|
|
||||||
|
|
||||||
public enum EFontType {
|
public enum EFontType {
|
||||||
White,
|
White,
|
||||||
Cyan,
|
Cyan,
|
||||||
@ -14,83 +12,77 @@ namespace OpenTaiko {
|
|||||||
GraySlim
|
GraySlim
|
||||||
}
|
}
|
||||||
|
|
||||||
// メソッド
|
public void Print(int x, int y, EFontType font, string alphanumericString) {
|
||||||
|
if (!base.IsDeActivated && !string.IsNullOrEmpty(alphanumericString)) {
|
||||||
public void tPrint(int x, int y, EFontType font, string strAlphanumericString) {
|
|
||||||
if (!base.IsDeActivated && !string.IsNullOrEmpty(strAlphanumericString)) {
|
|
||||||
int BOL = x;
|
int BOL = x;
|
||||||
for (int i = 0; i < strAlphanumericString.Length; i++) {
|
for (int i = 0; i < alphanumericString.Length; i++) {
|
||||||
char ch = strAlphanumericString[i];
|
char ch = alphanumericString[i];
|
||||||
if (ch == '\n') {
|
if (ch == '\n') {
|
||||||
x = BOL;
|
x = BOL;
|
||||||
y += nFontHeight;
|
y += this.fontHeight;
|
||||||
} else {
|
} else {
|
||||||
int index = str表記可能文字.IndexOf(ch);
|
int index = printableCharacters.IndexOf(ch);
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
x += nFontWidth;
|
x += this.fontWidth;
|
||||||
} else {
|
} else {
|
||||||
if (this.txフォント8x16[(int)((int)font / (int)EFontType.WhiteSlim)] != null) {
|
if (this.fontTextures[(int)((int)font / (int)EFontType.WhiteSlim)] != null) {
|
||||||
this.txフォント8x16[(int)((int)font / (int)EFontType.WhiteSlim)].t2D描画(x, y, this.rc文字の矩形領域[(int)((int)font % (int)EFontType.WhiteSlim), index]);
|
this.fontTextures[(int)((int)font / (int)EFontType.WhiteSlim)].t2D描画(x, y, this.characterRectangles[(int)((int)font % (int)EFontType.WhiteSlim), index]);
|
||||||
}
|
}
|
||||||
x += nFontWidth;
|
x += this.fontWidth;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// CActivity 実装
|
|
||||||
|
|
||||||
public override void DeActivate() {
|
public override void DeActivate() {
|
||||||
if (this.rc文字の矩形領域 != null)
|
if (this.characterRectangles != null)
|
||||||
this.rc文字の矩形領域 = null;
|
this.characterRectangles = null;
|
||||||
|
|
||||||
base.DeActivate();
|
base.DeActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void CreateManagedResource() {
|
public override void CreateManagedResource() {
|
||||||
if (!base.IsDeActivated) {
|
if (!base.IsDeActivated) {
|
||||||
this.txフォント8x16[0] = OpenTaiko.Tx.TxC(@"Console_Font.png");
|
this.fontTextures[0] = OpenTaiko.Tx.TxC(@"Console_Font.png");
|
||||||
this.txフォント8x16[1] = OpenTaiko.Tx.TxC(@"Console_Font_Small.png");
|
this.fontTextures[1] = OpenTaiko.Tx.TxC(@"Console_Font_Small.png");
|
||||||
|
|
||||||
nFontWidth = this.txフォント8x16[0].szTextureSize.Width / 32;
|
this.fontWidth = this.fontTextures[0].szTextureSize.Width / 32;
|
||||||
nFontHeight = this.txフォント8x16[0].szTextureSize.Height / 16;
|
this.fontHeight = this.fontTextures[0].szTextureSize.Height / 16;
|
||||||
|
|
||||||
this.rc文字の矩形領域 = new Rectangle[3, str表記可能文字.Length];
|
this.characterRectangles = new Rectangle[3, printableCharacters.Length];
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
for (int j = 0; j < str表記可能文字.Length; j++) {
|
for (int j = 0; j < printableCharacters.Length; j++) {
|
||||||
int regionX = nFontWidth * 16, regionY = nFontHeight * 8;
|
int regionX = this.fontWidth * 16, regionY = this.fontHeight * 8;
|
||||||
this.rc文字の矩形領域[i, j].X = ((i / 2) * regionX) + ((j % 16) * nFontWidth);
|
this.characterRectangles[i, j].X = ((i / 2) * regionX) + ((j % 16) * this.fontWidth);
|
||||||
this.rc文字の矩形領域[i, j].Y = ((i % 2) * regionY) + ((j / 16) * nFontHeight);
|
this.characterRectangles[i, j].Y = ((i % 2) * regionY) + ((j / 16) * this.fontHeight);
|
||||||
this.rc文字の矩形領域[i, j].Width = nFontWidth;
|
this.characterRectangles[i, j].Width = this.fontWidth;
|
||||||
this.rc文字の矩形領域[i, j].Height = nFontHeight;
|
this.characterRectangles[i, j].Height = this.fontHeight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
base.CreateManagedResource();
|
base.CreateManagedResource();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ReleaseManagedResource() {
|
public override void ReleaseManagedResource() {
|
||||||
if (!base.IsDeActivated) {
|
if (!base.IsDeActivated) {
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
if (this.txフォント8x16[i] != null) {
|
if (this.fontTextures[i] != null) {
|
||||||
this.txフォント8x16[i].Dispose();
|
this.fontTextures[i].Dispose();
|
||||||
this.txフォント8x16[i] = null;
|
this.fontTextures[i] = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
base.ReleaseManagedResource();
|
base.ReleaseManagedResource();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// その他
|
|
||||||
|
|
||||||
#region [ private ]
|
#region [ private ]
|
||||||
//-----------------
|
//-----------------
|
||||||
private Rectangle[,] rc文字の矩形領域;
|
private Rectangle[,] characterRectangles;
|
||||||
private const string str表記可能文字 = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ";
|
private const string printableCharacters = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ";
|
||||||
public int nFontWidth = 8, nFontHeight = 16;
|
public int fontWidth = 8, fontHeight = 16;
|
||||||
private CTexture[] txフォント8x16 = new CTexture[2];
|
private CTexture[] fontTextures = new CTexture[2];
|
||||||
//-----------------
|
//-----------------
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
namespace OpenTaiko {
|
|
||||||
class CVersionList {
|
|
||||||
public static string[] VersionList = {
|
|
||||||
"0.1.0",
|
|
||||||
"0.2.0",
|
|
||||||
"0.3.0",
|
|
||||||
"0.3.1",
|
|
||||||
"0.3.2",
|
|
||||||
"0.3.3",
|
|
||||||
"0.3.4",
|
|
||||||
"0.3.4.1",
|
|
||||||
"0.3.4.2",
|
|
||||||
"0.4.0",
|
|
||||||
"0.4.1",
|
|
||||||
"0.4.2",
|
|
||||||
"0.4.3",
|
|
||||||
"0.5.0",
|
|
||||||
"0.5.1",
|
|
||||||
"0.5.2",
|
|
||||||
"0.5.2.1",
|
|
||||||
"Pre 0.5.3",
|
|
||||||
"0.5.3",
|
|
||||||
"0.5.3.1",
|
|
||||||
"0.5.3.2",
|
|
||||||
"0.5.4",
|
|
||||||
"Pre 0.6.0 b1",
|
|
||||||
"Pre 0.6.0 b2",
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
@ -4,29 +4,27 @@ using Newtonsoft.Json.Converters;
|
|||||||
|
|
||||||
namespace OpenTaiko {
|
namespace OpenTaiko {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 設定ファイル入出力クラス。
|
/// Class for reading and writing configuration files.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class ConfigManager {
|
public static class ConfigManager {
|
||||||
private static readonly JsonSerializerSettings Settings =
|
private static readonly JsonSerializerSettings Settings =
|
||||||
new JsonSerializerSettings() {
|
new JsonSerializerSettings() {
|
||||||
ObjectCreationHandling = ObjectCreationHandling.Auto,
|
ObjectCreationHandling = ObjectCreationHandling.Auto,
|
||||||
DefaultValueHandling = DefaultValueHandling.Include,
|
DefaultValueHandling = DefaultValueHandling.Include,
|
||||||
// ContractResolver = new CamelCasePropertyNamesContractResolver(),
|
|
||||||
NullValueHandling = NullValueHandling.Ignore,
|
NullValueHandling = NullValueHandling.Ignore,
|
||||||
MissingMemberHandling = MissingMemberHandling.Ignore,
|
MissingMemberHandling = MissingMemberHandling.Ignore,
|
||||||
Converters = new StringEnumConverter[] { new StringEnumConverter() }
|
Converters = new StringEnumConverter[] { new StringEnumConverter() }
|
||||||
};
|
};
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 設定ファイルの読み込みを行います。ファイルが存在しなかった場合、そのクラスの新規インスタンスを返します。
|
/// Reads the configuration file. If the file does not exist, it will be created.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="T">シリアライズしたクラス。</typeparam>
|
/// <typeparam name="T">Type of the object to deserialize.</typeparam>
|
||||||
/// <param name="filePath">ファイル名。</param>
|
/// <param name="filePath">File name.</param>
|
||||||
/// <returns>デシリアライズ結果。</returns>
|
/// <returns>Deserialized object.</returns>
|
||||||
public static T GetConfig<T>(string filePath) where T : new() {
|
public static T GetConfig<T>(string filePath) where T : new() {
|
||||||
var json = "";
|
var json = "";
|
||||||
if (!System.IO.File.Exists(filePath)) {
|
if (!System.IO.File.Exists(filePath)) {
|
||||||
// ファイルが存在しないので
|
|
||||||
SaveConfig(new T(), filePath);
|
SaveConfig(new T(), filePath);
|
||||||
}
|
}
|
||||||
using (var stream = new System.IO.StreamReader(filePath, Encoding.UTF8)) {
|
using (var stream = new System.IO.StreamReader(filePath, Encoding.UTF8)) {
|
||||||
@ -36,10 +34,10 @@ namespace OpenTaiko {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 設定ファイルの書き込みを行います。
|
/// Writes the object to a file.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="obj">シリアライズするインスタンス。</param>
|
/// <param name="obj">Object to serialize.</param>
|
||||||
/// <param name="filePath">ファイル名。</param>
|
/// <param name="filePath">File name.</param>
|
||||||
public static void SaveConfig(object obj, string filePath) {
|
public static void SaveConfig(object obj, string filePath) {
|
||||||
(new FileInfo(filePath)).Directory.Create();
|
(new FileInfo(filePath)).Directory.Create();
|
||||||
using (var stream = new System.IO.StreamWriter(filePath, false, Encoding.UTF8)) {
|
using (var stream = new System.IO.StreamWriter(filePath, false, Encoding.UTF8)) {
|
||||||
|
@ -1155,7 +1155,7 @@ namespace OpenTaiko {
|
|||||||
#region [ *** ]
|
#region [ *** ]
|
||||||
//-----------------------------
|
//-----------------------------
|
||||||
if (this.n進行描画の戻り値 != 0) {
|
if (this.n進行描画の戻り値 != 0) {
|
||||||
OpenTaiko.Pad.st検知したデバイス.Clear(); // 入力デバイスフラグクリア(2010.9.11)
|
OpenTaiko.Pad.detectedDevice.Clear(); // 入力デバイスフラグクリア(2010.9.11)
|
||||||
r現在のステージ.DeActivate();
|
r現在のステージ.DeActivate();
|
||||||
if (!ConfigIni.PreAssetsLoading) {
|
if (!ConfigIni.PreAssetsLoading) {
|
||||||
r現在のステージ.ReleaseManagedResource();
|
r現在のステージ.ReleaseManagedResource();
|
||||||
|
@ -23,7 +23,7 @@ namespace OpenTaiko {
|
|||||||
int x = 0;
|
int x = 0;
|
||||||
int y = 0 + (40 * screenPosition);
|
int y = 0 + (40 * screenPosition);
|
||||||
|
|
||||||
OpenTaiko.actTextConsole.tPrint(x, y, CTextConsole.EFontType.Cyan, msg);
|
OpenTaiko.actTextConsole.Print(x, y, CTextConsole.EFontType.Cyan, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsExpired() {
|
public bool IsExpired() {
|
||||||
|
@ -173,7 +173,7 @@ namespace OpenTaiko {
|
|||||||
int x = 320;
|
int x = 320;
|
||||||
int y = 20;
|
int y = 20;
|
||||||
for (int i = 0; i < this.list進行文字列.Count; i++) {
|
for (int i = 0; i < this.list進行文字列.Count; i++) {
|
||||||
OpenTaiko.actTextConsole.tPrint((int)(x * OpenTaiko.Skin.Resolution[0] / 1280.0), (int)(y * OpenTaiko.Skin.Resolution[1] / 720.0), CTextConsole.EFontType.White, this.list進行文字列[i]);
|
OpenTaiko.actTextConsole.Print((int)(x * OpenTaiko.Skin.Resolution[0] / 1280.0), (int)(y * OpenTaiko.Skin.Resolution[1] / 720.0), CTextConsole.EFontType.White, this.list進行文字列[i]);
|
||||||
y += 24;
|
y += 24;
|
||||||
}
|
}
|
||||||
//-----------------
|
//-----------------
|
||||||
|
@ -823,11 +823,11 @@ namespace OpenTaiko {
|
|||||||
//string strVersion = "KTT:J:A:I:2017072200";
|
//string strVersion = "KTT:J:A:I:2017072200";
|
||||||
string strCreator = "https://github.com/0AuBSQ/OpenTaiko";
|
string strCreator = "https://github.com/0AuBSQ/OpenTaiko";
|
||||||
AssemblyName asmApp = Assembly.GetExecutingAssembly().GetName();
|
AssemblyName asmApp = Assembly.GetExecutingAssembly().GetName();
|
||||||
OpenTaiko.actTextConsole.tPrint(4, 44, CTextConsole.EFontType.White, "DEBUG BUILD");
|
OpenTaiko.actTextConsole.Print(4, 44, CTextConsole.EFontType.White, "DEBUG BUILD");
|
||||||
OpenTaiko.actTextConsole.tPrint(4, 4, CTextConsole.EFontType.White, asmApp.Name + " Ver." + OpenTaiko.VERSION + " (" + strCreator + ")");
|
OpenTaiko.actTextConsole.Print(4, 4, CTextConsole.EFontType.White, asmApp.Name + " Ver." + OpenTaiko.VERSION + " (" + strCreator + ")");
|
||||||
OpenTaiko.actTextConsole.tPrint(4, 24, CTextConsole.EFontType.White, "Skin:" + OpenTaiko.Skin.Skin_Name + " Ver." + OpenTaiko.Skin.Skin_Version + " (" + OpenTaiko.Skin.Skin_Creator + ")");
|
OpenTaiko.actTextConsole.Print(4, 24, CTextConsole.EFontType.White, "Skin:" + OpenTaiko.Skin.Skin_Name + " Ver." + OpenTaiko.Skin.Skin_Version + " (" + OpenTaiko.Skin.Skin_Creator + ")");
|
||||||
//CDTXMania.act文字コンソール.tPrint(4, 24, C文字コンソール.Eフォント種別.白, strSubTitle);
|
//CDTXMania.act文字コンソール.tPrint(4, 24, C文字コンソール.Eフォント種別.白, strSubTitle);
|
||||||
OpenTaiko.actTextConsole.tPrint(4, (OpenTaiko.Skin.Resolution[1] - 24), CTextConsole.EFontType.White, "TJAPlayer3 forked TJAPlayer2 forPC(kairera0467)");
|
OpenTaiko.actTextConsole.Print(4, (OpenTaiko.Skin.Resolution[1] - 24), CTextConsole.EFontType.White, "TJAPlayer3 forked TJAPlayer2 forPC(kairera0467)");
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
//TJAPlayer3.actTextConsole.tPrint(4, 64, CTextConsole.EFontType.White, CScoreIni_Importer.Status);
|
//TJAPlayer3.actTextConsole.tPrint(4, 64, CTextConsole.EFontType.White, CScoreIni_Importer.Status);
|
||||||
|
@ -134,14 +134,14 @@ namespace OpenTaiko {
|
|||||||
|
|
||||||
offsettext?.t2D描画(OpenTaiko.Skin.Config_Calibration_OffsetText[0] - offsettext.szTextureSize.Width, OpenTaiko.Skin.Config_Calibration_OffsetText[1]);
|
offsettext?.t2D描画(OpenTaiko.Skin.Config_Calibration_OffsetText[0] - offsettext.szTextureSize.Width, OpenTaiko.Skin.Config_Calibration_OffsetText[1]);
|
||||||
|
|
||||||
OpenTaiko.actTextConsole.tPrint(OpenTaiko.Skin.Config_Calibration_InfoText[0], OpenTaiko.Skin.Config_Calibration_InfoText[1], CTextConsole.EFontType.Cyan,
|
OpenTaiko.actTextConsole.Print(OpenTaiko.Skin.Config_Calibration_InfoText[0], OpenTaiko.Skin.Config_Calibration_InfoText[1], CTextConsole.EFontType.Cyan,
|
||||||
"MEDIAN OFFSET : " + GetMedianOffset() + "ms\n");
|
"MEDIAN OFFSET : " + GetMedianOffset() + "ms\n");
|
||||||
OpenTaiko.actTextConsole.tPrint(OpenTaiko.Skin.Config_Calibration_InfoText[0], OpenTaiko.Skin.Config_Calibration_InfoText[1] + OpenTaiko.actTextConsole.nFontHeight, CTextConsole.EFontType.White,
|
OpenTaiko.actTextConsole.Print(OpenTaiko.Skin.Config_Calibration_InfoText[0], OpenTaiko.Skin.Config_Calibration_InfoText[1] + OpenTaiko.actTextConsole.fontHeight, CTextConsole.EFontType.White,
|
||||||
"MIN OFFSET : " + GetLowestOffset() + "ms\n" +
|
"MIN OFFSET : " + GetLowestOffset() + "ms\n" +
|
||||||
"MAX OFFSET : " + GetHighestOffset() + "ms\n" +
|
"MAX OFFSET : " + GetHighestOffset() + "ms\n" +
|
||||||
"LAST OFFSET : " + LastOffset + "ms\n" +
|
"LAST OFFSET : " + LastOffset + "ms\n" +
|
||||||
"OFFSET COUNT : " + (Offsets != null ? Offsets.Count : 0));
|
"OFFSET COUNT : " + (Offsets != null ? Offsets.Count : 0));
|
||||||
OpenTaiko.actTextConsole.tPrint(OpenTaiko.Skin.Config_Calibration_InfoText[0], OpenTaiko.Skin.Config_Calibration_InfoText[1] + (OpenTaiko.actTextConsole.nFontHeight * 5), CTextConsole.EFontType.White,
|
OpenTaiko.actTextConsole.Print(OpenTaiko.Skin.Config_Calibration_InfoText[0], OpenTaiko.Skin.Config_Calibration_InfoText[1] + (OpenTaiko.actTextConsole.fontHeight * 5), CTextConsole.EFontType.White,
|
||||||
"CURRENT OFFSET: " + CurrentOffset() + "ms");
|
"CURRENT OFFSET: " + CurrentOffset() + "ms");
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -453,12 +453,12 @@ namespace OpenTaiko {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.ctキー反復用.Up.KeyIntervalFunc(OpenTaiko.InputManager.Keyboard.KeyPressing((int)SlimDXKeys.Key.UpArrow), new CCounter.KeyProcess(this.tカーソルを上へ移動する));
|
this.ctキー反復用.Up.KeyIntervalFunc(OpenTaiko.InputManager.Keyboard.KeyPressing((int)SlimDXKeys.Key.UpArrow), new CCounter.KeyProcess(this.tカーソルを上へ移動する));
|
||||||
this.ctキー反復用.R.KeyIntervalFunc(OpenTaiko.Pad.b押されているGB(EPad.HH), new CCounter.KeyProcess(this.tカーソルを上へ移動する));
|
this.ctキー反復用.R.KeyIntervalFunc(OpenTaiko.Pad.IsPressingGB(EPad.HH), new CCounter.KeyProcess(this.tカーソルを上へ移動する));
|
||||||
if (OpenTaiko.Pad.bPressed(EInstrumentPad.Drums, EPad.SD)) {
|
if (OpenTaiko.Pad.bPressed(EInstrumentPad.Drums, EPad.SD)) {
|
||||||
this.tカーソルを上へ移動する();
|
this.tカーソルを上へ移動する();
|
||||||
}
|
}
|
||||||
this.ctキー反復用.Down.KeyIntervalFunc(OpenTaiko.InputManager.Keyboard.KeyPressing((int)SlimDXKeys.Key.DownArrow), new CCounter.KeyProcess(this.tカーソルを下へ移動する));
|
this.ctキー反復用.Down.KeyIntervalFunc(OpenTaiko.InputManager.Keyboard.KeyPressing((int)SlimDXKeys.Key.DownArrow), new CCounter.KeyProcess(this.tカーソルを下へ移動する));
|
||||||
this.ctキー反復用.B.KeyIntervalFunc(OpenTaiko.Pad.b押されているGB(EPad.BD), new CCounter.KeyProcess(this.tカーソルを下へ移動する));
|
this.ctキー反復用.B.KeyIntervalFunc(OpenTaiko.Pad.IsPressingGB(EPad.BD), new CCounter.KeyProcess(this.tカーソルを下へ移動する));
|
||||||
if (OpenTaiko.Pad.bPressed(EInstrumentPad.Drums, EPad.LT)) {
|
if (OpenTaiko.Pad.bPressed(EInstrumentPad.Drums, EPad.LT)) {
|
||||||
this.tカーソルを下へ移動する();
|
this.tカーソルを下へ移動する();
|
||||||
}
|
}
|
||||||
|
@ -264,14 +264,14 @@ namespace OpenTaiko {
|
|||||||
#endregion
|
#endregion
|
||||||
#region [ キー入力: 前に移動 ]
|
#region [ キー入力: 前に移動 ]
|
||||||
this.ctキー反復用.Up.KeyIntervalFunc(OpenTaiko.InputManager.Keyboard.KeyPressing((int)SlimDXKeys.Key.UpArrow), new CCounter.KeyProcess(this.t前に移動));
|
this.ctキー反復用.Up.KeyIntervalFunc(OpenTaiko.InputManager.Keyboard.KeyPressing((int)SlimDXKeys.Key.UpArrow), new CCounter.KeyProcess(this.t前に移動));
|
||||||
this.ctキー反復用.R.KeyIntervalFunc(OpenTaiko.Pad.b押されているGB(EPad.R), new CCounter.KeyProcess(this.t前に移動));
|
this.ctキー反復用.R.KeyIntervalFunc(OpenTaiko.Pad.IsPressingGB(EPad.R), new CCounter.KeyProcess(this.t前に移動));
|
||||||
if (OpenTaiko.Pad.bPressed(EInstrumentPad.Drums, EPad.SD) || OpenTaiko.Pad.bPressed(EInstrumentPad.Drums, EPad.LBlue)) {
|
if (OpenTaiko.Pad.bPressed(EInstrumentPad.Drums, EPad.SD) || OpenTaiko.Pad.bPressed(EInstrumentPad.Drums, EPad.LBlue)) {
|
||||||
this.t前に移動();
|
this.t前に移動();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region [ キー入力: 次に移動 ]
|
#region [ キー入力: 次に移動 ]
|
||||||
this.ctキー反復用.Down.KeyIntervalFunc(OpenTaiko.InputManager.Keyboard.KeyPressing((int)SlimDXKeys.Key.DownArrow), new CCounter.KeyProcess(this.t次に移動));
|
this.ctキー反復用.Down.KeyIntervalFunc(OpenTaiko.InputManager.Keyboard.KeyPressing((int)SlimDXKeys.Key.DownArrow), new CCounter.KeyProcess(this.t次に移動));
|
||||||
this.ctキー反復用.B.KeyIntervalFunc(OpenTaiko.Pad.b押されているGB(EPad.B), new CCounter.KeyProcess(this.t次に移動));
|
this.ctキー反復用.B.KeyIntervalFunc(OpenTaiko.Pad.IsPressingGB(EPad.B), new CCounter.KeyProcess(this.t次に移動));
|
||||||
if (OpenTaiko.Pad.bPressed(EInstrumentPad.Drums, EPad.LT) || OpenTaiko.Pad.bPressed(EInstrumentPad.Drums, EPad.RBlue)) {
|
if (OpenTaiko.Pad.bPressed(EInstrumentPad.Drums, EPad.LT) || OpenTaiko.Pad.bPressed(EInstrumentPad.Drums, EPad.RBlue)) {
|
||||||
this.t次に移動();
|
this.t次に移動();
|
||||||
}
|
}
|
||||||
|
@ -488,13 +488,13 @@ namespace OpenTaiko {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (OpenTaiko.ConfigIni.bTokkunMode)
|
if (OpenTaiko.ConfigIni.bTokkunMode)
|
||||||
OpenTaiko.actTextConsole.tPrint(0, 0, CTextConsole.EFontType.White, "GAME: TRAINING MODE");
|
OpenTaiko.actTextConsole.Print(0, 0, CTextConsole.EFontType.White, "GAME: TRAINING MODE");
|
||||||
if (OpenTaiko.ConfigIni.eGameMode == EGame.Survival)
|
if (OpenTaiko.ConfigIni.eGameMode == EGame.Survival)
|
||||||
OpenTaiko.actTextConsole.tPrint(0, 16, CTextConsole.EFontType.White, "GAME: SURVIVAL");
|
OpenTaiko.actTextConsole.Print(0, 16, CTextConsole.EFontType.White, "GAME: SURVIVAL");
|
||||||
if (OpenTaiko.ConfigIni.eGameMode == EGame.SurvivalHard)
|
if (OpenTaiko.ConfigIni.eGameMode == EGame.SurvivalHard)
|
||||||
OpenTaiko.actTextConsole.tPrint(0, 16, CTextConsole.EFontType.White, "GAME: SURVIVAL HARD");
|
OpenTaiko.actTextConsole.Print(0, 16, CTextConsole.EFontType.White, "GAME: SURVIVAL HARD");
|
||||||
if (OpenTaiko.ConfigIni.bSuperHard)
|
if (OpenTaiko.ConfigIni.bSuperHard)
|
||||||
OpenTaiko.actTextConsole.tPrint(0, 32, CTextConsole.EFontType.Cyan, "SUPER HARD MODE : ON");
|
OpenTaiko.actTextConsole.Print(0, 32, CTextConsole.EFontType.Cyan, "SUPER HARD MODE : ON");
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -44,33 +44,33 @@ namespace OpenTaiko {
|
|||||||
public void t進行描画(int x, int y) {
|
public void t進行描画(int x, int y) {
|
||||||
if (!base.IsDeActivated) {
|
if (!base.IsDeActivated) {
|
||||||
y += 0x153;
|
y += 0x153;
|
||||||
OpenTaiko.actTextConsole.tPrint(x, y, CTextConsole.EFontType.White, string.Format("Song/G. Offset:{0:####0}/{1:####0} ms", OpenTaiko.DTX.nBGMAdjust, OpenTaiko.ConfigIni.nGlobalOffsetMs));
|
OpenTaiko.actTextConsole.Print(x, y, CTextConsole.EFontType.White, string.Format("Song/G. Offset:{0:####0}/{1:####0} ms", OpenTaiko.DTX.nBGMAdjust, OpenTaiko.ConfigIni.nGlobalOffsetMs));
|
||||||
y -= 0x10;
|
y -= 0x10;
|
||||||
int num = (OpenTaiko.DTX.listChip.Count > 0) ? OpenTaiko.DTX.listChip[OpenTaiko.DTX.listChip.Count - 1].n発声時刻ms : 0;
|
int num = (OpenTaiko.DTX.listChip.Count > 0) ? OpenTaiko.DTX.listChip[OpenTaiko.DTX.listChip.Count - 1].n発声時刻ms : 0;
|
||||||
string str = "Time: " + ((((double)(SoundManager.PlayTimer.NowTime * OpenTaiko.ConfigIni.SongPlaybackSpeed)) / 1000.0)).ToString("####0.00") + " / " + ((((double)num) / 1000.0)).ToString("####0.00");
|
string str = "Time: " + ((((double)(SoundManager.PlayTimer.NowTime * OpenTaiko.ConfigIni.SongPlaybackSpeed)) / 1000.0)).ToString("####0.00") + " / " + ((((double)num) / 1000.0)).ToString("####0.00");
|
||||||
OpenTaiko.actTextConsole.tPrint(x, y, CTextConsole.EFontType.White, str);
|
OpenTaiko.actTextConsole.Print(x, y, CTextConsole.EFontType.White, str);
|
||||||
y -= 0x10;
|
y -= 0x10;
|
||||||
OpenTaiko.actTextConsole.tPrint(x, y, CTextConsole.EFontType.White, string.Format("Part: {0:####0}/{1:####0}", NowMeasure[0], NowMeasure[1]));
|
OpenTaiko.actTextConsole.Print(x, y, CTextConsole.EFontType.White, string.Format("Part: {0:####0}/{1:####0}", NowMeasure[0], NowMeasure[1]));
|
||||||
y -= 0x10;
|
y -= 0x10;
|
||||||
OpenTaiko.actTextConsole.tPrint(x, y, CTextConsole.EFontType.White, string.Format("BPM: {0:####0.0000}", this.dbBPM[0]));
|
OpenTaiko.actTextConsole.Print(x, y, CTextConsole.EFontType.White, string.Format("BPM: {0:####0.0000}", this.dbBPM[0]));
|
||||||
y -= 0x10;
|
y -= 0x10;
|
||||||
OpenTaiko.actTextConsole.tPrint(x, y, CTextConsole.EFontType.White, string.Format("Frame: {0:####0} fps", OpenTaiko.FPS.NowFPS));
|
OpenTaiko.actTextConsole.Print(x, y, CTextConsole.EFontType.White, string.Format("Frame: {0:####0} fps", OpenTaiko.FPS.NowFPS));
|
||||||
y -= 0x10;
|
y -= 0x10;
|
||||||
OpenTaiko.actTextConsole.tPrint(x, y, CTextConsole.EFontType.White, NotesTextN);
|
OpenTaiko.actTextConsole.Print(x, y, CTextConsole.EFontType.White, NotesTextN);
|
||||||
y -= 0x10;
|
y -= 0x10;
|
||||||
OpenTaiko.actTextConsole.tPrint(x, y, CTextConsole.EFontType.White, NotesTextE);
|
OpenTaiko.actTextConsole.Print(x, y, CTextConsole.EFontType.White, NotesTextE);
|
||||||
y -= 0x10;
|
y -= 0x10;
|
||||||
OpenTaiko.actTextConsole.tPrint(x, y, CTextConsole.EFontType.White, NotesTextM);
|
OpenTaiko.actTextConsole.Print(x, y, CTextConsole.EFontType.White, NotesTextM);
|
||||||
y -= 0x10;
|
y -= 0x10;
|
||||||
OpenTaiko.actTextConsole.tPrint(x, y, CTextConsole.EFontType.White, NotesTextC);
|
OpenTaiko.actTextConsole.Print(x, y, CTextConsole.EFontType.White, NotesTextC);
|
||||||
y -= 0x10;
|
y -= 0x10;
|
||||||
OpenTaiko.actTextConsole.tPrint(x, y, CTextConsole.EFontType.White, string.Format("SCROLL: {0:####0.00}", this.dbSCROLL));
|
OpenTaiko.actTextConsole.Print(x, y, CTextConsole.EFontType.White, string.Format("SCROLL: {0:####0.00}", this.dbSCROLL));
|
||||||
y -= 0x10;
|
y -= 0x10;
|
||||||
OpenTaiko.actTextConsole.tPrint(x, y, CTextConsole.EFontType.White, ScoreModeText);
|
OpenTaiko.actTextConsole.Print(x, y, CTextConsole.EFontType.White, ScoreModeText);
|
||||||
y -= 0x10;
|
y -= 0x10;
|
||||||
OpenTaiko.actTextConsole.tPrint(x, y, CTextConsole.EFontType.White, ListChipText);
|
OpenTaiko.actTextConsole.Print(x, y, CTextConsole.EFontType.White, ListChipText);
|
||||||
y -= 0x10;
|
y -= 0x10;
|
||||||
OpenTaiko.actTextConsole.tPrint(x, y, CTextConsole.EFontType.White, ListChipMText);
|
OpenTaiko.actTextConsole.Print(x, y, CTextConsole.EFontType.White, ListChipMText);
|
||||||
|
|
||||||
//CDTXMania.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.白, string.Format( "Sound CPU : {0:####0.00}%", CDTXMania.Sound管理.GetCPUusage() ) );
|
//CDTXMania.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.白, string.Format( "Sound CPU : {0:####0.00}%", CDTXMania.Sound管理.GetCPUusage() ) );
|
||||||
//y -= 0x10;
|
//y -= 0x10;
|
||||||
|
@ -2820,16 +2820,16 @@ namespace OpenTaiko {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void t入力メソッド記憶(EInstrumentPad part) {
|
protected void t入力メソッド記憶(EInstrumentPad part) {
|
||||||
if (OpenTaiko.Pad.st検知したデバイス.Keyboard) {
|
if (OpenTaiko.Pad.detectedDevice.Keyboard) {
|
||||||
this.b演奏にキーボードを使った = true;
|
this.b演奏にキーボードを使った = true;
|
||||||
}
|
}
|
||||||
if (OpenTaiko.Pad.st検知したデバイス.Joypad) {
|
if (OpenTaiko.Pad.detectedDevice.Joypad) {
|
||||||
this.b演奏にジョイパッドを使った = true;
|
this.b演奏にジョイパッドを使った = true;
|
||||||
}
|
}
|
||||||
if (OpenTaiko.Pad.st検知したデバイス.MIDIIN) {
|
if (OpenTaiko.Pad.detectedDevice.MIDIIN) {
|
||||||
this.b演奏にMIDI入力を使った = true;
|
this.b演奏にMIDI入力を使った = true;
|
||||||
}
|
}
|
||||||
if (OpenTaiko.Pad.st検知したデバイス.Mouse) {
|
if (OpenTaiko.Pad.detectedDevice.Mouse) {
|
||||||
this.b演奏にマウスを使った = true;
|
this.b演奏にマウスを使った = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -317,7 +317,7 @@ namespace OpenTaiko {
|
|||||||
if (OpenTaiko.stageSongSelect.nChoosenSongDifficulty[0] == (int)Difficulty.Tower) {
|
if (OpenTaiko.stageSongSelect.nChoosenSongDifficulty[0] == (int)Difficulty.Tower) {
|
||||||
int maxFloor = OpenTaiko.stageSongSelect.rChoosenSong.arスコア[5].譜面情報.nTotalFloor;
|
int maxFloor = OpenTaiko.stageSongSelect.rChoosenSong.arスコア[5].譜面情報.nTotalFloor;
|
||||||
|
|
||||||
OpenTaiko.actTextConsole.tPrint(0, 0, CTextConsole.EFontType.White, maxFloor.ToString());
|
OpenTaiko.actTextConsole.Print(0, 0, CTextConsole.EFontType.White, maxFloor.ToString());
|
||||||
|
|
||||||
int nightTime = Math.Max(140, maxFloor / 2);
|
int nightTime = Math.Max(140, maxFloor / 2);
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ namespace OpenTaiko {
|
|||||||
base.IsFirstDraw = false;
|
base.IsFirstDraw = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
OpenTaiko.actTextConsole.tPrint(0, 0, CTextConsole.EFontType.White, "TRAINING MODE (BETA)");
|
OpenTaiko.actTextConsole.Print(0, 0, CTextConsole.EFontType.White, "TRAINING MODE (BETA)");
|
||||||
|
|
||||||
if (OpenTaiko.ConfigIni.KeyAssign.KeyIsPressed(OpenTaiko.ConfigIni.KeyAssign.Drums.TrainingPause)) {
|
if (OpenTaiko.ConfigIni.KeyAssign.KeyIsPressed(OpenTaiko.ConfigIni.KeyAssign.Drums.TrainingPause)) {
|
||||||
if (this.bTrainingPAUSE) {
|
if (this.bTrainingPAUSE) {
|
||||||
|
@ -12,10 +12,10 @@ namespace OpenTaiko {
|
|||||||
DirPath = dirPath;
|
DirPath = dirPath;
|
||||||
}
|
}
|
||||||
public void DrawText(double x, double y, string text) {
|
public void DrawText(double x, double y, string text) {
|
||||||
OpenTaiko.actTextConsole.tPrint((int)x, (int)y, CTextConsole.EFontType.White, text);
|
OpenTaiko.actTextConsole.Print((int)x, (int)y, CTextConsole.EFontType.White, text);
|
||||||
}
|
}
|
||||||
public void DrawNum(double x, double y, double text) {
|
public void DrawNum(double x, double y, double text) {
|
||||||
OpenTaiko.actTextConsole.tPrint((int)x, (int)y, CTextConsole.EFontType.White, text.ToString());
|
OpenTaiko.actTextConsole.Print((int)x, (int)y, CTextConsole.EFontType.White, text.ToString());
|
||||||
}
|
}
|
||||||
public void AddGraph(string fileName) {
|
public void AddGraph(string fileName) {
|
||||||
string trueFileName = fileName.Replace('/', Path.DirectorySeparatorChar);
|
string trueFileName = fileName.Replace('/', Path.DirectorySeparatorChar);
|
||||||
|
@ -1248,7 +1248,7 @@ namespace OpenTaiko {
|
|||||||
|
|
||||||
int sc = GetTowerScoreRank() - 1;
|
int sc = GetTowerScoreRank() - 1;
|
||||||
|
|
||||||
OpenTaiko.actTextConsole.tPrint(0, 40, CTextConsole.EFontType.White, sc.ToString());
|
OpenTaiko.actTextConsole.Print(0, 40, CTextConsole.EFontType.White, sc.ToString());
|
||||||
|
|
||||||
if (sc >= 0 && OpenTaiko.Tx.TowerResult_ScoreRankEffect != null) {
|
if (sc >= 0 && OpenTaiko.Tx.TowerResult_ScoreRankEffect != null) {
|
||||||
int scoreRankEffect_width = OpenTaiko.Tx.TowerResult_ScoreRankEffect.szTextureSize.Width / 7;
|
int scoreRankEffect_width = OpenTaiko.Tx.TowerResult_ScoreRankEffect.szTextureSize.Width / 7;
|
||||||
|
Loading…
Reference in New Issue
Block a user