1
0
mirror of synced 2025-02-17 19:09:25 +01:00

ModIcons customizable offsets

This commit is contained in:
0auBSQ 2023-01-15 00:48:21 +09:00
parent 0f1d891547
commit a7b0b3516f
3 changed files with 75 additions and 49 deletions

View File

@ -1623,6 +1623,51 @@ namespace TJAPlayer3
}
#endregion
#region [Mod Icons]
/*
* public int[] ModIcons_OffsetX = { 0, 30, 60, 90, 0, 30, 60, 90 };
public int[] ModIcons_OffsetY = { 0, 0, 0, 0, 30, 30, 30, 30 };
public int[] ModIcons_OffsetX_Menu = { 0, 30, 60, 90, 120, 150, 180, 210 };
public int[] ModIcons_OffsetY_Menu = { 0, 0, 0, 0, 0, 0, 0, 0 };
*/
else if (strCommand == "ModIcons_OffsetX")
{
string[] strSplit = strParam.Split(',');
for (int i = 0; i < 8; i++)
{
ModIcons_OffsetX[i] = int.Parse(strSplit[i]);
}
}
else if (strCommand == "ModIcons_OffsetY")
{
string[] strSplit = strParam.Split(',');
for (int i = 0; i < 8; i++)
{
ModIcons_OffsetY[i] = int.Parse(strSplit[i]);
}
}
else if (strCommand == "ModIcons_OffsetX_Menu")
{
string[] strSplit = strParam.Split(',');
for (int i = 0; i < 8; i++)
{
ModIcons_OffsetX_Menu[i] = int.Parse(strSplit[i]);
}
}
else if (strCommand == "ModIcons_OffsetY_Menu")
{
string[] strSplit = strParam.Split(',');
for (int i = 0; i < 8; i++)
{
ModIcons_OffsetY_Menu[i] = int.Parse(strSplit[i]);
}
}
#endregion
#region SongSelect
else if (strCommand == "SongSelect_BoxExplanation_X")
{
@ -5804,6 +5849,15 @@ namespace TJAPlayer3
public int Text_Correction_Y = 0;
#endregion
#region [Mod icons]
public int[] ModIcons_OffsetX = { 0, 30, 60, 90, 0, 30, 60, 90 };
public int[] ModIcons_OffsetY = { 0, 0, 0, 0, 30, 30, 30, 30 };
public int[] ModIcons_OffsetX_Menu = { 0, 30, 60, 90, 120, 150, 180, 210 };
public int[] ModIcons_OffsetY_Menu = { 0, 0, 0, 0, 0, 0, 0, 0 };
#endregion
#endregion
}
}

View File

@ -1783,33 +1783,6 @@ namespace TJAPlayer3
float play_bpm_time = this.GetNowPBMTime(dTX, 0);
y += NotesManager.GetNoteY(pChip, time * pChip.dbBPM, _scrollSpeed, TJAPlayer3.Skin.Game_Notes_Interval, play_bpm_time, configIni.eScrollMode, false);
/*
if (TJAPlayer3.ConfigIni.eScrollMode == EScrollMode.Normal)
{
y += (int)((
(pChip.n発声時刻ms - CSound管理.rc演奏用タイマ.n現在時刻)
* pChip.dbBPM
* pChip.dbSCROLL_Y
* (this.act譜面スクロール速度.db現在の譜面スクロール速度[nPlayer] + 1.0))
/ 502.8594
/ 5.0);
}
else if (TJAPlayer3.ConfigIni.eScrollMode == EScrollMode.BMSCROLL || TJAPlayer3.ConfigIni.eScrollMode == EScrollMode.HBSCROLL)
{
float? play_bpm_time = null;
if (!play_bpm_time.HasValue)
{
play_bpm_time = this.GetNowPBMTime(dTX, 0);
}
var dbSCROLL_Y = configIni.eScrollMode == EScrollMode.BMSCROLL ? 1.0 : pChip.dbSCROLL_Y;
y += (int)(3 * 0.8335 * ((pChip.fBMSCROLLTime * NOTE_GAP) - (play_bpm_time * NOTE_GAP)) * dbSCROLL_Y * (this.act譜面スクロール速度.db現在の譜面スクロール速度[nPlayer] + 1.0) / 2 / 5.0);
}
*/
}
if ( pChip.nバーからの距離dot.Drums < 0 )
@ -2321,12 +2294,6 @@ namespace TJAPlayer3
}
}
else
{
//if (actChara.CharaAction_Balloon_Breaking.b進行中 && chip現在処理中の連打チップ[i].nPlayerSide == 0)
//{
//}
}
}
}
#region [ Treat big notes hit with a single hand ]

View File

@ -8,19 +8,27 @@ namespace TJAPlayer3
{
class ModIcons
{
static Dictionary<int, Action<int, int, int, int>> __methods = new Dictionary<int, Action<int, int, int, int>>()
{
{0, (x, y, a, p) => tDisplayHSIcon(x, y, a) },
{1, (x, y, a, p) => tDisplayDoronIcon(x, y, a) },
{2, (x, y, a, p) => tDisplayRandomIcon(x, y, a) },
{3, (x, y, a, p) => tDisplayFunModIcon(x, y, a) },
{4, (x, y, a, p) => tDisplayJustIcon(x, y, a) },
{5, (x, y, a, p) => tDisplayTimingIcon(x, y, a) },
{6, (x, y, a, p) => tDisplaySongSpeedIcon(x, y, p) },
{7, (x, y, a, p) => tDisplayAutoIcon(x, y, p) },
};
static public void tDisplayMods(int x, int y, int player)
{
// +30 x/y
int actual = TJAPlayer3.GetActualPlayer(player);
tDisplayHSIcon(x, y, actual); // 1st icon
tDisplayDoronIcon(x + 30, y, actual); // 2nd icon
tDisplayRandomIcon(x + 60, y, actual); // 3rd icon
tDisplayFunModIcon(x + 90, y, actual); // 4th icon
tDisplayJustIcon(x, y + 30, actual); // 5th icon
tDisplayTimingIcon(x + 30, y + 30, actual); // 6th icon
tDisplaySongSpeedIcon(x + 60, y + 30, player); // 7th icon
tDisplayAutoIcon(x + 90, y + 30, player); // 8th icon
for (int i = 0; i < 8; i++)
{
__methods[i](x + TJAPlayer3.Skin.ModIcons_OffsetX[i], y + TJAPlayer3.Skin.ModIcons_OffsetY[i], actual, player);
}
}
static public void tDisplayModsMenu(int x, int y, int player)
@ -30,14 +38,10 @@ namespace TJAPlayer3
int actual = TJAPlayer3.GetActualPlayer(player);
tDisplayHSIcon(x, y, actual); // 1st icon
tDisplayDoronIcon(x + 30, y, actual); // 2nd icon
tDisplayRandomIcon(x + 60, y, actual); // 3rd icon
tDisplayFunModIcon(x + 90, y, actual); // 4th icon
tDisplayJustIcon(x + 120, y, actual); // 5th icon
tDisplayTimingIcon(x + 150, y, actual); // 6th icon
tDisplaySongSpeedIcon(x + 180, y, player); // 7th icon
tDisplayAutoIcon(x + 210, y, player); // 8th icon
for (int i = 0; i < 8; i++)
{
__methods[i](x + TJAPlayer3.Skin.ModIcons_OffsetX_Menu[i], y + TJAPlayer3.Skin.ModIcons_OffsetY_Menu[i], actual, player);
}
if (TJAPlayer3.Tx.Mod_None != null)
TJAPlayer3.Tx.Mod_None.Opacity = 255;
@ -45,6 +49,7 @@ namespace TJAPlayer3
static private void tDisplayHSIcon(int x, int y, int player)
{
// TO DO : Add HS x0.5 icon (_vals == 4)
var _vals = new int[] { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 24, 29, 34, 39 };
int _i = -1;